@almadar/ui 2.23.0 → 2.24.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.
@@ -1,20 +1,20 @@
1
- import React5, { createContext, useCallback, useContext, useState, useRef, useEffect } from 'react';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import React5, { createContext, useCallback, useContext, useState, useRef, useEffect, useId } from 'react';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import * as LucideIcons from 'lucide-react';
4
4
  import { Loader2, Check, User } from 'lucide-react';
5
5
 
6
6
  // node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
7
7
  function r(e) {
8
- var t, f, n = "";
8
+ var t, f3, n = "";
9
9
  if ("string" == typeof e || "number" == typeof e) n += e;
10
10
  else if ("object" == typeof e) if (Array.isArray(e)) {
11
11
  var o = e.length;
12
- for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
13
- } else for (f in e) e[f] && (n && (n += " "), n += f);
12
+ for (t = 0; t < o; t++) e[t] && (f3 = r(e[t])) && (n && (n += " "), n += f3);
13
+ } else for (f3 in e) e[f3] && (n && (n += " "), n += f3);
14
14
  return n;
15
15
  }
16
16
  function clsx() {
17
- for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
17
+ for (var e, t, f3 = 0, n = "", o = arguments.length; f3 < o; f3++) (e = arguments[f3]) && (t = r(e)) && (n && (n += " "), n += t);
18
18
  return n;
19
19
  }
20
20
 
@@ -3023,9 +3023,9 @@ var variantStyles2 = {
3023
3023
  "active:scale-[var(--active-scale)] active:shadow-[var(--shadow-active)]"
3024
3024
  ].join(" "),
3025
3025
  secondary: [
3026
- "bg-[var(--color-secondary)] text-[var(--color-secondary-foreground)]",
3027
- "border-[length:var(--border-width-thin)] border-[var(--color-border)]",
3028
- "hover:bg-[var(--color-secondary-hover)]",
3026
+ "bg-transparent text-[var(--color-accent)]",
3027
+ "border-[length:var(--border-width)] border-[var(--color-accent)]",
3028
+ "hover:bg-[var(--color-accent)] hover:text-white",
3029
3029
  "active:scale-[var(--active-scale)]"
3030
3030
  ].join(" "),
3031
3031
  ghost: [
@@ -3481,7 +3481,7 @@ var ContentSection = React5.forwardRef(
3481
3481
  paddingClasses[padding],
3482
3482
  className
3483
3483
  ),
3484
- children: /* @__PURE__ */ jsx(Box, { className: "mx-auto max-w-7xl px-4 sm:px-6 lg:px-8", children })
3484
+ children
3485
3485
  }
3486
3486
  );
3487
3487
  }
@@ -3663,14 +3663,14 @@ var HeroSection = ({
3663
3663
  src: image.src,
3664
3664
  alt: image.alt,
3665
3665
  className: cn(
3666
- imagePosition === "right" ? "flex-1 min-h-[300px]" : "w-full max-w-3xl min-h-[400px]"
3666
+ imagePosition === "right" ? "flex-1 min-h-[300px]" : "w-full min-h-[400px]"
3667
3667
  )
3668
3668
  }
3669
3669
  );
