@flux-ui/visuals 3.2.0-beta.11 → 3.2.0-beta.9

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@flux-ui/visuals",
3
3
  "description": "Visual effect components for the Flux UI library.",
4
- "version": "3.2.0-beta.11",
4
+ "version": "3.2.0-beta.9",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/basmilius",
@@ -49,10 +49,9 @@
49
49
  "types": "./dist/index.d.ts",
50
50
  "sideEffects": false,
51
51
  "dependencies": {
52
- "@basmilius/common": "^3.50.0",
53
- "@basmilius/utils": "^3.50.0",
54
- "@flux-ui/internals": "3.2.0-beta.11",
55
- "@flux-ui/types": "3.2.0-beta.11",
52
+ "@basmilius/common": "^3.45.0",
53
+ "@basmilius/utils": "^3.45.0",
54
+ "@flux-ui/internals": "3.2.0-beta.9",
56
55
  "clsx": "^2.1.1",
57
56
  "rough-notation": "^0.5.1"
58
57
  },
@@ -60,13 +59,13 @@
60
59
  "vue": "^3.6.0-beta.17"
61
60
  },
62
61
  "devDependencies": {
63
- "@basmilius/vite-preset": "^3.50.0",
64
- "@types/node": "^26.1.0",
62
+ "@basmilius/vite-preset": "^3.45.0",
63
+ "@types/node": "^26.0.1",
65
64
  "@vitejs/plugin-vue": "^6.0.7",
66
65
  "@vue/tsconfig": "^0.9.1",
67
66
  "sass-embedded": "^1.100.0",
68
67
  "typescript": "^6.0.3",
69
- "vite": "^8.1.3",
70
- "vue-tsc": "^3.3.6"
68
+ "vite": "^8.1.0",
69
+ "vue-tsc": "^3.3.5"
71
70
  }
72
71
  }
@@ -24,10 +24,9 @@
24
24
  lang="ts"
25
25
  setup>
26
26
  import { useInView } from '@flux-ui/internals';
27
- import type { BorderBeamVariant } from '@flux-ui/types';
28
27
  import { clsx } from 'clsx';
29
28
  import { computed, ref, unref, useTemplateRef, watch } from 'vue';
30
- import { useBorderBeamPulse } from '~flux/visuals/composable/private';
29
+ import { useBorderBeamPulse, type BorderBeamVariant } from '~flux/visuals/composable/private';
31
30
  import $style from '~flux/visuals/css/component/BorderBeam.module.scss';
32
31
 
