@novu/js 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2306,7 +2306,15 @@ var Root = (props) => {
2306
2306
  id
2307
2307
  } = useAppearance();
2308
2308
  const style = useStyle();
2309
- return (() => {
2309
+ const {
2310
+ hideBranding
2311
+ } = useInboxContext();
2312
+ return [web.createComponent(solidJs.Show, {
2313
+ get when() {
2314
+ return !hideBranding();
2315
+ },
2316
+ children: new Comment(" Powered by Novu - https://novu.co ")
2317
+ }), (() => {
2310
2318
  var _el$ = _tmpl$36();
2311
2319
  web.spread(_el$, web.mergeProps({
2312
2320
  get id() {
@@ -2317,7 +2325,7 @@ var Root = (props) => {
2317
2325
  }
2318
2326
  }, rest), false, false);
2319
2327
  return _el$;
2320
- })();
2328
+ })()];
2321
2329
  };
2322
2330
  var TooltipContext = solidJs.createContext(void 0);
2323
2331
  function TooltipRoot(props) {
@@ -2489,16 +2497,7 @@ var Switch = (props) => {
2489
2497
  props.onChange(e.target.checked);
2490
2498
  });
2491
2499
  web.effect((_p$) => {
2492
- var _v$ = style("channelSwitch", `nt-relative
2493
- nt-inline-flex nt-cursor-pointer nt-items-center data-[disabled=true]:nt-cursor-not-allowed`), _v$2 = props.disabled, _v$3 = props.disabled, _v$4 = style("channelSwitchThumb", `nt-peer nt-h-6 nt-w-11 nt-rounded-full nt-border nt-border-neutral-alpha-200 peer-checked:nt-border-neutral-alpha-400 nt-bg-neutral-alpha-300
2494
- after:nt-absolute after:nt-left-[2px] after:nt-top-0.5 after:nt-h-5
2495
- after:nt-w-5 after:nt-rounded-full after:nt-border
2496
- after:nt-border-neutral-alpha-400
2497
- after:nt-bg-background after:nt-transition-all after:nt-content-['']
2498
- peer-checked:nt-bg-primary peer-checked:after:nt-translate-x-full
2499
- peer-checked:after:nt-border-background
2500
- nt-transition-all nt-duration-200 after:nt-duration-200
2501
- data-[disabled=true]:nt-opacity-40`), _v$5 = props.disabled, _v$6 = props.checked;
2500
+ var _v$ = style("channelSwitch", `nt-relative nt-inline-flex nt-cursor-pointer nt-items-center data-[disabled=true]:nt-cursor-not-allowed`), _v$2 = props.disabled, _v$3 = props.disabled, _v$4 = style("channelSwitchThumb", `nt-peer nt-h-6 nt-w-11 nt-rounded-full nt-border nt-border-neutral-alpha-200 peer-checked:nt-border-neutral-alpha-400 nt-bg-neutral-alpha-300 after:nt-absolute after:nt-left-[2px] after:nt-top-0.5 after:nt-h-5 after:nt-w-5 after:nt-rounded-full after:nt-border after:nt-border-neutral-alpha-400 after:nt-bg-background after:nt-transition-all after:nt-content-[''] peer-checked:nt-bg-primary peer-checked:after:nt-translate-x-full peer-checked:after:nt-border-background nt-transition-all nt-duration-200 after:nt-duration-200 data-[disabled=true]:nt-opacity-40`), _v$5 = props.disabled, _v$6 = props.checked;
2502
2501
  _v$ !== _p$.e && web.className(_el$, _p$.e = _v$);
2503
2502
  _v$2 !== _p$.t && web.setAttribute(_el$, "data-disabled", _p$.t = _v$2);
2504
2503
  _v$3 !== _p$.a && (_el$2.disabled = _p$.a = _v$3);
@@ -2907,8 +2906,7 @@ var PreferencesRow = (props) => {
2907
2906
  }
2908
2907
  }), null);
