aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
39 lines (37 loc) • 710 B
JavaScript
/**
* Common Types and Utilities
* Shared type definitions used across the AuraGlass design system
*/
/**
* Creates a subscription object from an unsubscribe function
*/
/**
* Utility to create a 2D vector
*/
const createVector2D = (x = 0, y = 0) => ({
x,
y
});
/**
* Add two vectors
*/
const addVectors = (v1, v2) => ({
x: v1.x + v2.x,
y: v1.y + v2.y
});
/**
* Subtract two vectors
*/
const subtractVectors = (v1, v2) => ({
x: v1.x - v2.x,
y: v1.y - v2.y
});
/**
* Multiply vector by scalar
*/
const multiplyVector = (v, scalar) => ({
x: v.x * scalar,
y: v.y * scalar
});
export { addVectors, createVector2D, multiplyVector, subtractVectors };
//# sourceMappingURL=common.js.map