@satinhq/kit 0.0.0-stage → 0.1.0-beta.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 +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 +28 -0
- package/dist/glass/GlassPresentation.js +1038 -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 +169 -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 +37 -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 +31 -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 +832 -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 +115 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Shared clear transmission kernel. The resting reference graph is a separate input.
|
|
2
|
+
* Geometry is the frozen 11k fit. Optical point conversion remains provisional.
|
|
3
|
+
* Output belongs ABOVE semantic foreground. Inside an active aperture it replaces
|
|
4
|
+
* that foreground with one warped atlas image. Zero lift is exactly transparent.
|
|
5
|
+
* The optical field and directional highlight are independent of bar material.
|
|
6
|
+
*/
|
|
7
|
+
export declare const sharedLiftFragment = "\nprecision highp float;\nin vec2 vTextureCoord;\nin vec2 vFilterCoord;\nout vec4 finalColor;\nuniform sampler2D uClearSource;\nuniform sampler2D uRestSource;\nuniform sampler2D uGlyphSource;\nuniform vec2 uResolution;\nuniform vec4 uShape;\nuniform float uRadius;\nuniform float uLiftMix;\nuniform vec4 uLensField;\nuniform vec4 uLensMap;\n// (amplitude, centre pt below the rim, rim-side sigma, centre-side sigma): the top inner shadow.\nuniform vec4 uLensTopShade;\nuniform vec4 uLensDebug;\nuniform vec4 uLensLighting;\nuniform float uLensBandScale;\nuniform vec2 uLensBandDirections;\nuniform vec4 uLensFringe;\nuniform vec2 uLensFaceTreatment;\nuniform vec4 uLensDepthShade;\nuniform float uLensDepthIsotropic;\nuniform vec4 uLensCrestVertical;\nuniform vec3 uLensExteriorShadow;\nuniform float uLensLightRotation;\nuniform vec4 uLensLightStrength;\nuniform vec4 uLensLightingClock;\nuniform vec4 uLensLightingClock2;\nuniform float uMotionMix;\nuniform float uBackgroundWarpPt;\nuniform float uTravelWarpPt;\nuniform float uForegroundChroma;\nuniform float uForegroundScaleX;\nuniform float uForegroundScaleY;\nuniform float uForegroundLabelScaleX;\nuniform float uForegroundLabelScaleY;\nuniform vec2 uForegroundShiftPt;\nuniform vec3 uCapBendIcon;\nuniform vec3 uCapBendLabel;\nuniform float uRimGradient;\nuniform vec2 uGlyphAnchors;\nuniform float uGlyphCount;\nuniform vec4 uDockShape;\nuniform vec2 uGlyphVibrancy;\nfloat sdRoundRect(vec2 point,vec2 halfSize,float radius) {\n vec2 q=abs(point)-halfSize+radius;\n return min(max(q.x,q.y),0.0)+length(max(q,0.0))-radius;\n}\nvec3 dockColour(vec2 uv) {\n // This is the actual surface behind this lens, including lower glass when\n // present. Never substitute the lens's own frosted material for transmission.\n return texture(uClearSource,clamp(uv,vec2(0.0),vec2(1.0))).rgb;\n}\nvoid movingLens(vec2 point, float sd, out vec3 background, out vec4 glyph, out vec2 displacement, out float rimMask) {\n vec2 p=point-uShape.xy;\n vec2 q=abs(p)-uShape.zw+uRadius;\n vec2 a=max(q,0.0);\n float len=length(a);\n vec2 outward=len>0.0?sign(p)*a/len:(q.x>q.y?vec2(sign(p.x),0.0):vec2(0.0,sign(p.y)));\n float inside=max(0.0,-sd);\n // Distances here are explicit point-space hypotheses. The archived field\n // texture scale was not material; it must be qualified against stills.\n // Distance support is directional. The narrow cap must not inherit the\n // straight edge's wider sampling band. Amplitudes and DPR stay unchanged.\n float capWeight=outward.x*outward.x;\n float verticalBand=outward.y>0.0?uLensBandDirections.y:uLensBandScale;\n float band=mix(verticalBand,uLensBandDirections.x,capWeight);\n float opticalDistance=inside/max(.001,band);\n float displacementProfile=pow(max(0.0,1.0-opticalDistance/max(.001,uLensField.z)),1.0);\n float depth=clamp(opticalDistance/max(.001,uLensField.y),0.0,1.0);\n float edgeRefraction=uLensField.x*(1.0-sqrt(depth*(2.0-depth)));\n float mode=uLensDebug.x;\n bool allTerms=mode<4.0;\n // Native selected-lens maps: +9 over 36 local points, -17.5 over\n // 11.2. Inverse sampling subtracts map displacement. This analytic normal\n // field substitutes for the unmaterial map texture, not its material IR.\n // The fitted band scale converts field distance to window points without\n // changing signed displacement amplitude. DPR is applied by rasterization only.\n // uLensMap = (broad amplitude, broad support, edge amplitude, medial fade); the tab lens is (9, 36, -17.5, 0).\n // A negative broad amplitude samples outward: a held control thumb shows the track slightly\n // minified, so the row beyond the track edges reads as dark bands inside the rim.\n // uLensMap.w > 0 (controls only): the broad map fades to 0 within w pt of the medial axis, where\n // the normal flips, so a thin track through the lens centre passes at gain 1 (Slider).\n float medialFade=uLensMap.w>0.0?smoothstep(0.5*uLensMap.w,uLensMap.w,max(0.0,uRadius-inside)):1.0;\n float broadMap=uLensMap.x*uLiftMix*max(0.0,1.0-opticalDistance/max(.001,uLensMap.y))*medialFade;\n float edgeMap=uLensMap.z*uLiftMix*displacementProfile;\n vec2 sourcePoint=point;\n if(allTerms||mode==17.0||mode==5.0)sourcePoint-=outward*broadMap;\n if(allTerms||mode==17.0||mode==11.0)sourcePoint-=outward*edgeMap;\n if(allTerms||mode==17.0||mode==6.0)sourcePoint+=outward*edgeRefraction+vec2(uTravelWarpPt*displacementProfile,0.0);\n displacement=sourcePoint-point;\n vec2 uv=sourcePoint/uResolution;\n // Spectral support is independent from refraction support. Press height\n // supplies its existing clock; straight edges and caps have fitted widths.\n float fringeWidth=mix(uLensFringe.z,uLensFringe.w,capWeight)*uLensField.z/11.2;\n float fringe=pow(max(0.0,1.0-inside/max(.001,fringeWidth)),2.0);\n float fringeGain=mix(uLensFringe.x,uLensFringe.y,capWeight);\n vec2 dispersion=outward*uLensField.w*fringeGain*fringe/uResolution;\n if(!allTerms&&mode!=17.0&&mode!=7.0)dispersion=vec2(0.0);\n background=vec3(dockColour(uv+dispersion).r,dockColour(uv).g,dockColour(uv-dispersion).b);\n // Face/output treatment, background highlights, independent SDF key/fill\n // and diffuse lobes, then foreground. Never brighten the resting bar input.\n float height=uLensLighting.z;\n float offset=uLensLighting.w;\n float faceClock=uLensLightingClock.x;\n float lightClock=uLensLightingClock.y;\n // Measured output crest in window points. Unlike the former finite-support\n // lobe, this has no discontinuity at an interior mask offset. Directional\n // key/fill and symmetric background terms retain separate output clocks.\n float crest=exp(-.5*pow((inside-offset)/max(.001,height),2.0));\n float nx=dot(outward,vec2(cos(uLensLightRotation),sin(uLensLightRotation)));\n float key=crest*pow(max(nx,0.0),2.0);\n float fill=crest*pow(max(-nx,0.0),2.0);\n // A broad smooth diffuse term replaces the offset onset that made an inner\n // contour. Width is 8 times the native-derived 6pt projection estimate.\n float diffuse=mix(1.0,exp(-.5*pow(inside/max(.001,48.0*uLensLightingClock.z),2.0)),uLensFaceTreatment.y)*uLensLightingClock.w;\n if(allTerms||mode==12.0){\n float faceLuma=dot(background,vec3(.2126,.7152,.0722));\n vec3 face=mix(vec3(faceLuma),background,uLensFaceTreatment.x);\n background=mix(background,clamp(face*uLensLighting.x+uLensLighting.y,0.0,1.0),faceClock);\n }\n float H=0.0;\n if(allTerms||mode==8.0||mode==13.0)H+=key*uLensLightStrength.x*lightClock;\n if(allTerms||mode==8.0||mode==14.0)H+=fill*uLensLightStrength.y*lightClock;\n if(allTerms||mode==8.0||mode==16.0)H+=crest*(pow(max(-outward.y,0.0),2.0)*uLensCrestVertical.x+pow(max(outward.y,0.0),2.0)*uLensCrestVertical.y)*lightClock;\n if(allTerms||mode==8.0||mode==15.0)H+=diffuse*uLensLightStrength.z;\n rimMask=crest*lightClock;\n background=mix(background,vec3(1.0),clamp(H,0.0,.95));\n // Neutral output shading is independent of spectral sampling. The narrow\n // output rim and broader directional key/fill projection have separate clocks.\n float shadeCap=mix(capWeight,1.0,uLensDepthIsotropic);\n float shade=uLensDepthShade.x*faceClock\n +uLensDepthShade.y*exp(-inside/1.2)*lightClock\n +(uLensDepthShade.z*shadeCap+uLensDepthShade.w*(1.0-shadeCap))*exp(-inside/6.0)*uLensLightingClock.w;\n // Isotropic button shading consumes available tonal contrast. A constant\n // additive shade dirtied white faces and made a bright perimeter around them.\n float shadeLuma=dot(background,vec3(.2126,.7152,.0722));\n shade*=mix(1.0,clamp(4.0*shadeLuma*(1.0-shadeLuma),0.0,1.0),uLensDepthIsotropic);\n // Controls: native's held lens darkens the upper half below its top rim (a top inner shadow),\n // deepest \u2248 9 pt in and gone by the lens centre line; the lower half stays at the face level.\n // Depth below the top edge, not the SDF: a horizontal band, so it never curls through the caps.\n float topOffset=(uShape.w+p.y)-uLensTopShade.y;\n float topScaled=topOffset/max(.001,topOffset<0.0?uLensTopShade.z:uLensTopShade.w);\n shade+=uLensTopShade.x*exp(-.5*topScaled*topScaled)*(1.0-smoothstep(-1.0,1.0,p.y))*uLensLightingClock.w;\n if(allTerms||mode==8.0)background=clamp(background+vec3(shade),0.0,1.0);\n float edgeShift=max(0.0,uGlyphAnchors.x-uShape.x)-max(0.0,uShape.x-uGlyphAnchors.y);\n // The cap folds a foreground stroke inward; the flat top must not pull\n // a second gear into the highlight. This foreground field is independent\n // of the backdrop transmission field.\n float foregroundResponse=clamp(uForegroundChroma/255.0,0.0,1.0);\n float label=step(uDockShape.y,point.y);\n vec2 magnification=vec2(1.0+mix(uForegroundScaleX,uForegroundLabelScaleX,label),\n 1.0+mix(uForegroundScaleY,uForegroundLabelScaleY,label));\n float capBend=3.0*abs(outward.x)*displacementProfile*foregroundResponse;\n // Native magnifies each tab's content at its own anchor. Magnifying the\n // atlas around the travelling lens center makes glyphs slide sideways and\n // disappear into the wrong cap as the aperture crosses between tabs.\n float lastIndex=max(0.0,uGlyphCount-1.0);\n float spacing=max(1.0,(uGlyphAnchors.y-uGlyphAnchors.x)/max(1.0,lastIndex));\n float anchorIndex=clamp(floor((point.x-uGlyphAnchors.x)/spacing+.5),0.0,lastIndex);\n float anchor=uGlyphAnchors.x+anchorIndex*spacing;\n vec2 glyphPoint=vec2(anchor+(point.x-anchor)/magnification.x,uShape.y+p.y/magnification.y);\n // Fitting glyph-crop centres shows a leading-cap fold beyond the interior\n // magnification. Its sigmoid is spatial, so the nearer stroke bends more.\n float lead=sign(uTravelWarpPt);\n vec3 fold=mix(uCapBendIcon,uCapBendLabel,label);\n float leadingDistance=lead>0.0?uShape.x+uShape.z-point.x:point.x-(uShape.x-uShape.z);\n float leadingFold=lead*fold.x/(1.0+exp(clamp((leadingDistance-fold.y)/fold.z,-30.0,30.0)));\n glyphPoint.x-=leadingFold;\n vec2 glyphUv=(glyphPoint-outward*capBend+vec2(edgeShift/magnification.x-mix(uForegroundShiftPt.x,uForegroundShiftPt.y,label)*uMotionMix,0.0))/uResolution;\n vec2 soften=outward*.75*abs(outward.x)*exp(-inside/6.0)*foregroundResponse/uResolution;\n bool selected=true;\n if(selected){\n glyph=texture(uGlyphSource,clamp(glyphUv,vec2(0.0),vec2(1.0)))*.4\n +(texture(uGlyphSource,clamp(glyphUv+soften*.5,vec2(0.0),vec2(1.0)))\n +texture(uGlyphSource,clamp(glyphUv-soften*.5,vec2(0.0),vec2(1.0))))*.24\n +(texture(uGlyphSource,clamp(glyphUv+soften,vec2(0.0),vec2(1.0)))\n +texture(uGlyphSource,clamp(glyphUv-soften,vec2(0.0),vec2(1.0))))*.06;\n glyph.gb=clamp(glyph.gb+uGlyphVibrancy*glyph.a*uMotionMix,vec2(0.0),vec2(glyph.a));\n }\n // Foreground edge opacity falls from one at -14 local units to zero\n // at the contour in the held sample. The conversion remains provisional.\n if(allTerms||mode==18.0)glyph*=mix(1.0,clamp(inside/14.0,0.0,1.0),uLensLightingClock2.z);\n if(!allTerms&&mode!=10.0&&mode!=18.0)glyph=vec4(0.0);\n}\n\nvoid main() {\n if(uLiftMix<=0.0){finalColor=vec4(0.0);return;}\n vec2 point=vFilterCoord*uResolution;\n float sd=sdRoundRect(point-uShape.xy,uShape.zw,uRadius);\n // Control rim (uLensCrestVertical.zw = dark line gain, width pt): device-pixel edge, crisp line.\n float rimAa=uLensCrestVertical.w>0.0?.5/max(1.0,uLensDebug.y):.4;\n float coverage=smoothstep(rimAa,-rimAa,sd);\n vec3 transmitted;vec4 glyph;vec2 displacement;float rimMask;\n movingLens(point,sd,transmitted,glyph,displacement,rimMask);\n // 1 point displaces d framebuffer pixels here. Neutral blue=0, red=32px.\n if(uLensDebug.x==1.0){float m=clamp(length(displacement)*uLensDebug.y/uLensDebug.z,0.0,1.0);finalColor=vec4(vec3(m,4.0*m*(1.0-m),1.0-m)*coverage,coverage);return;}\n if(uLensDebug.x==2.0){finalColor=vec4(vec3(rimMask)*coverage,coverage);return;}\n // RG encode signed x/y displacement around 0.5, at +/-32 framebuffer px.\n if(uLensDebug.x==3.0){finalColor=vec4(vec3(vec2(.5)+displacement*uLensDebug.y/(2.0*uLensDebug.z),0.0)*coverage,coverage);return;}\n vec3 rest=texture(uRestSource,clamp(vFilterCoord,vec2(0.0),vec2(1.0))).rgb;\n vec3 body=mix(rest,transmitted,clamp(uLiftMix,0.0,1.0));\n float rimPx=.5/max(1.0,uLensDebug.y);\n body*=1.0-uLensCrestVertical.z*(1.0-smoothstep(uLensCrestVertical.w-rimPx,uLensCrestVertical.w+rimPx,max(0.0,-sd)))*clamp(uLiftMix,0.0,1.0);\n // Foreground is premultiplied. Do not crossfade two differently warped glyphs.\n // Gaussian half-plane approximation of the measured exterior shadow.\n // Fit opacity/offset/spread outside the aperture, independent of face light.\n float shadowDistance=sdRoundRect(point-uShape.xy-vec2(0.0,uLensExteriorShadow.y),uShape.zw,uRadius);\n float z=shadowDistance/max(.001,uLensExteriorShadow.z)/1.41421356;\n float t=1.0/(1.0+.3275911*abs(z));\n float erf=sign(z)*(1.0-(((((1.061405429*t-1.453152027)*t)+1.421413741)*t-.284496736)*t+.254829592)*t*exp(-z*z));\n float shadow=.5*(1.0-erf)*uLensExteriorShadow.x*uLensLightingClock2.y;\n if(uLensDebug.x>=4.0&&uLensDebug.x!=9.0)shadow=0.0;\n finalColor=vec4((body*(1.0-glyph.a)+glyph.rgb)*coverage,coverage+(1.0-coverage)*shadow);\n}";
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/** Shared clear transmission kernel. The resting reference graph is a separate input.
|
|
2
|
+
* Geometry is the frozen 11k fit. Optical point conversion remains provisional.
|
|
3
|
+
* Output belongs ABOVE semantic foreground. Inside an active aperture it replaces
|
|
4
|
+
* that foreground with one warped atlas image. Zero lift is exactly transparent.
|
|
5
|
+
* The optical field and directional highlight are independent of bar material.
|
|
6
|
+
*/
|
|
7
|
+
export const sharedLiftFragment = /* glsl */ `
|
|
8
|
+
precision highp float;
|
|
9
|
+
in vec2 vTextureCoord;
|
|
10
|
+
in vec2 vFilterCoord;
|
|
11
|
+
out vec4 finalColor;
|
|
12
|
+
uniform sampler2D uClearSource;
|
|
13
|
+
uniform sampler2D uRestSource;
|
|
14
|
+
uniform sampler2D uGlyphSource;
|
|
15
|
+
uniform vec2 uResolution;
|
|
16
|
+
uniform vec4 uShape;
|
|
17
|
+
uniform float uRadius;
|
|
18
|
+
uniform float uLiftMix;
|
|
19
|
+
uniform vec4 uLensField;
|
|
20
|
+
uniform vec4 uLensMap;
|
|
21
|
+
// (amplitude, centre pt below the rim, rim-side sigma, centre-side sigma): the top inner shadow.
|
|
22
|
+
uniform vec4 uLensTopShade;
|
|
23
|
+
uniform vec4 uLensDebug;
|
|
24
|
+
uniform vec4 uLensLighting;
|
|
25
|
+
uniform float uLensBandScale;
|
|
26
|
+
uniform vec2 uLensBandDirections;
|
|
27
|
+
uniform vec4 uLensFringe;
|
|
28
|
+
uniform vec2 uLensFaceTreatment;
|
|
29
|
+
uniform vec4 uLensDepthShade;
|
|
30
|
+
uniform float uLensDepthIsotropic;
|
|
31
|
+
uniform vec4 uLensCrestVertical;
|
|
32
|
+
uniform vec3 uLensExteriorShadow;
|
|
33
|
+
uniform float uLensLightRotation;
|
|
34
|
+
uniform vec4 uLensLightStrength;
|
|
35
|
+
uniform vec4 uLensLightingClock;
|
|
36
|
+
uniform vec4 uLensLightingClock2;
|
|
37
|
+
uniform float uMotionMix;
|
|
38
|
+
uniform float uBackgroundWarpPt;
|
|
39
|
+
uniform float uTravelWarpPt;
|
|
40
|
+
uniform float uForegroundChroma;
|
|
41
|
+
uniform float uForegroundScaleX;
|
|
42
|
+
uniform float uForegroundScaleY;
|
|
43
|
+
uniform float uForegroundLabelScaleX;
|
|
44
|
+
uniform float uForegroundLabelScaleY;
|
|
45
|
+
uniform vec2 uForegroundShiftPt;
|
|
46
|
+
uniform vec3 uCapBendIcon;
|
|
47
|
+
uniform vec3 uCapBendLabel;
|
|
48
|
+
uniform float uRimGradient;
|
|
49
|
+
uniform vec2 uGlyphAnchors;
|
|
50
|
+
uniform float uGlyphCount;
|
|
51
|
+
uniform vec4 uDockShape;
|
|
52
|
+
uniform vec2 uGlyphVibrancy;
|
|
53
|
+
float sdRoundRect(vec2 point,vec2 halfSize,float radius) {
|
|
54
|
+
vec2 q=abs(point)-halfSize+radius;
|
|
55
|
+
return min(max(q.x,q.y),0.0)+length(max(q,0.0))-radius;
|
|
56
|
+
}
|
|
57
|
+
vec3 dockColour(vec2 uv) {
|
|
58
|
+
// This is the actual surface behind this lens, including lower glass when
|
|
59
|
+
// present. Never substitute the lens's own frosted material for transmission.
|
|
60
|
+
return texture(uClearSource,clamp(uv,vec2(0.0),vec2(1.0))).rgb;
|
|
61
|
+
}
|
|
62
|
+
void movingLens(vec2 point, float sd, out vec3 background, out vec4 glyph, out vec2 displacement, out float rimMask) {
|
|
63
|
+
vec2 p=point-uShape.xy;
|
|
64
|
+
vec2 q=abs(p)-uShape.zw+uRadius;
|
|
65
|
+
vec2 a=max(q,0.0);
|
|
66
|
+
float len=length(a);
|
|
67
|
+
vec2 outward=len>0.0?sign(p)*a/len:(q.x>q.y?vec2(sign(p.x),0.0):vec2(0.0,sign(p.y)));
|
|
68
|
+
float inside=max(0.0,-sd);
|
|
69
|
+
// Distances here are explicit point-space hypotheses. The archived field
|
|
70
|
+
// texture scale was not material; it must be qualified against stills.
|
|
71
|
+
// Distance support is directional. The narrow cap must not inherit the
|
|
72
|
+
// straight edge's wider sampling band. Amplitudes and DPR stay unchanged.
|
|
73
|
+
float capWeight=outward.x*outward.x;
|
|
74
|
+
float verticalBand=outward.y>0.0?uLensBandDirections.y:uLensBandScale;
|
|
75
|
+
float band=mix(verticalBand,uLensBandDirections.x,capWeight);
|
|
76
|
+
float opticalDistance=inside/max(.001,band);
|
|
77
|
+
float displacementProfile=pow(max(0.0,1.0-opticalDistance/max(.001,uLensField.z)),1.0);
|
|
78
|
+
float depth=clamp(opticalDistance/max(.001,uLensField.y),0.0,1.0);
|
|
79
|
+
float edgeRefraction=uLensField.x*(1.0-sqrt(depth*(2.0-depth)));
|
|
80
|
+
float mode=uLensDebug.x;
|
|
81
|
+
bool allTerms=mode<4.0;
|
|
82
|
+
// Native selected-lens maps: +9 over 36 local points, -17.5 over
|
|
83
|
+
// 11.2. Inverse sampling subtracts map displacement. This analytic normal
|
|
84
|
+
// field substitutes for the unmaterial map texture, not its material IR.
|
|
85
|
+
// The fitted band scale converts field distance to window points without
|
|
86
|
+
// changing signed displacement amplitude. DPR is applied by rasterization only.
|
|
87
|
+
// uLensMap = (broad amplitude, broad support, edge amplitude, medial fade); the tab lens is (9, 36, -17.5, 0).
|
|
88
|
+
// A negative broad amplitude samples outward: a held control thumb shows the track slightly
|
|
89
|
+
// minified, so the row beyond the track edges reads as dark bands inside the rim.
|
|
90
|
+
// uLensMap.w > 0 (controls only): the broad map fades to 0 within w pt of the medial axis, where
|
|
91
|
+
// the normal flips, so a thin track through the lens centre passes at gain 1 (Slider).
|
|
92
|
+
float medialFade=uLensMap.w>0.0?smoothstep(0.5*uLensMap.w,uLensMap.w,max(0.0,uRadius-inside)):1.0;
|
|
93
|
+
float broadMap=uLensMap.x*uLiftMix*max(0.0,1.0-opticalDistance/max(.001,uLensMap.y))*medialFade;
|
|
94
|
+
float edgeMap=uLensMap.z*uLiftMix*displacementProfile;
|
|
95
|
+
vec2 sourcePoint=point;
|
|
96
|
+
if(allTerms||mode==17.0||mode==5.0)sourcePoint-=outward*broadMap;
|
|
97
|
+
if(allTerms||mode==17.0||mode==11.0)sourcePoint-=outward*edgeMap;
|
|
98
|
+
if(allTerms||mode==17.0||mode==6.0)sourcePoint+=outward*edgeRefraction+vec2(uTravelWarpPt*displacementProfile,0.0);
|
|
99
|
+
displacement=sourcePoint-point;
|
|
100
|
+
vec2 uv=sourcePoint/uResolution;
|
|
101
|
+
// Spectral support is independent from refraction support. Press height
|
|
102
|
+
// supplies its existing clock; straight edges and caps have fitted widths.
|
|
103
|
+
float fringeWidth=mix(uLensFringe.z,uLensFringe.w,capWeight)*uLensField.z/11.2;
|
|
104
|
+
float fringe=pow(max(0.0,1.0-inside/max(.001,fringeWidth)),2.0);
|
|
105
|
+
float fringeGain=mix(uLensFringe.x,uLensFringe.y,capWeight);
|
|
106
|
+
vec2 dispersion=outward*uLensField.w*fringeGain*fringe/uResolution;
|
|
107
|
+
if(!allTerms&&mode!=17.0&&mode!=7.0)dispersion=vec2(0.0);
|
|
108
|
+
background=vec3(dockColour(uv+dispersion).r,dockColour(uv).g,dockColour(uv-dispersion).b);
|
|
109
|
+
// Face/output treatment, background highlights, independent SDF key/fill
|
|
110
|
+
// and diffuse lobes, then foreground. Never brighten the resting bar input.
|
|
111
|
+
float height=uLensLighting.z;
|
|
112
|
+
float offset=uLensLighting.w;
|
|
113
|
+
float faceClock=uLensLightingClock.x;
|
|
114
|
+
float lightClock=uLensLightingClock.y;
|
|
115
|
+
// Measured output crest in window points. Unlike the former finite-support
|
|
116
|
+
// lobe, this has no discontinuity at an interior mask offset. Directional
|
|
117
|
+
// key/fill and symmetric background terms retain separate output clocks.
|
|
118
|
+
float crest=exp(-.5*pow((inside-offset)/max(.001,height),2.0));
|
|
119
|
+
float nx=dot(outward,vec2(cos(uLensLightRotation),sin(uLensLightRotation)));
|
|
120
|
+
float key=crest*pow(max(nx,0.0),2.0);
|
|
121
|
+
float fill=crest*pow(max(-nx,0.0),2.0);
|
|
122
|
+
// A broad smooth diffuse term replaces the offset onset that made an inner
|
|
123
|
+
// contour. Width is 8 times the native-derived 6pt projection estimate.
|
|
124
|
+
float diffuse=mix(1.0,exp(-.5*pow(inside/max(.001,48.0*uLensLightingClock.z),2.0)),uLensFaceTreatment.y)*uLensLightingClock.w;
|
|
125
|
+
if(allTerms||mode==12.0){
|
|
126
|
+
float faceLuma=dot(background,vec3(.2126,.7152,.0722));
|
|
127
|
+
vec3 face=mix(vec3(faceLuma),background,uLensFaceTreatment.x);
|
|
128
|
+
background=mix(background,clamp(face*uLensLighting.x+uLensLighting.y,0.0,1.0),faceClock);
|
|
129
|
+
}
|
|
130
|
+
float H=0.0;
|
|
131
|
+
if(allTerms||mode==8.0||mode==13.0)H+=key*uLensLightStrength.x*lightClock;
|
|
132
|
+
if(allTerms||mode==8.0||mode==14.0)H+=fill*uLensLightStrength.y*lightClock;
|
|
133
|
+
if(allTerms||mode==8.0||mode==16.0)H+=crest*(pow(max(-outward.y,0.0),2.0)*uLensCrestVertical.x+pow(max(outward.y,0.0),2.0)*uLensCrestVertical.y)*lightClock;
|
|
134
|
+
if(allTerms||mode==8.0||mode==15.0)H+=diffuse*uLensLightStrength.z;
|
|
135
|
+
rimMask=crest*lightClock;
|
|
136
|
+
background=mix(background,vec3(1.0),clamp(H,0.0,.95));
|
|
137
|
+
// Neutral output shading is independent of spectral sampling. The narrow
|
|
138
|
+
// output rim and broader directional key/fill projection have separate clocks.
|
|
139
|
+
float shadeCap=mix(capWeight,1.0,uLensDepthIsotropic);
|
|
140
|
+
float shade=uLensDepthShade.x*faceClock
|
|
141
|
+
+uLensDepthShade.y*exp(-inside/1.2)*lightClock
|
|
142
|
+
+(uLensDepthShade.z*shadeCap+uLensDepthShade.w*(1.0-shadeCap))*exp(-inside/6.0)*uLensLightingClock.w;
|
|
143
|
+
// Isotropic button shading consumes available tonal contrast. A constant
|
|
144
|
+
// additive shade dirtied white faces and made a bright perimeter around them.
|
|
145
|
+
float shadeLuma=dot(background,vec3(.2126,.7152,.0722));
|
|
146
|
+
shade*=mix(1.0,clamp(4.0*shadeLuma*(1.0-shadeLuma),0.0,1.0),uLensDepthIsotropic);
|
|
147
|
+
// Controls: native's held lens darkens the upper half below its top rim (a top inner shadow),
|
|
148
|
+
// deepest ≈ 9 pt in and gone by the lens centre line; the lower half stays at the face level.
|
|
149
|
+
// Depth below the top edge, not the SDF: a horizontal band, so it never curls through the caps.
|
|
150
|
+
float topOffset=(uShape.w+p.y)-uLensTopShade.y;
|
|
151
|
+
float topScaled=topOffset/max(.001,topOffset<0.0?uLensTopShade.z:uLensTopShade.w);
|
|
152
|
+
shade+=uLensTopShade.x*exp(-.5*topScaled*topScaled)*(1.0-smoothstep(-1.0,1.0,p.y))*uLensLightingClock.w;
|
|
153
|
+
if(allTerms||mode==8.0)background=clamp(background+vec3(shade),0.0,1.0);
|
|
154
|
+
float edgeShift=max(0.0,uGlyphAnchors.x-uShape.x)-max(0.0,uShape.x-uGlyphAnchors.y);
|
|
155
|
+
// The cap folds a foreground stroke inward; the flat top must not pull
|
|
156
|
+
// a second gear into the highlight. This foreground field is independent
|
|
157
|
+
// of the backdrop transmission field.
|
|
158
|
+
float foregroundResponse=clamp(uForegroundChroma/255.0,0.0,1.0);
|
|
159
|
+
float label=step(uDockShape.y,point.y);
|
|
160
|
+
vec2 magnification=vec2(1.0+mix(uForegroundScaleX,uForegroundLabelScaleX,label),
|
|
161
|
+
1.0+mix(uForegroundScaleY,uForegroundLabelScaleY,label));
|
|
162
|
+
float capBend=3.0*abs(outward.x)*displacementProfile*foregroundResponse;
|
|
163
|
+
// Native magnifies each tab's content at its own anchor. Magnifying the
|
|
164
|
+
// atlas around the travelling lens center makes glyphs slide sideways and
|
|
165
|
+
// disappear into the wrong cap as the aperture crosses between tabs.
|
|
166
|
+
float lastIndex=max(0.0,uGlyphCount-1.0);
|
|
167
|
+
float spacing=max(1.0,(uGlyphAnchors.y-uGlyphAnchors.x)/max(1.0,lastIndex));
|
|
168
|
+
float anchorIndex=clamp(floor((point.x-uGlyphAnchors.x)/spacing+.5),0.0,lastIndex);
|
|
169
|
+
float anchor=uGlyphAnchors.x+anchorIndex*spacing;
|
|
170
|
+
vec2 glyphPoint=vec2(anchor+(point.x-anchor)/magnification.x,uShape.y+p.y/magnification.y);
|
|
171
|
+
// Fitting glyph-crop centres shows a leading-cap fold beyond the interior
|
|
172
|
+
// magnification. Its sigmoid is spatial, so the nearer stroke bends more.
|
|
173
|
+
float lead=sign(uTravelWarpPt);
|
|
174
|
+
vec3 fold=mix(uCapBendIcon,uCapBendLabel,label);
|
|
175
|
+
float leadingDistance=lead>0.0?uShape.x+uShape.z-point.x:point.x-(uShape.x-uShape.z);
|
|
176
|
+
float leadingFold=lead*fold.x/(1.0+exp(clamp((leadingDistance-fold.y)/fold.z,-30.0,30.0)));
|
|
177
|
+
glyphPoint.x-=leadingFold;
|
|
178
|
+
vec2 glyphUv=(glyphPoint-outward*capBend+vec2(edgeShift/magnification.x-mix(uForegroundShiftPt.x,uForegroundShiftPt.y,label)*uMotionMix,0.0))/uResolution;
|
|
179
|
+
vec2 soften=outward*.75*abs(outward.x)*exp(-inside/6.0)*foregroundResponse/uResolution;
|
|
180
|
+
bool selected=true;
|
|
181
|
+
if(selected){
|
|
182
|
+
glyph=texture(uGlyphSource,clamp(glyphUv,vec2(0.0),vec2(1.0)))*.4
|
|
183
|
+
+(texture(uGlyphSource,clamp(glyphUv+soften*.5,vec2(0.0),vec2(1.0)))
|
|
184
|
+
+texture(uGlyphSource,clamp(glyphUv-soften*.5,vec2(0.0),vec2(1.0))))*.24
|
|
185
|
+
+(texture(uGlyphSource,clamp(glyphUv+soften,vec2(0.0),vec2(1.0)))
|
|
186
|
+
+texture(uGlyphSource,clamp(glyphUv-soften,vec2(0.0),vec2(1.0))))*.06;
|
|
187
|
+
glyph.gb=clamp(glyph.gb+uGlyphVibrancy*glyph.a*uMotionMix,vec2(0.0),vec2(glyph.a));
|
|
188
|
+
}
|
|
189
|
+
// Foreground edge opacity falls from one at -14 local units to zero
|
|
190
|
+
// at the contour in the held sample. The conversion remains provisional.
|
|
191
|
+
if(allTerms||mode==18.0)glyph*=mix(1.0,clamp(inside/14.0,0.0,1.0),uLensLightingClock2.z);
|
|
192
|
+
if(!allTerms&&mode!=10.0&&mode!=18.0)glyph=vec4(0.0);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
void main() {
|
|
196
|
+
if(uLiftMix<=0.0){finalColor=vec4(0.0);return;}
|
|
197
|
+
vec2 point=vFilterCoord*uResolution;
|
|
198
|
+
float sd=sdRoundRect(point-uShape.xy,uShape.zw,uRadius);
|
|
199
|
+
// Control rim (uLensCrestVertical.zw = dark line gain, width pt): device-pixel edge, crisp line.
|
|
200
|
+
float rimAa=uLensCrestVertical.w>0.0?.5/max(1.0,uLensDebug.y):.4;
|
|
201
|
+
float coverage=smoothstep(rimAa,-rimAa,sd);
|
|
202
|
+
vec3 transmitted;vec4 glyph;vec2 displacement;float rimMask;
|
|
203
|
+
movingLens(point,sd,transmitted,glyph,displacement,rimMask);
|
|
204
|
+
// 1 point displaces d framebuffer pixels here. Neutral blue=0, red=32px.
|
|
205
|
+
if(uLensDebug.x==1.0){float m=clamp(length(displacement)*uLensDebug.y/uLensDebug.z,0.0,1.0);finalColor=vec4(vec3(m,4.0*m*(1.0-m),1.0-m)*coverage,coverage);return;}
|
|
206
|
+
if(uLensDebug.x==2.0){finalColor=vec4(vec3(rimMask)*coverage,coverage);return;}
|
|
207
|
+
// RG encode signed x/y displacement around 0.5, at +/-32 framebuffer px.
|
|
208
|
+
if(uLensDebug.x==3.0){finalColor=vec4(vec3(vec2(.5)+displacement*uLensDebug.y/(2.0*uLensDebug.z),0.0)*coverage,coverage);return;}
|
|
209
|
+
vec3 rest=texture(uRestSource,clamp(vFilterCoord,vec2(0.0),vec2(1.0))).rgb;
|
|
210
|
+
vec3 body=mix(rest,transmitted,clamp(uLiftMix,0.0,1.0));
|
|
211
|
+
float rimPx=.5/max(1.0,uLensDebug.y);
|
|
212
|
+
body*=1.0-uLensCrestVertical.z*(1.0-smoothstep(uLensCrestVertical.w-rimPx,uLensCrestVertical.w+rimPx,max(0.0,-sd)))*clamp(uLiftMix,0.0,1.0);
|
|
213
|
+
// Foreground is premultiplied. Do not crossfade two differently warped glyphs.
|
|
214
|
+
// Gaussian half-plane approximation of the measured exterior shadow.
|
|
215
|
+
// Fit opacity/offset/spread outside the aperture, independent of face light.
|
|
216
|
+
float shadowDistance=sdRoundRect(point-uShape.xy-vec2(0.0,uLensExteriorShadow.y),uShape.zw,uRadius);
|
|
217
|
+
float z=shadowDistance/max(.001,uLensExteriorShadow.z)/1.41421356;
|
|
218
|
+
float t=1.0/(1.0+.3275911*abs(z));
|
|
219
|
+
float erf=sign(z)*(1.0-(((((1.061405429*t-1.453152027)*t)+1.421413741)*t-.284496736)*t+.254829592)*t*exp(-z*z));
|
|
220
|
+
float shadow=.5*(1.0-erf)*uLensExteriorShadow.x*uLensLightingClock2.y;
|
|
221
|
+
if(uLensDebug.x>=4.0&&uLensDebug.x!=9.0)shadow=0.0;
|
|
222
|
+
finalColor=vec4((body*(1.0-glyph.a)+glyph.rgb)*coverage,coverage+(1.0-coverage)*shadow);
|
|
223
|
+
}`;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export { takeSourcePixels } from './preparedSourcePixels.js';
|
|
2
|
+
type Transport = Pick<Worker, 'postMessage' | 'terminate' | 'onmessage' | 'onerror' | 'onmessageerror'>;
|
|
3
|
+
/** Stages the bytes a document-owned renderer uploads for a capture.
|
|
4
|
+
*
|
|
5
|
+
* A capture canvas is read back on the page (`getImageData`): no bitmap is taken from the canvas
|
|
6
|
+
* and nothing leaves the thread. Measured in the Catalyst host for an accelerated 1320 px wide
|
|
7
|
+
* canvas: 21 to 27 ms for 14 MB, 43 ms for 29 MB, 54 to 63 ms for 41 MB, the same pixels as a
|
|
8
|
+
* bitmap of the canvas, and the canvas then costs nothing to redraw or release. The worker path
|
|
9
|
+
* it replaces for canvases (a bitmap copied to a texture and read back in an upload worker) took
|
|
10
|
+
* 136 to 281 ms for the 41 MB capture, during which WebKit presented no frame of the page.
|
|
11
|
+
*
|
|
12
|
+
* The readback returns straight alpha and the renderer uploads premultiplied bytes: the two are
|
|
13
|
+
* the same only for an opaque capture. Backdrop planes are opaque (their fill is,
|
|
14
|
+
* `effectiveBackground`); translucent captures (glyphs, region foregrounds) are never staged here.
|
|
15
|
+
*
|
|
16
|
+
* Any other image (a bitmap with no canvas behind it) goes to the upload worker, which moves the
|
|
17
|
+
* external-image import off the presentation thread without an alpha round trip. */
|
|
18
|
+
export declare class SourcePixels {
|
|
19
|
+
private worker?;
|
|
20
|
+
private next;
|
|
21
|
+
private failure?;
|
|
22
|
+
private pending;
|
|
23
|
+
private create;
|
|
24
|
+
constructor(create?: () => Transport);
|
|
25
|
+
/** The upload worker failed (its device was lost, or a reply never came). The instance stays
|
|
26
|
+
* failed for images that need the worker: the bounded recovery of a source preparation replaces
|
|
27
|
+
* it (`ProductionGlassRuntime.replaceFailedSourcePixels`), so a failure is reported once per
|
|
28
|
+
* attempt and never retried in a loop. Canvas readbacks do not use the worker and still work. */
|
|
29
|
+
get failed(): boolean;
|
|
30
|
+
private fail;
|
|
31
|
+
/** Stage `image`'s premultiplied bytes for its upload (`takeSourcePixels`). When `capture` is a
|
|
32
|
+
* canvas it is read back here (see the class comment) and the rest of this comment does not apply.
|
|
33
|
+
*
|
|
34
|
+
* The upload worker needs a bitmap of its own (a transferred bitmap is gone from this thread,
|
|
35
|
+
* and the renderer keeps `image` to restore a lost device). `capture` is what that second bitmap
|
|
36
|
+
* is taken from: pass the canvas `image` was snapshotted from, unchanged since. A second
|
|
37
|
+
* snapshot of the canvas took under 3 ms. Copying the snapshot itself
|
|
38
|
+
* (`createImageBitmap(image)`, the default) blocked the main thread for 5 to 6 ms per megabyte
|
|
39
|
+
* in WebKit (157 ms for a 1320 x 5091 capture in the Catalyst host), more than half of the
|
|
40
|
+
* stage. Measured for captures up to 1320 x 6495; the cause inside WebKit was not sampled. */
|
|
41
|
+
prepare(image: ImageBitmap, capture?: ImageBitmapSource): Promise<void>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { reportGlassError } from '../errors.js';
|
|
2
|
+
import { glassNow, glassTiming } from './profile.js';
|
|
3
|
+
import { keepSourcePixels, prepared } from './preparedSourcePixels.js';
|
|
4
|
+
export { takeSourcePixels } from './preparedSourcePixels.js';
|
|
5
|
+
/** The pixels of a capture canvas, read back from its 2D context (straight RGBA, rows top first);
|
|
6
|
+
* undefined when `capture` is not a canvas with a 2D context. */
|
|
7
|
+
function canvasPixels(capture) {
|
|
8
|
+
const canvas = capture;
|
|
9
|
+
if (typeof canvas.getContext !== 'function' || !canvas.width || !canvas.height)
|
|
10
|
+
return undefined;
|
|
11
|
+
const context = canvas.getContext('2d');
|
|
12
|
+
if (!context || typeof context.getImageData !== 'function')
|
|
13
|
+
return undefined;
|
|
14
|
+
return context.getImageData(0, 0, canvas.width, canvas.height).data;
|
|
15
|
+
}
|
|
16
|
+
/** Stages the bytes a document-owned renderer uploads for a capture.
|
|
17
|
+
*
|
|
18
|
+
* A capture canvas is read back on the page (`getImageData`): no bitmap is taken from the canvas
|
|
19
|
+
* and nothing leaves the thread. Measured in the Catalyst host for an accelerated 1320 px wide
|
|
20
|
+
* canvas: 21 to 27 ms for 14 MB, 43 ms for 29 MB, 54 to 63 ms for 41 MB, the same pixels as a
|
|
21
|
+
* bitmap of the canvas, and the canvas then costs nothing to redraw or release. The worker path
|
|
22
|
+
* it replaces for canvases (a bitmap copied to a texture and read back in an upload worker) took
|
|
23
|
+
* 136 to 281 ms for the 41 MB capture, during which WebKit presented no frame of the page.
|
|
24
|
+
*
|
|
25
|
+
* The readback returns straight alpha and the renderer uploads premultiplied bytes: the two are
|
|
26
|
+
* the same only for an opaque capture. Backdrop planes are opaque (their fill is,
|
|
27
|
+
* `effectiveBackground`); translucent captures (glyphs, region foregrounds) are never staged here.
|
|
28
|
+
*
|
|
29
|
+
* Any other image (a bitmap with no canvas behind it) goes to the upload worker, which moves the
|
|
30
|
+
* external-image import off the presentation thread without an alpha round trip. */
|
|
31
|
+
export class SourcePixels {
|
|
32
|
+
worker;
|
|
33
|
+
next = 0;
|
|
34
|
+
failure;
|
|
35
|
+
pending = new Map();
|
|
36
|
+
create;
|
|
37
|
+
constructor(create = () => new Worker(new URL('./sourcePixels.worker.js', import.meta.url), {
|
|
38
|
+
type: 'module',
|
|
39
|
+
name: 'satin-source-upload',
|
|
40
|
+
})) {
|
|
41
|
+
this.create = create;
|
|
42
|
+
}
|
|
43
|
+
/** The upload worker failed (its device was lost, or a reply never came). The instance stays
|
|
44
|
+
* failed for images that need the worker: the bounded recovery of a source preparation replaces
|
|
45
|
+
* it (`ProductionGlassRuntime.replaceFailedSourcePixels`), so a failure is reported once per
|
|
46
|
+
* attempt and never retried in a loop. Canvas readbacks do not use the worker and still work. */
|
|
47
|
+
get failed() {
|
|
48
|
+
return !!this.failure;
|
|
49
|
+
}
|
|
50
|
+
fail(error) {
|
|
51
|
+
this.failure = error;
|
|
52
|
+
this.worker?.terminate();
|
|
53
|
+
this.worker = undefined;
|
|
54
|
+
reportGlassError('worker-startup', error, 'source upload worker');
|
|
55
|
+
for (const job of this.pending.values()) {
|
|
56
|
+
clearTimeout(job.timer);
|
|
57
|
+
job.reject(error);
|
|
58
|
+
}
|
|
59
|
+
this.pending.clear();
|
|
60
|
+
}
|
|
61
|
+
/** Stage `image`'s premultiplied bytes for its upload (`takeSourcePixels`). When `capture` is a
|
|
62
|
+
* canvas it is read back here (see the class comment) and the rest of this comment does not apply.
|
|
63
|
+
*
|
|
64
|
+
* The upload worker needs a bitmap of its own (a transferred bitmap is gone from this thread,
|
|
65
|
+
* and the renderer keeps `image` to restore a lost device). `capture` is what that second bitmap
|
|
66
|
+
* is taken from: pass the canvas `image` was snapshotted from, unchanged since. A second
|
|
67
|
+
* snapshot of the canvas took under 3 ms. Copying the snapshot itself
|
|
68
|
+
* (`createImageBitmap(image)`, the default) blocked the main thread for 5 to 6 ms per megabyte
|
|
69
|
+
* in WebKit (157 ms for a 1320 x 5091 capture in the Catalyst host), more than half of the
|
|
70
|
+
* stage. Measured for captures up to 1320 x 6495; the cause inside WebKit was not sampled. */
|
|
71
|
+
async prepare(image, capture = image) {
|
|
72
|
+
const readbackStarted = glassNow();
|
|
73
|
+
const pixels = canvasPixels(capture);
|
|
74
|
+
if (pixels) {
|
|
75
|
+
const canvas = capture;
|
|
76
|
+
// The bytes are uploaded at the image's row length: they must be that image.
|
|
77
|
+
if (canvas.width !== image.width || canvas.height !== image.height)
|
|
78
|
+
throw Error(`Glass capture canvas ${canvas.width}x${canvas.height} is not its ${image.width}x${image.height} image`);
|
|
79
|
+
keepSourcePixels(image, pixels);
|
|
80
|
+
glassTiming('source-readback', readbackStarted, `${image.width}x${image.height}`);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (this.failure)
|
|
84
|
+
throw this.failure;
|
|
85
|
+
if (!this.worker) {
|
|
86
|
+
this.worker = this.create();
|
|
87
|
+
this.worker.onmessage = event => {
|
|
88
|
+
const data = event.data;
|
|
89
|
+
if (data.id === 0 && data.error) {
|
|
90
|
+
this.fail(Error(data.error));
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const job = this.pending.get(data.id);
|
|
94
|
+
if (!job)
|
|
95
|
+
return;
|
|
96
|
+
this.pending.delete(data.id);
|
|
97
|
+
clearTimeout(job.timer);
|
|
98
|
+
if (data.error) {
|
|
99
|
+
job.reject(Error(data.error));
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (!(data.buffer instanceof ArrayBuffer) ||
|
|
103
|
+
data.width !== job.image.width ||
|
|
104
|
+
data.height !== job.image.height ||
|
|
105
|
+
data.buffer.byteLength !== job.image.width * job.image.height * 4) {
|
|
106
|
+
job.reject(Error('Source upload worker returned invalid pixel dimensions'));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
prepared.set(job.image, new Uint8Array(data.buffer));
|
|
110
|
+
job.resolve();
|
|
111
|
+
};
|
|
112
|
+
this.worker.onerror = event => this.fail(Error(event.message || 'Source upload worker failed'));
|
|
113
|
+
this.worker.onmessageerror = () => this.fail(Error('Source upload worker reply could not be decoded'));
|
|
114
|
+
}
|
|
115
|
+
const started = glassNow(), clone = await createImageBitmap(capture);
|
|
116
|
+
if (this.failure) {
|
|
117
|
+
clone.close();
|
|
118
|
+
throw this.failure;
|
|
119
|
+
}
|
|
120
|
+
const id = ++this.next;
|
|
121
|
+
try {
|
|
122
|
+
await new Promise((resolve, reject) => {
|
|
123
|
+
const timer = setTimeout(() => this.fail(Error('Source upload worker exceeded 10 seconds')), 10000);
|
|
124
|
+
this.pending.set(id, { image, resolve, reject, timer });
|
|
125
|
+
try {
|
|
126
|
+
this.worker.postMessage({ id, bitmap: clone }, [clone]);
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
clone.close();
|
|
130
|
+
this.pending.delete(id);
|
|
131
|
+
clearTimeout(timer);
|
|
132
|
+
reject(error);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
finally {
|
|
137
|
+
glassTiming('source-worker-upload', started, `${image.width}x${image.height}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { glassDeviceLimits } from './deviceLimits.js';
|
|
2
|
+
// No 2D getImageData: unpremultiply/premultiply changes translucent edge bytes.
|
|
3
|
+
const scope = globalThis;
|
|
4
|
+
let gpu, serial = Promise.resolve();
|
|
5
|
+
function device() {
|
|
6
|
+
return (gpu ??= (async () => {
|
|
7
|
+
const adapter = await navigator.gpu.requestAdapter();
|
|
8
|
+
if (!adapter)
|
|
9
|
+
throw Error('Source upload worker has no WebGPU adapter');
|
|
10
|
+
const result = await adapter.requestDevice({ requiredLimits: glassDeviceLimits(adapter) });
|
|
11
|
+
result.lost.then(info => scope.postMessage({
|
|
12
|
+
id: 0,
|
|
13
|
+
error: `Source upload device lost: ${info.reason} ${info.message}`,
|
|
14
|
+
}));
|
|
15
|
+
result.addEventListener('uncapturederror', event => scope.postMessage({
|
|
16
|
+
id: 0,
|
|
17
|
+
error: `Source upload GPU error: ${event.error.message}`,
|
|
18
|
+
}));
|
|
19
|
+
return result;
|
|
20
|
+
})());
|
|
21
|
+
}
|
|
22
|
+
scope.onmessage = ({ data: { id, bitmap } }) => {
|
|
23
|
+
serial = serial.then(async () => {
|
|
24
|
+
let texture, buffer, mapped = false;
|
|
25
|
+
try {
|
|
26
|
+
const gpu = await device(), width = bitmap.width, height = bitmap.height, pitch = Math.ceil((width * 4) / 256) * 256;
|
|
27
|
+
texture = gpu.createTexture({
|
|
28
|
+
size: [width, height],
|
|
29
|
+
format: 'rgba8unorm',
|
|
30
|
+
usage: GPUTextureUsage.COPY_DST |
|
|
31
|
+
GPUTextureUsage.COPY_SRC |
|
|
32
|
+
GPUTextureUsage.TEXTURE_BINDING |
|
|
33
|
+
GPUTextureUsage.RENDER_ATTACHMENT,
|
|
34
|
+
});
|
|
35
|
+
gpu.queue.copyExternalImageToTexture({ source: bitmap }, { texture, premultipliedAlpha: true, colorSpace: 'srgb' }, [width, height]);
|
|
36
|
+
buffer = gpu.createBuffer({
|
|
37
|
+
size: pitch * height,
|
|
38
|
+
usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ,
|
|
39
|
+
});
|
|
40
|
+
const encoder = gpu.createCommandEncoder();
|
|
41
|
+
encoder.copyTextureToBuffer({ texture }, { buffer, bytesPerRow: pitch }, [width, height]);
|
|
42
|
+
gpu.queue.submit([encoder.finish()]);
|
|
43
|
+
await buffer.mapAsync(GPUMapMode.READ);
|
|
44
|
+
mapped = true;
|
|
45
|
+
const source = new Uint8Array(buffer.getMappedRange()), bytes = new Uint8Array(width * height * 4);
|
|
46
|
+
for (let y = 0; y < height; y++)
|
|
47
|
+
bytes.set(source.subarray(y * pitch, y * pitch + width * 4), y * width * 4);
|
|
48
|
+
scope.postMessage({ id, width, height, buffer: bytes.buffer }, [bytes.buffer]);
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
scope.postMessage({ id, error: String(error) });
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
if (mapped)
|
|
55
|
+
buffer?.unmap();
|
|
56
|
+
buffer?.destroy();
|
|
57
|
+
texture?.destroy();
|
|
58
|
+
bitmap.close();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** The vertical band of the sample rectangle that a layered ink plane stores. Ink lives only
|
|
2
|
+
* inside the bar frame; the backdrop's vertical overscan (128 pt each side) never holds any, so
|
|
3
|
+
* storing it would make two planes cost twice the flat atlas instead of about half of it. */
|
|
4
|
+
export declare function tabInkBand(spec: {
|
|
5
|
+
sampleInsetY: number;
|
|
6
|
+
frameHeight: number;
|
|
7
|
+
}, resolution: number): {
|
|
8
|
+
top: number;
|
|
9
|
+
pixels: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
/** Complete semantic ink planes share one cached texture and one foreground composition.
|
|
13
|
+
* The legacy flat atlas remains available to optical fixtures and non-tab controls. */
|
|
14
|
+
export declare const tabGlyphInkShader = "\nfn tabInkSample(uv: vec2<f32>, label: f32) -> vec4<f32> {\n if (global.uGlyphLayers_slot.x == 0.0) {\n return textureSample(uGlyphSource_texture, sourceSampler, clamp(uv, vec2(0.0), vec2(1.0)));\n }\n let size = vec2<f32>(textureDimensions(uGlyphSource_texture));\n let halfTexel = 0.5 / size;\n // Each plane stores only its band of the sample rectangle (tabInkBand): y = band top, scale.\n let band = (uv.y - global.uGlyphLayers_slot.y) * global.uGlyphLayers_slot.z;\n // Each plane has its own transparent border. Filtering must never reach the other plane.\n let point = vec2<f32>(uv.x, (band + label) * 0.5);\n let low = vec2<f32>(halfTexel.x, label * 0.5 + halfTexel.y);\n let high = vec2<f32>(1.0 - halfTexel.x, (label + 1.0) * 0.5 - halfTexel.y);\n return textureSample(uGlyphSource_texture, sourceSampler, clamp(point, low, high));\n}\n\nfn tabInkPlane(point: vec2<f32>, local: vec2<f32>, rimShift: vec2<f32>, outward: vec2<f32>,\n inside: f32, label: f32) -> vec4<f32> {\n let response = clamp(global.uForegroundChroma_slot.x / 255.0, 0.0, 1.0);\n let scale = vec2<f32>(\n 1.0 + mix(global.uForegroundScaleX_slot.x, global.uForegroundLabelScaleX_slot.x, label),\n 1.0 + mix(global.uForegroundScaleY_slot.x, global.uForegroundLabelScaleY_slot.x, label));\n let anchors = global.uGlyphAnchors_slot.xy;\n let shape = global.uShape_slot;\n let last = max(0.0, global.uGlyphCount_slot.x - 1.0);\n let spacing = max(1.0, (anchors.y - anchors.x) / max(1.0, last));\n let index = clamp(floor((point.x - anchors.x) / spacing + 0.5), 0.0, last);\n let anchor = anchors.x + index * spacing;\n let edgeShift = max(0.0, anchors.x - shape.x) - max(0.0, shape.x - anchors.y);\n // Ink refracts with the backdrop: the rim term is the lens's own continuous displacement,\n // zero in the flat interior. It never depends on travel direction, so a glyph straddling\n // the rim is squeezed into the rim band like native, never translated out of the lens.\n let source = vec2<f32>(anchor + (point.x - anchor) / scale.x, shape.y + local.y / scale.y) + rimShift;\n let shift = mix(global.uForegroundShiftPt_slot.x, global.uForegroundShiftPt_slot.y, label);\n let resolution = global.uResolution_slot.xy;\n let uv = (source + vec2<f32>(edgeShift / scale.x - shift * global.uMotionMix_slot.x, 0.0)) / resolution;\n let soften = outward * 0.75 * abs(outward.x) * exp(-inside / 6.0) * response / resolution;\n let center = tabInkSample(uv, label);\n // Flat interior/top/bottom regions have no horizontal edge softening. The five old reads\n // were identical there. Keep the fitted filter at curved edges, without redundant reads.\n if (all(soften == vec2(0.0))) { return center; }\n return center * 0.4 +\n (tabInkSample(uv + soften * 0.5, label) + tabInkSample(uv - soften * 0.5, label)) * 0.24 +\n (tabInkSample(uv + soften, label) + tabInkSample(uv - soften, label)) * 0.06;\n}\n\nfn tabGlyphInk(point: vec2<f32>, local: vec2<f32>, rimShift: vec2<f32>, outward: vec2<f32>,\n inside: f32) -> vec4<f32> {\n var ink: vec4<f32>;\n if (global.uGlyphLayers_slot.x > 0.0) {\n let icon = tabInkPlane(point, local, rimShift, outward, inside, 0.0);\n let label = tabInkPlane(point, local, rimShift, outward, inside, 1.0);\n ink = label + icon * (1.0 - label.a);\n } else {\n ink = tabInkPlane(point, local, rimShift, outward, inside, step(global.uDockShape_slot.y, point.y));\n }\n ink = vec4<f32>(ink.r, clamp(ink.gb + global.uGlyphVibrancy_slot.xy * ink.a *\n global.uMotionMix_slot.x, vec2(0.0), vec2(ink.a)), ink.a);\n return ink;\n}\n";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** Transparent border kept above and below the bar frame in each layered ink plane. */
|
|
2
|
+
const TAB_INK_MARGIN_PT = 8;
|
|
3
|
+
/** The vertical band of the sample rectangle that a layered ink plane stores. Ink lives only
|
|
4
|
+
* inside the bar frame; the backdrop's vertical overscan (128 pt each side) never holds any, so
|
|
5
|
+
* storing it would make two planes cost twice the flat atlas instead of about half of it. */
|
|
6
|
+
export function tabInkBand(spec, resolution) {
|
|
7
|
+
const pixels = Math.ceil((spec.frameHeight + TAB_INK_MARGIN_PT * 2) * resolution);
|
|
8
|
+
return { top: spec.sampleInsetY - TAB_INK_MARGIN_PT, pixels, height: pixels / resolution };
|
|
9
|
+
}
|
|
10
|
+
/** Complete semantic ink planes share one cached texture and one foreground composition.
|
|
11
|
+
* The legacy flat atlas remains available to optical fixtures and non-tab controls. */
|
|
12
|
+
export const tabGlyphInkShader = /* wgsl */ `
|
|
13
|
+
fn tabInkSample(uv: vec2<f32>, label: f32) -> vec4<f32> {
|
|
14
|
+
if (global.uGlyphLayers_slot.x == 0.0) {
|
|
15
|
+
return textureSample(uGlyphSource_texture, sourceSampler, clamp(uv, vec2(0.0), vec2(1.0)));
|
|
16
|
+
}
|
|
17
|
+
let size = vec2<f32>(textureDimensions(uGlyphSource_texture));
|
|
18
|
+
let halfTexel = 0.5 / size;
|
|
19
|
+
// Each plane stores only its band of the sample rectangle (tabInkBand): y = band top, scale.
|
|
20
|
+
let band = (uv.y - global.uGlyphLayers_slot.y) * global.uGlyphLayers_slot.z;
|
|
21
|
+
// Each plane has its own transparent border. Filtering must never reach the other plane.
|
|
22
|
+
let point = vec2<f32>(uv.x, (band + label) * 0.5);
|
|
23
|
+
let low = vec2<f32>(halfTexel.x, label * 0.5 + halfTexel.y);
|
|
24
|
+
let high = vec2<f32>(1.0 - halfTexel.x, (label + 1.0) * 0.5 - halfTexel.y);
|
|
25
|
+
return textureSample(uGlyphSource_texture, sourceSampler, clamp(point, low, high));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
fn tabInkPlane(point: vec2<f32>, local: vec2<f32>, rimShift: vec2<f32>, outward: vec2<f32>,
|
|
29
|
+
inside: f32, label: f32) -> vec4<f32> {
|
|
30
|
+
let response = clamp(global.uForegroundChroma_slot.x / 255.0, 0.0, 1.0);
|
|
31
|
+
let scale = vec2<f32>(
|
|
32
|
+
1.0 + mix(global.uForegroundScaleX_slot.x, global.uForegroundLabelScaleX_slot.x, label),
|
|
33
|
+
1.0 + mix(global.uForegroundScaleY_slot.x, global.uForegroundLabelScaleY_slot.x, label));
|
|
34
|
+
let anchors = global.uGlyphAnchors_slot.xy;
|
|
35
|
+
let shape = global.uShape_slot;
|
|
36
|
+
let last = max(0.0, global.uGlyphCount_slot.x - 1.0);
|
|
37
|
+
let spacing = max(1.0, (anchors.y - anchors.x) / max(1.0, last));
|
|
38
|
+
let index = clamp(floor((point.x - anchors.x) / spacing + 0.5), 0.0, last);
|
|
39
|
+
let anchor = anchors.x + index * spacing;
|
|
40
|
+
let edgeShift = max(0.0, anchors.x - shape.x) - max(0.0, shape.x - anchors.y);
|
|
41
|
+
// Ink refracts with the backdrop: the rim term is the lens's own continuous displacement,
|
|
42
|
+
// zero in the flat interior. It never depends on travel direction, so a glyph straddling
|
|
43
|
+
// the rim is squeezed into the rim band like native, never translated out of the lens.
|
|
44
|
+
let source = vec2<f32>(anchor + (point.x - anchor) / scale.x, shape.y + local.y / scale.y) + rimShift;
|
|
45
|
+
let shift = mix(global.uForegroundShiftPt_slot.x, global.uForegroundShiftPt_slot.y, label);
|
|
46
|
+
let resolution = global.uResolution_slot.xy;
|
|
47
|
+
let uv = (source + vec2<f32>(edgeShift / scale.x - shift * global.uMotionMix_slot.x, 0.0)) / resolution;
|
|
48
|
+
let soften = outward * 0.75 * abs(outward.x) * exp(-inside / 6.0) * response / resolution;
|
|
49
|
+
let center = tabInkSample(uv, label);
|
|
50
|
+
// Flat interior/top/bottom regions have no horizontal edge softening. The five old reads
|
|
51
|
+
// were identical there. Keep the fitted filter at curved edges, without redundant reads.
|
|
52
|
+
if (all(soften == vec2(0.0))) { return center; }
|
|
53
|
+
return center * 0.4 +
|
|
54
|
+
(tabInkSample(uv + soften * 0.5, label) + tabInkSample(uv - soften * 0.5, label)) * 0.24 +
|
|
55
|
+
(tabInkSample(uv + soften, label) + tabInkSample(uv - soften, label)) * 0.06;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
fn tabGlyphInk(point: vec2<f32>, local: vec2<f32>, rimShift: vec2<f32>, outward: vec2<f32>,
|
|
59
|
+
inside: f32) -> vec4<f32> {
|
|
60
|
+
var ink: vec4<f32>;
|
|
61
|
+
if (global.uGlyphLayers_slot.x > 0.0) {
|
|
62
|
+
let icon = tabInkPlane(point, local, rimShift, outward, inside, 0.0);
|
|
63
|
+
let label = tabInkPlane(point, local, rimShift, outward, inside, 1.0);
|
|
64
|
+
ink = label + icon * (1.0 - label.a);
|
|
65
|
+
} else {
|
|
66
|
+
ink = tabInkPlane(point, local, rimShift, outward, inside, step(global.uDockShape_slot.y, point.y));
|
|
67
|
+
}
|
|
68
|
+
ink = vec4<f32>(ink.r, clamp(ink.gb + global.uGlyphVibrancy_slot.xy * ink.a *
|
|
69
|
+
global.uMotionMix_slot.x, vec2(0.0), vec2(ink.a)), ink.a);
|
|
70
|
+
return ink;
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GlassTouchLight } from '../renderSpecs.js';
|
|
2
|
+
import type { Values } from './passes.js';
|
|
3
|
+
/** The material kernel consumes the field in its sampling texture's CSS coordinates. */
|
|
4
|
+
export declare function touchLightUniforms(light: GlassTouchLight | undefined, insetX: number, insetY: number): Values;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The material kernel consumes the field in its sampling texture's CSS coordinates. */
|
|
2
|
+
export function touchLightUniforms(light, insetX, insetY) {
|
|
3
|
+
if (!light)
|
|
4
|
+
return { uTouchLight: [0, 0, 1, 0], uTouchLightColour: [1, 1, 1, 0] };
|
|
5
|
+
if (![light.x, light.y, light.radius, light.intensity, ...light.colour].every(Number.isFinite) ||
|
|
6
|
+
light.radius <= 0 ||
|
|
7
|
+
light.intensity < 0 ||
|
|
8
|
+
light.intensity > 1 ||
|
|
9
|
+
light.colour.some(channel => channel < 0 || channel > 1))
|
|
10
|
+
throw Error('Invalid glass touch light');
|
|
11
|
+
return {
|
|
12
|
+
uTouchLight: [light.x + insetX, light.y + insetY, light.radius, light.intensity],
|
|
13
|
+
uTouchLightColour: [...light.colour, 0],
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GlassLayer } from '../webgpu/layers.js';
|
|
2
|
+
import type { Request } from './protocol.js';
|
|
3
|
+
export declare class WorkerGlassClient {
|
|
4
|
+
private worker?;
|
|
5
|
+
private nextId;
|
|
6
|
+
private pending;
|
|
7
|
+
private failed?;
|
|
8
|
+
private frames;
|
|
9
|
+
backend: 'webgpu';
|
|
10
|
+
private visibility;
|
|
11
|
+
readonly work: {
|
|
12
|
+
at: number;
|
|
13
|
+
ms: number;
|
|
14
|
+
}[];
|
|
15
|
+
init(canvas: HTMLCanvasElement, resolution: number): Promise<void>;
|
|
16
|
+
private initialize;
|
|
17
|
+
attachLayer(canvas: HTMLCanvasElement, layer: GlassLayer): Promise<unknown>;
|
|
18
|
+
request(request: Request, transfer?: Transferable[]): Promise<unknown>;
|
|
19
|
+
pose(x: number, at: number): void;
|
|
20
|
+
park(): Promise<unknown>;
|
|
21
|
+
}
|