2909
2908
  web.effect((_p$) => {
2910
- var _v$ = style("workflowContainer", `nt-p-4 nt-flex nt-flex-col nt-gap-1 nt-items-start nt-self-stretch
2911
- hover:nt-bg-neutral-alpha-50 nt-rounded-lg data-[disabled=true]:nt-bg-neutral-alpha-50`), _v$2 = props.isCritical, _v$3 = isOpen(), _v$4 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center"), _v$5 = props.isCritical, _v$6 = isOpen(), _v$7 = style("workflowLabel", "nt-text-base nt-font-semibold nt-text-start nt-flex nt-items-center nt-gap-1"), _v$8 = props.isCritical, _v$9 = props.localizationKey, _v$10 = isOpen(), _v$11 = style("workflowContainerRight__icon", `nt-text-foreground-alpha-600 nt-transition-all nt-duration-200 data-[open=true]:nt-transform data-[open=true]:nt-rotate-180`), _v$12 = props.isCritical, _v$13 = isOpen();
2909
+ var _v$ = style("workflowContainer", `nt-p-4 nt-flex nt-flex-col nt-gap-1 nt-items-start nt-self-stretch hover:nt-bg-neutral-alpha-50 nt-rounded-lg data-[disabled=true]:nt-bg-neutral-alpha-50`), _v$2 = props.isCritical, _v$3 = isOpen(), _v$4 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center"), _v$5 = props.isCritical, _v$6 = isOpen(), _v$7 = style("workflowLabel", "nt-text-base nt-font-semibold nt-text-start nt-flex nt-items-center nt-gap-1"), _v$8 = props.isCritical, _v$9 = props.localizationKey, _v$10 = isOpen(), _v$11 = style("workflowContainerRight__icon", `nt-text-foreground-alpha-600 nt-transition-all nt-duration-200 data-[open=true]:nt-transform data-[open=true]:nt-rotate-180`), _v$12 = props.isCritical, _v$13 = isOpen();
2912
2910
  _v$ !== _p$.e && web.className(_el$4, _p$.e = _v$);
2913
2911
  _v$2 !== _p$.t && web.setAttribute(_el$4, "data-disabled", _p$.t = _v$2);
2914
2912
  _v$3 !== _p$.a && web.setAttribute(_el$4, "data-open", _p$.a = _v$3);
@@ -3128,7 +3126,7 @@ var DefaultNotification = (props) => {
3128
3126
  e.stopPropagation();
3129
3127
  props.notification.read();
3130
3128
  },
3131
- "class": "hover:nt-bg-neutral-alpha-50",
3129
+ "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3132
3130
  get children() {
3133
3131
  return web.createComponent(ReadAll, {});
3134
3132
  }
@@ -3155,7 +3153,7 @@ var DefaultNotification = (props) => {
3155
3153
  e.stopPropagation();
3156
3154
  props.notification.unread();
3157
3155
  },
3158
- "class": "hover:nt-bg-neutral-alpha-50",
3156
+ "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3159
3157
  get children() {
3160
3158
  return web.createComponent(Unread, {});
3161
3159
  }
@@ -3189,7 +3187,7 @@ var DefaultNotification = (props) => {
3189
3187
  e.stopPropagation();
3190
3188
  props.notification.archive();
3191
3189
  },
3192
- "class": "hover:nt-bg-neutral-alpha-50",
3190
+ "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3193
3191
  get children() {
3194
3192
  return web.createComponent(Archive, {});
3195
3193
  }
@@ -3216,7 +3214,7 @@ var DefaultNotification = (props) => {
3216
3214
  e.stopPropagation();
3217
3215
  props.notification.unarchive();
3218
3216
  },
3219
- "class": "hover:nt-bg-neutral-alpha-50",
3217
+ "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3220
3218
  get children() {
3221
3219
  return web.createComponent(Unarchive, {});
3222
3220
  }
@@ -3286,10 +3284,7 @@ var DefaultNotification = (props) => {
3286
3284
  var _a;
3287
3285
  var _v$3 = style("notification", cn("nt-w-full nt-text-sm hover:nt-bg-neutral-alpha-50 nt-group nt-relative nt-flex nt-py-4 nt-px-6 nt-gap-2", {
3288
3286
  "nt-cursor-pointer": !props.notification.isRead || !!((_a = props.notification.redirect) == null ? void 0 : _a.url)
3289
- })), _v$4 = style("notificationBody", "nt-overflow-hidden nt-w-full"), _v$5 = style("notificationDate", `nt-transition nt-duration-100 nt-ease-out nt-text-foreground-alpha-400 nt-shrink-0
3290
- nt-float-right nt-text-right group-hover:nt-opacity-0`), _v$6 = style("notificationDefaultActions", `nt-transition nt-duration-100 nt-ease-out nt-gap-2 nt-flex nt-shrink-0
3291
- nt-opacity-0 group-hover:nt-opacity-100 nt-justify-center nt-items-center
3292
- nt-absolute nt-top-0 nt-right-0 nt-bg-neutral-alpha-50 nt-py-0.5 nt-rounded`), _v$7 = style("notificationCustomActions", "nt-flex nt-flex-wrap nt-gap-4 nt-mt-4");
3287
+ })), _v$4 = style("notificationBody", "nt-overflow-hidden nt-w-full"), _v$5 = style("notificationDate", "nt-transition nt-duration-100 nt-ease-out nt-text-foreground-alpha-400 nt-shrink-0 nt-float-right nt-text-right group-hover:nt-opacity-0"), _v$6 = style("notificationDefaultActions", `nt-transition nt-duration-100 nt-ease-out nt-gap-2 nt-flex nt-shrink-0 nt-opacity-0 group-hover:nt-opacity-100 nt-justify-center nt-items-center nt-absolute nt-top-0 nt-right-0 nt-bg-neutral-alpha-50 nt-rounded-lg`), _v$7 = style("notificationCustomActions", "nt-flex nt-flex-wrap nt-gap-4 nt-mt-4");
3293
3288
  _v$3 !== _p$.e && web.className(_el$, _p$.e = _v$3);
