lensfx 0.1.1 → 0.1.2

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
@@ -1,53 +1,59 @@
1
- # Changelog
2
-
3
- All notable changes to `lensfx` will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [0.1.1] - 2026-10-17
9
-
10
- ### Added
11
-
12
- #### Engine Layer (`lensfx`)
13
- - Pure mathematical optics engine:
14
- - Error function (`erf`) calculation for Gaussian surface profiles.
15
- - Optical dome constant calculation (`computeDomeConstants`).
16
- - Radial gradient generation for spherical dome profiles (`domeGradient`).
17
- - SVG `feColorMatrix` calculation for aspect ratio corrections (`colorMatrixValues`).
18
- - SVG mask URI generation for rounded-rectangle lens clipping (`getSvgMaskDataUri`).
19
- - Real-time and asynchronous displacement map generator (`createDisplacementMapGeneratorSync`, `generateDisplacementMapAsync`).
20
- - Pre-calibrated lens optical constants (`SWITCH_GLASS_DEFAULTS`, `SLIDER_GLASS_DEFAULTS`, dark/light theme overrides).
21
-
22
- #### Primitives Layer
23
- - `<Lens>` unstyled behavioral glass component:
24
- - SVG `feDisplacementMap` real-time DOM refraction (preserves text selection, pointer events, form inputs).
25
- - Chromatic aberration separation (red, green, blue optical channels).
26
- - Multi-lens context support (`Lens.General` / `Lens.Group`) for sharing one background across multiple moving lenses.
27
- - Offscreen generation pausing (`pauseOffscreen`) via `IntersectionObserver`.
28
- - Motion value interpolation for 60fps gesture and scroll-driven physics via Framer Motion.
29
-
30
- #### Components Layer
31
- - `<LensSwitch>` accessible glass toggle switch with spring physics, keyboard support (Space / Enter), and full controlled/uncontrolled state.
32
- - `<LensSlider>` accessible optical glass range slider with tick quantization, track fill refraction, and thumb dome physics.
33
- - `<LensToggleGroup>` segmented radio control with real-time sliding optical lens and glowing active indicator.
34
-
35
- #### WebGL Layer
36
- - `VideoRefractionRenderer` WebGL 1 shader fallback for live HTML5 `<video>` elements on WebKit / Safari.
37
- - `QRRefractionRenderer` WebGL 2 (#version 300 es) interactive QR code refraction engine with O(1) uniform texture lookup.
38
-
39
- #### Design Tokens
40
- - Design token stylesheet `lensfx/styles` (`dist/lensfx.css`) providing namespaced CSS custom properties (`--lensfx-*`) for colors, radii, shadows, animations, auto dark-mode (`prefers-color-scheme`), and accessibility (`prefers-reduced-motion`, `:focus-visible`).
41
-
42
- #### Developer Experience & Tooling
43
- - Dual ESM and CJS bundle output with TypeScript declarations (`tsup`).
44
- - `"use client"` directive injection for Next.js App Router (RSC) compatibility.
45
- - Tree-shaking enabled with `sideEffects: ["*.css"]`.
46
- - Comprehensive Vitest unit & integration test suite (50 tests covering pure math, switch, slider, and toggle group).
47
- - Size-limit bundle gate (core engine < 10 kB, full library < 80 kB).
48
- - GitHub Actions CI workflow for type checking, testing, building, and bundle size tracking.
49
-
50
- ## [0.1.0] - 2026-10-16
51
-
52
- ### Added
53
- - Initial experimental release of reverse-engineered glass simulation engine.
1
+ # Changelog
2
+
3
+ All notable changes to `lensfx` will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.2] - 2026-10-17
9
+
10
+ ### Changed
11
+ - Refined package description and registry metadata to emphasize clean optical physics, real DOM refraction, and SVG filter mechanics.
12
+ - Cleaned up internal documentation and comments across engine and primitive layers.
13
+
14
+ ## [0.1.1] - 2026-10-17
15
+
16
+ ### Added
17
+
18
+ #### Engine Layer (`lensfx`)
19
+ - Pure mathematical optics engine:
20
+ - Error function (`erf`) calculation for Gaussian surface profiles.
21
+ - Optical dome constant calculation (`computeDomeConstants`).
22
+ - Radial gradient generation for spherical dome profiles (`domeGradient`).
23
+ - SVG `feColorMatrix` calculation for aspect ratio corrections (`colorMatrixValues`).
24
+ - SVG mask URI generation for rounded-rectangle lens clipping (`getSvgMaskDataUri`).
25
+ - Real-time and asynchronous displacement map generator (`createDisplacementMapGeneratorSync`, `generateDisplacementMapAsync`).
26
+ - Pre-calibrated lens optical constants (`SWITCH_GLASS_DEFAULTS`, `SLIDER_GLASS_DEFAULTS`, dark/light theme overrides).
27
+
28
+ #### Primitives Layer
29
+ - `<Lens>` unstyled behavioral glass component:
30
+ - SVG `feDisplacementMap` real-time DOM refraction (preserves text selection, pointer events, form inputs).
31
+ - Chromatic aberration separation (red, green, blue optical channels).
32
+ - Multi-lens context support (`Lens.General` / `Lens.Group`) for sharing one background across multiple moving lenses.
33
+ - Offscreen generation pausing (`pauseOffscreen`) via `IntersectionObserver`.
34
+ - Motion value interpolation for 60fps gesture and scroll-driven physics via Framer Motion.
35
+
36
+ #### Components Layer
37
+ - `<LensSwitch>` accessible glass toggle switch with spring physics, keyboard support (Space / Enter), and full controlled/uncontrolled state.
38
+ - `<LensSlider>` accessible optical glass range slider with tick quantization, track fill refraction, and thumb dome physics.
39
+ - `<LensToggleGroup>` segmented radio control with real-time sliding optical lens and glowing active indicator.
40
+
41
+ #### WebGL Layer
42
+ - `VideoRefractionRenderer` WebGL 1 shader fallback for live HTML5 `<video>` elements on WebKit / Safari.
43
+ - `QRRefractionRenderer` WebGL 2 (#version 300 es) interactive QR code refraction engine with O(1) uniform texture lookup.
44
+
45
+ #### Design Tokens
46
+ - Design token stylesheet `lensfx/styles` (`dist/lensfx.css`) providing namespaced CSS custom properties (`--lensfx-*`) for colors, radii, shadows, animations, auto dark-mode (`prefers-color-scheme`), and accessibility (`prefers-reduced-motion`, `:focus-visible`).
47
+
48
+ #### Developer Experience & Tooling
49
+ - Dual ESM and CJS bundle output with TypeScript declarations (`tsup`).
50
+ - `"use client"` directive injection for Next.js App Router (RSC) compatibility.
51
+ - Tree-shaking enabled with `sideEffects: ["*.css"]`.
52
+ - Comprehensive Vitest unit & integration test suite (50 tests covering pure math, switch, slider, and toggle group).
53
+ - Size-limit bundle gate (core engine < 10 kB, full library < 80 kB).
54
+ - GitHub Actions CI workflow for type checking, testing, building, and bundle size tracking.
55
+
56
+ ## [0.1.0] - 2026-10-16
57
+
58
+ ### Added
59
+ - Initial experimental release of optical glass refraction engine.