33
32
  const emit = defineEmits<{
@@ -10,10 +10,9 @@
10
10
  lang="ts"
11
11
  setup>
12
12
  import { prefersReducedMotion, useInView } from '@flux-ui/internals';
13
- import type { HighlighterVariant } from '@flux-ui/types';
14
13
  import { annotate } from 'rough-notation';
15
14
  import { computed, onBeforeUnmount, onMounted, shallowRef, useTemplateRef, watch } from 'vue';
16
- import { useHighlighterGroupInjection, type HighlighterGroupEntry } from '~flux/visuals/composable/private';
15
+ import { useHighlighterGroupInjection, type HighlighterGroupEntry, type HighlighterVariant } from '~flux/visuals/composable/private';
17
16
  import $style from '~flux/visuals/css/component/Highlighter.module.scss';
18
17
 
19
18
  const emit = defineEmits<{
@@ -7,8 +7,7 @@
7
7
  <script
8
8
  lang="ts"
9
9
  setup>
10
- import type { HighlighterGroupProps } from '@flux-ui/types';
11
- import { useHighlighterGroup } from '~flux/visuals/composable/private';
10
+ import { useHighlighterGroup, type HighlighterGroupProps } from '~flux/visuals/composable/private';
12
11
  import $style from '~flux/visuals/css/component/Highlighter.module.scss';
13
12
 
14
13
  const props = defineProps<HighlighterGroupProps>();
@@ -9,7 +9,6 @@ export { default as FluxVisualHighlighter } from './FluxVisualHighlighter.vue';
9
9
  export { default as FluxVisualHighlighterGroup } from './FluxVisualHighlighterGroup.vue';
10
10
  export { default as FluxVisualNoise } from './FluxVisualNoise.vue';
11
11
  export { default as FluxVisualNumberFlow } from './FluxVisualNumberFlow.vue';
12
- export { default as FluxVisualPaneIllustration } from './FluxVisualPaneIllustration.vue';
13
12
  export { default as FluxVisualPing } from './FluxVisualPing.vue';
14
13
  export { default as FluxVisualSlotText } from './FluxVisualSlotText.vue';
15
14
  export { default as FluxVisualTextScramble } from './FluxVisualTextScramble.vue';
@@ -1,2 +1,2 @@
1
- export { default as useBorderBeamPulse } from './useBorderBeamPulse';
2
- export { default as useHighlighterGroup, useHighlighterGroupInjection, type HighlighterGroupContext, type HighlighterGroupEntry } from './useHighlighterGroup';
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';
@@ -1,7 +1,8 @@
1
1
  import { prefersReducedMotion } from '@flux-ui/internals';
2
- import type { BorderBeamVariant } from '@flux-ui/types';
3
2
  import { unref, watchEffect, type Ref } from 'vue';
4
3
 
4
+ export type BorderBeamVariant = 'sm' | 'md' | 'line' | 'pulse-inner' | 'pulse-outside';
5
+
5
6
  type PulseOscillator = {
6
7
  readonly prop: string;
7
8
  readonly a: number;
@@ -1,9 +1,21 @@
1
- import type { HighlighterGroupProps } from '@flux-ui/types';
2
1
  import { annotationGroup } from 'rough-notation';
3
2
  import { inject, onScopeDispose, provide, type InjectionKey } from 'vue';
4
3
 
5
4
  type Annotation = Parameters<typeof annotationGroup>[0][number];
6
5
 
6
+ export type HighlighterVariant = 'highlight' | 'box' | 'circle' | 'underline' | 'strike-through' | 'crossed-off' | 'bracket';
7
+
8
+ export type HighlighterGroupProps = {
9
+ readonly variant?: HighlighterVariant;
10
+ readonly color?: string;
11
+ readonly strokeWidth?: number;
12
+ readonly animationDuration?: number;
13
+ readonly iterations?: number;
14
+ readonly padding?: number;
15
+ readonly multiline?: boolean;
16
+ readonly whenInView?: boolean;
17
+ };
18
+
7
19
  export type HighlighterGroupEntry = {
8
20
  readonly element: HTMLElement;
9
21
  getAnnotation(): Annotation | null;
@@ -1,20 +0,0 @@
1
- import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
- type __VLS_Props = {
3
- readonly animatedColors: string[];
4
- readonly animatedOpacity?: number;
5
- readonly animatedSeed?: number;
6
- readonly aspectRatio?: number;
7
- readonly isMasked?: boolean;
8
- };
9
- type __VLS_Slots = {
10
- default?(): VNode[];
11
- controlled?(): VNode[];
12
- };
13
- declare const __VLS_base: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
14
- declare const _default: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
- export default _default;
16
- type __VLS_WithSlots<T, S> = T & {
17
- new (): {
18
- $slots: S;
19
- };
20
- };
@@ -1,69 +0,0 @@
1
- <template>
2
- <div
3
- data-flux-pane-illustration
4
- :class="isMasked ? $style.paneIllustrationMasked : $style.paneIllustration"
5
- :style="{
6
- aspectRatio
7
- }">
8
- <div
9
- :class="$style.paneIllustrationMagic"
10
- :style="{
11
- border: `1px solid ${borderColor}`
12
- }">
13
- <FluxVisualGridPattern :stroke-dasharray="3"/>
14
-
15
- <FluxVisualAnimatedColors
16
- :colors="animatedColors"
17
- :opacity="animatedOpacity"
18
- :seed="animatedSeed"/>
19
- </div>
20
-
21
- <div
22
- v-if="slots.controlled"
23
- :class="$style.paneIllustrationContentControlled">
24
- <slot name="controlled"/>
25
- </div>
26
-
27
- <div
28
- v-if="slots.default"
29
- :class="$style.paneIllustrationContent">
30
- <slot/>
31
- </div>
32
- </div>
33
- </template>
34
-
35
- <script
36
- lang="ts"
37
- setup>
38
- import { hexToRGB } from '@basmilius/utils';
39
- import { computed, type VNode } from 'vue';
40
- import FluxVisualAnimatedColors from './FluxVisualAnimatedColors.vue';
41
- import FluxVisualGridPattern from './FluxVisualGridPattern.vue';
42
- import $style from '~flux/visuals/css/component/PaneIllustration.module.scss';
43
-
44
- const {
45
- animatedColors,
46
- aspectRatio = 16 / 9
47
- } = defineProps<{
48
- readonly animatedColors: string[];
49
- readonly animatedOpacity?: number;
50
- readonly animatedSeed?: number;
51
- readonly aspectRatio?: number;
52
- readonly isMasked?: boolean;
53
- }>();
54
-
55
- const slots = defineSlots<{
56
- default?(): VNode[];
57
- controlled?(): VNode[];
58
- }>();
59
-
60
- const borderColor = computed(() => {
61
- if (!animatedColors || animatedColors.length === 0) {
62
- return 'transparent';
63
- }
64
-
65
- const [r, g, b] = hexToRGB(animatedColors[0]);
66
-
67
- return `rgb(${r} ${g} ${b} / .15)`;
68
- });
69
- </script>
@@ -1,49 +0,0 @@
1
- .paneIllustration {
2
- --mask: linear-gradient(to bottom, black, transparent);
3
- --mask-content: linear-gradient(to bottom, black, rgb(0 0 0 / .75), transparent);
4
-
5
- position: relative;
6
- border-radius: calc(var(--radius) - 1px);
7
-
8
- &:not(:first-child) {
9
- border-top-left-radius: 0;
10
- border-top-right-radius: 0;
11
- }
12
-
13
- &:not(:last-child) {
14
- border-bottom-left-radius: 0;
15
- border-bottom-right-radius: 0;
16
- }
17
- }
18
-
19
- .paneIllustrationContent {
20
- position: relative;
21
- display: flex;
22
- height: 100%;
23
- align-items: center;
24
- justify-content: center;
25
- }
26
-
27
- .paneIllustrationContentControlled {
28
- composes: paneIllustrationContent;
29
-
30
- overflow: hidden;
31
-
32
- -webkit-mask-image: var(--mask-content);
33
- mask-image: var(--mask-content);
34
- }
35
-
36
- .paneIllustrationMagic {
37
- position: absolute;
38
- inset: -1px;
39
- border-radius: inherit;
40
- }
41
-
42
- .paneIllustrationMasked {
43
- composes: paneIllustration;
44
-
45
- .paneIllustrationMagic {
46
- -webkit-mask-image: var(--mask);
47
- mask-image: var(--mask);
48
- }
49
- }