3294
3289
  _v$4 !== _p$.t && web.className(_el$4, _p$.t = _v$4);
3295
3290
  _v$5 !== _p$.a && web.className(_el$6, _p$.a = _v$5);
@@ -4102,7 +4097,7 @@ var Renderer = (props) => {
4102
4097
  }
4103
4098
  });
4104
4099
  };
4105
- var version = "2.3.0";
4100
+ var version = "2.3.1";
4106
4101
  var cssHref = `https://cdn.jsdelivr.net/npm/@novu/js@${version}/dist/index.css`;
4107
4102
  var _dispose, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _preferencesFilter, _setPreferencesFilter, _predefinedNovu, _NovuUI_instances, mountComponentRenderer_fn, updateComponentProps_fn;
4108
4103
  var NovuUI = class {
@@ -2300,7 +2300,15 @@ var Root = (props) => {
2300
2300
  id
2301
2301
  } = useAppearance();
2302
2302
  const style = useStyle();
2303
- return (() => {
2303
+ const {
2304
+ hideBranding
2305
+ } = useInboxContext();
2306
+ return [createComponent(Show, {
2307
+ get when() {
2308
+ return !hideBranding();
2309
+ },
2310
+ children: new Comment(" Powered by Novu - https://novu.co ")
2311
+ }), (() => {
2304
2312
  var _el$ = _tmpl$36();
2305
2313
  spread(_el$, mergeProps({
2306
2314
  get id() {
@@ -2311,7 +2319,7 @@ var Root = (props) => {
2311
2319
  }
2312
2320
  }, rest), false, false);
2313
2321
  return _el$;
2314
- })();
2322
+ })()];
2315
2323
  };
2316
2324
  var TooltipContext = createContext(void 0);
2317
2325
  function TooltipRoot(props) {
@@ -2483,16 +2491,7 @@ var Switch = (props) => {
2483
2491
  props.onChange(e.target.checked);
2484
2492
  });
2485
2493
  effect((_p$) => {
2486
- var _v$ = style("channelSwitch", `nt-relative
2487
- nt-inline-flex nt-cursor-pointer nt-items-center data-[disabled=true]:nt-cursor-not-allowed`), _v$2 = props.disabled, _v$3 = props.disabled, _v$4 = style("channelSwitchThumb", `nt-peer nt-h-6 nt-w-11 nt-rounded-full nt-border nt-border-neutral-alpha-200 peer-checked:nt-border-neutral-alpha-400 nt-bg-neutral-alpha-300
2488
- after:nt-absolute after:nt-left-[2px] after:nt-top-0.5 after:nt-h-5
2489
- after:nt-w-5 after:nt-rounded-full after:nt-border
2490
- after:nt-border-neutral-alpha-400
2491
- after:nt-bg-background after:nt-transition-all after:nt-content-['']
2492
- peer-checked:nt-bg-primary peer-checked:after:nt-translate-x-full
2493
- peer-checked:after:nt-border-background
2494
- nt-transition-all nt-duration-200 after:nt-duration-200
2495
- data-[disabled=true]:nt-opacity-40`), _v$5 = props.disabled, _v$6 = props.checked;
2494
+ var _v$ = style("channelSwitch", `nt-relative nt-inline-flex nt-cursor-pointer nt-items-center data-[disabled=true]:nt-cursor-not-allowed`), _v$2 = props.disabled, _v$3 = props.disabled, _v$4 = style("channelSwitchThumb", `nt-peer nt-h-6 nt-w-11 nt-rounded-full nt-border nt-border-neutral-alpha-200 peer-checked:nt-border-neutral-alpha-400 nt-bg-neutral-alpha-300 after:nt-absolute after:nt-left-[2px] after:nt-top-0.5 after:nt-h-5 after:nt-w-5 after:nt-rounded-full after:nt-border after:nt-border-neutral-alpha-400 after:nt-bg-background after:nt-transition-all after:nt-content-[''] peer-checked:nt-bg-primary peer-checked:after:nt-translate-x-full peer-checked:after:nt-border-background nt-transition-all nt-duration-200 after:nt-duration-200 data-[disabled=true]:nt-opacity-40`), _v$5 = props.disabled, _v$6 = props.checked;
2496
2495
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
2497
2496
  _v$2 !== _p$.t && setAttribute(_el$, "data-disabled", _p$.t = _v$2);
2498
2497
  _v$3 !== _p$.a && (_el$2.disabled = _p$.a = _v$3);
@@ -2901,8 +2900,7 @@ var PreferencesRow = (props) => {
2901
2900
  }
2902
2901
  }), null);
