@aurorajs.dev/core-front
v1.0.9
Published
Aurora npm core front package
Readme
@aurorajs.dev/core-front
Shared TypeScript library for Aurora frontend projects. Provides domain-level utilities and decorators for managing common UI interactions.
Installation
npm install @aurorajs.dev/core-frontPeer dependencies
| Package | Version |
| --------------------------- | ------- |
| @aurorajs.dev/core-common | ^1.0.3 |
Usage
import { BlurActiveElement } from '@aurorajs.dev/core-front';Decorators
@BlurActiveElement()
Method decorator that blurs the currently focused DOM element before executing the decorated method. Prevents UI side effects (visible tooltips, pending validations, virtual keyboard) when users trigger actions while an input still has focus.
class MyComponent {
@BlurActiveElement()
onSubmit(): void {
// the active element is blurred before this runs
}
}Development
# Install dependencies
npm install
# Dev mode with watch
npm run start:dev
# Build
npm run build
# Tests
npm test
npm run test:watch
npm run test:cov
# Formatting & linting
npm run format
npm run lintBuild
Built with tsup producing dual CJS/ESM output targeting ES2021:
| Output | Path |
| ----------------- | ----------------- |
| ESM | dist/index.js |
| CJS | dist/index.cjs |
| Type declarations | dist/index.d.ts |
Publishing
make publishLicense
MIT
