@flux-ui/visuals 0.0.0 → 3.2.0-beta.10
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/dist/component/FluxVisualPaneIllustration.vue.d.ts +20 -0
- package/dist/component/index.d.ts +1 -0
- package/dist/index.css +40 -0
- package/dist/index.js +80 -13
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/component/FluxVisualPaneIllustration.vue +69 -0
- package/src/component/index.ts +1 -0
- package/src/css/component/PaneIllustration.module.scss +49 -0
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": "
|
|
4
|
+
"version": "3.2.0-beta.10",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/basmilius",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public",
|
|
41
|
-
"provenance":
|
|
41
|
+
"provenance": true
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"dist",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"types": "./dist/index.d.ts",
|
|
50
50
|
"sideEffects": false,
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@basmilius/common": "^3.
|
|
53
|
-
"@basmilius/utils": "^3.
|
|
54
|
-
"@flux-ui/internals": "
|
|
52
|
+
"@basmilius/common": "^3.50.0",
|
|
53
|
+
"@basmilius/utils": "^3.50.0",
|
|
54
|
+
"@flux-ui/internals": "3.2.0-beta.10",
|
|
55
55
|
"clsx": "^2.1.1",
|
|
56
56
|
"rough-notation": "^0.5.1"
|
|
57
57
|
},
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
"vue": "^3.6.0-beta.17"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@basmilius/vite-preset": "^3.
|
|
63
|
-
"@types/node": "^26.0
|
|
62
|
+
"@basmilius/vite-preset": "^3.50.0",
|
|
63
|
+
"@types/node": "^26.1.0",
|
|
64
64
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
65
65
|
"@vue/tsconfig": "^0.9.1",
|
|
66
66
|
"sass-embedded": "^1.100.0",
|
|
67
67
|
"typescript": "^6.0.3",
|
|
68
|
-
"vite": "^8.1.
|
|
69
|
-
"vue-tsc": "^3.3.
|
|
68
|
+
"vite": "^8.1.3",
|
|
69
|
+
"vue-tsc": "^3.3.6"
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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>
|
package/src/component/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ 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';
|
|
12
13
|
export { default as FluxVisualPing } from './FluxVisualPing.vue';
|
|
13
14
|
export { default as FluxVisualSlotText } from './FluxVisualSlotText.vue';
|
|
14
15
|
export { default as FluxVisualTextScramble } from './FluxVisualTextScramble.vue';
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
}
|