@pathscale/ui 0.0.155 → 0.0.156

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.
@@ -18,6 +18,8 @@ export type NoiseBackgroundProps = {
18
18
  borderRadius?: string;
19
19
  /** Path or URL to the noise texture image. @default "/noise.webp" */
20
20
  noiseSrc?: string;
21
+ /** Show the static noise texture overlay. @default false */
22
+ showNoise?: boolean;
21
23
  } & IComponentBaseProps;
22
24
  declare const NoiseBackground: (rawProps: NoiseBackgroundProps) => JSX.Element;
23
25
  export default NoiseBackground;
package/dist/index.js CHANGED
@@ -14577,7 +14577,7 @@ const navbar_Navbar = Object.assign(Navbar, {
14577
14577
  Stack: NavbarStack,
14578
14578
  Row: navbar_NavbarRow
14579
14579
  });
14580
- var NoiseBackground_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><div class="absolute inset-0 opacity-40"></div><div class="absolute inset-0 opacity-30"></div><div class="absolute inset-0 opacity-25"></div><div class="absolute inset-x-0 top-0 h-1 opacity-80 blur-sm"></div><div class="pointer-events-none absolute inset-0 overflow-hidden"><img alt class="h-full w-full object-cover"></div><div>');
14580
+ var NoiseBackground_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><div class="absolute inset-0 opacity-40"></div><div class="absolute inset-0 opacity-30"></div><div class="absolute inset-0 opacity-25"></div><div class="absolute inset-x-0 top-0 h-1 opacity-80 blur-sm"></div><div>'), NoiseBackground_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="pointer-events-none absolute inset-0 overflow-hidden"><img alt class="h-full w-full object-cover">');
14581
14581
  function NoiseBackground_createSpring(initial, stiffness = 100, damping = 30) {
14582
14582
  let current = initial;
14583
14583
  let velocity = 0;
@@ -14608,6 +14608,7 @@ const NoiseBackground = (rawProps)=>{
14608
14608
  "animating",
14609
14609
  "borderRadius",
14610
14610
  "noiseSrc",
14611
+ "showNoise",
14611
14612
  "dataTheme",
14612
14613
  "style"
14613
14614
  ]);
@@ -14716,7 +14717,7 @@ const NoiseBackground = (rawProps)=>{
14716
14717
  const containerClasses = ()=>twMerge("group relative overflow-hidden bg-base-200 backdrop-blur-sm", "shadow-[0px_1px_0px_0px_var(--color-base-300)_inset,0px_1px_0px_0px_var(--color-base-100)]", local.containerClass);
14717
14718
  const contentClasses = ()=>twMerge("relative z-10", local.class, local.className);
14718
14719
  return (()=>{
14719
- var _el$ = NoiseBackground_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$6.nextSibling;
14720
+ var _el$ = NoiseBackground_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
14720
14721
  var _ref$ = containerRef;
14721
14722
  "function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$) : containerRef = _el$;
14722
14723
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
@@ -14747,21 +14748,27 @@ const NoiseBackground = (rawProps)=>{
14747
14748
  "function" == typeof _ref$4 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$4, _el$4) : layer2 = _el$4;
14748
14749
  var _ref$5 = stripEl;
14749
14750
  "function" == typeof _ref$5 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$5, _el$5) : stripEl = _el$5;
14750
- _el$7.style.setProperty("opacity", "var(--noise-opacity, 0.2)");
14751
- _el$7.style.setProperty("mix-blend-mode", "overlay");
14752
- (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$8, ()=>local.children);
14751
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (()=>{
14752
+ var _c$ = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!(local.showNoise ?? false));
14753
+ return ()=>_c$() && (()=>{
14754
+ var _el$7 = NoiseBackground_tmpl$2(), _el$8 = _el$7.firstChild;
14755
+ _el$8.style.setProperty("opacity", "var(--noise-opacity, 0.2)");
14756
+ _el$8.style.setProperty("mix-blend-mode", "overlay");
14757
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$8, "src", local.noiseSrc ?? "/noise.webp"));
14758
+ return _el$7;
14759
+ })();
14760
+ })(), _el$6);
14761
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, ()=>local.children);
14753
14762
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
14754
- var _v$ = `linear-gradient(to right, ${colors().join(", ")})`, _v$2 = `${borderRadius()} ${borderRadius()} 0 0`, _v$3 = local.noiseSrc ?? "/noise.webp", _v$4 = contentClasses();
14763
+ var _v$ = `linear-gradient(to right, ${colors().join(", ")})`, _v$2 = `${borderRadius()} ${borderRadius()} 0 0`, _v$3 = contentClasses();
14755
14764
  _v$ !== _p$.e && (null != (_p$.e = _v$) ? _el$5.style.setProperty("background", _v$) : _el$5.style.removeProperty("background"));
14756
14765
  _v$2 !== _p$.t && (null != (_p$.t = _v$2) ? _el$5.style.setProperty("border-radius", _v$2) : _el$5.style.removeProperty("border-radius"));
14757
- _v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$7, "src", _p$.a = _v$3);
14758
- _v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$8, _p$.o = _v$4);
14766
+ _v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$6, _p$.a = _v$3);
14759
14767
  return _p$;
14760
14768
  }, {
14761
14769
  e: void 0,
14762
14770
  t: void 0,
14763
- a: void 0,
14764
- o: void 0
14771
+ a: void 0
14765
14772
  });
14766
14773
  return _el$;
14767
14774
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "0.0.155",
3
+ "version": "0.0.156",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",