fancy-ui-vue 0.4.0 → 0.4.1

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 (51) hide show
  1. package/dist/components/animated-testimonials/AnimatedTestimonials.vue.js +23 -12
  2. package/dist/components/bg-falling-stars/FallingStarsBg.vue.js +10 -1
  3. package/dist/components/bg-falling-stars/bg-falling-stars-core.d.ts +6 -0
  4. package/dist/components/bg-falling-stars/bg-falling-stars-core.js +24 -2
  5. package/dist/components/bg-stars/StarsBackground.vue.js +1 -1
  6. package/dist/components/bg-stars/StarsBackground.vue2.js +13 -1
  7. package/dist/components/bg-stars/bg-stars-core.d.ts +6 -0
  8. package/dist/components/bg-stars/bg-stars-core.js +21 -1
  9. package/dist/components/book/Book.vue.js +5 -83
  10. package/dist/components/book/Book.vue2.js +82 -1
  11. package/dist/components/box-reveal/BoxReveal.vue.js +5 -47
  12. package/dist/components/box-reveal/BoxReveal.vue2.js +48 -1
  13. package/dist/components/compare/StarField.vue.js +1 -1
  14. package/dist/components/container-text-flip/ContainerTextFlip.vue.js +1 -1
  15. package/dist/components/container-text-flip/ContainerTextFlip.vue2.js +14 -5
  16. package/dist/components/flickering-grid/FlickeringGrid.vue.js +19 -1
  17. package/dist/components/flickering-grid/flickering-grid-core.d.ts +6 -0
  18. package/dist/components/flickering-grid/flickering-grid-core.js +30 -1
  19. package/dist/components/flip-words/FlipWords.vue.js +1 -1
  20. package/dist/components/flip-words/FlipWords.vue2.js +14 -7
  21. package/dist/components/hyper-text/HyperText.vue.js +6 -97
  22. package/dist/components/hyper-text/HyperText.vue2.js +101 -0
  23. package/dist/components/letter-pullup/LetterPullup.vue.js +6 -38
  24. package/dist/components/letter-pullup/LetterPullup.vue2.js +40 -0
  25. package/dist/components/logo-cloud/AnimatedLogoCloud.vue.js +1 -1
  26. package/dist/components/matrix-rain/MatrixRain.vue.js +20 -1
  27. package/dist/components/matrix-rain/matrix-rain-core.d.ts +6 -0
  28. package/dist/components/matrix-rain/matrix-rain-core.js +28 -6
  29. package/dist/components/noise-reveal/NoiseReveal.vue.js +7 -0
  30. package/dist/components/noise-reveal/noise-reveal-core.js +23 -7
  31. package/dist/components/ripple/Ripple.vue.js +1 -1
  32. package/dist/components/ripple/Ripple.vue2.js +6 -1
  33. package/dist/components/sparkles/Sparkles.vue.js +10 -1
  34. package/dist/components/sparkles/sparkles-core.d.ts +6 -0
  35. package/dist/components/sparkles/sparkles-core.js +26 -2
  36. package/dist/components/sparkles-text/SparklesText.vue.js +6 -88
  37. package/dist/components/sparkles-text/SparklesText.vue2.js +100 -0
  38. package/dist/components/terminal-text/TerminalText.vue.js +1 -1
  39. package/dist/components/terminal-text/TerminalText.vue2.js +36 -4
  40. package/dist/components/text-generate-effect/TextGenerateEffect.vue.js +5 -72
  41. package/dist/components/text-generate-effect/TextGenerateEffect.vue2.js +74 -1
  42. package/dist/components/text-reveal-card/TextRevealCard.vue.js +5 -101
  43. package/dist/components/text-reveal-card/TextRevealCard.vue2.js +98 -1
  44. package/dist/components/text-reveal-card/TextRevealStars.vue.js +1 -1
  45. package/dist/components/text-reveal-card/TextRevealStars.vue2.js +29 -12
  46. package/dist/index.js +387 -390
  47. package/dist/styles.css +232 -89
  48. package/package.json +1 -1
  49. package/dist/components/hyper-text/HyperText.vue3.js +0 -5
  50. package/dist/components/letter-pullup/LetterPullup.vue3.js +0 -5
  51. package/dist/components/sparkles-text/SparklesText.vue3.js +0 -5
