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 +59 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/lensfx.css +1 -1
- package/package.json +2 -2
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.
|
|
9
|
-
|
|
10
|
-
###
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
- SVG
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
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.
|