@retinalabsllc/zairusjs 0.5.9 → 0.6.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/dist/index.js CHANGED
@@ -741,8 +741,22 @@ var import_image3 = __toESM(require("next/image"));
741
741
  var import_react14 = require("@hugeicons/react");
742
742
  var import_core_free_icons3 = require("@hugeicons/core-free-icons");
743
743
  var FeatureCard = ({ feature }) => {
744
- const [isLoading, setIsLoading] = (0, import_react13.useState)(!!feature.image);
745
- return /* @__PURE__ */ import_react13.default.createElement("div", { className: "flex flex-col shrink-0 w-[90vw] sm:w-150 snap-center md:snap-start group cursor-grab active:cursor-grabbing" }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "relative w-full aspect-16/10 bg-linear-to-br from-neutral-50 via-neutral-100 to-neutral-200 rounded-2xl overflow-hidden mb-6 flex items-center justify-center" }, /* @__PURE__ */ import_react13.default.createElement(
744
+ const [isBgLoading, setIsBgLoading] = (0, import_react13.useState)(true);
745
+ const [isFgLoading, setIsFgLoading] = (0, import_react13.useState)(!!feature.image);
746
+ return /* @__PURE__ */ import_react13.default.createElement("div", { className: "flex flex-col shrink-0 w-[90vw] sm:w-150 snap-center md:snap-start group cursor-grab active:cursor-grabbing" }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "relative w-full aspect-16/10 bg-neutral-100 rounded-2xl overflow-hidden mb-6 flex items-center justify-center" }, /* @__PURE__ */ import_react13.default.createElement(
747
+ import_image3.default,
748
+ {
749
+ src: "/assets/webp/card-bg.webp",
750
+ alt: "Card Background",
751
+ fill: true,
752
+ sizes: "(max-width: 768px) 90vw, 600px",
753
+ onLoad: () => setIsBgLoading(false),
754
+ className: `
755
+ object-cover z-0 transition-all duration-700 ease-out
756
+ ${isBgLoading ? "blur-xl scale-110" : "blur-0 scale-100"}
757
+ `
758
+ }
759
+ ), /* @__PURE__ */ import_react13.default.createElement(
746
760
  "div",
747
761
  {
748
762
  className: "absolute inset-0 w-full h-full pointer-events-none z-0 opacity-[0.25] mix-blend-overlay",
@@ -750,18 +764,17 @@ var FeatureCard = ({ feature }) => {
750
764
  backgroundImage: `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`
751
765
  }
752
766
  }
753
- ), isLoading && feature.image && /* @__PURE__ */ import_react13.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-neutral-50/50 backdrop-blur-sm" }, /* @__PURE__ */ import_react13.default.createElement(import_react14.HugeiconsIcon, { icon: import_core_free_icons3.Loading03Icon, size: 32, className: "animate-spin text-neutral-400" })), feature.image && /* 3. Sunk the image down and right, giving it a top-left shadow to pop out */
754
- /* @__PURE__ */ import_react13.default.createElement("div", { className: "absolute -bottom-6 -right-6 w-[85%] h-[85%] z-10 transition-transform duration-700 ease-out group-hover:-translate-x-2 group-hover:-translate-y-2" }, /* @__PURE__ */ import_react13.default.createElement(
767
+ ), isFgLoading && feature.image && /* @__PURE__ */ import_react13.default.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-neutral-50/50 backdrop-blur-sm transition-opacity duration-300" }, /* @__PURE__ */ import_react13.default.createElement(import_react14.HugeiconsIcon, { icon: import_core_free_icons3.Loading03Icon, size: 32, className: "animate-spin text-neutral-400" })), feature.image && /* @__PURE__ */ import_react13.default.createElement("div", { className: "absolute -bottom-6 -right-6 w-[85%] h-[85%] z-10 transition-transform duration-700 ease-out group-hover:-translate-x-2 group-hover:-translate-y-2" }, /* @__PURE__ */ import_react13.default.createElement(
755
768
  import_image3.default,
756
769
  {
757
770
  src: feature.image,
758
771
  alt: feature.title,
759
772
  fill: true,
760
773
  sizes: "(max-width: 768px) 90vw, 600px",
761
- onLoad: () => setIsLoading(false),
774
+ onLoad: () => setIsFgLoading(false),
762
775
  className: `
763
- object-cover rounded-tl-2xl shadow-[-12px_-12px_30px_rgba(0,0,0,0.06)] transition-all duration-700 ease-out
764
- ${isLoading ? "scale-110 blur-xl opacity-0" : "scale-100 blur-0 opacity-100"}
776
+ object-cover object-top-left rounded-tl-2xl shadow-[-12px_-12px_30px_rgba(0,0,0,0.06)] transition-all duration-700 ease-out
777
+ ${isFgLoading ? "opacity-0 blur-xl" : "opacity-100 blur-0"}
765
778
  `
766
779
  }
767
780
  ))), /* @__PURE__ */ import_react13.default.createElement("div", { className: "flex flex-col text-left pr-4" }, /* @__PURE__ */ import_react13.default.createElement("h3", { className: " font-serif text-xl tracking-tight text-black mb-2" }, feature.title), /* @__PURE__ */ import_react13.default.createElement("p", { className: "text-[13px] leading-relaxed text-neutral-600 max-w-[90%]" }, feature.desc)));
