lensfx 0.1.3 → 0.1.4

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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to `lensfx` will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.4] - 2026-10-17
9
+
10
+ ### Refactored
11
+ - Replaced internal `AaveGlass` with `src/primitives/Lens.tsx` as the core primitive component.
12
+ - Removed legacy `src/lib/glass/` directory and updated all internal component imports to `{ Lens }` from `../primitives/Lens`.
13
+
8
14
  ## [0.1.3] - 2026-10-17
9
15
 
10
16
  ### Added
package/dist/index.d.mts CHANGED
@@ -2,7 +2,7 @@ import { LensParams } from './vanilla.mjs';
2
2
  export { DEFAULT_LENS_PARAMS, DomeConstants, LensInstance, LensOptions, MapGeneratorInput, MapGeneratorOutput, QRRefractionRenderer, QRRendererOptions, SLIDER_DARK_OVERRIDES, SLIDER_GLASS_DEFAULTS, SLIDER_LIGHT_OVERRIDES, SLIDER_SAFARI_OVERRIDES, SWITCH_DARK_OVERRIDES, SWITCH_GLASS_DEFAULTS, SWITCH_LIGHT_OVERRIDES, VideoRefractionRenderer, VideoRendererOptions, colorMatrixValues, computeDomeConstants, createDisplacementMapGeneratorSync, createLens, domeGradient, erf, generateDisplacementMapAsync, getSvgMaskDataUri } from './vanilla.mjs';
3
3
  import React from 'react';
4
4
 