@@ -1,103 +1,7 @@
1
- import { defineComponent, useTemplateRef, ref, computed, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createElementVNode, normalizeStyle, createVNode } from "vue";
2
- import { cn } from "../../utils.js";
3
- import TextRevealStars from "./TextRevealStars.vue.js";
4
- const _hoisted_1 = { class: "relative flex h-40 items-center overflow-hidden" };
5
- const _hoisted_2 = { class: "overflow-hidden [mask-image:linear-gradient(to_bottom,transparent,white,transparent)]" };
6
- const _sfc_main = /* @__PURE__ */ defineComponent({
7
- ...{ name: "TextRevealCard", inheritAttrs: false },
8
- __name: "TextRevealCard",
9
- props: {
10
- class: { type: [Boolean, null, String, Object, Array], default: "" },
11
- starsCount: { default: 130 },
12
- starsClass: { default: "" },
13
- starsSeed: {}
14
- },
15
- setup(__props) {
16
- const cardRef = useTemplateRef("cardRef");
17
- const widthPercentage = ref(0);
18
- const isMouseOver = ref(false);
19
- const rotateDeg = computed(() => (widthPercentage.value - 50) * 0.1);
20
- function mouseMoveHandler(event) {
21
- event.preventDefault();
22
- const card = cardRef.value;
23
- if (card) {
24
- const rect = card.getBoundingClientRect();
25
- const relativeX = event.clientX - rect.left;
26
- widthPercentage.value = relativeX / rect.width * 100;
27
- }
28
- }
29
- function mouseLeaveHandler() {
30
- isMouseOver.value = false;
31
- setTimeout(() => {
32
- if (!isMouseOver.value) {
33
- widthPercentage.value = 0;
34
- }
35
- }, 100);
36
- }
37
- function mouseEnterHandler() {
38
- isMouseOver.value = true;
39
- }
40
- function touchMoveHandler(event) {
41
- const card = cardRef.value;
42
- if (card) {
43
- const rect = card.getBoundingClientRect();
44
- const relativeX = event.touches[0].clientX - rect.left;
45
- widthPercentage.value = relativeX / rect.width * 100;
46
- }
47
- }
48
- return (_ctx, _cache) => {
49
- return openBlock(), createElementBlock("div", {
50
- ref_key: "cardRef",
51
- ref: cardRef,
52
- class: normalizeClass(
53
- unref(cn)(
54
- "relative w-full max-w-[40rem] touch-pan-y touch-pinch-zoom overflow-hidden rounded-lg border border-white/[0.08] bg-[#1d1c20] p-4 sm:p-6 md:p-8",
55
- __props.class
56
- )
57
- ),
58
- role: "presentation",
59
- onMouseenter: mouseEnterHandler,
60
- onMouseleave: mouseLeaveHandler,
61
- onMousemove: mouseMoveHandler,
62
- onTouchstart: mouseEnterHandler,
63
- onTouchend: mouseLeaveHandler,
64
- onTouchmove: touchMoveHandler
65
- }, [
66
- renderSlot(_ctx.$slots, "default"),
67
- createElementVNode("div", _hoisted_1, [
68
- createElementVNode("div", {
69
- style: normalizeStyle({
70
- width: "100%",
71
- opacity: widthPercentage.value > 0 ? 1 : 0,
72
- clipPath: `inset(0 ${100 - widthPercentage.value}% 0 0)`,
73
- transition: isMouseOver.value ? "none" : "all 0.4s ease-out"
74
- }),
75
- class: "absolute z-20 bg-[#1d1c20] will-change-transform"
76
- }, [
77
- renderSlot(_ctx.$slots, "text")
78
- ], 4),
79
- createElementVNode("div", {
80
- style: normalizeStyle({
81
- left: `${widthPercentage.value}%`,
82
- transform: `rotate(${rotateDeg.value}deg)`,
83
- opacity: widthPercentage.value > 0 ? 1 : 0,
84
- transition: isMouseOver.value ? "none" : "all 0.4s ease-out"
85
- }),
86
- class: "absolute z-50 h-40 w-[8px] bg-gradient-to-b from-transparent via-neutral-800 to-transparent will-change-transform"
87
- }, null, 4),
88
- createElementVNode("div", _hoisted_2, [
89
- renderSlot(_ctx.$slots, "revealText"),
90
- createVNode(TextRevealStars, {
91
- starsCount: __props.starsCount,
92
- class: normalizeClass(__props.starsClass),
93
- seed: __props.starsSeed
94
- }, null, 8, ["starsCount", "class", "seed"])
95
- ])
96
- ])
97
- ], 34);
98
- };
99
- }
100
- });
1
+ import _sfc_main from "./TextRevealCard.vue2.js";
2
+ /* empty css */
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const TextRevealCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7675d2f2"]]);
101
5
  export {
102
- _sfc_main as default
6
+ TextRevealCard as default
103
7
  };
