@pathscale/ui 0.0.58 → 0.0.60

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
@@ -3623,12 +3623,14 @@ const Alert = (props)=>{
3623
3623
  "class",
3624
3624
  "className",
3625
3625
  "style",
3626
+ "children",
3626
3627
  "aria-atomic",
3627
3628
  "aria-live",
3628
3629
  "aria-relevant",
3629
3630
  "aria-label",
3630
3631
  "aria-labelledby"
3631
3632
  ]);
3633
+ const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
3632
3634
  const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("alert", local.class, local.className, clsx({
3633
3635
  "alert-vertical": "vertical" === local.layout,
3634
3636
  "alert-horizontal": "horizontal" === local.layout,
@@ -3674,7 +3676,7 @@ const Alert = (props)=>{
3674
3676
  }
3675
3677
  }), false, true);
3676
3678
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.icon, null);
3677
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>props.children, null);
3679
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, resolvedChildren, null);
3678
3680
  return _el$;
3679
3681
  })();
3680
3682
  };
@@ -4462,15 +4464,15 @@ class jt extends _t {
4462
4464
  }
4463
4465
  class le extends _t {
4464
4466
  }
4465
- const x = "Custom", ue = null, fe = {
4467
+ const cally_x = "Custom", ue = null, fe = {
4466
4468
  true: 1,
4467
4469
  "": 1,
4468
4470
  1: 1
4469
4471
  };
4470
4472
  function de(e, t, n, s, r) {
4471
- const { type: o, reflect: a, event: u, value: i, attr: l = he(t) } = n?.name != x && R(n) && n != ue ? n : {
4473
+ const { type: o, reflect: a, event: u, value: i, attr: l = he(t) } = n?.name != cally_x && R(n) && n != ue ? n : {
4472
4474
  type: n
4473
- }, c = o?.name === x && o.map, d = null != i ? o != Function && T(i) ? i : ()=>i : null;
4475
+ }, c = o?.name === cally_x && o.map, d = null != i ? o != Function && T(i) ? i : ()=>i : null;
4474
4476
  Object.defineProperty(e, t, {
4475
4477
  configurable: !0,
4476
4478
  set (f) {
@@ -4490,7 +4492,7 @@ function de(e, t, n, s, r) {
4490
4492
  type: o
4491
4493
  };
4492
4494
  }
4493
- const Yt = (e, { type: t, base: n = CustomEvent, ...s })=>e.dispatchEvent(new n(t, s)), he = (e)=>e.replace(/([A-Z])/g, "-$1").toLowerCase(), me = (e, t, n, s)=>null != s && (t != Boolean || s) ? e.setAttribute(n, t?.name === x && t?.serialize ? t?.serialize(s) : R(s) ? JSON.stringify(s) : t == Boolean ? "" : s) : e.removeAttribute(n), ye = (e, t)=>e == Boolean ? !!fe[t] : e == Number ? Number(t) : e == String ? t : e == Array || e == Object ? JSON.parse(t) : e.name == x ? t : new e(t), pe = ({ map: e }, t)=>{
4495
+ const Yt = (e, { type: t, base: n = CustomEvent, ...s })=>e.dispatchEvent(new n(t, s)), he = (e)=>e.replace(/([A-Z])/g, "-$1").toLowerCase(), me = (e, t, n, s)=>null != s && (t != Boolean || s) ? e.setAttribute(n, t?.name === cally_x && t?.serialize ? t?.serialize(s) : R(s) ? JSON.stringify(s) : t == Boolean ? "" : s) : e.removeAttribute(n), ye = (e, t)=>e == Boolean ? !!fe[t] : e == Number ? Number(t) : e == String ? t : e == Array || e == Object ? JSON.parse(t) : e.name == cally_x ? t : new e(t), pe = ({ map: e }, t)=>{
4494
4496
  try {
4495
4497
  return {
4496
4498
  value: e(t),
@@ -4525,7 +4527,7 @@ let ge = 0;
4525
4527
  const ve = (e)=>{
4526
4528
  const t = (e?.dataset || {})?.hydrate || "";
4527
4529
  return t || "c" + ge++;
4528
- }, j = (e, t = HTMLElement)=>{
4530
+ }, cally_j = (e, t = HTMLElement)=>{
4529
4531
  const n = {}, s = {}, r = "prototype" in t && t.prototype instanceof Element, o = r ? t : "base" in t ? t.base : HTMLElement, { props: a, styles: u } = r ? e : t;
4530
4532
  class i extends o {
4531
4533
  constructor(){
@@ -4860,7 +4862,7 @@ const Re = Ht("host", {
4860
4862
  t
4861
4863
  ]), (t || e).value;
4862
4864
  }, Le = (e)=>{
4863
- const t = j(()=>($e(t, cally_().current), Re), {
4865
+ const t = cally_j(()=>($e(t, cally_().current), Re), {
4864
4866
  props: {
4865
4867
  value: {
4866
4868
  type: Object,
@@ -5152,7 +5154,7 @@ const tt = lt(), ft = Le({
5152
5154
  }
5153
5155
  });
5154
5156
  customElements.define("calendar-ctx", ft);
5155
- const We = (e, t)=>(t + e) % 7, Je = j((e)=>{
5157
+ const We = (e, t)=>(t + e) % 7, Je = cally_j((e)=>{
5156
5158
  const t = Ue(ft), n = ae(), s = Ke({
5157
5159
  props: e,
5158
5160
  context: t
@@ -5424,7 +5426,7 @@ function yt({ months: e, pageBy: t, locale: n, focusedDate: s, setFocusedDate: r
5424
5426
  focus: y
5425
5427
  };
5426
5428
  }
5427
- const Qe = j((e)=>{
5429
+ const Qe = cally_j((e)=>{
5428
5430
  const [t, n] = N("value"), [s = t, r] = N("focusedDate"), o = yt({
5429
5431
  ...e,
5430
5432
  focusedDate: s,
@@ -5455,7 +5457,7 @@ const Mt = (e, t)=>v.compare(e, t) < 0 ? [
5455
5457
  ] : [
5456
5458
  t,
5457
5459
  e
5458
- ], Ve = j((e)=>{
5460
+ ], Ve = cally_j((e)=>{
5459
5461
  const [t, n] = Be("value"), [s = t[0], r] = N("focusedDate"), o = yt({
5460
5462
  ...e,
5461
5463
  focusedDate: s,
@@ -5499,7 +5501,7 @@ const Mt = (e, t)=>v.compare(e, t) < 0 ? [
5499
5501
  styles: mt
5500
5502
  });
5501
5503
  customElements.define("calendar-range", Ve);
5502
- const tn = j((e)=>{
5504
+ const tn = cally_j((e)=>{
5503
5505
  const [t, n] = qe("value"), [s = t[0], r] = N("focusedDate"), o = yt({
5504
5506
  ...e,
5505
5507
  focusedDate: s,
@@ -7714,32 +7716,58 @@ const Link = (props)=>{
7714
7716
  "color",
7715
7717
  "hover",
7716
7718
  "class",
7717
- "data-theme"
7719
+ "className",
7720
+ "dataTheme",
7721
+ "style",
7722
+ "asChild",
7723
+ "aria-current",
7724
+ "aria-label",
7725
+ "aria-describedby"
7718
7726
  ]);
7719
- const classes = twMerge("link", dist_clsx({
7720
- "link-hover": false !== local.hover,
7721
- "link-neutral": "neutral" === local.color,
7722
- "link-primary": "primary" === local.color,
7723
- "link-secondary": "secondary" === local.color,
7724
- "link-accent": "accent" === local.color,
7725
- "link-info": "info" === local.color,
7726
- "link-success": "success" === local.color,
7727
- "link-warning": "warning" === local.color,
7728
- "link-error": "error" === local.color
7729
- }), local.class);
7727
+ const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
7728
+ const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("link", dist_clsx({
7729
+ "link-hover": false !== local.hover,
7730
+ "link-neutral": "neutral" === local.color,
7731
+ "link-primary": "primary" === local.color,
7732
+ "link-secondary": "secondary" === local.color,
7733
+ "link-accent": "accent" === local.color,
7734
+ "link-info": "info" === local.color,
7735
+ "link-success": "success" === local.color,
7736
+ "link-warning": "warning" === local.color,
7737
+ "link-error": "error" === local.color,
7738
+ "link-ghost": "ghost" === local.color
7739
+ }), local.class, local.className));
7740
+ const ariaCurrent = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>local["aria-current"]);
7741
+ const ariaLabel = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>local["aria-label"]);
7742
+ const ariaDescribedby = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>local["aria-describedby"]);
7743
+ if (local.asChild) return resolvedChildren();
7730
7744
  return (()=>{
7731
7745
  var _el$ = Link_tmpl$();
7732
7746
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(rest, {
7733
7747
  get href () {
7734
7748
  return local.href;
7735
7749
  },
7736
- class: classes,
7750
+ get ["class"] () {
7751
+ return classes();
7752
+ },
7753
+ get style () {
7754
+ return local.style;
7755
+ },
7737
7756
  get ["data-theme"] () {
7738
- return local["data-theme"];
7757
+ return local.dataTheme;
7758
+ },
7759
+ get ["aria-current"] () {
7760
+ return ariaCurrent();
7761
+ },
7762
+ get ["aria-label"] () {
7763
+ return ariaLabel();
7764
+ },
7765
+ get ["aria-describedby"] () {
7766
+ return ariaDescribedby();
7739
7767
  },
7740
7768
  rel: "noopener noreferrer"
7741
7769
  }), false, true);
7742
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children);
7770
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, resolvedChildren);
7743
7771
  return _el$;
7744
7772
  })();
7745
7773
  };
@@ -8226,7 +8254,7 @@ const NavbarRow = (props)=>{
8226
8254
  "dataTheme"
8227
8255
  ]);
8228
8256
  const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
8229
- const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("flex items-center", local.class, local.className, clsx({
8257
+ const classes = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>twMerge("flex items-center", clsx({
8230
8258
  "border-b border-gray-200": true === local.bordered,
8231
8259
  "px-4 py-2": false !== local.padded,
8232
8260
  "bg-base-100": !local.color || "ghost" === local.color,
@@ -8238,7 +8266,7 @@ const NavbarRow = (props)=>{
8238
8266
  "bg-success text-success-content": "success" === local.color,
8239
8267
  "bg-warning text-warning-content": "warning" === local.color,
8240
8268
  "bg-error text-error-content": "error" === local.color
8241
- })));
8269
+ }), local.class, local.className));
8242
8270
  return (()=>{
8243
8271
  var _el$ = NavbarRow_tmpl$();
8244
8272
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
@@ -9483,252 +9511,392 @@ const steps_Steps = Object.assign(Steps, {
9483
9511
  Step: Step
9484
9512
  });
9485
9513
  const steps = steps_Steps;
9486
- var SvgBackground_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><svg class="absolute inset-0 w-full h-full z-0"viewBox="0 0 400 400"preserveAspectRatio="xMidYMid slice"xmlns=http://www.w3.org/2000/svg><defs><linearGradient gradientTransform="rotate(63, 0.5, 0.5)"x1=50% y1=0% x2=50% y2=100%><stop stop-opacity=1 offset=0%></stop><stop stop-opacity=1 offset=100%></stop></linearGradient></defs><rect width=400 height=400></rect></svg><div class="relative z-10 h-full w-full">'), SvgBackground_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><filter x=-20% y=-20% width=140% height=140% filterUnits=objectBoundingBox primitiveUnits=userSpaceOnUse color-interpolation-filters=sRGB></svg>", false, true, false), SvgBackground_tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><feGaussianBlur in=SourceGraphic result=blur></svg>", false, true, false), SvgBackground_tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><feTurbulence type=fractalNoise numOctaves=2 seed=10 stitchTiles=stitch result=turbulence></svg>", false, true, false), _tmpl$5 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><feGaussianBlur in=turbulence result=blur></svg>", false, true, false), _tmpl$6 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><feBlend in=SourceGraphic in2=blur result=blend></svg>", false, true, false), _tmpl$7 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="absolute inset-0 z-5">');
9487
- function hexToHsl(hex) {
9488
- hex = hex.replace('#', '');
9489
- const r = parseInt(hex.substr(0, 2), 16) / 255;
9490
- const g = parseInt(hex.substr(2, 2), 16) / 255;
9491
- const b = parseInt(hex.substr(4, 2), 16) / 255;
9492
- const max = Math.max(r, g, b);
9493
- const min = Math.min(r, g, b);
9494
- let h = 0;
9495
- let s = 0;
9496
- const l = (max + min) / 2;
9497
- if (max !== min) {
9498
- const d = max - min;
9499
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
9500
- switch(max){
9501
- case r:
9502
- h = (g - b) / d + (g < b ? 6 : 0);
9503
- break;
9504
- case g:
9505
- h = (b - r) / d + 2;
9506
- break;
9507
- case b:
9508
- h = (r - g) / d + 4;
9509
- break;
9510
- }
9511
- h /= 6;
9512
- }
9514
+ var SvgBackground_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><ellipse></svg>", false, true, false), SvgBackground_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle></svg>", false, true, false), SvgBackground_tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=0 cy=0 r=100 opacity=0.7></svg>", false, true, false), SvgBackground_tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=400 cy=0 r=120></svg>", false, true, false), _tmpl$5 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=0 cy=400 r=100 opacity=0.7></svg>", false, true, false), _tmpl$6 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=400 cy=400 r=120></svg>", false, true, false), _tmpl$7 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=0 cy=200 r=70 opacity=0.6></svg>", false, true, false), _tmpl$8 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=200 cy=0 r=100></svg>", false, true, false), _tmpl$9 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=400 cy=200 r=100></svg>", false, true, false), _tmpl$0 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><circle cx=200 cy=400 r=100></svg>", false, true, false), _tmpl$1 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><div><svg viewBox="0 0 400 400"xmlns=http://www.w3.org/2000/svg><rect width=400 height=400></rect></svg></div><canvas></canvas><div class="relative z-10 h-full w-full">'), _tmpl$10 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="absolute inset-0 z-5">');
9515
+ function hexToRgb(hex) {
9516
+ hex = hex.replace(/^#/, '');
9517
+ const bigint = parseInt(hex, 16);
9518
+ const r = bigint >> 16 & 255;
9519
+ const g = bigint >> 8 & 255;
9520
+ const b = 255 & bigint;
9513
9521
  return {
9514
- h: Math.round(360 * h),
9515
- s: Math.round(100 * s),
9516
- l: Math.round(100 * l)
9522
+ r,
9523
+ g,
9524
+ b
9517
9525
  };
9518
9526
  }
9519
- function parseColor(colorString) {
9520
- const hslMatch = colorString.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);
9521
- if (hslMatch) return {
9522
- h: parseInt(hslMatch[1]),
9523
- s: parseInt(hslMatch[2]),
9524
- l: parseInt(hslMatch[3])
9527
+ function SvgBackground(props) {
9528
+ const { colorStart = '#6366f1', colorEnd = '#4f46e5', backgroundColor = '#000000', opacity = 1, blurIntensity = 40, density = 5, darkness = 0, class: className = '', style = {}, children } = props;
9529
+ let containerRef;
9530
+ let svgRef;
9531
+ let canvasRef;
9532
+ const [isBackgroundReady, setBackgroundReady] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
9533
+ const getIntermediateColor = (t)=>{
9534
+ const start = hexToRgb(colorStart);
9535
+ const end = hexToRgb(colorEnd);
9536
+ const r = Math.round(start.r + (end.r - start.r) * t);
9537
+ const g = Math.round(start.g + (end.g - start.g) * t);
9538
+ const b = Math.round(start.b + (end.b - start.b) * t);
9539
+ return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;
9525
9540
  };
9526
- const hexMatch = colorString.match(/^#?([a-fA-F0-9]{6})$/);
9527
- if (hexMatch) return hexToHsl(colorString);
9528
- const rgbMatch = colorString.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
9529
- if (rgbMatch) {
9530
- const r = parseInt(rgbMatch[1]) / 255;
9531
- const g = parseInt(rgbMatch[2]) / 255;
9532
- const b = parseInt(rgbMatch[3]) / 255;
9533
- const max = Math.max(r, g, b);
9534
- const min = Math.min(r, g, b);
9535
- let h = 0;
9536
- let s = 0;
9537
- const l = (max + min) / 2;
9538
- if (max !== min) {
9539
- const d = max - min;
9540
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
9541
- switch(max){
9542
- case r:
9543
- h = (g - b) / d + (g < b ? 6 : 0);
9544
- break;
9545
- case g:
9546
- h = (b - r) / d + 2;
9547
- break;
9548
- case b:
9549
- h = (r - g) / d + 4;
9550
- break;
9551
- }
9552
- h /= 6;
9541
+ const generateShapes = ()=>{
9542
+ const normalizedDensity = Math.max(1, density);
9543
+ const maxShapes = Math.min(200, Math.max(10, Math.ceil(15 + 8 * Math.sqrt(normalizedDensity))));
9544
+ const colors = [];
9545
+ for(let i = 0; i < maxShapes; i++){
9546
+ const randomOffset = 0.1 * Math.sin(0.1 * i);
9547
+ const t = i / (maxShapes - 1) + randomOffset;
9548
+ colors.push(getIntermediateColor(Math.max(0, Math.min(1, t))));
9553
9549
  }
9554
- return {
9555
- h: Math.round(360 * h),
9556
- s: Math.round(100 * s),
9557
- l: Math.round(100 * l)
9550
+ const seed = 42;
9551
+ const random = (i)=>{
9552
+ const x = 10000 * Math.sin(seed + 100 * i);
9553
+ return x - Math.floor(x);
9554
+ };
9555
+ const gridSize = Math.ceil(Math.sqrt(maxShapes / 1.5));
9556
+ const cellWidth = 400 / gridSize;
9557
+ const cellHeight = 400 / gridSize;
9558
+ const minRadius = 40;
9559
+ const baseCount = Math.ceil(gridSize * gridSize * 0.8);
9560
+ const baseShapes = [];
9561
+ const coveredGrid = Array(gridSize).fill(0).map(()=>Array(gridSize).fill(false));
9562
+ for(let i = 0; i < gridSize; i++)for(let j = 0; j < gridSize; j++){
9563
+ if (baseShapes.length >= baseCount) continue;
9564
+ const isLeftSide = i < gridSize / 3;
9565
+ const leftSideMultiplier = isLeftSide ? 3 : 1;
9566
+ const skipChance = Math.max(0, (0.2 - normalizedDensity / 100) * leftSideMultiplier);
9567
+ if (random(100 * i + j) < skipChance) continue;
9568
+ coveredGrid[i][j] = true;
9569
+ const randomOffsetMultiplier = isLeftSide ? 1.5 : 1;
9570
+ const randomOffset = 0.4 * Math.min(cellWidth, cellHeight) * (1 - Math.min(1, normalizedDensity / 50)) * randomOffsetMultiplier;
9571
+ const cx = i * cellWidth + cellWidth / 2 + (2 * random(200 * i + j) - 1) * randomOffset;
9572
+ const cy = j * cellHeight + cellHeight / 2 + (2 * random(300 * i + j) - 1) * randomOffset;
9573
+ const sizeRatioBase = Math.max(0.6, 1.2 - 0.15 * Math.log10(normalizedDensity + 1));
9574
+ const sizeRatio = isLeftSide ? 0.8 * sizeRatioBase : sizeRatioBase;
9575
+ const baseRadius = Math.min(cellWidth, cellHeight) * sizeRatio;
9576
+ const sizeVariationBase = Math.max(0.2, 0.5 - normalizedDensity / 200);
9577
+ const sizeVariation = isLeftSide ? 1.5 * sizeVariationBase : sizeVariationBase;
9578
+ const radius = Math.max(minRadius, baseRadius * (0.8 + random(400 * i + j) * sizeVariation));
9579
+ const colorIndexBase = Math.floor(random(500 * i + j) * colors.length);
9580
+ const colorIndex = isLeftSide ? Math.floor((colorIndexBase + random(600 * i + j) * colors.length) / 2) : colorIndexBase;
9581
+ const color = colors[colorIndex];
9582
+ const opacity = isLeftSide && random(700 * i + j) > 0.6 ? 0.7 + 0.3 * random(800 * i + j) : 1;
9583
+ const ellipseChance = isLeftSide ? 0.6 : 0.4;
9584
+ if (random(600 * i + j) > 1 - ellipseChance) {
9585
+ const rx = radius;
9586
+ const ry = Math.max(minRadius, radius * (0.6 + 0.8 * random(700 * i + j)));
9587
+ const rotation = 360 * random(800 * i + j);
9588
+ baseShapes.push((()=>{
9589
+ var _el$ = SvgBackground_tmpl$();
9590
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "fill", color);
9591
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "transform", `rotate(${rotation} ${cx} ${cy})`);
9592
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
9593
+ var _v$ = cx.toString(), _v$2 = cy.toString(), _v$3 = rx.toString(), _v$4 = ry.toString(), _v$5 = opacity.toString();
9594
+ _v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "cx", _p$.e = _v$);
9595
+ _v$2 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "cy", _p$.t = _v$2);
9596
+ _v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "rx", _p$.a = _v$3);
9597
+ _v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "ry", _p$.o = _v$4);
9598
+ _v$5 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "opacity", _p$.i = _v$5);
9599
+ return _p$;
9600
+ }, {
9601
+ e: void 0,
9602
+ t: void 0,
9603
+ a: void 0,
9604
+ o: void 0,
9605
+ i: void 0
9606
+ });
9607
+ return _el$;
9608
+ })());
9609
+ } else baseShapes.push((()=>{
9610
+ var _el$2 = SvgBackground_tmpl$2();
9611
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "fill", color);
9612
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
9613
+ var _v$6 = cx.toString(), _v$7 = cy.toString(), _v$8 = radius.toString(), _v$9 = opacity.toString();
9614
+ _v$6 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "cx", _p$.e = _v$6);
9615
+ _v$7 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "cy", _p$.t = _v$7);
9616
+ _v$8 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "r", _p$.a = _v$8);
9617
+ _v$9 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "opacity", _p$.o = _v$9);
9618
+ return _p$;
9619
+ }, {
9620
+ e: void 0,
9621
+ t: void 0,
9622
+ a: void 0,
9623
+ o: void 0
9624
+ });
9625
+ return _el$2;
9626
+ })());
9627
+ }
9628
+ for(let i = 0; i < gridSize; i++)for(let j = 0; j < gridSize; j++)if (!coveredGrid[i][j]) {
9629
+ const isLeftSide = i < gridSize / 3;
9630
+ if (isLeftSide && random(900 * i + j) < 0.3) continue;
9631
+ const cx = i * cellWidth + cellWidth / 2;
9632
+ const cy = j * cellHeight + cellHeight / 2;
9633
+ const radiusBase = 0.7 * Math.min(cellWidth, cellHeight);
9634
+ const radius = Math.max(minRadius, isLeftSide ? 0.8 * radiusBase : radiusBase);
9635
+ const colorIndex = Math.floor(random(900 * i + j) * colors.length);
9636
+ const opacity = isLeftSide ? 0.7 + 0.3 * random(950 * i + j) : 1;
9637
+ baseShapes.push((()=>{
9638
+ var _el$3 = SvgBackground_tmpl$2();
9639
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
9640
+ var _v$0 = cx.toString(), _v$1 = cy.toString(), _v$10 = radius.toString(), _v$11 = colors[colorIndex], _v$12 = opacity.toString();
9641
+ _v$0 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "cx", _p$.e = _v$0);
9642
+ _v$1 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "cy", _p$.t = _v$1);
9643
+ _v$10 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "r", _p$.a = _v$10);
9644
+ _v$11 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "fill", _p$.o = _v$11);
9645
+ _v$12 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "opacity", _p$.i = _v$12);
9646
+ return _p$;
9647
+ }, {
9648
+ e: void 0,
9649
+ t: void 0,
9650
+ a: void 0,
9651
+ o: void 0,
9652
+ i: void 0
9653
+ });
9654
+ return _el$3;
9655
+ })());
9656
+ }
9657
+ const edgeShapes = [
9658
+ (()=>{
9659
+ var _el$4 = SvgBackground_tmpl$3();
9660
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$4, "fill", colorStart);
9661
+ return _el$4;
9662
+ })(),
9663
+ (()=>{
9664
+ var _el$5 = SvgBackground_tmpl$4();
9665
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$5, "fill", getIntermediateColor(0.25)));
9666
+ return _el$5;
9667
+ })(),
9668
+ (()=>{
9669
+ var _el$6 = _tmpl$5();
9670
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$6, "fill", getIntermediateColor(0.75)));
9671
+ return _el$6;
9672
+ })(),
9673
+ (()=>{
9674
+ var _el$7 = _tmpl$6();
9675
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$7, "fill", colorEnd);
9676
+ return _el$7;
9677
+ })(),
9678
+ (()=>{
9679
+ var _el$8 = _tmpl$7();
9680
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$8, "fill", getIntermediateColor(0.65)));
9681
+ return _el$8;
9682
+ })(),
9683
+ (()=>{
9684
+ var _el$9 = _tmpl$8();
9685
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$9, "fill", getIntermediateColor(0.15)));
9686
+ return _el$9;
9687
+ })(),
9688
+ (()=>{
9689
+ var _el$0 = _tmpl$9();
9690
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$0, "fill", getIntermediateColor(0.4)));
9691
+ return _el$0;
9692
+ })(),
9693
+ (()=>{
9694
+ var _el$1 = _tmpl$0();
9695
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$1, "fill", getIntermediateColor(0.85)));
9696
+ return _el$1;
9697
+ })()
9698
+ ];
9699
+ const accentShapes = [];
9700
+ const accentCount = Math.max(0, maxShapes - baseShapes.length - edgeShapes.length);
9701
+ const leftSideAccentCount = Math.floor(0.6 * accentCount);
9702
+ const rightSideAccentCount = accentCount - leftSideAccentCount;
9703
+ for(let i = 0; i < leftSideAccentCount; i++){
9704
+ const cx = 20 + 120 * random(1000 + i);
9705
+ const cy = 20 + 360 * random(2000 + i);
9706
+ const radius = minRadius * (0.5 + 0.6 * random(3000 + i));
9707
+ const colorIndex = Math.floor(random(4000 + i) * colors.length);
9708
+ const opacity = 0.6 + 0.4 * random(5500 + i);
9709
+ if (random(5000 + i) > 0.4) accentShapes.push((()=>{
9710
+ var _el$10 = SvgBackground_tmpl$2();
9711
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
9712
+ var _v$13 = cx.toString(), _v$14 = cy.toString(), _v$15 = radius.toString(), _v$16 = colors[colorIndex], _v$17 = opacity.toString();
9713
+ _v$13 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "cx", _p$.e = _v$13);
9714
+ _v$14 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "cy", _p$.t = _v$14);
9715
+ _v$15 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "r", _p$.a = _v$15);
9716
+ _v$16 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "fill", _p$.o = _v$16);
9717
+ _v$17 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "opacity", _p$.i = _v$17);
9718
+ return _p$;
9719
+ }, {
9720
+ e: void 0,
9721
+ t: void 0,
9722
+ a: void 0,
9723
+ o: void 0,
9724
+ i: void 0
9725
+ });
9726
+ return _el$10;
9727
+ })());
9728
+ else {
9729
+ const rx = radius;
9730
+ const ry = radius * (0.4 + 0.6 * random(6000 + i));
9731
+ const rotation = 360 * random(7000 + i);
9732
+ accentShapes.push((()=>{
9733
+ var _el$11 = SvgBackground_tmpl$();
9734
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "transform", `rotate(${rotation} ${cx} ${cy})`);
9735
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
9736
+ var _v$18 = cx.toString(), _v$19 = cy.toString(), _v$20 = rx.toString(), _v$21 = ry.toString(), _v$22 = colors[colorIndex], _v$23 = opacity.toString();
9737
+ _v$18 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "cx", _p$.e = _v$18);
9738
+ _v$19 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "cy", _p$.t = _v$19);
9739
+ _v$20 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "rx", _p$.a = _v$20);
9740
+ _v$21 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "ry", _p$.o = _v$21);
9741
+ _v$22 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "fill", _p$.i = _v$22);
9742
+ _v$23 !== _p$.n && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "opacity", _p$.n = _v$23);
9743
+ return _p$;
9744
+ }, {
9745
+ e: void 0,
9746
+ t: void 0,
9747
+ a: void 0,
9748
+ o: void 0,
9749
+ i: void 0,
9750
+ n: void 0
9751
+ });
9752
+ return _el$11;
9753
+ })());
9754
+ }
9755
+ }
9756
+ for(let i = 0; i < rightSideAccentCount; i++){
9757
+ const cx = 140 + 260 * random(8000 + i);
9758
+ const cy = 20 + 360 * random(9000 + i);
9759
+ const radius = minRadius * (0.7 + 0.8 * random(10000 + i));
9760
+ const colorIndex = Math.floor(random(11000 + i) * colors.length);
9761
+ if (random(12000 + i) > 0.3) accentShapes.push((()=>{
9762
+ var _el$12 = SvgBackground_tmpl$2();
9763
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
9764
+ var _v$24 = cx.toString(), _v$25 = cy.toString(), _v$26 = radius.toString(), _v$27 = colors[colorIndex];
9765
+ _v$24 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$12, "cx", _p$.e = _v$24);
9766
+ _v$25 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$12, "cy", _p$.t = _v$25);
9767
+ _v$26 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$12, "r", _p$.a = _v$26);
9768
+ _v$27 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$12, "fill", _p$.o = _v$27);
9769
+ return _p$;
9770
+ }, {
9771
+ e: void 0,
9772
+ t: void 0,
9773
+ a: void 0,
9774
+ o: void 0
9775
+ });
9776
+ return _el$12;
9777
+ })());
9778
+ else {
9779
+ const rx = radius;
9780
+ const ry = radius * (0.5 + 0.8 * random(13000 + i));
9781
+ const rotation = 360 * random(14000 + i);
9782
+ accentShapes.push((()=>{
9783
+ var _el$13 = SvgBackground_tmpl$();
9784
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "transform", `rotate(${rotation} ${cx} ${cy})`);
9785
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
9786
+ var _v$28 = cx.toString(), _v$29 = cy.toString(), _v$30 = rx.toString(), _v$31 = ry.toString(), _v$32 = colors[colorIndex];
9787
+ _v$28 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "cx", _p$.e = _v$28);
9788
+ _v$29 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "cy", _p$.t = _v$29);
9789
+ _v$30 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "rx", _p$.a = _v$30);
9790
+ _v$31 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "ry", _p$.o = _v$31);
9791
+ _v$32 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "fill", _p$.i = _v$32);
9792
+ return _p$;
9793
+ }, {
9794
+ e: void 0,
9795
+ t: void 0,
9796
+ a: void 0,
9797
+ o: void 0,
9798
+ i: void 0
9799
+ });
9800
+ return _el$13;
9801
+ })());
9802
+ }
9803
+ }
9804
+ return [
9805
+ ...edgeShapes,
9806
+ ...baseShapes,
9807
+ ...accentShapes
9808
+ ];
9809
+ };
9810
+ const renderSvgToCanvas = ()=>{
9811
+ if (!svgRef || !canvasRef) return;
9812
+ const svgData = new XMLSerializer().serializeToString(svgRef);
9813
+ const svgBlob = new Blob([
9814
+ svgData
9815
+ ], {
9816
+ type: 'image/svg+xml'
9817
+ });
9818
+ const svgUrl = URL.createObjectURL(svgBlob);
9819
+ const img = new Image();
9820
+ img.src = svgUrl;
9821
+ img.onload = ()=>{
9822
+ if (!canvasRef) return;
9823
+ if (containerRef) {
9824
+ const rect = containerRef.getBoundingClientRect();
9825
+ const blurPadding = Math.ceil(2 * blurIntensity);
9826
+ canvasRef.width = rect.width + 2 * blurPadding;
9827
+ canvasRef.height = rect.height + 2 * blurPadding;
9828
+ }
9829
+ const ctx = canvasRef.getContext('2d');
9830
+ if (!ctx) return;
9831
+ ctx.clearRect(0, 0, canvasRef.width, canvasRef.height);
9832
+ ctx.fillStyle = backgroundColor;
9833
+ ctx.fillRect(0, 0, canvasRef.width, canvasRef.height);
9834
+ ctx.drawImage(img, 2 * -blurIntensity, 2 * -blurIntensity, canvasRef.width + 4 * blurIntensity, canvasRef.height + 4 * blurIntensity);
9835
+ URL.revokeObjectURL(svgUrl);
9836
+ setBackgroundReady(true);
9558
9837
  };
9559
- }
9560
- return {
9561
- h: 0,
9562
- s: 0,
9563
- l: 0
9564
9838
  };