3670
- const innerContent = image && imagePosition === "right" ? /* @__PURE__ */ jsxs(HStack, { gap: "xl", align: "center", className: "w-full max-w-6xl", responsive: true, children: [
3670
+ const innerContent = image && imagePosition === "right" ? /* @__PURE__ */ jsxs(HStack, { gap: "xl", align: "center", className: "w-full", responsive: true, children: [
3671
3671
  textContent,
3672
3672
  imageNode
3673
- ] }) : /* @__PURE__ */ jsxs(VStack, { gap: "xl", align: isCenter ? "center" : "start", className: "w-full max-w-6xl", children: [
3673
+ ] }) : /* @__PURE__ */ jsxs(VStack, { gap: "xl", align: isCenter ? "center" : "start", className: "w-full", children: [
3674
3674
  textContent,
3675
3675
  image && imagePosition === "below" && imageNode
3676
3676
  ] });
@@ -3728,7 +3728,7 @@ var CTABanner = ({
3728
3728
  {
3729
3729
  gap: "lg",
3730
3730
  align: align === "center" ? "center" : "start",
3731
- className: "max-w-3xl mx-auto",
3731
+ className: "mx-auto",
3732
3732
  children: [
3733
3733
  /* @__PURE__ */ jsx(Typography, { variant: "h2", align, children: title }),
3734
3734
  subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", align, children: subtitle }),
@@ -3787,7 +3787,7 @@ var FeatureCard = ({
3787
3787
  {
3788
3788
  name: icon,
3789
3789
  size: iconSizeMap[size],
3790
- className: "text-[var(--color-primary)]"
3790
+ className: "text-[var(--color-accent,#06b6d4)]"
3791
3791
  }
3792
3792
  );
3793
3793
  }
@@ -4015,7 +4015,7 @@ var SplitSection = ({
4015
4015
  className
4016
4016
  ),
4017
4017
  padding: "lg",
4018
- children: /* @__PURE__ */ jsxs(Box, { className: cn("max-w-7xl mx-auto flex flex-col lg:flex-row gap-10 lg:gap-16 items-center", isImageLeft && "lg:flex-row-reverse"), children: [
4018
+ children: /* @__PURE__ */ jsxs(Box, { className: cn("w-full flex flex-col lg:flex-row gap-10 lg:gap-16 items-center", isImageLeft && "lg:flex-row-reverse"), children: [
4019
4019
  /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 lg:min-w-[45%]", children: textContent }),
4020
4020
  /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0 lg:max-w-[50%]", children: mediaContent })
4021
4021
  ] })
@@ -4435,11 +4435,6 @@ var CaseStudyCard = ({
4435
4435
  ] }) });
4436
4436
  };
4437
4437
  CaseStudyCard.displayName = "CaseStudyCard";
4438
- var maxWidthMap = {
4439
- sm: "max-w-2xl",
4440
- md: "max-w-3xl",
4441
- lg: "max-w-4xl"
4442
- };
4443
4438
  var ArticleSection = ({
4444
4439
  title,
4445
4440
  children,
@@ -4450,8 +4445,7 @@ var ArticleSection = ({
4450
4445
  Box,
4451
4446
  {
4452
4447
  className: cn(
4453
- maxWidthMap[maxWidth],
4454
- "mx-auto",
4448
+ "w-full",
4455
4449
  className
4456
4450
  ),
4457
4451
  padding: "md",
@@ -4479,7 +4473,7 @@ var MarketingFooter = ({
4479
4473
  "pt-12 pb-8 px-4",
4480
4474
  className
4481
4475
  ),
4482
- children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "max-w-6xl mx-auto", children: [
4476
+ children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "w-full mx-auto", children: [
4483
4477
  /* @__PURE__ */ jsxs(HStack, { gap: "lg", align: "start", className: "flex-wrap w-full justify-between", children: [
4484
4478
  logo && /* @__PURE__ */ jsx(VStack, { gap: "sm", className: "min-w-[140px] mb-4", children: logo.href ? /* @__PURE__ */ jsx("a", { href: logo.href, children: /* @__PURE__ */ jsx("img", { src: logo.src, alt: logo.alt, className: "h-8 w-auto" }) }) : /* @__PURE__ */ jsx("img", { src: logo.src, alt: logo.alt, className: "h-8 w-auto" }) }),
4485
4479
  columns.map((col) => /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: "min-w-[140px] mb-4", children: [
@@ -4498,7 +4492,7 @@ var MarketingFooter = ({
4498
4492
  className: cn(
4499
4493
  "text-sm no-underline",
4500
4494
  "text-[var(--color-background)]/60",
4501
- "hover:text-[var(--color-background)]",
4495
+ "hover:text-[var(--color-accent)]",
4502
4496
  "transition-colors duration-150"
4503
4497
  ),
4504
4498
  target: item.href.startsWith("http") ? "_blank" : void 0,
@@ -4638,5 +4632,1019 @@ var AnimatedCounter = ({
4638
4632
  ] });
4639
4633
  };
4640
4634
  AnimatedCounter.displayName = "AnimatedCounter";
4635
+ var PI = Math.PI;
4636
+ function lineIntersection(x1, y1, x2, y2, x3, y3, x4, y4) {
4637
+ const denom = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);
4638
+ if (Math.abs(denom) < 1e-10) return [(x1 + x3) / 2, (y1 + y3) / 2];
4639
+ const t = ((x1 - x3) * (y3 - y4) - (y1 - y3) * (x3 - x4)) / denom;
4640
+ return [x1 + t * (x2 - x1), y1 + t * (y2 - y1)];
4641
+ }
4642
+ function f(n) {
4643
+ return n.toFixed(3);
4644
+ }
4645
+ function picStar(cx, cy, R, n, theta, extent) {
4646
+ const verts = [];
4647
+ for (let k = 0; k < n; k++) {
4648
+ const angle = PI / n + k * (2 * PI) / n;
4649
+ verts.push([cx + R * Math.cos(angle), cy + R * Math.sin(angle)]);
4650
+ }
4651
+ const mids = [];
4652
+ for (let k = 0; k < n; k++) {
4653
+ const next = (k + 1) % n;
4654
+ mids.push([(verts[k][0] + verts[next][0]) / 2, (verts[k][1] + verts[next][1]) / 2]);
4655
+ }
4656
+ const innerPts = [];
4657
+ for (let k = 0; k < n; k++) {
4658
+ const next = (k + 1) % n;
4659
+ const M1 = mids[k];
4660
+ const M2 = mids[next];
4661
+ const edx1 = verts[(k + 1) % n][0] - verts[k][0];
4662
+ const edy1 = verts[(k + 1) % n][1] - verts[k][1];
4663
+ const elen1 = Math.sqrt(edx1 * edx1 + edy1 * edy1);
4664
+ const tx1 = edx1 / elen1;
4665
+ const ty1 = edy1 / elen1;
4666
+ const r1x = tx1 * Math.cos(theta) + ty1 * Math.sin(theta);
4667
+ const r1y = -tx1 * Math.sin(theta) + ty1 * Math.cos(theta);
4668
+ const edx2 = verts[(next + 1) % n][0] - verts[next][0];
4669
+ const edy2 = verts[(next + 1) % n][1] - verts[next][1];
4670
+ const elen2 = Math.sqrt(edx2 * edx2 + edy2 * edy2);
4671
+ const tx2 = edx2 / elen2;
4672
+ const ty2 = edy2 / elen2;
4673
+ const bTheta = PI - theta;
4674
+ const r2x = tx2 * Math.cos(bTheta) + ty2 * Math.sin(bTheta);
4675
+ const r2y = -tx2 * Math.sin(bTheta) + ty2 * Math.cos(bTheta);
4676
+ const P = lineIntersection(
4677
+ M1[0],
4678
+ M1[1],
4679
+ M1[0] + r1x * extent,
4680
+ M1[1] + r1y * extent,
4681
+ M2[0],
4682
+ M2[1],
4683
+ M2[0] + r2x * extent,
4684
+ M2[1] + r2y * extent
4685
+ );
4686
+ innerPts.push(P);
4687
+ }
4688
+ const starPath = mids.map((m, k) => {
4689
+ const inner = innerPts[k];
4690
+ const nextMid = mids[(k + 1) % n];
4691
+ return `M ${f(m[0])},${f(m[1])} L ${f(inner[0])},${f(inner[1])} L ${f(nextMid[0])},${f(nextMid[1])}`;
4692
+ }).join(" ");
4693
+ return { starPath, mids, verts };
4694
+ }
4695
+ function Star8({ size, color, strokeWidth }) {
4696
+ const s = size;
4697
+ const cx = s / 2;
4698
+ const cy = s / 2;
4699
+ const a = s / (1 + Math.SQRT2);
4700
+ const R = a / (2 * Math.sin(PI / 8));
4701
+ const theta = 67.5 * PI / 180;
4702
+ const { starPath, mids } = picStar(cx, cy, R, 8, theta, s);
4703
+ const corners = [[0, 0], [s, 0], [s, s], [0, s]];
4704
+ const crossPaths = [];
4705
+ for (const [cornX, cornY] of corners) {
4706
+ const dists = mids.map((m, i) => ({ i, d: Math.hypot(m[0] - cornX, m[1] - cornY) }));
4707
+ dists.sort((a2, b) => a2.d - b.d);
4708
+ const m1 = mids[dists[0].i];
4709
+ const m2 = mids[dists[1].i];
4710
+ crossPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(cornX)},${f(cornY)} L ${f(m2[0])},${f(m2[1])}`);
4711
+ }
4712
+ return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4713
+ /* @__PURE__ */ jsx("path", { d: starPath }),
4714
+ crossPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i))
4715
+ ] });
4716
+ }
4717
+ function Star6({ size, color, strokeWidth }) {
4718
+ const w = size;
4719
+ const h = size * (2 / Math.sqrt(3));
4720
+ const cx = w / 2;
4721
+ const cy = h / 2;
4722
+ const a = w / Math.sqrt(3);
4723
+ const R = a;
4724
+ const theta = 60 * PI / 180;
4725
+ const { starPath, mids, verts } = picStar(cx, cy, R, 6, theta, w);
4726
+ const triPaths = [];
4727
+ for (let k = 0; k < 6; k++) {
4728
+ const v = verts[k];
4729
+ const m1 = mids[(k + 5) % 6];
4730
+ const m2 = mids[k];
4731
+ triPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(v[0])},${f(v[1])} L ${f(m2[0])},${f(m2[1])}`);
4732
+ }
4733
+ return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4734
+ /* @__PURE__ */ jsx("path", { d: starPath }),
4735
+ triPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i))
4736
+ ] });
4737
+ }
4738
+ function Khatam({ size, color, strokeWidth }) {
4739
+ const s = size;
4740
+ const cx = s / 2;
4741
+ const cy = s / 2;
4742
+ const a = s / (1 + Math.SQRT2);
4743
+ const R = a / (2 * Math.sin(PI / 8));
4744
+ const theta = 72 * PI / 180;
4745
+ const { starPath, mids } = picStar(cx, cy, R, 8, theta, s);
4746
+ const corners = [[0, 0], [s, 0], [s, s], [0, s]];
4747
+ const crossPaths = [];
4748
+ for (const [cornX, cornY] of corners) {
4749
+ const dists = mids.map((m, i) => ({ i, d: Math.hypot(m[0] - cornX, m[1] - cornY) }));
4750
+ dists.sort((a2, b) => a2.d - b.d);
4751
+ const m1 = mids[dists[0].i];
4752
+ const m2 = mids[dists[1].i];
4753
+ crossPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(cornX)},${f(cornY)} L ${f(m2[0])},${f(m2[1])}`);
4754
+ }
4755
+ const orbitR = R * 0.35;
4756
+ return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4757
+ /* @__PURE__ */ jsx("path", { d: starPath }),
4758
+ crossPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)),
4759
+ /* @__PURE__ */ jsx("circle", { cx, cy, r: orbitR, opacity: "0.4" })
4760
+ ] });
4761
+ }
4762
+ function RosetteDouble({ size, color, strokeWidth }) {
4763
+ const s = size;
4764
+ const cx = s / 2;
4765
+ const cy = s / 2;
4766
+ const a = s / (1 + Math.SQRT2);
4767
+ const Router = a / (2 * Math.sin(PI / 8));
4768
+ const Rinner = Router * 0.45;
4769
+ const outer = picStar(cx, cy, Router, 8, 72 * PI / 180, s);
4770
+ const inner = picStar(cx, cy, Rinner, 8, 68 * PI / 180, s);
4771
+ const corners = [[0, 0], [s, 0], [s, s], [0, s]];
4772
+ const crossPaths = [];
4773
+ for (const [cornX, cornY] of corners) {
4774
+ const dists = outer.mids.map((m, i) => ({ i, d: Math.hypot(m[0] - cornX, m[1] - cornY) }));
4775
+ dists.sort((a2, b) => a2.d - b.d);
4776
+ const m1 = outer.mids[dists[0].i];
4777
+ const m2 = outer.mids[dists[1].i];
4778
+ crossPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(cornX)},${f(cornY)} L ${f(m2[0])},${f(m2[1])}`);
4779
+ }
4780
+ const connectors = [];
4781
+ for (let k = 0; k < 8; k++) {
4782
+ const om = outer.mids[k];
4783
+ const im = inner.mids[k];
4784
+ connectors.push(`M ${f(im[0])},${f(im[1])} L ${f(om[0])},${f(om[1])}`);
4785
+ }
4786
+ return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4787
+ /* @__PURE__ */ jsx("path", { d: outer.starPath }),
4788
+ /* @__PURE__ */ jsx("path", { d: inner.starPath, opacity: "0.7" }),
4789
+ crossPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, `c${i}`)),
4790
+ connectors.map((d, i) => /* @__PURE__ */ jsx("path", { d, opacity: "0.4" }, `n${i}`))
4791
+ ] });
4792
+ }
4793
+ function RosetteFilled({ size, color, strokeWidth }) {
4794
+ const s = size;
4795
+ const cx = s / 2;
4796
+ const cy = s / 2;
4797
+ const a = s / (1 + Math.SQRT2);
4798
+ const Router = a / (2 * Math.sin(PI / 8));
4799
+ const theta = 72 * PI / 180;
4800
+ const outer = picStar(cx, cy, Router, 8, theta, s);
4801
+ const Rinner = Router * 0.35;
4802
+ const inner6 = picStar(cx, cy, Rinner, 6, 60 * PI / 180, s);
4803
+ const corners = [[0, 0], [s, 0], [s, s], [0, s]];
4804
+ const crossPaths = [];
4805
+ for (const [cornX, cornY] of corners) {
4806
+ const dists = outer.mids.map((m, i) => ({ i, d: Math.hypot(m[0] - cornX, m[1] - cornY) }));
4807
+ dists.sort((a2, b) => a2.d - b.d);
4808
+ const m1 = outer.mids[dists[0].i];
4809
+ const m2 = outer.mids[dists[1].i];
4810
+ crossPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(cornX)},${f(cornY)} L ${f(m2[0])},${f(m2[1])}`);
4811
+ }
4812
+ const triPaths = [];
4813
+ for (let k = 0; k < 6; k++) {
4814
+ const v = inner6.verts[k];
4815
+ const m1 = inner6.mids[(k + 5) % 6];
4816
+ const m2 = inner6.mids[k];
4817
+ triPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(v[0])},${f(v[1])} L ${f(m2[0])},${f(m2[1])}`);
4818
+ }
4819
+ const orbitR = Router * 0.35;
4820
+ return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4821
+ /* @__PURE__ */ jsx("path", { d: outer.starPath }),
4822
+ crossPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, `c${i}`)),
4823
+ /* @__PURE__ */ jsx("circle", { cx, cy, r: orbitR, opacity: "0.3" }),
4824
+ /* @__PURE__ */ jsx("path", { d: inner6.starPath, opacity: "0.6" }),
4825
+ triPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d, opacity: "0.5" }, `t${i}`))
4826
+ ] });
4827
+ }
4828
+ function Star10({ size, color, strokeWidth }) {
4829
+ const s = size;
4830
+ const cx = s / 2;
4831
+ const cy = s / 2;
4832
+ const R = s * 0.42;
4833
+ const theta = 72 * PI / 180;
4834
+ const { starPath, mids, verts } = picStar(cx, cy, R, 10, theta, s);
4835
+ const edgePaths = [];
4836
+ for (let k = 0; k < 10; k++) {
4837
+ const v = verts[k];
4838
+ const m1 = mids[(k + 9) % 10];
4839
+ const m2 = mids[k];
4840
+ edgePaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(v[0])},${f(v[1])} L ${f(m2[0])},${f(m2[1])}`);
4841
+ }
4842
+ return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4843
+ /* @__PURE__ */ jsx("path", { d: starPath }),
4844
+ edgePaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i))
4845
+ ] });
4846
+ }
4847
+ function Star12({ size, color, strokeWidth }) {
4848
+ const s = size;
4849
+ const cx = s / 2;
4850
+ const cy = s / 2;
4851
+ const R = s * 0.44;
4852
+ const theta = 75 * PI / 180;
4853
+ const { starPath, mids, verts } = picStar(cx, cy, R, 12, theta, s);
4854
+ const triPaths = [];
4855
+ for (let k = 0; k < 12; k++) {
4856
+ const v = verts[k];
4857
+ const m1 = mids[(k + 11) % 12];
4858
+ const m2 = mids[k];
4859
+ triPaths.push(`M ${f(m1[0])},${f(m1[1])} L ${f(v[0])},${f(v[1])} L ${f(m2[0])},${f(m2[1])}`);
4860
+ }
4861
+ return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4862
+ /* @__PURE__ */ jsx("path", { d: starPath }),
4863
+ triPaths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i))
4864
+ ] });
4865
+ }
4866
+ function Seigaiha({ size, color, strokeWidth }) {
4867
+ const s = size;
4868
+ const r2 = s / 2;
4869
+ const paths = [];
4870
+ const centers = [
4871
+ [s / 2, s * 0.6],
4872
+ [0, s * 0.1],
4873
+ [s, s * 0.1]
4874
+ ];
4875
+ for (const [cx, cy] of centers) {
4876
+ for (let ring = 1; ring <= 3; ring++) {
4877
+ const cr = r2 * (ring / 3);
4878
+ paths.push(
4879
+ `M ${f(cx - cr)},${f(cy)} A ${f(cr)} ${f(cr)} 0 0 1 ${f(cx + cr)},${f(cy)}`
4880
+ );
4881
+ }
4882
+ }
4883
+ return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
4884
+ }
4885
+ function GreekKey({ size, color, strokeWidth }) {
4886
+ const s = size;
4887
+ const u = s / 4;
4888
+ const paths = [
4889
+ // Outer frame
4890
+ `M 0,0 L ${f(s)},0`,
4891
+ `M 0,${f(s)} L ${f(s)},${f(s)}`,
4892
+ // Spiral from left
4893
+ `M 0,${f(u)} L ${f(3 * u)},${f(u)} L ${f(3 * u)},${f(3 * u)} L ${f(u)},${f(3 * u)} L ${f(u)},${f(2 * u)} L ${f(2 * u)},${f(2 * u)}`,
4894
+ // Spiral from right (mirrored, offset)
4895
+ `M ${f(s)},${f(3 * u)} L ${f(s - 3 * u)},${f(3 * u)} L ${f(s - 3 * u)},${f(u)} L ${f(s - u)},${f(u)} L ${f(s - u)},${f(2 * u)} L ${f(s - 2 * u)},${f(2 * u)}`,
4896
+ // Vertical connectors at edges
4897
+ `M 0,0 L 0,${f(u)}`,
4898
+ `M ${f(s)},0 L ${f(s)},${f(u)}`,
4899
+ `M 0,${f(3 * u)} L 0,${f(s)}`,
4900
+ `M ${f(s)},${f(3 * u)} L ${f(s)},${f(s)}`
4901
+ ];
4902
+ return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
4903
+ }
4904
+ function CelticKnot({ size, color, strokeWidth }) {
4905
+ const s = size;
4906
+ const q = s / 4;
4907
+ const r2 = q * 0.9;
4908
+ const paths = [
4909
+ // Band 1: diagonal with curves at crossings
4910
+ `M 0,0 Q ${f(q)},${f(q)} ${f(2 * q)},${f(2 * q)}`,
4911
+ `M ${f(2 * q)},${f(2 * q)} Q ${f(3 * q)},${f(3 * q)} ${f(s)},${f(s)}`,
4912
+ // Band 2: other diagonal
4913
+ `M ${f(s)},0 Q ${f(3 * q)},${f(q)} ${f(2 * q)},${f(2 * q)}`,
4914
+ `M ${f(2 * q)},${f(2 * q)} Q ${f(q)},${f(3 * q)} 0,${f(s)}`,
4915
+ // Outer loops that connect bands at tile edges for continuous weave
4916
+ `M 0,0 Q ${f(-q * 0.3)},${f(2 * q)} 0,${f(s)}`,
4917
+ `M ${f(s)},0 Q ${f(s + q * 0.3)},${f(2 * q)} ${f(s)},${f(s)}`,
4918
+ `M 0,0 Q ${f(2 * q)},${f(-q * 0.3)} ${f(s)},0`,
4919
+ `M 0,${f(s)} Q ${f(2 * q)},${f(s + q * 0.3)} ${f(s)},${f(s)}`,
4920
+ // Inner circle at crossing
4921
+ `M ${f(2 * q + r2 * 0.3)},${f(2 * q)} A ${f(r2 * 0.3)} ${f(r2 * 0.3)} 0 1 1 ${f(2 * q + r2 * 0.3)},${f(2 * q + 1e-3)}`
4922
+ ];
4923
+ return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
4924
+ }
4925
+ function Kolam({ size, color, strokeWidth }) {
4926
+ const s = size;
4927
+ const u = s / 4;
4928
+ const dotR = s * 0.015;
4929
+ const dots = [];
4930
+ for (let row = 1; row <= 3; row++) {
4931
+ for (let col = 1; col <= 3; col++) {
4932
+ dots.push([col * u, row * u]);
4933
+ }
4934
+ }
4935
+ const curves = [];
4936
+ for (let row = 1; row <= 3; row++) {
4937
+ const y = row * u;
4938
+ for (let col = 1; col < 3; col++) {
4939
+ const x1 = col * u;
4940
+ const x2 = (col + 1) * u;
4941
+ const mx = (x1 + x2) / 2;
4942
+ const bulge = u * 0.4;
4943
+ curves.push(`M ${f(x1)},${f(y)} C ${f(mx)},${f(y - bulge)} ${f(mx)},${f(y - bulge)} ${f(x2)},${f(y)}`);
4944
+ curves.push(`M ${f(x1)},${f(y)} C ${f(mx)},${f(y + bulge)} ${f(mx)},${f(y + bulge)} ${f(x2)},${f(y)}`);
4945
+ }
4946
+ }
4947
+ for (let col = 1; col <= 3; col++) {
4948
+ const x = col * u;
4949
+ for (let row = 1; row < 3; row++) {
4950
+ const y1 = row * u;
4951
+ const y2 = (row + 1) * u;
4952
+ const my = (y1 + y2) / 2;
4953
+ const bulge = u * 0.4;
4954
+ curves.push(`M ${f(x)},${f(y1)} C ${f(x - bulge)},${f(my)} ${f(x - bulge)},${f(my)} ${f(x)},${f(y2)}`);
4955
+ curves.push(`M ${f(x)},${f(y1)} C ${f(x + bulge)},${f(my)} ${f(x + bulge)},${f(my)} ${f(x)},${f(y2)}`);
4956
+ }
4957
+ }
4958
+ for (let k = 1; k <= 3; k++) {
4959
+ curves.push(`M ${f(k * u)},${f(u)} C ${f(k * u)},${f(u * 0.5)} ${f(k * u)},${f(u * 0.5)} ${f(k * u)},0`);
4960
+ curves.push(`M ${f(k * u)},${f(3 * u)} C ${f(k * u)},${f(3.5 * u)} ${f(k * u)},${f(3.5 * u)} ${f(k * u)},${f(s)}`);
4961
+ curves.push(`M ${f(u)},${f(k * u)} C ${f(u * 0.5)},${f(k * u)} ${f(u * 0.5)},${f(k * u)} 0,${f(k * u)}`);
4962
+ curves.push(`M ${f(3 * u)},${f(k * u)} C ${f(3.5 * u)},${f(k * u)} ${f(3.5 * u)},${f(k * u)} ${f(s)},${f(k * u)}`);
4963
+ }
4964
+ return /* @__PURE__ */ jsxs("g", { fill: "none", stroke: color, strokeWidth, children: [
4965
+ curves.map((d, i) => /* @__PURE__ */ jsx("path", { d }, `c${i}`)),
4966
+ dots.map(([x, y], i) => /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: dotR, fill: color, opacity: "0.5" }, `d${i}`))
4967
+ ] });
4968
+ }
4969
+ function Arch({ size, color, strokeWidth }) {
4970
+ const w = size;
4971
+ const h = size * 1.5;
4972
+ const cx = w / 2;
4973
+ const paths = [];
4974
+ for (let ring = 0; ring < 4; ring++) {
4975
+ const scale = 1 - ring * 0.2;
4976
+ const archW = w * 0.48 * scale;
4977
+ const archH = h * 0.7 * scale;
4978
+ const baseY = h * 0.85;
4979
+ const tipY = baseY - archH;
4980
+ const lx = cx - archW;
4981
+ const rx = cx + archW;
4982
+ const offset = archW * 0.3;
4983
+ const lcx = lx + offset;
4984
+ const rdx = cx - lcx;
4985
+ const rdy = baseY - tipY;
4986
+ const radius = Math.sqrt(rdx * rdx + rdy * rdy);
4987
+ paths.push(
4988
+ `M ${f(lx)},${f(baseY)} A ${f(radius)} ${f(radius)} 0 0 1 ${f(cx)},${f(tipY)} A ${f(radius)} ${f(radius)} 0 0 1 ${f(rx)},${f(baseY)}`
4989
+ );
4990
+ if (ring === 0) {
4991
+ paths.push(`M ${f(lx)},${f(baseY)} L ${f(rx)},${f(baseY)}`);
4992
+ }
4993
+ }
4994
+ const innerScale = 1 - 3 * 0.2;
4995
+ const keyR = w * 0.48 * innerScale * 0.35;
4996
+ const keyY = h * 0.85 - h * 0.7 * innerScale * 0.4;
4997
+ paths.push(
4998
+ `M ${f(cx + keyR)},${f(keyY)} A ${f(keyR)} ${f(keyR)} 0 1 1 ${f(cx + keyR)},${f(keyY + 1e-3)}`
4999
+ );
5000
+ const spR = w * 0.15;
5001
+ paths.push(`M 0,0 A ${f(spR)} ${f(spR)} 0 0 0 ${f(spR)},${f(spR)}`);
5002
+ paths.push(`M ${f(w)},0 A ${f(spR)} ${f(spR)} 0 0 1 ${f(w - spR)},${f(spR)}`);
5003
+ return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
5004
+ }
5005
+ function ArabesqueVine({ size, color, strokeWidth }) {
5006
+ const w = size;
5007
+ const h = size * 1.2;
5008
+ const cx = w / 2;
5009
+ const paths = [];
5010
+ const amp = w * 0.3;
5011
+ const segments = 3;
5012
+ const segH = h / segments;
5013
+ for (let i = 0; i < segments; i++) {
5014
+ const y0 = i * segH;
5015
+ const y1 = y0 + segH;
5016
+ const dir = i % 2 === 0 ? 1 : -1;
5017
+ paths.push(
5018
+ `M ${f(cx)},${f(y0)} C ${f(cx + amp * dir)},${f(y0 + segH * 0.33)} ${f(cx - amp * dir)},${f(y0 + segH * 0.66)} ${f(cx)},${f(y1)}`
5019
+ );
5020
+ const branchY = y0 + segH * 0.5;
5021
+ const branchX = cx + amp * dir * 0.15;
5022
+ const tendrilLen = w * 0.25;
5023
+ const tlx = branchX - tendrilLen;
5024
+ const tly = branchY - tendrilLen * 0.4;
5025
+ paths.push(
5026
+ `M ${f(branchX)},${f(branchY)} C ${f(branchX - tendrilLen * 0.5)},${f(branchY - tendrilLen * 0.8)} ${f(tlx - tendrilLen * 0.2)},${f(tly + tendrilLen * 0.3)} ${f(tlx)},${f(tly)}`
5027
+ );
5028
+ paths.push(
5029
+ `M ${f(tlx)},${f(tly)} C ${f(tlx + tendrilLen * 0.3)},${f(tly + tendrilLen * 0.5)} ${f(branchX - tendrilLen * 0.2)},${f(branchY + tendrilLen * 0.3)} ${f(branchX)},${f(branchY)}`
5030
+ );
5031
+ const trx = branchX + tendrilLen;
5032
+ const try_ = branchY + tendrilLen * 0.4;
5033
+ paths.push(
5034
+ `M ${f(branchX)},${f(branchY)} C ${f(branchX + tendrilLen * 0.5)},${f(branchY + tendrilLen * 0.8)} ${f(trx + tendrilLen * 0.2)},${f(try_ - tendrilLen * 0.3)} ${f(trx)},${f(try_)}`
5035
+ );
5036
+ paths.push(
5037
+ `M ${f(trx)},${f(try_)} C ${f(trx - tendrilLen * 0.3)},${f(try_ - tendrilLen * 0.5)} ${f(branchX + tendrilLen * 0.2)},${f(branchY - tendrilLen * 0.3)} ${f(branchX)},${f(branchY)}`
5038
+ );
5039
+ const spiralR = tendrilLen * 0.15;
5040
+ paths.push(
5041
+ `M ${f(tlx)},${f(tly)} A ${f(spiralR)} ${f(spiralR)} 0 1 0 ${f(tlx + spiralR * 2)},${f(tly)}`
5042
+ );
5043
+ paths.push(
5044
+ `M ${f(trx)},${f(try_)} A ${f(spiralR)} ${f(spiralR)} 0 1 1 ${f(trx - spiralR * 2)},${f(try_)}`
5045
+ );
5046
+ }
5047
+ return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
5048
+ }
5049
+ function ArabesqueNet({ size, color, strokeWidth }) {
5050
+ const s = size;
5051
+ const cells = 4;
5052
+ const cellW = s / cells;
5053
+ const cellH = s / cells;
5054
+ const paths = [];
5055
+ for (let row = 0; row < cells; row++) {
5056
+ for (let col = 0; col < cells; col++) {
5057
+ const cx = col * cellW + cellW / 2;
5058
+ const cy = row * cellH + cellH / 2;
5059
+ const hw = cellW * 0.5;
5060
+ const hh = cellH * 0.5;
5061
+ const bulge = cellW * 0.25;
5062
+ paths.push(
5063
+ `M ${f(cx)},${f(cy - hh)} Q ${f(cx + bulge)},${f(cy - bulge)} ${f(cx + hw)},${f(cy)}`
5064
+ );
5065
+ paths.push(
5066
+ `M ${f(cx + hw)},${f(cy)} Q ${f(cx + bulge)},${f(cy + bulge)} ${f(cx)},${f(cy + hh)}`
5067
+ );
5068
+ paths.push(
5069
+ `M ${f(cx)},${f(cy + hh)} Q ${f(cx - bulge)},${f(cy + bulge)} ${f(cx - hw)},${f(cy)}`
5070
+ );
5071
+ paths.push(
5072
+ `M ${f(cx - hw)},${f(cy)} Q ${f(cx - bulge)},${f(cy - bulge)} ${f(cx)},${f(cy - hh)}`
5073
+ );
5074
+ }
5075
+ }
5076
+ return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
5077
+ }
5078
+ var VARIANT_MAP = {
5079
+ "star8": Star8,
5080
+ "star6": Star6,
5081
+ "khatam": Khatam,
5082
+ "star10": Star10,
5083
+ "star12": Star12,
5084
+ "rosette-double": RosetteDouble,
5085
+ "rosette-filled": RosetteFilled,
5086
+ "seigaiha": Seigaiha,
5087
+ "greek-key": GreekKey,
5088
+ "celtic-knot": CelticKnot,
5089
+ "kolam": Kolam,
5090
+ "arch": Arch,
5091
+ "arabesque-vine": ArabesqueVine,
5092
+ "arabesque-net": ArabesqueNet
5093
+ };
5094
+ var PatternTile = ({
5095
+ variant = "star8",
5096
+ size = 60,
5097
+ color = "var(--color-primary)",
5098
+ strokeWidth = 0.5,
5099
+ className
5100
+ }) => {
5101
+ const Variant = VARIANT_MAP[variant];
5102
+ return /* @__PURE__ */ jsx("g", { className, children: /* @__PURE__ */ jsx(Variant, { size, color, strokeWidth }) });
5103
+ };
5104
+ PatternTile.displayName = "PatternTile";
5105
+ function getTileDimensions(variant, size) {
5106
+ if (variant === "star6") {
5107
+ return { width: size, height: size * (2 / Math.sqrt(3)) };
5108
+ }
5109
+ if (variant === "arch") {
5110
+ return { width: size, height: size * 1.5 };
5111
+ }
5112
+ if (variant === "arabesque-vine") {
5113
+ return { width: size, height: size * 1.2 };
5114
+ }
5115
+ return { width: size, height: size };
5116
+ }
5117
+ function PatternDefs({
5118
+ patternId,
5119
+ variant,
5120
+ size,
5121
+ color,
5122
+ strokeWidth
5123
+ }) {
5124
+ const dims = getTileDimensions(variant, size);
5125
+ return /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
5126
+ "pattern",
5127
+ {
5128
+ id: patternId,
5129
+ x: "0",
5130
+ y: "0",
5131
+ width: dims.width,
5132
+ height: dims.height,
5133
+ patternUnits: "userSpaceOnUse",
5134
+ children: /* @__PURE__ */ jsx(
5135
+ PatternTile,
5136
+ {
5137
+ variant,
5138
+ size,
5139
+ color,
5140
+ strokeWidth
5141
+ }
5142
+ )
5143
+ }
5144
+ ) });
5145
+ }
5146
+ function BackgroundMode({
5147
+ patternId,
5148
+ variant,
5149
+ size,
5150
+ color,
5151
+ strokeWidth,
5152
+ opacity,
5153
+ className
5154
+ }) {
5155
+ return /* @__PURE__ */ jsxs(
5156
+ "svg",
5157
+ {
5158
+ className: cn("absolute inset-0 w-full h-full pointer-events-none", className),
5159
+ preserveAspectRatio: "none",
5160
+ "aria-hidden": "true",
5161
+ children: [
5162
+ /* @__PURE__ */ jsx(
5163
+ PatternDefs,
5164
+ {
5165
+ patternId,
5166
+ variant,
5167
+ size,
5168
+ color,
5169
+ strokeWidth
5170
+ }
5171
+ ),
5172
+ /* @__PURE__ */ jsx(
5173
+ "rect",
5174
+ {
5175
+ width: "100%",
5176
+ height: "100%",
5177
+ fill: `url(#${patternId})`,
5178
+ opacity
5179
+ }
5180
+ )
5181
+ ]
5182
+ }
5183
+ );
5184
+ }
5185
+ function SideMode({
5186
+ patternId,
5187
+ variant,
5188
+ size,
5189
+ color,
5190
+ strokeWidth,
5191
+ opacity,
5192
+ side,
5193
+ className
5194
+ }) {
5195
+ const maskId = `${patternId}-mask`;
5196
+ const gradientId = `${patternId}-grad`;
5197
+ const x1 = side === "left" ? "0%" : "100%";
5198
+ const x2 = side === "left" ? "60%" : "40%";
5199
+ return /* @__PURE__ */ jsxs(
5200
+ "svg",
5201
+ {
5202
+ className: cn("absolute inset-0 w-full h-full pointer-events-none", className),
5203
+ preserveAspectRatio: "none",
5204
+ "aria-hidden": "true",
5205
+ children: [
5206
+ /* @__PURE__ */ jsx(
5207
+ PatternDefs,
5208
+ {
5209
+ patternId,
5210
+ variant,
5211
+ size,
5212
+ color,
5213
+ strokeWidth
5214
+ }
5215
+ ),
5216
+ /* @__PURE__ */ jsxs("defs", { children: [
5217
+ /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1, y1: "0%", x2, y2: "0%", children: [
5218
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "white", stopOpacity: "1" }),
5219
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "white", stopOpacity: "0" })
5220
+ ] }),
5221
+ /* @__PURE__ */ jsx("mask", { id: maskId, children: /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${gradientId})` }) })
5222
+ ] }),
5223
+ /* @__PURE__ */ jsx(
5224
+ "rect",
5225
+ {
5226
+ width: "100%",
5227
+ height: "100%",
5228
+ fill: `url(#${patternId})`,
5229
+ mask: `url(#${maskId})`,
5230
+ opacity
5231
+ }
5232
+ )
5233
+ ]
5234
+ }
5235
+ );
5236
+ }
5237
+ function DualMode({
5238
+ patternId,
5239
+ variant,
5240
+ size,
5241
+ color,
5242
+ strokeWidth,
5243
+ opacity,
5244
+ className
5245
+ }) {
5246
+ const maskId = `${patternId}-dmask`;
5247
+ const gradientId = `${patternId}-dgrad`;
5248
+ return /* @__PURE__ */ jsxs(
5249
+ "svg",
5250
+ {
5251
+ className: cn("absolute inset-0 w-full h-full pointer-events-none", className),
5252
+ preserveAspectRatio: "none",
5253
+ "aria-hidden": "true",
5254
+ children: [
5255
+ /* @__PURE__ */ jsx(
5256
+ PatternDefs,
5257
+ {
5258
+ patternId,
5259
+ variant,
5260
+ size,
5261
+ color,
5262
+ strokeWidth
5263
+ }
5264
+ ),
5265
+ /* @__PURE__ */ jsxs("defs", { children: [
5266
+ /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
5267
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "white", stopOpacity: "1" }),
5268
+ /* @__PURE__ */ jsx("stop", { offset: "35%", stopColor: "white", stopOpacity: "0" }),
5269
+ /* @__PURE__ */ jsx("stop", { offset: "65%", stopColor: "white", stopOpacity: "0" }),
5270
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "white", stopOpacity: "1" })
5271
+ ] }),
5272
+ /* @__PURE__ */ jsx("mask", { id: maskId, children: /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${gradientId})` }) })
5273
+ ] }),
5274
+ /* @__PURE__ */ jsx(
5275
+ "rect",
5276
+ {
5277
+ width: "100%",
5278
+ height: "100%",
5279
+ fill: `url(#${patternId})`,
5280
+ mask: `url(#${maskId})`,
5281
+ opacity
5282
+ }
5283
+ )
5284
+ ]
5285
+ }
5286
+ );
5287
+ }
5288
+ function AroundMode({
5289
+ patternId,
5290
+ variant,
5291
+ size,
5292
+ color,
5293
+ strokeWidth,
5294
+ opacity,
5295
+ className
5296
+ }) {
5297
+ const maskId = `${patternId}-amask`;
5298
+ const gradientId = `${patternId}-agrad`;
5299
+ return /* @__PURE__ */ jsxs(
5300
+ "svg",
5301
+ {
5302
+ className: cn("absolute inset-0 w-full h-full pointer-events-none", className),
5303
+ preserveAspectRatio: "none",
5304
+ "aria-hidden": "true",
5305
+ children: [
5306
+ /* @__PURE__ */ jsx(
5307
+ PatternDefs,
5308
+ {
5309
+ patternId,
5310
+ variant,
5311
+ size,
5312
+ color,
5313
+ strokeWidth
5314
+ }
5315
+ ),
5316
+ /* @__PURE__ */ jsxs("defs", { children: [
5317
+ /* @__PURE__ */ jsxs("radialGradient", { id: gradientId, cx: "50%", cy: "50%", r: "50%", children: [
5318
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "white", stopOpacity: "0" }),
5319
+ /* @__PURE__ */ jsx("stop", { offset: "55%", stopColor: "white", stopOpacity: "0" }),
5320
+ /* @__PURE__ */ jsx("stop", { offset: "85%", stopColor: "white", stopOpacity: "1" }),
5321
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "white", stopOpacity: "1" })
5322
+ ] }),
5323
+ /* @__PURE__ */ jsx("mask", { id: maskId, children: /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${gradientId})` }) })
5324
+ ] }),
5325
+ /* @__PURE__ */ jsx(
5326
+ "rect",
5327
+ {
5328
+ width: "100%",
5329
+ height: "100%",
5330
+ fill: `url(#${patternId})`,
5331
+ mask: `url(#${maskId})`,
5332
+ opacity
5333
+ }
5334
+ )
5335
+ ]
5336
+ }
5337
+ );
5338
+ }
5339
+ function FrameStrip({
5340
+ patternId,
5341
+ variant,
5342
+ size,
5343
+ color,
5344
+ strokeWidth,
5345
+ opacity,
5346
+ height
5347
+ }) {
5348
+ return /* @__PURE__ */ jsxs(
5349
+ "svg",
5350
+ {
5351
+ className: "w-full pointer-events-none",
5352
+ style: { height },
5353
+ preserveAspectRatio: "none",
5354
+ "aria-hidden": "true",
5355
+ children: [
5356
+ /* @__PURE__ */ jsx(
5357
+ PatternDefs,
5358
+ {
5359
+ patternId,
5360
+ variant,
5361
+ size,
5362
+ color,
5363
+ strokeWidth
5364
+ }
5365
+ ),
5366
+ /* @__PURE__ */ jsx(
5367
+ "rect",
5368
+ {
5369
+ width: "100%",
5370
+ height: "100%",
5371
+ fill: `url(#${patternId})`,
5372
+ opacity
5373
+ }
5374
+ )
5375
+ ]
5376
+ }
5377
+ );
5378
+ }
5379
+ var GeometricPattern = ({
5380
+ variant = "star8",
5381
+ mode = "background",
5382
+ opacity = 0.06,
5383
+ color = "var(--color-primary)",
5384
+ scale = 1,
5385
+ strokeWidth = 0.5,
5386
+ children,
5387
+ className
5388
+ }) => {
5389
+ const reactId = useId();
5390
+ const patternId = `gp${reactId.replace(/:/g, "")}`;
5391
+ const size = 60 * scale;
5392
+ const stripHeight = 40 * scale;
5393
+ if (mode === "frame") {
5394
+ const topId = `${patternId}-top`;
5395
+ const botId = `${patternId}-bot`;
5396
+ return /* @__PURE__ */ jsxs(Box, { className: cn("relative", className), children: [
5397
+ /* @__PURE__ */ jsx(
5398
+ FrameStrip,
5399
+ {
5400
+ patternId: topId,
5401
+ variant,
5402
+ size,
5403
+ color,
5404
+ strokeWidth,
5405
+ opacity,
5406
+ height: stripHeight
5407
+ }
5408
+ ),
5409
+ children,
5410
+ /* @__PURE__ */ jsx(
5411
+ FrameStrip,
5412
+ {
5413
+ patternId: botId,
5414
+ variant,
5415
+ size,
5416
+ color,
5417
+ strokeWidth,
5418
+ opacity,
5419
+ height: stripHeight
5420
+ }
5421
+ )
5422
+ ] });
5423
+ }
5424
+ if (mode === "around") {
5425
+ return /* @__PURE__ */ jsx(
5426
+ AroundMode,
5427
+ {
5428
+ patternId,
5429
+ variant,
5430
+ size,
5431
+ color,
5432
+ strokeWidth,
5433
+ opacity,
5434
+ className
5435
+ }
5436
+ );
5437
+ }
5438
+ if (mode === "dual") {
5439
+ return /* @__PURE__ */ jsx(
5440
+ DualMode,
5441
+ {
5442
+ patternId,
5443
+ variant,
5444
+ size,
5445
+ color,
5446
+ strokeWidth,
5447
+ opacity,
5448
+ className
5449
+ }
5450
+ );
5451
+ }
5452
+ if (mode === "left" || mode === "right") {
5453
+ return /* @__PURE__ */ jsx(
5454
+ SideMode,
5455
+ {
5456
+ patternId,
5457
+ variant,
5458
+ size,
5459
+ color,
5460
+ strokeWidth,
5461
+ opacity,
5462
+ side: mode,
5463
+ className
5464
+ }
5465
+ );
5466
+ }
5467
+ return /* @__PURE__ */ jsx(
5468
+ BackgroundMode,
5469
+ {
5470
+ patternId,
5471
+ variant,
5472
+ size,
5473
+ color,
5474
+ strokeWidth,
5475
+ opacity,
5476
+ className
5477
+ }
5478
+ );
5479
+ };
5480
+ GeometricPattern.displayName = "GeometricPattern";
5481
+ function ArchSVG({
5482
+ facing,
5483
+ w,
5484
+ h,
5485
+ color,
5486
+ strokeWidth
5487
+ }) {
5488
+ const paths = [];
5489
+ const archCount = 3;
5490
+ const archH = h / archCount;
5491
+ const rings = 5;
5492
+ for (let a = 0; a < archCount; a++) {
5493
+ const baseY = a * archH + archH;
5494
+ const topY = a * archH + archH * 0.05;
5495
+ for (let r2 = 0; r2 < rings; r2++) {
5496
+ const scale = 1 - r2 * 0.17;
5497
+ const archW = w * 0.95 * scale;
5498
+ const aTopY = topY + (1 - scale) * (baseY - topY) * 0.5;
5499
+ const aBaseY = baseY - (1 - scale) * archH * 0.05;
5500
+ const edgeX2 = facing === "right" ? w : 0;
5501
+ const innerX2 = facing === "right" ? w - archW : archW;
5502
+ const midY = (aTopY + aBaseY) / 2;
5503
+ const radius = Math.sqrt(archW * archW + (aBaseY - midY) * (aBaseY - midY));
5504
+ if (facing === "right") {
5505
+ paths.push(
5506
+ `M ${f2(edgeX2)},${f2(aBaseY)} A ${f2(radius)} ${f2(radius)} 0 0 0 ${f2(innerX2)},${f2(aTopY + (aBaseY - aTopY) * 0.5)} A ${f2(radius)} ${f2(radius)} 0 0 0 ${f2(edgeX2)},${f2(aTopY)}`
5507
+ );
5508
+ } else {
5509
+ paths.push(
5510
+ `M ${f2(edgeX2)},${f2(aBaseY)} A ${f2(radius)} ${f2(radius)} 0 0 1 ${f2(innerX2)},${f2(aTopY + (aBaseY - aTopY) * 0.5)} A ${f2(radius)} ${f2(radius)} 0 0 1 ${f2(edgeX2)},${f2(aTopY)}`
5511
+ );
5512
+ }
5513
+ }
5514
+ const edgeX = facing === "right" ? w : 0;
5515
+ const innerX = facing === "right" ? w * 0.05 : w * 0.95;
5516
+ paths.push(`M ${f2(edgeX)},${f2(baseY)} L ${f2(innerX)},${f2(baseY)}`);
5517
+ }
5518
+ return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
5519
+ }
5520
+ function VineSVG({
5521
+ facing,
5522
+ w,
5523
+ h,
5524
+ color,
5525
+ strokeWidth
5526
+ }) {
5527
+ const paths = [];
5528
+ const dir = facing === "right" ? -1 : 1;
5529
+ const edgeX = facing === "right" ? w * 0.85 : w * 0.15;
5530
+ const segments = 5;
5531
+ const segH = h / segments;
5532
+ for (let i = 0; i < segments; i++) {
5533
+ const y0 = i * segH;
5534
+ const y1 = y0 + segH;
5535
+ const sway = w * 0.12 * (i % 2 === 0 ? 1 : -1);
5536
+ paths.push(
5537
+ `M ${f2(edgeX + sway)},${f2(y0)} C ${f2(edgeX - sway)},${f2(y0 + segH * 0.33)} ${f2(edgeX + sway)},${f2(y0 + segH * 0.66)} ${f2(edgeX - sway)},${f2(y1)}`
5538
+ );
5539
+ const branchY = y0 + segH * 0.35;
5540
+ const branchX = edgeX;
5541
+ const leafW = w * 0.55;
5542
+ const leafH = segH * 0.35;
5543
+ const leafTipX = branchX + dir * leafW;
5544
+ const leafTipY = branchY - leafH * 0.2;
5545
+ paths.push(
5546
+ `M ${f2(branchX)},${f2(branchY)} C ${f2(branchX + dir * leafW * 0.3)},${f2(branchY - leafH)} ${f2(leafTipX - dir * leafW * 0.1)},${f2(leafTipY - leafH * 0.3)} ${f2(leafTipX)},${f2(leafTipY)}`
5547
+ );
5548
+ paths.push(
5549
+ `M ${f2(leafTipX)},${f2(leafTipY)} C ${f2(leafTipX - dir * leafW * 0.2)},${f2(leafTipY + leafH * 0.6)} ${f2(branchX + dir * leafW * 0.15)},${f2(branchY + leafH * 0.4)} ${f2(branchX)},${f2(branchY + leafH * 0.1)}`
5550
+ );
5551
+ const tendrilY = y0 + segH * 0.7;
5552
+ const tendrilW = w * 0.35;
5553
+ const tendrilTipX = edgeX + dir * tendrilW;
5554
+ paths.push(
5555
+ `M ${f2(edgeX)},${f2(tendrilY)} Q ${f2(edgeX + dir * tendrilW * 0.6)},${f2(tendrilY - segH * 0.12)} ${f2(tendrilTipX)},${f2(tendrilY + segH * 0.05)}`
5556
+ );
5557
+ const spR = leafW * 0.08;
5558
+ paths.push(
5559
+ `M ${f2(leafTipX)},${f2(leafTipY)} A ${f2(spR)} ${f2(spR)} 0 1 ${facing === "right" ? 0 : 1} ${f2(leafTipX + dir * spR * 0.5)},${f2(leafTipY + spR)}`
5560
+ );
5561
+ }
5562
+ return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
5563
+ }
5564
+ function LatticeSVG({
5565
+ facing,
5566
+ w,
5567
+ h,
5568
+ color,
5569
+ strokeWidth
5570
+ }) {
5571
+ const paths = [];
5572
+ const cols = 5;
5573
+ const rows = Math.ceil(h / (w / cols));
5574
+ const cellW = w / cols;
5575
+ const cellH = cellW;
5576
+ const bulge = cellW * 0.3;
5577
+ for (let row = 0; row < rows; row++) {
5578
+ for (let col = 0; col < cols; col++) {
5579
+ const cx = col * cellW + cellW / 2;
5580
+ const cy = row * cellH + cellH / 2;
5581
+ const hw = cellW * 0.5;
5582
+ const hh = cellH * 0.5;
5583
+ paths.push(
5584
+ `M ${f2(cx)},${f2(cy - hh)} Q ${f2(cx + bulge)},${f2(cy)} ${f2(cx)},${f2(cy + hh)}`
5585
+ );
5586
+ paths.push(
5587
+ `M ${f2(cx)},${f2(cy - hh)} Q ${f2(cx - bulge)},${f2(cy)} ${f2(cx)},${f2(cy + hh)}`
5588
+ );
5589
+ paths.push(
5590
+ `M ${f2(cx - hw)},${f2(cy)} Q ${f2(cx)},${f2(cy - bulge * 0.5)} ${f2(cx + hw)},${f2(cy)}`
5591
+ );
5592
+ paths.push(
5593
+ `M ${f2(cx - hw)},${f2(cy)} Q ${f2(cx)},${f2(cy + bulge * 0.5)} ${f2(cx + hw)},${f2(cy)}`
5594
+ );
5595
+ }
5596
+ }
5597
+ return /* @__PURE__ */ jsx("g", { fill: "none", stroke: color, strokeWidth, children: paths.map((d, i) => /* @__PURE__ */ jsx("path", { d }, i)) });
5598
+ }
5599
+ function f2(n) {
5600
+ return n.toFixed(2);
5601
+ }
5602
+ var VARIANT_MAP2 = {
5603
+ arch: ArchSVG,
5604
+ vine: VineSVG,
5605
+ lattice: LatticeSVG
5606
+ };
5607
+ var EdgeDecoration = ({
5608
+ variant = "arch",
5609
+ side = "both",
5610
+ opacity = 0.15,
5611
+ color = "var(--color-primary)",
5612
+ strokeWidth = 0.5,
5613
+ width = 15,
5614
+ className
5615
+ }) => {
5616
+ const id = useId();
5617
+ const Variant = VARIANT_MAP2[variant];
5618
+ const sides = side === "both" ? ["left", "right"] : [side];
5619
+ return /* @__PURE__ */ jsx(Fragment, { children: sides.map((s) => /* @__PURE__ */ jsx(
5620
+ "svg",
5621
+ {
5622
+ className: cn(
5623
+ "absolute top-0 h-full pointer-events-none",
5624
+ s === "left" ? "left-0" : "right-0",
5625
+ className
5626
+ ),
5627
+ style: {
5628
+ width: `${width}%`,
5629
+ opacity
5630
+ },
5631
+ viewBox: `0 0 200 ${200 * 3}`,
5632
+ preserveAspectRatio: "none",
5633
+ "aria-hidden": "true",
5634
+ children: /* @__PURE__ */ jsx(
5635
+ Variant,
5636
+ {
5637
+ facing: s,
5638
+ w: 200,
5639
+ h: 600,
5640
+ color,
5641
+ strokeWidth
5642
+ }
5643
+ )
5644
+ },
5645
+ `${id}-${s}`
5646
+ )) });
5647
+ };
5648
+ EdgeDecoration.displayName = "EdgeDecoration";
4641
5649
 
4642
- export { AnimatedCounter, ArticleSection, Badge, Box, Button, CTABanner, Card, CaseStudyCard, Center, CommunityLinks, ContentSection, Divider, FeatureCard, FeatureGrid, GradientDivider, HStack, HeroSection, Icon, InstallBox, MarketingFooter, PricingCard, PricingGrid, PullQuote, ServiceCatalog, ShowcaseCard, SimpleGrid, Spacer, SplitSection, StatsGrid, StepFlow, TagCloud, TeamCard, Typography, VStack };
5650
+ export { AnimatedCounter, ArticleSection, Badge, Box, Button, CTABanner, Card, CaseStudyCard, Center, CommunityLinks, ContentSection, Divider, EdgeDecoration, FeatureCard, FeatureGrid, GeometricPattern, GradientDivider, HStack, HeroSection, Icon, InstallBox, MarketingFooter, PatternTile, PricingCard, PricingGrid, PullQuote, ServiceCatalog, ShowcaseCard, SimpleGrid, Spacer, SplitSection, StatsGrid, StepFlow, TagCloud, TeamCard, Typography, VStack, getTileDimensions };