@@ -1,4 +1,101 @@
1
- import _sfc_main from "./TextRevealCard.vue.js";
1
+ import { defineComponent, useTemplateRef, ref, computed, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createElementVNode, normalizeStyle, createVNode } from "vue";
2
+ import { cn } from "../../utils.js";
3
+ import TextRevealStars from "./TextRevealStars.vue.js";
4
+ const _hoisted_1 = { class: "relative flex h-40 items-center overflow-hidden" };
5
+ const _hoisted_2 = { class: "overflow-hidden [mask-image:linear-gradient(to_bottom,transparent,white,transparent)]" };
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ ...{ name: "TextRevealCard", inheritAttrs: false },
8
+ __name: "TextRevealCard",
9
+ props: {
10
+ class: { type: [Boolean, null, String, Object, Array], default: "" },
11
+ starsCount: { default: 130 },
12
+ starsClass: { default: "" },
13
+ starsSeed: {}
14
+ },
15
+ setup(__props) {
16
+ const cardRef = useTemplateRef("cardRef");
17
+ const widthPercentage = ref(0);
18
+ const isMouseOver = ref(false);
19
+ const rotateDeg = computed(() => (widthPercentage.value - 50) * 0.1);
20
+ function mouseMoveHandler(event) {
21
+ event.preventDefault();
22
+ const card = cardRef.value;
23
+ if (card) {
24
+ const rect = card.getBoundingClientRect();
25
+ const relativeX = event.clientX - rect.left;
26
+ widthPercentage.value = relativeX / rect.width * 100;
27
+ }
28
+ }
29
+ function mouseLeaveHandler() {
30
+ isMouseOver.value = false;
31
+ setTimeout(() => {
32
+ if (!isMouseOver.value) {
33
+ widthPercentage.value = 0;
34
+ }
35
+ }, 100);
36
+ }
37
+ function mouseEnterHandler() {
38
+ isMouseOver.value = true;
39
+ }
40
+ function touchMoveHandler(event) {
41
+ const card = cardRef.value;
42
+ if (card) {
43
+ const rect = card.getBoundingClientRect();
44
+ const relativeX = event.touches[0].clientX - rect.left;
45
+ widthPercentage.value = relativeX / rect.width * 100;
46
+ }
47
+ }
48
+ return (_ctx, _cache) => {
49
+ return openBlock(), createElementBlock("div", {
50
+ ref_key: "cardRef",
51
+ ref: cardRef,
52
+ class: normalizeClass(
53
+ unref(cn)(
54
+ "relative w-full max-w-[40rem] touch-pan-y touch-pinch-zoom overflow-hidden rounded-lg border border-white/[0.08] bg-[#1d1c20] p-4 sm:p-6 md:p-8",
55
+ __props.class
56
+ )
57
+ ),
58
+ role: "presentation",
59
+ onMouseenter: mouseEnterHandler,
60
+ onMouseleave: mouseLeaveHandler,
61
+ onMousemove: mouseMoveHandler,
62
+ onTouchstart: mouseEnterHandler,
63
+ onTouchend: mouseLeaveHandler,
64
+ onTouchmove: touchMoveHandler
65
+ }, [
66
+ renderSlot(_ctx.$slots, "default", {}, void 0, true),
67
+ createElementVNode("div", _hoisted_1, [
68
+ createElementVNode("div", {
69
+ style: normalizeStyle({
70
+ width: "100%",
71
+ opacity: widthPercentage.value > 0 ? 1 : 0,
72
+ clipPath: `inset(0 ${100 - widthPercentage.value}% 0 0)`
73
+ }),
74
+ class: normalizeClass(["absolute z-20 bg-[#1d1c20] will-change-transform", { "text-reveal-settle": !isMouseOver.value }])
75
+ }, [
76
+ renderSlot(_ctx.$slots, "text", {}, void 0, true)
77
+ ], 6),
78
+ createElementVNode("div", {
79
+ style: normalizeStyle({
80
+ left: `${widthPercentage.value}%`,
81
+ transform: `rotate(${rotateDeg.value}deg)`,
82
+ opacity: widthPercentage.value > 0 ? 1 : 0
83
+ }),
84
+ class: normalizeClass(["absolute z-50 h-40 w-[8px] bg-gradient-to-b from-transparent via-neutral-800 to-transparent will-change-transform", { "text-reveal-settle": !isMouseOver.value }])
85
+ }, null, 6),
86
+ createElementVNode("div", _hoisted_2, [
87
+ renderSlot(_ctx.$slots, "revealText", {}, void 0, true),
88
+ createVNode(TextRevealStars, {
89
+ starsCount: __props.starsCount,
90
+ class: normalizeClass(__props.starsClass),
91
+ seed: __props.starsSeed
92
+ }, null, 8, ["starsCount", "class", "seed"])
93
+ ])
94
+ ])
95
+ ], 34);
96
+ };
97
+ }
98
+ });
2
99
  export {
3
100
  _sfc_main as default
4
101
  };