9565
- }
9566
- function interpolateHue(h1, h2, t) {
9567
- const diff = h2 - h1;
9568
- if (Math.abs(diff) > 180) if (diff > 0) h1 += 360;
9569
- else h2 += 360;
9570
- return (h1 + (h2 - h1) * t + 360) % 360;
9571
- }
9572
- let instanceCounter = 0;
9573
- function generateStableId() {
9574
- return `svg-bg-${++instanceCounter}-${Date.now()}`;
9575
- }
9576
- function SvgBackground(props) {
9577
- const { colorStart = '#000000', colorEnd = '#333333', opacity = 1, blurIntensity = 36, turbulenceFrequency = 0.007, animated = false, animationSpeed = 1, class: className = '', style = {}, children, darkness = 0 } = props;
9578
- const [animationTime, setAnimationTime] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(0);
9579
- let animationFrame = null;
9580
- let gradientStop1Ref;
9581
- let gradientStop2Ref;
9582
- let turbulenceRef;
9583
- const gradientId = `gradient-${generateStableId()}`;
9584
- const filterId = `filter-${generateStableId()}`;
9585
- const shouldUseFilters = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>blurIntensity > 0 && turbulenceFrequency > 0.001);
9586
- const isGrayscaleColors = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
9587
- const startHSL = parseColor(colorStart);
9588
- const endHSL = parseColor(colorEnd);
9589
- return startHSL.s < 15 && endHSL.s < 15;
9590
- });
9591
9839
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
9592
- if (animated) {
9593
- const animate = ()=>{
9594
- setAnimationTime((prev)=>prev + 0.008 * animationSpeed);
9595
- animationFrame = requestAnimationFrame(animate);
9840
+ if (window && 'ResizeObserver' in window) {
9841
+ const observer = new ResizeObserver(()=>{
9842
+ renderSvgToCanvas();
9843
+ });
9844
+ if (containerRef) observer.observe(containerRef);
9845
+ return ()=>{
9846
+ if (containerRef) observer.unobserve(containerRef);
9596
9847
  };
9597
- animate();
9598
9848
  }
9599
- });
9600
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
9601
- if (animationFrame) cancelAnimationFrame(animationFrame);
9602
- });
9603
- const startHSL = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>parseColor(colorStart));
9604
- const endHSL = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>parseColor(colorEnd));
9605
- const animatedColors = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
9606
- if (!animated) return {
9607
- color1: colorStart,
9608
- color2: colorEnd,
9609
- turbFreq1: turbulenceFrequency,
9610
- turbFreq2: 0.4 * turbulenceFrequency
9611
- };
9612
- const time = animationTime();
9613
- const baseSpeed = 0.001 * animationSpeed;
9614
- const freq1 = time * baseSpeed * 7;
9615
- const freq2 = time * baseSpeed * 11;
9616
- const freq3 = time * baseSpeed * 13;
9617
- const freq4 = time * baseSpeed * 17;
9618
- const freq5 = time * baseSpeed * 19;
9619
- const wave1 = 0.3 * Math.sin(freq1);
9620
- const wave2 = 0.25 * Math.sin(freq2);
9621
- const wave3 = 0.2 * Math.sin(freq3);
9622
- const wave4 = 0.15 * Math.sin(freq4);
9623
- const wave5 = 0.1 * Math.sin(freq5);
9624
- const combinedWave = wave1 + wave2 + wave3 + wave4 + wave5;
9625
- const colorMix = (combinedWave + 1) / 2;
9626
- const wave1b = 0.3 * Math.cos(freq2);
9627
- const wave2b = 0.25 * Math.cos(freq3);
9628
- const wave3b = 0.2 * Math.cos(freq4);
9629
- const wave4b = 0.15 * Math.cos(freq5);
9630
- const wave5b = 0.1 * Math.cos(freq1);
9631
- const combinedWave2 = wave1b + wave2b + wave3b + wave4b + wave5b;
9632
- const colorMix2 = (combinedWave2 + 1) / 2;
9633
- const turbMix1 = (0.5 * Math.sin(0.3 * freq1) + 0.5 * Math.cos(0.2 * freq2) + 1) / 2;
9634
- const turbMix2 = (0.5 * Math.cos(0.2 * freq3) + 0.5 * Math.sin(0.3 * freq4) + 1) / 2;
9635
- let color1 = colorStart;
9636
- let color2 = colorEnd;
9637
- const start = startHSL();
9638
- const end = endHSL();
9639
- const h1 = interpolateHue(start.h, end.h, colorMix);
9640
- const s1 = start.s + (end.s - start.s) * colorMix;
9641
- const l1 = start.l + (end.l - start.l) * colorMix;
9642
- const h2 = interpolateHue(start.h, end.h, colorMix2);
9643
- const s2 = start.s + (end.s - start.s) * colorMix2;
9644
- const l2 = start.l + (end.l - start.l) * colorMix2;
9645
- color1 = `hsl(${Math.round(h1)}, ${Math.round(s1)}%, ${Math.round(l1)}%)`;
9646
- color2 = `hsl(${Math.round(h2)}, ${Math.round(s2)}%, ${Math.round(l2)}%)`;
9647
- const turbFreq1 = turbulenceFrequency + 0.01 * turbulenceFrequency * turbMix1;
9648
- const turbFreq2 = 0.4 * turbulenceFrequency + 0.01 * turbulenceFrequency * turbMix2;
9649
- return {
9650
- color1,
9651
- color2,
9652
- turbFreq1,
9653
- turbFreq2
9654
- };
9849
+ renderSvgToCanvas();
9655
9850
  });