2903
2902
  effect((_p$) => {
2904
- var _v$ = style("workflowContainer", `nt-p-4 nt-flex nt-flex-col nt-gap-1 nt-items-start nt-self-stretch
2905
- hover:nt-bg-neutral-alpha-50 nt-rounded-lg data-[disabled=true]:nt-bg-neutral-alpha-50`), _v$2 = props.isCritical, _v$3 = isOpen(), _v$4 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center"), _v$5 = props.isCritical, _v$6 = isOpen(), _v$7 = style("workflowLabel", "nt-text-base nt-font-semibold nt-text-start nt-flex nt-items-center nt-gap-1"), _v$8 = props.isCritical, _v$9 = props.localizationKey, _v$10 = isOpen(), _v$11 = style("workflowContainerRight__icon", `nt-text-foreground-alpha-600 nt-transition-all nt-duration-200 data-[open=true]:nt-transform data-[open=true]:nt-rotate-180`), _v$12 = props.isCritical, _v$13 = isOpen();
2903
+ var _v$ = style("workflowContainer", `nt-p-4 nt-flex nt-flex-col nt-gap-1 nt-items-start nt-self-stretch hover:nt-bg-neutral-alpha-50 nt-rounded-lg data-[disabled=true]:nt-bg-neutral-alpha-50`), _v$2 = props.isCritical, _v$3 = isOpen(), _v$4 = style("workflowLabelContainer", "nt-flex nt-justify-between nt-flex-nowrap nt-self-stretch nt-cursor-pointer nt-items-center"), _v$5 = props.isCritical, _v$6 = isOpen(), _v$7 = style("workflowLabel", "nt-text-base nt-font-semibold nt-text-start nt-flex nt-items-center nt-gap-1"), _v$8 = props.isCritical, _v$9 = props.localizationKey, _v$10 = isOpen(), _v$11 = style("workflowContainerRight__icon", `nt-text-foreground-alpha-600 nt-transition-all nt-duration-200 data-[open=true]:nt-transform data-[open=true]:nt-rotate-180`), _v$12 = props.isCritical, _v$13 = isOpen();
2906
2904
  _v$ !== _p$.e && className(_el$4, _p$.e = _v$);
2907
2905
  _v$2 !== _p$.t && setAttribute(_el$4, "data-disabled", _p$.t = _v$2);
2908
2906
  _v$3 !== _p$.a && setAttribute(_el$4, "data-open", _p$.a = _v$3);
@@ -3122,7 +3120,7 @@ var DefaultNotification = (props) => {
3122
3120
  e.stopPropagation();
3123
3121
  props.notification.read();
3124
3122
  },
3125
- "class": "hover:nt-bg-neutral-alpha-50",
3123
+ "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3126
3124
  get children() {
3127
3125
  return createComponent(ReadAll, {});
3128
3126
  }
@@ -3149,7 +3147,7 @@ var DefaultNotification = (props) => {
3149
3147
  e.stopPropagation();
3150
3148
  props.notification.unread();
3151
3149
  },
3152
- "class": "hover:nt-bg-neutral-alpha-50",
3150
+ "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3153
3151
  get children() {
3154
3152
  return createComponent(Unread, {});
3155
3153
  }
@@ -3183,7 +3181,7 @@ var DefaultNotification = (props) => {
3183
3181
  e.stopPropagation();
3184
3182
  props.notification.archive();
3185
3183
  },
3186
- "class": "hover:nt-bg-neutral-alpha-50",
3184
+ "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3187
3185
  get children() {
3188
3186
  return createComponent(Archive, {});
3189
3187
  }
@@ -3210,7 +3208,7 @@ var DefaultNotification = (props) => {
3210
3208
  e.stopPropagation();
3211
3209
  props.notification.unarchive();
3212
3210
  },
3213
- "class": "hover:nt-bg-neutral-alpha-50",
3211
+ "class": "hover:nt-bg-neutral-alpha-50 nt-py-0.5",
3214
3212
  get children() {
3215
3213
  return createComponent(Unarchive, {});
3216
3214
  }
@@ -3280,10 +3278,7 @@ var DefaultNotification = (props) => {
3280
3278
  var _a;
3281
3279
  var _v$3 = style("notification", cn("nt-w-full nt-text-sm hover:nt-bg-neutral-alpha-50 nt-group nt-relative nt-flex nt-py-4 nt-px-6 nt-gap-2", {
3282
3280
  "nt-cursor-pointer": !props.notification.isRead || !!((_a = props.notification.redirect) == null ? void 0 : _a.url)
3283
- })), _v$4 = style("notificationBody", "nt-overflow-hidden nt-w-full"), _v$5 = style("notificationDate", `nt-transition nt-duration-100 nt-ease-out nt-text-foreground-alpha-400 nt-shrink-0
3284
- nt-float-right nt-text-right group-hover:nt-opacity-0`), _v$6 = style("notificationDefaultActions", `nt-transition nt-duration-100 nt-ease-out nt-gap-2 nt-flex nt-shrink-0
3285
- nt-opacity-0 group-hover:nt-opacity-100 nt-justify-center nt-items-center
3286
- nt-absolute nt-top-0 nt-right-0 nt-bg-neutral-alpha-50 nt-py-0.5 nt-rounded`), _v$7 = style("notificationCustomActions", "nt-flex nt-flex-wrap nt-gap-4 nt-mt-4");
3281
+ })), _v$4 = style("notificationBody", "nt-overflow-hidden nt-w-full"), _v$5 = style("notificationDate", "nt-transition nt-duration-100 nt-ease-out nt-text-foreground-alpha-400 nt-shrink-0 nt-float-right nt-text-right group-hover:nt-opacity-0"), _v$6 = style("notificationDefaultActions", `nt-transition nt-duration-100 nt-ease-out nt-gap-2 nt-flex nt-shrink-0 nt-opacity-0 group-hover:nt-opacity-100 nt-justify-center nt-items-center nt-absolute nt-top-0 nt-right-0 nt-bg-neutral-alpha-50 nt-rounded-lg`), _v$7 = style("notificationCustomActions", "nt-flex nt-flex-wrap nt-gap-4 nt-mt-4");
3287
3282
  _v$3 !== _p$.e && className(_el$, _p$.e = _v$3);
