Skip to content

Greezaaa/settings-utils-lib

Repository files navigation

Stand With Ukraine

@su-labs β€’ Angular Utility Libraries

Angular Angular Version TypeScript License NPM

A collection of lightweight, reactive Angular utilities built with modern practices. Each library is independently versioned and published to npm for easy integration into your Angular projects.

πŸ“š Available Libraries

Track user visits with reactive signals, milestone detection, and localStorage persistence.

npm downloads

npm install @su-labs/visit-tracker

Features:

  • πŸ“Š Track visit counts automatically
  • 🎯 Milestone detection (10th, 100th visit)
  • πŸ’Ύ localStorage persistence
  • ⚑ Reactive signals API

πŸ“– Documentation


Comprehensive theme management with dark mode, system preferences, and CSS variables.

npm downloads

npm install @su-labs/theme

Features:

  • πŸŒ“ Light, dark, contrast themes
  • πŸ–₯️ System preference detection
  • 🎨 CSS custom properties
  • πŸ’Ύ Persistent user preference

πŸ“– Documentation


Beautiful toast notifications with multiple positions, icons, and auto-dismiss.

npm downloads

npm install @su-labs/notifications

Features:

  • 🎯 6 position options
  • 🎨 Multiple notification types
  • πŸ–ΌοΈ Custom icons support
  • ⏱️ Auto-dismiss timer

πŸ“– Documentation


Track active sections on scroll with IntersectionObserver for smooth navigation highlighting.

npm downloads

npm install @su-labs/scroll-spy

Features:

  • πŸš€ IntersectionObserver API
  • ⚑ Reactive signals
  • 🎯 Active section tracking
  • πŸ“± Mobile-optimized

πŸ“– Documentation


Accessible font size controls with WCAG compliance and user preference persistence.

npm downloads

npm install @su-labs/font-size

Features:

  • β™Ώ WCAG 2.1 AA compliant
  • 🎨 CSS variables integration
  • πŸ’Ύ Persistent preferences
  • πŸ“ Multiple size presets

πŸ“– Documentation


πŸ’‘ Why @su-labs?

Built for Modern Angular

  • βœ… Angular 21+ - Latest features and optimizations
  • βœ… Signals - Reactive, performant state management
  • βœ… Standalone - No NgModules required
  • βœ… TypeScript - Full type safety

Developer Experience

  • πŸ“¦ Zero Dependencies - Lightweight bundles
  • πŸ§ͺ Well Tested - Comprehensive test coverage
  • πŸ“ Great Docs - Clear examples and API references
  • πŸ”§ Easy to Use - Simple, intuitive APIs

Production Ready

  • 🎯 Battle Tested - Used in real-world applications
  • πŸ”’ Type Safe - Full TypeScript support
  • ⚑ Performant - Optimized for speed
  • 🌐 Cross-Browser - Works everywhere

πŸš€ Quick Start

1. Install a library

npm install @su-labs/theme

2. Initialize in your app

// app.config.ts
import { provideAppInitializer, inject } from '@angular/core';
import { SuThemeService } from '@su-labs/theme';

export const appConfig = {
  providers: [
    provideAppInitializer(() => {
      inject(SuThemeService).init();
    }),
  ],
};

3. Use in components

import { Component, inject } from '@angular/core';
import { SuThemeService } from '@su-labs/theme';

@Component({
  template: `<button (click)="themeService.setTheme('dark')">Dark Mode</button>`
})
export class AppComponent {
  themeService = inject(SuThemeService);
}

πŸ“– Documentation

Each library has comprehensive documentation including:

  • 🎯 Quick Start - Get up and running in minutes
  • πŸ“š API Reference - Complete method and type documentation
  • πŸ’‘ Examples - Real-world usage examples
  • πŸ”§ Troubleshooting - Common issues and solutions
  • β™Ώ Accessibility - WCAG compliance guidelines

Visit individual library READMEs for detailed documentation.


πŸ› οΈ Development

This is a monorepo workspace managed with Angular CLI.

Project Structure

settings-utils-lib/
β”œβ”€β”€ projects/
β”‚   └── su-labs/
β”‚       β”œβ”€β”€ visit-tracker/
β”‚       β”œβ”€β”€ theme/
β”‚       β”œβ”€β”€ notifications/
β”‚       β”œβ”€β”€ scroll-spy/
β”‚       └── font-size/
β”œβ”€β”€ dist/               # Build output
β”œβ”€β”€ package.json        # Root dependencies
└── angular.json        # Workspace configuration

Build All Libraries

npm run build:all

Build Individual Library

npm run build:visit-tracker
npm run build:theme
npm run build:notifications
npm run build:scroll-spy
npm run build:font-size

Run Tests

npm test

🀝 Contributing

Contributions are welcome! Here's how you can help:

Reporting Issues

Found a bug or have a feature request?

  1. Check existing issues
  2. Create a new issue with a clear description
  3. Include code examples and reproduction steps

Pull Requests

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Write/update tests
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to your branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Code Standards

  • βœ… Write TypeScript with strict mode
  • βœ… Follow Angular style guide
  • βœ… Include unit tests
  • βœ… Update documentation
  • βœ… Use conventional commits

πŸ“¦ Publishing

Each library is independently versioned and published to npm.

Version Strategy

All libraries follow Angular's versioning:

  • Major version matches Angular major version (e.g., v21.x.x for Angular 21)
  • Minor version for new features
  • Patch version for bug fixes

Publishing Process

# 1. Update version in package.json
cd projects/su-labs/library-name

# 2. Update CHANGELOG.md

# 3. Build from root
cd ../../..
npm run build:library-name

# 4. Publish
cd dist/su-labs/library-name
npm publish --access public

🌐 Browser Compatibility

All libraries support modern browsers:

Browser Version
Chrome β‰₯ 90
Firefox β‰₯ 88
Safari β‰₯ 14
Edge β‰₯ 90

πŸ“„ License

MIT License Β© 2025 Yevheniy Alekseyev

See LICENSE file for details.


πŸ‘€ Author

Yevheniy Alekseyev


πŸ’¬ Support


πŸ™ Acknowledgments

Thanks to:

  • The Angular team for the amazing framework
  • The open-source community for inspiration
  • All contributors and users of these libraries

Built with ❀️ using Angular

⬆ Back to Top

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors