@mkbabb/glass-ui 3.13.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/CardAction-CW7a0m8M.js +253 -0
- package/dist/{CommandShortcut-RowNEO6i.js → CommandShortcut-DvZNQ_HF.js} +58 -53
- package/dist/ConfiguratorRow-BR4l-ixA.js +143 -0
- package/dist/{ContextMenuContent-CT3AS1WX.js → ContextMenuContent-uWnVxDab.js} +1 -1
- package/dist/{ContextMenuSubContent-BQmxTAdw.js → ContextMenuSubContent-xol4sD2q.js} +32 -37
- package/dist/{DataTable-BCddn3T3.js → DataTable-CuKwF7wr.js} +99 -97
- package/dist/DialogContent-DcKK8k9i.js +103 -0
- package/dist/{DialogFooter-Blu4t7tJ.js → DialogFooter-BZNX5aVr.js} +3 -3
- package/dist/FadingScroll-DI6hQhT9.js +76 -0
- package/dist/{HoverCardContent-Csywg3YF.js → HoverCardContent-b2uaAMRR.js} +1 -1
- package/dist/{HoverPopover-CISOJQuZ.js → HoverPopover-CbqbNwgU.js} +2 -2
- package/dist/IconChip-BTD-nay5.js +55 -0
- package/dist/{IconTooltip-DPzE09X9.js → IconTooltip-Bl8gFZ8d.js} +1 -1
- package/dist/{Input-DWQQIOC4.js → Input-h9v5LeXf.js} +1 -1
- package/dist/{MetricBadge-C9QMz1KT.js → MetricBadge-RHdBP72w.js} +1 -1
- package/dist/Notification-VUwexFUf.js +43 -0
- package/dist/NumberFieldContent-Cq7EzX-U.js +138 -0
- package/dist/PopoverContent-DL7E6vJP.js +127 -0
- package/dist/{Progress-DwlUKGbr.js → Progress-DctG61iZ.js} +98 -78
- package/dist/{ScrollingText-DfFrwSph.js → ScrollingText-yOpBzFYq.js} +2 -2
- package/dist/{SelectScrollDownButton-CiDUxfEj.js → SelectScrollDownButton-CrA8F0iV.js} +35 -20
- package/dist/{Switch-CsIuYP_e.js → Switch-CwYNf8bo.js} +1 -1
- package/dist/Toaster-Bw4xR8xV.js +274 -0
- package/dist/{ToggleGroupItem-D_AHlRw9.js → ToggleGroupItem-pEM9vIhs.js} +50 -37
- package/dist/{TooltipProvider-B3MkB_8P.js → TooltipProvider-rzvnXz60.js} +1 -1
- package/dist/animated-digit.js +2 -2
- package/dist/api/index.d.ts +16 -8
- package/dist/api/types-extra.d.ts +6 -0
- package/dist/api.js +2 -2
- package/dist/aurora.js +888 -230
- package/dist/badge.js +1 -1
- package/dist/border-progress.d.ts +1 -0
- package/dist/border-progress.js +106 -0
- package/dist/button-DYCUa-tH.js +126 -0
- package/dist/button.js +1 -1
- package/dist/canvas.js +2 -2
- package/dist/card.js +2 -2
- package/dist/carousel.d.ts +1 -1
- package/dist/carousel.js +90 -151
- package/dist/collapsible.js +1 -1
- package/dist/color-swatch.d.ts +1 -0
- package/dist/color-swatch.js +47 -0
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/compile-CQEFRTmx.js +19 -0
- package/dist/components/custom/aurora/composables/atoms-fields.d.ts +39 -0
- package/dist/components/custom/aurora/composables/auroraFallbackGround.d.ts +108 -0
- package/dist/components/custom/aurora/composables/runtime.d.ts +19 -0
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +5 -1
- package/dist/components/custom/aurora/composables/uniformBridgeWGPU.d.ts +51 -0
- package/dist/components/custom/aurora/composables/wgpuSetup.d.ts +29 -0
- package/dist/components/custom/aurora/constants/budget.d.ts +21 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +30 -2
- package/dist/components/custom/aurora/constants/renderMode.d.ts +63 -10
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/oil-modes.glsl.d.ts +1 -0
- package/dist/components/custom/aurora/constants/shaders/procedural-color.wgsl.d.ts +4 -0
- package/dist/components/custom/aurora/index.d.ts +3 -2
- package/dist/components/custom/border-progress/BorderProgress.vue.d.ts +46 -0
- package/dist/components/custom/border-progress/composables/useBorderSpectrum.d.ts +22 -0
- package/dist/components/custom/border-progress/constants.d.ts +59 -0
- package/dist/components/custom/border-progress/index.d.ts +4 -0
- package/dist/components/custom/color-swatch/ColorSwatch.vue.d.ts +22 -0
- package/dist/components/custom/color-swatch/index.d.ts +1 -0
- package/dist/components/custom/concentric/Concentric.vue.d.ts +39 -0
- package/dist/components/custom/concentric/composables/concentricGLSetup.d.ts +11 -0
- package/dist/components/custom/concentric/composables/concentricWGPUSetup.d.ts +13 -0
- package/dist/components/custom/concentric/composables/ringField.d.ts +44 -0
- package/dist/components/custom/concentric/composables/uniformBridgeWGPU.d.ts +13 -0
- package/dist/components/custom/concentric/composables/useConcentric.d.ts +35 -0
- package/dist/components/custom/concentric/constants.d.ts +43 -0
- package/dist/components/custom/concentric/index.d.ts +5 -0
- package/dist/components/custom/concentric/shaders/concentric.glsl.d.ts +4 -0
- package/dist/components/custom/concentric/shaders/concentric.wgsl.d.ts +1 -0
- package/dist/components/custom/configurator/Configurator.vue.d.ts +19 -8
- package/dist/components/custom/constellation/Constellation.vue.d.ts +18 -206
- package/dist/components/custom/constellation/composables/useConstellation.d.ts +26 -0
- package/dist/components/custom/constellation/constellationField.d.ts +2 -369
- package/dist/components/custom/constellation/constellationTypes.d.ts +369 -0
- package/dist/components/custom/constellation/index.d.ts +1 -1
- package/dist/components/custom/dock/DockIconButton.vue.d.ts +13 -4
- package/dist/components/custom/dock/DockLayerGroup.vue.d.ts +10 -2
- package/dist/components/custom/dock/DockRail.vue.d.ts +17 -16
- package/dist/components/custom/dock/DockSection.vue.d.ts +69 -0
- package/dist/components/custom/dock/DockSeparator.vue.d.ts +49 -1
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +5 -5
- package/dist/components/custom/dock/composables/dockMorphMeasure.d.ts +75 -0
- package/dist/components/custom/dock/composables/useLayerTransition.d.ts +13 -0
- package/dist/components/custom/dock/constants.d.ts +35 -0
- package/dist/components/custom/dock/index.d.ts +2 -0
- package/dist/components/custom/dot-flow-field/DotFlowField.vue.d.ts +38 -0
- package/dist/components/custom/dot-flow-field/composables/flowField.d.ts +41 -0
- package/dist/components/custom/dot-flow-field/composables/uniformBridgeWGPU.d.ts +24 -0
- package/dist/components/custom/dot-flow-field/composables/useDotFlowField.d.ts +34 -0
- package/dist/components/custom/dot-flow-field/composables/useFlowParticles.d.ts +18 -0
- package/dist/components/custom/dot-flow-field/constants.d.ts +48 -0
- package/dist/components/custom/dot-flow-field/index.d.ts +5 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.compute.wgsl.d.ts +1 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.glsl.d.ts +20 -0
- package/dist/components/custom/dot-flow-field/shaders/flow-field.render.wgsl.d.ts +1 -0
- package/dist/components/custom/easing/EasingConfigurator.vue.d.ts +33 -0
- package/dist/components/custom/easing/EasingPicker.vue.d.ts +49 -0
- package/dist/components/custom/easing/composables/useEasingPicker.d.ts +75 -0
- package/dist/components/custom/easing/constants.d.ts +28 -0
- package/dist/components/custom/easing/index.d.ts +3 -0
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +10 -0
- package/dist/components/custom/fading-scroll/FadingScroll.vue.d.ts +25 -0
- package/dist/components/custom/fading-scroll/composables/useFadingScroll.d.ts +31 -0
- package/dist/components/custom/fading-scroll/constants.d.ts +19 -0
- package/dist/components/custom/fading-scroll/index.d.ts +2 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +19 -2
- package/dist/components/custom/fourier-field/composables/useFourierField.d.ts +39 -0
- package/dist/components/custom/fourier-field/constants.d.ts +7 -0
- package/dist/components/custom/fourier-field/index.d.ts +1 -1
- package/dist/components/custom/fourier-field/math.d.ts +17 -0
- package/dist/components/custom/glass-panel/GlassPanel.vue.d.ts +9 -1
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +4 -2
- package/dist/components/custom/goo-blob/composables/uniformBridgeWGPU.d.ts +24 -0
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +29 -12
- package/dist/components/custom/goo-blob/composables/wgpuSetup.d.ts +23 -0
- package/dist/components/custom/goo-blob/constants.d.ts +6 -1
- package/dist/components/custom/goo-blob/shaders/metaball.wgsl.d.ts +1 -0
- package/dist/components/custom/handmark/HandMark.vue.d.ts +29 -0
- package/dist/components/custom/handmark/brush.d.ts +269 -0
- package/dist/components/custom/handmark/composables/useHandMark.d.ts +89 -0
- package/dist/components/custom/handmark/constants.d.ts +39 -0
- package/dist/components/custom/handmark/freehand.d.ts +69 -0
- package/dist/components/custom/handmark/geometry.d.ts +52 -0
- package/dist/components/custom/handmark/index.d.ts +27 -0
- package/dist/components/custom/handmark/ink.d.ts +11 -0
- package/dist/components/custom/handmark/texture.d.ts +39 -0
- package/dist/components/custom/handmark/types.d.ts +62 -0
- package/dist/components/custom/icon-chip/IconChip.vue.d.ts +4 -0
- package/dist/components/custom/icon-chip/index.d.ts +2 -0
- package/dist/components/custom/icon-chip/types.d.ts +82 -0
- package/dist/components/custom/instrument-chassis/InstrumentChassis.vue.d.ts +17 -2
- package/dist/components/custom/metric-stack/MetricStack.vue.d.ts +1 -1
- package/dist/components/custom/pager-dots/PagerDots.vue.d.ts +39 -0
- package/dist/components/custom/pager-dots/index.d.ts +2 -0
- package/dist/components/custom/spa-view/SpaView.vue.d.ts +50 -0
- package/dist/components/custom/spa-view/index.d.ts +2 -0
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +29 -24
- package/dist/components/custom/tabs/composables/useTabDragMorph.d.ts +42 -0
- package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +30 -21
- package/dist/components/custom/tabs/constants.d.ts +9 -3
- package/dist/components/custom/tabs/index.d.ts +1 -1
- package/dist/components/custom/watercolor-dot/WatercolorDot.vue.d.ts +15 -1
- package/dist/components/ui/_shared/index.d.ts +2 -0
- package/dist/components/ui/_shared/menuItemVariants.d.ts +19 -0
- package/dist/components/ui/_shared/useSurfaceAxis.d.ts +41 -0
- package/dist/components/ui/badge/index.d.ts +1 -1
- package/dist/components/ui/button/Button.vue.d.ts +5 -2
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/card/Card.vue.d.ts +34 -4
- package/dist/components/ui/card/CardHeader.vue.d.ts +42 -16
- package/dist/components/ui/card/ScrollCard.vue.d.ts +33 -0
- package/dist/components/ui/card/ScrollCardHeader.vue.d.ts +17 -0
- package/dist/components/ui/card/index.d.ts +2 -0
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +2 -2
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +2 -2
- package/dist/components/ui/carousel/GlassCarouselPager.vue.d.ts +2 -2
- package/dist/components/ui/carousel/index.d.ts +0 -1
- package/dist/components/ui/command/Command.vue.d.ts +4 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +8 -3
- package/dist/components/ui/drawer/Drawer.vue.d.ts +46 -33
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +12 -8
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +2 -2
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +1 -1
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +2 -2
- package/dist/components/ui/drawer/composables/drawerSnapContext.d.ts +26 -0
- package/dist/components/ui/drawer/composables/useDrawerSnap.d.ts +17 -0
- package/dist/components/ui/drawer/constants.d.ts +45 -0
- package/dist/components/ui/drawer/index.d.ts +23 -15
- package/dist/components/ui/focus-scope/FocusScope.vue.d.ts +20 -0
- package/dist/components/ui/focus-scope/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts +1 -1
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +3 -0
- package/dist/components/ui/progress/ProgressDefault.vue.d.ts +3 -2
- package/dist/components/ui/progress/ProgressSectioned.vue.d.ts +14 -3
- package/dist/components/ui/select/SelectContent.vue.d.ts +1 -1
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +27 -4
- package/dist/components/ui/sheet/SheetContent.vue.d.ts +6 -0
- package/dist/components/ui/sheet/index.d.ts +1 -1
- package/dist/components/ui/skeleton/Skeleton.vue.d.ts +3 -0
- package/dist/components/ui/tags-input/TagsInput.vue.d.ts +2 -2
- package/dist/components/ui/toast/Toast.vue.d.ts +5 -2
- package/dist/components/ui/toast/use-toast.d.ts +14 -0
- package/dist/components/ui/toggle/Toggle.vue.d.ts +1 -1
- package/dist/composables/dark/index.d.ts +1 -1
- package/dist/composables/dark/useGlobalDark.d.ts +23 -1
- package/dist/composables/glass/canvas2d/useCanvas2D.d.ts +13 -6
- package/dist/composables/glass/index.d.ts +5 -2
- package/dist/composables/glass/useSpecularPointer.d.ts +33 -0
- package/dist/composables/glass/useSpecularTracking.d.ts +20 -0
- package/dist/composables/glass/vSpecular.d.ts +2 -0
- package/dist/composables/glass/webgl/shaders/flow.glsl.d.ts +1 -0
- package/dist/composables/glass/webgl/useWebGLCanvas.d.ts +16 -0
- package/dist/composables/glass/webgpu/index.d.ts +2 -0
- package/dist/composables/glass/webgpu/useGpuSubstrate.d.ts +54 -0
- package/dist/composables/glass/webgpu/useWebGPUCanvas.d.ts +84 -0
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/composables/motion/index.d.ts +4 -0
- package/dist/composables/motion/useDockCtaReceive.d.ts +59 -0
- package/dist/composables/motion/useDragMorph.d.ts +77 -0
- package/dist/composables/motion/useLiquidFlex.d.ts +11 -0
- package/dist/composables/motion/useLiquidPress.d.ts +71 -0
- package/dist/composables/motion/useLiquidReveal.d.ts +51 -0
- package/dist/composables/motion/useNumericTransition.d.ts +3 -3
- package/dist/composables/motion/usePointerVelocityField.d.ts +98 -0
- package/dist/composables/motion/useViewTransition.d.ts +36 -1
- package/dist/concentric.d.ts +1 -0
- package/dist/concentric.js +562 -0
- package/dist/configurator.js +3 -2
- package/dist/confirm-dialog.js +22 -24
- package/dist/constellation.js +93 -95
- package/dist/context-menu.js +3 -3
- package/dist/controls.js +10 -4
- package/dist/createCanvasLifecycle-CHD5XrDW.js +82 -0
- package/dist/dark.d.ts +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dock.js +738 -442
- package/dist/{dockContext-BegmJVmx.js → dockContext-BNfyPLe9.js} +1 -1
- package/dist/dom.js +5 -5
- package/dist/dot-flow-field.d.ts +1 -0
- package/dist/dot-flow-field.js +604 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +380 -0
- package/dist/{dropdown-menu-DzkkyBwX.js → dropdown-menu-CofSZuk8.js} +14 -15
- package/dist/dropdown-menu.js +1 -1
- package/dist/easing.d.ts +1 -0
- package/dist/easing.js +463 -0
- package/dist/expandable-container.js +45 -38
- package/dist/fading-scroll.d.ts +1 -0
- package/dist/fading-scroll.js +2 -0
- package/dist/focus-scope.d.ts +1 -0
- package/dist/focus-scope.js +23 -0
- package/dist/forms.js +7 -7
- package/dist/fourier-field.js +135 -122
- package/dist/fourier-math.js +2 -2
- package/dist/glass-panel.js +39 -36
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +154 -362
- package/dist/goo-blob.js +838 -227
- package/dist/handmark.d.ts +1 -0
- package/dist/handmark.js +707 -0
- package/dist/header-ribbon.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/hover-popover.js +1 -1
- package/dist/icon-chip.d.ts +1 -0
- package/dist/icon-chip.js +2 -0
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/instrument-chassis.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/label.js +1 -1
- package/dist/labeled-field.js +6 -6
- package/dist/{math-U6-RrLmV.js → math-BINYmg5z.js} +11 -3
- package/dist/{menuItemVariants-DPiEarb0.js → menuItemVariants-D8VNHq22.js} +10 -4
- package/dist/metric-badge.js +1 -1
- package/dist/metric-cell.js +25 -22
- package/dist/metric-stack.js +4 -8
- package/dist/motion-core.js +36 -35
- package/dist/motion-curves.js +1 -1
- package/dist/motion.js +157 -55
- package/dist/notification.js +1 -1
- package/dist/number-field.js +1 -1
- package/dist/pager-dots.d.ts +1 -0
- package/dist/pager-dots.js +91 -0
- package/dist/paper-backdrop.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/{presets-BKVyQfbt.js → presets-BW2b-fr1.js} +14 -1
- package/dist/{compile-B7NGOBcP.js → procedural-color.glsl-CIFsJhwI.js} +1 -155
- package/dist/procedural-color.wgsl-CToRHugY.js +224 -0
- package/dist/progress.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +2 -2
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +10 -12
- package/dist/select.js +3 -3
- package/dist/separator.js +1 -1
- package/dist/sheet-tZMg0E0w.js +218 -0
- package/dist/sheet.js +1 -1
- package/dist/{slider-B-JP2JlI.js → slider-DVb4HXU-.js} +7 -7
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +3 -3
- package/dist/spa-view.d.ts +1 -0
- package/dist/spa-view.js +46 -0
- package/dist/styles/animations.css +40 -31
- package/dist/styles/border-progress.css +109 -0
- package/dist/styles/cards.css +76 -0
- package/dist/styles/components.css +1 -1
- package/dist/styles/configurator.css +35 -0
- package/dist/styles/critical-partition.mjs +140 -0
- package/dist/styles/critical.css +12 -0
- package/dist/styles/deferred.css +31 -0
- package/dist/styles/dock/density.css +64 -0
- package/dist/styles/dock/layers.css +54 -30
- package/dist/styles/dock/morph.css +124 -7
- package/dist/styles/dock/overflow.css +31 -2
- package/dist/styles/dock/rail-extend.css +168 -71
- package/dist/styles/dock/section.css +59 -0
- package/dist/styles/dock/shell.css +83 -16
- package/dist/styles/dock-controls/icon-button.css +11 -1
- package/dist/styles/dock-controls/tab-button.css +24 -83
- package/dist/styles/dock-controls/triggers.css +7 -0
- package/dist/styles/dock.css +38 -3
- package/dist/styles/drawer.css +127 -35
- package/dist/styles/feedback-tone.css +104 -0
- package/dist/styles/glass/deep.css +44 -0
- package/dist/styles/glass/ladder.css +154 -52
- package/dist/styles/glass/material.css +78 -15
- package/dist/styles/glass/reveal.css +136 -0
- package/dist/styles/glass/rim.css +100 -0
- package/dist/styles/glass/surface-axis.css +113 -0
- package/dist/styles/glass/surfaces.css +189 -15
- package/dist/styles/glass-refract.css +96 -44
- package/dist/styles/glass-specular-track.css +7 -0
- package/dist/styles/glass.css +8 -2
- package/dist/styles/hover-popover.css +7 -6
- package/dist/styles/icon-chip.css +211 -0
- package/dist/styles/index.css +78 -4
- package/dist/styles/instrument-chassis.css +107 -2
- package/dist/styles/menu.css +127 -0
- package/dist/styles/scroll-choreography.css +300 -0
- package/dist/styles/segmented-tabs.css +188 -86
- package/dist/styles/select.css +50 -0
- package/dist/styles/theme/bridges.css +22 -1
- package/dist/styles/theme/literals.css +11 -2
- package/dist/styles/theme/radius.css +6 -1
- package/dist/styles/tokens/color-radius.css +40 -13
- package/dist/styles/tokens/dark-arm.css +200 -20
- package/dist/styles/tokens/glass-deep.css +75 -0
- package/dist/styles/tokens/glass-fx.css +333 -0
- package/dist/styles/tokens/glass.css +95 -315
- package/dist/styles/tokens/light-dark.css +64 -22
- package/dist/styles/tokens/offsets.css +116 -0
- package/dist/styles/tokens/on-glass-fg.css +39 -0
- package/dist/styles/tokens/property-regs.css +130 -10
- package/dist/styles/tokens/scale-paper.css +155 -84
- package/dist/styles/tokens/scheme-motion.css +102 -46
- package/dist/styles/tokens/scroll-tokens.css +123 -0
- package/dist/styles/tokens/{offsets-sizing.css → sizing.css} +88 -89
- package/dist/styles/tokens.css +9 -3
- package/dist/styles/transitions.css +7 -7
- package/dist/styles/typography/scale.css +153 -0
- package/dist/styles/typography/semantic.css +220 -0
- package/dist/styles/typography/utilities.css +174 -0
- package/dist/styles/typography.css +23 -507
- package/dist/styles/utilities/a11y-overrides.css +33 -4
- package/dist/styles/utilities/animate.css +27 -24
- package/dist/styles/utilities/base-misc.css +255 -0
- package/dist/styles/utilities/base.css +100 -138
- package/dist/styles/utilities/btn.css +21 -202
- package/dist/styles/utilities/metal.css +189 -0
- package/dist/styles/utilities.css +14 -7
- package/dist/styles/view-transition.css +4 -1
- package/dist/switch.js +1 -1
- package/dist/tabs.js +275 -191
- package/dist/timeline.js +2 -2
- package/dist/toast.js +1 -1
- package/dist/toggle-chip.js +3 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-BfUq2bUM.js} +1 -1
- package/dist/useCanvas2D-B8w_E3Rr.js +83 -0
- package/dist/useConfiguratorState-DNlOh6c8.js +161 -0
- package/dist/useDragMorph-DgxnsVJz.js +102 -0
- package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-C28t0VWJ.js} +22 -3
- package/dist/useLiquidPress-kfb4KX79.js +39 -0
- package/dist/usePointerVelocityField-JbRd5CrM.js +137 -0
- package/dist/{useRAFLoop-Bxv0o6L5.js → useRAFLoop-UYa4zoiN.js} +1 -1
- package/dist/useSpring-C0jyvEJB.js +40 -0
- package/dist/useSpringMount-q1amq1SJ.js +71 -0
- package/dist/useSpringPress-BsqPr7FJ.js +34 -0
- package/dist/useSurfaceAxis-g0NloYEF.js +7 -0
- package/dist/{useTouchGate-Dg7MQI1G.js → useTouchGate-CBZTD4SD.js} +1 -1
- package/dist/vReveal-Czsb7zQC.js +10 -0
- package/dist/vSpecular-CQFmLNzA.js +68 -0
- package/dist/vendor-CKmzio-i.js +226 -0
- package/dist/watercolor-dot.js +12 -5
- package/package.json +193 -25
- package/src/styles/animations.css +40 -31
- package/src/styles/border-progress.css +109 -0
- package/src/styles/cards.css +76 -0
- package/src/styles/configurator.css +35 -0
- package/src/styles/critical-partition.mjs +140 -0
- package/src/styles/dock/density.css +64 -0
- package/src/styles/dock/layers.css +54 -30
- package/src/styles/dock/morph.css +124 -7
- package/src/styles/dock/overflow.css +31 -2
- package/src/styles/dock/rail-extend.css +168 -71
- package/src/styles/dock/section.css +59 -0
- package/src/styles/dock/shell.css +83 -16
- package/src/styles/dock-controls/icon-button.css +11 -1
- package/src/styles/dock-controls/tab-button.css +24 -83
- package/src/styles/dock-controls/triggers.css +7 -0
- package/src/styles/dock.css +38 -3
- package/src/styles/drawer.css +123 -35
- package/src/styles/feedback-tone.css +104 -0
- package/src/styles/glass/deep.css +44 -0
- package/src/styles/glass/ladder.css +154 -52
- package/src/styles/glass/material.css +78 -15
- package/src/styles/glass/reveal.css +136 -0
- package/src/styles/glass/rim.css +100 -0
- package/src/styles/glass/surface-axis.css +113 -0
- package/src/styles/glass/surfaces.css +189 -15
- package/src/styles/glass-refract.css +96 -44
- package/src/styles/glass-specular-track.css +7 -0
- package/src/styles/glass.css +8 -2
- package/src/styles/hover-popover.css +7 -6
- package/src/styles/icon-chip.css +211 -0
- package/src/styles/index.css +78 -4
- package/src/styles/instrument-chassis.css +107 -2
- package/src/styles/menu.css +127 -0
- package/src/styles/scroll-choreography.css +300 -0
- package/src/styles/segmented-tabs.css +184 -84
- package/src/styles/select.css +50 -0
- package/src/styles/theme/bridges.css +22 -1
- package/src/styles/theme/literals.css +11 -2
- package/src/styles/theme/radius.css +6 -1
- package/src/styles/tokens/color-radius.css +40 -13
- package/src/styles/tokens/dark-arm.css +200 -20
- package/src/styles/tokens/glass-deep.css +75 -0
- package/src/styles/tokens/glass-fx.css +333 -0
- package/src/styles/tokens/glass.css +95 -315
- package/src/styles/tokens/light-dark.css +64 -22
- package/src/styles/tokens/offsets.css +116 -0
- package/src/styles/tokens/on-glass-fg.css +39 -0
- package/src/styles/tokens/property-regs.css +130 -10
- package/src/styles/tokens/scale-paper.css +155 -84
- package/src/styles/tokens/scheme-motion.css +102 -46
- package/src/styles/tokens/scroll-tokens.css +123 -0
- package/src/styles/tokens/{offsets-sizing.css → sizing.css} +88 -89
- package/src/styles/tokens.css +9 -3
- package/src/styles/transitions.css +7 -7
- package/src/styles/typography/scale.css +153 -0
- package/src/styles/typography/semantic.css +220 -0
- package/src/styles/typography/utilities.css +174 -0
- package/src/styles/typography.css +23 -507
- package/src/styles/utilities/a11y-overrides.css +33 -4
- package/src/styles/utilities/animate.css +27 -24
- package/src/styles/utilities/base-misc.css +255 -0
- package/src/styles/utilities/base.css +100 -138
- package/src/styles/utilities/btn.css +21 -202
- package/src/styles/utilities/metal.css +189 -0
- package/src/styles/utilities.css +14 -7
- package/src/styles/view-transition.css +4 -1
- package/dist/CardAction-Cj2eycQ2.js +0 -157
- package/dist/DialogContent-Dl9WkAoS.js +0 -100
- package/dist/Notification-DdwNxIrI.js +0 -100
- package/dist/NumberFieldContent-CqaN-SvN.js +0 -145
- package/dist/PopoverContent-BYwt2-4x.js +0 -121
- package/dist/TabsList-Dttss653.js +0 -105
- package/dist/Toaster-D6q4HtXu.js +0 -263
- package/dist/button-ChXMfsud.js +0 -81
- package/dist/check-njhk-vfu.js +0 -7
- package/dist/chevron-down-DKkxb4VV.js +0 -7
- package/dist/chevron-right-CPXbqQQz.js +0 -7
- package/dist/chevron-up-n_24SqI-.js +0 -7
- package/dist/components/custom/underline/GlassUnderline.vue.d.ts +0 -84
- package/dist/components/custom/underline/index.d.ts +0 -2
- package/dist/components/custom/underline/types.d.ts +0 -56
- package/dist/components/ui/carousel/CarouselDots.vue.d.ts +0 -4
- package/dist/createLucideIcon-DydS2qgk.js +0 -43
- package/dist/minimize-2-BV31Ob_h.js +0 -38
- package/dist/search-BSGrf2Sk.js +0 -12
- package/dist/sheet-1fChZjtw.js +0 -214
- package/dist/underline.d.ts +0 -1
- package/dist/underline.js +0 -85
- package/dist/useCanvas2D-ClrQuZtp.js +0 -96
- package/dist/useConfiguratorState-DAoeHVue.js +0 -287
- package/dist/useSpecularTracking-Bo5su68i.js +0 -32
- package/dist/useSpringMount-CI2jOstM.js +0 -108
- package/dist/vReveal-CqaCz_mC.js +0 -44
- package/dist/x-BUwTKe50.js +0 -10
- /package/dist/{CollapsibleContent-CP9qF1v4.js → CollapsibleContent-68dEXIAl.js} +0 -0
- /package/dist/{InstrumentChassis-UUJX0-mW.js → InstrumentChassis-Bx0F_q5g.js} +0 -0
- /package/dist/{Label-r3WzWrsj.js → Label-C2ejNWeC.js} +0 -0
- /package/dist/{ModalOverlay-DVLI2VRr.js → ModalOverlay-D1VrWyoi.js} +0 -0
- /package/dist/{PaperBackdrop-DIXTtVq6.js → PaperBackdrop-Vf3tlpvd.js} +0 -0
- /package/dist/{SelectGroup-aumMgWLs.js → SelectGroup-DwwjicPY.js} +0 -0
- /package/dist/{SelectSeparator-BQ_1Fcbp.js → SelectSeparator-DXswVdRz.js} +0 -0
- /package/dist/{Separator-0JE6LtNu.js → Separator-pKF0oA4M.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-ok8pgSl5.js → _plugin-vue_export-helper-C1je1s0u.js} +0 -0
- /package/dist/{badge-UILT_3pZ.js → badge-D9XWW4GT.js} +0 -0
- /package/dist/{color-CUYeFbgd.js → color-DweYl7pE.js} +0 -0
- /package/dist/{constants-CS75AWHG.js → constants-BPOqYJAm.js} +0 -0
- /package/dist/{createContext-BM46COQ-.js → createContext-CpBNTRMI.js} +0 -0
- /package/dist/{prng-D27-B3tK.js → prng-Za0Rmgag.js} +0 -0
- /package/dist/{resolveCanvasColor-BBiYfp8g.js → resolveCanvasColor-CUyHr5Uu.js} +0 -0
- /package/dist/{springPresets--YdWTHtm.js → springPresets-CFQGQfdl.js} +0 -0
- /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-Bj4sPkMh.js} +0 -0
- /package/dist/{useInterval-iHludrxk.js → useInterval-CvK1mL92.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-BXWXOZ-9.js} +0 -0
- /package/dist/{useLiquidFlex-BL0lLLN2.js → useLiquidFlex-mZPMiNXh.js} +0 -0
- /package/dist/{useResizeObserver-BhgdhOIj.js → useResizeObserver-Bpoi7tRE.js} +0 -0
- /package/dist/{useResolveTokenColor-Dvn2RZJW.js → useResolveTokenColor-vAylyR0x.js} +0 -0
- /package/dist/{useScrollProgress-Dlvx-L3v.js → useScrollProgress-D7bYU2RK.js} +0 -0
- /package/dist/{useSortable-muI29agz.js → useSortable-DHjtZSEd.js} +0 -0
- /package/dist/{useTextHighlight-DmRYkOBx.js → useTextHighlight-CWEi25hf.js} +0 -0
- /package/dist/{useTimer-Dzarvzuk.js → useTimer-BHJOKr35.js} +0 -0
- /package/dist/{useUserInvalidAria-B2h6jAM_.js → useUserInvalidAria-y5namzeE.js} +0 -0
- /package/dist/{useViewportReady-B40FK4Pa.js → useViewportReady-anbac3m6.js} +0 -0
|
@@ -70,8 +70,27 @@ export interface AuroraRuntimeOptions {
|
|
|
70
70
|
* NOTE: this is the `useAurora` Vue-wrapper contract surface. The imperative
|
|
71
71
|
* `createAurora(...)` runtime throws on eager init failure and — for
|
|
72
72
|
* `instance.arm()` on the deferred path — rethrows from `arm()`.
|
|
73
|
+
*
|
|
74
|
+
* BB.W-AURORA-SWRASTER — a SOFTWARE-RASTER fall is NOT a contract violation:
|
|
75
|
+
* it never reaches `onInitError`. The wedge catch (see {@link createAurora})
|
|
76
|
+
* recognizes the software-raster signal at arm time, leaves the canvas
|
|
77
|
+
* un-armed (the placeholder stays the surface), and returns CLEANLY — so a
|
|
78
|
+
* consumer who pins `mode:"capture"`/`mode:"webgl"` under SwiftShader never
|
|
79
|
+
* has to wire `onInitError` to avoid the hang. The handler is preserved for
|
|
80
|
+
* GENUINE violations (a malformed shader, an OOM, a real link failure).
|
|
73
81
|
*/
|
|
74
82
|
onInitError?: (err: Error) => void;
|
|
83
|
+
/**
|
|
84
|
+
* BB.W-AURORA-SWRASTER — opt OUT of the runtime software-raster wedge catch.
|
|
85
|
+
* Default `false`: the wedge catch is the safe default — `createAurora`
|
|
86
|
+
* recognizes a software renderer at arm time and falls cleanly to the
|
|
87
|
+
* placeholder rather than arming the page-wedging live GL layer. `true` (the
|
|
88
|
+
* named, recorded escape for a deterministic test that ACCEPTS the cost)
|
|
89
|
+
* arms WebGL even under a detected software renderer. Mirrors the
|
|
90
|
+
* `resolveRenderMode` escape of the same name — ONE consumer-facing flag,
|
|
91
|
+
* threaded through both seams.
|
|
92
|
+
*/
|
|
93
|
+
forceWebGLUnderSoftwareRaster?: boolean;
|
|
75
94
|
}
|
|
76
95
|
/**
|
|
77
96
|
* The concrete `createAurora` return shape. It IS an {@link AuroraInstance}
|
|
@@ -27,6 +27,7 @@ export declare const MEDIUM_ID: {
|
|
|
27
27
|
readonly crayon: 4;
|
|
28
28
|
readonly vangogh: 5;
|
|
29
29
|
readonly "oil-pastel": 6;
|
|
30
|
+
readonly kuwahara: 7;
|
|
30
31
|
};
|
|
31
32
|
export declare const HUE_PATH_ID: {
|
|
32
33
|
readonly shorter: 0;
|
|
@@ -50,6 +51,7 @@ export declare const WARP_ID: {
|
|
|
50
51
|
readonly fbm: 0;
|
|
51
52
|
readonly cellular: 1;
|
|
52
53
|
readonly hybrid: 2;
|
|
54
|
+
readonly curl: 3;
|
|
53
55
|
};
|
|
54
56
|
export declare const STROKE_MODE_ID: {
|
|
55
57
|
readonly oil: 0;
|
|
@@ -81,7 +83,9 @@ export declare function resolveStrokeModeId(cfg: AuroraConfig): number;
|
|
|
81
83
|
* `oil-pastel`, `crayon`) FORCE the structure-tensor orientation regardless of the
|
|
82
84
|
* config's `strokeOrient` field — their marks must hug the color zones (the
|
|
83
85
|
* congruent-to-real-works contract). Every other medium honors the config's
|
|
84
|
-
* `strokeOrient` (default `"flow"`).
|
|
86
|
+
* `strokeOrient` (default `"flow"`). BB.W-AUR-KUWAHARA — `kuwahara` ALSO forces
|
|
87
|
+
* tensor: the anisotropic Kuwahara kernel is squeezed along the structure-tensor
|
|
88
|
+
* minor eigenvector, so the orientation source must be the tensor field.
|
|
85
89
|
*/
|
|
86
90
|
export declare function resolveStrokeOrientId(cfg: AuroraConfig): number;
|
|
87
91
|
/**
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aurora WGSL uniform bridge — the typed-struct SOURCE OF TRUTH for the WebGPU primary.
|
|
3
|
+
*
|
|
4
|
+
* The WGSL `Uniforms` struct (`aurora.wgsl.ts`) and the JS `ArrayBuffer` write offsets
|
|
5
|
+
* are generated from the SAME layout table here, so a std140-vs-WGSL alignment mismatch
|
|
6
|
+
* (the parity-ΔE-blowout trap the wave's §Triumvirate names) is structurally impossible:
|
|
7
|
+
* the field order + the byte offsets are ONE declaration.
|
|
8
|
+
*
|
|
9
|
+
* The struct packs every scalar into a vec4 lane + every per-nucleus row / palette stop
|
|
10
|
+
* into a vec4 so the array stride is the natural 16 bytes (no std140 16-byte-array-stride
|
|
11
|
+
* surprise). The byte layout (all offsets in bytes, std140-compatible — vec4 align 16):
|
|
12
|
+
*
|
|
13
|
+
* scalars0 : vec4<f32> off 0 (uTime, uSoftmaxBeta, uValueVariance, uWarpAmount)
|
|
14
|
+
* scalars1 : vec4<f32> off 16 (uWarpScale, uWarpDrift, uSaturation, uPaperGrain)
|
|
15
|
+
* scalars2 : vec4<f32> off 32 (uAlpha, uNucleiDrift, uPaletteDrift, uBreathDepth)
|
|
16
|
+
* scalars3 : vec4<f32> off 48 (uBreathPeriod, uCursorStrength, uCursorRadius, _)
|
|
17
|
+
* cursor : vec4<f32> off 64 (uCursor.x, uCursor.y, _, _)
|
|
18
|
+
* ints0 : vec4<i32> off 80 (uStopCount, uNucleiCount, uWarpMode, uNoiseOctaves)
|
|
19
|
+
* ints1 : vec4<i32> off 96 (uMedium, uHuePath, _, _)
|
|
20
|
+
* palette : array<vec4<f32>, 8> off 112 (rgb linear-sRGB stop + pad)
|
|
21
|
+
* nuc0 : array<vec4<f32>, 6> off 240 (pos.x, pos.y, radius, paletteBias)
|
|
22
|
+
* nuc1 : array<vec4<f32>, 6> off 336 (valueBias, driftRadius, driftPhase, elong)
|
|
23
|
+
* nuc2 : array<vec4<f32>, 6> off 432 (angle, _, _, _)
|
|
24
|
+
* total : 528 bytes (16-aligned)
|
|
25
|
+
*
|
|
26
|
+
* Y-origin: config authoring is CSS-top-origin (0 = top); the bridge flips Y at the
|
|
27
|
+
* uniform boundary (`flipY`), exactly as the GLSL `uniformBridge` does.
|
|
28
|
+
*/
|
|
29
|
+
import { type AuroraConfig } from "../constants/presets";
|
|
30
|
+
import type { CursorState } from "./cursorModel";
|
|
31
|
+
/** The total uniform-buffer byte size (16-aligned). */
|
|
32
|
+
export declare const AURORA_WGPU_UNIFORM_BYTES = 528;
|
|
33
|
+
/**
|
|
34
|
+
* The packed scratch buffer + the dual ArrayBuffer views. A slider drag refills this
|
|
35
|
+
* in place (no per-frame allocation) — mirroring the GLSL bridge's pre-allocated
|
|
36
|
+
* upload buffers. The Float32 view writes the float lanes; the Int32 view writes the
|
|
37
|
+
* two int lanes (a WGSL `i32` shares the buffer at the 16-byte-aligned offsets).
|
|
38
|
+
*/
|
|
39
|
+
export interface AuroraWGPUUniformScratch {
|
|
40
|
+
buffer: ArrayBuffer;
|
|
41
|
+
f32: Float32Array;
|
|
42
|
+
i32: Int32Array;
|
|
43
|
+
paletteScratch: Float32Array;
|
|
44
|
+
}
|
|
45
|
+
export declare function createAuroraWGPUUniformScratch(): AuroraWGPUUniformScratch;
|
|
46
|
+
/**
|
|
47
|
+
* Pack an {@link AuroraConfig} + the live cursor + the frame time into the uniform
|
|
48
|
+
* scratch buffer. The byte layout mirrors the WGSL `Uniforms` struct EXACTLY. Returns
|
|
49
|
+
* the same scratch (the caller `queue.writeBuffer`s `scratch.buffer`).
|
|
50
|
+
*/
|
|
51
|
+
export declare function packAuroraWGPUUniforms(scratch: AuroraWGPUUniformScratch, cfg: AuroraConfig, cursor: CursorState, timeSec: number): AuroraWGPUUniformScratch;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aurora WGSL setup seam — the WebGPU twin of `glSetup` + `frameLoop`.
|
|
3
|
+
*
|
|
4
|
+
* `createAuroraWGPUSetup` returns a `setupWGPU(device, context, format)` callback the
|
|
5
|
+
* `useGpuSubstrate` picker invokes on the async arm (AND on every device-restore). It
|
|
6
|
+
* builds the render pipeline (the `aurora.wgsl` full-screen-triangle pass), the uniform
|
|
7
|
+
* buffer (the `uniformBridgeWGPU` typed-struct source-of-truth), and the bind group, then
|
|
8
|
+
* returns the substrate's per-frame hooks (`frame`/`shouldContinue`/`resize`/`time`/
|
|
9
|
+
* `teardown`).
|
|
10
|
+
*
|
|
11
|
+
* The render-demand gate + the cursor-advance + the DPR resize mirror the WebGL2
|
|
12
|
+
* `frameLoop`/`runtime.resize` exactly — the loop is substrate-AGNOSTIC, so the same
|
|
13
|
+
* `getConfig`/`getReducedMotion`/`cursor` closures drive both backends.
|
|
14
|
+
*/
|
|
15
|
+
import type { WebGPUCanvasFrame } from "../../../../composables/glass/webgpu/useWebGPUCanvas";
|
|
16
|
+
import { type CursorState } from "./cursorModel";
|
|
17
|
+
import type { AuroraConfig } from "../constants/presets";
|
|
18
|
+
export interface AuroraWGPUSetupDeps {
|
|
19
|
+
canvas: HTMLCanvasElement;
|
|
20
|
+
cursor: CursorState;
|
|
21
|
+
getConfig: () => AuroraConfig;
|
|
22
|
+
getReducedMotion: () => boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Build the aurora `setupWGPU(device, context, format)` callback. Closes over the
|
|
26
|
+
* aurora-specific state (cursor/config/reduced-motion) the runtime owns — identical to
|
|
27
|
+
* the closures the WebGL2 `setup` threads.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createAuroraWGPUSetup(deps: AuroraWGPUSetupDeps): (device: GPUDevice, context: GPUCanvasContext, format: GPUTextureFormat) => WebGPUCanvasFrame;
|
|
@@ -19,6 +19,19 @@
|
|
|
19
19
|
* after the offscreen-park. Consumed by aurora's + goo-blob's `resize()`.
|
|
20
20
|
*/
|
|
21
21
|
export declare const AV_DPR_MAX = 2;
|
|
22
|
+
/**
|
|
23
|
+
* BB.W-PERF-PRODUCER A′-5 — the aurora decorative-WASH DPR ceiling, SUB-2× and
|
|
24
|
+
* DISTINCT from the focal goo-blob's {@link AV_DPR_MAX}. The aurora atmosphere is a
|
|
25
|
+
* heavily-blurred drift background, not a sharp-silhouette creature: backing it at
|
|
26
|
+
* full-viewport 2× (the value.js LP1 trace: ~2880×1800, ~21.8 MB native heap) is
|
|
27
|
+
* visually indistinguishable from 1.5× on a drift wash (the per-pixel FBM is
|
|
28
|
+
* already smoothed below the DPR-2 detail floor), so the 1.5× ceiling quarters the
|
|
29
|
+
* GPU memory + per-composite raster for no perceptible loss. The FOCAL goo-blob
|
|
30
|
+
* KEEPS {@link AV_DPR_MAX} = 2 — its silhouette is sharp; only the aurora wash
|
|
31
|
+
* reads this sub-cap. This is the CPU-side backing-store DIMENSION only; it never
|
|
32
|
+
* reaches the shader (`aurora.frag` is byte-fenced — the GL fence is absolute).
|
|
33
|
+
*/
|
|
34
|
+
export declare const AV_AURORA_DPR_MAX = 1.5;
|
|
22
35
|
/**
|
|
23
36
|
* The maximum animated metaball nuclei (the goo-blob body + its satellites, or
|
|
24
37
|
* an aurora field's count). The goo-blob shader hard-caps satellites at 4; this
|
|
@@ -48,3 +61,11 @@ export declare function clampBudget(value: number, min: number, max: number): nu
|
|
|
48
61
|
* `1` when `window` is absent). The single CPU-side reader of {@link AV_DPR_MAX}.
|
|
49
62
|
*/
|
|
50
63
|
export declare function resolveBudgetDpr(): number;
|
|
64
|
+
/**
|
|
65
|
+
* BB.W-PERF-PRODUCER A′-5 — resolve the budget-clamped backing-store DPR for the
|
|
66
|
+
* aurora decorative WASH, at the SUB-2× {@link AV_AURORA_DPR_MAX} ceiling (distinct
|
|
67
|
+
* from {@link resolveBudgetDpr}'s focal 2×). SSR-safe (returns `1` when `window` is
|
|
68
|
+
* absent). The single CPU-side reader is aurora's `runtime.ts` `resize()`; the
|
|
69
|
+
* focal goo-blob keeps {@link resolveBudgetDpr}.
|
|
70
|
+
*/
|
|
71
|
+
export declare function resolveAuroraWashDpr(): number;
|
|
@@ -39,7 +39,7 @@ export interface AuroraNucleus {
|
|
|
39
39
|
*/
|
|
40
40
|
angle?: number;
|
|
41
41
|
}
|
|
42
|
-
export type AuroraMedium = "smooth" | "pastel" | "watercolor" | "oil" | "crayon" | "vangogh" | "oil-pastel";
|
|
42
|
+
export type AuroraMedium = "smooth" | "pastel" | "watercolor" | "oil" | "crayon" | "vangogh" | "oil-pastel" | "kuwahara";
|
|
43
43
|
/** Oil-stroke sub-mode. Applied only when `medium === "oil"`. Routes inside the shader. */
|
|
44
44
|
export type StrokeMode = "oil" | "knife" | "chunky";
|
|
45
45
|
export type FlowPattern = "none" | "radial" | "swirl" | "diagonal" | "multi" | "tensor";
|
|
@@ -50,7 +50,7 @@ export type FlowPattern = "none" | "radial" | "swirl" | "diagonal" | "multi" | "
|
|
|
50
50
|
* edge-tangent flow). No default that hides one as a duplicate of the other.
|
|
51
51
|
*/
|
|
52
52
|
export type StrokeOrient = "flow" | "tensor";
|
|
53
|
-
export type WarpMode = "fbm" | "cellular" | "hybrid";
|
|
53
|
+
export type WarpMode = "fbm" | "cellular" | "hybrid" | "curl";
|
|
54
54
|
/**
|
|
55
55
|
* AW.W6/W8 — the interactivity flag SHAPE (declared at W6, default OFF; behavior
|
|
56
56
|
* wired at W8). Each axis opts the aurora into a pointer/scroll response:
|
|
@@ -181,3 +181,31 @@ export declare const MAX_STOPS = 8;
|
|
|
181
181
|
* Not a themed preset — the demo's 11 authored presets override every field.
|
|
182
182
|
*/
|
|
183
183
|
export declare const DEFAULT_AURORA_CONFIG: AuroraConfig;
|
|
184
|
+
/**
|
|
185
|
+
* `PAPER_WASH_GROUND` — the library-canon recessive-ground crayon calibration
|
|
186
|
+
* (BA.W-ATLAS-RECONCILE A-4a; d6 9467bd16 adopt). A pure PRESET PARTIAL (no
|
|
187
|
+
* palette/nuclei/motion) pinning the recessive crayon-ground deposition dials so a
|
|
188
|
+
* data-ground aurora reads as paper-on-tooth without each consumer dial-tuning the
|
|
189
|
+
* same recessive calibration by hand. It carries NO palette/nuclei — the consumer
|
|
190
|
+
* spreads it over its own pole-derived pigment (page-glow IS data-glow):
|
|
191
|
+
* `const cfg = { ...consumerBase, ...PAPER_WASH_GROUND }`.
|
|
192
|
+
*
|
|
193
|
+
* House-rule clean (presets-in-consumers): this is the LIBRARY's own recessive-ground
|
|
194
|
+
* IDENTITY, not a consumer theme — admissible at the root. `satisfies
|
|
195
|
+
* Partial<AuroraConfig>` holds (every key is a first-class `AuroraConfig` field at
|
|
196
|
+
* HEAD; the `crayon` medium is `uMedium==4`).
|
|
197
|
+
*/
|
|
198
|
+
export declare const PAPER_WASH_GROUND: {
|
|
199
|
+
readonly medium: "crayon";
|
|
200
|
+
readonly strokeOrient: "tensor";
|
|
201
|
+
readonly granulation: 0.3;
|
|
202
|
+
readonly canvasGrain: 0.5;
|
|
203
|
+
readonly strokeAmount: 0.35;
|
|
204
|
+
readonly strokeAnisotropy: 0.5;
|
|
205
|
+
readonly strokeLayers: 1;
|
|
206
|
+
readonly impasto: 0;
|
|
207
|
+
readonly brokenColor: 0;
|
|
208
|
+
readonly wetEdge: 0;
|
|
209
|
+
readonly saturation: 0.92;
|
|
210
|
+
readonly paperGrain: 0.008;
|
|
211
|
+
};
|
|
@@ -1,22 +1,75 @@
|
|
|
1
|
+
export type AuroraRenderMode = "webgl" | "css" | "auto";
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
+
* Detect a SOFTWARE / CPU WebGL renderer (SwiftShader, llvmpipe, the Microsoft
|
|
4
|
+
* Basic Render Driver) via the shared `probeWebGL2Renderer` capability helper
|
|
5
|
+
* (BB.W-CI-GREEN — the substrate owns the SINGLE `getContext("webgl2")`
|
|
6
|
+
* bootstrap; this consumer reads the renderer STRING through it rather than
|
|
7
|
+
* creating a second probe context, per `proof:webgl-substrate-single`).
|
|
8
|
+
*
|
|
9
|
+
* WHY this is a `"css"` signal (the N.W5 Defect-A root cause, proven live under
|
|
10
|
+
* the playwright SwiftShader harness): a full-viewport WebGL2 surface is a
|
|
11
|
+
* compositor layer the rasteriser must re-raster on every composite. On a
|
|
12
|
+
* software rasteriser that per-composite cost is so high that a REAL pointer
|
|
13
|
+
* interaction — which forces a composite — starves the renderer's input ack and
|
|
14
|
+
* the page goes UNRESPONSIVE (the headless-Chromium hang; the same severe jank a
|
|
15
|
+
* GPU-blocklisted user feels). Neither a frame-cadence cap, a backing-store
|
|
16
|
+
* shrink, nor a reduced-motion park cures it (all keep the live GL layer);
|
|
17
|
+
* ONLY *not creating the WebGL surface* does. So a software renderer takes the
|
|
18
|
+
* `"css"` substrate — the static gradient placeholder is a complete render of the
|
|
19
|
+
* same palette, composites cheaply, and never stalls input. A blocklisted-GPU
|
|
20
|
+
* user gets a smooth atmosphere instead of a janky/hanging one.
|
|
3
21
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* low-power / reduced-motion / save-data devices.
|
|
22
|
+
* A `null` probe (no WebGL2 / extension masked / throw) returns `false` — we
|
|
23
|
+
* never downgrade a renderer we cannot PROVE is software (the `"css"` path is the
|
|
24
|
+
* conservative-but-lossy choice, so a false miss keeps the richer default).
|
|
8
25
|
*/
|
|
9
|
-
export
|
|
26
|
+
export declare function isSoftwareWebGLRenderer(): boolean;
|
|
10
27
|
/**
|
|
11
|
-
* Resolve
|
|
12
|
-
*
|
|
28
|
+
* Resolve-mode options. The software-raster GUARD is the safe DEFAULT (see
|
|
29
|
+
* {@link resolveRenderMode}); the single ESCAPE is `forceWebGLUnderSoftwareRaster`
|
|
30
|
+
* (BB.W-AURORA-SWRASTER).
|
|
31
|
+
*/
|
|
32
|
+
export interface ResolveRenderModeOptions {
|
|
33
|
+
/**
|
|
34
|
+
* Opt OUT of the universal software-raster guard. When `true`, a forced
|
|
35
|
+
* `mode:"webgl"`/`mode:"capture"` arm ARMS the live WebGL2 surface even on a
|
|
36
|
+
* detected software renderer (SwiftShader / llvmpipe / MS Basic Render) — for
|
|
37
|
+
* a deterministic test that ACCEPTS the per-composite raster cost. Default
|
|
38
|
+
* `false`: the guard is the SAFE default (a software-raster signal forces
|
|
39
|
+
* `"css"` regardless of the requested mode, so a consumer who pins
|
|
40
|
+
* `mode:"webgl"` on a headless / GPU-blocklisted device gets the static
|
|
41
|
+
* ground, never the page-wedging hang). The escape is NAMED + recorded,
|
|
42
|
+
* never silent.
|
|
43
|
+
*/
|
|
44
|
+
forceWebGLUnderSoftwareRaster?: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Resolve `"auto"` to a concrete substrate per device tier — AND universalize the
|
|
48
|
+
* software-raster guard out of the `"auto"`-only branch (BB.W-AURORA-SWRASTER).
|
|
49
|
+
*
|
|
50
|
+
* THE GUARD (the universal first leg). A SOFTWARE WebGL renderer (SwiftShader /
|
|
51
|
+
* llvmpipe / MS Basic Render — the GPU-blocklisted / headless path) forces `"css"`
|
|
52
|
+
* for ANY WebGL-ARMING requested mode (`"webgl"` OR `"auto"`), not only `"auto"`.
|
|
53
|
+
* A full-viewport software-rastered GL layer is so expensive to re-raster on every
|
|
54
|
+
* composite that a pointer interaction starves the renderer's input ack and the
|
|
55
|
+
* page goes UNRESPONSIVE (the headless-Chromium hang the speedtest harness
|
|
56
|
+
* documents). A consumer (or a capture harness) that pins `mode:"webgl"` /
|
|
57
|
+
* `mode:"capture"` on such a device MUST still fall to the static ground — so the
|
|
58
|
+
* probe runs BEFORE the `mode !== "auto"` short-circuit when the requested mode
|
|
59
|
+
* would arm WebGL. The single ESCAPE is `options.forceWebGLUnderSoftwareRaster`
|
|
60
|
+
* (default `false` — the guard is the safe default).
|
|
13
61
|
*
|
|
14
|
-
* `"auto"` resolves to `"css"` when ANY low-power signal is present:
|
|
62
|
+
* `"auto"` then resolves to `"css"` when ANY low-power signal is present:
|
|
63
|
+
* - a SOFTWARE WebGL renderer (already handled by the universal guard above),
|
|
15
64
|
* - `navigator.hardwareConcurrency <= 4` (few logical cores),
|
|
16
65
|
* - `prefers-reduced-motion: reduce`,
|
|
17
66
|
* - `navigator.connection.saveData === true` (Data Saver on).
|
|
18
67
|
* Otherwise `"webgl"`.
|
|
19
68
|
*
|
|
69
|
+
* THE CAPABLE PATH IS BYTE-UNTOUCHED: `isSoftwareWebGLRenderer()` returns `false`
|
|
70
|
+
* on a real GPU (or a null probe — never a false downgrade), so a forced
|
|
71
|
+
* `mode:"webgl"` on hardware passes through exactly as before.
|
|
72
|
+
*
|
|
20
73
|
* SSR / missing-API safe: if `navigator` / `window` / the probes are
|
|
21
74
|
* unavailable we ASSUME a capable device and resolve `"webgl"` (the warm wash
|
|
22
75
|
* still composites either way — the only question is whether it animates).
|
|
@@ -27,4 +80,4 @@ export type AuroraRenderMode = "webgl" | "css" | "auto";
|
|
|
27
80
|
* not a reactive one (a connection-type flip mid-session does not re-resolve;
|
|
28
81
|
* the consumer remounts to re-evaluate, matching the deferred-arm contract).
|
|
29
82
|
*/
|
|
30
|
-
export declare function resolveRenderMode(mode: AuroraRenderMode): "webgl" | "css";
|
|
83
|
+
export declare function resolveRenderMode(mode: AuroraRenderMode, options?: ResolveRenderModeOptions): "webgl" | "css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AURORA_WGSL = "\nconst MAX_NUCLEI: i32 = 6;\nconst MAX_STOPS: i32 = 8;\nconst PI: f32 = 3.141592653589793;\n\n// \u2500\u2500 Uniforms (the typed-struct source-of-truth \u2014 see aurora.wgsl.uniforms.ts) \u2500\u2500\n// Scalars are packed into vec4 lanes to keep the std140/WGSL 16-byte struct alignment\n// trivial. nuc0[i] = (pos.x, pos.y, radius, paletteBias); nuc1[i] = (valueBias,\n// driftRadius, driftPhase, elong); nuc2[i] = (angle, _, _, _). palette[i].rgb is the\n// CPU-baked linear-sRGB stop.\nstruct Uniforms {\n // scalars0: (uTime, uSoftmaxBeta, uValueVariance, uWarpAmount)\n scalars0: vec4<f32>,\n // scalars1: (uWarpScale, uWarpDrift, uSaturation, uPaperGrain)\n scalars1: vec4<f32>,\n // scalars2: (uAlpha, uNucleiDrift, uPaletteDrift, uBreathDepth)\n scalars2: vec4<f32>,\n // scalars3: (uBreathPeriod, uCursorStrength, uCursorRadius, _pad)\n scalars3: vec4<f32>,\n // cursor: (uCursor.x, uCursor.y, _pad, _pad)\n cursor: vec4<f32>,\n // ints: (uStopCount, uNucleiCount, uWarpMode, uNoiseOctaves)\n ints0: vec4<i32>,\n // ints1: (uMedium, uHuePath, _, _)\n ints1: vec4<i32>,\n palette: array<vec4<f32>, 8>,\n nuc0: array<vec4<f32>, 6>,\n nuc1: array<vec4<f32>, 6>,\n nuc2: array<vec4<f32>, 6>,\n};\n\n@group(0) @binding(0) var<uniform> u: Uniforms;\n\n// \u2500\u2500 Authoring-scale \u2192 rad/sec lifts (byte-identical to aurora.frag.ts) \u2500\u2500\nconst K_NUCLEI: f32 = 14.0;\nconst K_PAL: f32 = 24.0;\nconst K_WARP: f32 = 5.0;\n\n// \u2500\u2500 Noise (aurora-local hash21/vnoise/fbm \u2014 legitimately divergent per AV.W2 \u00A73a) \u2500\u2500\nfn hash21(p0: vec2<f32>) -> f32 {\n var p = fract(p0 * vec2<f32>(123.34, 456.21));\n p = p + dot(p, p + 45.32);\n return fract(p.x * p.y);\n}\n\nfn hash22(p0: vec2<f32>) -> vec2<f32> {\n let p = vec2<f32>(dot(p0, vec2<f32>(127.1, 311.7)),\n dot(p0, vec2<f32>(269.5, 183.3)));\n return fract(sin(p) * 43758.5453);\n}\n\nfn vnoise(p: vec2<f32>) -> f32 {\n let i = floor(p);\n let f = fract(p);\n let uu = f * f * (3.0 - 2.0 * f);\n let a = hash21(i);\n let b = hash21(i + vec2<f32>(1.0, 0.0));\n let c = hash21(i + vec2<f32>(0.0, 1.0));\n let d = hash21(i + vec2<f32>(1.0, 1.0));\n return mix(mix(a, b, uu.x), mix(c, d, uu.x), uu.y);\n}\n\nconst FBM_ROT: mat2x2<f32> = mat2x2<f32>(0.8, 0.6, -0.6, 0.8);\n\nfn fbm(p0: vec2<f32>) -> f32 {\n var v = 0.0;\n var a = 0.5;\n var p = p0;\n let octaves = u.ints0.w;\n for (var i = 0; i < 5; i = i + 1) {\n if (i >= octaves) { break; }\n v = v + a * vnoise(p);\n p = FBM_ROT * p * 2.02;\n a = a * 0.5;\n }\n return v;\n}\n\n\nfn srgbToLinearCh(c: f32) -> f32 {\n if (c <= 0.04045) { return c / 12.92; }\n return pow((c + 0.055) / 1.055, 2.4);\n}\nfn srgbToLinear(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfn linearToSrgbCh(c: f32) -> f32 {\n if (c <= 0.0031308) { return c * 12.92; }\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nfn linearToSrgb(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}\n\n// value.js LINEAR_SRGB_TO_LMS, row-major \u2192 WGSL columns (= the transpose).\nconst LINEAR_SRGB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS\u2192OKLab coefficients, row-major \u2192 WGSL columns.\nconst LMS_TO_OKLAB: mat3x3<f32> = mat3x3<f32>(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF, row-major \u2192 WGSL columns.\nconst OKLAB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB, row-major \u2192 WGSL columns.\nconst LMS_TO_LINEAR_SRGB: mat3x3<f32> = mat3x3<f32>(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\nfn cbrt3(v: vec3<f32>) -> vec3<f32> {\n return sign(v) * pow(abs(v), vec3<f32>(1.0 / 3.0));\n}\n\n// Gamma sRGB \u2192 raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nfn srgbToOklab(c: vec3<f32>) -> vec3<f32> {\n let lin = srgbToLinear(c);\n let lms = LINEAR_SRGB_TO_LMS * lin;\n return LMS_TO_OKLAB * cbrt3(lms);\n}\n\n// Raw OKLab (L, a, b) \u2192 linear sRGB. Mirrors value.js oklabToLinearSRGB.\nfn oklabToLinearSrgb(lab: vec3<f32>) -> vec3<f32> {\n let lms_ = OKLAB_TO_LMS * lab;\n let lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab \u2192 OKLCh: H in RADIANS, folded to [0, 2pi). Mirrors value.js rawOklabToOklch.\nfn oklabToOklch(lab: vec3<f32>) -> vec3<f32> {\n let C = length(lab.yz);\n var H = atan2(lab.z, lab.y);\n if (H < 0.0) { H = H + 2.0 * PI; }\n return vec3<f32>(lab.x, C, H);\n}\n\n// OKLCh (H radians) \u2192 OKLab. Mirrors value.js rawOklchToOklab.\nfn oklchToOklab(lch: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\n// value.js interpolateHue in the NORMALIZED-TURNS domain. methods: 0 shorter,\n// 1 longer, 2 increasing, 3 decreasing.\nfn interpolateHueTurns(h0: f32, h1: f32, t: f32, method: i32) -> f32 {\n let TAU = 2.0 * PI;\n var a = h0 / TAU;\n var b = h1 / TAU;\n let i = b - a;\n if (method == 0) { // shorter\n if (i > 0.5) { a = a + 1.0; } else if (i < -0.5) { b = b + 1.0; }\n } else if (method == 1) { // longer\n if (i > 0.0 && i < 0.5) { a = a + 1.0; } else if (i > -0.5 && i <= 0.0) { b = b + 1.0; }\n } else if (method == 2) { // increasing\n if (i < 0.0) { b = b + 1.0; }\n } else { // decreasing\n if (i > 0.0) { a = a + 1.0; }\n }\n var r = a + t * (b - a);\n r = fract(r); // fract is non-negative in WGSL\n return r * TAU; // back to radians\n}\n\n// Linear-sRGB endpoint pair \u2192 OKLab-rectangular interpolation \u2192 linear sRGB.\nfn mixPaletteOklab(linA: vec3<f32>, linB: vec3<f32>, t: f32) -> vec3<f32> {\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linA);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linB);\n let lab = mix(labA, labB, t);\n return oklabToLinearSrgb(lab);\n}\n\n// Linear-sRGB endpoint pair \u2192 OKLCh hue-arc interpolation \u2192 linear sRGB.\nfn mixPaletteOklchArc(linA: vec3<f32>, linB: vec3<f32>, t: f32, method: i32) -> vec3<f32> {\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linA);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linB);\n let lchA = oklabToOklch(labA);\n let lchB = oklabToOklch(labB);\n let L = mix(lchA.x, lchB.x, t);\n let C = mix(lchA.y, lchB.y, t);\n let H = interpolateHueTurns(lchA.z, lchB.z, t, method);\n return oklabToLinearSrgb(oklchToOklab(vec3<f32>(L, C, H)));\n}\n\n// The ramp dispatcher (the samplePalette splices it). tRaw is the raw inter-stop\n// parameter [0,1]; the smoothstep ease + the huePath branch live here so the ramp is\n// one source. increasing(2)/decreasing(3) take the OKLCh hue-arc; every other method\n// takes the OKLab-rectangular straight line.\nfn samplePaletteRamp(a: vec3<f32>, b: vec3<f32>, tRaw: f32, huePath: i32) -> vec3<f32> {\n let t = smoothstep(0.0, 1.0, tRaw);\n if (huePath == 2 || huePath == 3) {\n return mixPaletteOklchArc(a, b, t, huePath);\n }\n return mixPaletteOklab(a, b, t);\n}\n\n// Interleaved Gradient Noise (Jimenez) \u2014 display-space 1-LSB dither.\nfn ign(p: vec2<f32>) -> f32 {\n return fract(52.9829189 * fract(dot(p, vec2<f32>(0.06711056, 0.00583715))));\n}\n\n// Cellular / Worley f1.\nfn cellular(p: vec2<f32>) -> f32 {\n let i = floor(p);\n let f = fract(p);\n var m = 1e9;\n for (var y = -1; y <= 1; y = y + 1) {\n for (var x = -1; x <= 1; x = x + 1) {\n let g = vec2<f32>(f32(x), f32(y));\n let o = hash22(i + g);\n let r = g + o - f;\n m = min(m, dot(r, r));\n }\n }\n return sqrt(m);\n}\n\n// \u2500\u2500 Warp (Quilez double warp + the three warp modes + the cursor swirl) \u2500\u2500\nfn domainWarp(p: vec2<f32>, t: f32) -> vec2<f32> {\n let warpScale = u.scalars1.x;\n let warpDrift = u.scalars1.y;\n let warpAmount = u.scalars0.w;\n let warpMode = u.ints0.z;\n let cursorStrength = u.scalars3.y;\n let cursorRadius = u.scalars3.z;\n let cursor = u.cursor.xy;\n\n let q = vec2<f32>(fbm(p * warpScale + vec2<f32>(0.0, 0.0) + t * warpDrift * K_WARP),\n fbm(p * warpScale + vec2<f32>(5.2, 1.3) + t * warpDrift * K_WARP));\n let r = vec2<f32>(fbm(p * warpScale + 4.0 * q + vec2<f32>(1.7, 9.2)),\n fbm(p * warpScale + 4.0 * q + vec2<f32>(8.3, 2.8)));\n\n var warp = r;\n if (warpMode == 1) {\n // cellular \u2014 chunky territories\n let c1 = cellular(p * warpScale * 1.5 + vec2<f32>(t * warpDrift * K_WARP * 2.0, 0.0));\n let c2 = cellular(p * warpScale * 1.5 + vec2<f32>(11.0, 7.0 + t * warpDrift * K_WARP * 2.0));\n warp = vec2<f32>(c1, c2);\n } else if (warpMode == 2) {\n // hybrid \u2014 fbm + cellular averaged\n let c1 = cellular(p * warpScale * 1.2);\n let c2 = cellular(p * warpScale * 1.2 + vec2<f32>(11.0, 7.0));\n warp = mix(r, vec2<f32>(c1, c2), 0.5);\n }\n var warped = p + warpAmount * warp;\n\n // Cursor swirl \u2014 rotate p around the cursor with radial falloff.\n if (cursorStrength > 0.001) {\n let toP = p - cursor;\n let d = length(toP);\n let rr = max(cursorRadius, 0.01);\n let w = exp(-(d * d) / (rr * rr * 0.45));\n let ang = w * cursorStrength * 2.1;\n let ca = cos(ang);\n let sa = sin(ang);\n var rotated = vec2<f32>(ca * toP.x - sa * toP.y, sa * toP.x + ca * toP.y) + cursor;\n let pinch = w * cursorStrength * 0.08;\n rotated = mix(rotated, cursor, pinch);\n warped = mix(warped, rotated + warpAmount * warp * 0.7, w * cursorStrength);\n }\n return warped;\n}\n\n// \u2500\u2500 Palette LUT \u2500\u2500\nfn samplePalette(id0: f32) -> vec3<f32> {\n let id = clamp(id0, 0.0, 1.0);\n let stopCount = u.ints0.x;\n let scaled = id * f32(stopCount - 1);\n let i0 = i32(floor(scaled));\n let i1 = min(i0 + 1, stopCount - 1);\n let t = fract(scaled);\n return samplePaletteRamp(u.palette[i0].rgb, u.palette[i1].rgb, t, u.ints1.y);\n}\n\n// \u2500\u2500 Nuclei field (anisotropic Gaussian softmax + drift + palette drift) \u2500\u2500\nstruct NucleiResult { paletteId: f32, valueMod: f32 };\n\nfn nucleiField(p: vec2<f32>, t: f32) -> NucleiResult {\n let nucleiCount = u.ints0.y;\n let nucleiDrift = u.scalars2.y;\n let paletteDrift = u.scalars2.z;\n let softmaxBeta = u.scalars0.y;\n\n var accumBias = 0.0;\n var accumValue = 0.0;\n var accumW = 0.0;\n for (var i = 0; i < MAX_NUCLEI; i = i + 1) {\n if (i >= nucleiCount) { break; }\n let n0 = u.nuc0[i]; // pos.x, pos.y, radius, paletteBias\n let n1 = u.nuc1[i]; // valueBias, driftRadius, driftPhase, elong\n let angle = u.nuc2[i].x;\n let driftRadius = n1.y;\n let driftPhase = n1.z;\n let posI = n0.xy + driftRadius * vec2<f32>(\n cos(t * nucleiDrift * K_NUCLEI + driftPhase),\n sin(t * nucleiDrift * K_NUCLEI + driftPhase * 1.13)\n );\n let diff = p - posI;\n let ca = cos(angle);\n let sa = sin(angle);\n let local = vec2<f32>(ca * diff.x + sa * diff.y, -sa * diff.x + ca * diff.y);\n let along = local.x / max(n1.w, 0.01);\n let across = local.y;\n let d2 = along * along + across * across;\n let r = max(n0.z, 0.01);\n let w = exp(-softmaxBeta * d2 / (r * r));\n accumBias = accumBias + w * n0.w;\n accumValue = accumValue + w * n1.x;\n accumW = accumW + w;\n }\n var paletteId = accumBias / max(accumW, 1e-4);\n let valueMod = accumValue / max(accumW, 1e-4);\n\n let palAmp = clamp(paletteDrift * 6.0, 0.0, 0.06);\n paletteId = paletteId + palAmp * sin(t * paletteDrift * K_PAL);\n paletteId = clamp(paletteId, 0.0, 1.0);\n return NucleiResult(paletteId, valueMod);\n}\n\n// \u2500\u2500 Color utils (OKLCh saturation) \u2500\u2500\nfn linOklab(lin: vec3<f32>) -> vec3<f32> {\n let lms = LINEAR_SRGB_TO_LMS * lin;\n return LMS_TO_OKLAB * cbrt3(lms);\n}\n\nfn saturate3(c: vec3<f32>, amt: f32) -> vec3<f32> {\n var lch = oklabToOklch(linOklab(c));\n lch.y = max(lch.y * amt, 0.0);\n return max(oklabToLinearSrgb(oklchToOklab(lch)), vec3<f32>(0.0));\n}\n\n// \u2500\u2500 PBR-Neutral tonemap (named aces() in the GLSL \u2014 the tonemap slot) \u2500\u2500\nfn aces(color0: vec3<f32>) -> vec3<f32> {\n let startCompression = 0.8 - 0.04;\n let desaturation = 0.15;\n var color = color0;\n let x = min(color.r, min(color.g, color.b));\n var offset = 0.04;\n if (x < 0.08) { offset = x - 6.25 * x * x; }\n color = color - offset;\n let peak = max(color.r, max(color.g, color.b));\n if (peak < startCompression) { return clamp(color, vec3<f32>(0.0), vec3<f32>(1.0)); }\n let d = 1.0 - startCompression;\n let newPeak = 1.0 - d * d / (peak + d - startCompression);\n color = color * (newPeak / peak);\n let g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0);\n return clamp(mix(color, newPeak * vec3<f32>(1.0), g), vec3<f32>(0.0), vec3<f32>(1.0));\n}\n\n// \u2500\u2500 Full-screen triangle vertex stage (the pilot idiom \u2014 no vertex buffer) \u2500\u2500\nstruct VSOut {\n @builtin(position) pos: vec4<f32>,\n @location(0) uv: vec2<f32>,\n};\n\n@vertex\nfn vs_main(@builtin(vertex_index) vi: u32) -> VSOut {\n // NDC corners of the covering triangle (-1,-1), (3,-1), (-1,3).\n var p = vec2<f32>(-1.0, -1.0);\n if (vi == 1u) { p = vec2<f32>(3.0, -1.0); }\n else if (vi == 2u) { p = vec2<f32>(-1.0, 3.0); }\n var out: VSOut;\n out.pos = vec4<f32>(p, 0.0, 1.0);\n // vUv = aPos * 0.5 + 0.5 (the aurora.vert convention).\n out.uv = p * 0.5 + 0.5;\n return out;\n}\n\n// \u2500\u2500 Fragment stage (the main() transcription) \u2500\u2500\n@fragment\nfn fs_main(in: VSOut) -> @location(0) vec4<f32> {\n let t = u.scalars0.x;\n let valueVariance = u.scalars0.z;\n let breathDepth = u.scalars2.w;\n let breathPeriod = u.scalars3.x;\n let saturation = u.scalars1.z;\n let paperGrain = u.scalars1.w;\n let alpha = u.scalars2.x;\n\n let uv = in.uv;\n let pN = uv;\n\n let p_warp = domainWarp(pN, t);\n\n let nf = nucleiField(p_warp, t);\n var col = samplePalette(nf.paletteId);\n col = col * (1.0 + valueVariance * nf.valueMod);\n\n // Breath \u2014 slow global luminance wobble.\n let breath = sin(t * 6.2831 / max(breathPeriod, 1.0));\n col = col * (1.0 + breathDepth * breath * 0.5);\n\n // The painterly mediums (uMedium 1-6) are the WebGL2 fallback's register; the WGSL\n // primary renders the smooth core for the default parity capture (the booked\n // W-AURORA-WGPU-MEDIUMS successor ports the painterly bodies).\n\n // Saturation trim.\n col = saturate3(col, saturation);\n\n // Tonemap + film grain.\n col = aces(col);\n // gl_FragCoord.xy \u2192 the device-pixel position (the WGSL @builtin(position)).\n let fragCoord = in.pos.xy;\n let grain = hash21(fragCoord + t * 17.0);\n col = col + (grain - 0.5) * paperGrain;\n\n col = clamp(col * 0.985 + 0.008, vec3<f32>(0.0), vec3<f32>(1.0));\n\n // MANDATORY OETF \u2014 closes the seam (the whole pipeline above runs in LINEAR).\n col = linearToSrgb(col);\n\n // 1-LSB triangular IGN dither in DISPLAY space, AFTER the OETF.\n col = col + (1.0 / 255.0) * (ign(fragCoord) - 0.5);\n\n // Premultiply on DISPLAY-space color (matches the WebGL2 path: OETF, then premul).\n return vec4<f32>(col * alpha, alpha);\n}\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AURORA_OIL_MODES_GLSL = "StrokeProfile profileFor(int medium, int mode) {\n // The oil baseline (mode 0) \u2014 balanced modern-abstract/palette-knife hybrid.\n StrokeProfile prof = StrokeProfile(\n 0, // shapeType \u2014 tapered\n 0.25, // bristleAmp\n 9.0, // streakFreq\n 0.09, // streakAmp\n 0.9, // impastoAmp\n 0.80, // hardness\n 340.0, // toothScale \u2014 W-AUR-VANGOGH-CONFIG reconcile: FINER 240 \u2192 340. Oil's \u00A74.3 \u03B2 sat\n // right AT the \u22121.45 band ceiling (\u00B10.02 frame variance straddling\n // it, surfaced once the vangogh bands went green and the spec reached\n // the oil \u03B2 assert). MEASURED on the live GPU: ADDING fine high-\n // frequency tooth energy steepens oil's power-spectrum slope (more\n // negative \u2014 coarsening it the other way pushed \u03B2 SHALLOWER to\n // \u22121.33). A finer, stronger tooth moves \u03B2 to a safe distance inside\n // the \u22125/3 band [\u22121.85, \u22121.45]. Oil-only (oil-pastel sets 280).\n 0.14, // toothAmp \u2014 raised 0.09 \u2192 0.14 (same oil-\u03B2 steepen: more fine-grain high band).\n 1.03, // pigmentSat\n 0.65, // densityBig\n 0.78, // densityMed\n 0.90, // densitySml\n 0.0, // energyGrade \u2014 oil is uniform-length (no Starry-Night cascade)\n 0.4, // impastoFloor \u2014 oil's 0.4+0.6\u00B7edgeN crown falloff\n 0.92, // densityFill \u2014 oil fills DENSELY with the directional low-relief fill so the\n // flat-colour regions between the macro strokes are TEXTURED with\n // flow-aligned fine strokes (the \u00A74.2 anisotropy needs every pixel\n // to carry directional gradient; a flat untextured region reads as\n // an isotropic/degenerate tensor and drags mean A down). The fill\n // is now directional + low-streak, so dense coverage textures\n // WITHOUT the prior round-dab speckle.\n 1.0 // groundFloor \u2014 oil keeps the full base (no ground darken; fills everywhere)\n );\n\n // W-AUR-VANGOGH-REBUILD \u2014 the van-Gogh medium NO LONGER routes through this oil\n // StrokeProfile cascade. It is a DEDICATED atomic-dab body (mediumVangogh / vangoghDab\n // below) \u2014 the prior profile-driven cascade (four dense layers of long-thin\n // tensor-oriented strokes) merged into the \"marbled flow-bands\" read and ran at ~4fps.\n // profileFor now serves ONLY the oil + oil-pastel stroke mediums; the MEDIUM_VANGOGH\n // case is removed (no caller). MEDIUM_VANGOGH stays #define'd (the main() dispatch +\n // isPainterlyStroke still key off uMedium==5).\n\n // \u2500\u2500 Oil-pastel \u2014 broad smeared directional strokes deposited via the brush engine\n // (slice 8 F1). Creamy soft edges (low hardness), heavy build-up, and a chroma punch.\n // Distinct from the dry-crayon tooth-multiply (mediumCrayon): oil-pastel LAYS strokes.\n if (medium == MEDIUM_OILPASTEL) {\n prof.shapeType = 0; // tapered directional smear \u2014 a round dab reads locally\n // isotropic (steep \u03B2 / low A); the creamy oil-pastel mark\n // is a broad DIRECTIONAL smear, which carries the \u00A74.2\n // coherence + adds the directional mid-band the \u00A74.3 slope\n // needs (the round-dab profile rolled \u03B2 off to \u22122.8)\n prof.bristleAmp = 0.10; // smooth creamy edges (waxy pastel, not bristle)\n prof.streakFreq = 18.0; // finer internal smear \u2014 adds the mid/high-band the smooth\n // round-dab profile lacked (the \u03B2-too-steep fix); the\n // directional along-spine streak flattens the \u00A74.3 slope\n // without crossing the strokes\n prof.streakAmp = 0.20;\n prof.impastoAmp = 0.7; // build-up, but flatter than oil impasto\n prof.hardness = 0.42; // CREAMY \u2014 soft compositing, strokes blend on overlap\n prof.toothScale = 280.0;\n prof.toothAmp = 0.12; // the pastel tooth reads stronger\n prof.pigmentSat = 0.80; // the waxy chroma \u2014 eased off 1.16 so the rendered C clears\n // the \u00A74.1 band ceiling with margin while the K-M subtractive\n // overlap path (paintOverOklab) keeps the chroma OFF the grey floor\n prof.hardness = 0.58; // creamy but the strokes still REGISTER \u2014 a too-soft blend\n // (0.42) smeared the marks into the smooth colour zones and\n // the field rolled off too steep (\u03B2\u2248\u22122.9, a near-gradient);\n // a crisper deposit keeps the mid/high-band the \u22125/3 slope needs\n prof.densityBig = 0.62; // broad directional coverage \u2014 but NOT over-dense: too many\n // overlapping creamy strokes point in slightly-varied\n // directions and the local \u00A74.2 coherence DROPS (over-dense\n // measured A=0.57 < the 0.62-density A=0.63). The mid-density\n // flow-aligned deposit is the coherence sweet spot.\n prof.densityMed = 0.78;\n prof.densitySml = 0.90;\n prof.energyGrade = 0.80; // a strong Starry-Night length cascade \u2014 varies stroke length\n // by luma/coherence so the dab-size energy spreads across\n // scales (the \u22125/3 cascade the uniform-length 0.0 grade lacked,\n // the \u00A74.3 \u03B2-too-steep fix). Not the full van-Gogh 1.0 (oil-\n // pastel keeps its creamy broad character).\n prof.impastoFloor = 0.55; // a softer crown than van-Gogh's full-height glint\n return prof;\n }\n\n // \u2500\u2500 Oil sub-modes (mode dispatch on the oil medium).\n if (mode == 1) { // palette knife \u2014 razor edges, heavy impasto\n prof.shapeType = 3; // flat, even\n prof.bristleAmp = 0.12;\n prof.streakFreq = 4.0; prof.streakAmp = 0.05;\n prof.impastoAmp = 1.6;\n prof.hardness = 0.95;\n prof.toothAmp = 0.04;\n prof.densityBig = 0.80; prof.densityMed = 0.88; prof.densitySml = 0.70;\n } else if (mode == 3) { // thick brushwork \u2014 heavy bristle brush\n prof.shapeType = 0; // tapered\n prof.bristleAmp = 0.32;\n prof.streakFreq = 14.0; prof.streakAmp = 0.14;\n prof.impastoAmp = 1.2;\n prof.hardness = 0.85;\n prof.toothAmp = 0.07;\n }\n return prof;\n}\n";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const OETF_WGSL = "\nfn srgbToLinearCh(c: f32) -> f32 {\n if (c <= 0.04045) { return c / 12.92; }\n return pow((c + 0.055) / 1.055, 2.4);\n}\nfn srgbToLinear(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(srgbToLinearCh(c.r), srgbToLinearCh(c.g), srgbToLinearCh(c.b));\n}\n\nfn linearToSrgbCh(c: f32) -> f32 {\n if (c <= 0.0031308) { return c * 12.92; }\n return 1.055 * pow(c, 1.0 / 2.4) - 0.055;\n}\nfn linearToSrgb(c: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(linearToSrgbCh(c.r), linearToSrgbCh(c.g), linearToSrgbCh(c.b));\n}";
|
|
2
|
+
export declare const FBM_ROT_WGSL = "const FBM_ROT: mat2x2<f32> = mat2x2<f32>(0.8, 0.6, -0.6, 0.8);";
|
|
3
|
+
export declare const OKLCH_MATRICES_WGSL = "\n// value.js LINEAR_SRGB_TO_LMS, row-major \u2192 WGSL columns (= the transpose).\nconst LINEAR_SRGB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 0.4122214708, 0.2119034982, 0.0883024619,\n 0.5363325363, 0.6806995451, 0.2817188376,\n 0.0514459929, 0.1073969566, 0.6299787005\n);\n\n// value.js srgbToOKLab's INLINE LMS\u2192OKLab coefficients, row-major \u2192 WGSL columns.\nconst LMS_TO_OKLAB: mat3x3<f32> = mat3x3<f32>(\n 0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660\n);\n\n// value.js OKLAB_TO_LMS_COEFF, row-major \u2192 WGSL columns.\nconst OKLAB_TO_LMS: mat3x3<f32> = mat3x3<f32>(\n 1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480\n);\n\n// value.js LMS_TO_LINEAR_SRGB, row-major \u2192 WGSL columns.\nconst LMS_TO_LINEAR_SRGB: mat3x3<f32> = mat3x3<f32>(\n 4.0767416621, -1.2684380046, -0.0041960863,\n -3.3077115913, 2.6097574011, -0.7034186147,\n 0.2309699292, -0.3413193965, 1.7076147010\n);\n\nfn cbrt3(v: vec3<f32>) -> vec3<f32> {\n return sign(v) * pow(abs(v), vec3<f32>(1.0 / 3.0));\n}\n\n// Gamma sRGB \u2192 raw OKLab (L, a, b). Mirrors value.js srgbToOKLab.\nfn srgbToOklab(c: vec3<f32>) -> vec3<f32> {\n let lin = srgbToLinear(c);\n let lms = LINEAR_SRGB_TO_LMS * lin;\n return LMS_TO_OKLAB * cbrt3(lms);\n}\n\n// Raw OKLab (L, a, b) \u2192 linear sRGB. Mirrors value.js oklabToLinearSRGB.\nfn oklabToLinearSrgb(lab: vec3<f32>) -> vec3<f32> {\n let lms_ = OKLAB_TO_LMS * lab;\n let lms = lms_ * lms_ * lms_;\n return LMS_TO_LINEAR_SRGB * lms;\n}\n\n// OKLab \u2192 OKLCh: H in RADIANS, folded to [0, 2pi). Mirrors value.js rawOklabToOklch.\nfn oklabToOklch(lab: vec3<f32>) -> vec3<f32> {\n let C = length(lab.yz);\n var H = atan2(lab.z, lab.y);\n if (H < 0.0) { H = H + 2.0 * PI; }\n return vec3<f32>(lab.x, C, H);\n}\n\n// OKLCh (H radians) \u2192 OKLab. Mirrors value.js rawOklchToOklab.\nfn oklchToOklab(lch: vec3<f32>) -> vec3<f32> {\n return vec3<f32>(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}";
|
|
4
|
+
export declare const PALETTE_RAMP_WGSL = "\n// value.js interpolateHue in the NORMALIZED-TURNS domain. methods: 0 shorter,\n// 1 longer, 2 increasing, 3 decreasing.\nfn interpolateHueTurns(h0: f32, h1: f32, t: f32, method: i32) -> f32 {\n let TAU = 2.0 * PI;\n var a = h0 / TAU;\n var b = h1 / TAU;\n let i = b - a;\n if (method == 0) { // shorter\n if (i > 0.5) { a = a + 1.0; } else if (i < -0.5) { b = b + 1.0; }\n } else if (method == 1) { // longer\n if (i > 0.0 && i < 0.5) { a = a + 1.0; } else if (i > -0.5 && i <= 0.0) { b = b + 1.0; }\n } else if (method == 2) { // increasing\n if (i < 0.0) { b = b + 1.0; }\n } else { // decreasing\n if (i > 0.0) { a = a + 1.0; }\n }\n var r = a + t * (b - a);\n r = fract(r); // fract is non-negative in WGSL\n return r * TAU; // back to radians\n}\n\n// Linear-sRGB endpoint pair \u2192 OKLab-rectangular interpolation \u2192 linear sRGB.\nfn mixPaletteOklab(linA: vec3<f32>, linB: vec3<f32>, t: f32) -> vec3<f32> {\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linA);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linB);\n let lab = mix(labA, labB, t);\n return oklabToLinearSrgb(lab);\n}\n\n// Linear-sRGB endpoint pair \u2192 OKLCh hue-arc interpolation \u2192 linear sRGB.\nfn mixPaletteOklchArc(linA: vec3<f32>, linB: vec3<f32>, t: f32, method: i32) -> vec3<f32> {\n let labA = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linA);\n let labB = LMS_TO_OKLAB * cbrt3(LINEAR_SRGB_TO_LMS * linB);\n let lchA = oklabToOklch(labA);\n let lchB = oklabToOklch(labB);\n let L = mix(lchA.x, lchB.x, t);\n let C = mix(lchA.y, lchB.y, t);\n let H = interpolateHueTurns(lchA.z, lchB.z, t, method);\n return oklabToLinearSrgb(oklchToOklab(vec3<f32>(L, C, H)));\n}\n\n// The ramp dispatcher (the samplePalette splices it). tRaw is the raw inter-stop\n// parameter [0,1]; the smoothstep ease + the huePath branch live here so the ramp is\n// one source. increasing(2)/decreasing(3) take the OKLCh hue-arc; every other method\n// takes the OKLab-rectangular straight line.\nfn samplePaletteRamp(a: vec3<f32>, b: vec3<f32>, tRaw: f32, huePath: i32) -> vec3<f32> {\n let t = smoothstep(0.0, 1.0, tRaw);\n if (huePath == 2 || huePath == 3) {\n return mixPaletteOklchArc(a, b, t, huePath);\n }\n return mixPaletteOklab(a, b, t);\n}";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
export { default as Aurora } from "./Aurora.vue";
|
|
2
|
-
export { resolveRenderMode, type AuroraRenderMode } from "./constants/renderMode";
|
|
2
|
+
export { resolveRenderMode, isSoftwareWebGLRenderer, type AuroraRenderMode, type ResolveRenderModeOptions, } from "./constants/renderMode";
|
|
3
3
|
export { useAurora } from "./composables/useAurora";
|
|
4
4
|
export type { UseAuroraReturn } from "./composables/useAurora";
|
|
5
5
|
export { useCursorInteraction } from "./composables/useCursorInteraction";
|
|
6
6
|
export { createAurora } from "./composables/runtime";
|
|
7
7
|
export type { AuroraRuntimeMode, AuroraRuntimeOptions } from "./composables/runtime";
|
|
8
|
-
export { DEFAULT_AURORA_CONFIG, MAX_NUCLEI, MAX_STOPS, type AuroraConfig, type AuroraCursorApi, type AuroraFlow, type AuroraInstance, type AuroraInteractivity, type AuroraMedium, type AuroraNucleus, type FlowPattern, type OklchStop, type StrokeMode, type StrokeOrient, type WarpMode, } from "./constants/presets";
|
|
8
|
+
export { DEFAULT_AURORA_CONFIG, PAPER_WASH_GROUND, MAX_NUCLEI, MAX_STOPS, type AuroraConfig, type AuroraCursorApi, type AuroraFlow, type AuroraInstance, type AuroraInteractivity, type AuroraMedium, type AuroraNucleus, type FlowPattern, type OklchStop, type StrokeMode, type StrokeOrient, type WarpMode, } from "./constants/presets";
|
|
9
9
|
export { resolveAtoms, configToAtoms, nucleiPrior, DEFAULT_ATOMS, type AuroraAtoms, type AuroraMotionAtom, type AuroraZones, type AuroraZoneArrangement, type AuroraMediumAtom, type AuroraInteractivityAtom, } from "./composables/atoms";
|
|
10
10
|
export { cssToOklch, deriveAurora, flattenPalette, hexToOklchStop, oklchStopToHex, oklchToLinear, paletteToCssGradient, } from "./composables/color";
|
|
11
|
+
export { auroraFallbackGround, sampleAuroraField, nucleiFieldStatic, relativeLuminance, type AuroraFallbackGround, type AuroraFallbackGroundOptions, type AuroraGroundMetrics, } from "./composables/auroraFallbackGround";
|
|
11
12
|
export type { AuroraHarmony, DeriveAuroraOptions, DeriveEasing, } from "./composables/color";
|
|
12
13
|
export type { AuroraHuePath } from "./constants/presets";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type BorderProgressCoverage, type BorderProgressMilestone, type BorderProgressMilestoneEvent } from "./constants";
|
|
2
|
+
export interface BorderProgressProps {
|
|
3
|
+
/** The progress scalar. 0..1 (or 0..`max`) drives the registered conic angle. */
|
|
4
|
+
value: number;
|
|
5
|
+
/** The value-axis ceiling. Default `1` (a 0..1 scalar; pass `100` for percent). */
|
|
6
|
+
max?: number;
|
|
7
|
+
/** `full-ring` (default) sweeps the perimeter; `bottom-edge` paints only the bottom band. */
|
|
8
|
+
coverage?: BorderProgressCoverage;
|
|
9
|
+
/**
|
|
10
|
+
* The conic color stops — CSS color strings. Default the LIBRARY brand ramp
|
|
11
|
+
* (the `--section-color-*`/`--viz-*` tokens, resolved in the cascade). A
|
|
12
|
+
* consumer passes its OWN phase palette (presets-in-consumers — no consumer
|
|
13
|
+
* hue enters a library token). CONCRETE anchors are walked OKLCH/shorter-hue;
|
|
14
|
+
* `var(--…)` token anchors pass through to the live cascade.
|
|
15
|
+
*/
|
|
16
|
+
stops?: readonly string[];
|
|
17
|
+
/** The ring thickness in px (default within the 10-14px envelope). */
|
|
18
|
+
width?: number;
|
|
19
|
+
/** The host border-radius in px the ring follows. Default 16. */
|
|
20
|
+
radius?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Phase-edge boundaries. The ring fires `milestone` + (PRM-gated) pulses when
|
|
23
|
+
* `value` crosses one. The consumer owns the phase colors (the chassis
|
|
24
|
+
* `--phase-color` cascade precedent — the milestone is the EVENT seam).
|
|
25
|
+
*/
|
|
26
|
+
milestones?: readonly BorderProgressMilestone[];
|
|
27
|
+
/** Pass-through class on the root. */
|
|
28
|
+
class?: string;
|
|
29
|
+
}
|
|
30
|
+
declare var __VLS_1: {};
|
|
31
|
+
type __VLS_Slots = {} & {
|
|
32
|
+
default?: (props: typeof __VLS_1) => any;
|
|
33
|
+
};
|
|
34
|
+
declare const __VLS_base: import("vue").DefineComponent<BorderProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
milestone: (event: BorderProgressMilestoneEvent) => any;
|
|
36
|
+
}, string, import("vue").PublicProps, Readonly<BorderProgressProps> & Readonly<{
|
|
37
|
+
onMilestone?: ((event: BorderProgressMilestoneEvent) => any) | undefined;
|
|
38
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type OklchStop } from "../../../../composables/color";
|
|
2
|
+
/**
|
|
3
|
+
* Walk the anchor ramp to the single OKLCh stop at parameter `t` (0..1) via the
|
|
4
|
+
* shorter-hue arc. The segment is located, then L/C lerp linearly and the hue
|
|
5
|
+
* walks value.js's `interpolateHue` in the normalized-turns domain (`/360` in,
|
|
6
|
+
* `*360` out — value.js takes turns, the `.5` short-arc threshold is a half-turn;
|
|
7
|
+
* the `deriveHue` leaf convention).
|
|
8
|
+
*
|
|
9
|
+
* Deterministic + DOM-free (SSR-safe; mirrors `deriveBlobPalette`).
|
|
10
|
+
*/
|
|
11
|
+
export declare function spectrumAt(stops: readonly OklchStop[], t: number): OklchStop;
|
|
12
|
+
/**
|
|
13
|
+
* Produce `samples` evenly-spaced HEX stops across the anchor ramp — the conic
|
|
14
|
+
* gradient's color stops, carrying no chroma trough across the sweep. The anchor
|
|
15
|
+
* stops are CSS color strings parsed via the leaf's `cssToOklch`; CSS `var(--…)`
|
|
16
|
+
* tokens (the LIBRARY-default brand ramp) are passed through UNTOUCHED (they
|
|
17
|
+
* resolve in the cascade at paint — the helper only walks CONCRETE color anchors).
|
|
18
|
+
*
|
|
19
|
+
* @returns one HEX (`#rrggbb`) per sample, or the raw `var()` strings when the
|
|
20
|
+
* anchors are CSS custom-property references (the token-cascade default).
|
|
21
|
+
*/
|
|
22
|
+
export declare function spectrumStops(stops: readonly string[], samples?: number): string[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The coverage axis — `full-ring` sweeps the entire border perimeter,
|
|
3
|
+
* `bottom-edge` paints ONLY the bottom border band (the literal C2 case: "the
|
|
4
|
+
* bottom progressbar should serve as a thicker, dynamic BORDER"). The two
|
|
5
|
+
* coverages share the ONE conic-mask mechanism (a `coverage`-scoped mask
|
|
6
|
+
* region — NOT a second recipe).
|
|
7
|
+
*/
|
|
8
|
+
export type BorderProgressCoverage = "full-ring" | "bottom-edge";
|
|
9
|
+
/**
|
|
10
|
+
* The thickness envelope (px). AMENDED 6-8px → 10-14px (speedtest AW v3 relay
|
|
11
|
+
* A1, 2026-06-17): the thin-hairline 6-8px read as a rim, not the "thicker,
|
|
12
|
+
* dynamic BORDER" the ask wants. The gate W4 + the π assert the band sits inside
|
|
13
|
+
* [10, 14].
|
|
14
|
+
*/
|
|
15
|
+
export declare const BORDER_PROGRESS_WIDTH_MIN = 10;
|
|
16
|
+
export declare const BORDER_PROGRESS_WIDTH_MAX = 14;
|
|
17
|
+
/** The default ring thickness — the centre of the 10-14px envelope. */
|
|
18
|
+
export declare const BORDER_PROGRESS_WIDTH_DEFAULT = 12;
|
|
19
|
+
/** The default host border-radius (px) the ring follows when unset by the consumer. */
|
|
20
|
+
export declare const BORDER_PROGRESS_RADIUS_DEFAULT = 16;
|
|
21
|
+
/**
|
|
22
|
+
* The number of conic stops the spectrum walk samples between the consumer's
|
|
23
|
+
* anchor stops. A denser sample yields a smoother sweep with no visible banding;
|
|
24
|
+
* the OKLCH/shorter-hue arc keeps every sample saturated (no chroma trough).
|
|
25
|
+
*/
|
|
26
|
+
export declare const BORDER_PROGRESS_SPECTRUM_SAMPLES = 24;
|
|
27
|
+
/**
|
|
28
|
+
* The LIBRARY-identity default spectrum — the section/viz brand ramp (the
|
|
29
|
+
* `--section-color-*` 13-stop ramp + the `--viz-*` twins). These resolve through
|
|
30
|
+
* the CSS token cascade at paint, so the default carries no baked hue; a consumer
|
|
31
|
+
* that wants its OWN phase palette passes its stops as the `stops` prop
|
|
32
|
+
* (presets-in-consumers — NO speedtest/ppmycota hue enters a library token).
|
|
33
|
+
*
|
|
34
|
+
* The default is a warm→cool brand arc (rose → indigo → violet) sampled off the
|
|
35
|
+
* 13-stop ramp so the resting ring already reads as "a spectrum of our colors".
|
|
36
|
+
*/
|
|
37
|
+
export declare const BORDER_PROGRESS_DEFAULT_SPECTRUM: readonly string[];
|
|
38
|
+
/**
|
|
39
|
+
* A phase-edge milestone descriptor — the consumer declares phase boundaries on
|
|
40
|
+
* the 0..1 (or 0..100) value axis; the ring fires a `milestone` event + (PRM-
|
|
41
|
+
* gated) pulses when the value crosses one. The chassis `--phase-color` cascade
|
|
42
|
+
* is the precedent (the bus carries phase IDENTITY; the milestone is the EVENT
|
|
43
|
+
* seam — the consumer owns the phase colors, presets-in-consumers).
|
|
44
|
+
*/
|
|
45
|
+
export interface BorderProgressMilestone {
|
|
46
|
+
/** The value-axis boundary (in the same units as `value`). */
|
|
47
|
+
at: number;
|
|
48
|
+
/** An opaque id echoed back on the `milestone` emit. */
|
|
49
|
+
id: string;
|
|
50
|
+
/** An optional label echoed back on the emit (analytics / a11y). */
|
|
51
|
+
label?: string;
|
|
52
|
+
}
|
|
53
|
+
/** The payload of the `milestone` emit — the crossed edge + the value at crossing. */
|
|
54
|
+
export interface BorderProgressMilestoneEvent {
|
|
55
|
+
/** The crossed milestone descriptor. */
|
|
56
|
+
milestone: BorderProgressMilestone;
|
|
57
|
+
/** The value at the moment of crossing (post-update). */
|
|
58
|
+
value: number;
|
|
59
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as BorderProgress } from "./BorderProgress.vue";
|
|
2
|
+
export type { BorderProgressProps } from "./BorderProgress.vue";
|
|
3
|
+
export type { BorderProgressCoverage, BorderProgressMilestone, BorderProgressMilestoneEvent, } from "./constants";
|
|
4
|
+
export { spectrumAt, spectrumStops } from "./composables/useBorderSpectrum";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "vue";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The chip edge size. `sm` = 28px, `md` = 32px (default). */
|
|
4
|
+
size?: "sm" | "md";
|
|
5
|
+
/** Render the uppercase hex code beside the swatch. Default `false`. */
|
|
6
|
+
showHex?: boolean;
|
|
7
|
+
class?: HTMLAttributes["class"];
|
|
8
|
+
};
|
|
9
|
+
type __VLS_ModelProps = {
|
|
10
|
+
modelValue?: string;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: string) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
size: "sm" | "md";
|
|
19
|
+
showHex: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ColorSwatch } from "./ColorSwatch.vue";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ConcentricConfig } from "./constants";
|
|
2
|
+
/**
|
|
3
|
+
* Concentric — a radial Fourier ring-interference field.
|
|
4
|
+
*
|
|
5
|
+
* Concentric ellipsoid rings whose interference is a sum of radial harmonics about
|
|
6
|
+
* one-or-more centers (the cited radial-Fourier math — `composables/ringField.ts`): the
|
|
7
|
+
* same Fourier-series vocabulary the dot-flow-field's wave potential uses, so the suite
|
|
8
|
+
* speaks ONE math language. WebGPU-FIRST: a pure fullscreen fragment pass (the aurora
|
|
9
|
+
* shape-class) evaluates `f(p,t) = Σ_j Σ_i A_i·sin(k_i·‖p−c_j‖_e − ω_i·t + φ_i)` per
|
|
10
|
+
* pixel, with a clean WebGL2 GLSL fallback where WebGPU is absent. It composes
|
|
11
|
+
* `useConcentric` → the `createGpuSubstrate` picker over the ONE canvas lifecycle leaf
|
|
12
|
+
* (offscreen-pause, live-PRM freeze, consumer-owned DPR) — it never bootstraps its own
|
|
13
|
+
* context.
|
|
14
|
+
*
|
|
15
|
+
* The DEFAULT palette is the warm-cream library identity; the demo themes the rings
|
|
16
|
+
* through a PRESET (presets-in-consumers — never a library token).
|
|
17
|
+
*/
|
|
18
|
+
type __VLS_Props = {
|
|
19
|
+
/** The full author schema (the studio's `useConfiguratorState` model). */
|
|
20
|
+
config?: ConcentricConfig;
|
|
21
|
+
/**
|
|
22
|
+
* The declarative WCAG-2.2.2 pause seam. `v-model:paused` parks the render loop
|
|
23
|
+
* (the substrate's `manual` suspend) when `true`. Wire `<DockBackgroundToggle>`'s
|
|
24
|
+
* `@update:paused` to this `v-model`.
|
|
25
|
+
*/
|
|
26
|
+
paused?: boolean;
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
29
|
+
pause: () => void;
|
|
30
|
+
resume: () => void;
|
|
31
|
+
wake: () => void;
|
|
32
|
+
renderAt: (timeSec: number) => void;
|
|
33
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
|
+
"update:paused": (value: boolean) => any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
36
|
+
"onUpdate:paused"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WebGLCanvasFrame } from "../../../../composables/glass/webgl/useWebGLCanvas";
|
|
2
|
+
import type { OklchStop } from "../../../../composables/color";
|
|
3
|
+
import { type ConcentricConfig } from "../constants";
|
|
4
|
+
export interface ConcentricGLSetupDeps {
|
|
5
|
+
canvas: HTMLCanvasElement;
|
|
6
|
+
config: ConcentricConfig;
|
|
7
|
+
getPalette: () => OklchStop[];
|
|
8
|
+
shouldContinue: () => boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Build the `setupGL(gl)` callback the `createGpuSubstrate` WebGL2 path invokes. */
|
|
11
|
+
export declare function createConcentricGLSetup(deps: ConcentricGLSetupDeps): (gl: WebGL2RenderingContext) => WebGLCanvasFrame;
|