border-beam 1.0.1 → 1.1.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/README.md +41 -11
- package/dist/index.cjs.js +337 -102
- package/dist/index.d.ts +21 -7
- package/dist/index.es.js +855 -295
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -35,9 +35,8 @@ export declare interface BorderBeamProps extends Omit<HTMLAttributes<HTMLDivElem
|
|
|
35
35
|
children: ReactNode;
|
|
36
36
|
/**
|
|
37
37
|
* Size/type preset
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* - 'line': Bottom-only traveling glow with breathe and spike animations
|
|
38
|
+
* Rotate family: 'sm' (compact), 'md' (full border, default), 'line' (bottom traveling).
|
|
39
|
+
* Pulse family: 'pulse-outside' (outward bloom), 'pulse-inner' (contained breathe).
|
|
41
40
|
* @default 'md'
|
|
42
41
|
*/
|
|
43
42
|
size?: BorderBeamSize;
|
|
@@ -78,7 +77,8 @@ export declare interface BorderBeamProps extends Omit<HTMLAttributes<HTMLDivElem
|
|
|
78
77
|
*/
|
|
79
78
|
borderRadius?: number;
|
|
80
79
|
/**
|
|
81
|
-
* Brightness multiplier for the glow effect
|
|
80
|
+
* Brightness multiplier for the glow effect.
|
|
81
|
+
* Falls back to the type's preset default (1.3 for most types).
|
|
82
82
|
* @default 1.3
|
|
83
83
|
*/
|
|
84
84
|
brightness?: number;
|
|
@@ -118,11 +118,17 @@ export declare interface BorderBeamProps extends Omit<HTMLAttributes<HTMLDivElem
|
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
120
|
* Size/type preset for the border beam effect
|
|
121
|
+
*
|
|
122
|
+
* Rotate family (traveling/spinning beam):
|
|
121
123
|
* - 'sm': Small button-sized with compact glow
|
|
122
124
|
* - 'md': Medium card-sized with full border glow
|
|
123
125
|
* - 'line': Bottom-only traveling glow with breathe and spike animations
|
|
126
|
+
*
|
|
127
|
+
* Pulse family (breathing glow, no rotation):
|
|
128
|
+
* - 'pulse-outside': Glow blooms OUTWARD beyond the element (uncropped halo)
|
|
129
|
+
* - 'pulse-inner': Glow breathes contained within the element's border
|
|
124
130
|
*/
|
|
125
|
-
export declare type BorderBeamSize = 'sm' | 'md' | 'line';
|
|
131
|
+
export declare type BorderBeamSize = 'sm' | 'md' | 'line' | 'pulse-outside' | 'pulse-inner';
|
|
126
132
|
|
|
127
133
|
/**
|
|
128
134
|
* Theme mode for adapting beam colors to background
|
|
@@ -142,12 +148,12 @@ export declare interface SizeConfig {
|
|
|
142
148
|
/**
|
|
143
149
|
* Size presets for border radius and dimensions
|
|
144
150
|
*/
|
|
145
|
-
export declare const sizePresets: Record<
|
|
151
|
+
export declare const sizePresets: Record<BorderBeamSize, SizeConfig>;
|
|
146
152
|
|
|
147
153
|
/**
|
|
148
154
|
* Per-size theme presets matching the tuned v5 control panel defaults
|
|
149
155
|
*/
|
|
150
|
-
export declare const sizeThemePresets: Record<
|
|
156
|
+
export declare const sizeThemePresets: Record<BorderBeamSize, Record<'dark' | 'light', ThemeColors>>;
|
|
151
157
|
|
|
152
158
|
/**
|
|
153
159
|
* Theme color configuration
|
|
@@ -158,6 +164,14 @@ export declare interface ThemeColors {
|
|
|
158
164
|
bloomOpacity: number;
|
|
159
165
|
innerShadow: string;
|
|
160
166
|
saturation: number;
|
|
167
|
+
/** Optional per-type default brightness (used by pulse types). Falls back to 1.3. */
|
|
168
|
+
brightness?: number;
|
|
169
|
+
/**
|
|
170
|
+
* Optional opacity of the 1px hairline border that frames the element.
|
|
171
|
+
* Used by 'pulse-outside' so the colored stroke rides a subtle outline,
|
|
172
|
+
* matching the v5 prototype. Falls back to 0 (no hairline).
|
|
173
|
+
*/
|
|
174
|
+
hairlineOpacity?: number;
|
|
161
175
|
}
|
|
162
176
|
|
|
163
177
|
/**
|