3288
3283
  _v$4 !== _p$.t && className(_el$4, _p$.t = _v$4);
3289
3284
  _v$5 !== _p$.a && className(_el$6, _p$.a = _v$5);
@@ -4096,7 +4091,7 @@ var Renderer = (props) => {
4096
4091
  }
4097
4092
  });
4098
4093
  };
4099
- var version = "2.3.0";
4094
+ var version = "2.3.1";
4100
4095
  var cssHref = `https://cdn.jsdelivr.net/npm/@novu/js@${version}/dist/index.css`;
4101
4096
  var _dispose, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _preferencesFilter, _setPreferencesFilter, _predefinedNovu, _NovuUI_instances, mountComponentRenderer_fn, updateComponentProps_fn;
4102
4097
  var NovuUI = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novu/js",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "repository": "https://github.com/novuhq/novu",
5
5
  "description": "Novu's JavaScript SDK for building custom inbox notification experiences",
6
6
  "author": "",
@@ -65,8 +65,7 @@
65
65
  "check-exports": "attw --pack .",
66
66
  "lint": "eslint src",
67
67
  "lint:fix": "pnpm lint -- --fix",
68
- "test": "jest",
69
- "release:preview": "pnpx pkg-pr-new publish"
68
+ "test": "jest"
70
69
  },
71
70
  "browserslist": {
72
71
  "production": [
@@ -125,5 +124,8 @@
125
124
  "solid-js": "^1.8.11",
126
125
  "solid-motionone": "^1.0.1",
127
126
  "tailwind-merge": "^2.4.0"
127
+ },
128
+ "nx": {
129
+ "tags": ["package:public"]
128
130
  }
129
131
  }