@novu/js 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{chunk-FDWMGQIF.js → chunk-Z3QMY5CF.js} +566 -513
- package/dist/cjs/index.d.ts +9 -2
- package/dist/cjs/index.js +17 -9
- package/dist/cjs/internal/index.d.ts +5 -5
- package/dist/cjs/internal/index.js +3 -3
- package/dist/cjs/{novu-Gnea9ink.d.ts → novu-BFU9QseZ.d.ts} +37 -37
- package/dist/cjs/themes/index.d.ts +2 -2
- package/dist/cjs/{types-C4qukwbH.d.ts → types-Df-J-WeQ.d.ts} +2 -2
- package/dist/cjs/ui/index.d.ts +3 -3
- package/dist/cjs/ui/index.js +543 -577
- package/dist/esm/{chunk-AIY4HF7H.mjs → chunk-EIKKISYN.mjs} +563 -513
- package/dist/esm/index.d.mts +9 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/internal/index.d.mts +5 -5
- package/dist/esm/internal/index.mjs +1 -1
- package/dist/esm/{novu-DiZKRUW5.d.mts → novu-CimEIa5g.d.mts} +37 -37
- package/dist/esm/themes/index.d.mts +2 -2
- package/dist/esm/{types-D_hCZpTY.d.mts → types-LCV8aocH.d.mts} +2 -2
- package/dist/esm/ui/index.d.mts +3 -3
- package/dist/esm/ui/index.mjs +537 -571
- package/dist/novu.min.js +12 -12
- package/dist/novu.min.js.gz +0 -0
- package/package.json +3 -4
- package/dist/cjs/{chunk-QFZ5WJGI.js → chunk-ZB7IPCHY.js} +14 -14
- package/dist/esm/{chunk-KYYDDVBR.mjs → chunk-QOD7NZ77.mjs} +14 -14
package/dist/esm/ui/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Novu, isBrowser, DEFAULT_API_VERSION, isSameFilter } from '../chunk-
|
|
2
|
-
import { parseMarkdownIntoTokens } from '../chunk-
|
|
1
|
+
import { Novu, checkNotificationTagFilter, checkNotificationDataFilter, isBrowser, DEFAULT_API_VERSION, isSameFilter } from '../chunk-EIKKISYN.mjs';
|
|
2
|
+
import { parseMarkdownIntoTokens } from '../chunk-QOD7NZ77.mjs';
|
|
3
3
|
import { __privateAdd, __privateMethod, __privateSet, __privateGet, __spreadProps, __spreadValues, __objRest, __async } from '../chunk-STZMOEWR.mjs';
|
|
4
4
|
import { createComponent, mergeProps, delegateEvents, render, Portal, spread, template, insert, memo, effect, className, use, setAttribute, Dynamic } from 'solid-js/web';
|
|
5
5
|
import { createSignal, createContext, useContext, onMount, onCleanup, For, createMemo, createEffect, splitProps, Show, Switch as Switch$1, Match, createResource, Index, batch } from 'solid-js';
|
|
6
6
|
import { createStore } from 'solid-js/store';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
9
|
+
import { Motion as Motion$1 } from 'solid-motionone';
|
|
9
10
|
import { autoUpdate, offset, flip, shift } from '@floating-ui/dom';
|
|
10
11
|
import { useFloating } from 'solid-floating-ui';
|
|
11
|
-
import { Motion as Motion$1 } from 'solid-motionone';
|
|
12
12
|
import { cva } from 'class-variance-authority';
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// _72rgboi8t:/home/runner/work/novu/novu/packages/js/src/ui/index.directcss
|
|
15
15
|
var ui_default = `.novu{scrollbar-color:var(--nv-color-secondary-foreground-alpha-300) #0000;:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{border:0 solid #e5e7eb;box-sizing:border-box}:where(html,:host){line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;tab-size:4;-webkit-tap-highlight-color:transparent}:where(body){line-height:inherit;margin:0}:where(hr){border-top-width:1px;color:inherit;height:0}:where(abbr:where([title])){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(a){color:inherit;text-decoration:inherit}:where(b,strong){font-weight:bolder}:where(code,kbd,samp,pre){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}:where(small){font-size:80%}:where(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:initial}:where(sub){bottom:-.25em}:where(sup){top:-.5em}:where(table){border-collapse:collapse;border-color:inherit;text-indent:0}:where(button,input,optgroup,select,textarea){color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}:where(button,select){text-transform:none}:where(button,input:where([type=button]),input:where([type=reset]),input:where([type=submit])){-webkit-appearance:button;background-color:initial;background-image:none}:where(:-moz-focusring){outline:auto}:where(:-moz-ui-invalid){box-shadow:none}:where(progress){vertical-align:initial}:where(*)::-webkit-inner-spin-button,:where(*)::-webkit-outer-spin-button{height:auto}:where([type=search]){-webkit-appearance:textfield;outline-offset:-2px}:where(*)::-webkit-search-decoration{-webkit-appearance:none}:where(*)::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(summary){display:list-item}:where(blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre){margin:0}:where(fieldset){margin:0;padding:0}:where(legend){padding:0}:where(ol,ul,menu){list-style:none;margin:0;padding:0}:where(dialog){padding:0}:where(textarea){resize:vertical}:where(input)::placeholder,:where(textarea)::placeholder{color:#9ca3af;opacity:1}:where(button,[role=button]){cursor:pointer}:where(:disabled){cursor:default}:where(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(img,video){height:auto;max-width:100%}:where([hidden]){display:none}:where(*),:where(*) :after,:where(*) :before,:where(*):after,:where(*):before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }:where(*) ::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::-webkit-scrollbar{height:.5rem;width:.5rem}::-webkit-scrollbar-thumb{background-clip:"padding-box";background-color:var(--nv-color-secondary-foreground-alpha-300);border-radius:.25rem}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background-color:initial}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}}.nt-sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.\\!nt-pointer-events-auto{pointer-events:auto!important}.nt-invisible{visibility:hidden}.nt-absolute{position:absolute}.nt-relative{position:relative}.nt-inset-0{inset:0}.nt-inset-2{inset:.5rem}.nt-left-0\\.5{left:.125rem}.nt-right-0{right:0}.nt-right-3{right:.75rem}.nt-top-0{top:0}.nt-top-0\\.5{top:.125rem}.nt-top-3{top:.75rem}.nt-z-10{z-index:10}.nt-z-\\[-1\\]{z-index:-1}.nt-mx-auto{margin-left:auto;margin-right:auto}.nt--mt-\\[50px\\]{margin-top:-50px}.nt-mb-1{margin-bottom:.25rem}.nt-mb-2{margin-bottom:.5rem}.nt-mb-4{margin-bottom:1rem}.nt-mb-\\[0\\.625rem\\]{margin-bottom:.625rem}.nt-ml-1{margin-left:.25rem}.nt-ml-2{margin-left:.5rem}.nt-ml-auto{margin-left:auto}.nt-mr-2{margin-right:.5rem}.nt-mr-auto{margin-right:auto}.nt-mt-1{margin-top:.25rem}.nt-mt-auto{margin-top:auto}.nt-block{display:block}.nt-flex{display:flex}.nt-inline-flex{display:inline-flex}.nt-grid{display:grid}.nt-hidden{display:none}.nt-aspect-square{aspect-ratio:1/1}.nt-size-1\\.5{height:.375rem;width:.375rem}.nt-size-2{height:.5rem;width:.5rem}.nt-size-2\\.5{height:.625rem;width:.625rem}.nt-size-3{height:.75rem;width:.75rem}.nt-size-3\\.5{height:.875rem;width:.875rem}.nt-size-4{height:1rem;width:1rem}.nt-size-5{height:1.25rem;width:1.25rem}.nt-size-8{height:2rem;width:2rem}.nt-size-fit{height:fit-content;width:fit-content}.nt-size-full{height:100%;width:100%}.nt-h-2{height:.5rem}.nt-h-3{height:.75rem}.nt-h-4{height:1rem}.nt-h-5{height:1.25rem}.nt-h-7{height:1.75rem}.nt-h-8{height:2rem}.nt-h-9{height:2.25rem}.nt-h-\\[600px\\]{height:600px}.nt-h-fit{height:fit-content}.nt-h-full{height:100%}.nt-min-h-0{min-height:0}.nt-w-1\\/3{width:33.333333%}.nt-w-2\\/3{width:66.666667%}.nt-w-5{width:1.25rem}.nt-w-7{width:1.75rem}.nt-w-8{width:2rem}.nt-w-\\[260px\\]{width:260px}.nt-w-\\[400px\\]{width:400px}.nt-w-\\[60px\\]{width:60px}.nt-w-\\[calc\\(2ch\\+2rem\\)\\]{width:calc(2ch + 2rem)}.nt-w-fit{width:fit-content}.nt-w-full{width:100%}.nt-w-max{width:max-content}.nt-min-w-52{min-width:13rem}.nt-flex-1{flex:1 1 0%}.nt-shrink-0{flex-shrink:0}.nt-translate-x-1\\/2{--tw-translate-x:50%}.nt-transform,.nt-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.nt-cursor-default{cursor:default}.nt-cursor-not-allowed{cursor:not-allowed}.nt-cursor-pointer{cursor:pointer}.nt-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.nt-flex-row{flex-direction:row}.nt-flex-col{flex-direction:column}.nt-flex-wrap{flex-wrap:wrap}.nt-flex-nowrap{flex-wrap:nowrap}.nt-items-start{align-items:flex-start}.nt-items-center{align-items:center}.nt-justify-end{justify-content:flex-end}.nt-justify-center{justify-content:center}.nt-justify-between{justify-content:space-between}.nt-gap-0\\.5{gap:.125rem}.nt-gap-1{gap:.25rem}.nt-gap-1\\.5{gap:.375rem}.nt-gap-2{gap:.5rem}.nt-gap-3{gap:.75rem}.nt-gap-4{gap:1rem}.nt-gap-6{gap:1.5rem}.nt-gap-8{gap:2rem}.nt-self-stretch{align-self:stretch}.nt-overflow-auto{overflow:auto}.nt-overflow-hidden{overflow:hidden}.nt-overflow-y-auto{overflow-y:auto}.nt-truncate{overflow:hidden;text-overflow:ellipsis}.nt-truncate,.nt-whitespace-nowrap{white-space:nowrap}.nt-whitespace-pre-wrap{white-space:pre-wrap}.nt-rounded{border-radius:var(--nv-radius-base)}.nt-rounded-full{border-radius:var(--nv-radius-full)}.nt-rounded-lg{border-radius:var(--nv-radius-lg)}.nt-rounded-md{border-radius:var(--nv-radius-md)}.nt-rounded-sm{border-radius:var(--nv-radius-sm)}.nt-rounded-xl{border-radius:var(--nv-radius-xl)}.nt-border{border-width:1px}.nt-border-b{border-bottom-width:1px}.nt-border-t{border-top-width:1px}.nt-border-background{border-color:var(--nv-color-background)}.nt-border-border{border-color:var(--nv-color-neutral-alpha-100)}.nt-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.nt-border-neutral-alpha-100{border-color:var(--nv-color-neutral-alpha-100)}.nt-border-neutral-alpha-200{border-color:var(--nv-color-neutral-alpha-200)}.nt-border-neutral-alpha-400{border-color:var(--nv-color-neutral-alpha-400)}.nt-border-neutral-alpha-50{border-color:var(--nv-color-neutral-alpha-50)}.nt-border-t-neutral-alpha-200{border-top-color:var(--nv-color-neutral-alpha-200)}.nt-bg-\\[oklch\\(from_var\\(--nv-color-stripes\\)_l_c_h_\\/_0\\.1\\)\\]{background-color:oklch(from var(--nv-color-stripes) l c h/.1)}.nt-bg-background{background-color:var(--nv-color-background)}.nt-bg-counter{background-color:var(--nv-color-counter)}.nt-bg-foreground{background-color:var(--nv-color-foreground)}.nt-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.nt-bg-neutral-alpha-100{background-color:var(--nv-color-neutral-alpha-100)}.nt-bg-neutral-alpha-25{background-color:var(--nv-color-neutral-alpha-25)}.nt-bg-neutral-alpha-300{background-color:var(--nv-color-neutral-alpha-300)}.nt-bg-neutral-alpha-50{background-color:var(--nv-color-neutral-alpha-50)}.nt-bg-primary{background-color:var(--nv-color-primary)}.nt-bg-primary-alpha-300{background-color:var(--nv-color-primary-alpha-300)}.nt-bg-primary-alpha-400{background-color:var(--nv-color-primary-alpha-400)}.nt-bg-secondary{background-color:var(--nv-color-secondary)}.nt-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.nt-bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.nt-bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.nt-from-foreground-alpha-50{--tw-gradient-from:var(--nv-color-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-primary-foreground-alpha-200{--tw-gradient-from:var(--nv-color-primary-foreground-alpha-200) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-transparent{--tw-gradient-from:#0000 var(--tw-gradient-from-position);--tw-gradient-to:#0000 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.nt-from-20\\%{--tw-gradient-from-position:20%}.nt-to-background{--tw-gradient-to:var(--nv-color-background) var(--tw-gradient-to-position)}.nt-to-transparent{--tw-gradient-to:#0000 var(--tw-gradient-to-position)}.nt-object-cover{object-fit:cover}.nt-p-0{padding:0}.nt-p-0\\.5{padding:.125rem}.nt-p-1{padding:.25rem}.nt-p-2{padding:.5rem}.nt-p-2\\.5{padding:.625rem}.nt-p-3{padding:.75rem}.nt-p-4{padding:1rem}.nt-px-1{padding-left:.25rem;padding-right:.25rem}.nt-px-2{padding-left:.5rem;padding-right:.5rem}.nt-px-3{padding-left:.75rem;padding-right:.75rem}.nt-px-4{padding-left:1rem;padding-right:1rem}.nt-px-8{padding-left:2rem;padding-right:2rem}.nt-px-\\[6px\\]{padding-left:6px;padding-right:6px}.nt-py-1{padding-bottom:.25rem;padding-top:.25rem}.nt-py-2{padding-bottom:.5rem;padding-top:.5rem}.nt-py-3{padding-bottom:.75rem;padding-top:.75rem}.nt-py-3\\.5{padding-bottom:.875rem;padding-top:.875rem}.nt-py-4{padding-bottom:1rem;padding-top:1rem}.nt-py-px{padding-bottom:1px;padding-top:1px}.nt-pb-2{padding-bottom:.5rem}.nt-pb-\\[0\\.625rem\\]{padding-bottom:.625rem}.nt-pr-0{padding-right:0}.nt-pt-2\\.5{padding-top:.625rem}.nt-text-center{text-align:center}.nt-text-start{text-align:start}.nt-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.nt-text-\\[0\\.8rem\\]{font-size:.8rem}.nt-text-\\[12px\\]{font-size:12px}.nt-text-base{font-size:var(--nv-font-size-base);line-height:var(--nv-line-height-base)}.nt-text-sm{font-size:var(--nv-font-size-sm);line-height:var(--nv-line-height-sm)}.nt-text-xl{font-size:var(--nv-font-size-xl);line-height:var(--nv-line-height-xl)}.nt-text-xs{font-size:var(--nv-font-size-xs);line-height:var(--nv-line-height-xs)}.nt-font-medium{font-weight:500}.nt-font-normal{font-weight:400}.nt-font-semibold{font-weight:600}.nt-leading-none{line-height:1}.nt-text-\\[\\#000000\\]{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.nt-text-background{color:var(--nv-color-background)}.nt-text-counter-foreground{color:var(--nv-color-counter-foreground)}.nt-text-foreground{color:var(--nv-color-foreground)}.nt-text-foreground-alpha-300{color:var(--nv-color-foreground-alpha-300)}.nt-text-foreground-alpha-400{color:var(--nv-color-foreground-alpha-400)}.nt-text-foreground-alpha-600{color:var(--nv-color-foreground-alpha-600)}.nt-text-foreground-alpha-700{color:var(--nv-color-foreground-alpha-700)}.nt-text-primary-foreground{color:var(--nv-color-primary-foreground)}.nt-text-secondary-foreground{color:var(--nv-color-secondary-foreground)}.nt-text-stripes{color:var(--nv-color-stripes)}.nt-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.nt-underline{text-decoration-line:underline}.nt-opacity-0{opacity:0}.nt-opacity-20{opacity:.2}.nt-opacity-50{opacity:.5}.nt-shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0_0_0_0\\.5px_var\\(--nv-color-primary-600\\)\\]{--tw-shadow:0 0 0 0.5px var(--nv-color-primary-600);--tw-shadow-colored:0 0 0 0.5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0_0_0_0\\.5px_var\\(--nv-color-secondary-600\\)\\]{--tw-shadow:0 0 0 0.5px var(--nv-color-secondary-600);--tw-shadow-colored:0 0 0 0.5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-\\[0px_1px_2px_0px_rgba\\(10\\,13\\,20\\,0\\.03\\)\\]{--tw-shadow:0px 1px 2px 0px #0a0d1408;--tw-shadow-colored:0px 1px 2px 0px var(--tw-shadow-color)}.nt-shadow-\\[0px_1px_2px_0px_rgba\\(10\\,13\\,20\\,0\\.03\\)\\],.nt-shadow-dropdown{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-dropdown{--tw-shadow:0px 12px 16px -4px oklch(from var(--nv-color-shadow) l c h/0.08),0px 4px 6px -2px oklch(from var(--nv-color-shadow) l c h/0.03);--tw-shadow-colored:0px 12px 16px -4px var(--tw-shadow-color),0px 4px 6px -2px var(--tw-shadow-color)}.nt-shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.nt-shadow-lg,.nt-shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.nt-shadow-popover{--tw-shadow:0px 8px 26px 0px oklch(from var(--nv-color-shadow) l c h/0.08),0px 2px 6px 0px oklch(from var(--nv-color-shadow) l c h/0.12);--tw-shadow-colored:0px 8px 26px 0px var(--tw-shadow-color),0px 2px 6px 0px var(--tw-shadow-color)}.nt-shadow-popover,.nt-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.nt-shadow-tooltip{--tw-shadow:0 5px 20px 0 oklch(from var(--nv-color-shadow) l c h/0.08);--tw-shadow-colored:0 5px 20px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.nt-outline-none{outline:2px solid #0000;outline-offset:2px}.nt-backdrop-blur-lg{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.nt-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nt-duration-100{transition-duration:.1s}.nt-duration-200{transition-duration:.2s}.nt-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.nt-animate-in{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.nt-fade-in{--tw-enter-opacity:0}.nt-slide-in-from-top-2{--tw-enter-translate-y:-0.5rem}.nt-duration-100{animation-duration:.1s}.nt-duration-200{animation-duration:.2s}.nt-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\\[interpolate-size\\:allow-keywords\\]{interpolate-size:allow-keywords}.\\[scrollbar-gutter\\:stable\\]{scrollbar-gutter:stable}.\\[word-break\\:break-word\\]{word-break:break-word}.before\\:nt-absolute:before{content:var(--tw-content);position:absolute}.before\\:nt-inset-0:before{content:var(--tw-content);inset:0}.before\\:-nt-right-\\[calc\\(0\\+var\\(--stripes-size\\)\\)\\]:before{content:var(--tw-content);right:calc(var(--stripes-size)*-1)}@keyframes nt-stripes{0%{content:var(--tw-content);transform:translateX(0)}to{content:var(--tw-content);transform:translateX(calc(var(--stripes-size)*-1))}}.before\\:nt-animate-stripes:before{animation:nt-stripes 1s linear infinite paused;content:var(--tw-content)}.before\\:nt-rounded-lg:before{border-radius:var(--nv-radius-lg);content:var(--tw-content)}.before\\:nt-rounded-md:before{border-radius:var(--nv-radius-md);content:var(--tw-content)}.before\\:nt-rounded-xl:before{border-radius:var(--nv-radius-xl);content:var(--tw-content)}.before\\:nt-border:before{border-width:1px;content:var(--tw-content)}.before\\:nt-border-primary-foreground-alpha-100:before{border-color:var(--nv-color-primary-foreground-alpha-100);content:var(--tw-content)}.before\\:nt-border-secondary-foreground-alpha-100:before{border-color:var(--nv-color-secondary-foreground-alpha-100);content:var(--tw-content)}.before\\:nt-bg-dev-stripes-gradient:before{background-image:repeating-linear-gradient(135deg,oklch(from var(--nv-color-stripes) l c h/.1) 25%,oklch(from var(--nv-color-stripes) l c h/.1) 50%,oklch(from var(--nv-color-stripes) l c h/.2) 50%,oklch(from var(--nv-color-stripes) l c h/.2) 75%);content:var(--tw-content)}.before\\:nt-bg-\\[length\\:var\\(--stripes-size\\)_var\\(--stripes-size\\)\\]:before{background-size:var(--stripes-size) var(--stripes-size);content:var(--tw-content)}.before\\:nt-content-\\[\\"\\"\\]:before{--tw-content:"";content:var(--tw-content)}.before\\:\\[mask-image\\:linear-gradient\\(transparent_0\\%\\2c black\\)\\]:before{content:var(--tw-content);-webkit-mask-image:linear-gradient(#0000,#000);mask-image:linear-gradient(#0000,#000)}.after\\:nt-absolute:after{content:var(--tw-content);position:absolute}.after\\:nt-inset-0:after{content:var(--tw-content);inset:0}.after\\:-nt-top-12:after{content:var(--tw-content);top:-3rem}.after\\:nt-bottom-0:after{bottom:0;content:var(--tw-content)}.after\\:nt-left-0:after{content:var(--tw-content);left:0}.after\\:nt-left-0\\.5:after{content:var(--tw-content);left:.125rem}.after\\:nt-top-0\\.5:after{content:var(--tw-content);top:.125rem}.after\\:nt-size-3:after{content:var(--tw-content);height:.75rem;width:.75rem}.after\\:nt-h-\\[2px\\]:after{content:var(--tw-content);height:2px}.after\\:nt-w-full:after{content:var(--tw-content);width:100%}.after\\:nt-translate-x-1\\/2:after{--tw-translate-x:50%}.after\\:nt-translate-x-1\\/2:after,.after\\:nt-translate-x-full:after{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\\:nt-translate-x-full:after{--tw-translate-x:100%}.after\\:nt-rounded-full:after{border-radius:var(--nv-radius-full);content:var(--tw-content)}.after\\:nt-rounded-lg:after{border-radius:var(--nv-radius-lg);content:var(--tw-content)}.after\\:nt-rounded-md:after{border-radius:var(--nv-radius-md);content:var(--tw-content)}.after\\:nt-rounded-xl:after{border-radius:var(--nv-radius-xl);content:var(--tw-content)}.after\\:nt-border-b-2:after{border-bottom-width:2px;content:var(--tw-content)}.after\\:nt-border-background:after{border-color:var(--nv-color-background);content:var(--tw-content)}.after\\:nt-border-b-primary:after{border-bottom-color:var(--nv-color-primary);content:var(--tw-content)}.after\\:nt-border-b-transparent:after{border-bottom-color:#0000;content:var(--tw-content)}.after\\:nt-bg-background:after{background-color:var(--nv-color-background);content:var(--tw-content)}.after\\:nt-bg-\\[linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-background\\)_l_c_h_\\/_0\\.9\\)_55\\%\\2c transparent\\)\\]:after{background-image:linear-gradient(180deg,#0000,oklch(from var(--nv-color-background) l c h/.9) 55%,#0000);content:var(--tw-content)}.after\\:nt-bg-\\[linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-stripes\\)_l_c_h_\\/_0\\.07\\)_55\\%\\2c transparent\\)\\2c linear-gradient\\(180deg\\2c transparent\\2c oklch\\(from_var\\(--nv-color-background\\)_l_c_h_\\/_0\\.9\\)_55\\%\\2c transparent\\)\\]:after{background-image:linear-gradient(180deg,#0000,oklch(from var(--nv-color-stripes) l c h/.07) 55%,#0000),linear-gradient(180deg,#0000,oklch(from var(--nv-color-background) l c h/.9) 55%,#0000);content:var(--tw-content)}.after\\:nt-bg-gradient-to-b:after{background-image:linear-gradient(to bottom,var(--tw-gradient-stops));content:var(--tw-content)}.after\\:nt-from-primary-foreground-alpha-50:after{content:var(--tw-content);--tw-gradient-from:var(--nv-color-primary-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.after\\:nt-from-secondary-foreground-alpha-50:after{content:var(--tw-content);--tw-gradient-from:var(--nv-color-secondary-foreground-alpha-50) var(--tw-gradient-from-position);--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.after\\:nt-to-transparent:after{content:var(--tw-content);--tw-gradient-to:#0000 var(--tw-gradient-to-position)}.after\\:nt-opacity-0:after{content:var(--tw-content);opacity:0}.after\\:nt-transition-all:after{content:var(--tw-content);transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\\:nt-transition-opacity:after{content:var(--tw-content);transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\\:nt-duration-200:after{transition-duration:.2s}.after\\:nt-content-\\[\\"\\"\\]:after,.after\\:nt-content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.after\\:nt-duration-200:after{animation-duration:.2s;content:var(--tw-content)}.hover\\:nt-bg-neutral-alpha-100:hover{background-color:var(--nv-color-neutral-alpha-100)}.hover\\:nt-bg-neutral-alpha-50:hover{background-color:var(--nv-color-neutral-alpha-50)}.hover\\:nt-bg-primary-600:hover{background-color:var(--nv-color-primary-600)}.hover\\:nt-bg-primary-alpha-25:hover{background-color:var(--nv-color-primary-alpha-25)}.hover\\:nt-bg-primary-alpha-400:hover{background-color:var(--nv-color-primary-alpha-400)}.hover\\:nt-text-foreground-alpha-800:hover{color:var(--nv-color-foreground-alpha-800)}.before\\:hover\\:\\[animation-play-state\\:running\\]:hover:before{animation-play-state:running;content:var(--tw-content)}.hover\\:after\\:nt-opacity-100:hover:after{content:var(--tw-content);opacity:1}.focus\\:nt-outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus-visible\\:nt-rounded-lg:focus-visible{border-radius:var(--nv-radius-lg)}.focus-visible\\:nt-rounded-md:focus-visible{border-radius:var(--nv-radius-md)}.focus-visible\\:nt-rounded-xl:focus-visible{border-radius:var(--nv-radius-xl)}.focus-visible\\:nt-bg-neutral-alpha-50:focus-visible{background-color:var(--nv-color-neutral-alpha-50)}.focus-visible\\:nt-outline-none:focus-visible{outline:2px solid #0000;outline-offset:2px}.focus-visible\\:nt-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:nt-ring-primary:focus-visible{--tw-ring-color:var(--nv-color-primary)}.focus-visible\\:nt-ring-ring:focus-visible{--tw-ring-color:var(--nv-color-ring)}.focus-visible\\:nt-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:nt-pointer-events-none:disabled{pointer-events:none}.disabled\\:nt-opacity-20:disabled{opacity:.2}.disabled\\:nt-opacity-50:disabled{opacity:.5}.nt-group:focus-within .group-focus-within\\:nt-opacity-100,.nt-group:hover .group-hover\\:nt-opacity-100{opacity:1}.data-\\[open\\=true\\]\\:nt-rotate-180[data-open=true]{--tw-rotate:180deg}.data-\\[open\\=true\\]\\:nt-rotate-180[data-open=true],.data-\\[open\\=true\\]\\:nt-transform[data-open=true]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[disabled\\=true\\]\\:nt-text-foreground-alpha-400[data-disabled=true]{color:var(--nv-color-foreground-alpha-400)}.data-\\[disabled\\=true\\]\\:nt-text-foreground-alpha-600[data-disabled=true]{color:var(--nv-color-foreground-alpha-600)}.data-\\[state\\=active\\]\\:nt-text-foreground[data-state=active]{color:var(--nv-color-foreground)}.data-\\[state\\=active\\]\\:after\\:nt-border-b-2[data-state=active]:after{border-bottom-width:2px;content:var(--tw-content)}.data-\\[state\\=active\\]\\:after\\:nt-border-primary[data-state=active]:after{border-color:var(--nv-color-primary);content:var(--tw-content)}.data-\\[state\\=active\\]\\:after\\:nt-opacity-100[data-state=active]:after{content:var(--tw-content);opacity:1}.\\[\\&\\:not\\(\\:first-child\\)\\]\\:nt-border-t:not(:first-child){border-top-width:1px}.\\[\\&_\\.nv-notificationList\\]\\:nt-pb-12 .nv-notificationList{padding-bottom:3rem}.\\[\\&_\\.nv-notificationList\\]\\:nt-pb-8 .nv-notificationList{padding-bottom:2rem}.\\[\\&_\\.nv-preferencesContainer\\]\\:nt-pb-12 .nv-preferencesContainer{padding-bottom:3rem}.\\[\\&_\\.nv-preferencesContainer\\]\\:nt-pb-8 .nv-preferencesContainer{padding-bottom:2rem}.\\[\\&_svg\\]\\:nt-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:nt-shrink-0 svg{flex-shrink:0}`;
|
|
16
16
|
|
|
17
17
|
// src/ui/config/appearanceKeys.ts
|
|
@@ -447,6 +447,235 @@ function formatSnoozedUntil({ untilDate, locale = DEFAULT_LOCALE }) {
|
|
|
447
447
|
return new Intl.DateTimeFormat(locale, { month: "short", day: "numeric" }).format(untilDate);
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
+
|
|
451
|
+
// src/notifications/visibility-tracker.ts
|
|
452
|
+
var DEFAULT_OPTIONS = {
|
|
453
|
+
intersectionThreshold: 0.5,
|
|
454
|
+
visibilityDuration: 1e3,
|
|
455
|
+
batchDelay: 500,
|
|
456
|
+
maxBatchSize: 20,
|
|
457
|
+
enabled: true,
|
|
458
|
+
rootMargin: "0px"
|
|
459
|
+
};
|
|
460
|
+
var NotificationVisibilityTracker = class {
|
|
461
|
+
constructor(inboxService, options = {}) {
|
|
462
|
+
this.inboxService = inboxService;
|
|
463
|
+
/*
|
|
464
|
+
* Session-based tracking: notifications marked as seen in current session won't be marked again
|
|
465
|
+
* Only resets when tracker is destroyed (inbox closes)
|
|
466
|
+
*/
|
|
467
|
+
this.seenNotifications = /* @__PURE__ */ new Set();
|
|
468
|
+
this.pendingNotifications = /* @__PURE__ */ new Map();
|
|
469
|
+
this.pendingBatch = /* @__PURE__ */ new Set();
|
|
470
|
+
this.batchTimer = null;
|
|
471
|
+
this.visibilityTimer = null;
|
|
472
|
+
this.observer = null;
|
|
473
|
+
this.elementToNotificationMap = /* @__PURE__ */ new WeakMap();
|
|
474
|
+
this.observedElements = /* @__PURE__ */ new Set();
|
|
475
|
+
this.options = __spreadValues(__spreadValues({}, DEFAULT_OPTIONS), options);
|
|
476
|
+
this.initializeObserver();
|
|
477
|
+
this.startVisibilityTimer();
|
|
478
|
+
}
|
|
479
|
+
initializeObserver() {
|
|
480
|
+
if (!this.options.enabled || typeof window === "undefined" || !("IntersectionObserver" in window)) {
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
this.observer = new IntersectionObserver((entries) => this.handleIntersection(entries), {
|
|
484
|
+
threshold: this.options.intersectionThreshold,
|
|
485
|
+
rootMargin: this.options.rootMargin
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
startVisibilityTimer() {
|
|
489
|
+
if (!this.options.enabled || typeof window === "undefined") {
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
this.checkAllElementsVisibility();
|
|
493
|
+
this.visibilityTimer = window.setInterval(() => {
|
|
494
|
+
this.checkAllElementsVisibility();
|
|
495
|
+
}, 1e3);
|
|
496
|
+
}
|
|
497
|
+
checkAllElementsVisibility() {
|
|
498
|
+
this.observedElements.forEach((element) => {
|
|
499
|
+
const notificationId = this.elementToNotificationMap.get(element);
|
|
500
|
+
if (!notificationId || this.seenNotifications.has(notificationId)) {
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
const rect = element.getBoundingClientRect();
|
|
504
|
+
const isVisible = this.isElementVisible(rect);
|
|
505
|
+
if (isVisible) {
|
|
506
|
+
if (!this.pendingNotifications.has(notificationId)) {
|
|
507
|
+
this.pendingNotifications.set(notificationId, Date.now());
|
|
508
|
+
}
|
|
509
|
+
} else {
|
|
510
|
+
this.pendingNotifications.delete(notificationId);
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
this.processVisibleNotifications();
|
|
514
|
+
}
|
|
515
|
+
isElementVisible(rect) {
|
|
516
|
+
const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
517
|
+
const viewportWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
518
|
+
const verticalInView = rect.top < viewportHeight && rect.bottom > 0;
|
|
519
|
+
const horizontalInView = rect.left < viewportWidth && rect.right > 0;
|
|
520
|
+
if (!verticalInView || !horizontalInView) {
|
|
521
|
+
return false;
|
|
522
|
+
}
|
|
523
|
+
const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);
|
|
524
|
+
const visibleWidth = Math.min(rect.right, viewportWidth) - Math.max(rect.left, 0);
|
|
525
|
+
const visibleArea = visibleHeight * visibleWidth;
|
|
526
|
+
const totalArea = rect.height * rect.width;
|
|
527
|
+
return totalArea > 0 && visibleArea / totalArea >= this.options.intersectionThreshold;
|
|
528
|
+
}
|
|
529
|
+
handleIntersection(entries) {
|
|
530
|
+
const now = Date.now();
|
|
531
|
+
entries.forEach((entry) => {
|
|
532
|
+
const notificationId = this.elementToNotificationMap.get(entry.target);
|
|
533
|
+
if (!notificationId || this.seenNotifications.has(notificationId)) {
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
if (entry.isIntersecting) {
|
|
537
|
+
this.pendingNotifications.set(notificationId, now);
|
|
538
|
+
} else {
|
|
539
|
+
this.pendingNotifications.delete(notificationId);
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
this.processVisibleNotifications();
|
|
543
|
+
}
|
|
544
|
+
processVisibleNotifications() {
|
|
545
|
+
const now = Date.now();
|
|
546
|
+
const notificationsToMark = [];
|
|
547
|
+
this.pendingNotifications.forEach((startTime, notificationId) => {
|
|
548
|
+
if (now - startTime >= this.options.visibilityDuration) {
|
|
549
|
+
notificationsToMark.push(notificationId);
|
|
550
|
+
this.seenNotifications.add(notificationId);
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
notificationsToMark.forEach((id) => {
|
|
554
|
+
this.pendingNotifications.delete(id);
|
|
555
|
+
});
|
|
556
|
+
if (notificationsToMark.length > 0) {
|
|
557
|
+
this.addToBatch(notificationsToMark);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
addToBatch(notificationIds) {
|
|
561
|
+
notificationIds.forEach((id) => {
|
|
562
|
+
this.pendingBatch.add(id);
|
|
563
|
+
});
|
|
564
|
+
this.scheduleBatchProcessing();
|
|
565
|
+
}
|
|
566
|
+
scheduleBatchProcessing() {
|
|
567
|
+
if (this.batchTimer !== null) {
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
this.batchTimer = window.setTimeout(() => {
|
|
571
|
+
this.processBatch();
|
|
572
|
+
}, this.options.batchDelay);
|
|
573
|
+
}
|
|
574
|
+
processBatch() {
|
|
575
|
+
return __async(this, null, function* () {
|
|
576
|
+
this.batchTimer = null;
|
|
577
|
+
const notificationsToSend = Array.from(this.pendingBatch);
|
|
578
|
+
this.pendingBatch.clear();
|
|
579
|
+
if (notificationsToSend.length === 0) {
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
const chunks = this.chunkArray(notificationsToSend, this.options.maxBatchSize);
|
|
583
|
+
try {
|
|
584
|
+
yield Promise.all(chunks.map((chunk) => this.inboxService.markAsSeen({ notificationIds: chunk })));
|
|
585
|
+
} catch (error) {
|
|
586
|
+
notificationsToSend.forEach((id) => {
|
|
587
|
+
this.seenNotifications.delete(id);
|
|
588
|
+
});
|
|
589
|
+
console.error("Failed to mark notifications as seen:", error);
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
chunkArray(array, size) {
|
|
594
|
+
const chunks = [];
|
|
595
|
+
for (let i = 0; i < array.length; i += size) {
|
|
596
|
+
chunks.push(array.slice(i, i + size));
|
|
597
|
+
}
|
|
598
|
+
return chunks;
|
|
599
|
+
}
|
|
600
|
+
observe(element, notificationId) {
|
|
601
|
+
if (!this.observer || this.seenNotifications.has(notificationId)) {
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
this.elementToNotificationMap.set(element, notificationId);
|
|
605
|
+
this.observedElements.add(element);
|
|
606
|
+
this.observer.observe(element);
|
|
607
|
+
}
|
|
608
|
+
unobserve(element) {
|
|
609
|
+
if (!this.observer) {
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
const notificationId = this.elementToNotificationMap.get(element);
|
|
613
|
+
if (notificationId) {
|
|
614
|
+
this.pendingNotifications.delete(notificationId);
|
|
615
|
+
this.pendingBatch.delete(notificationId);
|
|
616
|
+
this.elementToNotificationMap.delete(element);
|
|
617
|
+
this.observedElements.delete(element);
|
|
618
|
+
}
|
|
619
|
+
this.observer.unobserve(element);
|
|
620
|
+
}
|
|
621
|
+
destroy() {
|
|
622
|
+
if (this.observer) {
|
|
623
|
+
this.observer.disconnect();
|
|
624
|
+
this.observer = null;
|
|
625
|
+
}
|
|
626
|
+
if (this.batchTimer !== null) {
|
|
627
|
+
window.clearTimeout(this.batchTimer);
|
|
628
|
+
this.batchTimer = null;
|
|
629
|
+
}
|
|
630
|
+
if (this.visibilityTimer !== null) {
|
|
631
|
+
window.clearInterval(this.visibilityTimer);
|
|
632
|
+
this.visibilityTimer = null;
|
|
633
|
+
}
|
|
634
|
+
this.seenNotifications.clear();
|
|
635
|
+
this.pendingNotifications.clear();
|
|
636
|
+
this.pendingBatch.clear();
|
|
637
|
+
this.observedElements.clear();
|
|
638
|
+
}
|
|
639
|
+
// Force process any pending batches (useful for cleanup)
|
|
640
|
+
flush() {
|
|
641
|
+
return __async(this, null, function* () {
|
|
642
|
+
if (this.batchTimer !== null) {
|
|
643
|
+
window.clearTimeout(this.batchTimer);
|
|
644
|
+
this.batchTimer = null;
|
|
645
|
+
yield this.processBatch();
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
// src/ui/helpers/useNotificationVisibility.ts
|
|
652
|
+
function useNotificationVisibility() {
|
|
653
|
+
const novu = useNovu();
|
|
654
|
+
let tracker = null;
|
|
655
|
+
onMount(() => {
|
|
656
|
+
tracker = new NotificationVisibilityTracker(novu.notifications.inboxService);
|
|
657
|
+
onCleanup(() => {
|
|
658
|
+
if (tracker) {
|
|
659
|
+
tracker.destroy();
|
|
660
|
+
tracker = null;
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
});
|
|
664
|
+
const observeNotification = (element, notificationId) => {
|
|
665
|
+
if (tracker) {
|
|
666
|
+
tracker.observe(element, notificationId);
|
|
667
|
+
}
|
|
668
|
+
};
|
|
669
|
+
const unobserveNotification = (element) => {
|
|
670
|
+
if (tracker) {
|
|
671
|
+
tracker.unobserve(element);
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
return {
|
|
675
|
+
observeNotification,
|
|
676
|
+
unobserveNotification
|
|
677
|
+
};
|
|
678
|
+
}
|
|
450
679
|
var twMerge = extendTailwindMerge({
|
|
451
680
|
prefix: "nt-"
|
|
452
681
|
});
|
|
@@ -724,300 +953,71 @@ var useTabsDropdown = ({ tabs }) => {
|
|
|
724
953
|
return { dropdownTabs, setTabsList, visibleTabs };
|
|
725
954
|
};
|
|
726
955
|
|
|
727
|
-
// src/ui/helpers/browser.ts
|
|
728
|
-
function requestLock(id, cb) {
|
|
729
|
-
let isFulfilled = false;
|
|
730
|
-
let promiseResolve;
|
|
731
|
-
const promise = new Promise((resolve) => {
|
|
732
|
-
promiseResolve = resolve;
|
|
733
|
-
});
|
|
734
|
-
navigator.locks.request(id, () => {
|
|
735
|
-
if (!isFulfilled) {
|
|
736
|
-
cb(id);
|
|
737
|
-
}
|
|
738
|
-
return promise;
|
|
739
|
-
});
|
|
740
|
-
return () => {
|
|
741
|
-
isFulfilled = true;
|
|
742
|
-
promiseResolve();
|
|
743
|
-
};
|
|
744
|
-
}
|
|
745
|
-
var useBrowserTabsChannel = ({
|
|
746
|
-
channelName,
|
|
747
|
-
onMessage
|
|
748
|
-
}) => {
|
|
749
|
-
const [tabsChannel] = createSignal(new BroadcastChannel(channelName));
|
|
750
|
-
const postMessage = (args) => {
|
|
751
|
-
const channel = tabsChannel();
|
|
752
|
-
channel.postMessage(args);
|
|
753
|
-
};
|
|
754
|
-
onMount(() => {
|
|
755
|
-
const listener = (event) => {
|
|
756
|
-
onMessage(event.data);
|
|
757
|
-
};
|
|
758
|
-
const channel = tabsChannel();
|
|
759
|
-
channel.addEventListener("message", listener);
|
|
760
|
-
onCleanup(() => {
|
|
761
|
-
channel.removeEventListener("message", listener);
|
|
762
|
-
});
|
|
763
|
-
});
|
|
764
|
-
return { postMessage };
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
// src/ui/helpers/useWebSocketEvent.ts
|
|
768
|
-
var useWebSocketEvent = ({
|
|
769
|
-
event: webSocketEvent,
|
|
770
|
-
eventHandler: onMessage
|
|
771
|
-
}) => {
|
|
772
|
-
const novu = useNovu();
|
|
773
|
-
const channelName = `nv_ws_connection:a=${novu.applicationIdentifier}:s=${novu.subscriberId}:e=${webSocketEvent}`;
|
|
774
|
-
const { postMessage } = useBrowserTabsChannel({ channelName, onMessage });
|
|
775
|
-
const updateReadCount = (data) => {
|
|
776
|
-
onMessage(data);
|
|
777
|
-
postMessage(data);
|
|
778
|
-
};
|
|
779
|
-
onMount(() => {
|
|
780
|
-
let cleanup;
|
|
781
|
-
const resolveLock = requestLock(channelName, () => {
|
|
782
|
-
cleanup = novu.on(webSocketEvent, updateReadCount);
|
|
783
|
-
});
|
|
784
|
-
onCleanup(() => {
|
|
785
|
-
if (cleanup) {
|
|
786
|
-
cleanup();
|
|
787
|
-
}
|
|
788
|
-
resolveLock();
|
|
789
|
-
});
|
|
790
|
-
});
|
|
791
|
-
};
|
|
792
|
-
|
|
793
|
-
// src/notifications/visibility-tracker.ts
|
|
794
|
-
var DEFAULT_OPTIONS = {
|
|
795
|
-
intersectionThreshold: 0.5,
|
|
796
|
-
visibilityDuration: 1e3,
|
|
797
|
-
batchDelay: 500,
|
|
798
|
-
maxBatchSize: 20,
|
|
799
|
-
enabled: true,
|
|
800
|
-
rootMargin: "0px"
|
|
801
|
-
};
|
|
802
|
-
var NotificationVisibilityTracker = class {
|
|
803
|
-
constructor(inboxService, options = {}) {
|
|
804
|
-
this.inboxService = inboxService;
|
|
805
|
-
/*
|
|
806
|
-
* Session-based tracking: notifications marked as seen in current session won't be marked again
|
|
807
|
-
* Only resets when tracker is destroyed (inbox closes)
|
|
808
|
-
*/
|
|
809
|
-
this.seenNotifications = /* @__PURE__ */ new Set();
|
|
810
|
-
this.pendingNotifications = /* @__PURE__ */ new Map();
|
|
811
|
-
this.pendingBatch = /* @__PURE__ */ new Set();
|
|
812
|
-
this.batchTimer = null;
|
|
813
|
-
this.visibilityTimer = null;
|
|
814
|
-
this.observer = null;
|
|
815
|
-
this.elementToNotificationMap = /* @__PURE__ */ new WeakMap();
|
|
816
|
-
this.observedElements = /* @__PURE__ */ new Set();
|
|
817
|
-
this.options = __spreadValues(__spreadValues({}, DEFAULT_OPTIONS), options);
|
|
818
|
-
this.initializeObserver();
|
|
819
|
-
this.startVisibilityTimer();
|
|
820
|
-
}
|
|
821
|
-
initializeObserver() {
|
|
822
|
-
if (!this.options.enabled || typeof window === "undefined" || !("IntersectionObserver" in window)) {
|
|
823
|
-
return;
|
|
824
|
-
}
|
|
825
|
-
this.observer = new IntersectionObserver((entries) => this.handleIntersection(entries), {
|
|
826
|
-
threshold: this.options.intersectionThreshold,
|
|
827
|
-
rootMargin: this.options.rootMargin
|
|
828
|
-
});
|
|
829
|
-
}
|
|
830
|
-
startVisibilityTimer() {
|
|
831
|
-
if (!this.options.enabled || typeof window === "undefined") {
|
|
832
|
-
return;
|
|
833
|
-
}
|
|
834
|
-
this.checkAllElementsVisibility();
|
|
835
|
-
this.visibilityTimer = window.setInterval(() => {
|
|
836
|
-
this.checkAllElementsVisibility();
|
|
837
|
-
}, 1e3);
|
|
838
|
-
}
|
|
839
|
-
checkAllElementsVisibility() {
|
|
840
|
-
this.observedElements.forEach((element) => {
|
|
841
|
-
const notificationId = this.elementToNotificationMap.get(element);
|
|
842
|
-
if (!notificationId || this.seenNotifications.has(notificationId)) {
|
|
843
|
-
return;
|
|
844
|
-
}
|
|
845
|
-
const rect = element.getBoundingClientRect();
|
|
846
|
-
const isVisible = this.isElementVisible(rect);
|
|
847
|
-
if (isVisible) {
|
|
848
|
-
if (!this.pendingNotifications.has(notificationId)) {
|
|
849
|
-
this.pendingNotifications.set(notificationId, Date.now());
|
|
850
|
-
}
|
|
851
|
-
} else {
|
|
852
|
-
this.pendingNotifications.delete(notificationId);
|
|
853
|
-
}
|
|
854
|
-
});
|
|
855
|
-
this.processVisibleNotifications();
|
|
856
|
-
}
|
|
857
|
-
isElementVisible(rect) {
|
|
858
|
-
const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
859
|
-
const viewportWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
860
|
-
const verticalInView = rect.top < viewportHeight && rect.bottom > 0;
|
|
861
|
-
const horizontalInView = rect.left < viewportWidth && rect.right > 0;
|
|
862
|
-
if (!verticalInView || !horizontalInView) {
|
|
863
|
-
return false;
|
|
864
|
-
}
|
|
865
|
-
const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);
|
|
866
|
-
const visibleWidth = Math.min(rect.right, viewportWidth) - Math.max(rect.left, 0);
|
|
867
|
-
const visibleArea = visibleHeight * visibleWidth;
|
|
868
|
-
const totalArea = rect.height * rect.width;
|
|
869
|
-
return totalArea > 0 && visibleArea / totalArea >= this.options.intersectionThreshold;
|
|
870
|
-
}
|
|
871
|
-
handleIntersection(entries) {
|
|
872
|
-
const now = Date.now();
|
|
873
|
-
entries.forEach((entry) => {
|
|
874
|
-
const notificationId = this.elementToNotificationMap.get(entry.target);
|
|
875
|
-
if (!notificationId || this.seenNotifications.has(notificationId)) {
|
|
876
|
-
return;
|
|
877
|
-
}
|
|
878
|
-
if (entry.isIntersecting) {
|
|
879
|
-
this.pendingNotifications.set(notificationId, now);
|
|
880
|
-
} else {
|
|
881
|
-
this.pendingNotifications.delete(notificationId);
|
|
882
|
-
}
|
|
883
|
-
});
|
|
884
|
-
this.processVisibleNotifications();
|
|
885
|
-
}
|
|
886
|
-
processVisibleNotifications() {
|
|
887
|
-
const now = Date.now();
|
|
888
|
-
const notificationsToMark = [];
|
|
889
|
-
this.pendingNotifications.forEach((startTime, notificationId) => {
|
|
890
|
-
if (now - startTime >= this.options.visibilityDuration) {
|
|
891
|
-
notificationsToMark.push(notificationId);
|
|
892
|
-
this.seenNotifications.add(notificationId);
|
|
893
|
-
}
|
|
894
|
-
});
|
|
895
|
-
notificationsToMark.forEach((id) => {
|
|
896
|
-
this.pendingNotifications.delete(id);
|
|
897
|
-
});
|
|
898
|
-
if (notificationsToMark.length > 0) {
|
|
899
|
-
this.addToBatch(notificationsToMark);
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
addToBatch(notificationIds) {
|
|
903
|
-
notificationIds.forEach((id) => {
|
|
904
|
-
this.pendingBatch.add(id);
|
|
905
|
-
});
|
|
906
|
-
this.scheduleBatchProcessing();
|
|
907
|
-
}
|
|
908
|
-
scheduleBatchProcessing() {
|
|
909
|
-
if (this.batchTimer !== null) {
|
|
910
|
-
return;
|
|
911
|
-
}
|
|
912
|
-
this.batchTimer = window.setTimeout(() => {
|
|
913
|
-
this.processBatch();
|
|
914
|
-
}, this.options.batchDelay);
|
|
915
|
-
}
|
|
916
|
-
processBatch() {
|
|
917
|
-
return __async(this, null, function* () {
|
|
918
|
-
this.batchTimer = null;
|
|
919
|
-
const notificationsToSend = Array.from(this.pendingBatch);
|
|
920
|
-
this.pendingBatch.clear();
|
|
921
|
-
if (notificationsToSend.length === 0) {
|
|
922
|
-
return;
|
|
923
|
-
}
|
|
924
|
-
const chunks = this.chunkArray(notificationsToSend, this.options.maxBatchSize);
|
|
925
|
-
try {
|
|
926
|
-
yield Promise.all(chunks.map((chunk) => this.inboxService.markAsSeen({ notificationIds: chunk })));
|
|
927
|
-
} catch (error) {
|
|
928
|
-
notificationsToSend.forEach((id) => {
|
|
929
|
-
this.seenNotifications.delete(id);
|
|
930
|
-
});
|
|
931
|
-
console.error("Failed to mark notifications as seen:", error);
|
|
932
|
-
}
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
chunkArray(array, size) {
|
|
936
|
-
const chunks = [];
|
|
937
|
-
for (let i = 0; i < array.length; i += size) {
|
|
938
|
-
chunks.push(array.slice(i, i + size));
|
|
939
|
-
}
|
|
940
|
-
return chunks;
|
|
941
|
-
}
|
|
942
|
-
observe(element, notificationId) {
|
|
943
|
-
if (!this.observer || this.seenNotifications.has(notificationId)) {
|
|
944
|
-
return;
|
|
945
|
-
}
|
|
946
|
-
this.elementToNotificationMap.set(element, notificationId);
|
|
947
|
-
this.observedElements.add(element);
|
|
948
|
-
this.observer.observe(element);
|
|
949
|
-
}
|
|
950
|
-
unobserve(element) {
|
|
951
|
-
if (!this.observer) {
|
|
952
|
-
return;
|
|
953
|
-
}
|
|
954
|
-
const notificationId = this.elementToNotificationMap.get(element);
|
|
955
|
-
if (notificationId) {
|
|
956
|
-
this.pendingNotifications.delete(notificationId);
|
|
957
|
-
this.pendingBatch.delete(notificationId);
|
|
958
|
-
this.elementToNotificationMap.delete(element);
|
|
959
|
-
this.observedElements.delete(element);
|
|
960
|
-
}
|
|
961
|
-
this.observer.unobserve(element);
|
|
962
|
-
}
|
|
963
|
-
destroy() {
|
|
964
|
-
if (this.observer) {
|
|
965
|
-
this.observer.disconnect();
|
|
966
|
-
this.observer = null;
|
|
967
|
-
}
|
|
968
|
-
if (this.batchTimer !== null) {
|
|
969
|
-
window.clearTimeout(this.batchTimer);
|
|
970
|
-
this.batchTimer = null;
|
|
971
|
-
}
|
|
972
|
-
if (this.visibilityTimer !== null) {
|
|
973
|
-
window.clearInterval(this.visibilityTimer);
|
|
974
|
-
this.visibilityTimer = null;
|
|
956
|
+
// src/ui/helpers/browser.ts
|
|
957
|
+
function requestLock(id, cb) {
|
|
958
|
+
let isFulfilled = false;
|
|
959
|
+
let promiseResolve;
|
|
960
|
+
const promise = new Promise((resolve) => {
|
|
961
|
+
promiseResolve = resolve;
|
|
962
|
+
});
|
|
963
|
+
navigator.locks.request(id, () => {
|
|
964
|
+
if (!isFulfilled) {
|
|
965
|
+
cb(id);
|
|
975
966
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
967
|
+
return promise;
|
|
968
|
+
});
|
|
969
|
+
return () => {
|
|
970
|
+
isFulfilled = true;
|
|
971
|
+
promiseResolve();
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
var useBrowserTabsChannel = ({
|
|
975
|
+
channelName,
|
|
976
|
+
onMessage
|
|
977
|
+
}) => {
|
|
978
|
+
const [tabsChannel] = createSignal(new BroadcastChannel(channelName));
|
|
979
|
+
const postMessage = (args) => {
|
|
980
|
+
const channel = tabsChannel();
|
|
981
|
+
channel.postMessage(args);
|
|
982
|
+
};
|
|
983
|
+
onMount(() => {
|
|
984
|
+
const listener = (event) => {
|
|
985
|
+
onMessage(event.data);
|
|
986
|
+
};
|
|
987
|
+
const channel = tabsChannel();
|
|
988
|
+
channel.addEventListener("message", listener);
|
|
989
|
+
onCleanup(() => {
|
|
990
|
+
channel.removeEventListener("message", listener);
|
|
989
991
|
});
|
|
990
|
-
}
|
|
992
|
+
});
|
|
993
|
+
return { postMessage };
|
|
991
994
|
};
|
|
992
995
|
|
|
993
|
-
// src/ui/helpers/
|
|
994
|
-
|
|
996
|
+
// src/ui/helpers/useWebSocketEvent.ts
|
|
997
|
+
var useWebSocketEvent = ({
|
|
998
|
+
event: webSocketEvent,
|
|
999
|
+
eventHandler: onMessage
|
|
1000
|
+
}) => {
|
|
995
1001
|
const novu = useNovu();
|
|
996
|
-
|
|
1002
|
+
const channelName = `nv_ws_connection:a=${novu.applicationIdentifier}:s=${novu.subscriberId}:e=${webSocketEvent}`;
|
|
1003
|
+
const { postMessage } = useBrowserTabsChannel({ channelName, onMessage });
|
|
1004
|
+
const updateReadCount = (data) => {
|
|
1005
|
+
onMessage(data);
|
|
1006
|
+
postMessage(data);
|
|
1007
|
+
};
|
|
997
1008
|
onMount(() => {
|
|
998
|
-
|
|
1009
|
+
let cleanup;
|
|
1010
|
+
const resolveLock = requestLock(channelName, () => {
|
|
1011
|
+
cleanup = novu.on(webSocketEvent, updateReadCount);
|
|
1012
|
+
});
|
|
999
1013
|
onCleanup(() => {
|
|
1000
|
-
if (
|
|
1001
|
-
|
|
1002
|
-
tracker = null;
|
|
1014
|
+
if (cleanup) {
|
|
1015
|
+
cleanup();
|
|
1003
1016
|
}
|
|
1017
|
+
resolveLock();
|
|
1004
1018
|
});
|
|
1005
1019
|
});
|
|
1006
|
-
|
|
1007
|
-
if (tracker) {
|
|
1008
|
-
tracker.observe(element, notificationId);
|
|
1009
|
-
}
|
|
1010
|
-
};
|
|
1011
|
-
const unobserveNotification = (element) => {
|
|
1012
|
-
if (tracker) {
|
|
1013
|
-
tracker.unobserve(element);
|
|
1014
|
-
}
|
|
1015
|
-
};
|
|
1016
|
-
return {
|
|
1017
|
-
observeNotification,
|
|
1018
|
-
unobserveNotification
|
|
1019
|
-
};
|
|
1020
|
-
}
|
|
1020
|
+
};
|
|
1021
1021
|
|
|
1022
1022
|
// src/ui/context/AppearanceContext.tsx
|
|
1023
1023
|
var AppearanceContext = createContext(void 0);
|
|
@@ -1460,38 +1460,12 @@ var CountProvider = (props) => {
|
|
|
1460
1460
|
return;
|
|
1461
1461
|
}
|
|
1462
1462
|
const currentTabs = tabs();
|
|
1463
|
-
function checkNotificationDataAgainstTabData(notificationData, tabFilterData) {
|
|
1464
|
-
if (!tabFilterData || Object.keys(tabFilterData).length === 0) {
|
|
1465
|
-
return true;
|
|
1466
|
-
}
|
|
1467
|
-
if (!notificationData) {
|
|
1468
|
-
return false;
|
|
1469
|
-
}
|
|
1470
|
-
return Object.entries(tabFilterData).every(([key, filterValue]) => {
|
|
1471
|
-
const notifValue = notificationData[key];
|
|
1472
|
-
if (notifValue === void 0 && filterValue !== void 0) {
|
|
1473
|
-
return false;
|
|
1474
|
-
}
|
|
1475
|
-
if (Array.isArray(filterValue)) {
|
|
1476
|
-
if (Array.isArray(notifValue)) {
|
|
1477
|
-
if (filterValue.length !== notifValue.length) return false;
|
|
1478
|
-
const sortedFilterValue = [...filterValue].sort();
|
|
1479
|
-
const sortedNotifValue = [...notifValue].sort();
|
|
1480
|
-
return sortedFilterValue.every((val, index) => val === sortedNotifValue[index]);
|
|
1481
|
-
} else {
|
|
1482
|
-
return filterValue.includes(notifValue);
|
|
1483
|
-
}
|
|
1484
|
-
} else {
|
|
1485
|
-
return notifValue === filterValue;
|
|
1486
|
-
}
|
|
1487
|
-
});
|
|
1488
|
-
}
|
|
1489
1463
|
if (currentTabs.length > 0) {
|
|
1490
1464
|
for (const tab of currentTabs) {
|
|
1491
1465
|
const tabTags = getTagsFromTab(tab);
|
|
1492
1466
|
const tabDataFilterCriteria = (_a = tab.filter) == null ? void 0 : _a.data;
|
|
1493
|
-
const matchesTagFilter =
|
|
1494
|
-
const matchesDataFilterCriteria =
|
|
1467
|
+
const matchesTagFilter = checkNotificationTagFilter(notification.tags, tabTags);
|
|
1468
|
+
const matchesDataFilterCriteria = checkNotificationDataFilter(notification.data, tabDataFilterCriteria);
|
|
1495
1469
|
if (matchesTagFilter && matchesDataFilterCriteria) {
|
|
1496
1470
|
updateNewNotificationCountsOrCache(notification, tabTags, tabDataFilterCriteria);
|
|
1497
1471
|
}
|
|
@@ -1665,32 +1639,32 @@ var ExternalElementRenderer = (props) => {
|
|
|
1665
1639
|
return _el$;
|
|
1666
1640
|
})();
|
|
1667
1641
|
};
|
|
1668
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1669
|
-
var
|
|
1642
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="M10.0001 10.879L13.7126 7.1665L14.7731 8.227L10.0001 13L5.22705 8.227L6.28755 7.1665L10.0001 10.879Z"fill=currentColor>`);
|
|
1643
|
+
var ArrowDown = (props) => {
|
|
1670
1644
|
return (() => {
|
|
1671
1645
|
var _el$ = _tmpl$2();
|
|
1672
1646
|
spread(_el$, props, true, true);
|
|
1673
1647
|
return _el$;
|
|
1674
1648
|
})();
|
|
1675
1649
|
};
|
|
1676
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<svg
|
|
1677
|
-
var
|
|
1650
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 20 20"><path fill=currentColor d="M5.833 8.333L10 12.5l4.166-4.167H5.833z">`);
|
|
1651
|
+
var ArrowDropDown = (props) => {
|
|
1678
1652
|
return (() => {
|
|
1679
1653
|
var _el$ = _tmpl$3();
|
|
1680
1654
|
spread(_el$, props, true, true);
|
|
1681
1655
|
return _el$;
|
|
1682
1656
|
})();
|
|
1683
1657
|
};
|
|
1684
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="
|
|
1685
|
-
var
|
|
1658
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.20425 9.99907L12.9168 13.7116L11.8563 14.7721L7.08325 9.99907L11.8563 5.22607L12.9168 6.28657L9.20425 9.99907Z"fill=currentColor>`);
|
|
1659
|
+
var ArrowLeft = (props) => {
|
|
1686
1660
|
return (() => {
|
|
1687
1661
|
var _el$ = _tmpl$4();
|
|
1688
1662
|
spread(_el$, props, true, true);
|
|
1689
1663
|
return _el$;
|
|
1690
1664
|
})();
|
|
1691
1665
|
};
|
|
1692
|
-
var _tmpl$5 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="M10.
|
|
1693
|
-
var
|
|
1666
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="M10.7957 10.0009L7.08325 6.2884L8.14375 5.2279L12.9168 10.0009L8.14375 14.7739L7.08325 13.7134L10.7957 10.0009Z"fill=currentColor>`);
|
|
1667
|
+
var ArrowRight = (props) => {
|
|
1694
1668
|
return (() => {
|
|
1695
1669
|
var _el$ = _tmpl$5();
|
|
1696
1670
|
spread(_el$, props, true, true);
|
|
@@ -1729,88 +1703,88 @@ var Clock = (props) => {
|
|
|
1729
1703
|
return _el$;
|
|
1730
1704
|
})();
|
|
1731
1705
|
};
|
|
1732
|
-
var _tmpl$10 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1733
|
-
var
|
|
1706
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<svg viewBox="0 0 20 20"fill=none xmlns=http://www.w3.org/2000/svg><path d="M10 1.75L17.125 5.875V14.125L10 18.25L2.875 14.125V5.875L10 1.75ZM10 3.48325L4.375 6.73975V13.2603L10 16.5167L15.625 13.2603V6.73975L10 3.48325ZM10 13C9.20435 13 8.44129 12.6839 7.87868 12.1213C7.31607 11.5587 7 10.7956 7 10C7 9.20435 7.31607 8.44129 7.87868 7.87868C8.44129 7.31607 9.20435 7 10 7C10.7956 7 11.5587 7.31607 12.1213 7.87868C12.6839 8.44129 13 9.20435 13 10C13 10.7956 12.6839 11.5587 12.1213 12.1213C11.5587 12.6839 10.7956 13 10 13ZM10 11.5C10.3978 11.5 10.7794 11.342 11.0607 11.0607C11.342 10.7794 11.5 10.3978 11.5 10C11.5 9.60218 11.342 9.22064 11.0607 8.93934C10.7794 8.65804 10.3978 8.5 10 8.5C9.60218 8.5 9.22064 8.65804 8.93934 8.93934C8.65804 9.22064 8.5 9.60218 8.5 10C8.5 10.3978 8.65804 10.7794 8.93934 11.0607C9.22064 11.342 9.60218 11.5 10 11.5Z"fill=currentColor>`);
|
|
1707
|
+
var Cogs = (props) => {
|
|
1734
1708
|
return (() => {
|
|
1735
1709
|
var _el$ = _tmpl$10();
|
|
1736
1710
|
spread(_el$, props, true, true);
|
|
1737
1711
|
return _el$;
|
|
1738
1712
|
})();
|
|
1739
1713
|
};
|
|
1740
|
-
var _tmpl$11 = /* @__PURE__ */ template(`<svg
|
|
1741
|
-
var
|
|
1714
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 20 20"><path fill=currentColor d="M5 8.333c-.917 0-1.667.75-1.667 1.667s.75 1.667 1.667 1.667c.916 0 1.666-.75 1.666-1.667S5.916 8.333 5 8.333zm10 0c-.917 0-1.667.75-1.667 1.667s.75 1.667 1.667 1.667c.916 0 1.666-.75 1.666-1.667S15.916 8.333 15 8.333zm-5 0c-.917 0-1.667.75-1.667 1.667s.75 1.667 1.667 1.667c.916 0 1.666-.75 1.666-1.667S10.916 8.333 10 8.333z">`);
|
|
1715
|
+
var Dots = (props) => {
|
|
1742
1716
|
return (() => {
|
|
1743
1717
|
var _el$ = _tmpl$11();
|
|
1744
1718
|
spread(_el$, props, true, true);
|
|
1745
1719
|
return _el$;
|
|
1746
1720
|
})();
|
|
1747
1721
|
};
|
|
1748
|
-
var _tmpl$12 = /* @__PURE__ */ template(`<svg viewBox="0 0 10
|
|
1749
|
-
var
|
|
1722
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M4.20703 1.875H2.8125H2.10547H1.875V2.04688V2.8125V3.60156V5.33984L0.00390625 3.95508C0.0351562 3.60156 0.216797 3.27344 0.505859 3.06055L0.9375 2.74023V1.875C0.9375 1.35742 1.35742 0.9375 1.875 0.9375H3.37109L4.3457 0.216797C4.53516 0.0761719 4.76367 0 5 0C5.23633 0 5.46484 0.0761719 5.6543 0.214844L6.62891 0.9375H8.125C8.64258 0.9375 9.0625 1.35742 9.0625 1.875V2.74023L9.49414 3.06055C9.7832 3.27344 9.96484 3.60156 9.99609 3.95508L8.125 5.33984V3.60156V2.8125V2.04688V1.875H7.89453H7.1875H5.79297H4.20508H4.20703ZM0 8.75V4.72852L4.25 7.87695C4.4668 8.03711 4.73047 8.125 5 8.125C5.26953 8.125 5.5332 8.03906 5.75 7.87695L10 4.72852V8.75C10 9.43945 9.43945 10 8.75 10H1.25C0.560547 10 0 9.43945 0 8.75ZM3.4375 3.125H6.5625C6.73438 3.125 6.875 3.26562 6.875 3.4375C6.875 3.60938 6.73438 3.75 6.5625 3.75H3.4375C3.26562 3.75 3.125 3.60938 3.125 3.4375C3.125 3.26562 3.26562 3.125 3.4375 3.125ZM3.4375 4.375H6.5625C6.73438 4.375 6.875 4.51562 6.875 4.6875C6.875 4.85938 6.73438 5 6.5625 5H3.4375C3.26562 5 3.125 4.85938 3.125 4.6875C3.125 4.51562 3.26562 4.375 3.4375 4.375Z"fill=currentColor>`);
|
|
1723
|
+
var Email = (props) => {
|
|
1750
1724
|
return (() => {
|
|
1751
1725
|
var _el$ = _tmpl$12();
|
|
1752
1726
|
spread(_el$, props, true, true);
|
|
1753
1727
|
return _el$;
|
|
1754
1728
|
})();
|
|
1755
1729
|
};
|
|
1756
|
-
var _tmpl$13 = /* @__PURE__ */ template(`<svg viewBox="0 0 10
|
|
1757
|
-
var
|
|
1730
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 12"fill=none xmlns=http://www.w3.org/2000/svg><path d="M4.99962 0.856934C4.64404 0.856934 4.35676 1.14421 4.35676 1.49979V1.88551C2.89024 2.18283 1.78533 3.48059 1.78533 5.03551V5.41318C1.78533 6.35738 1.43779 7.26943 0.810999 7.97658L0.662339 8.14332C0.493589 8.33216 0.45341 8.60336 0.555865 8.83439C0.658321 9.06542 0.889348 9.21408 1.14247 9.21408H8.85676C9.10988 9.21408 9.3389 9.06542 9.44337 8.83439C9.54783 8.60336 9.50564 8.33216 9.33689 8.14332L9.18823 7.97658C8.56145 7.26943 8.2139 6.35939 8.2139 5.41318V5.03551C8.2139 3.48059 7.10899 2.18283 5.64247 1.88551V1.49979C5.64247 1.14421 5.3552 0.856934 4.99962 0.856934ZM5.90966 10.767C6.15073 10.5259 6.28533 10.1985 6.28533 9.85693H4.99962H3.7139C3.7139 10.1985 3.8485 10.5259 4.08957 10.767C4.33064 11.008 4.6581 11.1426 4.99962 11.1426C5.34113 11.1426 5.66859 11.008 5.90966 10.767Z"fill=currentColor>`);
|
|
1731
|
+
var InApp = (props) => {
|
|
1758
1732
|
return (() => {
|
|
1759
1733
|
var _el$ = _tmpl$13();
|
|
1760
1734
|
spread(_el$, props, true, true);
|
|
1761
1735
|
return _el$;
|
|
1762
1736
|
})();
|
|
1763
1737
|
};
|
|
1764
|
-
var _tmpl$14 = /* @__PURE__ */ template(`<svg viewBox="0 0
|
|
1765
|
-
var
|
|
1738
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.29671 10C1.78742 10 1.39807 9.85716 1.12864 9.57149C0.862497 9.28581 0.729426 8.86623 0.729426 8.31274V2.64594H1.69543V8.29668C1.69543 8.52163 1.74964 8.69487 1.85806 8.81624C1.96978 8.93408 2.12914 8.99301 2.33614 8.99301H7.66389C7.86764 8.99301 8.02366 8.93408 8.13209 8.81624C8.24385 8.69487 8.29965 8.52163 8.29965 8.29668V2.64594H9.27059V8.31274C9.27059 8.8627 9.13591 9.28048 8.86648 9.56608C8.59705 9.85536 8.20931 10 7.70333 10H2.29671ZM3.41056 5.34543C3.29556 5.34543 3.20028 5.30438 3.1247 5.22226C3.04913 5.14015 3.01134 5.03304 3.01134 4.90089V4.72949C3.01134 4.59737 3.04749 4.49204 3.11977 4.41348C3.19535 4.33492 3.29227 4.29564 3.41056 4.29564H6.5944C6.71271 4.29564 6.80795 4.33492 6.88026 4.41348C6.95582 4.49204 6.9936 4.59737 6.9936 4.72949V4.90089C6.9936 5.03304 6.95582 5.14015 6.88026 5.22226C6.8047 5.30438 6.70939 5.34543 6.5944 5.34543H3.41056ZM1.05964 3.16014C0.724502 3.16014 0.463285 3.05301 0.276004 2.83877C0.0920037 2.62095 0 2.33172 0 1.97107V1.18907C0 0.824846 0.0952841 0.535614 0.28586 0.321373C0.476428 0.107124 0.734358 0 1.05964 0H8.94536C9.27715 0 9.53511 0.107124 9.71911 0.321373C9.90642 0.535614 10 0.824846 10 1.18907V1.97107C10 2.33172 9.90642 2.62095 9.71911 2.83877C9.53511 3.05301 9.27715 3.16014 8.94536 3.16014H1.05964ZM1.24693 2.19067H8.75805C8.87304 2.19067 8.95516 2.16211 9.00448 2.10497C9.05372 2.04427 9.07838 1.95322 9.07838 1.83181V1.32833C9.07838 1.20335 9.05372 1.1123 9.00448 1.05517C8.95516 0.99803 8.87304 0.969462 8.75805 0.969462H1.24693C1.13193 0.969462 1.04814 0.99803 0.995567 1.05517C0.946281 1.1123 0.921638 1.20335 0.921638 1.32833V1.83181C0.921638 1.95322 0.946281 2.04427 0.995567 2.10497C1.04814 2.16211 1.13193 2.19067 1.24693 2.19067Z"fill=currentColor>`);
|
|
1739
|
+
var MarkAsArchived = (props) => {
|
|
1766
1740
|
return (() => {
|
|
1767
1741
|
var _el$ = _tmpl$14();
|
|
1768
1742
|
spread(_el$, props, true, true);
|
|
1769
1743
|
return _el$;
|
|
1770
1744
|
})();
|
|
1771
1745
|
};
|
|
1772
|
-
var _tmpl$15 = /* @__PURE__ */ template(`<svg viewBox="0 0
|
|
1773
|
-
var
|
|
1746
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<svg viewBox="0 0 11 11"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.17256 10.999C1.69081 10.999 1.3225 10.8562 1.06763 10.5705C0.815875 10.2848 0.689997 9.86525 0.689997 9.31177V3.64497H1.60378V9.2957C1.60378 9.52066 1.65506 9.6939 1.75763 9.81526C1.8633 9.93311 2.01405 9.99203 2.20986 9.99203H7.24963C7.44236 9.99203 7.58995 9.93311 7.69252 9.81526C7.79823 9.6939 7.85102 9.52066 7.85102 9.2957V3.64497H8.76947V9.31177C8.76947 9.86173 8.64208 10.2795 8.38721 10.5651C8.13235 10.8544 7.76556 10.999 7.28693 10.999H2.17256ZM1.00236 4.15916C0.68534 4.15916 0.438242 4.05204 0.261085 3.83779C0.0870305 3.61997 0 3.33074 0 2.97009V2.18809C0 1.82387 0.0901336 1.53464 0.270408 1.3204C0.450675 1.10615 0.694663 0.999023 1.00236 0.999023H8.46182C8.77568 0.999023 9.0197 1.10615 9.19375 1.3204C9.37094 1.53464 9.45946 1.82387 9.45946 2.18809V2.97009C9.45946 3.33074 9.37094 3.61997 9.19375 3.83779C9.0197 4.05204 8.77568 4.15916 8.46182 4.15916H1.00236ZM1.17953 3.1897H8.28464C8.39342 3.1897 8.4711 3.16113 8.51775 3.10399C8.56433 3.04329 8.58765 2.95224 8.58765 2.83083V2.32735C8.58765 2.20238 8.56433 2.11132 8.51775 2.05419C8.4711 1.99705 7.51461 1.96849 7.40583 1.96849H1.17953C1.07074 1.96849 0.991485 1.99705 0.941753 2.05419C0.895131 2.11132 0.87182 2.20238 0.87182 2.32735V2.83083C0.87182 2.95224 0.895131 3.04329 0.941753 3.10399C0.991485 3.16113 1.07074 3.1897 1.17953 3.1897Z"fill=currentColor></path><path d="M9.67298 0.553711C9.84703 0.556646 10.0146 0.614475 10.1535 0.716797L10.2208 0.771484L10.2814 0.833008C10.3958 0.960612 10.4679 1.11928 10.4913 1.28711L10.4992 1.37109L10.4982 1.45605C10.4872 1.64689 10.4124 1.8301 10.2833 1.97559L10.2843 1.97656L7.55482 5.15039L7.55384 5.14941C7.40234 5.3265 7.18382 5.43557 6.94642 5.44336L6.93861 5.44434H6.92005V5.44336C6.69203 5.44397 6.47619 5.35201 6.31947 5.19141L6.31849 5.18945L5.29505 4.13184C5.08531 3.91498 5.00658 3.60427 5.08118 3.31641L5.11634 3.21094C5.2129 2.97124 5.41476 2.78187 5.67396 2.70996L5.78626 2.68652C6.01138 2.65637 6.23763 2.72008 6.41419 2.85938L6.49818 2.93555L6.8849 3.33496L9.0138 0.859375V0.860352C9.15512 0.688807 9.35911 0.576792 9.58509 0.556641L9.67298 0.553711Z"fill=currentColor stroke=white>`);
|
|
1747
|
+
var MarkAsArchivedRead = (props) => {
|
|
1774
1748
|
return (() => {
|
|
1775
1749
|
var _el$ = _tmpl$15();
|
|
1776
1750
|
spread(_el$, props, true, true);
|
|
1777
1751
|
return _el$;
|
|
1778
1752
|
})();
|
|
1779
1753
|
};
|
|
1780
|
-
var _tmpl$16 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="
|
|
1781
|
-
var
|
|
1754
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><g clip-path=url(#clip0_3445_1172)><path d="M9 9.99902H1C0.867383 9.99902 0.7402 9.94635 0.64645 9.85257C0.552667 9.75882 0.5 9.63164 0.5 9.49902V0.499023C0.5 0.366407 0.552669 0.239223 0.64645 0.145473C0.7402 0.0516901 0.867383 -0.000976562 1 -0.000976562H6.25C6.42865 -0.000976562 6.59368 0.0943401 6.68301 0.249023C6.77233 0.403707 6.77233 0.59434 6.68301 0.749023C6.59368 0.903707 6.42865 0.999023 6.25 0.999023H1.5V8.99902H8.5V4.49902C8.5 4.32037 8.59532 4.15534 8.75 4.06602C8.90468 3.97669 9.09532 3.97669 9.25 4.06602C9.40468 4.15534 9.5 4.32037 9.5 4.49902V9.49902C9.5 9.63164 9.44733 9.75882 9.35355 9.85257C9.2598 9.94636 9.13262 9.99902 9 9.99902Z"fill=currentColor></path><path d="M7.5 8.24902H2.5C2.32135 8.24902 2.15632 8.15371 2.06699 7.99902C1.97767 7.84434 1.97767 7.65371 2.06699 7.49902C2.15632 7.34434 2.32135 7.24902 2.5 7.24902H7.5C7.67865 7.24902 7.84368 7.34434 7.93301 7.49902C8.02233 7.65371 8.02233 7.84434 7.93301 7.99902C7.84368 8.15371 7.67865 8.24902 7.5 8.24902Z"fill=currentColor></path><path d="M4.75 6.49901C4.61709 6.49979 4.48936 6.44761 4.39498 6.35403L2.89498 4.85403C2.76816 4.72717 2.71865 4.54235 2.76507 4.36907C2.81149 4.19583 2.94681 4.06051 3.12005 4.01409C3.29332 3.96767 3.47816 4.01718 3.60501 4.14401L4.73001 5.269L8.37501 1.16901C8.46056 1.06279 8.58578 0.996155 8.72169 0.984497C8.8576 0.972843 8.99233 1.01718 9.09474 1.10728C9.19712 1.19738 9.25825 1.32541 9.26398 1.46167C9.26968 1.59796 9.21948 1.73065 9.12502 1.82902L5.12502 6.32902C5.03371 6.43306 4.90337 6.49461 4.76502 6.49901L4.75 6.49901Z"fill=currentColor></path></g><defs><clipPath id=clip0_3445_1172><rect width=10 height=10 fill=white transform="translate(0 -0.000976562)">`);
|
|
1755
|
+
var MarkAsRead = (props) => {
|
|
1782
1756
|
return (() => {
|
|
1783
1757
|
var _el$ = _tmpl$16();
|
|
1784
1758
|
spread(_el$, props, true, true);
|
|
1785
1759
|
return _el$;
|
|
1786
1760
|
})();
|
|
1787
1761
|
};
|
|
1788
|
-
var _tmpl$17 = /* @__PURE__ */ template(`<svg viewBox="0 0
|
|
1789
|
-
var
|
|
1762
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M3.15789 2.99902V4.99902L0 2.49902L3.15789 -0.000976562V1.99902H5.78947C6.90618 1.99902 7.97714 2.42045 8.76677 3.1706C9.55639 3.92074 10 4.93816 10 5.99902C10 7.05989 9.55639 8.0773 8.76677 8.82745C7.97714 9.5776 6.90618 9.99902 5.78947 9.99902H1.05263V8.99902H5.78947C6.627 8.99902 7.43022 8.68295 8.02244 8.12034C8.61466 7.55773 8.94737 6.79467 8.94737 5.99902C8.94737 5.20337 8.61466 4.44031 8.02244 3.8777C7.43022 3.31509 6.627 2.99902 5.78947 2.99902H3.15789Z"fill=currentColor>`);
|
|
1763
|
+
var MarkAsUnarchived = (props) => {
|
|
1790
1764
|
return (() => {
|
|
1791
1765
|
var _el$ = _tmpl$17();
|
|
1792
1766
|
spread(_el$, props, true, true);
|
|
1793
1767
|
return _el$;
|
|
1794
1768
|
})();
|
|
1795
1769
|
};
|
|
1796
|
-
var _tmpl$18 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg
|
|
1797
|
-
var
|
|
1770
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<svg viewBox="0 0 11 11"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6.8 1.49902H1.5C0.947715 1.49902 0.5 1.94674 0.5 2.49902V9.49902C0.5 10.0513 0.947715 10.499 1.5 10.499H8.5C9.05228 10.499 9.5 10.0513 9.5 9.49902V4.19902"stroke=currentColor stroke-miterlimit=1 stroke-linecap=round></path><circle cx=9.25 cy=1.74902 r=1.25 fill=currentColor>`);
|
|
1771
|
+
var MarkAsUnread = (props) => {
|
|
1798
1772
|
return (() => {
|
|
1799
1773
|
var _el$ = _tmpl$18();
|
|
1800
1774
|
spread(_el$, props, true, true);
|
|
1801
1775
|
return _el$;
|
|
1802
1776
|
})();
|
|
1803
1777
|
};
|
|
1804
|
-
var _tmpl$19 = /* @__PURE__ */ template(`<svg
|
|
1805
|
-
var
|
|
1778
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 13 12"><path fill=currentColor d="M9.787.98A5.972 5.972 0 006.5 0c-.668 0-1.31.11-1.911.31L9.187 4.94c.221.222.6.065.6-.248V.98z"></path><path fill=currentColor d="M2.879 1.216A5.99 5.99 0 00.5 6c0 1.134.315 2.195.862 3.1V7.309c0-1.966 2.379-2.946 3.764-1.552l4.995 5.027A5.99 5.99 0 0012.5 6a5.972 5.972 0 00-.862-3.1v1.791c0 1.966-2.379 2.946-3.764 1.552L2.879 1.216z"></path><path fill=currentColor d="M8.411 11.69L3.813 7.06a.351.351 0 00-.6.248v3.711c.944.62 2.073.98 3.287.98.668 0 1.31-.11 1.911-.31z">`);
|
|
1779
|
+
var Novu2 = (props) => {
|
|
1806
1780
|
return (() => {
|
|
1807
1781
|
var _el$ = _tmpl$19();
|
|
1808
1782
|
spread(_el$, props, true, true);
|
|
1809
1783
|
return _el$;
|
|
1810
1784
|
})();
|
|
1811
1785
|
};
|
|
1812
|
-
var _tmpl$20 = /* @__PURE__ */ template(`<svg viewBox="0 0
|
|
1813
|
-
var
|
|
1786
|
+
var _tmpl$20 = /* @__PURE__ */ template(`<svg viewBox="0 0 10 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M4.12531 1.8999C3.94958 1.8999 3.80713 2.04235 3.80713 2.21808C3.80713 2.39382 3.94958 2.53627 4.12531 2.53627H6.0344C6.21013 2.53627 6.35258 2.39382 6.35258 2.21808C6.35258 2.04235 6.21013 1.8999 6.0344 1.8999H4.12531Z"fill=currentColor></path><path d="M4.12531 1.8999C3.94958 1.8999 3.80713 2.04235 3.80713 2.21808C3.80713 2.39382 3.94958 2.53627 4.12531 2.53627H6.0344C6.21013 2.53627 6.35258 2.39382 6.35258 2.21808C6.35258 2.04235 6.21013 1.8999 6.0344 1.8999H4.12531Z"stroke=currentColor></path><path d="M2.69329 1.46818H7.30693C7.75127 1.46818 8.11147 1.82839 8.11147 2.27273V13.7273C8.11147 14.1716 7.75127 14.5318 7.30693 14.5318H2.69329C2.24896 14.5318 1.88875 14.1716 1.88875 13.7273V2.27273C1.88875 1.82839 2.24896 1.46818 2.69329 1.46818ZM2.69329 0.85C1.90754 0.85 1.27057 1.48698 1.27057 2.27273V2.95695C1.17568 3.00972 1.11147 3.111 1.11147 3.22727V3.54545C1.11147 3.64155 1.15532 3.7274 1.22411 3.78409C1.15532 3.84078 1.11147 3.92663 1.11147 4.02273V4.65909C1.11147 4.75519 1.15532 4.84104 1.22411 4.89773C1.15532 4.95442 1.11147 5.04027 1.11147 5.13636V6.09091C1.11147 6.20718 1.17568 6.30846 1.27057 6.36123V13.7273C1.27057 14.513 1.90754 15.15 2.69329 15.15H7.30693C8.09268 15.15 8.72966 14.513 8.72966 13.7273V6.36123C8.82454 6.30846 8.88875 6.20718 8.88875 6.09091V4.81818C8.88875 4.70191 8.82454 4.60063 8.72966 4.54786V2.27273C8.72966 1.48698 8.09268 0.85 7.30693 0.85H2.69329Z"fill=currentColor stroke=currentColor stroke-width=0.3>`);
|
|
1787
|
+
var Push = (props) => {
|
|
1814
1788
|
return (() => {
|
|
1815
1789
|
var _el$ = _tmpl$20();
|
|
1816
1790
|
spread(_el$, props, true, true);
|
|
@@ -1926,6 +1900,21 @@ var ArrowUpRight = (props) => {
|
|
|
1926
1900
|
return _el$;
|
|
1927
1901
|
})();
|
|
1928
1902
|
};
|
|
1903
|
+
var Motion = new Proxy(Motion$1, {
|
|
1904
|
+
get: (_, tag) => (props) => {
|
|
1905
|
+
const {
|
|
1906
|
+
animations
|
|
1907
|
+
} = useAppearance();
|
|
1908
|
+
return createComponent(Motion$1, mergeProps(props, {
|
|
1909
|
+
tag,
|
|
1910
|
+
get transition() {
|
|
1911
|
+
return animations() ? props.transition : {
|
|
1912
|
+
duration: 0
|
|
1913
|
+
};
|
|
1914
|
+
}
|
|
1915
|
+
}));
|
|
1916
|
+
}
|
|
1917
|
+
});
|
|
1929
1918
|
var TooltipContext = createContext(void 0);
|
|
1930
1919
|
function TooltipRoot(props) {
|
|
1931
1920
|
var _a;
|
|
@@ -2011,21 +2000,6 @@ function useTooltip() {
|
|
|
2011
2000
|
}
|
|
2012
2001
|
return context;
|
|
2013
2002
|
}
|
|
2014
|
-
var Motion = new Proxy(Motion$1, {
|
|
2015
|
-
get: (_, tag) => (props) => {
|
|
2016
|
-
const {
|
|
2017
|
-
animations
|
|
2018
|
-
} = useAppearance();
|
|
2019
|
-
return createComponent(Motion$1, mergeProps(props, {
|
|
2020
|
-
tag,
|
|
2021
|
-
get transition() {
|
|
2022
|
-
return animations() ? props.transition : {
|
|
2023
|
-
duration: 0
|
|
2024
|
-
};
|
|
2025
|
-
}
|
|
2026
|
-
}));
|
|
2027
|
-
}
|
|
2028
|
-
});
|
|
2029
2003
|
|
|
2030
2004
|
// src/ui/components/primitives/Tooltip/TooltipContent.tsx
|
|
2031
2005
|
var tooltipContentVariants = () => "nt-bg-foreground nt-p-2 nt-shadow-tooltip nt-rounded-lg nt-text-background nt-text-xs";
|
|
@@ -3795,47 +3769,168 @@ var Header = (props) => {
|
|
|
3795
3769
|
return props.navigateToPreferences;
|
|
3796
3770
|
}
|
|
3797
3771
|
}), null);
|
|
3798
|
-
effect(() => className(_el$, style("inboxHeader", cn("nt-flex nt-bg-neutral-alpha-25 nt-shrink-0 nt-justify-between nt-items-center nt-w-full nt-pb-2 nt-pt-2.5 nt-px-4"))));
|
|
3799
|
-
return _el$;
|
|
3800
|
-
})();
|
|
3801
|
-
};
|
|
3802
|
-
var _tmpl$46 = /* @__PURE__ */ template(`<div>`);
|
|
3803
|
-
var
|
|
3804
|
-
|
|
3805
|
-
const
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3772
|
+
effect(() => className(_el$, style("inboxHeader", cn("nt-flex nt-bg-neutral-alpha-25 nt-shrink-0 nt-justify-between nt-items-center nt-w-full nt-pb-2 nt-pt-2.5 nt-px-4"))));
|
|
3773
|
+
return _el$;
|
|
3774
|
+
})();
|
|
3775
|
+
};
|
|
3776
|
+
var _tmpl$46 = /* @__PURE__ */ template(`<div>`);
|
|
3777
|
+
var _tmpl$213 = /* @__PURE__ */ template(`<div><div></div><div>`);
|
|
3778
|
+
var SkeletonText = (props) => {
|
|
3779
|
+
const style = useStyle();
|
|
3780
|
+
return (() => {
|
|
3781
|
+
var _el$ = _tmpl$46();
|
|
3782
|
+
effect(() => className(_el$, style(props.appearanceKey, cn("nt-w-full nt-h-3 nt-rounded nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent", props.class))));
|
|
3783
|
+
return _el$;
|
|
3784
|
+
})();
|
|
3785
|
+
};
|
|
3786
|
+
var SkeletonAvatar = (props) => {
|
|
3787
|
+
const style = useStyle();
|
|
3788
|
+
return (() => {
|
|
3789
|
+
var _el$2 = _tmpl$46();
|
|
3790
|
+
effect(() => className(_el$2, style(props.appearanceKey, cn("nt-size-8 nt-rounded-lg nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent", props.class))));
|
|
3791
|
+
return _el$2;
|
|
3792
|
+
})();
|
|
3793
|
+
};
|
|
3794
|
+
var SkeletonSwitch = (props) => {
|
|
3795
|
+
const style = useStyle();
|
|
3796
|
+
return (() => {
|
|
3797
|
+
var _el$3 = _tmpl$213(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
|
|
3798
|
+
effect((_p$) => {
|
|
3799
|
+
var _v$ = style(props.appearanceKey, cn("nt-relative nt-inline-flex nt-items-center", props.class)), _v$2 = style(props.appearanceKey, "nt-h-4 nt-w-7 nt-rounded-full nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent"), _v$3 = style(props.thumbAppearanceKey, "nt-absolute nt-top-0.5 nt-left-0.5 nt-size-3 nt-rounded-full nt-bg-background nt-shadow");
|
|
3800
|
+
_v$ !== _p$.e && className(_el$3, _p$.e = _v$);
|
|
3801
|
+
_v$2 !== _p$.t && className(_el$4, _p$.t = _v$2);
|
|
3802
|
+
_v$3 !== _p$.a && className(_el$5, _p$.a = _v$3);
|
|
3803
|
+
return _p$;
|
|
3804
|
+
}, {
|
|
3805
|
+
e: void 0,
|
|
3806
|
+
t: void 0,
|
|
3807
|
+
a: void 0
|
|
3808
|
+
});
|
|
3809
|
+
return _el$3;
|
|
3810
|
+
})();
|
|
3811
|
+
};
|
|
3812
|
+
|
|
3813
|
+
// src/ui/components/elements/Preferences/PreferencesListSkeleton.tsx
|
|
3814
|
+
var _tmpl$47 = /* @__PURE__ */ template(`<div>`);
|
|
3815
|
+
var channelIcons = [InApp, Email, Sms, Push, Chat];
|
|
3816
|
+
var PreferencesListSkeleton = (props) => {
|
|
3817
|
+
const style = useStyle();
|
|
3818
|
+
const {
|
|
3819
|
+
t
|
|
3820
|
+
} = useLocalization();
|
|
3821
|
+
return (() => {
|
|
3822
|
+
var _el$ = _tmpl$47();
|
|
3823
|
+
insert(_el$, createComponent(Motion.div, {
|
|
3824
|
+
get animate() {
|
|
3825
|
+
return {
|
|
3826
|
+
scale: props.loading ? 1 : 0.7
|
|
3827
|
+
};
|
|
3828
|
+
},
|
|
3829
|
+
transition: {
|
|
3830
|
+
duration: 0.6,
|
|
3831
|
+
easing: [0.39, 0.24, 0.3, 1],
|
|
3832
|
+
delay: 0.3
|
|
3833
|
+
},
|
|
3834
|
+
get ["class"]() {
|
|
3835
|
+
return style("preferencesList__skeleton", "nt-flex nt-relative nt-mx-auto nt-flex-col nt-w-full nt-mb-4");
|
|
3836
|
+
},
|
|
3837
|
+
get children() {
|
|
3838
|
+
return [memo(() => Array.from({
|
|
3839
|
+
length: 5
|
|
3840
|
+
}).map((_, i) => {
|
|
3841
|
+
const Icon = channelIcons[i];
|
|
3842
|
+
return createComponent(Motion.div, {
|
|
3843
|
+
get animate() {
|
|
3844
|
+
return {
|
|
3845
|
+
marginBottom: props.loading ? 0 : "16px",
|
|
3846
|
+
borderWidth: props.loading ? 0 : "1px",
|
|
3847
|
+
borderRadius: props.loading ? 0 : "var(--nv-radius-lg)"
|
|
3848
|
+
};
|
|
3849
|
+
},
|
|
3850
|
+
transition: {
|
|
3851
|
+
duration: 0.5,
|
|
3852
|
+
delay: 0.3,
|
|
3853
|
+
easing: "ease-in-out"
|
|
3854
|
+
},
|
|
3855
|
+
get ["class"]() {
|
|
3856
|
+
return style("preferencesList__skeletonContent", "nt-flex nt-border-neutral-alpha-50 nt-items-center nt-gap-3 nt-p-3 nt-bg-neutral-alpha-25");
|
|
3857
|
+
},
|
|
3858
|
+
get children() {
|
|
3859
|
+
return [createComponent(Icon, {
|
|
3860
|
+
get ["class"]() {
|
|
3861
|
+
return style("preferencesList__skeletonIcon", "nt-size-8 nt-p-2 nt-rounded-lg nt-bg-neutral-alpha-100");
|
|
3862
|
+
}
|
|
3863
|
+
}), (() => {
|
|
3864
|
+
var _el$3 = _tmpl$47();
|
|
3865
|
+
insert(_el$3, createComponent(SkeletonText, {
|
|
3866
|
+
appearanceKey: "notificationList__skeletonText",
|
|
3867
|
+
"class": "nt-h-2 nt-w-1/3 nt-bg-neutral-alpha-50 nt-rounded"
|
|
3868
|
+
}), null);
|
|
3869
|
+
insert(_el$3, createComponent(SkeletonText, {
|
|
3870
|
+
appearanceKey: "preferencesList__skeletonText",
|
|
3871
|
+
"class": "nt-h-2 nt-w-2/3 nt-bg-neutral-alpha-50 nt-rounded"
|
|
3872
|
+
}), null);
|
|
3873
|
+
effect(() => className(_el$3, style("preferencesList__skeletonItem", "nt-flex nt-flex-col nt-gap-2 nt-flex-1")));
|
|
3874
|
+
return _el$3;
|
|
3875
|
+
})(), createComponent(SkeletonSwitch, {
|
|
3876
|
+
appearanceKey: "preferencesList__skeletonSwitch",
|
|
3877
|
+
thumbAppearanceKey: "preferencesList__skeletonSwitchThumb"
|
|
3878
|
+
})];
|
|
3879
|
+
}
|
|
3880
|
+
});
|
|
3881
|
+
})), (() => {
|
|
3882
|
+
var _el$2 = _tmpl$47();
|
|
3883
|
+
effect(() => className(_el$2, style("notificationListEmptyNoticeOverlay", "nt-absolute nt-size-full nt-z-10 nt-inset-0 nt-bg-gradient-to-b nt-from-transparent nt-to-background")));
|
|
3884
|
+
return _el$2;
|
|
3885
|
+
})()];
|
|
3886
|
+
}
|
|
3887
|
+
}), null);
|
|
3888
|
+
insert(_el$, createComponent(Show, {
|
|
3889
|
+
get when() {
|
|
3890
|
+
return !props.loading;
|
|
3822
3891
|
},
|
|
3823
|
-
get
|
|
3824
|
-
return
|
|
3892
|
+
get children() {
|
|
3893
|
+
return createComponent(Motion.p, {
|
|
3894
|
+
initial: {
|
|
3895
|
+
opacity: 0,
|
|
3896
|
+
y: -4,
|
|
3897
|
+
filter: "blur(4px)"
|
|
3898
|
+
},
|
|
3899
|
+
get animate() {
|
|
3900
|
+
return {
|
|
3901
|
+
opacity: props.loading ? 0 : 1,
|
|
3902
|
+
y: 0,
|
|
3903
|
+
filter: "blur(0px)"
|
|
3904
|
+
};
|
|
3905
|
+
},
|
|
3906
|
+
transition: {
|
|
3907
|
+
duration: 0.7,
|
|
3908
|
+
easing: [0.39, 0.24, 0.3, 1],
|
|
3909
|
+
delay: 0.6
|
|
3910
|
+
},
|
|
3911
|
+
get ["class"]() {
|
|
3912
|
+
return style("preferencesListEmptyNotice"), "nt-text-center";
|
|
3913
|
+
},
|
|
3914
|
+
"data-localization": "preferences.emptyNotice",
|
|
3915
|
+
get children() {
|
|
3916
|
+
return t("preferences.emptyNotice");
|
|
3917
|
+
}
|
|
3918
|
+
});
|
|
3825
3919
|
}
|
|
3826
|
-
}
|
|
3920
|
+
}), null);
|
|
3921
|
+
effect(() => className(_el$, style("preferencesListEmptyNoticeContainer", "nt-flex nt-flex-col nt-items-center nt-h-fit nt-w-full nt-text-sm nt-text-foreground-alpha-400 nt-text-center")));
|
|
3827
3922
|
return _el$;
|
|
3828
|
-
})()
|
|
3923
|
+
})();
|
|
3829
3924
|
};
|
|
3830
|
-
var _tmpl$
|
|
3925
|
+
var _tmpl$48 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 14 14"><path fill=currentColor d="M2.8 8.575V5.162a2.362 2.362 0 1 1 4.725 0v3.675a1.313 1.313 0 1 0 2.625 0V5.335a1.575 1.575 0 1 1 1.05 0v3.502a2.362 2.362 0 1 1-4.725 0V5.162a1.312 1.312 0 1 0-2.625 0v3.413h1.575l-2.1 2.625-2.1-2.625H2.8Z"></path><path fill=url(#a) d="M2.8 8.575V5.162a2.362 2.362 0 1 1 4.725 0v3.675a1.313 1.313 0 1 0 2.625 0V5.335a1.575 1.575 0 1 1 1.05 0v3.502a2.362 2.362 0 1 1-4.725 0V5.162a1.312 1.312 0 1 0-2.625 0v3.413h1.575l-2.1 2.625-2.1-2.625H2.8Z"></path><defs><linearGradient id=a x1=1.225 x2=12.251 y1=6.722 y2=6.779 gradientUnits=userSpaceOnUse><stop stop-color=currentColor></stop><stop offset=1 stop-color=currentColor>`);
|
|
3831
3926
|
var RouteFill = (props) => {
|
|
3832
3927
|
return (() => {
|
|
3833
|
-
var _el$ = _tmpl$
|
|
3928
|
+
var _el$ = _tmpl$48();
|
|
3834
3929
|
spread(_el$, props, true, true);
|
|
3835
3930
|
return _el$;
|
|
3836
3931
|
})();
|
|
3837
3932
|
};
|
|
3838
|
-
var _tmpl$
|
|
3933
|
+
var _tmpl$49 = /* @__PURE__ */ template(`<div><div>`);
|
|
3839
3934
|
var isInterpolateSizeSupported = () => {
|
|
3840
3935
|
return CSS.supports("interpolate-size", "allow-keywords");
|
|
3841
3936
|
};
|
|
@@ -3868,7 +3963,7 @@ var Collapsible = (props) => {
|
|
|
3868
3963
|
return props.open ? `${scrollHeight()}px` : "0px";
|
|
3869
3964
|
};
|
|
3870
3965
|
return (() => {
|
|
3871
|
-
var _el$ = _tmpl$
|
|
3966
|
+
var _el$ = _tmpl$49(), _el$2 = _el$.firstChild;
|
|
3872
3967
|
spread(_el$, mergeProps({
|
|
3873
3968
|
get ["class"]() {
|
|
3874
3969
|
return style("collapsible", props.class);
|
|
@@ -3888,7 +3983,7 @@ var Collapsible = (props) => {
|
|
|
3888
3983
|
return _el$;
|
|
3889
3984
|
})();
|
|
3890
3985
|
};
|
|
3891
|
-
var _tmpl$
|
|
3986
|
+
var _tmpl$50 = /* @__PURE__ */ template(`<label><input type=checkbox class=nt-sr-only><div>`);
|
|
3892
3987
|
var Switch = (props) => {
|
|
3893
3988
|
const style = useStyle();
|
|
3894
3989
|
const handleChange = () => {
|
|
@@ -3914,7 +4009,7 @@ var Switch = (props) => {
|
|
|
3914
4009
|
const state = () => props.state;
|
|
3915
4010
|
const disabled = () => props.disabled;
|
|
3916
4011
|
return (() => {
|
|
3917
|
-
var _el$ = _tmpl$
|
|
4012
|
+
var _el$ = _tmpl$50(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
3918
4013
|
_el$2.addEventListener("change", handleChange);
|
|
3919
4014
|
effect((_p$) => {
|
|
3920
4015
|
var _v$ = style("channelSwitch", cn("nt-relative nt-inline-flex nt-cursor-pointer nt-items-center", {
|
|
@@ -3940,7 +4035,7 @@ var Switch = (props) => {
|
|
|
3940
4035
|
};
|
|
3941
4036
|
|
|
3942
4037
|
// src/ui/components/elements/Preferences/ChannelRow.tsx
|
|
3943
|
-
var _tmpl$
|
|
4038
|
+
var _tmpl$51 = /* @__PURE__ */ template(`<div><div><div></div><span></span></div><div>`);
|
|
3944
4039
|
var ChannelRow = (props) => {
|
|
3945
4040
|
const style = useStyle();
|
|
3946
4041
|
const updatePreference = (enabled) => __async(void 0, null, function* () {
|
|
@@ -3954,7 +4049,7 @@ var ChannelRow = (props) => {
|
|
|
3954
4049
|
const state = () => props.channel.state;
|
|
3955
4050
|
const channel = () => props.channel.channel;
|
|
3956
4051
|
return (() => {
|
|
3957
|
-
var _el$ = _tmpl$
|
|
4052
|
+
var _el$ = _tmpl$51(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
|
|
3958
4053
|
insert(_el$3, createComponent(ChannelIcon, {
|
|
3959
4054
|
appearanceKey: "channel__icon",
|
|
3960
4055
|
get channel() {
|
|
@@ -4077,8 +4172,8 @@ var getLabel = (channel) => {
|
|
|
4077
4172
|
};
|
|
4078
4173
|
|
|
4079
4174
|
// src/ui/components/elements/Preferences/PreferencesRow.tsx
|
|
4080
|
-
var _tmpl$
|
|
4081
|
-
var _tmpl$
|
|
4175
|
+
var _tmpl$53 = /* @__PURE__ */ template(`<div>`);
|
|
4176
|
+
var _tmpl$214 = /* @__PURE__ */ template(`<div><div><div><div><span></span></div></div><span>`);
|
|
4082
4177
|
var _tmpl$310 = /* @__PURE__ */ template(`<span>`);
|
|
4083
4178
|
var iconKeyToComponentMap2 = {
|
|
4084
4179
|
cogs: Cogs,
|
|
@@ -4112,7 +4207,7 @@ var PreferencesRow = (props) => {
|
|
|
4112
4207
|
return channels().length > 0;
|
|
4113
4208
|
},
|
|
4114
4209
|
get children() {
|
|
4115
|
-
var _el$ = _tmpl$
|
|
4210
|
+
var _el$ = _tmpl$214(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$3.nextSibling;
|
|
4116
4211
|
_el$2.$$click = () => {
|
|
4117
4212
|
setIsOpenChannels((prev) => !prev);
|
|
4118
4213
|
};
|
|
@@ -4160,7 +4255,7 @@ var PreferencesRow = (props) => {
|
|
|
4160
4255
|
return isOpenChannels();
|
|
4161
4256
|
},
|
|
4162
4257
|
get children() {
|
|
4163
|
-
var _el$7 = _tmpl$
|
|
4258
|
+
var _el$7 = _tmpl$53();
|
|
4164
4259
|
insert(_el$7, createComponent(Index, {
|
|
4165
4260
|
get each() {
|
|
4166
4261
|
return channels();
|
|
@@ -4233,162 +4328,13 @@ var WorkflowDescription = (props) => {
|
|
|
4233
4328
|
return channels.map((c, index) => [c, memo(() => index < channels.length - 1 && ", ")]);
|
|
4234
4329
|
};
|
|
4235
4330
|
return (() => {
|
|
4236
|
-
var _el$9 = _tmpl$
|
|
4331
|
+
var _el$9 = _tmpl$53();
|
|
4237
4332
|
insert(_el$9, channelNames);
|
|
4238
4333
|
effect(() => className(_el$9, style(props.appearanceKey, cn("nt-text-sm nt-text-foreground-alpha-600 nt-text-start", props.class))));
|
|
4239
4334
|
return _el$9;
|
|
4240
4335
|
})();
|
|
4241
4336
|
};
|
|
4242
4337
|
delegateEvents(["click"]);
|
|
4243
|
-
var _tmpl$53 = /* @__PURE__ */ template(`<div>`);
|
|
4244
|
-
var _tmpl$214 = /* @__PURE__ */ template(`<div><div></div><div>`);
|
|
4245
|
-
var SkeletonText = (props) => {
|
|
4246
|
-
const style = useStyle();
|
|
4247
|
-
return (() => {
|
|
4248
|
-
var _el$ = _tmpl$53();
|
|
4249
|
-
effect(() => className(_el$, style(props.appearanceKey, cn("nt-w-full nt-h-3 nt-rounded nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent", props.class))));
|
|
4250
|
-
return _el$;
|
|
4251
|
-
})();
|
|
4252
|
-
};
|
|
4253
|
-
var SkeletonAvatar = (props) => {
|
|
4254
|
-
const style = useStyle();
|
|
4255
|
-
return (() => {
|
|
4256
|
-
var _el$2 = _tmpl$53();
|
|
4257
|
-
effect(() => className(_el$2, style(props.appearanceKey, cn("nt-size-8 nt-rounded-lg nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent", props.class))));
|
|
4258
|
-
return _el$2;
|
|
4259
|
-
})();
|
|
4260
|
-
};
|
|
4261
|
-
var SkeletonSwitch = (props) => {
|
|
4262
|
-
const style = useStyle();
|
|
4263
|
-
return (() => {
|
|
4264
|
-
var _el$3 = _tmpl$214(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
|
|
4265
|
-
effect((_p$) => {
|
|
4266
|
-
var _v$ = style(props.appearanceKey, cn("nt-relative nt-inline-flex nt-items-center", props.class)), _v$2 = style(props.appearanceKey, "nt-h-4 nt-w-7 nt-rounded-full nt-bg-gradient-to-r nt-from-foreground-alpha-50 nt-to-transparent"), _v$3 = style(props.thumbAppearanceKey, "nt-absolute nt-top-0.5 nt-left-0.5 nt-size-3 nt-rounded-full nt-bg-background nt-shadow");
|
|
4267
|
-
_v$ !== _p$.e && className(_el$3, _p$.e = _v$);
|
|
4268
|
-
_v$2 !== _p$.t && className(_el$4, _p$.t = _v$2);
|
|
4269
|
-
_v$3 !== _p$.a && className(_el$5, _p$.a = _v$3);
|
|
4270
|
-
return _p$;
|
|
4271
|
-
}, {
|
|
4272
|
-
e: void 0,
|
|
4273
|
-
t: void 0,
|
|
4274
|
-
a: void 0
|
|
4275
|
-
});
|
|
4276
|
-
return _el$3;
|
|
4277
|
-
})();
|
|
4278
|
-
};
|
|
4279
|
-
|
|
4280
|
-
// src/ui/components/elements/Preferences/PreferencesListSkeleton.tsx
|
|
4281
|
-
var _tmpl$54 = /* @__PURE__ */ template(`<div>`);
|
|
4282
|
-
var channelIcons = [InApp, Email, Sms, Push, Chat];
|
|
4283
|
-
var PreferencesListSkeleton = (props) => {
|
|
4284
|
-
const style = useStyle();
|
|
4285
|
-
const {
|
|
4286
|
-
t
|
|
4287
|
-
} = useLocalization();
|
|
4288
|
-
return (() => {
|
|
4289
|
-
var _el$ = _tmpl$54();
|
|
4290
|
-
insert(_el$, createComponent(Motion.div, {
|
|
4291
|
-
get animate() {
|
|
4292
|
-
return {
|
|
4293
|
-
scale: props.loading ? 1 : 0.7
|
|
4294
|
-
};
|
|
4295
|
-
},
|
|
4296
|
-
transition: {
|
|
4297
|
-
duration: 0.6,
|
|
4298
|
-
easing: [0.39, 0.24, 0.3, 1],
|
|
4299
|
-
delay: 0.3
|
|
4300
|
-
},
|
|
4301
|
-
get ["class"]() {
|
|
4302
|
-
return style("preferencesList__skeleton", "nt-flex nt-relative nt-mx-auto nt-flex-col nt-w-full nt-mb-4");
|
|
4303
|
-
},
|
|
4304
|
-
get children() {
|
|
4305
|
-
return [memo(() => Array.from({
|
|
4306
|
-
length: 5
|
|
4307
|
-
}).map((_, i) => {
|
|
4308
|
-
const Icon = channelIcons[i];
|
|
4309
|
-
return createComponent(Motion.div, {
|
|
4310
|
-
get animate() {
|
|
4311
|
-
return {
|
|
4312
|
-
marginBottom: props.loading ? 0 : "16px",
|
|
4313
|
-
borderWidth: props.loading ? 0 : "1px",
|
|
4314
|
-
borderRadius: props.loading ? 0 : "var(--nv-radius-lg)"
|
|
4315
|
-
};
|
|
4316
|
-
},
|
|
4317
|
-
transition: {
|
|
4318
|
-
duration: 0.5,
|
|
4319
|
-
delay: 0.3,
|
|
4320
|
-
easing: "ease-in-out"
|
|
4321
|
-
},
|
|
4322
|
-
get ["class"]() {
|
|
4323
|
-
return style("preferencesList__skeletonContent", "nt-flex nt-border-neutral-alpha-50 nt-items-center nt-gap-3 nt-p-3 nt-bg-neutral-alpha-25");
|
|
4324
|
-
},
|
|
4325
|
-
get children() {
|
|
4326
|
-
return [createComponent(Icon, {
|
|
4327
|
-
get ["class"]() {
|
|
4328
|
-
return style("preferencesList__skeletonIcon", "nt-size-8 nt-p-2 nt-rounded-lg nt-bg-neutral-alpha-100");
|
|
4329
|
-
}
|
|
4330
|
-
}), (() => {
|
|
4331
|
-
var _el$3 = _tmpl$54();
|
|
4332
|
-
insert(_el$3, createComponent(SkeletonText, {
|
|
4333
|
-
appearanceKey: "notificationList__skeletonText",
|
|
4334
|
-
"class": "nt-h-2 nt-w-1/3 nt-bg-neutral-alpha-50 nt-rounded"
|
|
4335
|
-
}), null);
|
|
4336
|
-
insert(_el$3, createComponent(SkeletonText, {
|
|
4337
|
-
appearanceKey: "preferencesList__skeletonText",
|
|
4338
|
-
"class": "nt-h-2 nt-w-2/3 nt-bg-neutral-alpha-50 nt-rounded"
|
|
4339
|
-
}), null);
|
|
4340
|
-
effect(() => className(_el$3, style("preferencesList__skeletonItem", "nt-flex nt-flex-col nt-gap-2 nt-flex-1")));
|
|
4341
|
-
return _el$3;
|
|
4342
|
-
})(), createComponent(SkeletonSwitch, {
|
|
4343
|
-
appearanceKey: "preferencesList__skeletonSwitch",
|
|
4344
|
-
thumbAppearanceKey: "preferencesList__skeletonSwitchThumb"
|
|
4345
|
-
})];
|
|
4346
|
-
}
|
|
4347
|
-
});
|
|
4348
|
-
})), (() => {
|
|
4349
|
-
var _el$2 = _tmpl$54();
|
|
4350
|
-
effect(() => className(_el$2, style("notificationListEmptyNoticeOverlay", "nt-absolute nt-size-full nt-z-10 nt-inset-0 nt-bg-gradient-to-b nt-from-transparent nt-to-background")));
|
|
4351
|
-
return _el$2;
|
|
4352
|
-
})()];
|
|
4353
|
-
}
|
|
4354
|
-
}), null);
|
|
4355
|
-
insert(_el$, createComponent(Show, {
|
|
4356
|
-
get when() {
|
|
4357
|
-
return !props.loading;
|
|
4358
|
-
},
|
|
4359
|
-
get children() {
|
|
4360
|
-
return createComponent(Motion.p, {
|
|
4361
|
-
initial: {
|
|
4362
|
-
opacity: 0,
|
|
4363
|
-
y: -4,
|
|
4364
|
-
filter: "blur(4px)"
|
|
4365
|
-
},
|
|
4366
|
-
get animate() {
|
|
4367
|
-
return {
|
|
4368
|
-
opacity: props.loading ? 0 : 1,
|
|
4369
|
-
y: 0,
|
|
4370
|
-
filter: "blur(0px)"
|
|
4371
|
-
};
|
|
4372
|
-
},
|
|
4373
|
-
transition: {
|
|
4374
|
-
duration: 0.7,
|
|
4375
|
-
easing: [0.39, 0.24, 0.3, 1],
|
|
4376
|
-
delay: 0.6
|
|
4377
|
-
},
|
|
4378
|
-
get ["class"]() {
|
|
4379
|
-
return style("preferencesListEmptyNotice"), "nt-text-center";
|
|
4380
|
-
},
|
|
4381
|
-
"data-localization": "preferences.emptyNotice",
|
|
4382
|
-
get children() {
|
|
4383
|
-
return t("preferences.emptyNotice");
|
|
4384
|
-
}
|
|
4385
|
-
});
|
|
4386
|
-
}
|
|
4387
|
-
}), null);
|
|
4388
|
-
effect(() => className(_el$, style("preferencesListEmptyNoticeContainer", "nt-flex nt-flex-col nt-items-center nt-h-fit nt-w-full nt-text-sm nt-text-foreground-alpha-400 nt-text-center")));
|
|
4389
|
-
return _el$;
|
|
4390
|
-
})();
|
|
4391
|
-
};
|
|
4392
4338
|
|
|
4393
4339
|
// src/ui/components/elements/Preferences/DefaultPreferences.tsx
|
|
4394
4340
|
var DefaultPreferences = (props) => {
|
|
@@ -4432,25 +4378,25 @@ var DefaultPreferences = (props) => {
|
|
|
4432
4378
|
}
|
|
4433
4379
|
});
|
|
4434
4380
|
};
|
|
4435
|
-
var _tmpl$
|
|
4436
|
-
var
|
|
4381
|
+
var _tmpl$54 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 16 16"><path fill=currentColor d="M8 13A5 5 0 1 1 8 3a5 5 0 0 1 0 10Zm0-1a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm.5-4.75V9.5H9v1H7v-1h.5V8.25H7v-1h1.5ZM8.75 6a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z">`);
|
|
4382
|
+
var Info = (props) => {
|
|
4437
4383
|
return (() => {
|
|
4438
|
-
var _el$ = _tmpl$
|
|
4384
|
+
var _el$ = _tmpl$54();
|
|
4439
4385
|
spread(_el$, props, true, true);
|
|
4440
4386
|
return _el$;
|
|
4441
4387
|
})();
|
|
4442
4388
|
};
|
|
4443
|
-
var _tmpl$
|
|
4444
|
-
var
|
|
4389
|
+
var _tmpl$55 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg fill=none viewBox="0 0 14 14"><path fill=currentColor d="M5.95 1.75c.29 0 .525.235.525.525v2.1c0 .29-.235.525-.525.525H4.9v1.05h2.625v-.525c0-.29.235-.525.525-.525h3.15c.29 0 .525.235.525.525v2.1c0 .29-.235.525-.525.525H8.05a.525.525 0 0 1-.525-.525V7H4.9v3.15h2.625v-.525c0-.29.235-.525.525-.525h3.15c.29 0 .525.235.525.525v2.1c0 .29-.235.525-.525.525H8.05a.525.525 0 0 1-.525-.525V11.2h-3.15a.525.525 0 0 1-.525-.525V4.9H2.8a.525.525 0 0 1-.525-.525v-2.1c0-.29.235-.525.525-.525h3.15Zm4.725 8.4h-2.1v1.05h2.1v-1.05Zm0-4.2h-2.1V7h2.1V5.95ZM5.425 2.8h-2.1v1.05h2.1V2.8Z"></path><path fill=url(#a) d="M5.95 1.75c.29 0 .525.235.525.525v2.1c0 .29-.235.525-.525.525H4.9v1.05h2.625v-.525c0-.29.235-.525.525-.525h3.15c.29 0 .525.235.525.525v2.1c0 .29-.235.525-.525.525H8.05a.525.525 0 0 1-.525-.525V7H4.9v3.15h2.625v-.525c0-.29.235-.525.525-.525h3.15c.29 0 .525.235.525.525v2.1c0 .29-.235.525-.525.525H8.05a.525.525 0 0 1-.525-.525V11.2h-3.15a.525.525 0 0 1-.525-.525V4.9H2.8a.525.525 0 0 1-.525-.525v-2.1c0-.29.235-.525.525-.525h3.15Zm4.725 8.4h-2.1v1.05h2.1v-1.05Zm0-4.2h-2.1V7h2.1V5.95ZM5.425 2.8h-2.1v1.05h2.1V2.8Z"></path><defs><linearGradient id=a x1=2.275 x2=11.725 y1=6.982 y2=7.018 gradientUnits=userSpaceOnUse><stop stop-color=currentColor></stop><stop offset=1 stop-color=currentColor>`);
|
|
4390
|
+
var NodeTree = (props) => {
|
|
4445
4391
|
return (() => {
|
|
4446
|
-
var _el$ = _tmpl$
|
|
4392
|
+
var _el$ = _tmpl$55();
|
|
4447
4393
|
spread(_el$, props, true, true);
|
|
4448
4394
|
return _el$;
|
|
4449
4395
|
})();
|
|
4450
4396
|
};
|
|
4451
4397
|
|
|
4452
4398
|
// src/ui/components/elements/Preferences/GroupedPreferencesRow.tsx
|
|
4453
|
-
var _tmpl$
|
|
4399
|
+
var _tmpl$56 = /* @__PURE__ */ template(`<div><div><span data-localization=preferences.group.info></span></div><div>`);
|
|
4454
4400
|
var _tmpl$215 = /* @__PURE__ */ template(`<div><div><div><span></span></div><div><span>`);
|
|
4455
4401
|
var GroupedPreferencesRow = (props) => {
|
|
4456
4402
|
const style = useStyle();
|
|
@@ -4550,7 +4496,7 @@ var GroupedPreferencesRow = (props) => {
|
|
|
4550
4496
|
return isOpened();
|
|
4551
4497
|
},
|
|
4552
4498
|
get children() {
|
|
4553
|
-
var _el$7 = _tmpl$
|
|
4499
|
+
var _el$7 = _tmpl$56(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$10 = _el$8.nextSibling;
|
|
4554
4500
|
insert(_el$8, createComponent(Index, {
|
|
4555
4501
|
get each() {
|
|
4556
4502
|
return Object.keys(uniqueChannels());
|
|
@@ -4674,7 +4620,7 @@ var GroupedPreferences = (props) => {
|
|
|
4674
4620
|
};
|
|
4675
4621
|
|
|
4676
4622
|
// src/ui/components/elements/Preferences/Preferences.tsx
|
|
4677
|
-
var _tmpl$
|
|
4623
|
+
var _tmpl$57 = /* @__PURE__ */ template(`<div>`);
|
|
4678
4624
|
var Preferences = () => {
|
|
4679
4625
|
var _a;
|
|
4680
4626
|
const novu = useNovu();
|
|
@@ -4761,7 +4707,7 @@ var Preferences = () => {
|
|
|
4761
4707
|
})) != null ? _c : [];
|
|
4762
4708
|
});
|
|
4763
4709
|
return (() => {
|
|
4764
|
-
var _el$ = _tmpl$
|
|
4710
|
+
var _el$ = _tmpl$57();
|
|
4765
4711
|
insert(_el$, createComponent(PreferencesRow, {
|
|
4766
4712
|
iconKey: "cogs",
|
|
4767
4713
|
get preference() {
|
|
@@ -4816,6 +4762,34 @@ var Preferences = () => {
|
|
|
4816
4762
|
return _el$;
|
|
4817
4763
|
})();
|
|
4818
4764
|
};
|
|
4765
|
+
var _tmpl$58 = /* @__PURE__ */ template(`<div>`);
|
|
4766
|
+
var Root = (props) => {
|
|
4767
|
+
const [_, rest] = splitProps(props, ["class"]);
|
|
4768
|
+
const {
|
|
4769
|
+
id
|
|
4770
|
+
} = useAppearance();
|
|
4771
|
+
const style = useStyle();
|
|
4772
|
+
const {
|
|
4773
|
+
hideBranding
|
|
4774
|
+
} = useInboxContext();
|
|
4775
|
+
return [createComponent(Show, {
|
|
4776
|
+
get when() {
|
|
4777
|
+
return !hideBranding();
|
|
4778
|
+
},
|
|
4779
|
+
children: new Comment(" Powered by Novu - https://novu.co ")
|
|
4780
|
+
}), (() => {
|
|
4781
|
+
var _el$ = _tmpl$58();
|
|
4782
|
+
spread(_el$, mergeProps({
|
|
4783
|
+
get id() {
|
|
4784
|
+
return `novu-root-${id()}`;
|
|
4785
|
+
},
|
|
4786
|
+
get ["class"]() {
|
|
4787
|
+
return style("root"), cn("novu", id(), "nt-text-foreground nt-h-full [interpolate-size:allow-keywords]");
|
|
4788
|
+
}
|
|
4789
|
+
}, rest), false, false);
|
|
4790
|
+
return _el$;
|
|
4791
|
+
})()];
|
|
4792
|
+
};
|
|
4819
4793
|
var _tmpl$59 = /* @__PURE__ */ template(`<div><div data-localization=preferences.title>`);
|
|
4820
4794
|
var PreferencesHeader = (props) => {
|
|
4821
4795
|
const style = useStyle();
|
|
@@ -6220,11 +6194,7 @@ function KeylessEmptyState() {
|
|
|
6220
6194
|
variant: "secondary",
|
|
6221
6195
|
size: "sm",
|
|
6222
6196
|
get ["class"]() {
|
|
6223
|
-
return style(
|
|
6224
|
-
"notificationListEmptyNotice",
|
|
6225
|
-
// eslint-disable-next-line max-len
|
|
6226
|
-
"nt-h-8 nt-px-4 nt-flex nt-items-center nt-justify-center nt-gap-2 nt-bg-white nt-border nt-border-neutral-alpha-100 nt-shadow-sm nt-text-[12px] nt-font-medium"
|
|
6227
|
-
);
|
|
6197
|
+
return style("notificationListEmptyNotice", "nt-h-8 nt-px-4 nt-flex nt-items-center nt-justify-center nt-gap-2 nt-bg-white nt-border nt-border-neutral-alpha-100 nt-shadow-sm nt-text-[12px] nt-font-medium");
|
|
6228
6198
|
},
|
|
6229
6199
|
onClick: () => window.open("https://go.novu.co/keyless", "_blank", "noopener noreferrer"),
|
|
6230
6200
|
get children() {
|
|
@@ -6239,11 +6209,7 @@ function KeylessEmptyState() {
|
|
|
6239
6209
|
variant: "default",
|
|
6240
6210
|
size: "sm",
|
|
6241
6211
|
get ["class"]() {
|
|
6242
|
-
return style(
|
|
6243
|
-
"notificationListEmptyNotice",
|
|
6244
|
-
// eslint-disable-next-line max-len
|
|
6245
|
-
"nt-h-8 nt-px-4 nt-flex nt-items-center nt-justify-center nt-gap-2 nt-bg-neutral-900 nt-text-white nt-shadow-sm nt-text-[12px] nt-font-medium"
|
|
6246
|
-
);
|
|
6212
|
+
return style("notificationListEmptyNotice", "nt-h-8 nt-px-4 nt-flex nt-items-center nt-justify-center nt-gap-2 nt-bg-neutral-900 nt-text-white nt-shadow-sm nt-text-[12px] nt-font-medium");
|
|
6247
6213
|
},
|
|
6248
6214
|
onClick: () => novu.notifications.triggerHelloWorldEvent(),
|
|
6249
6215
|
get children() {
|