9656
9851
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
9657
- const colors = animatedColors();
9658
- if (gradientStop1Ref) gradientStop1Ref.setAttribute('stop-color', colors.color1);
9659
- if (gradientStop2Ref) gradientStop2Ref.setAttribute('stop-color', colors.color2);
9660
- if (turbulenceRef) turbulenceRef.setAttribute('baseFrequency', `${colors.turbFreq1} ${colors.turbFreq2}`);
9852
+ setTimeout(()=>{
9853
+ renderSvgToCanvas();
9854
+ }, 0);
9661
9855
  });
9662
- const backgroundStyle = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>({
9856
+ const backgroundStyle = ()=>({
9663
9857
  position: 'relative',
9858
+ overflow: 'hidden',
9664
9859
  ...style
9665
- }));
9860
+ });
9861
+ const canvasStyle = ()=>({
9862
+ position: 'absolute',
9863
+ top: `-${2 * blurIntensity}px`,
9864
+ left: `-${2 * blurIntensity}px`,
9865
+ width: `calc(100% + ${4 * blurIntensity}px)`,
9866
+ height: `calc(100% + ${4 * blurIntensity}px)`,
9867
+ 'z-index': '0',
9868
+ opacity: opacity.toString(),
9869
+ filter: `blur(${blurIntensity}px)`
9870
+ });
9666
9871
  return (()=>{
9667
- var _el$ = SvgBackground_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$3.nextSibling, _el$8 = _el$2.nextSibling;
9668
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, `relative ${className}`);
9669
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$4, "id", gradientId);
9670
- var _ref$ = gradientStop1Ref;
9671
- "function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$5) : gradientStop1Ref = _el$5;
9672
- var _ref$2 = gradientStop2Ref;
9673
- "function" == typeof _ref$2 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$2, _el$6) : gradientStop2Ref = _el$6;
9674
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, (()=>{
9675
- var _c$ = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!shouldUseFilters());
9676
- return ()=>_c$() && (()=>{
9677
- var _el$9 = SvgBackground_tmpl$2();
9678
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$9, "id", filterId);
9679
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$9, (()=>{
9680
- var _c$2 = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!isGrayscaleColors());
9681
- return ()=>_c$2() ? (()=>{
9682
- var _el$0 = SvgBackground_tmpl$3();
9683
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$0, "stdDeviation", `${0.3 * blurIntensity} ${0.3 * blurIntensity}`);
9684
- return _el$0;
9685
- })() : [
9686
- (()=>{
9687
- var _el$1 = SvgBackground_tmpl$4();
9688
- var _ref$3 = turbulenceRef;
9689
- "function" == typeof _ref$3 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$3, _el$1) : turbulenceRef = _el$1;
9690
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$1, "baseFrequency", `${animatedColors().turbFreq1} ${animatedColors().turbFreq2}`));
9691
- return _el$1;
9692
- })(),
9693
- (()=>{
9694
- var _el$10 = _tmpl$5();
9695
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "stdDeviation", `${blurIntensity} ${blurIntensity}`);
9696
- return _el$10;
9697
- })(),
9698
- (()=>{
9699
- var _el$11 = _tmpl$6();
9700
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "mode", "color-dodge");
9701
- return _el$11;
9702
- })()
9703
- ];
9704
- })());
9705
- return _el$9;
9706
- })();
9707
- })(), null);
9708
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$7, "fill", `url(#${gradientId})`);
9709
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, darkness > 0 && (()=>{
9710
- var _el$12 = _tmpl$7();
9711
- _el$12.style.setProperty("background-color", `rgba(0, 0, 0, ${darkness})`);
9712
- _el$12.style.setProperty("pointer-events", "none");
9713
- return _el$12;
9714
- })(), _el$8);
9715
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$8, children);
9872
+ var _el$14 = _tmpl$1(), _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$15.nextSibling, _el$19 = _el$18.nextSibling;
9873
+ var _ref$ = containerRef;
9874
+ "function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$14) : containerRef = _el$14;
9875
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$14, `relative flex items-center justify-center ${className}`);
9876
+ _el$15.style.setProperty("display", "none");
9877
+ var _ref$2 = svgRef;
9878
+ "function" == typeof _ref$2 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$2, _el$16) : svgRef = _el$16;
9879
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$17, "fill", backgroundColor);
9880
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$16, generateShapes, null);
9881
+ var _ref$3 = canvasRef;
9882
+ "function" == typeof _ref$3 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$3, _el$18) : canvasRef = _el$18;
9883
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$14, darkness > 0 && (()=>{
9884
+ var _el$20 = _tmpl$10();
9885
+ _el$20.style.setProperty("background-color", `rgba(0, 0, 0, ${darkness})`);
9886
+ _el$20.style.setProperty("pointer-events", "none");
9887
+ return _el$20;
9888
+ })(), _el$19);
9889
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$19, children);
9716
9890
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
9717
- var _v$ = backgroundStyle(), _v$2 = opacity.toString(), _v$3 = animatedColors().color1, _v$4 = animatedColors().color2, _v$5 = shouldUseFilters() ? `url(#${filterId})` : 'none';
9718
- _p$.e = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.style)(_el$, _v$, _p$.e);
9719
- _v$2 !== _p$.t && (null != (_p$.t = _v$2) ? _el$2.style.setProperty("opacity", _v$2) : _el$2.style.removeProperty("opacity"));
9720
- _v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$5, "stop-color", _p$.a = _v$3);
9721
- _v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$6, "stop-color", _p$.o = _v$4);
9722
- _v$5 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$7, "filter", _p$.i = _v$5);
9891
+ var _v$33 = backgroundStyle(), _v$34 = canvasStyle();
9892
+ _p$.e = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.style)(_el$14, _v$33, _p$.e);
9893
+ _p$.t = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.style)(_el$18, _v$34, _p$.t);
9723
9894
  return _p$;
