@satinhq/kit 0.0.0-stage → 0.1.0-beta.1
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 +21 -0
- package/NOTICE +96 -0
- package/README.md +454 -2
- package/THIRD_PARTY_NOTICES.md +65 -0
- package/bin/satin.mjs +13 -0
- package/dist/acknowledgements/Acknowledgements.d.ts +4 -0
- package/dist/acknowledgements/Acknowledgements.js +42 -0
- package/dist/acknowledgements/bundledNotices.d.ts +4 -0
- package/dist/acknowledgements/bundledNotices.js +58 -0
- package/dist/acknowledgements/inventory.d.ts +17 -0
- package/dist/acknowledgements/inventory.js +10 -0
- package/dist/acknowledgements/inventory.json +39 -0
- package/dist/actions/ActionMenu.d.ts +30 -0
- package/dist/actions/ActionMenu.js +103 -0
- package/dist/actions/RowActions.d.ts +42 -0
- package/dist/actions/RowActions.js +820 -0
- package/dist/actions/contextMotion.d.ts +78 -0
- package/dist/actions/contextMotion.js +329 -0
- package/dist/actions/motion.d.ts +19 -0
- package/dist/actions/motion.js +74 -0
- package/dist/actions/nativeContextAppearance.json +86 -0
- package/dist/actions/nativeContextMotion.json +734 -0
- package/dist/actions/nativeMotion.json +388 -0
- package/dist/actions/preview.d.ts +27 -0
- package/dist/actions/preview.js +217 -0
- package/dist/actions/recognizers.d.ts +24 -0
- package/dist/actions/recognizers.js +87 -0
- package/dist/actions/rowScrub.d.ts +59 -0
- package/dist/actions/rowScrub.js +400 -0
- package/dist/actions/swipeSpring.d.ts +14 -0
- package/dist/actions/swipeSpring.js +35 -0
- package/dist/actions/types.d.ts +71 -0
- package/dist/actions/types.js +28 -0
- package/dist/app/InstallComponents.d.ts +16 -0
- package/dist/app/InstallComponents.js +104 -0
- package/dist/app/InstallationDiagnostics.d.ts +7 -0
- package/dist/app/InstallationDiagnostics.js +23 -0
- package/dist/app/OrientationGuard.d.ts +8 -0
- package/dist/app/OrientationGuard.js +9 -0
- package/dist/app/appearance.d.ts +18 -0
- package/dist/app/appearance.js +15 -0
- package/dist/app/appearanceStore.d.ts +30 -0
- package/dist/app/appearanceStore.js +228 -0
- package/dist/app/backgroundUpdate.d.ts +20 -0
- package/dist/app/backgroundUpdate.js +151 -0
- package/dist/app/buildInfo.d.ts +11 -0
- package/dist/app/buildInfo.js +12 -0
- package/dist/app/buildInfoBuild.d.ts +3 -0
- package/dist/app/buildInfoBuild.js +12 -0
- package/dist/app/checkCli.d.ts +1 -0
- package/dist/app/checkCli.js +73 -0
- package/dist/app/coldLaunchUpdate.d.ts +14 -0
- package/dist/app/coldLaunchUpdate.js +384 -0
- package/dist/app/definition.d.ts +85 -0
- package/dist/app/definition.js +347 -0
- package/dist/app/deployment.d.ts +28 -0
- package/dist/app/deployment.js +352 -0
- package/dist/app/deploymentBuild.d.ts +3 -0
- package/dist/app/deploymentBuild.js +55 -0
- package/dist/app/earlyWorker.d.ts +3 -0
- package/dist/app/earlyWorker.js +77 -0
- package/dist/app/head.d.ts +10 -0
- package/dist/app/head.js +120 -0
- package/dist/app/icons.d.ts +4 -0
- package/dist/app/icons.js +35 -0
- package/dist/app/install.d.ts +18 -0
- package/dist/app/install.js +82 -0
- package/dist/app/installCheck.d.ts +2 -0
- package/dist/app/installCheck.js +148 -0
- package/dist/app/installContext.d.ts +35 -0
- package/dist/app/installContext.js +45 -0
- package/dist/app/installCustom.d.ts +25 -0
- package/dist/app/installCustom.js +55 -0
- package/dist/app/installExperience.d.ts +22 -0
- package/dist/app/installExperience.js +389 -0
- package/dist/app/installExperienceDevice.d.ts +29 -0
- package/dist/app/installExperienceDevice.js +160 -0
- package/dist/app/installExperienceHome.d.ts +16 -0
- package/dist/app/installExperienceHome.js +304 -0
- package/dist/app/installExperienceRuntime.d.ts +37 -0
- package/dist/app/installExperienceRuntime.js +285 -0
- package/dist/app/installPolicy.d.ts +28 -0
- package/dist/app/installPolicy.js +90 -0
- package/dist/app/installQr.d.ts +10 -0
- package/dist/app/installQr.js +139 -0
- package/dist/app/installStrings.d.ts +52 -0
- package/dist/app/installStrings.js +75 -0
- package/dist/app/installTipPath.d.ts +12 -0
- package/dist/app/installTipPath.js +9 -0
- package/dist/app/installationFailure.d.ts +14 -0
- package/dist/app/installationFailure.js +38 -0
- package/dist/app/launch.d.ts +7 -0
- package/dist/app/launch.js +241 -0
- package/dist/app/launchReadiness.d.ts +9 -0
- package/dist/app/launchReadiness.js +72 -0
- package/dist/app/launchScreen.d.ts +16 -0
- package/dist/app/launchScreen.js +14 -0
- package/dist/app/launchScreenRuntime.d.ts +19 -0
- package/dist/app/launchScreenRuntime.js +313 -0
- package/dist/app/launchWatchdog.d.ts +1 -0
- package/dist/app/launchWatchdog.js +202 -0
- package/dist/app/manifests.d.ts +19 -0
- package/dist/app/manifests.js +20 -0
- package/dist/app/mdm.d.ts +3 -0
- package/dist/app/mdm.js +20 -0
- package/dist/app/mediaCheck.d.ts +9 -0
- package/dist/app/mediaCheck.js +122 -0
- package/dist/app/mediaTypes.d.ts +2 -0
- package/dist/app/mediaTypes.js +13 -0
- package/dist/app/platformPolicy.d.ts +3 -0
- package/dist/app/platformPolicy.js +10 -0
- package/dist/app/platformScripts.d.ts +6 -0
- package/dist/app/platformScripts.js +65 -0
- package/dist/app/releaseUpdates.d.ts +7 -0
- package/dist/app/releaseUpdates.js +53 -0
- package/dist/app/runtime.d.ts +9 -0
- package/dist/app/runtime.js +38 -0
- package/dist/app/startup.d.ts +30 -0
- package/dist/app/startup.js +24 -0
- package/dist/app/statusBand.d.ts +11 -0
- package/dist/app/statusBand.js +257 -0
- package/dist/app/viewport.d.ts +3 -0
- package/dist/app/viewport.js +42 -0
- package/dist/app/viewportValue.d.ts +5 -0
- package/dist/app/viewportValue.js +14 -0
- package/dist/app/vite.d.ts +27 -0
- package/dist/app/vite.js +440 -0
- package/dist/app/warmImage.d.ts +3 -0
- package/dist/app/warmImage.js +59 -0
- package/dist/content/content.d.ts +153 -0
- package/dist/content/content.js +315 -0
- package/dist/content/layout.d.ts +26 -0
- package/dist/content/layout.js +114 -0
- package/dist/content/scaledMetric.d.ts +3 -0
- package/dist/content/scaledMetric.js +68 -0
- package/dist/content/typography.d.ts +83 -0
- package/dist/content/typography.js +32 -0
- package/dist/controls/ActivityIndicatorSegments.d.ts +4 -0
- package/dist/controls/ActivityIndicatorSegments.js +5 -0
- package/dist/controls/ColorPicker.d.ts +20 -0
- package/dist/controls/ColorPicker.js +70 -0
- package/dist/controls/ControlRow.d.ts +5 -0
- package/dist/controls/ControlRow.js +10 -0
- package/dist/controls/DatePicker.d.ts +41 -0
- package/dist/controls/DatePicker.js +148 -0
- package/dist/controls/ProgressView.d.ts +17 -0
- package/dist/controls/ProgressView.js +24 -0
- package/dist/controls/civilDate.d.ts +49 -0
- package/dist/controls/civilDate.js +112 -0
- package/dist/data/database.d.ts +154 -0
- package/dist/data/database.js +710 -0
- package/dist/data/value-equal.d.ts +2 -0
- package/dist/data/value-equal.js +36 -0
- package/dist/data/write-store.d.ts +38 -0
- package/dist/data/write-store.js +192 -0
- package/dist/dev-menu/DevMenu.d.ts +1 -0
- package/dist/dev-menu/DevMenu.js +121 -0
- package/dist/dev-menu/actions.d.ts +12 -0
- package/dist/dev-menu/actions.js +99 -0
- package/dist/dev-menu/build.d.ts +5 -0
- package/dist/dev-menu/build.js +40 -0
- package/dist/dev-menu/gesture.d.ts +18 -0
- package/dist/dev-menu/gesture.js +109 -0
- package/dist/dev-menu/shake.d.ts +2 -0
- package/dist/dev-menu/shake.js +36 -0
- package/dist/dev-menu/types.d.ts +8 -0
- package/dist/dev-menu/types.js +1 -0
- package/dist/diagnostics.d.ts +3 -0
- package/dist/diagnostics.js +4 -0
- package/dist/docs/app-recipes.md +411 -0
- package/dist/docs/components/file-importer.md +54 -0
- package/dist/docs/components/paste-button.md +48 -0
- package/dist/docs/components/photos-picker.md +53 -0
- package/dist/docs/components/share-link.md +58 -0
- package/dist/docs/content.md +159 -0
- package/dist/docs/controls.md +151 -0
- package/dist/docs/data.md +332 -0
- package/dist/docs/limitations.md +40 -0
- package/dist/docs/messaging-scroll.md +234 -0
- package/dist/docs/networking.md +190 -0
- package/dist/docs/push.md +215 -0
- package/dist/docs/swiftui-reference.md +1895 -0
- package/dist/docs/symbols.md +293 -0
- package/dist/docs/tokens.md +60 -0
- package/dist/fidelity/devAssertions.d.ts +21 -0
- package/dist/fidelity/devAssertions.js +199 -0
- package/dist/focus/focusIntentMachine.d.ts +106 -0
- package/dist/focus/focusIntentMachine.js +359 -0
- package/dist/focus/navigationFocus.d.ts +42 -0
- package/dist/focus/navigationFocus.js +241 -0
- package/dist/focus/programmaticFocus.d.ts +15 -0
- package/dist/focus/programmaticFocus.js +152 -0
- package/dist/gestures/GestureView.d.ts +12 -0
- package/dist/gestures/GestureView.js +321 -0
- package/dist/gestures/arena.d.ts +138 -0
- package/dist/gestures/arena.js +417 -0
- package/dist/gestures/existingCompetitors.d.ts +79 -0
- package/dist/gestures/existingCompetitors.js +82 -0
- package/dist/gestures/gesture.d.ts +62 -0
- package/dist/gestures/gesture.js +107 -0
- package/dist/glass/ControlLens.d.ts +46 -0
- package/dist/glass/ControlLens.js +88 -0
- package/dist/glass/GlassBar.d.ts +9 -0
- package/dist/glass/GlassBar.js +22 -0
- package/dist/glass/GlassConfusionReview.d.ts +3 -0
- package/dist/glass/GlassConfusionReview.js +185 -0
- package/dist/glass/GlassEffect.d.ts +69 -0
- package/dist/glass/GlassEffect.js +550 -0
- package/dist/glass/GlassMaterialRoot.d.ts +7 -0
- package/dist/glass/GlassMaterialRoot.js +39 -0
- package/dist/glass/GlassPresentation.d.ts +29 -0
- package/dist/glass/GlassPresentation.js +1041 -0
- package/dist/glass/GlassProbeIcons.d.ts +8 -0
- package/dist/glass/GlassProbeIcons.js +12 -0
- package/dist/glass/GlassProbeOverlay.d.ts +52 -0
- package/dist/glass/GlassProbeOverlay.js +45 -0
- package/dist/glass/GlassTextField.d.ts +22 -0
- package/dist/glass/GlassTextField.js +12 -0
- package/dist/glass/MaterialEffectRoot.d.ts +9 -0
- package/dist/glass/MaterialEffectRoot.js +189 -0
- package/dist/glass/Menu.d.ts +3 -0
- package/dist/glass/Menu.js +35 -0
- package/dist/glass/MenuStack.d.ts +23 -0
- package/dist/glass/MenuStack.js +371 -0
- package/dist/glass/MenuSymbol.d.ts +7 -0
- package/dist/glass/MenuSymbol.js +16 -0
- package/dist/glass/MorphEllipsisArtwork.d.ts +2 -0
- package/dist/glass/MorphEllipsisArtwork.js +6 -0
- package/dist/glass/TabBar.d.ts +29 -0
- package/dist/glass/TabBar.js +176 -0
- package/dist/glass/capability.d.ts +25 -0
- package/dist/glass/capability.js +63 -0
- package/dist/glass/captureWindow.d.ts +60 -0
- package/dist/glass/captureWindow.js +119 -0
- package/dist/glass/confusionSession.d.ts +41 -0
- package/dist/glass/confusionSession.js +44 -0
- package/dist/glass/contactPhysics.d.ts +130 -0
- package/dist/glass/contactPhysics.js +214 -0
- package/dist/glass/context.d.ts +37 -0
- package/dist/glass/context.js +11 -0
- package/dist/glass/errorAlert.d.ts +6 -0
- package/dist/glass/errorAlert.js +57 -0
- package/dist/glass/errors.d.ts +22 -0
- package/dist/glass/errors.js +78 -0
- package/dist/glass/failurePolicy.d.ts +4 -0
- package/dist/glass/failurePolicy.js +20 -0
- package/dist/glass/fallback/material.d.ts +16 -0
- package/dist/glass/fallback/material.js +87 -0
- package/dist/glass/fallback/regions.d.ts +16 -0
- package/dist/glass/fallback/regions.js +249 -0
- package/dist/glass/fallback/runtime.d.ts +72 -0
- package/dist/glass/fallback/runtime.js +278 -0
- package/dist/glass/fallback/selection.d.ts +2 -0
- package/dist/glass/fallback/selection.js +9 -0
- package/dist/glass/fieldGeometry.d.ts +28 -0
- package/dist/glass/fieldGeometry.js +64 -0
- package/dist/glass/fieldMotion.d.ts +42 -0
- package/dist/glass/fieldMotion.js +47 -0
- package/dist/glass/glassContact.d.ts +76 -0
- package/dist/glass/glassContact.js +153 -0
- package/dist/glass/glassProbeSettings.d.ts +18 -0
- package/dist/glass/glassProbeSettings.js +133 -0
- package/dist/glass/lens/Scene.d.ts +108 -0
- package/dist/glass/lens/Scene.js +553 -0
- package/dist/glass/lens/backgrounds.json +103 -0
- package/dist/glass/lens/bitmapBackdrop.d.ts +14 -0
- package/dist/glass/lens/bitmapBackdrop.js +35 -0
- package/dist/glass/lens/controlLift.d.ts +94 -0
- package/dist/glass/lens/controlLift.js +78 -0
- package/dist/glass/lens/data.d.ts +19 -0
- package/dist/glass/lens/data.js +161 -0
- package/dist/glass/lens/drawableTop.d.ts +16 -0
- package/dist/glass/lens/drawableTop.js +15 -0
- package/dist/glass/lens/icons.d.ts +9 -0
- package/dist/glass/lens/icons.js +34 -0
- package/dist/glass/lens/interactiveContact.d.ts +33 -0
- package/dist/glass/lens/interactiveContact.js +158 -0
- package/dist/glass/lens/interactivePress.d.ts +95 -0
- package/dist/glass/lens/interactivePress.js +169 -0
- package/dist/glass/lens/ios27GlyphFit.json +126 -0
- package/dist/glass/lens/lensLightingSamples.json +1 -0
- package/dist/glass/lens/lensPress.d.ts +22 -0
- package/dist/glass/lens/lensPress.js +68 -0
- package/dist/glass/lens/lensPressSamples.json +1 -0
- package/dist/glass/lens/liquidMotion.d.ts +50 -0
- package/dist/glass/lens/liquidMotion.js +239 -0
- package/dist/glass/lens/materialGlassRecipes.json +776 -0
- package/dist/glass/lens/materialUniforms.d.ts +22 -0
- package/dist/glass/lens/materialUniforms.js +117 -0
- package/dist/glass/lens/menu-closing-close-fit.json +380 -0
- package/dist/glass/lens/menu-opening-native-fits.json +911 -0
- package/dist/glass/lens/menuContextFit.json +88 -0
- package/dist/glass/lens/menuContextOpacity.json +98 -0
- package/dist/glass/lens/menuContextPresentation.d.ts +15 -0
- package/dist/glass/lens/menuContextPresentation.js +65 -0
- package/dist/glass/lens/menuCornerFit.json +252 -0
- package/dist/glass/lens/menuCornerMotion.d.ts +9 -0
- package/dist/glass/lens/menuCornerMotion.js +5 -0
- package/dist/glass/lens/menuDropFit.json +64 -0
- package/dist/glass/lens/menuField.d.ts +178 -0
- package/dist/glass/lens/menuField.js +564 -0
- package/dist/glass/lens/menuGesturePresentation.d.ts +12 -0
- package/dist/glass/lens/menuGesturePresentation.js +42 -0
- package/dist/glass/lens/menuGlyphDropFit.json +38 -0
- package/dist/glass/lens/menuMorphFit.json +564 -0
- package/dist/glass/lens/menuMorphMotion.d.ts +70 -0
- package/dist/glass/lens/menuMorphMotion.js +219 -0
- package/dist/glass/lens/menuMorphPhoneFit.json +85 -0
- package/dist/glass/lens/menuMotion.d.ts +81 -0
- package/dist/glass/lens/menuMotion.js +323 -0
- package/dist/glass/lens/menuPlacement.d.ts +5 -0
- package/dist/glass/lens/menuPlacement.js +29 -0
- package/dist/glass/lens/menuSpring.d.ts +18 -0
- package/dist/glass/lens/menuSpring.js +29 -0
- package/dist/glass/lens/menuTouchLight.d.ts +13 -0
- package/dist/glass/lens/menuTouchLight.js +147 -0
- package/dist/glass/lens/mirrorConstants.d.ts +1 -0
- package/dist/glass/lens/mirrorConstants.js +2 -0
- package/dist/glass/lens/mirrorExtents.d.ts +52 -0
- package/dist/glass/lens/mirrorExtents.js +264 -0
- package/dist/glass/lens/mirrorInvalidation.d.ts +6 -0
- package/dist/glass/lens/mirrorInvalidation.js +10 -0
- package/dist/glass/lens/mirrorReuse.d.ts +20 -0
- package/dist/glass/lens/mirrorReuse.js +166 -0
- package/dist/glass/lens/motion.d.ts +62 -0
- package/dist/glass/lens/motion.js +93 -0
- package/dist/glass/lens/recordedMotion.d.ts +6 -0
- package/dist/glass/lens/recordedMotion.js +44 -0
- package/dist/glass/lens/referenceBackground.d.ts +9 -0
- package/dist/glass/lens/referenceBackground.js +151 -0
- package/dist/glass/lens/referenceProfiles.d.ts +21 -0
- package/dist/glass/lens/referenceProfiles.js +33 -0
- package/dist/glass/lens/referenceRegularTint.d.ts +12 -0
- package/dist/glass/lens/referenceRegularTint.js +41 -0
- package/dist/glass/lens/scopeSegments.d.ts +12 -0
- package/dist/glass/lens/scopeSegments.js +18 -0
- package/dist/glass/lens/scrollAnchoring.d.ts +15 -0
- package/dist/glass/lens/scrollAnchoring.js +17 -0
- package/dist/glass/lens/selectionParameters.json +94 -0
- package/dist/glass/lens/shapeParameters.json +198 -0
- package/dist/glass/lens/tab-motion-native-fits.json +778 -0
- package/dist/glass/lens/tabAccessoryMotion.d.ts +52 -0
- package/dist/glass/lens/tabAccessoryMotion.js +52 -0
- package/dist/glass/lens/tabChromaRimModel.d.ts +43 -0
- package/dist/glass/lens/tabChromaRimModel.js +93 -0
- package/dist/glass/lens/tabCollapseInkSamples.json +49 -0
- package/dist/glass/lens/tabCompactGesture.d.ts +15 -0
- package/dist/glass/lens/tabCompactGesture.js +50 -0
- package/dist/glass/lens/tabGeometryAttack.json +70 -0
- package/dist/glass/lens/tabGlyphColours.d.ts +17 -0
- package/dist/glass/lens/tabGlyphColours.js +38 -0
- package/dist/glass/lens/tabInterruptedDecaySamples.json +245 -0
- package/dist/glass/lens/tabInterruptedRestoreSamples.json +290 -0
- package/dist/glass/lens/tabMaterialModel.d.ts +10 -0
- package/dist/glass/lens/tabMaterialModel.js +108 -0
- package/dist/glass/lens/tabMinimizeInk.d.ts +15 -0
- package/dist/glass/lens/tabMinimizeInk.js +14 -0
- package/dist/glass/lens/tabMinimizeMotion.d.ts +36 -0
- package/dist/glass/lens/tabMinimizeMotion.js +107 -0
- package/dist/glass/lens/tabMinimizeSamples.json +411 -0
- package/dist/glass/lens/tabMotion.d.ts +91 -0
- package/dist/glass/lens/tabMotion.js +478 -0
- package/dist/glass/lens/tabMotionFit.d.ts +76 -0
- package/dist/glass/lens/tabMotionFit.js +61 -0
- package/dist/glass/lens/tabNativeSymbols.d.ts +1 -0
- package/dist/glass/lens/tabNativeSymbols.js +7 -0
- package/dist/glass/lens/tabPresentation.d.ts +21 -0
- package/dist/glass/lens/tabPresentation.js +20 -0
- package/dist/glass/lens/tabRelease.d.ts +5 -0
- package/dist/glass/lens/tabRelease.js +14 -0
- package/dist/glass/lens/tabRestoreMotion.d.ts +19 -0
- package/dist/glass/lens/tabRestoreMotion.js +65 -0
- package/dist/glass/lens/tabRestoreSamples.json +1272 -0
- package/dist/glass/lens/tabSearchMember.d.ts +38 -0
- package/dist/glass/lens/tabSearchMember.js +74 -0
- package/dist/glass/lens/tabSelectionMaterial.d.ts +20 -0
- package/dist/glass/lens/tabSelectionMaterial.js +23 -0
- package/dist/glass/lens/tabSelectionMeasurements.test-fixture.d.ts +9 -0
- package/dist/glass/lens/tabSelectionMeasurements.test-fixture.js +74 -0
- package/dist/glass/lens/tabSettingsSymbol.d.ts +1 -0
- package/dist/glass/lens/tabSettingsSymbol.js +2 -0
- package/dist/glass/lens/tabShapeResponse.d.ts +7 -0
- package/dist/glass/lens/tabShapeResponse.js +30 -0
- package/dist/glass/lens/theme.d.ts +18 -0
- package/dist/glass/lens/theme.js +40 -0
- package/dist/glass/lens/trace.d.ts +2 -0
- package/dist/glass/lens/trace.js +27 -0
- package/dist/glass/liquidContext.d.ts +32 -0
- package/dist/glass/liquidContext.js +2 -0
- package/dist/glass/menuPanelPlacement.d.ts +51 -0
- package/dist/glass/menuPanelPlacement.js +128 -0
- package/dist/glass/menuPresenter.d.ts +34 -0
- package/dist/glass/menuPresenter.js +983 -0
- package/dist/glass/menuSymbolMasks.d.ts +1 -0
- package/dist/glass/menuSymbolMasks.js +1 -0
- package/dist/glass/menuSymbolTokens.d.ts +22 -0
- package/dist/glass/menuSymbolTokens.js +12 -0
- package/dist/glass/menuTriggerGeometry.d.ts +99 -0
- package/dist/glass/menuTriggerGeometry.js +126 -0
- package/dist/glass/menuTriggerSnapshot.d.ts +77 -0
- package/dist/glass/menuTriggerSnapshot.js +69 -0
- package/dist/glass/menuTypes.d.ts +22 -0
- package/dist/glass/menuTypes.js +1 -0
- package/dist/glass/morphField.d.ts +18 -0
- package/dist/glass/morphField.js +139 -0
- package/dist/glass/presentationFrame.d.ts +43 -0
- package/dist/glass/presentationFrame.js +82 -0
- package/dist/glass/pressHighlight.d.ts +9 -0
- package/dist/glass/pressHighlight.js +158 -0
- package/dist/glass/regionRegistry.d.ts +93 -0
- package/dist/glass/regionRegistry.js +313 -0
- package/dist/glass/regions.d.ts +262 -0
- package/dist/glass/regions.js +147 -0
- package/dist/glass/regularMaterialContext.d.ts +45 -0
- package/dist/glass/regularMaterialContext.js +118 -0
- package/dist/glass/regularTriggerMaterial.d.ts +19 -0
- package/dist/glass/regularTriggerMaterial.js +111 -0
- package/dist/glass/regularTriggerRim.d.ts +163 -0
- package/dist/glass/regularTriggerRim.js +436 -0
- package/dist/glass/renderSpecs.d.ts +454 -0
- package/dist/glass/renderSpecs.js +231 -0
- package/dist/glass/rendererContract.d.ts +205 -0
- package/dist/glass/rendererContract.js +18 -0
- package/dist/glass/shapeTrack.d.ts +53 -0
- package/dist/glass/shapeTrack.js +74 -0
- package/dist/glass/shapeTrackRegistry.d.ts +40 -0
- package/dist/glass/shapeTrackRegistry.js +49 -0
- package/dist/glass/sourceDamage.d.ts +6 -0
- package/dist/glass/sourceDamage.js +8 -0
- package/dist/glass/submenuMotion.d.ts +205 -0
- package/dist/glass/submenuMotion.js +306 -0
- package/dist/glass/tabBarModel.d.ts +12 -0
- package/dist/glass/tabBarModel.js +32 -0
- package/dist/glass/testing.d.ts +14 -0
- package/dist/glass/testing.js +14 -0
- package/dist/glass/tokens.d.ts +79 -0
- package/dist/glass/tokens.js +86 -0
- package/dist/glass/toolbarMaterialContext.d.ts +28 -0
- package/dist/glass/toolbarMaterialContext.js +66 -0
- package/dist/glass/topLayer.d.ts +5 -0
- package/dist/glass/topLayer.js +10 -0
- package/dist/glass/unionOutline.d.ts +11 -0
- package/dist/glass/unionOutline.js +98 -0
- package/dist/glass/visibleDeadline.d.ts +21 -0
- package/dist/glass/visibleDeadline.js +61 -0
- package/dist/glass/webgpu/accessoryMorph.d.ts +99 -0
- package/dist/glass/webgpu/accessoryMorph.js +473 -0
- package/dist/glass/webgpu/accessoryTrack.d.ts +47 -0
- package/dist/glass/webgpu/accessoryTrack.js +59 -0
- package/dist/glass/webgpu/areaMips.d.ts +50 -0
- package/dist/glass/webgpu/areaMips.js +166 -0
- package/dist/glass/webgpu/backdrop.d.ts +86 -0
- package/dist/glass/webgpu/backdrop.js +243 -0
- package/dist/glass/webgpu/backdropLayers.d.ts +29 -0
- package/dist/glass/webgpu/backdropLayers.js +182 -0
- package/dist/glass/webgpu/backgroundLayers.d.ts +71 -0
- package/dist/glass/webgpu/backgroundLayers.js +385 -0
- package/dist/glass/webgpu/cadence.d.ts +18 -0
- package/dist/glass/webgpu/cadence.js +35 -0
- package/dist/glass/webgpu/canvasSubmission.d.ts +6 -0
- package/dist/glass/webgpu/canvasSubmission.js +22 -0
- package/dist/glass/webgpu/capture.d.ts +77 -0
- package/dist/glass/webgpu/capture.js +534 -0
- package/dist/glass/webgpu/captureBands.d.ts +39 -0
- package/dist/glass/webgpu/captureBands.js +53 -0
- package/dist/glass/webgpu/captureContext.d.ts +1 -0
- package/dist/glass/webgpu/captureContext.js +6 -0
- package/dist/glass/webgpu/captureDemand.d.ts +44 -0
- package/dist/glass/webgpu/captureDemand.js +81 -0
- package/dist/glass/webgpu/captureRelease.d.ts +18 -0
- package/dist/glass/webgpu/captureRelease.js +39 -0
- package/dist/glass/webgpu/client.d.ts +49 -0
- package/dist/glass/webgpu/client.js +336 -0
- package/dist/glass/webgpu/contextBackdrop.d.ts +6 -0
- package/dist/glass/webgpu/contextBackdrop.js +13 -0
- package/dist/glass/webgpu/contextComposite.d.ts +64 -0
- package/dist/glass/webgpu/contextComposite.js +66 -0
- package/dist/glass/webgpu/decodedImage.d.ts +1 -0
- package/dist/glass/webgpu/decodedImage.js +2 -0
- package/dist/glass/webgpu/deviceLimits.d.ts +5 -0
- package/dist/glass/webgpu/deviceLimits.js +8 -0
- package/dist/glass/webgpu/edgePass.d.ts +9 -0
- package/dist/glass/webgpu/edgePass.js +170 -0
- package/dist/glass/webgpu/entry.worker.d.ts +1 -0
- package/dist/glass/webgpu/entry.worker.js +28 -0
- package/dist/glass/webgpu/errorCode.d.ts +3 -0
- package/dist/glass/webgpu/errorCode.js +27 -0
- package/dist/glass/webgpu/errors.d.ts +8 -0
- package/dist/glass/webgpu/errors.js +55 -0
- package/dist/glass/webgpu/fieldInk.d.ts +9 -0
- package/dist/glass/webgpu/fieldInk.js +62 -0
- package/dist/glass/webgpu/foreground.d.ts +29 -0
- package/dist/glass/webgpu/foreground.js +313 -0
- package/dist/glass/webgpu/frameClock.d.ts +34 -0
- package/dist/glass/webgpu/frameClock.js +60 -0
- package/dist/glass/webgpu/frameGraph.d.ts +57 -0
- package/dist/glass/webgpu/frameGraph.js +287 -0
- package/dist/glass/webgpu/frameProbe.d.ts +58 -0
- package/dist/glass/webgpu/frameProbe.js +181 -0
- package/dist/glass/webgpu/interactionProfiles.d.ts +10 -0
- package/dist/glass/webgpu/interactionProfiles.js +25 -0
- package/dist/glass/webgpu/keptGlyphs.d.ts +68 -0
- package/dist/glass/webgpu/keptGlyphs.js +85 -0
- package/dist/glass/webgpu/keyboardBackdrop.d.ts +12 -0
- package/dist/glass/webgpu/keyboardBackdrop.js +51 -0
- package/dist/glass/webgpu/lagTrace.d.ts +31 -0
- package/dist/glass/webgpu/lagTrace.js +22 -0
- package/dist/glass/webgpu/layers.d.ts +100 -0
- package/dist/glass/webgpu/layers.js +301 -0
- package/dist/glass/webgpu/lensDebug.d.ts +4 -0
- package/dist/glass/webgpu/lensDebug.js +28 -0
- package/dist/glass/webgpu/lensDiffusion.d.ts +2 -0
- package/dist/glass/webgpu/lensDiffusion.js +20 -0
- package/dist/glass/webgpu/lensLightingFit.json +222 -0
- package/dist/glass/webgpu/menuLiftInput.d.ts +30 -0
- package/dist/glass/webgpu/menuLiftInput.js +39 -0
- package/dist/glass/webgpu/menuSurfaceGuard.d.ts +17 -0
- package/dist/glass/webgpu/menuSurfaceGuard.js +26 -0
- package/dist/glass/webgpu/minimize.d.ts +184 -0
- package/dist/glass/webgpu/minimize.js +470 -0
- package/dist/glass/webgpu/navigationAtlasCopy.d.ts +12 -0
- package/dist/glass/webgpu/navigationAtlasCopy.js +121 -0
- package/dist/glass/webgpu/navigationTracks.d.ts +3 -0
- package/dist/glass/webgpu/navigationTracks.js +84 -0
- package/dist/glass/webgpu/passes.d.ts +204 -0
- package/dist/glass/webgpu/passes.js +394 -0
- package/dist/glass/webgpu/pendingSurfaceInput.d.ts +29 -0
- package/dist/glass/webgpu/pendingSurfaceInput.js +51 -0
- package/dist/glass/webgpu/preparedSourcePixels.d.ts +21 -0
- package/dist/glass/webgpu/preparedSourcePixels.js +43 -0
- package/dist/glass/webgpu/presentationBackdrop.d.ts +3 -0
- package/dist/glass/webgpu/presentationBackdrop.js +33 -0
- package/dist/glass/webgpu/presentationDiffusion.d.ts +48 -0
- package/dist/glass/webgpu/presentationDiffusion.js +57 -0
- package/dist/glass/webgpu/presentationMaterial.d.ts +9 -0
- package/dist/glass/webgpu/presentationMaterial.js +156 -0
- package/dist/glass/webgpu/presenterViewport.d.ts +11 -0
- package/dist/glass/webgpu/presenterViewport.js +193 -0
- package/dist/glass/webgpu/production.d.ts +552 -0
- package/dist/glass/webgpu/production.js +1929 -0
- package/dist/glass/webgpu/productionInstalls.d.ts +53 -0
- package/dist/glass/webgpu/productionInstalls.js +225 -0
- package/dist/glass/webgpu/productionNavigation.d.ts +5 -0
- package/dist/glass/webgpu/productionNavigation.js +360 -0
- package/dist/glass/webgpu/productionPinnedTop.d.ts +80 -0
- package/dist/glass/webgpu/productionPinnedTop.js +77 -0
- package/dist/glass/webgpu/productionPinnedTopPrepare.d.ts +21 -0
- package/dist/glass/webgpu/productionPinnedTopPrepare.js +132 -0
- package/dist/glass/webgpu/productionPlanes.d.ts +135 -0
- package/dist/glass/webgpu/productionPlanes.js +412 -0
- package/dist/glass/webgpu/productionPrepare.d.ts +18 -0
- package/dist/glass/webgpu/productionPrepare.js +833 -0
- package/dist/glass/webgpu/productionTracks.d.ts +73 -0
- package/dist/glass/webgpu/productionTracks.js +22 -0
- package/dist/glass/webgpu/productionViewport.d.ts +20 -0
- package/dist/glass/webgpu/productionViewport.js +52 -0
- package/dist/glass/webgpu/profile.d.ts +37 -0
- package/dist/glass/webgpu/profile.js +101 -0
- package/dist/glass/webgpu/raster.d.ts +337 -0
- package/dist/glass/webgpu/raster.js +1360 -0
- package/dist/glass/webgpu/rasterMaterial.d.ts +19 -0
- package/dist/glass/webgpu/rasterMaterial.js +197 -0
- package/dist/glass/webgpu/rasterShaders.d.ts +7 -0
- package/dist/glass/webgpu/rasterShaders.js +105 -0
- package/dist/glass/webgpu/rasterUniforms.d.ts +304 -0
- package/dist/glass/webgpu/rasterUniforms.js +415 -0
- package/dist/glass/webgpu/regionBackdrop.d.ts +8 -0
- package/dist/glass/webgpu/regionBackdrop.js +12 -0
- package/dist/glass/webgpu/regionBridge.d.ts +145 -0
- package/dist/glass/webgpu/regionBridge.js +1691 -0
- package/dist/glass/webgpu/regionScene.d.ts +294 -0
- package/dist/glass/webgpu/regionScene.js +2144 -0
- package/dist/glass/webgpu/renderer.d.ts +8 -0
- package/dist/glass/webgpu/renderer.js +1478 -0
- package/dist/glass/webgpu/residentPlanes.d.ts +69 -0
- package/dist/glass/webgpu/residentPlanes.js +104 -0
- package/dist/glass/webgpu/restMaterial.d.ts +6 -0
- package/dist/glass/webgpu/restMaterial.js +65 -0
- package/dist/glass/webgpu/resumeOverlay.d.ts +44 -0
- package/dist/glass/webgpu/resumeOverlay.js +82 -0
- package/dist/glass/webgpu/sampleTrace.d.ts +11 -0
- package/dist/glass/webgpu/sampleTrace.js +50 -0
- package/dist/glass/webgpu/scrollEdgeBackdrop.d.ts +89 -0
- package/dist/glass/webgpu/scrollEdgeBackdrop.js +177 -0
- package/dist/glass/webgpu/scrollEdgePose.d.ts +4 -0
- package/dist/glass/webgpu/scrollEdgePose.js +49 -0
- package/dist/glass/webgpu/selectionThumb.d.ts +81 -0
- package/dist/glass/webgpu/selectionThumb.js +209 -0
- package/dist/glass/webgpu/shaders.d.ts +67 -0
- package/dist/glass/webgpu/shaders.js +595 -0
- package/dist/glass/webgpu/sharedLift.d.ts +7 -0
- package/dist/glass/webgpu/sharedLift.js +223 -0
- package/dist/glass/webgpu/sourcePixels.d.ts +42 -0
- package/dist/glass/webgpu/sourcePixels.js +140 -0
- package/dist/glass/webgpu/sourcePixels.worker.d.ts +1 -0
- package/dist/glass/webgpu/sourcePixels.worker.js +62 -0
- package/dist/glass/webgpu/tabGlyphInk.d.ts +14 -0
- package/dist/glass/webgpu/tabGlyphInk.js +72 -0
- package/dist/glass/webgpu/touchLight.d.ts +4 -0
- package/dist/glass/webgpu/touchLight.js +15 -0
- package/dist/glass/worker/client.d.ts +21 -0
- package/dist/glass/worker/client.js +152 -0
- package/dist/glass/worker/experiment.d.ts +13 -0
- package/dist/glass/worker/experiment.js +221 -0
- package/dist/glass/worker/fixture.d.ts +21 -0
- package/dist/glass/worker/fixture.js +152 -0
- package/dist/glass/worker/protocol.d.ts +439 -0
- package/dist/glass/worker/protocol.js +5 -0
- package/dist/graphicsProbe.d.ts +19 -0
- package/dist/graphicsProbe.js +111 -0
- package/dist/haptics/SensoryButton.d.ts +21 -0
- package/dist/haptics/SensoryButton.js +80 -0
- package/dist/image/ContentAdmission.d.ts +19 -0
- package/dist/image/ContentAdmission.js +70 -0
- package/dist/image/Image.d.ts +30 -0
- package/dist/image/Image.js +341 -0
- package/dist/image/asset.d.ts +9 -0
- package/dist/image/asset.js +1 -0
- package/dist/image/contentReadiness.d.ts +7 -0
- package/dist/image/contentReadiness.js +54 -0
- package/dist/image/imports.d.ts +4 -0
- package/dist/image/resource.d.ts +53 -0
- package/dist/image/resource.js +286 -0
- package/dist/image/vite.d.ts +3 -0
- package/dist/image/vite.js +63 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.js +102 -0
- package/dist/install.d.ts +8 -0
- package/dist/install.js +8 -0
- package/dist/internal.d.ts +96 -0
- package/dist/internal.js +80 -0
- package/dist/keyboard/adapter.d.ts +82 -0
- package/dist/keyboard/adapter.js +727 -0
- package/dist/keyboard/avoidance.d.ts +24 -0
- package/dist/keyboard/avoidance.js +283 -0
- package/dist/keyboard/caretMirror.d.ts +13 -0
- package/dist/keyboard/caretMirror.js +122 -0
- package/dist/keyboard/expectedKeyboard.d.ts +10 -0
- package/dist/keyboard/expectedKeyboard.js +60 -0
- package/dist/keyboard/geometry.d.ts +10 -0
- package/dist/keyboard/geometry.js +21 -0
- package/dist/keyboard/modalTapFocus.d.ts +41 -0
- package/dist/keyboard/modalTapFocus.js +224 -0
- package/dist/keyboard/motion.d.ts +54 -0
- package/dist/keyboard/motion.js +80 -0
- package/dist/keyboard/translation.d.ts +12 -0
- package/dist/keyboard/translation.js +19 -0
- package/dist/layout/adaptiveTabsContext.d.ts +5 -0
- package/dist/layout/adaptiveTabsContext.js +2 -0
- package/dist/layout/deviceIdiom.d.ts +4 -0
- package/dist/layout/deviceIdiom.js +12 -0
- package/dist/layout/layoutClass.d.ts +44 -0
- package/dist/layout/layoutClass.js +102 -0
- package/dist/layout/navigationLayoutContext.d.ts +8 -0
- package/dist/layout/navigationLayoutContext.js +5 -0
- package/dist/list-form/ListForm.d.ts +158 -0
- package/dist/list-form/ListForm.js +427 -0
- package/dist/list-form/ListItem.d.ts +30 -0
- package/dist/list-form/ListItem.js +251 -0
- package/dist/list-form/RowLabel.d.ts +14 -0
- package/dist/list-form/RowLabel.js +11 -0
- package/dist/list-form/Slider.d.ts +18 -0
- package/dist/list-form/Slider.js +235 -0
- package/dist/list-form/StepperButton.d.ts +9 -0
- package/dist/list-form/StepperButton.js +60 -0
- package/dist/list-form/Toggle.d.ts +16 -0
- package/dist/list-form/Toggle.js +204 -0
- package/dist/list-form/editMotion.d.ts +15 -0
- package/dist/list-form/editMotion.js +25 -0
- package/dist/list-form/editing.d.ts +102 -0
- package/dist/list-form/editing.js +51 -0
- package/dist/list-form/listContext.d.ts +4 -0
- package/dist/list-form/listContext.js +5 -0
- package/dist/list-form/offsets.d.ts +26 -0
- package/dist/list-form/offsets.js +34 -0
- package/dist/list-form/reorder.d.ts +20 -0
- package/dist/list-form/reorder.js +193 -0
- package/dist/list-form/rowMotion.d.ts +11 -0
- package/dist/list-form/rowMotion.js +236 -0
- package/dist/list-form/rowMotionScope.d.ts +14 -0
- package/dist/list-form/rowMotionScope.js +61 -0
- package/dist/list-form/separatorInsets.d.ts +4 -0
- package/dist/list-form/separatorInsets.js +87 -0
- package/dist/list-form/sliderContact.d.ts +40 -0
- package/dist/list-form/sliderContact.js +98 -0
- package/dist/list-form/state.d.ts +5 -0
- package/dist/list-form/state.js +8 -0
- package/dist/list-form/toggleContact.d.ts +55 -0
- package/dist/list-form/toggleContact.js +164 -0
- package/dist/media/controller.d.ts +7 -0
- package/dist/media/controller.js +612 -0
- package/dist/media/react.d.ts +9 -0
- package/dist/media/react.js +38 -0
- package/dist/media/systemMedia.d.ts +6 -0
- package/dist/media/systemMedia.js +200 -0
- package/dist/media/types.d.ts +83 -0
- package/dist/media/types.js +1 -0
- package/dist/menu/menuContact.d.ts +20 -0
- package/dist/menu/menuContact.js +286 -0
- package/dist/menu/menuGesture.d.ts +84 -0
- package/dist/menu/menuGesture.js +502 -0
- package/dist/menu/menuInteraction.d.ts +17 -0
- package/dist/menu/menuInteraction.js +34 -0
- package/dist/menu/menuOutside.d.ts +9 -0
- package/dist/menu/menuOutside.js +58 -0
- package/dist/menu/menuPanelContact.d.ts +11 -0
- package/dist/menu/menuPanelContact.js +77 -0
- package/dist/menu/menuTriggerHold.d.ts +3 -0
- package/dist/menu/menuTriggerHold.js +52 -0
- package/dist/menu/sampledMotion.d.ts +37 -0
- package/dist/menu/sampledMotion.js +86 -0
- package/dist/modal/lifecycle.d.ts +10 -0
- package/dist/modal/lifecycle.js +189 -0
- package/dist/motion/TransitionView.d.ts +12 -0
- package/dist/motion/TransitionView.js +118 -0
- package/dist/motion/animate.d.ts +20 -0
- package/dist/motion/animate.js +79 -0
- package/dist/motion/animationValue.d.ts +25 -0
- package/dist/motion/animationValue.js +42 -0
- package/dist/motion/composerMotion.d.ts +3 -0
- package/dist/motion/composerMotion.js +15 -0
- package/dist/motion/layoutTransaction.d.ts +7 -0
- package/dist/motion/layoutTransaction.js +28 -0
- package/dist/motion/matchedGeometry.d.ts +55 -0
- package/dist/motion/matchedGeometry.js +412 -0
- package/dist/motion/springPath.d.ts +27 -0
- package/dist/motion/springPath.js +46 -0
- package/dist/motion/springTrack.d.ts +33 -0
- package/dist/motion/springTrack.js +69 -0
- package/dist/motion/transition.d.ts +48 -0
- package/dist/motion/transition.js +56 -0
- package/dist/motion/transitionImages.d.ts +7 -0
- package/dist/motion/transitionImages.js +49 -0
- package/dist/motionProbe.d.ts +227 -0
- package/dist/motionProbe.js +697 -0
- package/dist/motionProbeControls.d.ts +2 -0
- package/dist/motionProbeControls.js +118 -0
- package/dist/motionProbeDelivery.d.ts +15 -0
- package/dist/motionProbeDelivery.js +84 -0
- package/dist/navigation/DetailList.d.ts +9 -0
- package/dist/navigation/DetailList.js +7 -0
- package/dist/navigation/NavigationChrome.d.ts +18 -0
- package/dist/navigation/NavigationChrome.js +195 -0
- package/dist/navigation/NavigationSearchRow.d.ts +9 -0
- package/dist/navigation/NavigationSearchRow.js +101 -0
- package/dist/navigation/NavigationTitleSlots.d.ts +18 -0
- package/dist/navigation/NavigationTitleSlots.js +64 -0
- package/dist/navigation/NavigatorHost.d.ts +17 -0
- package/dist/navigation/NavigatorHost.js +534 -0
- package/dist/navigation/ScreenContainer.d.ts +31 -0
- package/dist/navigation/ScreenContainer.js +219 -0
- package/dist/navigation/ScrubSourceFrames.d.ts +18 -0
- package/dist/navigation/ScrubSourceFrames.js +67 -0
- package/dist/navigation/Sidebar.d.ts +16 -0
- package/dist/navigation/Sidebar.js +20 -0
- package/dist/navigation/SidebarSymbol.d.ts +4 -0
- package/dist/navigation/SidebarSymbol.js +6 -0
- package/dist/navigation/ToolbarGlass.d.ts +2 -0
- package/dist/navigation/ToolbarGlass.js +429 -0
- package/dist/navigation/TransitionEdge.d.ts +4 -0
- package/dist/navigation/TransitionEdge.js +33 -0
- package/dist/navigation/bottomToolbarGeometry.d.ts +6 -0
- package/dist/navigation/bottomToolbarGeometry.js +14 -0
- package/dist/navigation/chromeCurves.d.ts +48 -0
- package/dist/navigation/chromeCurves.js +255 -0
- package/dist/navigation/glassTransition.d.ts +32 -0
- package/dist/navigation/glassTransition.js +55 -0
- package/dist/navigation/horizontalDrag.d.ts +6 -0
- package/dist/navigation/horizontalDrag.js +15 -0
- package/dist/navigation/interactivePop.d.ts +45 -0
- package/dist/navigation/interactivePop.js +86 -0
- package/dist/navigation/interactivePopTypes.d.ts +85 -0
- package/dist/navigation/interactivePopTypes.js +36 -0
- package/dist/navigation/keyboard.d.ts +9 -0
- package/dist/navigation/keyboard.js +55 -0
- package/dist/navigation/motion.d.ts +19 -0
- package/dist/navigation/motion.js +645 -0
- package/dist/navigation/motionTokens.d.ts +43 -0
- package/dist/navigation/motionTokens.js +75 -0
- package/dist/navigation/nativeScrubExperiment.d.ts +5 -0
- package/dist/navigation/nativeScrubExperiment.js +153 -0
- package/dist/navigation/nativeScrubSource.d.ts +15 -0
- package/dist/navigation/nativeScrubSource.js +88 -0
- package/dist/navigation/navigationChromeModel.d.ts +8 -0
- package/dist/navigation/navigationChromeModel.js +30 -0
- package/dist/navigation/navigationContext.d.ts +22 -0
- package/dist/navigation/navigationContext.js +65 -0
- package/dist/navigation/navigationEdge.d.ts +4 -0
- package/dist/navigation/navigationEdge.js +101 -0
- package/dist/navigation/pointerPop.d.ts +32 -0
- package/dist/navigation/pointerPop.js +206 -0
- package/dist/navigation/probeLayers.d.ts +7 -0
- package/dist/navigation/probeLayers.js +8 -0
- package/dist/navigation/registry.d.ts +14 -0
- package/dist/navigation/registry.js +31 -0
- package/dist/navigation/releaseDecision.d.ts +21 -0
- package/dist/navigation/releaseDecision.js +94 -0
- package/dist/navigation/releaseTrajectory.d.ts +20 -0
- package/dist/navigation/releaseTrajectory.js +95 -0
- package/dist/navigation/releaseVelocity.d.ts +9 -0
- package/dist/navigation/releaseVelocity.js +38 -0
- package/dist/navigation/routeCodec.d.ts +33 -0
- package/dist/navigation/routeCodec.js +123 -0
- package/dist/navigation/scrollEdge.d.ts +18 -0
- package/dist/navigation/scrollEdge.js +66 -0
- package/dist/navigation/scrubFrameLoop.d.ts +44 -0
- package/dist/navigation/scrubFrameLoop.js +129 -0
- package/dist/navigation/sidebarSelection.d.ts +5 -0
- package/dist/navigation/sidebarSelection.js +8 -0
- package/dist/navigation/splitContext.d.ts +17 -0
- package/dist/navigation/splitContext.js +9 -0
- package/dist/navigation/splitState.d.ts +46 -0
- package/dist/navigation/splitState.js +130 -0
- package/dist/navigation/stack.d.ts +25 -0
- package/dist/navigation/stack.js +136 -0
- package/dist/navigation/store.d.ts +80 -0
- package/dist/navigation/store.js +464 -0
- package/dist/navigation/toolbarGlassMotion.d.ts +40 -0
- package/dist/navigation/toolbarGlassMotion.js +202 -0
- package/dist/navigation/toolbarMinimization.d.ts +9 -0
- package/dist/navigation/toolbarMinimization.js +76 -0
- package/dist/navigation/toolbarMotionOwner.d.ts +6 -0
- package/dist/navigation/toolbarMotionOwner.js +30 -0
- package/dist/navigation/touchArbitration.d.ts +34 -0
- package/dist/navigation/touchArbitration.js +550 -0
- package/dist/navigation/tracking.d.ts +7 -0
- package/dist/navigation/tracking.js +19 -0
- package/dist/navigation/transitionBindings.d.ts +31 -0
- package/dist/navigation/transitionBindings.js +106 -0
- package/dist/navigation/transitionChrome.d.ts +31 -0
- package/dist/navigation/transitionChrome.js +380 -0
- package/dist/navigation/transitionPose.d.ts +52 -0
- package/dist/navigation/transitionPose.js +295 -0
- package/dist/navigation/types.d.ts +133 -0
- package/dist/navigation/types.js +1 -0
- package/dist/navigation/zoomDrag.d.ts +3 -0
- package/dist/navigation/zoomDrag.js +125 -0
- package/dist/navigation/zoomGeometry.d.ts +48 -0
- package/dist/navigation/zoomGeometry.js +94 -0
- package/dist/navigation/zoomGlass.d.ts +27 -0
- package/dist/navigation/zoomGlass.js +64 -0
- package/dist/navigation/zoomMotion.d.ts +73 -0
- package/dist/navigation/zoomMotion.js +104 -0
- package/dist/navigation/zoomTransition.d.ts +82 -0
- package/dist/navigation/zoomTransition.js +975 -0
- package/dist/presentation/Presentation.d.ts +61 -0
- package/dist/presentation/Presentation.js +92 -0
- package/dist/presentation/PresentationSurface.d.ts +29 -0
- package/dist/presentation/PresentationSurface.js +586 -0
- package/dist/presentation/PresentedSheet.d.ts +2 -0
- package/dist/presentation/PresentedSheet.js +571 -0
- package/dist/presentation/activity.d.ts +3 -0
- package/dist/presentation/activity.js +24 -0
- package/dist/presentation/coldLaunch.d.ts +2 -0
- package/dist/presentation/coldLaunch.js +19 -0
- package/dist/presentation/dismiss.d.ts +26 -0
- package/dist/presentation/dismiss.js +30 -0
- package/dist/presentation/glassMotion.d.ts +39 -0
- package/dist/presentation/glassMotion.js +259 -0
- package/dist/presentation/glassReady.d.ts +11 -0
- package/dist/presentation/glassReady.js +246 -0
- package/dist/presentation/model.d.ts +108 -0
- package/dist/presentation/model.js +183 -0
- package/dist/presentation/motion.d.ts +56 -0
- package/dist/presentation/motion.js +263 -0
- package/dist/presentation/presentationMotion.d.ts +10 -0
- package/dist/presentation/presentationMotion.js +74 -0
- package/dist/presentation/presentationSource.d.ts +2 -0
- package/dist/presentation/presentationSource.js +28 -0
- package/dist/presentation/sheetChromeContext.d.ts +2 -0
- package/dist/presentation/sheetChromeContext.js +3 -0
- package/dist/presentation/sheetMaterialTransition.d.ts +14 -0
- package/dist/presentation/sheetMaterialTransition.js +33 -0
- package/dist/presentation/sheetReleaseMotion.d.ts +18 -0
- package/dist/presentation/sheetReleaseMotion.js +123 -0
- package/dist/presentation/useAlertKeyboardMotion.d.ts +8 -0
- package/dist/presentation/useAlertKeyboardMotion.js +104 -0
- package/dist/press/Pressable.d.ts +19 -0
- package/dist/press/Pressable.js +16 -0
- package/dist/press/activation.d.ts +20 -0
- package/dist/press/activation.js +28 -0
- package/dist/press/contactReceipt.d.ts +23 -0
- package/dist/press/contactReceipt.js +177 -0
- package/dist/press/gestureArbitration.d.ts +13 -0
- package/dist/press/gestureArbitration.js +38 -0
- package/dist/press/stateMachine.d.ts +29 -0
- package/dist/press/stateMachine.js +39 -0
- package/dist/press/tokens.d.ts +18 -0
- package/dist/press/tokens.js +19 -0
- package/dist/press/usePressInteraction.d.ts +30 -0
- package/dist/press/usePressInteraction.js +247 -0
- package/dist/public/Label.d.ts +16 -0
- package/dist/public/Label.js +40 -0
- package/dist/public/NativeFilePicker.d.ts +19 -0
- package/dist/public/NativeFilePicker.js +75 -0
- package/dist/public/Screen.d.ts +42 -0
- package/dist/public/Screen.js +87 -0
- package/dist/public/actions.d.ts +16 -0
- package/dist/public/actions.js +15 -0
- package/dist/public/buttonBorderShape.d.ts +7 -0
- package/dist/public/buttonBorderShape.js +9 -0
- package/dist/public/chrome.d.ts +3 -0
- package/dist/public/chrome.js +5 -0
- package/dist/public/colors.d.ts +29 -0
- package/dist/public/colors.js +28 -0
- package/dist/public/context.d.ts +19 -0
- package/dist/public/context.js +8 -0
- package/dist/public/controlStyle.d.ts +93 -0
- package/dist/public/controlStyle.js +52 -0
- package/dist/public/controls.d.ts +360 -0
- package/dist/public/controls.js +301 -0
- package/dist/public/definition.d.ts +65 -0
- package/dist/public/definition.js +58 -0
- package/dist/public/deviceActions.d.ts +23 -0
- package/dist/public/deviceActions.js +87 -0
- package/dist/public/environment.d.ts +77 -0
- package/dist/public/environment.js +171 -0
- package/dist/public/fieldContext.d.ts +2 -0
- package/dist/public/fieldContext.js +3 -0
- package/dist/public/filePickers.d.ts +25 -0
- package/dist/public/filePickers.js +11 -0
- package/dist/public/glass.d.ts +31 -0
- package/dist/public/glass.js +29 -0
- package/dist/public/glassValue.d.ts +19 -0
- package/dist/public/glassValue.js +32 -0
- package/dist/public/keyboard.d.ts +4 -0
- package/dist/public/keyboard.js +6 -0
- package/dist/public/navigationTransition.d.ts +48 -0
- package/dist/public/navigationTransition.js +49 -0
- package/dist/public/pickerNavigation.d.ts +7 -0
- package/dist/public/pickerNavigation.js +64 -0
- package/dist/public/presentation.d.ts +40 -0
- package/dist/public/presentation.js +21 -0
- package/dist/public/presentationContext.d.ts +2 -0
- package/dist/public/presentationContext.js +3 -0
- package/dist/public/routeRegistry.d.ts +3 -0
- package/dist/public/routeRegistry.js +10 -0
- package/dist/public/routes.d.ts +74 -0
- package/dist/public/routes.js +105 -0
- package/dist/public/runtime.d.ts +134 -0
- package/dist/public/runtime.js +292 -0
- package/dist/public/screenChrome.d.ts +91 -0
- package/dist/public/screenChrome.js +187 -0
- package/dist/public/scroll.d.ts +38 -0
- package/dist/public/scroll.js +7 -0
- package/dist/public/storage.d.ts +9 -0
- package/dist/public/storage.js +9 -0
- package/dist/public/structure.d.ts +65 -0
- package/dist/public/structure.js +40 -0
- package/dist/public/toolbar.d.ts +37 -0
- package/dist/public/toolbar.js +76 -0
- package/dist/push/PushPermissionExplainer.d.ts +14 -0
- package/dist/push/PushPermissionExplainer.js +30 -0
- package/dist/push/notifications.d.ts +54 -0
- package/dist/push/notifications.js +276 -0
- package/dist/push/routes.d.ts +20 -0
- package/dist/push/routes.js +63 -0
- package/dist/push/schema.d.ts +42 -0
- package/dist/push/schema.js +41 -0
- package/dist/push/urlProjection.d.ts +24 -0
- package/dist/push/urlProjection.js +207 -0
- package/dist/reachability/controller.d.ts +21 -0
- package/dist/reachability/controller.js +202 -0
- package/dist/reachability/model.d.ts +94 -0
- package/dist/reachability/model.js +131 -0
- package/dist/reachability/react.d.ts +29 -0
- package/dist/reachability/react.js +69 -0
- package/dist/restoration/navigation.d.ts +9 -0
- package/dist/restoration/navigation.js +55 -0
- package/dist/restoration/react.d.ts +6 -0
- package/dist/restoration/react.js +21 -0
- package/dist/restoration/routes.d.ts +22 -0
- package/dist/restoration/routes.js +166 -0
- package/dist/restoration/scene.d.ts +44 -0
- package/dist/restoration/scene.js +284 -0
- package/dist/root/SatinRoot.d.ts +25 -0
- package/dist/root/SatinRoot.js +512 -0
- package/dist/root/mountSatin.d.ts +12 -0
- package/dist/root/mountSatin.js +60 -0
- package/dist/root/runtimeContext.d.ts +26 -0
- package/dist/root/runtimeContext.js +30 -0
- package/dist/safe-area/Overlay.d.ts +9 -0
- package/dist/safe-area/Overlay.js +26 -0
- package/dist/safe-area/SafeAreaInset.d.ts +25 -0
- package/dist/safe-area/SafeAreaInset.js +138 -0
- package/dist/safe-area/bottomInsetGeometry.d.ts +12 -0
- package/dist/safe-area/bottomInsetGeometry.js +73 -0
- package/dist/safe-area/context.d.ts +15 -0
- package/dist/safe-area/context.js +8 -0
- package/dist/safe-area/displayCorners.d.ts +21 -0
- package/dist/safe-area/displayCorners.js +70 -0
- package/dist/safe-area/keyboardCarrier.d.ts +26 -0
- package/dist/safe-area/keyboardCarrier.js +394 -0
- package/dist/safe-area/keyboardCarrierGeometry.d.ts +37 -0
- package/dist/safe-area/keyboardCarrierGeometry.js +49 -0
- package/dist/safe-area/modifiers.d.ts +52 -0
- package/dist/safe-area/modifiers.js +86 -0
- package/dist/safe-area/useSafeAreaMetrics.d.ts +83 -0
- package/dist/safe-area/useSafeAreaMetrics.js +367 -0
- package/dist/safe-area/windowChrome.d.ts +7 -0
- package/dist/safe-area/windowChrome.js +14 -0
- package/dist/scroll/RefreshControl.d.ts +8 -0
- package/dist/scroll/RefreshControl.js +135 -0
- package/dist/scroll/ScrollSurface.d.ts +62 -0
- package/dist/scroll/ScrollSurface.js +278 -0
- package/dist/scroll/ScrollTarget.d.ts +6 -0
- package/dist/scroll/ScrollTarget.js +11 -0
- package/dist/scroll/edgePolicy.d.ts +21 -0
- package/dist/scroll/edgePolicy.js +17 -0
- package/dist/scroll/insertionMotion.d.ts +15 -0
- package/dist/scroll/insertionMotion.js +128 -0
- package/dist/scroll/nativeScroll.d.ts +14 -0
- package/dist/scroll/nativeScroll.js +71 -0
- package/dist/scroll/position.d.ts +31 -0
- package/dist/scroll/position.js +273 -0
- package/dist/scroll/pressOwnership.d.ts +4 -0
- package/dist/scroll/pressOwnership.js +65 -0
- package/dist/scroll/refreshMotion.d.ts +9 -0
- package/dist/scroll/refreshMotion.js +15 -0
- package/dist/scroll/refreshable.d.ts +6 -0
- package/dist/scroll/refreshable.js +50 -0
- package/dist/scroll/registry.d.ts +38 -0
- package/dist/scroll/registry.js +261 -0
- package/dist/scroll/screenGeometry.d.ts +8 -0
- package/dist/scroll/screenGeometry.js +50 -0
- package/dist/scroll/scrollIndicator.d.ts +7 -0
- package/dist/scroll/scrollIndicator.js +114 -0
- package/dist/scroll/scrollJump.d.ts +7 -0
- package/dist/scroll/scrollJump.js +16 -0
- package/dist/scroll/types.d.ts +12 -0
- package/dist/scroll/types.js +1 -0
- package/dist/search/SearchDrawer.d.ts +16 -0
- package/dist/search/SearchDrawer.js +421 -0
- package/dist/search/SearchScopesBar.d.ts +6 -0
- package/dist/search/SearchScopesBar.js +12 -0
- package/dist/search/SearchToolbarField.d.ts +8 -0
- package/dist/search/SearchToolbarField.js +115 -0
- package/dist/search/searchBackdrop.d.ts +12 -0
- package/dist/search/searchBackdrop.js +45 -0
- package/dist/search/searchChrome.d.ts +13 -0
- package/dist/search/searchChrome.js +31 -0
- package/dist/search/searchMotion.d.ts +30 -0
- package/dist/search/searchMotion.js +46 -0
- package/dist/search/searchPlacement.d.ts +11 -0
- package/dist/search/searchPlacement.js +15 -0
- package/dist/search/searchable.d.ts +46 -0
- package/dist/search/searchable.js +5 -0
- package/dist/search/useSearchPresentation.d.ts +15 -0
- package/dist/search/useSearchPresentation.js +61 -0
- package/dist/server.d.ts +7 -0
- package/dist/server.js +144 -0
- package/dist/settings/DisclosureIndicator.d.ts +4 -0
- package/dist/settings/DisclosureIndicator.js +6 -0
- package/dist/settings/tokens.d.ts +129 -0
- package/dist/settings/tokens.js +143 -0
- package/dist/shapes/corners.d.ts +14 -0
- package/dist/shapes/corners.js +80 -0
- package/dist/styles.css +9078 -0
- package/dist/styles.css.d.ts +3 -0
- package/dist/sw/activationState.d.ts +20 -0
- package/dist/sw/activationState.js +39 -0
- package/dist/sw/generator.d.ts +14 -0
- package/dist/sw/generator.js +26 -0
- package/dist/sw/manifest.d.ts +32 -0
- package/dist/sw/manifest.js +137 -0
- package/dist/sw/protocol.d.ts +7 -0
- package/dist/sw/protocol.js +7 -0
- package/dist/sw/pushRuntime.d.ts +2 -0
- package/dist/sw/pushRuntime.js +161 -0
- package/dist/sw/registerAppShell.d.ts +25 -0
- package/dist/sw/registerAppShell.js +259 -0
- package/dist/sw/renderServiceWorker.d.ts +10 -0
- package/dist/sw/renderServiceWorker.js +370 -0
- package/dist/sw/requestRouting.d.ts +13 -0
- package/dist/sw/requestRouting.js +26 -0
- package/dist/sw/updateCheck.d.ts +2 -0
- package/dist/sw/updateCheck.js +25 -0
- package/dist/sw/vite.d.ts +20 -0
- package/dist/sw/vite.js +71 -0
- package/dist/symbols/Symbol.d.ts +33 -0
- package/dist/symbols/Symbol.js +59 -0
- package/dist/symbols/catalogue.d.ts +4 -0
- package/dist/symbols/catalogue.js +4139 -0
- package/dist/symbols/exclusions.d.ts +2 -0
- package/dist/symbols/exclusions.js +4 -0
- package/dist/symbols/inheritedWeight.d.ts +3 -0
- package/dist/symbols/inheritedWeight.js +104 -0
- package/dist/symbols/metrics.d.ts +38 -0
- package/dist/symbols/metrics.js +53 -0
- package/dist/symbols/svg.d.ts +3 -0
- package/dist/symbols/svg.js +16 -0
- package/dist/symbols/types.d.ts +30 -0
- package/dist/symbols/types.js +1 -0
- package/dist/tabs/TabSection.d.ts +12 -0
- package/dist/tabs/TabSection.js +4 -0
- package/dist/tabs/TabSidebarSurface.d.ts +7 -0
- package/dist/tabs/TabSidebarSurface.js +29 -0
- package/dist/tabs/TabView.d.ts +28 -0
- package/dist/tabs/TabView.js +258 -0
- package/dist/tabs/accessoryContact.d.ts +2 -0
- package/dist/tabs/accessoryContact.js +42 -0
- package/dist/tabs/compactBar.d.ts +4 -0
- package/dist/tabs/compactBar.js +28 -0
- package/dist/tabs/context.d.ts +8 -0
- package/dist/tabs/context.js +6 -0
- package/dist/tabs/keyboard.d.ts +3 -0
- package/dist/tabs/keyboard.js +23 -0
- package/dist/tabs/model.d.ts +6 -0
- package/dist/tabs/model.js +16 -0
- package/dist/tabs/presentation.d.ts +7 -0
- package/dist/tabs/presentation.js +14 -0
- package/dist/tabs/sourceRevision.d.ts +3 -0
- package/dist/tabs/sourceRevision.js +36 -0
- package/dist/tabs/tabSidebarGlyph.d.ts +2 -0
- package/dist/tabs/tabSidebarGlyph.js +11 -0
- package/dist/tasks/useTask.d.ts +16 -0
- package/dist/tasks/useTask.js +67 -0
- package/dist/testing.d.ts +9 -0
- package/dist/testing.js +11 -0
- package/dist/text-input/TextEditor.d.ts +25 -0
- package/dist/text-input/TextEditor.js +74 -0
- package/dist/text-input/TextField.d.ts +32 -0
- package/dist/text-input/TextField.js +29 -0
- package/dist/text-input/editorGeometry.d.ts +2 -0
- package/dist/text-input/editorGeometry.js +6 -0
- package/dist/text-input/editorTextLayout.d.ts +2 -0
- package/dist/text-input/editorTextLayout.js +31 -0
- package/dist/text-input/focusChain.d.ts +27 -0
- package/dist/text-input/focusChain.js +62 -0
- package/dist/text-input/kinds.d.ts +8 -0
- package/dist/text-input/kinds.js +34 -0
- package/dist/text-input/measureEditor.d.ts +2 -0
- package/dist/text-input/measureEditor.js +50 -0
- package/dist/text-input/submit.d.ts +9 -0
- package/dist/text-input/submit.js +7 -0
- package/dist/unstable.d.ts +16 -0
- package/dist/unstable.js +16 -0
- package/dist/vite.d.ts +3 -0
- package/dist/vite.js +3 -0
- package/dist/web/WebView.d.ts +42 -0
- package/dist/web/WebView.js +115 -0
- package/dist/web/authentication.d.ts +75 -0
- package/dist/web/authentication.js +488 -0
- package/dist/web/openURL.d.ts +37 -0
- package/dist/web/openURL.js +89 -0
- package/dist/web/urlPolicy.d.ts +3 -0
- package/dist/web/urlPolicy.js +19 -0
- package/dist/web/useWebAuthentication.d.ts +3 -0
- package/dist/web/useWebAuthentication.js +6 -0
- package/dist/zoom/Zoomable.d.ts +10 -0
- package/dist/zoom/Zoomable.js +116 -0
- package/dist/zoom/geometry.d.ts +11 -0
- package/dist/zoom/geometry.js +16 -0
- package/package.json +116 -3
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { topLayerDialogOf } from '../topLayer.js';
|
|
2
|
+
import { orderedTopLayerDialogs } from '../../modal/lifecycle.js';
|
|
3
|
+
import { atRest, presentationTravel } from '../presentationFrame.js';
|
|
4
|
+
const dialogOwners = new WeakMap();
|
|
5
|
+
let nextDialogOwner = 0;
|
|
6
|
+
function dialogOwner(dialog) {
|
|
7
|
+
let owner = dialogOwners.get(dialog);
|
|
8
|
+
if (!owner) {
|
|
9
|
+
owner = `dialog-backdrop-${++nextDialogOwner}`;
|
|
10
|
+
dialogOwners.set(dialog, owner);
|
|
11
|
+
}
|
|
12
|
+
return owner;
|
|
13
|
+
}
|
|
14
|
+
/** Ownership survives recaptures; the same dialog must never become its own backdrop. */
|
|
15
|
+
export function backdropOwner(element) {
|
|
16
|
+
const dialog = topLayerDialogOf(element);
|
|
17
|
+
return dialog ? dialogOwner(dialog) : undefined;
|
|
18
|
+
}
|
|
19
|
+
/** Presentation materials sample below their top-layer dialog. Smaller controls may
|
|
20
|
+
* sample their dialog's content, but never a later dialog above them.
|
|
21
|
+
* `dialogs` is the scene's top-layer order. Callers that refresh many regions
|
|
22
|
+
* pass one list; a single lookup reads it itself. */
|
|
23
|
+
export function backdropExclusions(element, presentation, dialogs = orderedTopLayerDialogs(document)) {
|
|
24
|
+
const index = dialogs.indexOf(topLayerDialogOf(element));
|
|
25
|
+
return dialogs.slice(index < 0 ? 0 : index + (presentation ? 0 : 1)).map(dialogOwner);
|
|
26
|
+
}
|
|
27
|
+
/** Hidden by an element of its own subtree (a collapsed sidebar, an inactive pane).
|
|
28
|
+
* Visibility inherited from above `root` (the launch cover hides the whole scene until
|
|
29
|
+
* glass is ready) does not count: the backdrop must be prepared before that reveal.
|
|
30
|
+
* While the scene is hidden from above, a subtree's own hiding is indistinguishable
|
|
31
|
+
* from inheritance, so it counts as visible; the reveal re-prepares. */
|
|
32
|
+
const invisible = (element) => /^(hidden|collapse)$/.test(getComputedStyle(element).visibility);
|
|
33
|
+
function hiddenWithin(element, root, visibility) {
|
|
34
|
+
for (let node = element; node && node !== root; node = node.parentElement) {
|
|
35
|
+
// Covered screens and hidden subtrees do not paint. Inert only disables input;
|
|
36
|
+
// a modal presenter remains visible beneath the dialog and its chrome still samples it.
|
|
37
|
+
if (node.getAttribute('data-satin-covered') === 'true' || node.hasAttribute('hidden'))
|
|
38
|
+
return true;
|
|
39
|
+
const parent = node.parentElement;
|
|
40
|
+
if (visibility && invisible(node) && (!parent || !invisible(parent)))
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
function visible(element, root, visibility = true) {
|
|
46
|
+
if (!element.isConnected)
|
|
47
|
+
return false;
|
|
48
|
+
const rect = atRest(element.getBoundingClientRect(), presentationTravel(element));
|
|
49
|
+
const right = rect.x + rect.width, bottom = rect.y + rect.height;
|
|
50
|
+
if (rect.width <= 0 ||
|
|
51
|
+
rect.height <= 0 ||
|
|
52
|
+
right <= 0 ||
|
|
53
|
+
bottom <= 0 ||
|
|
54
|
+
rect.x >= innerWidth ||
|
|
55
|
+
rect.y >= innerHeight)
|
|
56
|
+
return false;
|
|
57
|
+
return !hiddenWithin(element, root, visibility);
|
|
58
|
+
}
|
|
59
|
+
function hostsIn(root) {
|
|
60
|
+
const scrolls = [...root.querySelectorAll('[data-satin-scroll]')].filter(element => visible(element, root));
|
|
61
|
+
const outer = scrolls.filter(element => !scrolls.some(other => other !== element && other.contains(element)));
|
|
62
|
+
const screens = [
|
|
63
|
+
...root.querySelectorAll('[data-satin-screen-container][data-satin-covered="false"]'),
|
|
64
|
+
].filter(screen => visible(screen, root) && !outer.some(scroll => screen.contains(scroll)));
|
|
65
|
+
// A presentation's content is always a plane, under its own scroll views: the presentation's
|
|
66
|
+
// surface is the backdrop of its glass everywhere, never the screen below it (its capture leaves
|
|
67
|
+
// the nested scroll views to their own planes).
|
|
68
|
+
const presentations = [
|
|
69
|
+
...root.querySelectorAll('[data-satin-presentation-content]'),
|
|
70
|
+
].filter(content => visible(content, root));
|
|
71
|
+
// A screen nested inside a scroll container (a nested navigator) is part of that capture.
|
|
72
|
+
const planes = [
|
|
73
|
+
...outer,
|
|
74
|
+
...screens.filter(screen => !outer.some(scroll => scroll.contains(screen)) &&
|
|
75
|
+
!screens.some(other => other !== screen && other.contains(screen)) &&
|
|
76
|
+
!presentations.some(content => content.contains(screen))),
|
|
77
|
+
...presentations,
|
|
78
|
+
];
|
|
79
|
+
return planes.sort((a, b) => a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1);
|
|
80
|
+
}
|
|
81
|
+
/** Planes of the scene (its active tab panel) followed by open modal dialogs. `content` (the
|
|
82
|
+
* navigation source) is included when nothing discovered covers it and it is not
|
|
83
|
+
* hidden within the scene (a collapsed sidebar can still be the navigation source). */
|
|
84
|
+
export function discoverBackdropHosts(scene, content) {
|
|
85
|
+
const scope = scene.querySelector('[data-satin-tab-active="true"]') ?? scene;
|
|
86
|
+
const hosts = hostsIn(scope);
|
|
87
|
+
if (content &&
|
|
88
|
+
visible(content, scope) &&
|
|
89
|
+
!hosts.some(host => host === content || host.contains(content) || content.contains(host))) {
|
|
90
|
+
hosts.push(content);
|
|
91
|
+
hosts.sort((a, b) => (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1));
|
|
92
|
+
}
|
|
93
|
+
// Modal dialogs paint in the top layer, above the scene, wherever they sit in the DOM. A
|
|
94
|
+
// non-modal dialog (show()) paints in flow, as part of the plane it sits in.
|
|
95
|
+
const dialogs = orderedTopLayerDialogs(document);
|
|
96
|
+
const inDialog = (host) => dialogs.some(dialog => dialog.contains(host));
|
|
97
|
+
return [...hosts.filter(host => !inDialog(host)), ...dialogs.flatMap(dialog => hostsIn(dialog))];
|
|
98
|
+
}
|
|
99
|
+
const clipping = (overflow) => /^(hidden|clip|scroll|auto)$/.test(overflow);
|
|
100
|
+
const overflowX = (style) => style.overflowX || style.overflow, overflowY = (style) => style.overflowY || style.overflow;
|
|
101
|
+
const clips = (style) => clipping(overflowX(style)) || clipping(overflowY(style));
|
|
102
|
+
/** How close to a screen edge (points) a plane's clip must come to count as reaching it. */
|
|
103
|
+
const SCREEN_EDGE_TOLERANCE = 0.5;
|
|
104
|
+
/** Viewport rectangle the plane is visible through: its box, every clipping ancestor and the
|
|
105
|
+
* viewport. Inside a travelling presentation, the box and the clips that travel with it are read
|
|
106
|
+
* in the presentation's resting frame. */
|
|
107
|
+
export function backdropClip(host, travel = presentationTravel(host)) {
|
|
108
|
+
const resting = (element) => {
|
|
109
|
+
const rect = element.getBoundingClientRect();
|
|
110
|
+
return travel.layer?.contains(element) ? atRest(rect, travel) : rect;
|
|
111
|
+
};
|
|
112
|
+
// A presentation's content plane backs its whole surface (the grabber band included).
|
|
113
|
+
const box = resting((host.hasAttribute('data-satin-presentation-content') &&
|
|
114
|
+
host.closest('.satin-presentation-surface')) ||
|
|
115
|
+
host);
|
|
116
|
+
let x0 = Math.max(0, box.x), y0 = Math.max(0, box.y), x1 = Math.min(innerWidth, box.x + box.width), y1 = Math.min(innerHeight, box.y + box.height);
|
|
117
|
+
for (let element = host.parentElement; element && element !== document.documentElement; element = element.parentElement) {
|
|
118
|
+
const style = getComputedStyle(element);
|
|
119
|
+
// Boxless ancestors cannot clip a descendant plane, regardless of computed overflow.
|
|
120
|
+
if (style.display === 'contents' || !clips(style))
|
|
121
|
+
continue;
|
|
122
|
+
const r = resting(element);
|
|
123
|
+
if (clipping(overflowX(style))) {
|
|
124
|
+
x0 = Math.max(x0, r.x);
|
|
125
|
+
x1 = Math.min(x1, r.x + r.width);
|
|
126
|
+
}
|
|
127
|
+
if (clipping(overflowY(style))) {
|
|
128
|
+
y0 = Math.max(y0, r.y);
|
|
129
|
+
y1 = Math.min(y1, r.y + r.height);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (x1 <= x0 || y1 <= y0)
|
|
133
|
+
return undefined;
|
|
134
|
+
// Nothing composes beyond the screen, so a plane reaching a screen edge continues past it:
|
|
135
|
+
// glass sampling margins there read the plane's own off-screen content, as a single capture did.
|
|
136
|
+
// A clipping ancestor can end a sub-pixel short of the screen (a mount laid out at 955.98 of
|
|
137
|
+
// 956 pt). Read exactly, that kept the plane from continuing below the screen, and glass near
|
|
138
|
+
// that edge blurred the page background into its lower half.
|
|
139
|
+
const far = 1e5;
|
|
140
|
+
if (x0 <= SCREEN_EDGE_TOLERANCE)
|
|
141
|
+
x0 = -far;
|
|
142
|
+
if (y0 <= SCREEN_EDGE_TOLERANCE)
|
|
143
|
+
y0 = -far;
|
|
144
|
+
if (x1 >= innerWidth - SCREEN_EDGE_TOLERANCE)
|
|
145
|
+
x1 = far;
|
|
146
|
+
if (y1 >= innerHeight - SCREEN_EDGE_TOLERANCE)
|
|
147
|
+
y1 = far;
|
|
148
|
+
return [x0, y0, x1 - x0, y1 - y0];
|
|
149
|
+
}
|
|
150
|
+
const parse = (color) => {
|
|
151
|
+
const m = color.match(/rgba?\(([^)]+)\)/);
|
|
152
|
+
if (!m)
|
|
153
|
+
return [0, 0, 0, 0];
|
|
154
|
+
const [r, g, b, a = '1'] = m[1].split(/[\s,/]+/).filter(Boolean);
|
|
155
|
+
return [Number(r) / 255, Number(g) / 255, Number(b) / 255, Number(a)];
|
|
156
|
+
};
|
|
157
|
+
/** Opaque colour a plane's empty area shows: its own and its ancestors' backgrounds
|
|
158
|
+
* composited front to back, over the page background. Straight RGB, alpha 1. */
|
|
159
|
+
export function effectiveBackground(host, page) {
|
|
160
|
+
let r = 0, g = 0, b = 0, a = 0;
|
|
161
|
+
for (let element = host; element && a < 0.999; element = element.parentElement) {
|
|
162
|
+
const style = getComputedStyle(element);
|
|
163
|
+
// A presentation surface drawn by its glass material names its resting tone (styles.css).
|
|
164
|
+
const surfaceTone = element.classList.contains('satin-presentation-surface') &&
|
|
165
|
+
style.getPropertyValue('--satin-presentation-backdrop').trim();
|
|
166
|
+
const [cr, cg, cb, ca] = parse(surfaceTone && parse(style.backgroundColor)[3] === 0 ? surfaceTone : style.backgroundColor);
|
|
167
|
+
if (ca <= 0)
|
|
168
|
+
continue;
|
|
169
|
+
// Premultiplied front-to-back "under" accumulation.
|
|
170
|
+
const k = (1 - a) * ca;
|
|
171
|
+
r += k * cr;
|
|
172
|
+
g += k * cg;
|
|
173
|
+
b += k * cb;
|
|
174
|
+
a += k;
|
|
175
|
+
}
|
|
176
|
+
const k = 1 - a;
|
|
177
|
+
return [r + k * page[0], g + k * page[1], b + k * page[2], 1];
|
|
178
|
+
}
|
|
179
|
+
export const cssColor = (fill) => `rgb(${fill
|
|
180
|
+
.slice(0, 3)
|
|
181
|
+
.map(v => Math.round(v * 255))
|
|
182
|
+
.join(' ')})`;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** CSS background-image layers drawn into a glass backdrop capture (canvas 2D). Gradients
|
|
2
|
+
* (linear, radial, conic and their repeating forms) are drawn with the canvas gradient API from
|
|
3
|
+
* the element's computed style; each layer honours its background-size, -position and -repeat.
|
|
4
|
+
* An image the capture cannot draw (url(), image-set(), element(), cross-fade()) is reported as a
|
|
5
|
+
* glass error: the glass would otherwise show a backdrop without it, silently. */
|
|
6
|
+
export type BackgroundSpec = Readonly<{
|
|
7
|
+
image: string;
|
|
8
|
+
size: string;
|
|
9
|
+
position: string;
|
|
10
|
+
repeat: string;
|
|
11
|
+
}>;
|
|
12
|
+
type Stop = {
|
|
13
|
+
color: string;
|
|
14
|
+
at?: number;
|
|
15
|
+
unit?: 'px' | '%';
|
|
16
|
+
};
|
|
17
|
+
type Gradient = {
|
|
18
|
+
kind: 'linear';
|
|
19
|
+
repeating: boolean;
|
|
20
|
+
angle?: number;
|
|
21
|
+
corner?: string;
|
|
22
|
+
stops: Stop[];
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'radial';
|
|
25
|
+
repeating: boolean;
|
|
26
|
+
circle: boolean;
|
|
27
|
+
size: string[];
|
|
28
|
+
at: string[];
|
|
29
|
+
stops: Stop[];
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'conic';
|
|
32
|
+
repeating: boolean;
|
|
33
|
+
from: number;
|
|
34
|
+
at: string[];
|
|
35
|
+
stops: Stop[];
|
|
36
|
+
};
|
|
37
|
+
/** Splits at top-level separators (commas or whitespace), outside parentheses. */
|
|
38
|
+
export declare function splitTop(text: string, separator: ',' | ' '): string[];
|
|
39
|
+
/** Parses one computed background-image layer, or undefined for a non-gradient image. */
|
|
40
|
+
export declare function parseGradient(layer: string): Gradient | undefined;
|
|
41
|
+
/** Resolves stop positions to fractions of `extent` (CSS rules: missing positions are spread
|
|
42
|
+
* evenly between their neighbours; a position never precedes an earlier one). */
|
|
43
|
+
export declare function resolveStops(list: readonly Stop[], extent: number): {
|
|
44
|
+
color: string;
|
|
45
|
+
offset: number;
|
|
46
|
+
}[];
|
|
47
|
+
/** A repeating gradient's stops over [0,1]: its period repeated across the whole line. */
|
|
48
|
+
export declare function repeatStops(resolved: readonly {
|
|
49
|
+
color: string;
|
|
50
|
+
offset: number;
|
|
51
|
+
}[]): {
|
|
52
|
+
color: string;
|
|
53
|
+
offset: number;
|
|
54
|
+
}[];
|
|
55
|
+
/** CSS linear-gradient geometry for a w x h box: start and end points of the gradient line. */
|
|
56
|
+
export declare function linearLine(g: Extract<Gradient, {
|
|
57
|
+
kind: 'linear';
|
|
58
|
+
}>, w: number, h: number): {
|
|
59
|
+
x0: number;
|
|
60
|
+
y0: number;
|
|
61
|
+
x1: number;
|
|
62
|
+
y1: number;
|
|
63
|
+
length: number;
|
|
64
|
+
};
|
|
65
|
+
type Context = Pick<CanvasRenderingContext2D, 'createLinearGradient' | 'createRadialGradient' | 'createConicGradient' | 'save' | 'restore' | 'translate' | 'scale' | 'fillRect' | 'beginPath' | 'roundRect' | 'clip' | 'rect'> & {
|
|
66
|
+
fillStyle: string | CanvasGradient | CanvasPattern;
|
|
67
|
+
};
|
|
68
|
+
/** Draws a node's background-image layers into [0,0,w,h] (radius-clipped). Unsupported layers are
|
|
69
|
+
* reported (once per distinct value) through `report`, never silently dropped. */
|
|
70
|
+
export declare function drawBackgroundLayers(ctx: Context, spec: BackgroundSpec, w: number, h: number, radius: number, report: (error: Error) => void): void;
|
|
71
|
+
export {};
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
/** CSS background-image layers drawn into a glass backdrop capture (canvas 2D). Gradients
|
|
2
|
+
* (linear, radial, conic and their repeating forms) are drawn with the canvas gradient API from
|
|
3
|
+
* the element's computed style; each layer honours its background-size, -position and -repeat.
|
|
4
|
+
* An image the capture cannot draw (url(), image-set(), element(), cross-fade()) is reported as a
|
|
5
|
+
* glass error: the glass would otherwise show a backdrop without it, silently. */
|
|
6
|
+
/** Splits at top-level separators (commas or whitespace), outside parentheses. */
|
|
7
|
+
export function splitTop(text, separator) {
|
|
8
|
+
const out = [];
|
|
9
|
+
let depth = 0, current = '';
|
|
10
|
+
for (const ch of text) {
|
|
11
|
+
if (ch === '(')
|
|
12
|
+
depth++;
|
|
13
|
+
else if (ch === ')')
|
|
14
|
+
depth--;
|
|
15
|
+
const split = separator === ',' ? ch === ',' : /\s/.test(ch);
|
|
16
|
+
if (split && depth === 0) {
|
|
17
|
+
if (current.trim())
|
|
18
|
+
out.push(current.trim());
|
|
19
|
+
current = '';
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
current += ch;
|
|
23
|
+
}
|
|
24
|
+
if (current.trim())
|
|
25
|
+
out.push(current.trim());
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
const angleUnits = { deg: 1, rad: 180 / Math.PI, turn: 360, grad: 0.9 };
|
|
29
|
+
function angle(token) {
|
|
30
|
+
const m = /^(-?[\d.]+(?:e-?\d+)?)(deg|rad|turn|grad)$/.exec(token);
|
|
31
|
+
return m ? Number(m[1]) * angleUnits[m[2]] : token === '0' ? 0 : undefined;
|
|
32
|
+
}
|
|
33
|
+
const lengthPattern = /^(-?[\d.]+(?:e-?\d+)?)(px|%)?$/;
|
|
34
|
+
const isLength = (token) => lengthPattern.test(token) || token.startsWith('calc(');
|
|
35
|
+
function length(token) {
|
|
36
|
+
const m = lengthPattern.exec(token);
|
|
37
|
+
if (!m)
|
|
38
|
+
throw Error(`Unsupported gradient length ${token}`);
|
|
39
|
+
return { at: Number(m[1]), unit: m[2] === '%' ? '%' : 'px' };
|
|
40
|
+
}
|
|
41
|
+
/** Colour stops; a conic gradient's angle positions become percentages of the full turn. */
|
|
42
|
+
function stops(args, angular = false) {
|
|
43
|
+
const out = [];
|
|
44
|
+
const isPosition = (t) => isLength(t) || (angular && angle(t) !== undefined);
|
|
45
|
+
const position = (t) => angular && angle(t) !== undefined && !lengthPattern.test(t)
|
|
46
|
+
? { at: angle(t) / 3.6, unit: '%' }
|
|
47
|
+
: length(t);
|
|
48
|
+
for (const arg of args) {
|
|
49
|
+
const tokens = splitTop(arg, ' ');
|
|
50
|
+
if (tokens.every(isPosition))
|
|
51
|
+
throw Error('Unsupported gradient colour hint');
|
|
52
|
+
const color = tokens.find(t => !isPosition(t)), positions = tokens.filter(isPosition).map(position);
|
|
53
|
+
if (!positions.length)
|
|
54
|
+
out.push({ color });
|
|
55
|
+
for (const position of positions)
|
|
56
|
+
out.push({ color, ...position });
|
|
57
|
+
}
|
|
58
|
+
if (out.length < 2)
|
|
59
|
+
throw Error('A gradient needs at least two colour stops');
|
|
60
|
+
return out;
|
|
61
|
+
}
|
|
62
|
+
/** Parses one computed background-image layer, or undefined for a non-gradient image. */
|
|
63
|
+
export function parseGradient(layer) {
|
|
64
|
+
const m = /^(repeating-)?(linear|radial|conic)-gradient\((.*)\)$/s.exec(layer.trim());
|
|
65
|
+
if (!m)
|
|
66
|
+
return undefined;
|
|
67
|
+
const repeating = !!m[1], kind = m[2], args = splitTop(m[3], ',');
|
|
68
|
+
if (kind === 'linear') {
|
|
69
|
+
const first = args[0];
|
|
70
|
+
if (first.startsWith('to '))
|
|
71
|
+
return { kind, repeating, corner: first.slice(3).trim(), stops: stops(args.slice(1)) };
|
|
72
|
+
const a = angle(first);
|
|
73
|
+
return a === undefined
|
|
74
|
+
? { kind, repeating, angle: 180, stops: stops(args) }
|
|
75
|
+
: { kind, repeating, angle: a, stops: stops(args.slice(1)) };
|
|
76
|
+
}
|
|
77
|
+
if (kind === 'radial') {
|
|
78
|
+
const first = splitTop(args[0], ' ');
|
|
79
|
+
const prelude = first.every(t => /^(circle|ellipse|closest-side|closest-corner|farthest-side|farthest-corner|at|left|right|top|bottom|center)$/.test(t) || isLength(t));
|
|
80
|
+
if (!prelude)
|
|
81
|
+
return {
|
|
82
|
+
kind,
|
|
83
|
+
repeating,
|
|
84
|
+
circle: false,
|
|
85
|
+
size: [],
|
|
86
|
+
at: ['center', 'center'],
|
|
87
|
+
stops: stops(args),
|
|
88
|
+
};
|
|
89
|
+
const at = first.indexOf('at'), shape = at < 0 ? first : first.slice(0, at);
|
|
90
|
+
return {
|
|
91
|
+
kind,
|
|
92
|
+
repeating,
|
|
93
|
+
circle: shape.includes('circle') ||
|
|
94
|
+
(shape.filter(isLength).length === 1 && !shape.includes('ellipse')),
|
|
95
|
+
size: shape.filter(t => t !== 'circle' && t !== 'ellipse'),
|
|
96
|
+
at: at < 0 ? ['center', 'center'] : first.slice(at + 1),
|
|
97
|
+
stops: stops(args.slice(1)),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const first = splitTop(args[0], ' ');
|
|
101
|
+
if (first[0] === 'from' || first[0] === 'at') {
|
|
102
|
+
const from = first[0] === 'from' ? (angle(first[1]) ?? 0) : 0, at = first.indexOf('at');
|
|
103
|
+
return {
|
|
104
|
+
kind: 'conic',
|
|
105
|
+
repeating,
|
|
106
|
+
from,
|
|
107
|
+
at: at < 0 ? ['center', 'center'] : first.slice(at + 1),
|
|
108
|
+
stops: stops(args.slice(1), true),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
return { kind: 'conic', repeating, from: 0, at: ['center', 'center'], stops: stops(args, true) };
|
|
112
|
+
}
|
|
113
|
+
/** Resolves stop positions to fractions of `extent` (CSS rules: missing positions are spread
|
|
114
|
+
* evenly between their neighbours; a position never precedes an earlier one). */
|
|
115
|
+
export function resolveStops(list, extent) {
|
|
116
|
+
const at = list.map((s, i) => s.at === undefined
|
|
117
|
+
? i === 0
|
|
118
|
+
? 0
|
|
119
|
+
: i === list.length - 1
|
|
120
|
+
? 1
|
|
121
|
+
: undefined
|
|
122
|
+
: s.unit === '%'
|
|
123
|
+
? s.at / 100
|
|
124
|
+
: extent > 0
|
|
125
|
+
? s.at / extent
|
|
126
|
+
: 0);
|
|
127
|
+
let max = -Infinity;
|
|
128
|
+
for (let i = 0; i < at.length; i++)
|
|
129
|
+
if (at[i] !== undefined) {
|
|
130
|
+
at[i] = Math.max(at[i], max);
|
|
131
|
+
max = at[i];
|
|
132
|
+
}
|
|
133
|
+
for (let i = 1; i < at.length; i++)
|
|
134
|
+
if (at[i] === undefined) {
|
|
135
|
+
let j = i;
|
|
136
|
+
while (at[j] === undefined)
|
|
137
|
+
j++;
|
|
138
|
+
const a = at[i - 1], b = at[j];
|
|
139
|
+
for (let k = i; k < j; k++)
|
|
140
|
+
at[k] = a + ((b - a) * (k - i + 1)) / (j - i + 1);
|
|
141
|
+
}
|
|
142
|
+
return list.map((s, i) => ({ color: s.color, offset: at[i] }));
|
|
143
|
+
}
|
|
144
|
+
/** A repeating gradient's stops over [0,1]: its period repeated across the whole line. */
|
|
145
|
+
export function repeatStops(resolved) {
|
|
146
|
+
const first = resolved[0].offset, last = resolved.at(-1).offset, period = last - first;
|
|
147
|
+
if (period <= 1e-6)
|
|
148
|
+
return [
|
|
149
|
+
{ color: resolved.at(-1).color, offset: 0 },
|
|
150
|
+
{ color: resolved.at(-1).color, offset: 1 },
|
|
151
|
+
];
|
|
152
|
+
const color = (t) => {
|
|
153
|
+
const u = first + ((((t - first) % period) + period) % period);
|
|
154
|
+
for (let i = 1; i < resolved.length; i++)
|
|
155
|
+
if (u <= resolved[i].offset) {
|
|
156
|
+
const a = resolved[i - 1], b = resolved[i], f = b.offset > a.offset ? (u - a.offset) / (b.offset - a.offset) : 1;
|
|
157
|
+
return f <= 0 ? a.color : f >= 1 ? b.color : a.color === b.color ? a.color : undefined;
|
|
158
|
+
}
|
|
159
|
+
return resolved.at(-1).color;
|
|
160
|
+
};
|
|
161
|
+
const out = [];
|
|
162
|
+
const start = Math.floor((0 - first) / period) - 1, end = Math.ceil((1 - first) / period) + 1;
|
|
163
|
+
if (end - start > 4096)
|
|
164
|
+
throw Error('Repeating gradient period is too small to capture');
|
|
165
|
+
for (let k = start; k <= end; k++)
|
|
166
|
+
for (const s of resolved) {
|
|
167
|
+
const offset = s.offset + k * period;
|
|
168
|
+
if (offset >= 0 && offset <= 1)
|
|
169
|
+
out.push({ color: s.color, offset });
|
|
170
|
+
}
|
|
171
|
+
// Exact boundary colours (the period's interpolation at 0 and 1 when no stop lands there).
|
|
172
|
+
const edge = (t) => {
|
|
173
|
+
const value = color(t);
|
|
174
|
+
if (value === undefined)
|
|
175
|
+
throw Error('Unsupported repeating gradient boundary interpolation');
|
|
176
|
+
return value;
|
|
177
|
+
};
|
|
178
|
+
if (!out.length || out[0].offset > 0)
|
|
179
|
+
out.unshift({ color: edge(0), offset: 0 });
|
|
180
|
+
if (out.at(-1).offset < 1)
|
|
181
|
+
out.push({ color: edge(1), offset: 1 });
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
/** CSS linear-gradient geometry for a w x h box: start and end points of the gradient line. */
|
|
185
|
+
export function linearLine(g, w, h) {
|
|
186
|
+
let a = g.angle ?? 180;
|
|
187
|
+
if (g.corner) {
|
|
188
|
+
const words = g.corner.split(/\s+/), up = words.includes('top'), down = words.includes('bottom'), left = words.includes('left'), right = words.includes('right');
|
|
189
|
+
if ((up || down) && (left || right)) {
|
|
190
|
+
const t = (Math.atan2(h, w) * 180) / Math.PI;
|
|
191
|
+
a = up && right ? t : down && right ? 180 - t : down && left ? 180 + t : 360 - t;
|
|
192
|
+
}
|
|
193
|
+
else
|
|
194
|
+
a = up ? 0 : right ? 90 : down ? 180 : 270;
|
|
195
|
+
}
|
|
196
|
+
const r = (a * Math.PI) / 180, dx = Math.sin(r), dy = -Math.cos(r);
|
|
197
|
+
const length = Math.abs(w * dx) + Math.abs(h * dy), cx = w / 2, cy = h / 2;
|
|
198
|
+
return {
|
|
199
|
+
x0: cx - (dx * length) / 2,
|
|
200
|
+
y0: cy - (dy * length) / 2,
|
|
201
|
+
x1: cx + (dx * length) / 2,
|
|
202
|
+
y1: cy + (dy * length) / 2,
|
|
203
|
+
length,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function positionValue(token, extent) {
|
|
207
|
+
if (!token || token === 'center')
|
|
208
|
+
return extent / 2;
|
|
209
|
+
if (token === 'left' || token === 'top')
|
|
210
|
+
return 0;
|
|
211
|
+
if (token === 'right' || token === 'bottom')
|
|
212
|
+
return extent;
|
|
213
|
+
const { at, unit } = length(token);
|
|
214
|
+
return unit === '%' ? (extent * at) / 100 : at;
|
|
215
|
+
}
|
|
216
|
+
function point(at, w, h) {
|
|
217
|
+
let [x, y] = at;
|
|
218
|
+
if ((x === 'top' || x === 'bottom') && y !== 'top' && y !== 'bottom')
|
|
219
|
+
[x, y] = [y, x];
|
|
220
|
+
return { x: positionValue(x, w), y: positionValue(y ?? 'center', h) };
|
|
221
|
+
}
|
|
222
|
+
function radii(g, w, h, c) {
|
|
223
|
+
const lengths = g.size.filter(isLength);
|
|
224
|
+
if (lengths.length) {
|
|
225
|
+
const rx = length(lengths[0]), ry = lengths[1] ? length(lengths[1]) : rx;
|
|
226
|
+
const x = rx.unit === '%' ? (w * rx.at) / 100 : rx.at, y = ry.unit === '%' ? (h * ry.at) / 100 : ry.at;
|
|
227
|
+
return g.circle ? { rx: x, ry: x } : { rx: x, ry: y };
|
|
228
|
+
}
|
|
229
|
+
const keyword = g.size[0] ?? 'farthest-corner';
|
|
230
|
+
const sides = { l: c.x, r: w - c.x, t: c.y, b: h - c.y };
|
|
231
|
+
const near = { x: Math.min(sides.l, sides.r), y: Math.min(sides.t, sides.b) }, far = { x: Math.max(sides.l, sides.r), y: Math.max(sides.t, sides.b) };
|
|
232
|
+
if (keyword === 'closest-side')
|
|
233
|
+
return g.circle
|
|
234
|
+
? { rx: Math.min(near.x, near.y), ry: Math.min(near.x, near.y) }
|
|
235
|
+
: { rx: near.x, ry: near.y };
|
|
236
|
+
if (keyword === 'farthest-side')
|
|
237
|
+
return g.circle
|
|
238
|
+
? { rx: Math.max(far.x, far.y), ry: Math.max(far.x, far.y) }
|
|
239
|
+
: { rx: far.x, ry: far.y };
|
|
240
|
+
const corner = keyword === 'closest-corner' ? near : far;
|
|
241
|
+
if (g.circle) {
|
|
242
|
+
const r = Math.hypot(corner.x, corner.y);
|
|
243
|
+
return { rx: r, ry: r };
|
|
244
|
+
}
|
|
245
|
+
// An ellipse through the corner with the side ratio (CSS: sqrt(2) x the side distances).
|
|
246
|
+
return { rx: corner.x * Math.SQRT2, ry: corner.y * Math.SQRT2 };
|
|
247
|
+
}
|
|
248
|
+
/** Paints one gradient into the tile [0,0,w,h] of the current transform. */
|
|
249
|
+
function supportedStops(g, extent) {
|
|
250
|
+
const resolved = resolveStops(g.stops, extent);
|
|
251
|
+
if (g.repeating)
|
|
252
|
+
return repeatStops(resolved);
|
|
253
|
+
if (resolved.some(s => s.offset < 0 || s.offset > 1))
|
|
254
|
+
throw Error('Unsupported gradient stops outside the capture interval');
|
|
255
|
+
return resolved;
|
|
256
|
+
}
|
|
257
|
+
function paintGradient(ctx, g, w, h) {
|
|
258
|
+
if (w <= 0 || h <= 0)
|
|
259
|
+
return;
|
|
260
|
+
if (g.kind === 'linear') {
|
|
261
|
+
const line = linearLine(g, w, h);
|
|
262
|
+
const resolved = supportedStops(g, line.length);
|
|
263
|
+
const gradient = ctx.createLinearGradient(line.x0, line.y0, line.x1, line.y1);
|
|
264
|
+
for (const s of resolved)
|
|
265
|
+
gradient.addColorStop(s.offset, s.color);
|
|
266
|
+
ctx.fillStyle = gradient;
|
|
267
|
+
ctx.fillRect(0, 0, w, h);
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
if (g.kind === 'radial') {
|
|
271
|
+
const c = point(g.at, w, h), { rx, ry } = radii(g, w, h, c);
|
|
272
|
+
if (rx <= 0 || ry <= 0)
|
|
273
|
+
return;
|
|
274
|
+
const resolved = supportedStops(g, rx);
|
|
275
|
+
ctx.save();
|
|
276
|
+
ctx.translate(c.x, c.y);
|
|
277
|
+
ctx.scale(1, ry / rx);
|
|
278
|
+
const gradient = ctx.createRadialGradient(0, 0, 0, 0, 0, rx);
|
|
279
|
+
for (const s of resolved)
|
|
280
|
+
gradient.addColorStop(s.offset, s.color);
|
|
281
|
+
ctx.fillStyle = gradient;
|
|
282
|
+
ctx.fillRect(-c.x, (-c.y * rx) / ry, w, (h * rx) / ry);
|
|
283
|
+
ctx.restore();
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
const c = point(g.at, w, h);
|
|
287
|
+
const resolved = supportedStops(g, 1);
|
|
288
|
+
// Canvas conic gradients start at 3 o'clock; CSS at 12 o'clock.
|
|
289
|
+
const gradient = ctx.createConicGradient(((g.from - 90) * Math.PI) / 180, c.x, c.y);
|
|
290
|
+
for (const s of resolved)
|
|
291
|
+
gradient.addColorStop(s.offset, s.color);
|
|
292
|
+
ctx.fillStyle = gradient;
|
|
293
|
+
ctx.fillRect(0, 0, w, h);
|
|
294
|
+
}
|
|
295
|
+
function tileSize(size, w, h) {
|
|
296
|
+
if (!size || size === 'auto' || size === 'auto auto' || size === 'cover' || size === 'contain')
|
|
297
|
+
return { tw: w, th: h };
|
|
298
|
+
const [a, b] = size.split(/\s+/);
|
|
299
|
+
const value = (token, extent) => !token || token === 'auto'
|
|
300
|
+
? extent
|
|
301
|
+
: (() => {
|
|
302
|
+
const l = length(token);
|
|
303
|
+
return l.unit === '%' ? (extent * l.at) / 100 : l.at;
|
|
304
|
+
})();
|
|
305
|
+
return { tw: value(a, w), th: value(b, w === 0 ? h : h) };
|
|
306
|
+
}
|
|
307
|
+
function tileOffset(position, w, h, tw, th) {
|
|
308
|
+
const [x = '0%', y = '0%'] = position.split(/\s+/);
|
|
309
|
+
const axis = (token, extent, tile) => token === 'center'
|
|
310
|
+
? (extent - tile) / 2
|
|
311
|
+
: token === 'left' || token === 'top'
|
|
312
|
+
? 0
|
|
313
|
+
: token === 'right' || token === 'bottom'
|
|
314
|
+
? extent - tile
|
|
315
|
+
: (() => {
|
|
316
|
+
const l = length(token);
|
|
317
|
+
return l.unit === '%' ? ((extent - tile) * l.at) / 100 : l.at;
|
|
318
|
+
})();
|
|
319
|
+
return { ox: axis(x, w, tw), oy: axis(y, h, th) };
|
|
320
|
+
}
|
|
321
|
+
const reported = new Set();
|
|
322
|
+
/** Draws a node's background-image layers into [0,0,w,h] (radius-clipped). Unsupported layers are
|
|
323
|
+
* reported (once per distinct value) through `report`, never silently dropped. */
|
|
324
|
+
export function drawBackgroundLayers(ctx, spec, w, h, radius, report) {
|
|
325
|
+
const layers = splitTop(spec.image, ','), sizes = splitTop(spec.size, ','), positions = splitTop(spec.position, ','), repeats = splitTop(spec.repeat, ',');
|
|
326
|
+
ctx.save();
|
|
327
|
+
ctx.beginPath();
|
|
328
|
+
ctx.roundRect(0, 0, w, h, radius);
|
|
329
|
+
ctx.clip();
|
|
330
|
+
// CSS lists the top layer first: paint bottom-up.
|
|
331
|
+
for (let i = layers.length - 1; i >= 0; i--) {
|
|
332
|
+
const layer = layers[i];
|
|
333
|
+
let gradient;
|
|
334
|
+
try {
|
|
335
|
+
gradient = parseGradient(layer);
|
|
336
|
+
}
|
|
337
|
+
catch (error) {
|
|
338
|
+
if (!reported.has(layer)) {
|
|
339
|
+
reported.add(layer);
|
|
340
|
+
report(Error(`Glass backdrop capture cannot parse background-image layer ${layer.slice(0, 120)}: ${error.message}`));
|
|
341
|
+
}
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
if (!gradient) {
|
|
345
|
+
if (!reported.has(layer)) {
|
|
346
|
+
reported.add(layer);
|
|
347
|
+
report(Error(`Glass backdrop capture does not draw background-image ${layer.slice(0, 120)}; the glass shows its backdrop without it`));
|
|
348
|
+
}
|
|
349
|
+
continue;
|
|
350
|
+
}
|
|
351
|
+
const { tw, th } = tileSize(sizes[i % sizes.length] ?? 'auto', w, h);
|
|
352
|
+
if (tw <= 0 || th <= 0)
|
|
353
|
+
continue;
|
|
354
|
+
const { ox, oy } = tileOffset(positions[i % positions.length] ?? '0% 0%', w, h, tw, th);
|
|
355
|
+
const repeat = repeats[i % repeats.length] ?? 'repeat', rx = repeat === 'repeat' || repeat === 'repeat-x' || repeat.startsWith('repeat '), ry = repeat === 'repeat' || repeat === 'repeat-y' || repeat.endsWith(' repeat');
|
|
356
|
+
const xs = rx
|
|
357
|
+
? { from: Math.floor(-ox / tw), to: Math.ceil((w - ox) / tw) }
|
|
358
|
+
: { from: 0, to: 1 }, ys = ry ? { from: Math.floor(-oy / th), to: Math.ceil((h - oy) / th) } : { from: 0, to: 1 };
|
|
359
|
+
if ((xs.to - xs.from) * (ys.to - ys.from) > 10000) {
|
|
360
|
+
report(Error('Glass backdrop capture: background tile grid too large'));
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
363
|
+
for (let tx = xs.from; tx < xs.to; tx++)
|
|
364
|
+
for (let ty = ys.from; ty < ys.to; ty++) {
|
|
365
|
+
ctx.save();
|
|
366
|
+
ctx.translate(ox + tx * tw, oy + ty * th);
|
|
367
|
+
ctx.beginPath();
|
|
368
|
+
ctx.rect(0, 0, tw, th);
|
|
369
|
+
ctx.clip();
|
|
370
|
+
try {
|
|
371
|
+
paintGradient(ctx, gradient, tw, th);
|
|
372
|
+
}
|
|
373
|
+
catch (error) {
|
|
374
|
+
if (!reported.has(layer)) {
|
|
375
|
+
reported.add(layer);
|
|
376
|
+
report(Error(`Glass backdrop capture cannot draw background-image ${layer.slice(0, 120)}: ${error.message}`));
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
finally {
|
|
380
|
+
ctx.restore();
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
ctx.restore();
|
|
385
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Follow every 60 Hz page frame, or alternate frames on a 120 Hz page.
|
|
2
|
+
* The threshold sits between those cadences so normal timestamp jitter cannot
|
|
3
|
+
* turn a 60 Hz frame into a glass hold. Sampling still uses the exact page time. */
|
|
4
|
+
export declare class ShapeCadence {
|
|
5
|
+
private admittedAt?;
|
|
6
|
+
admit(at: number): boolean;
|
|
7
|
+
}
|
|
8
|
+
export type Track = {
|
|
9
|
+
epoch: number;
|
|
10
|
+
duration: number;
|
|
11
|
+
from: number;
|
|
12
|
+
to: number;
|
|
13
|
+
samples?: readonly number[];
|
|
14
|
+
};
|
|
15
|
+
/** Samples are the actual normalized compositor keyframe values, not pose messages.
|
|
16
|
+
* Interpolation matches a linear WAAPI keyframe sequence with evenly spaced offsets. */
|
|
17
|
+
export declare function evaluateTrack(track: Track, at: number): number;
|
|
18
|
+
export declare function validateTrack(track: Track): void;
|