@@ -2,7 +2,7 @@ import _sfc_main from "./TextRevealStars.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
5
- const TextRevealStars = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d9ef66bc"]]);
5
+ const TextRevealStars = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ce39bf0f"]]);
6
6
  export {
7
7
  TextRevealStars as default
8
8
  };
@@ -1,6 +1,9 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, Fragment, renderList, normalizeStyle, normalizeClass, unref } from "vue";
2
2
  import { cn } from "../../utils.js";
3
- const _hoisted_1 = { class: "absolute inset-0" };
3
+ const _hoisted_1 = {
4
+ class: "absolute inset-0",
5
+ style: { "container-type": "size" }
6
+ };
4
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
8
  ...{ name: "TextRevealStars", inheritAttrs: false },
6
9
  __name: "TextRevealStars",
@@ -22,26 +25,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
25
  const stars = computed(() => {
23
26
  const random = mulberry32(__props.seed);
24
27
  const randomMove = () => random() * 4 - 2;
25
- return Array.from({ length: __props.starsCount }, () => ({
26
- top: `calc(${random() * 100}% + ${randomMove()}px)`,
27
- left: `calc(${random() * 100}% + ${randomMove()}px)`,
28
- targetTop: `calc(${random() * 100}% + ${randomMove()}px)`,
29
- targetLeft: `calc(${random() * 100}% + ${randomMove()}px)`,
30
- opacity: random(),
31
- duration: random() * 10 + 20
32
- }));
28
+ return Array.from({ length: __props.starsCount }, () => {
29
+ const topPct = random() * 100;
30
+ const topMove = randomMove();
31
+ const leftPct = random() * 100;
32
+ const leftMove = randomMove();
33
+ const targetTopPct = random() * 100;
34
+ const targetTopMove = randomMove();
35
+ const targetLeftPct = random() * 100;
36
+ const targetLeftMove = randomMove();
37
+ return {
38
+ top: `calc(${topPct}% + ${topMove}px)`,
39
+ left: `calc(${leftPct}% + ${leftMove}px)`,
40
+ // The drift is a transform (compositor) rather than animated top/left.
41
+ // Percent deltas resolve against the size-container wrapper.
42
+ driftX: `calc(${targetLeftPct - leftPct}cqw + ${targetLeftMove - leftMove}px)`,
43
+ driftY: `calc(${targetTopPct - topPct}cqh + ${targetTopMove - topMove}px)`,
44
+ opacity: random(),
45
+ duration: random() * 10 + 20
46
+ };
47
+ });
33
48
  });
34
49
  return (_ctx, _cache) => {
35
50
  return openBlock(), createElementBlock("div", _hoisted_1, [
36
51
  (openBlock(true), createElementBlock(Fragment, null, renderList(stars.value, (star, i) => {
37
52
  return openBlock(), createElementBlock("span", {
38
53
  key: i,
39
- class: normalizeClass(unref(cn)("star-animate absolute z-[1] inline-block h-0.5 w-0.5 rounded-full bg-white", __props.class)),
54
+ class: normalizeClass(
55
+ unref(cn)("star-animate absolute z-[1] inline-block h-0.5 w-0.5 rounded-full bg-white", __props.class)
56
+ ),
40
57
  style: normalizeStyle({
41
58
  top: star.top,
42
59
  left: star.left,
43
- "--target-top": star.targetTop,
44
- "--target-left": star.targetLeft,
60
+ "--drift-x": star.driftX,
61
+ "--drift-y": star.driftY,
45
62
  "--star-opacity": star.opacity,
46
63
  animationDuration: `${star.duration}s`
47
64
  })