9724
9895
  }, {
9725
9896
  e: void 0,
9726
- t: void 0,
9727
- a: void 0,
9728
- o: void 0,
9729
- i: void 0
9897
+ t: void 0
9730
9898
  });
9731
- return _el$;
9899
+ return _el$14;
9732
9900
  })();
9733
9901
  }
9734
9902
  var Swap_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<label><input type=checkbox>");
@@ -1 +1 @@
1
- .iconify{background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}.iconify,.iconify-color{display:inline-block;height:1em;width:1em}.iconify-color{background-repeat:no-repeat;background-size:100% 100%}.icon-[mdi-light--chevron-left]{--svg:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M14.41 18.16 8.75 12.5l5.66-5.66.7.71-4.95 4.95 4.95 4.95z'/%3E%3C/svg%3E")}.icon-[mdi-light--chevron-left].iconify{-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-[mdi-light--chevron-left].iconify-color{background-image:var(--svg)}.icon-[mdi-light--chevron-right]{--svg:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='m8.59 18.16 5.66-5.66-5.66-5.66-.7.71 4.95 4.95-4.95 4.95z'/%3E%3C/svg%3E")}.icon-[mdi-light--chevron-right].iconify{-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-[mdi-light--chevron-right].iconify-color{background-image:var(--svg)}.icon-[mdi-light--home]{--svg:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='m16 8.41-4.5-4.5L4.41 11H6v8h3v-6h5v6h3v-8h1.59L17 9.41V6h-1zM2 12l9.5-9.5L15 6V5h3v4l3 3h-3v8h-5v-6h-3v6H5v-8z'/%3E%3C/svg%3E")}.icon-[mdi-light--home].iconify{-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-[mdi-light--home].iconify-color{background-image:var(--svg)}
1
+ .iconify{background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}.iconify,.iconify-color{display:inline-block;height:1em;width:1em}.iconify-color{background-repeat:no-repeat;background-size:100% 100%}.icon-[mdi-light--chevron-left]{--svg:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M14.41 18.16 8.75 12.5l5.66-5.66.7.71-4.95 4.95 4.95 4.95z'/%3E%3C/svg%3E")}.icon-[mdi-light--chevron-left].iconify{-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-[mdi-light--chevron-left].iconify-color{background-image:var(--svg)}.icon-[mdi-light--chevron-right]{--svg:url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='m8.59 18.16 5.66-5.66-5.66-5.66-.7.71 4.95 4.95-4.95 4.95z'/%3E%3C/svg%3E")}.icon-[mdi-light--chevron-right].iconify{-webkit-mask-image:var(--svg);mask-image:var(--svg)}.icon-[mdi-light--chevron-right].iconify-color{background-image:var(--svg)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "0.0.58",
3
+ "version": "0.0.60",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",