@su-labs/font-size 1.0.4 → 21.0.5

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 ADDED
@@ -0,0 +1,50 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [21.0.5] - 2026-02-04
9
+
10
+ ### Changed
11
+ - Update README.md
12
+
13
+ ## [21.0.4] - 2026-02-03
14
+
15
+ ### Changed
16
+ - **BREAKING:** Updated to Angular 21 support. This version requires Angular 21.0.0 or higher.
17
+ - Updated peer dependencies to `@angular/common: ^21.0.0` and `@angular/core: ^21.0.0`.
18
+ - Aligned package version with Angular major version for clearer compatibility (v21.x.x = Angular 21 support).
19
+
20
+ ### Notes
21
+ - Projects using Angular 20 or below should continue using version 1.0.3.
22
+ - This release maintains full backward compatibility with the 1.x API - only the Angular version requirement has changed.
23
+
24
+
25
+ ## [1.0.4] - 2025-08-30
26
+
27
+ ### Fixed
28
+ - Ensured `"license": "MIT"` is correctly reflected in the published package metadata.
29
+
30
+ ## [1.0.3] - 2025-08-30
31
+
32
+ ### Note
33
+ - This version was published with incorrect package content and is deprecated. Please use `1.0.4`.
34
+
35
+ ## [1.0.2] - 2025-08-26
36
+
37
+ ### Changed
38
+ - Refactored project structure to a monorepo, separating `font-size` into its own distributable package.
39
+ - Updated documentation (`README.md`) with comprehensive installation, usage, and configuration guides.
40
+ - Improved `package.json` with standard fields: `keywords`, `author`, `license`, `repository`, `homepage`, and `bugs`.
41
+
42
+ ## [0.0.1] - 2025-08-26
43
+ ### Added
44
+ - Initial release of the `FontSizeService` library.
45
+ - `FontSizeService` with methods for increase, decrease, reset, and configure.
46
+ - `FontSizeConfig` interface for service configuration.
47
+ - Reactive `signals` (`fontSize`, `isDefault`, `isMax`, `isMin`).
48
+ - Persistence of font size in `localStorage`.
49
+ - Application of font size via CSS custom property.
50
+ - Unit tests with Vitest.
package/README.md CHANGED
@@ -1,21 +1,61 @@
1
- # FontSizeService
2
-
3
- A lightweight Angular service for dynamic font size management. Easily increase, decrease, or reset font sizes in your Angular applications, with persistent settings in `localStorage`. Designed as a reusable library for multiple projects.
1
+ # Font Size
2
+
3
+ `@su-labs/font-size`
4
+
5
+ ![Angular](https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white)
6
+ ![Angular Version](https://img.shields.io/badge/Angular-v21-DD0031?style=for-the-badge&logo=angular&logoColor=white)
7
+ ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
8
+ ![License](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)
9
+ ![NPM](https://img.shields.io/badge/NPM-CB3837?style=for-the-badge&logo=npm&logoColor=white)
10
+ ![Size](https://img.shields.io/badge/Size-Small-green.svg?style=for-the-badge)
11
+ ![Downloads](https://img.shields.io/npm/dt/@su-labs/font-size?style=for-the-badge)
12
+ ![Version](https://img.shields.io/npm/v/@su-labs/font-size?style=for-the-badge)
13
+
14
+ An accessible Angular service for managing font size preferences. Provides reactive controls for text scaling, user preference persistence, and WCAG-compliant font size management.
15
+
16
+ ## 📚 Table of Contents
17
+
18
+ - [Why Use This Library?](#-why-use-this-library)
19
+ - [Features](#features)
20
+ - [Installation](#installation)
21
+ - [Quick Start](#-quick-start)
22
+ - [Usage](#usage)
23
+ - [API Reference](#-api-reference)
24
+ - [Configuration Options](#configuration-options)
25
+ - [Accessibility](#accessibility)
26
+ - [Browser Compatibility](#-browser-compatibility)
27
+ - [Related Libraries](#-related-libraries)
28
+ - [Troubleshooting](#-troubleshooting)
29
+ - [Support](#-support)
30
+ - [Contributing](#contributing)
31
+ - [License](#license)
32
+
33
+ ## 💡 Why Use This Library?
34
+
35
+ - 🎯 **Lightweight** - Minimal bundle size
36
+ - ⚡ **Reactive** - Built with Angular Signals
37
+ - ♿ **Accessible** - WCAG 2.1 AA compliant
38
+ - 💾 **Persistent** - Remembers user preference
39
+ - 🎨 **CSS Variables** - Modern implementation
40
+ - 🔒 **Type-Safe** - Full TypeScript support
41
+ - 📦 **Zero Dependencies** - No bloat
42
+ - 🧪 **Well Tested** - Comprehensive test coverage
43
+ - 📝 **Well Documented** - Clear examples and API docs
4
44
 
5
45
  ## Features
6
46
 
7
- - Set a default font size and apply it globally.
8
- - Increase or decrease font size with configurable step.
9
- - Reset to default font size.
10
- - Automatically persist user preferences in `localStorage`.
11
- - Provides reactive `Signal`s to integrate with Angular's reactive system.
12
- - Limits font size to configurable minimum and maximum values.
47
+ * **Reactive State**: Uses Angular signals for efficient, reactive font size management.
48
+ * **Persistence**: Remembers the user's font size preference using `localStorage`.
49
+ * **Multiple Presets**: Support for small, normal, large, and extra-large font sizes.
50
+ * **CSS Variables**: Applies font sizes using CSS custom properties for maximum flexibility.
51
+ * **Accessibility**: Helps users with visual impairments customize text size for better readability.
52
+ * **Configurable**: Customizable storage keys, CSS variable names, and size scales.
13
53
 
14
54
  ## Installation
15
55
 
16
56
  You can install this library via npm:
17
57
 
18
- ```bash
58
+ ```sh
19
59
  npm install @su-labs/font-size
20
60
  ```
21
61
 
@@ -24,123 +64,265 @@ npm install @su-labs/font-size
24
64
  This library requires the following peer dependencies:
25
65
 
26
66
  ```sh
27
- npm install @angular/common@^20.1.0 @angular/core@^20.1.0
67
+ npm install @angular/common@^21 @angular/core@^21
28
68
  ```
29
69
 
30
- ## Usage
31
- ### Provide the service in your application
32
-
33
- You can provide the service in your main.ts (or wherever your ApplicationConfig is defined) and initialize it automatically:
70
+ ## 🚀 Quick Start
34
71
 
35
72
  ```typescript
36
- export const appConfig: ApplicationConfig = {
37
- providers: [
38
- FontSizeService,
39
- provideAppInitializer(() => {
40
-
41
- const fontService = inject(FontSizeService);
42
- fontService.init(); // initializes font size from localStorage and applies CSS variable
43
- }),
44
- ],
45
- };
46
- ```
47
- Using the service in components
73
+ // 1. Install
74
+ npm install @su-labs/font-size
48
75
 
49
- Inject the service into any component and access reactive signals:
76
+ // 2. Initialize in app.config.ts
77
+ import { provideAppInitializer, inject } from '@angular/core';
78
+ import { SuFontSizeService } from '@su-labs/font-size';
50
79
 
51
- ```typescript
52
- import { Component, effect } from '@angular/core';
53
- import { FontSizeService } from '@su-labs/font-size';
80
+ export const appConfig = {
81
+ providers: [
82
+ provideAppInitializer(() => {
83
+ inject(SuFontSizeService).init();
84
+ }),
85
+ ],
86
+ };
87
+
88
+ // 3. Create font size controls
89
+ import { Component, inject } from '@angular/core';
90
+ import { SuFontSizeService } from '@su-labs/font-size';
54
91
 
55
92
  @Component({
56
- selector: 'app-example',
57
- template: `
58
- <div>
59
- <p>Current font size: {{ fontSize() }}</p>
60
- <button (click)="increase()">A+</button>
61
- <button (click)="decrease()">A-</button>
62
- <button (click)="reset()">Reset</button>
63
- </div>` ,
93
+ template: `
94
+ <button (click)="fontService.setSize('small')">A-</button>
95
+ <button (click)="fontService.setSize('normal')">A</button>
96
+ <button (click)="fontService.setSize('large')">A+</button>
97
+ <p>Current: {{ fontService.size() }}</p>
98
+ `
64
99
  })
100
+ export class AppComponent {
101
+ fontService = inject(SuFontSizeService);
102
+ }
65
103
 
66
- export class ExampleComponent {
67
- private fontService = inject(FontSizeService);
68
- fontSize = computed(() => this.fontService.fontSize());
69
-
70
- increase(step?: number) {
71
- this.fontService.increase(step);
72
- }
73
-
74
- decrease(step?: number) {
75
- this.fontService.decrease(step);
76
- }
77
-
78
- reset() {
79
- this.fontService.reset();
80
- }
104
+ // 4. Use CSS variables in your styles
105
+ body {
106
+ font-size: var(--su-font-size-base);
81
107
  }
82
108
  ```
83
109
 
84
- ### Optional configuration
110
+ ## Usage
85
111
 
86
- The service can be configured to fit your application's needs. You can customize the min/max/default font size, step, storage key, and CSS variable name by calling the `configure` method.
112
+ ### Example 1: Basic Font Size Controls
87
113
 
88
- | Option | Description | Default Value |
89
- |--------------|---------------------------------------------------------------------------------------------------------|-----------------|
90
- | `minSize` | The minimum allowed font size in pixels. | `10` |
91
- | `maxSize` | The maximum allowed font size in pixels. | `22` |
92
- | `defaultSize`| The initial font size and the value used for resetting. | `14` |
93
- | `step` | The number of pixels to increase or decrease the font size by. | `2` |
94
- | `storageKey` | The key used to persist the font size in `localStorage`. | `'su:font-size'`|
95
- | `cssVarName` | The name of the CSS custom property that will be applied to the `<html>` element. | `'--base-font-size'`|
114
+ ```typescript
115
+ import { Component, inject } from '@angular/core';
116
+ import { SuFontSizeService, FontSize } from '@su-labs/font-size';
96
117
 
97
- **Example:**
118
+ @Component({
119
+ selector: 'app-font-controls',
120
+ standalone: true,
121
+ template: `
122
+ <div class="font-controls">
123
+ <h3>Text Size</h3>
124
+ <div class="button-group">
125
+ @for (size of fontSizes; track size) {
126
+ <button
127
+ (click)="setFontSize(size)"
128
+ [class.active]="fontService.size() === size"
129
+ >
130
+ {{ size | titlecase }}
131
+ </button>
132
+ }
133
+ </div>
134
+ <p>Current size: {{ fontService.size() }}</p>
135
+ </div>
136
+ `,
137
+ styles: [`
138
+ .button-group button.active {
139
+ background-color: var(--su-theme-primary);
140
+ color: white;
141
+ }
142
+ `]
143
+ })
144
+ export class FontControlsComponent {
145
+ fontService = inject(SuFontSizeService);
146
+ fontSizes: FontSize[] = ['small', 'normal', 'large', 'x-large'];
98
147
 
99
- ```typescript
100
- this.fontService.configure({
101
- minSize: 12,
102
- maxSize: 24,
103
- defaultSize: 16,
104
- step: 2,
105
- storageKey: 'my-app-font-size',
106
- cssVarName: '--app-font-size'
107
- });
148
+ setFontSize(size: FontSize) {
149
+ this.fontService.setSize(size);
150
+ }
151
+ }
108
152
  ```
109
153
 
110
- ## Styling (CSS)
154
+ ### Example 2: Custom Configuration
111
155
 
112
- The service applies the current font size to a CSS custom property (variable) on the `<html>` element. By default, this is `--base-font-size`.
156
+ ```typescript
157
+ import { provideAppInitializer, inject } from '@angular/core';
158
+ import { SuFontSizeService, SuFontSizeConfig } from '@su-labs/font-size';
159
+
160
+ const fontConfig: SuFontSizeConfig = {
161
+ defaultSize: 'normal',
162
+ storageKey: 'myApp:fontSize',
163
+ cssVarPrefix: '--app-font-',
164
+ sizes: {
165
+ small: '14px',
166
+ normal: '16px',
167
+ large: '18px',
168
+ 'x-large': '20px'
169
+ }
170
+ };
171
+
172
+ export const appConfig = {
173
+ providers: [
174
+ provideAppInitializer(() => {
175
+ inject(SuFontSizeService).init(fontConfig);
176
+ }),
177
+ ],
178
+ };
179
+ ```
113
180
 
114
- To use this feature in your application's CSS, you should use this variable to define your font size, for example, in your `styles.scss` or `styles.css`:
181
+ ### Example 3: Using in Your Styles
115
182
 
116
183
  ```css
184
+ /* Global styles.css */
117
185
  :root {
118
- /* Define a fallback in case the service isn't initialized yet */
119
- --base-font-size: 14px;
186
+ --su-font-size-base: 16px;
187
+ --su-font-size-small: 14px;
188
+ --su-font-size-large: 18px;
120
189
  }
121
190
 
122
191
  body {
123
- font-size: var(--base-font-size);
192
+ font-size: var(--su-font-size-base);
193
+ }
194
+
195
+ h1 {
196
+ font-size: calc(var(--su-font-size-base) * 2);
197
+ }
198
+
199
+ h2 {
200
+ font-size: calc(var(--su-font-size-base) * 1.5);
201
+ }
202
+
203
+ .small-text {
204
+ font-size: var(--su-font-size-small);
205
+ }
206
+
207
+ .large-text {
208
+ font-size: var(--su-font-size-large);
124
209
  }
125
210
  ```
126
211
 
127
- Or, if you configured a different name:
212
+ ## 📖 API Reference
128
213
 
129
- CSS
130
- ```css
131
- body {
132
- font-size: var(--app-font-size);
214
+ ### Service (SuFontSizeService)
215
+
216
+ #### Signals
217
+
218
+ | Signal | Type | Description |
219
+ |--------|------|-------------|
220
+ | `size()` | `FontSize` | Current font size setting |
221
+
222
+ #### Methods
223
+
224
+ | Method | Parameters | Description |
225
+ |--------|------------|-------------|
226
+ | `init(config?)` | `SuFontSizeConfig` | Initialize with custom configuration |
227
+ | `setSize(size, persist?)` | `FontSize, boolean` | Change font size (persist defaults to true) |
228
+ | `getSize()` | - | Returns current font size |
229
+ | `increase()` | - | Increase to next larger size |
230
+ | `decrease()` | - | Decrease to next smaller size |
231
+
232
+ ### Types
233
+
234
+ ```typescript
235
+ type FontSize = 'small' | 'normal' | 'large' | 'x-large';
236
+
237
+ interface SuFontSizeConfig {
238
+ storageKey?: string; // Default: 'su:fontSize'
239
+ cssVarPrefix?: string; // Default: '--su-font-size-'
240
+ defaultSize?: FontSize; // Default: 'normal'
241
+ sizes?: {
242
+ [key in FontSize]?: string; // Custom pixel/rem values
243
+ };
133
244
  }
134
245
  ```
135
246
 
136
- This setup ensures that your font size is reactive, persistent, and easily configurable across your Angular app.
247
+ ## Configuration Options
248
+
249
+ | Option | Description | Default Value |
250
+ |--------|-------------|---------------|
251
+ | `storageKey` | The key used to persist font size in `localStorage` | `'su:fontSize'` |
252
+ | `cssVarPrefix` | Prefix for CSS variables | `'--su-font-size-'` |
253
+ | `defaultSize` | Default font size if none saved | `'normal'` |
254
+ | `sizes` | Custom size values (px, rem, em) | `{ small: '14px', normal: '16px', large: '18px', 'x-large': '20px' }` |
255
+
256
+ ## Accessibility
257
+
258
+ This library helps meet WCAG 2.1 guidelines:
259
+
260
+ - ✅ **Success Criterion 1.4.4** - Text can be resized up to 200% without loss of content or functionality
261
+ - ✅ **Success Criterion 1.4.8** - User can select foreground and background colors (when combined with theme management)
262
+ - ✅ **Success Criterion 1.4.12** - Text spacing is adjustable
263
+
264
+ ### Best Practices
265
+
266
+ 1. **Use relative units** - Consider using `rem` instead of `px` for better scaling
267
+ 2. **Test at all sizes** - Ensure your layout works at all font size settings
268
+ 3. **Provide clear controls** - Make font size controls easy to find and use
269
+ 4. **Persist preference** - Always save user preference (enabled by default)
270
+ 5. **Respect system settings** - Consider reading system font size preferences
271
+
272
+ ## 🌐 Browser Compatibility
273
+
274
+ Works in all modern browsers that support:
275
+ - ✅ CSS Custom Properties
276
+ - ✅ localStorage API
277
+ - ✅ Angular 21+
278
+ - ✅ ES2022+
279
+
280
+ | Browser | Version |
281
+ |---------|---------|
282
+ | Chrome | ≥ 90 |
283
+ | Firefox | ≥ 88 |
284
+ | Safari | ≥ 14 |
285
+ | Edge | ≥ 90 |
286
+
287
+ ## 🔗 Related Libraries
288
+
289
+ Part of the **@su-labs** suite:
290
+
291
+ - 👀 [@su-labs/visit-tracker](https://www.npmjs.com/package/@su-labs/visit-tracker) - User visit tracking
292
+ - 🎨 [@su-labs/theme](https://www.npmjs.com/package/@su-labs/theme) - Theme management with dark mode support
293
+ - 🔔 [@su-labs/notifications](https://www.npmjs.com/package/@su-labs/notifications) - Toast notification system
294
+ - 🔍 [@su-labs/scroll-spy](https://www.npmjs.com/package/@su-labs/scroll-spy) - Scroll position tracking
295
+
296
+ ## 🔧 Troubleshooting
297
+
298
+ ### Font size not persisting?
299
+
300
+ Make sure localStorage is enabled and not blocked by privacy settings.
301
+
302
+ ### CSS variables not updating?
303
+
304
+ Ensure you're using the correct prefix in your CSS (`--su-font-size-` by default) and that you've initialized the service.
305
+
306
+ ### Layout breaking at larger sizes?
307
+
308
+ Test your responsive design at all font sizes. Use relative units and flexible layouts.
309
+
310
+ ### TypeScript errors?
311
+
312
+ Ensure you have Angular 21+ and TypeScript 5.7+ installed.
313
+
314
+ ## 💬 Support
315
+
316
+ - 🐛 Found a bug? [Open an issue](https://github.com/Greezaaa/settings-utils-lib/issues)
317
+ - 💡 Have a feature request? [Start a discussion](https://github.com/Greezaaa/settings-utils-lib/discussions)
318
+ - ⭐ Like this library? [Give it a star!](https://github.com/Greezaaa/settings-utils-lib)
137
319
 
138
320
  ## Contributing
139
321
 
140
- If you find any bugs or have feature requests, please open an issue or submit a pull request on our GitHub repository.
322
+ If you find any bugs or have feature requests, please open an issue or submit a pull request on our [**GitHub repository**](https://github.com/Greezaaa/settings-utils-lib.git).
141
323
 
142
- To contribute code, please ensure your changes include unit tests using **Vitest** to maintain code quality.
324
+ To contribute code, please ensure your changes include unit tests to maintain code quality. Please see the main repository's `README.md` for details on the monorepo structure.
143
325
 
144
326
  ## License
145
327
 
146
- This project is licensed under the MIT License. See the [LICENSE](https://github.com/Greezaaa/settings-utils-lib/blob/main/projects/su-labs/font-size/LICENSE) file for details.
328
+ This project is licensed under the MIT License. See the [**LICENSE**](https://github.com/Greezaaa/settings-utils-lib/blob/main/projects/su-labs/font-size/LICENSE) file for details.
@@ -164,10 +164,10 @@ class FontSizeService {
164
164
  applyCssVar(size) {
165
165
  document.documentElement.style.setProperty(this.cssVarName, `${size}px`);
166
166
  }
167
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: FontSizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
168
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: FontSizeService, providedIn: 'root' });
167
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: FontSizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
168
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: FontSizeService, providedIn: 'root' });
169
169
  }
170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: FontSizeService, decorators: [{
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: FontSizeService, decorators: [{
171
171
  type: Injectable,
172
172
  args: [{ providedIn: 'root' }]
173
173
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"su-labs-font-size.mjs","sources":["../../../../projects/su-labs/font-size/src/lib/font-size.service.ts","../../../../projects/su-labs/font-size/src/public-api.ts","../../../../projects/su-labs/font-size/src/su-labs-font-size.ts"],"sourcesContent":["import { Injectable, signal, computed } from '@angular/core';\nimport { FontSizeConfig } from './font-size-config.interface';\n\n@Injectable({ providedIn: 'root' })\nexport class FontSizeService {\n /**\n * Default font size in pixels.\n * Can be overridden via {@link configure}.\n */\n defaultSize = signal(14);\n\n /**\n * Minimum allowed font size in pixels.\n * Can be overridden via {@link configure}.\n */\n minSize = signal(10);\n\n /**\n * Maximum allowed font size in pixels.\n * Can be overridden via {@link configure}.\n */\n maxSize = signal(22);\n\n /**\n * Default step value (in pixels) for increase/decrease operations.\n * Can be overridden via {@link configure} or per call in {@link increase} / {@link decrease}.\n */\n step = signal(2);\n\n /**\n * Key used for persisting the font size in localStorage.\n * Defaults to `\"app:font-size\"`.\n */\n private storageKey = 'su:font-size';\n\n /**\n * CSS custom property name where the font size is applied.\n * Defaults to `\"--base-font-size\"`.\n */\n private cssVarName = '--base-font-size';\n\n /**\n * Current font size state (reactive).\n */\n fontSize = signal<number>(this.readFromStorage());\n\n /**\n * True if current font size equals the default size.\n */\n isDefault = computed(() => this.fontSize() === this.defaultSize());\n\n /**\n * True if current font size equals the maximum size.\n */\n isMax = computed(() => this.fontSize() === this.maxSize());\n\n /**\n * True if current font size equals the minimum size.\n */\n isMin = computed(() => this.fontSize() === this.minSize());\n\n /**\n * Updates the configuration for font size handling.\n * Any omitted values will fall back to their defaults.\n *\n * @param cfg Partial configuration object (min, max, default, step, storage key, CSS variable name).\n */\n configure(cfg: Partial<FontSizeConfig> = {}): void {\n if (cfg.minSize !== undefined) this.minSize.set(cfg.minSize);\n if (cfg.maxSize !== undefined) this.maxSize.set(cfg.maxSize);\n if (cfg.defaultSize !== undefined) this.defaultSize.set(cfg.defaultSize);\n if (cfg.step !== undefined) this.step.set(cfg.step);\n if (cfg.storageKey) this.storageKey = cfg.storageKey;\n if (cfg.cssVarName) this.cssVarName = cfg.cssVarName;\n\n // Ensure logical invariants\n if (this.minSize() > this.maxSize()) this.maxSize.set(this.minSize());\n if (this.defaultSize() < this.minSize())\n this.defaultSize.set(this.minSize());\n if (this.defaultSize() > this.maxSize())\n this.defaultSize.set(this.maxSize());\n if (this.step() <= 0 || !Number.isFinite(this.step())) this.step.set(1);\n\n // Clamp current size after configuration changes\n this.fontSize.update((s) => this.clamp(s));\n }\n\n /**\n * Initializes the font size service.\n * Loads the persisted value (if available), clamps it,\n * applies it to the DOM, and updates internal state.\n * Should typically be called once at application startup.\n */\n init(): void {\n const size = this.readFromStorage();\n this.fontSize.set(this.clamp(size));\n this.applyCssVar(this.fontSize());\n }\n\n /**\n * Sets the font size to a specific value (clamped within min/max).\n *\n * @param size Desired font size in pixels.\n */\n setFontSize(size: number): void {\n const clamped = this.clamp(size);\n this.fontSize.set(clamped);\n this.applyCssVar(clamped);\n this.writeToStorage(clamped);\n }\n\n /**\n * Increases the font size.\n *\n * @param step Optional custom step (pixels). Falls back to configured {@link step} if omitted.\n */\n increase(step?: number): void {\n this.setFontSize(this.fontSize() + (step ?? this.step()));\n }\n\n /**\n * Decreases the font size.\n *\n * @param step Optional custom step (pixels). Falls back to configured {@link step} if omitted.\n */\n decrease(step?: number): void {\n this.setFontSize(this.fontSize() - (step ?? this.step()));\n }\n\n /**\n * Resets the font size to the configured {@link defaultSize}.\n * Also removes the persisted value from localStorage.\n */\n reset(): void {\n const d = this.defaultSize();\n this.fontSize.set(d);\n this.applyCssVar(d);\n localStorage.removeItem(this.storageKey);\n }\n\n /**\n * Clamps a given value between the configured {@link minSize} and {@link maxSize}.\n *\n * @param size Value to clamp.\n * @returns Clamped value within the allowed range.\n */\n private clamp(size: number): number {\n return Math.min(Math.max(size, this.minSize()), this.maxSize());\n }\n\n /**\n * Reads the font size from localStorage.\n * Falls back to {@link defaultSize} if no value is stored or value is invalid.\n *\n * @returns Stored font size or default.\n */\n private readFromStorage(): number {\n const stored = localStorage.getItem(this.storageKey);\n const parsed = stored ? Number(stored) : this.defaultSize();\n return Number.isFinite(parsed) ? parsed : this.defaultSize();\n }\n\n /**\n * Persists the current font size in localStorage.\n *\n * @param size Font size value to persist.\n */\n private writeToStorage(size: number): void {\n localStorage.setItem(this.storageKey, String(size));\n }\n\n /**\n * Applies the current font size to the DOM\n * using the configured CSS custom property name.\n *\n * @param size Font size value in pixels.\n */\n private applyCssVar(size: number): void {\n document.documentElement.style.setProperty(this.cssVarName, `${size}px`);\n }\n}\n","/*\n * Public API Surface of font-size\n */\n\nexport * from './lib/font-size.service';\nexport * from './lib/font-size-config.interface';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAIa,eAAe,CAAA;AAC1B;;;AAGG;AACH,IAAA,WAAW,GAAG,MAAM,CAAC,EAAE,uDAAC;AAExB;;;AAGG;AACH,IAAA,OAAO,GAAG,MAAM,CAAC,EAAE,mDAAC;AAEpB;;;AAGG;AACH,IAAA,OAAO,GAAG,MAAM,CAAC,EAAE,mDAAC;AAEpB;;;AAGG;AACH,IAAA,IAAI,GAAG,MAAM,CAAC,CAAC,gDAAC;AAEhB;;;AAGG;IACK,UAAU,GAAG,cAAc;AAEnC;;;AAGG;IACK,UAAU,GAAG,kBAAkB;AAEvC;;AAEG;IACH,QAAQ,GAAG,MAAM,CAAS,IAAI,CAAC,eAAe,EAAE,oDAAC;AAEjD;;AAEG;AACH,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,qDAAC;AAElE;;AAEG;AACH,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,OAAO,EAAE,iDAAC;AAE1D;;AAEG;AACH,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,OAAO,EAAE,iDAAC;AAE1D;;;;;AAKG;IACH,SAAS,CAAC,MAA+B,EAAE,EAAA;AACzC,QAAA,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC;AAC5D,QAAA,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS;YAAE,IAA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AAC;;AAGjE;;;;;AAKG;IACK,eAAe,GAAA;QACrB,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC;AACpD,QAAA,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE;AAC3D,QAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE;;AAG9D;;;;AAIG;AACK,IAAA,cAAc,CAAC,IAAY,EAAA;AACjC,QAAA,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;;AAGrD;;;;;AAKG;AACK,IAAA,WAAW,CAAC,IAAY,EAAA;AAC9B,QAAA,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,CAAA,EAAG,IAAI,CAAA,EAAA,CAAI,CAAC;;uGA9K/D,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA;;2FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACHlC;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"su-labs-font-size.mjs","sources":["../../../../projects/su-labs/font-size/src/lib/font-size.service.ts","../../../../projects/su-labs/font-size/src/public-api.ts","../../../../projects/su-labs/font-size/src/su-labs-font-size.ts"],"sourcesContent":["import { Injectable, signal, computed } from '@angular/core';\nimport { FontSizeConfig } from './font-size-config.interface';\n\n@Injectable({ providedIn: 'root' })\nexport class FontSizeService {\n /**\n * Default font size in pixels.\n * Can be overridden via {@link configure}.\n */\n defaultSize = signal(14);\n\n /**\n * Minimum allowed font size in pixels.\n * Can be overridden via {@link configure}.\n */\n minSize = signal(10);\n\n /**\n * Maximum allowed font size in pixels.\n * Can be overridden via {@link configure}.\n */\n maxSize = signal(22);\n\n /**\n * Default step value (in pixels) for increase/decrease operations.\n * Can be overridden via {@link configure} or per call in {@link increase} / {@link decrease}.\n */\n step = signal(2);\n\n /**\n * Key used for persisting the font size in localStorage.\n * Defaults to `\"app:font-size\"`.\n */\n private storageKey = 'su:font-size';\n\n /**\n * CSS custom property name where the font size is applied.\n * Defaults to `\"--base-font-size\"`.\n */\n private cssVarName = '--base-font-size';\n\n /**\n * Current font size state (reactive).\n */\n fontSize = signal<number>(this.readFromStorage());\n\n /**\n * True if current font size equals the default size.\n */\n isDefault = computed(() => this.fontSize() === this.defaultSize());\n\n /**\n * True if current font size equals the maximum size.\n */\n isMax = computed(() => this.fontSize() === this.maxSize());\n\n /**\n * True if current font size equals the minimum size.\n */\n isMin = computed(() => this.fontSize() === this.minSize());\n\n /**\n * Updates the configuration for font size handling.\n * Any omitted values will fall back to their defaults.\n *\n * @param cfg Partial configuration object (min, max, default, step, storage key, CSS variable name).\n */\n configure(cfg: Partial<FontSizeConfig> = {}): void {\n if (cfg.minSize !== undefined) this.minSize.set(cfg.minSize);\n if (cfg.maxSize !== undefined) this.maxSize.set(cfg.maxSize);\n if (cfg.defaultSize !== undefined) this.defaultSize.set(cfg.defaultSize);\n if (cfg.step !== undefined) this.step.set(cfg.step);\n if (cfg.storageKey) this.storageKey = cfg.storageKey;\n if (cfg.cssVarName) this.cssVarName = cfg.cssVarName;\n\n // Ensure logical invariants\n if (this.minSize() > this.maxSize()) this.maxSize.set(this.minSize());\n if (this.defaultSize() < this.minSize())\n this.defaultSize.set(this.minSize());\n if (this.defaultSize() > this.maxSize())\n this.defaultSize.set(this.maxSize());\n if (this.step() <= 0 || !Number.isFinite(this.step())) this.step.set(1);\n\n // Clamp current size after configuration changes\n this.fontSize.update((s) => this.clamp(s));\n }\n\n /**\n * Initializes the font size service.\n * Loads the persisted value (if available), clamps it,\n * applies it to the DOM, and updates internal state.\n * Should typically be called once at application startup.\n */\n init(): void {\n const size = this.readFromStorage();\n this.fontSize.set(this.clamp(size));\n this.applyCssVar(this.fontSize());\n }\n\n /**\n * Sets the font size to a specific value (clamped within min/max).\n *\n * @param size Desired font size in pixels.\n */\n setFontSize(size: number): void {\n const clamped = this.clamp(size);\n this.fontSize.set(clamped);\n this.applyCssVar(clamped);\n this.writeToStorage(clamped);\n }\n\n /**\n * Increases the font size.\n *\n * @param step Optional custom step (pixels). Falls back to configured {@link step} if omitted.\n */\n increase(step?: number): void {\n this.setFontSize(this.fontSize() + (step ?? this.step()));\n }\n\n /**\n * Decreases the font size.\n *\n * @param step Optional custom step (pixels). Falls back to configured {@link step} if omitted.\n */\n decrease(step?: number): void {\n this.setFontSize(this.fontSize() - (step ?? this.step()));\n }\n\n /**\n * Resets the font size to the configured {@link defaultSize}.\n * Also removes the persisted value from localStorage.\n */\n reset(): void {\n const d = this.defaultSize();\n this.fontSize.set(d);\n this.applyCssVar(d);\n localStorage.removeItem(this.storageKey);\n }\n\n /**\n * Clamps a given value between the configured {@link minSize} and {@link maxSize}.\n *\n * @param size Value to clamp.\n * @returns Clamped value within the allowed range.\n */\n private clamp(size: number): number {\n return Math.min(Math.max(size, this.minSize()), this.maxSize());\n }\n\n /**\n * Reads the font size from localStorage.\n * Falls back to {@link defaultSize} if no value is stored or value is invalid.\n *\n * @returns Stored font size or default.\n */\n private readFromStorage(): number {\n const stored = localStorage.getItem(this.storageKey);\n const parsed = stored ? Number(stored) : this.defaultSize();\n return Number.isFinite(parsed) ? parsed : this.defaultSize();\n }\n\n /**\n * Persists the current font size in localStorage.\n *\n * @param size Font size value to persist.\n */\n private writeToStorage(size: number): void {\n localStorage.setItem(this.storageKey, String(size));\n }\n\n /**\n * Applies the current font size to the DOM\n * using the configured CSS custom property name.\n *\n * @param size Font size value in pixels.\n */\n private applyCssVar(size: number): void {\n document.documentElement.style.setProperty(this.cssVarName, `${size}px`);\n }\n}\n","/*\n * Public API Surface of font-size\n */\n\nexport * from './lib/font-size.service';\nexport * from './lib/font-size-config.interface';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAIa,eAAe,CAAA;AAC1B;;;AAGG;AACH,IAAA,WAAW,GAAG,MAAM,CAAC,EAAE,uDAAC;AAExB;;;AAGG;AACH,IAAA,OAAO,GAAG,MAAM,CAAC,EAAE,mDAAC;AAEpB;;;AAGG;AACH,IAAA,OAAO,GAAG,MAAM,CAAC,EAAE,mDAAC;AAEpB;;;AAGG;AACH,IAAA,IAAI,GAAG,MAAM,CAAC,CAAC,gDAAC;AAEhB;;;AAGG;IACK,UAAU,GAAG,cAAc;AAEnC;;;AAGG;IACK,UAAU,GAAG,kBAAkB;AAEvC;;AAEG;IACH,QAAQ,GAAG,MAAM,CAAS,IAAI,CAAC,eAAe,EAAE,oDAAC;AAEjD;;AAEG;AACH,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,qDAAC;AAElE;;AAEG;AACH,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,OAAO,EAAE,iDAAC;AAE1D;;AAEG;AACH,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,OAAO,EAAE,iDAAC;AAE1D;;;;;AAKG;IACH,SAAS,CAAC,MAA+B,EAAE,EAAA;AACzC,QAAA,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAA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version": "21.0.5",
4
4
  "description": "A lightweight Angular service for dynamic font size management.",
5
5
  "keywords": [
6
6
  "angular",
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/Greezaaa"
26
26
  },
27
27
  "peerDependencies": {
28
- "@angular/common": "^20.1.0",
29
- "@angular/core": "^20.1.0"
28
+ "@angular/common": "^21.0.0",
29
+ "@angular/core": "^21.0.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "tslib": "^2.3.0"
@@ -42,13 +42,13 @@
42
42
  "sideEffects": false,
43
43
  "license": "MIT",
44
44
  "module": "fesm2022/su-labs-font-size.mjs",
45
- "typings": "index.d.ts",
45
+ "typings": "types/su-labs-font-size.d.ts",
46
46
  "exports": {
47
47
  "./package.json": {
48
48
  "default": "./package.json"
49
49
  },
50
50
  ".": {
51
- "types": "./index.d.ts",
51
+ "types": "./types/su-labs-font-size.d.ts",
52
52
  "default": "./fesm2022/su-labs-font-size.mjs"
53
53
  }
54
54
  }
File without changes