package/dist/index.mjs CHANGED
@@ -665,8 +665,22 @@ import Image3 from "next/image";
665
665
  import { HugeiconsIcon as HugeiconsIcon5 } from "@hugeicons/react";
666
666
  import { ArrowLeft01Icon, ArrowRight01Icon, Loading03Icon as Loading03Icon2 } from "@hugeicons/core-free-icons";
667
667
  var FeatureCard = ({ feature }) => {
668
- const [isLoading, setIsLoading] = useState4(!!feature.image);
669
- return /* @__PURE__ */ React9.createElement("div", { className: "flex flex-col shrink-0 w-[90vw] sm:w-150 snap-center md:snap-start group cursor-grab active:cursor-grabbing" }, /* @__PURE__ */ React9.createElement("div", { className: "relative w-full aspect-16/10 bg-linear-to-br from-neutral-50 via-neutral-100 to-neutral-200 rounded-2xl overflow-hidden mb-6 flex items-center justify-center" }, /* @__PURE__ */ React9.createElement(
668
+ const [isBgLoading, setIsBgLoading] = useState4(true);
669
+ const [isFgLoading, setIsFgLoading] = useState4(!!feature.image);
670
+ return /* @__PURE__ */ React9.createElement("div", { className: "flex flex-col shrink-0 w-[90vw] sm:w-150 snap-center md:snap-start group cursor-grab active:cursor-grabbing" }, /* @__PURE__ */ React9.createElement("div", { className: "relative w-full aspect-16/10 bg-neutral-100 rounded-2xl overflow-hidden mb-6 flex items-center justify-center" }, /* @__PURE__ */ React9.createElement(
671
+ Image3,
672
+ {
673
+ src: "/assets/webp/card-bg.webp",
674
+ alt: "Card Background",
675
+ fill: true,
676
+ sizes: "(max-width: 768px) 90vw, 600px",
677
+ onLoad: () => setIsBgLoading(false),
678
+ className: `
679
+ object-cover z-0 transition-all duration-700 ease-out
680
+ ${isBgLoading ? "blur-xl scale-110" : "blur-0 scale-100"}
681
+ `
682
+ }
683
+ ), /* @__PURE__ */ React9.createElement(
670
684
  "div",
671
685
  {
672
686
  className: "absolute inset-0 w-full h-full pointer-events-none z-0 opacity-[0.25] mix-blend-overlay",
@@ -674,18 +688,17 @@ var FeatureCard = ({ feature }) => {
674
688
  backgroundImage: `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`
675
689
  }
676
690
  }
677
- ), isLoading && feature.image && /* @__PURE__ */ React9.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-neutral-50/50 backdrop-blur-sm" }, /* @__PURE__ */ React9.createElement(HugeiconsIcon5, { icon: Loading03Icon2, size: 32, className: "animate-spin text-neutral-400" })), feature.image && /* 3. Sunk the image down and right, giving it a top-left shadow to pop out */
678
- /* @__PURE__ */ React9.createElement("div", { className: "absolute -bottom-6 -right-6 w-[85%] h-[85%] z-10 transition-transform duration-700 ease-out group-hover:-translate-x-2 group-hover:-translate-y-2" }, /* @__PURE__ */ React9.createElement(
691
+ ), isFgLoading && feature.image && /* @__PURE__ */ React9.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-neutral-50/50 backdrop-blur-sm transition-opacity duration-300" }, /* @__PURE__ */ React9.createElement(HugeiconsIcon5, { icon: Loading03Icon2, size: 32, className: "animate-spin text-neutral-400" })), feature.image && /* @__PURE__ */ React9.createElement("div", { className: "absolute -bottom-6 -right-6 w-[85%] h-[85%] z-10 transition-transform duration-700 ease-out group-hover:-translate-x-2 group-hover:-translate-y-2" }, /* @__PURE__ */ React9.createElement(
679
692
  Image3,
680
693
  {
681
694
  src: feature.image,
682
695
  alt: feature.title,
683
696
  fill: true,
684
697
  sizes: "(max-width: 768px) 90vw, 600px",
685
- onLoad: () => setIsLoading(false),
698
+ onLoad: () => setIsFgLoading(false),
686
699
  className: `
687
- object-cover rounded-tl-2xl shadow-[-12px_-12px_30px_rgba(0,0,0,0.06)] transition-all duration-700 ease-out
688
- ${isLoading ? "scale-110 blur-xl opacity-0" : "scale-100 blur-0 opacity-100"}
700
+ object-cover object-top-left rounded-tl-2xl shadow-[-12px_-12px_30px_rgba(0,0,0,0.06)] transition-all duration-700 ease-out
701
+ ${isFgLoading ? "opacity-0 blur-xl" : "opacity-100 blur-0"}
689
702
  `
690
703
  }
691
704
  ))), /* @__PURE__ */ React9.createElement("div", { className: "flex flex-col text-left pr-4" }, /* @__PURE__ */ React9.createElement("h3", { className: " font-serif text-xl tracking-tight text-black mb-2" }, feature.title), /* @__PURE__ */ React9.createElement("p", { className: "text-[13px] leading-relaxed text-neutral-600 max-w-[90%]" }, feature.desc)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retinalabsllc/zairusjs",
3
- "version": "0.5.9",
3
+ "version": "0.6.0",
4
4
  "description": "A perceptive, Ai data driven Next.js UI component library.",
5
5
  "author": "Retina Labs Company",
6
6
  "license": "MIT",