@flux-ui/visuals 0.0.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.
Files changed (58) hide show
  1. package/README.md +32 -0
  2. package/dist/component/FluxVisualAnimatedColors.vue.d.ts +10 -0
  3. package/dist/component/FluxVisualAttention.vue.d.ts +40 -0
  4. package/dist/component/FluxVisualBorderBeam.vue.d.ts +31 -0
  5. package/dist/component/FluxVisualBorderShine.vue.d.ts +53 -0
  6. package/dist/component/FluxVisualDotPattern.vue.d.ts +11 -0
  7. package/dist/component/FluxVisualFlickeringGrid.vue.d.ts +10 -0
  8. package/dist/component/FluxVisualGridPattern.vue.d.ts +10 -0
  9. package/dist/component/FluxVisualHighlighter.vue.d.ts +36 -0
  10. package/dist/component/FluxVisualHighlighterGroup.vue.d.ts +13 -0
  11. package/dist/component/FluxVisualNoise.vue.d.ts +9 -0
  12. package/dist/component/FluxVisualNumberFlow.vue.d.ts +14 -0
  13. package/dist/component/FluxVisualPing.vue.d.ts +8 -0
  14. package/dist/component/FluxVisualSlotText.vue.d.ts +41 -0
  15. package/dist/component/FluxVisualTextScramble.vue.d.ts +20 -0
  16. package/dist/component/FluxVisualTextShimmer.vue.d.ts +18 -0
  17. package/dist/component/index.d.ts +15 -0
  18. package/dist/composable/private/index.d.ts +2 -0
  19. package/dist/composable/private/useBorderBeamPulse.d.ts +21 -0
  20. package/dist/composable/private/useHighlighterGroup.d.ts +51 -0
  21. package/dist/index.css +1110 -0
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.js +12320 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/types.d.ts +13 -0
  26. package/package.json +71 -0
  27. package/src/component/FluxVisualAnimatedColors.vue +187 -0
  28. package/src/component/FluxVisualAttention.vue +86 -0
  29. package/src/component/FluxVisualBorderBeam.vue +171 -0
  30. package/src/component/FluxVisualBorderShine.vue +36 -0
  31. package/src/component/FluxVisualDotPattern.vue +119 -0
  32. package/src/component/FluxVisualFlickeringGrid.vue +159 -0
  33. package/src/component/FluxVisualGridPattern.vue +128 -0
  34. package/src/component/FluxVisualHighlighter.vue +217 -0
  35. package/src/component/FluxVisualHighlighterGroup.vue +20 -0
  36. package/src/component/FluxVisualNoise.vue +31 -0
  37. package/src/component/FluxVisualNumberFlow.vue +235 -0
  38. package/src/component/FluxVisualPing.vue +26 -0
  39. package/src/component/FluxVisualSlotText.vue +457 -0
  40. package/src/component/FluxVisualTextScramble.vue +168 -0
  41. package/src/component/FluxVisualTextShimmer.vue +34 -0
  42. package/src/component/index.ts +15 -0
  43. package/src/composable/private/index.ts +2 -0
  44. package/src/composable/private/useBorderBeamPulse.ts +203 -0
  45. package/src/composable/private/useHighlighterGroup.ts +162 -0
  46. package/src/css/component/Attention.module.scss +104 -0
  47. package/src/css/component/BorderBeam.module.scss +1178 -0
  48. package/src/css/component/Highlighter.module.scss +7 -0
  49. package/src/css/component/Noise.module.scss +80 -0
  50. package/src/css/component/NumberFlow.module.scss +5 -0
  51. package/src/css/component/PatternGlow.module.scss +19 -0
  52. package/src/css/component/Ping.module.scss +44 -0
  53. package/src/css/component/SlotText.module.scss +43 -0
  54. package/src/css/component/TextScramble.module.scss +5 -0
  55. package/src/css/component/TextShimmer.module.scss +54 -0
  56. package/src/css/component/Visual.module.scss +71 -0
  57. package/src/index.ts +1 -0
  58. package/src/types.d.ts +13 -0
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # `@flux-ui/visuals`
2
+
3
+ Visual effect components for [Flux UI](https://flux-ui.dev).
4
+
5
+ Decorative, animated building blocks (border beams, patterns, animated colors, slot text, and more) that layer on top of the Flux design system.
6
+
7
+ ## Highlights
8
+
9
+ - Purely decorative, `aria-hidden` visual effects that respect `prefers-reduced-motion`.
10
+ - Same CSS Modules and naming conventions as `@flux-ui/components`.
11
+ - Relies on the Flux theme tokens (`--gray-*`, `--radius`), so load `@flux-ui/components` styles alongside it.
12
+
13
+ ## ⭐️ Prerequisites
14
+
15
+ - Bun >= 1.2.13
16
+ - Node >= 23
17
+
18
+ ## 🚀 Getting started
19
+
20
+ 1. Make sure the Flux monorepo is checked out.
21
+ 2. Run `bun install` in the project root.
22
+ 3. Run `bun run --cwd packages/visuals build` to build the package (runs `vue-tsc` then `vite build`).
23
+ 4. To link Flux Visuals globally with Bun, run `bun link --cwd packages/visuals`.
24
+ - In another project, use `link:@flux-ui/visuals` as the dependency version in `package.json`.
25
+
26
+ ## 📦 Sibling packages
27
+
28
+ - [`@flux-ui/components`](../components)
29
+ - [`@flux-ui/types`](../types)
30
+ - [`@flux-ui/internals`](../internals)
31
+ - [`@flux-ui/application`](../application)
32
+ - [`@flux-ui/statistics`](../statistics)
@@ -0,0 +1,10 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ readonly colors?: string[];
4
+ readonly incrementor?: number;
5
+ readonly opacity?: number;
6
+ readonly seed?: number;
7
+ readonly static?: boolean;
8
+ };
9
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
10
+ export default _default;
@@ -0,0 +1,40 @@
1
+ import { PropType, DefineComponent, ExtractPropTypes, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type AttentionEffect = 'pulse' | 'shake' | 'bounce' | 'tada';
3
+ declare const _default: DefineComponent<ExtractPropTypes<{
4
+ duration: {
5
+ default: number;
6
+ type: NumberConstructor;
7
+ };
8
+ effect: {
9
+ default: string;
10
+ type: PropType<AttentionEffect>;
11
+ };
12
+ trigger: {
13
+ default: any;
14
+ type: PropType<unknown>;
15
+ };
16
+ }>, () => VNode<RendererNode, RendererElement, {
17
+ [key: string]: any;
18
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
19
+ finished: () => true;
20
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
21
+ duration: {
22
+ default: number;
23
+ type: NumberConstructor;
24
+ };
25
+ effect: {
26
+ default: string;
27
+ type: PropType<AttentionEffect>;
28
+ };
29
+ trigger: {
30
+ default: any;
31
+ type: PropType<unknown>;
32
+ };
33
+ }>> & Readonly<{
34
+ onFinished?: () => any;
35
+ }>, {
36
+ duration: number;
37
+ effect: AttentionEffect;
38
+ trigger: any;
39
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
40
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import { BorderBeamVariant } from '../composable/private';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = {
4
+ readonly active?: boolean;
5
+ readonly brightness?: number;
6
+ readonly colorVariant?: 'colorful' | 'mono' | 'ocean' | 'sunset';
7
+ readonly duration?: number;
8
+ readonly hueRange?: number;
9
+ readonly radius?: string | number;
10
+ readonly saturation?: number;
11
+ readonly staticColors?: boolean;
12
+ readonly strength?: number;
13
+ readonly variant?: BorderBeamVariant;
14
+ };
15
+ type __VLS_Slots = {
16
+ default(): any;
17
+ };
18
+ declare const __VLS_base: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
19
+ activate: () => any;
20
+ deactivate: () => any;
21
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ onActivate?: () => any;
23
+ onDeactivate?: () => any;
24
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
25
+ declare const _default: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,53 @@
1
+ import { PropType, DefineComponent, ExtractPropTypes, VNode, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ colors: {
4
+ default: string[];
5
+ type: PropType<string[]>;
6
+ };
7
+ duration: {
8
+ default: number;
9
+ type: NumberConstructor;
10
+ };
11
+ offset: {
12
+ default: number;
13
+ type: NumberConstructor;
14
+ };
15
+ radius: {
16
+ default: any;
17
+ type: PropType<string | number>;
18
+ };
19
+ width: {
20
+ default: number;
21
+ type: NumberConstructor;
22
+ };
23
+ }>, () => VNode<RendererNode, RendererElement, {
24
+ [key: string]: any;
25
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
26
+ colors: {
27
+ default: string[];
28
+ type: PropType<string[]>;
29
+ };
30
+ duration: {
31
+ default: number;
32
+ type: NumberConstructor;
33
+ };
34
+ offset: {
35
+ default: number;
36
+ type: NumberConstructor;
37
+ };
38
+ radius: {
39
+ default: any;
40
+ type: PropType<string | number>;
41
+ };
42
+ width: {
43
+ default: number;
44
+ type: NumberConstructor;
45
+ };
46
+ }>> & Readonly<{}>, {
47
+ colors: string[];
48
+ width: number;
49
+ duration: number;
50
+ radius: string | number;
51
+ offset: number;
52
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
53
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ readonly width?: number;
4
+ readonly height?: number;
5
+ readonly cr?: number;
6
+ readonly cx?: number;
7
+ readonly cy?: number;
8
+ readonly glow?: boolean;
9
+ };
10
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
11
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ readonly color?: string;
4
+ readonly flickerChance?: number;
5
+ readonly gap?: number;
6
+ readonly maxOpacity?: number;
7
+ readonly size?: number;
8
+ };
9
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
10
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ readonly width?: number;
4
+ readonly height?: number;
5
+ readonly strokeDasharray?: number | string;
6
+ readonly squares?: Array<[x: number, y: number]>;
7
+ readonly glow?: boolean;
8
+ };
9
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
10
+ export default _default;
@@ -0,0 +1,36 @@
1
+ import { HighlighterVariant } from '../composable/private';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Props = {
4
+ readonly variant?: HighlighterVariant;
5
+ readonly color?: string;
6
+ readonly strokeWidth?: number;
7
+ readonly animationDuration?: number;
8
+ readonly iterations?: number;
9
+ readonly padding?: number;
10
+ readonly multiline?: boolean;
11
+ readonly whenInView?: boolean;
12
+ };
13
+ type __VLS_Slots = {
14
+ default(): any;
15
+ };
16
+ declare function show(): void;
17
+ declare function hide(): void;
18
+ declare function replay(): void;
19
+ declare const __VLS_base: DefineComponent<__VLS_Props, {
20
+ hide: typeof hide;
21
+ replay: typeof replay;
22
+ show: typeof show;
23
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
24
+ hidden: () => any;
25
+ shown: () => any;
26
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ onHidden?: () => any;
28
+ onShown?: () => any;
29
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
30
+ declare const _default: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1,13 @@
1
+ import { HighlighterGroupProps } from '../composable/private';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ type __VLS_Slots = {
4
+ default(): any;
5
+ };
6
+ declare const __VLS_base: DefineComponent<HighlighterGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<HighlighterGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
7
+ declare const _default: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,9 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type NoiseBlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'soft-light' | 'plus-lighter';
3
+ type __VLS_Props = {
4
+ readonly animated?: boolean;
5
+ readonly blend?: NoiseBlendMode;
6
+ readonly opacity?: number;
7
+ };
8
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
9
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type NumberFlowEasingKeyword = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out';
3
+ type NumberFlowEasingFunction = (t: number) => number;
4
+ type NumberFlowEasing = NumberFlowEasingKeyword | `cubic-bezier(${string})` | NumberFlowEasingFunction;
5
+ type __VLS_Props = {
6
+ readonly value: number;
7
+ readonly animateOnMount?: boolean;
8
+ readonly duration?: number;
9
+ readonly easing?: NumberFlowEasing;
10
+ readonly format?: Intl.NumberFormatOptions;
11
+ readonly locale?: string;
12
+ };
13
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ readonly color?: 'gray' | 'primary' | 'danger' | 'info' | 'success' | 'warning';
4
+ readonly size?: number;
5
+ readonly duration?: number;
6
+ };
7
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
8
+ export default _default;
@@ -0,0 +1,41 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type SlotTextColor = string | ((index: number, total: number) => string);
3
+ type SlotTextDirection = 'up' | 'down';
4
+ type AnimateOptions = {
5
+ direction?: SlotTextDirection;
6
+ stagger?: number;
7
+ duration?: number;
8
+ exitOffset?: number;
9
+ easing?: string;
10
+ bounce?: number;
11
+ color?: SlotTextColor;
12
+ colorFade?: number;
13
+ skipUnchanged?: boolean;
14
+ interrupt?: boolean;
15
+ };
16
+ type FlashOptions = {
17
+ revertAfter?: number;
18
+ enter?: AnimateOptions;
19
+ exit?: AnimateOptions;
20
+ };
21
+ type __VLS_Props = {
22
+ readonly text: string;
23
+ readonly bounce?: number;
24
+ readonly chromatic?: boolean;
25
+ readonly color?: string;
26
+ readonly colorFade?: number;
27
+ readonly direction?: SlotTextDirection;
28
+ readonly duration?: number;
29
+ readonly easing?: string;
30
+ readonly exitOffset?: number;
31
+ readonly interrupt?: boolean;
32
+ readonly skipUnchanged?: boolean;
33
+ readonly stagger?: number;
34
+ };
35
+ declare function set(toText: string, options?: AnimateOptions): void;
36
+ declare function flash(toText: string, { revertAfter, enter, exit }?: FlashOptions): void;
37
+ declare const _default: DefineComponent<__VLS_Props, {
38
+ flash: typeof flash;
39
+ set: typeof set;
40
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
41
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ readonly text: string;
4
+ readonly characters?: string;
5
+ readonly duration?: number;
6
+ readonly skipUnchanged?: boolean;
7
+ readonly speed?: number;
8
+ readonly stagger?: number;
9
+ };
10
+ declare function set(toText: string): void;
11
+ declare function replay(): void;
12
+ declare const _default: DefineComponent<__VLS_Props, {
13
+ replay: typeof replay;
14
+ set: typeof set;
15
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
+ finished: () => any;
17
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onFinished?: () => any;
19
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
20
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ readonly color?: string;
4
+ readonly duration?: number;
5
+ readonly shimmerColor?: string;
6
+ readonly spread?: number;
7
+ };
8
+ type __VLS_Slots = {
9
+ default(): any;
10
+ };
11
+ declare const __VLS_base: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
12
+ declare const _default: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,15 @@
1
+ export { default as FluxVisualAnimatedColors } from './FluxVisualAnimatedColors.vue';
2
+ export { default as FluxVisualAttention } from './FluxVisualAttention.vue';
3
+ export { default as FluxVisualBorderBeam } from './FluxVisualBorderBeam.vue';
4
+ export { default as FluxVisualBorderShine } from './FluxVisualBorderShine.vue';
5
+ export { default as FluxVisualDotPattern } from './FluxVisualDotPattern.vue';
6
+ export { default as FluxVisualFlickeringGrid } from './FluxVisualFlickeringGrid.vue';
7
+ export { default as FluxVisualGridPattern } from './FluxVisualGridPattern.vue';
8
+ export { default as FluxVisualHighlighter } from './FluxVisualHighlighter.vue';
9
+ export { default as FluxVisualHighlighterGroup } from './FluxVisualHighlighterGroup.vue';
10
+ export { default as FluxVisualNoise } from './FluxVisualNoise.vue';
11
+ export { default as FluxVisualNumberFlow } from './FluxVisualNumberFlow.vue';
12
+ export { default as FluxVisualPing } from './FluxVisualPing.vue';
13
+ export { default as FluxVisualSlotText } from './FluxVisualSlotText.vue';
14
+ export { default as FluxVisualTextScramble } from './FluxVisualTextScramble.vue';
15
+ export { default as FluxVisualTextShimmer } from './FluxVisualTextShimmer.vue';
@@ -0,0 +1,2 @@
1
+ export { default as useBorderBeamPulse, type BorderBeamVariant } from './useBorderBeamPulse';
2
+ export { default as useHighlighterGroup, useHighlighterGroupInjection, type HighlighterGroupContext, type HighlighterGroupEntry, type HighlighterGroupProps, type HighlighterVariant } from './useHighlighterGroup';
@@ -0,0 +1,21 @@
1
+ import { Ref } from 'vue';
2
+ export type BorderBeamVariant = 'sm' | 'md' | 'line' | 'pulse-inner' | 'pulse-outside';
3
+ type UseBorderBeamPulseOptions = {
4
+ readonly duration: Ref<number>;
5
+ readonly elementRef: Ref<HTMLElement | null>;
6
+ readonly enabled: Ref<boolean>;
7
+ readonly staticColors: Ref<boolean>;
8
+ readonly variant: Ref<BorderBeamVariant>;
9
+ };
10
+ /**
11
+ * Drives the breathing of a pulse border beam from the shared, frame-rate-capped
12
+ * animation loop while the instance is enabled. Respects prefers-reduced-motion
13
+ * and resolves the theme from the nearest `[dark]` ancestor.
14
+ *
15
+ * @param options The reactive instance options.
16
+ *
17
+ * @author Bas Milius <bas@mili.us>
18
+ * @since 1.0.0
19
+ */
20
+ export default function useBorderBeamPulse(options: UseBorderBeamPulseOptions): void;
21
+ export {};
@@ -0,0 +1,51 @@
1
+ import { annotationGroup } from 'rough-notation';
2
+ type Annotation = Parameters<typeof annotationGroup>[0][number];
3
+ export type HighlighterVariant = 'highlight' | 'box' | 'circle' | 'underline' | 'strike-through' | 'crossed-off' | 'bracket';
4
+ export type HighlighterGroupProps = {
5
+ readonly variant?: HighlighterVariant;
6
+ readonly color?: string;
7
+ readonly strokeWidth?: number;
8
+ readonly animationDuration?: number;
9
+ readonly iterations?: number;
10
+ readonly padding?: number;
11
+ readonly multiline?: boolean;
12
+ readonly whenInView?: boolean;
13
+ };
14
+ export type HighlighterGroupEntry = {
15
+ readonly element: HTMLElement;
16
+ getAnnotation(): Annotation | null;
17
+ };
18
+ export type HighlighterGroupContext = {
19
+ readonly defaults: HighlighterGroupProps;
20
+ add(entry: HighlighterGroupEntry): void;
21
+ remove(entry: HighlighterGroupEntry): void;
22
+ notify(): void;
23
+ };
24
+ /**
25
+ * Injects the enclosing highlighter group, if any. A `FluxVisualHighlighter`
26
+ * that finds a group registers its annotation with it and lets the group drive
27
+ * the cascade instead of drawing itself.
28
+ *
29
+ * @author Bas Milius <bas@mili.us>
30
+ * @since 1.0.0
31
+ */
32
+ export declare function useHighlighterGroupInjection(): HighlighterGroupContext | null;
33
+ /**
34
+ * Collects the annotations of the descendant highlighters and reveals them as a
35
+ * single rough-notation group, so they draw one after another in document order
36
+ * rather than all at once. The draw is debounced so the initial burst of child
37
+ * registrations (and any surrounding chrome settling its layout) coalesces into
38
+ * one cascade, and — when `whenInView` is set — it waits until the first
39
+ * highlighter scrolls into view. rough-notation keeps the drawn annotations
40
+ * aligned on later resizes itself.
41
+ *
42
+ * The reactive props object is provided as `defaults` on the group context, so
43
+ * descendant highlighters can inherit annotation props they don't set themselves.
44
+ *
45
+ * @param props The reactive props of the group component.
46
+ *
47
+ * @author Bas Milius <bas@mili.us>
48
+ * @since 1.0.0
49
+ */
50
+ export default function useHighlighterGroup(props: HighlighterGroupProps): void;
51
+ export {};