5
- interface AaveGlassProps {
5
+ interface LensProps {
6
6
  children?: React.ReactNode;
7
7
  lens?: Partial<LensParams>;
8
8
  x?: number | {
@@ -72,8 +72,8 @@ interface AaveGlassProps {
72
72
  className?: string;
73
73
  style?: React.CSSProperties;
74
74
  }
75
- declare function AaveGlass({ children, lens, x, y, lensW, lensH, borderRadius, autoBorderRadius, displacementMapUrl, overlay, showOutline, onLensMapChange, refractionTarget, tintColor, tintOpacity, tintBlur, shadowOpacity, restShadowOpacity, edgeBias, onGenerationTime, regenSettle, filterResolution, lenses, pauseOffscreen, offscreenMargin, className, style, ...restProps }: AaveGlassProps): React.JSX.Element;
76
- declare namespace AaveGlass {
75
+ declare function Lens({ children, lens, x, y, lensW, lensH, borderRadius, autoBorderRadius, displacementMapUrl, overlay, showOutline, onLensMapChange, refractionTarget, tintColor, tintOpacity, tintBlur, shadowOpacity, restShadowOpacity, edgeBias, onGenerationTime, regenSettle, filterResolution, lenses, pauseOffscreen, offscreenMargin, className, style, ...restProps }: LensProps): React.JSX.Element;
76
+ declare namespace Lens {
77
77
  var General: {
78
78
  Provider: ({ children }: {
79
79
  children: React.ReactNode;
@@ -158,4 +158,4 @@ interface GlassToggleGroupProps {
158
158
  }
159
159
  declare function GlassToggleGroup({ options, value: controlledValue, defaultValue, onValueChange, lens, theme, className, }: GlassToggleGroupProps): React.JSX.Element;
160
160
 
161
- export { AaveGlass as Lens, LensParams, type AaveGlassProps as LensProps, GlassSlider as LensSlider, type GlassSliderProps as LensSliderProps, GlassSwitch as LensSwitch, type GlassSwitchProps as LensSwitchProps, GlassToggleGroup as LensToggleGroup, type GlassToggleGroupProps as LensToggleGroupProps, type ToggleOption };
161
+ export { Lens, LensParams, type LensProps, GlassSlider as LensSlider, type GlassSliderProps as LensSliderProps, GlassSwitch as LensSwitch, type GlassSwitchProps as LensSwitchProps, GlassToggleGroup as LensToggleGroup, type GlassToggleGroupProps as LensToggleGroupProps, type ToggleOption };
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { LensParams } from './vanilla.js';
2
2
  export { DEFAULT_LENS_PARAMS, DomeConstants, LensInstance, LensOptions, MapGeneratorInput, MapGeneratorOutput, QRRefractionRenderer, QRRendererOptions, SLIDER_DARK_OVERRIDES, SLIDER_GLASS_DEFAULTS, SLIDER_LIGHT_OVERRIDES, SLIDER_SAFARI_OVERRIDES, SWITCH_DARK_OVERRIDES, SWITCH_GLASS_DEFAULTS, SWITCH_LIGHT_OVERRIDES, VideoRefractionRenderer, VideoRendererOptions, colorMatrixValues, computeDomeConstants, createDisplacementMapGeneratorSync, createLens, domeGradient, erf, generateDisplacementMapAsync, getSvgMaskDataUri } from './vanilla.js';
3
3
  import React from 'react';
4
4
 
5
- interface AaveGlassProps {
5
+ interface LensProps {
6
6
  children?: React.ReactNode;
7
7
  lens?: Partial<LensParams>;
8
8
  x?: number | {
@@ -72,8 +72,8 @@ interface AaveGlassProps {
72
72
  className?: string;
73
73
  style?: React.CSSProperties;
74
74
  }
75
- declare function AaveGlass({ children, lens, x, y, lensW, lensH, borderRadius, autoBorderRadius, displacementMapUrl, overlay, showOutline, onLensMapChange, refractionTarget, tintColor, tintOpacity, tintBlur, shadowOpacity, restShadowOpacity, edgeBias, onGenerationTime, regenSettle, filterResolution, lenses, pauseOffscreen, offscreenMargin, className, style, ...restProps }: AaveGlassProps): React.JSX.Element;
76
- declare namespace AaveGlass {
75
+ declare function Lens({ children, lens, x, y, lensW, lensH, borderRadius, autoBorderRadius, displacementMapUrl, overlay, showOutline, onLensMapChange, refractionTarget, tintColor, tintOpacity, tintBlur, shadowOpacity, restShadowOpacity, edgeBias, onGenerationTime, regenSettle, filterResolution, lenses, pauseOffscreen, offscreenMargin, className, style, ...restProps }: LensProps): React.JSX.Element;
76
+ declare namespace Lens {
77
77
  var General: {
78
78
  Provider: ({ children }: {
79
79
  children: React.ReactNode;
@@ -158,4 +158,4 @@ interface GlassToggleGroupProps {
158
158
  }
159
159
  declare function GlassToggleGroup({ options, value: controlledValue, defaultValue, onValueChange, lens, theme, className, }: GlassToggleGroupProps): React.JSX.Element;
160
160
 
161
- export { AaveGlass as Lens, LensParams, type AaveGlassProps as LensProps, GlassSlider as LensSlider, type GlassSliderProps as LensSliderProps, GlassSwitch as LensSwitch, type GlassSwitchProps as LensSwitchProps, GlassToggleGroup as LensToggleGroup, type GlassToggleGroupProps as LensToggleGroupProps, type ToggleOption };
161
+ export { Lens, LensParams, type LensProps, GlassSlider as LensSlider, type GlassSliderProps as LensSliderProps, GlassSwitch as LensSwitch, type GlassSwitchProps as LensSwitchProps, GlassToggleGroup as LensToggleGroup, type GlassToggleGroupProps as LensToggleGroupProps, type ToggleOption };
package/dist/index.js CHANGED
@@ -1695,7 +1695,7 @@ var RefractionGroupContext = React.createContext({
1695
1695
  gap: 0
1696
1696
  });
1697
1697
  var BLANK_1PX_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
1698
- function AaveGlass({
1698
+ function Lens({
1699
1699
  children,
1700
1700
  lens,
1701
1701
  x = 0.5,
@@ -2425,7 +2425,7 @@ function AaveGlass({
2425
2425
  }
2426
2426
  );
2427
2427
  }
2428
- AaveGlass.General = {
2428
+ Lens.General = {
2429
2429
  Provider: ({ children }) => {
2430
2430
  const activeLens = React.useRef(null);
2431
2431
  const version = React.useRef(0);
@@ -2790,7 +2790,7 @@ function GlassSwitch({
2790
2790
  }
2791
2791
  ),
2792
2792
  /* @__PURE__ */ jsxRuntime.jsx(
2793
- AaveGlass,
2793
+ Lens,
2794
2794
  {
2795
2795
  lens: activeLensParams,
2796
2796
  x: normalizedLensX,
@@ -3243,7 +3243,7 @@ function GlassSlider({
3243
3243
  userSelect: "none"
3244
3244
  },
3245
3245
  children: /* @__PURE__ */ jsxRuntime.jsx(
3246
- AaveGlass,
3246
+ Lens,
3247
3247
  {
3248
3248
  lens: activeLensParams,
3249
3249
  x: normalizedLensX,
@@ -3542,7 +3542,7 @@ function GlassToggleGroup({
3542
3542
  border: "1px solid var(--border-1, rgba(255, 255, 255, 0.08))"
3543
3543
  },
3544
3544
  children: /* @__PURE__ */ jsxRuntime.jsx(
3545
- AaveGlass,
3545
+ Lens,
3546
3546
  {
3547
3547
  lens: { ...DEFAULT_TOGGLE_LENS, ...lens, specularDark: !isDark },
3548
3548
  x: lensX,
@@ -3653,7 +3653,7 @@ function GlassToggleGroup({
3653
3653
  }
3654
3654
 
3655
3655
  exports.DEFAULT_LENS_PARAMS = DEFAULT_LENS_PARAMS;
3656
- exports.Lens = AaveGlass;
3656
+ exports.Lens = Lens;
3657
3657
  exports.LensSlider = GlassSlider;
3658
3658
  exports.LensSwitch = GlassSwitch;
3659
3659
  exports.LensToggleGroup = GlassToggleGroup;