@su-labs/font-size 22.1.0 → 22.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ ## [22.2.0] - 2026-11-07
11
+
12
+ ### Added
13
+ - `storage` option: where the size is saved (default: `localStorage`); pass `createSuCookieStorage({ domain })` from `@su-labs/core` to share it across subdomains
14
+
15
+ ### Changed
16
+ - Requires `@su-labs/core` 1.1.0 or later
17
+ - Package homepage now points to the website with a live demo
18
+
8
19
  ## [22.1.0] - 2026-11-05
9
20
 
10
21
  ### Changed
package/README.md CHANGED
@@ -197,6 +197,7 @@ type FontSizeConfig = {
197
197
  maxSize: number;
198
198
  step: number;
199
199
  storageKey?: string;
200
+ storage?: SuStorage; // Default: localStorage
200
201
  cssVarName?: string;
201
202
  };
202
203
  ```
@@ -209,7 +210,8 @@ type FontSizeConfig = {
209
210
  | `minSize` | Smallest allowed size | `10` |
210
211
  | `maxSize` | Largest allowed size | `22` |
211
212
  | `step` | Pixels added or removed by `increase()` / `decrease()` | `2` |
212
- | `storageKey` | The key used to persist the size in `localStorage` | `'su:font-size'` |
213
+ | `storageKey` | The key used to persist the size | `'su:font-size'` |
214
+ | `storage` | Where the size is saved. Use `createSuCookieStorage({ domain })` from `@su-labs/core` to share it across subdomains | `localStorage` |
213
215
  | `cssVarName` | CSS custom property set on `<html>` | `'--base-font-size'` |
214
216
 
215
217
  Invalid combinations are corrected: a maximum below the minimum is raised to the minimum, the default is clamped to the range, and a step of zero or less becomes `1`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@su-labs/font-size",
3
- "version": "22.1.0",
3
+ "version": "22.2.0",
4
4
  "description": "A lightweight Angular service for dynamic font size management.",
5
5
  "keywords": [
6
6
  "angular",
@@ -18,7 +18,7 @@
18
18
  "signals",
19
19
  "localstorage"
20
20
  ],
21
- "homepage": "https://github.com/Greezaaa/settings-utils-lib/tree/main/projects/su-labs/font-size#readme",
21
+ "homepage": "https://su-labs.dev/font-size/",
22
22
  "author": {
23
23
  "name": "Yevheniy Alekseyev",
24
24
  "email": "yev.alekseyev@gmail.com",
@@ -29,7 +29,7 @@
29
29
  "@angular/core": "^22.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "@su-labs/core": "^1.0.0",
32
+ "@su-labs/core": "^1.1.0",
33
33
  "tslib": "^2.3.0"
34
34
  },
35
35
  "repository": {
@@ -1,8 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import { OnDestroy } from "@angular/core";
3
3
  import { SuFontSizeConfig, SuFontSizeLimits } from "@su-labs/core/font-size";
4
- /** Font size configuration: limits and step in pixels, plus optional storage key and CSS variable name */
5
- export type FontSizeConfig = SuFontSizeLimits & Pick<SuFontSizeConfig, 'storageKey' | 'cssVarName'>;
4
+ /** Font size configuration: limits and step in pixels, plus optional storage, storage key and CSS variable name */
5
+ export type FontSizeConfig = SuFontSizeLimits & Pick<SuFontSizeConfig, 'storage' | 'storageKey' | 'cssVarName'>;
6
6
  /**
7
7
  * Angular service for managing the font size.
8
8
  *