@savantlink/sdk 2.2.26 → 2.2.28
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/{src/AppIcon → AppIcon}/AppIcon.d.ts +1 -0
- package/dist/AppIcon/AppIcon.d.ts.map +1 -0
- package/dist/{src/AppIcon → AppIcon}/index.d.ts +1 -0
- package/dist/AppIcon/index.d.ts.map +1 -0
- package/dist/{src/Badge → Badge}/Badge.d.ts +1 -0
- package/dist/Badge/Badge.d.ts.map +1 -0
- package/dist/{src/Badge → Badge}/index.d.ts +1 -0
- package/dist/Badge/index.d.ts.map +1 -0
- package/dist/{src/Breadcrumbs → Breadcrumbs}/Breadcrumbs.d.ts +1 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/{src/Breadcrumbs → Breadcrumbs}/index.d.ts +1 -0
- package/dist/Breadcrumbs/index.d.ts.map +1 -0
- package/dist/{src/Button → Button}/Button.d.ts +1 -0
- package/dist/Button/Button.d.ts.map +1 -0
- package/dist/{src/Button → Button}/index.d.ts +1 -0
- package/dist/Button/index.d.ts.map +1 -0
- package/dist/{src/DateInput → DateInput}/index.d.ts +1 -0
- package/dist/DateInput/index.d.ts.map +1 -0
- package/dist/{src/Drawer → Drawer}/Drawer.d.ts +1 -0
- package/dist/Drawer/Drawer.d.ts.map +1 -0
- package/dist/{src/Drawer → Drawer}/index.d.ts +1 -0
- package/dist/Drawer/index.d.ts.map +1 -0
- package/dist/{src/Dropdown → Dropdown}/Dropdown.d.ts +1 -0
- package/dist/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/{src/Dropdown → Dropdown}/index.d.ts +1 -0
- package/dist/Dropdown/index.d.ts.map +1 -0
- package/dist/{src/FileUpload → FileUpload}/FileUpload.d.ts +1 -0
- package/dist/FileUpload/FileUpload.d.ts.map +1 -0
- package/dist/{src/FileUpload → FileUpload}/index.d.ts +1 -0
- package/dist/FileUpload/index.d.ts.map +1 -0
- package/dist/{src/ImageLoader → ImageLoader}/ImageLoader.d.ts +1 -0
- package/dist/ImageLoader/ImageLoader.d.ts.map +1 -0
- package/dist/{src/ImageLoader → ImageLoader}/index.d.ts +1 -0
- package/dist/ImageLoader/index.d.ts.map +1 -0
- package/dist/{src/Input → Input}/Input.d.ts +1 -0
- package/dist/Input/Input.d.ts.map +1 -0
- package/dist/{src/Input → Input}/index.d.ts +1 -0
- package/dist/Input/index.d.ts.map +1 -0
- package/dist/{src/Modal → Modal}/Modal.d.ts +1 -0
- package/dist/Modal/Modal.d.ts.map +1 -0
- package/dist/{src/Modal → Modal}/index.d.ts +1 -0
- package/dist/Modal/index.d.ts.map +1 -0
- package/dist/{src/OTPInput → OTPInput}/OTPInput.d.ts +1 -0
- package/dist/OTPInput/OTPInput.d.ts.map +1 -0
- package/dist/{src/OTPInput → OTPInput}/index.d.ts +1 -0
- package/dist/OTPInput/index.d.ts.map +1 -0
- package/dist/{src/Pagination → Pagination}/Pagination.d.ts +1 -0
- package/dist/Pagination/Pagination.d.ts.map +1 -0
- package/dist/{src/Pagination → Pagination}/index.d.ts +1 -0
- package/dist/Pagination/index.d.ts.map +1 -0
- package/dist/{src/PhoneInput → PhoneInput}/PhoneInput.d.ts +1 -0
- package/dist/PhoneInput/PhoneInput.d.ts.map +1 -0
- package/dist/{src/PhoneInput → PhoneInput}/index.d.ts +1 -0
- package/dist/PhoneInput/index.d.ts.map +1 -0
- package/dist/{src/RadioGroup → RadioGroup}/Radio.d.ts +1 -0
- package/dist/RadioGroup/Radio.d.ts.map +1 -0
- package/dist/{src/RadioGroup → RadioGroup}/RadioGroup.d.ts +1 -0
- package/dist/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/{src/RadioGroup → RadioGroup}/index.d.ts +1 -0
- package/dist/RadioGroup/index.d.ts.map +1 -0
- package/dist/{src/Select → Select}/Select.d.ts +1 -0
- package/dist/Select/Select.d.ts.map +1 -0
- package/dist/{src/Select → Select}/index.d.ts +1 -0
- package/dist/Select/index.d.ts.map +1 -0
- package/dist/{src/Spinner → Spinner}/Spinner.d.ts +1 -0
- package/dist/Spinner/Spinner.d.ts.map +1 -0
- package/dist/{src/Spinner → Spinner}/index.d.ts +1 -0
- package/dist/Spinner/index.d.ts.map +1 -0
- package/dist/{src/Table → Table}/Table.d.ts +1 -0
- package/dist/Table/Table.d.ts.map +1 -0
- package/dist/{src/Table → Table}/index.d.ts +1 -0
- package/dist/Table/index.d.ts.map +1 -0
- package/dist/{src/Tabs → Tabs}/Tabs.d.ts +1 -0
- package/dist/Tabs/Tabs.d.ts.map +1 -0
- package/dist/{src/Tabs → Tabs}/index.d.ts +1 -0
- package/dist/Tabs/index.d.ts.map +1 -0
- package/dist/{src/Tag → Tag}/Tag.d.ts +1 -0
- package/dist/Tag/Tag.d.ts.map +1 -0
- package/dist/{src/Tag → Tag}/index.d.ts +1 -0
- package/dist/Tag/index.d.ts.map +1 -0
- package/dist/{src/Textarea → Textarea}/Textarea.d.ts +1 -0
- package/dist/Textarea/Textarea.d.ts.map +1 -0
- package/dist/{src/Textarea → Textarea}/index.d.ts +1 -0
- package/dist/Textarea/index.d.ts.map +1 -0
- package/dist/{src/Toast → Toast}/Toast.d.ts +1 -0
- package/dist/Toast/Toast.d.ts.map +1 -0
- package/dist/{src/Toast → Toast}/index.d.ts +1 -0
- package/dist/Toast/index.d.ts.map +1 -0
- package/dist/{src/Toggle → Toggle}/Toggle.d.ts +1 -0
- package/dist/Toggle/Toggle.d.ts.map +1 -0
- package/dist/{src/Toggle → Toggle}/index.d.ts +1 -0
- package/dist/Toggle/index.d.ts.map +1 -0
- package/dist/{src/Tooltip → Tooltip}/Tooltip.d.ts +1 -0
- package/dist/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/{src/Tooltip → Tooltip}/index.d.ts +1 -0
- package/dist/Tooltip/index.d.ts.map +1 -0
- package/dist/{src/Typography → Typography}/Typography.d.ts +1 -0
- package/dist/Typography/Typography.d.ts.map +1 -0
- package/dist/{src/Typography → Typography}/index.d.ts +1 -0
- package/dist/Typography/index.d.ts.map +1 -0
- package/dist/{src/ValidationError → ValidationError}/index.d.ts +1 -0
- package/dist/ValidationError/index.d.ts.map +1 -0
- package/dist/{src/VersionUpdateNotice → VersionUpdateNotice}/VersionUpdateNotice.d.ts +1 -0
- package/dist/VersionUpdateNotice/VersionUpdateNotice.d.ts.map +1 -0
- package/dist/{src/VersionUpdateNotice → VersionUpdateNotice}/index.d.ts +1 -0
- package/dist/VersionUpdateNotice/index.d.ts.map +1 -0
- package/dist/{src/hooks → hooks}/index.d.ts +1 -2
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/{src/hooks → hooks}/use-debounce.d.ts +1 -0
- package/dist/hooks/use-debounce.d.ts.map +1 -0
- package/dist/{src/hooks → hooks}/use-idle-timeout.d.ts +1 -0
- package/dist/hooks/use-idle-timeout.d.ts.map +1 -0
- package/dist/{src/hooks → hooks}/use-notification-stream.d.ts +1 -0
- package/dist/hooks/use-notification-stream.d.ts.map +1 -0
- package/dist/{src/hooks → hooks}/use-online-status.d.ts +1 -0
- package/dist/hooks/use-online-status.d.ts.map +1 -0
- package/dist/{src/hooks → hooks}/use-pagination.d.ts +1 -0
- package/dist/hooks/use-pagination.d.ts.map +1 -0
- package/dist/{src/hooks → hooks}/use-screen-size.d.ts +1 -0
- package/dist/hooks/use-screen-size.d.ts.map +1 -0
- package/dist/{src/hooks → hooks}/use-scroll-lock.d.ts +1 -0
- package/dist/hooks/use-scroll-lock.d.ts.map +1 -0
- package/dist/{src/hooks → hooks}/use-sound.d.ts +1 -0
- package/dist/hooks/use-sound.d.ts.map +1 -0
- package/dist/{src/hooks → hooks}/use-sse.d.ts +1 -0
- package/dist/hooks/use-sse.d.ts.map +1 -0
- package/dist/{src/index.d.ts → index.d.ts} +1 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{src/keypad → keypad}/KeypadKey/KeypadKey.d.ts +1 -0
- package/dist/keypad/KeypadKey/KeypadKey.d.ts.map +1 -0
- package/dist/{src/keypad → keypad}/KeypadKey/index.d.ts +1 -0
- package/dist/keypad/KeypadKey/index.d.ts.map +1 -0
- package/dist/{src/keypad → keypad}/NumberKeypad/NumberKeypad.d.ts +1 -0
- package/dist/keypad/NumberKeypad/NumberKeypad.d.ts.map +1 -0
- package/dist/{src/keypad → keypad}/NumberKeypad/index.d.ts +1 -0
- package/dist/keypad/NumberKeypad/index.d.ts.map +1 -0
- package/dist/{src/keypad → keypad}/index.d.ts +1 -0
- package/dist/keypad/index.d.ts.map +1 -0
- package/dist/{src/services → services}/collection.d.ts +1 -0
- package/dist/services/collection.d.ts.map +1 -0
- package/dist/{src/services → services}/data/country.d.ts +1 -0
- package/dist/services/data/country.d.ts.map +1 -0
- package/dist/{src/services → services}/dom.d.ts +1 -0
- package/dist/services/dom.d.ts.map +1 -0
- package/dist/{src/services → services}/error.d.ts +1 -0
- package/dist/services/error.d.ts.map +1 -0
- package/dist/{src/services → services}/format.d.ts +1 -0
- package/dist/services/format.d.ts.map +1 -0
- package/dist/{src/services → services}/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/{src/services → services}/number.d.ts +1 -0
- package/dist/services/number.d.ts.map +1 -0
- package/dist/{src/services → services}/query.d.ts +1 -0
- package/dist/services/query.d.ts.map +1 -0
- package/dist/{src/services → services}/validation.d.ts +1 -0
- package/dist/services/validation.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/assets/sounds/notification.d.ts +0 -2
- package/dist/assets/sounds/notification.js +0 -2
- package/dist/assets/sounds/notification.js.map +0 -1
- package/dist/context/NotificationContext.js +0 -2
- package/dist/context/NotificationContext.js.map +0 -1
- package/dist/hooks/use-notification-stream.js +0 -2
- package/dist/hooks/use-notification-stream.js.map +0 -1
- package/dist/hooks/use-sound.js +0 -2
- package/dist/hooks/use-sound.js.map +0 -1
- package/dist/hooks/use-sse.js +0 -2
- package/dist/hooks/use-sse.js.map +0 -1
- package/dist/src/context/NotificationContext.d.ts +0 -18
- package/dist/src/context/index.d.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-online-status.d.ts","sourceRoot":"","sources":["../../src/hooks/use-online-status.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,eAAe,QAAO,OAe3B,CAAA;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -8,3 +8,4 @@ declare type usePaginationProps = {
|
|
|
8
8
|
declare const usePagination: ({ totalSize, perPageSize, currentPageSiblings, currentPage }: usePaginationProps) => (string | number)[];
|
|
9
9
|
export { usePagination, ELLIPSIS };
|
|
10
10
|
export type { usePaginationProps };
|
|
11
|
+
//# sourceMappingURL=use-pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pagination.d.ts","sourceRoot":"","sources":["../../src/hooks/use-pagination.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,QAAQ,QAAQ,CAAA;AAEtB,aAAK,kBAAkB,GAAG;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,QAAA,MAAM,aAAa,iEAAkE,kBAAkB,wBA2DtG,CAAA;AAED,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAA;AAClC,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-screen-size.d.ts","sourceRoot":"","sources":["../../src/hooks/use-screen-size.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,uBAAuB;;;CAGnB,CAAA;AAEV,UAAU,UAAU;IAClB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;CACnB;AAWD,QAAA,MAAM,aAAa,QAAO,UAYzB,CAAA;AAED,eAAe,aAAa,CAAA;AAC5B,OAAO,EAAE,uBAAuB,EAAE,CAAA;AAClC,YAAY,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-scroll-lock.d.ts","sourceRoot":"","sources":["../../src/hooks/use-scroll-lock.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,aAAa,aAAc,OAAO,SAYvC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sound.d.ts","sourceRoot":"","sources":["../../src/hooks/use-sound.ts"],"names":[],"mappings":"AA8DA,QAAA,MAAM,QAAQ;;;;CAmFb,CAAC;AAEF,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sse.d.ts","sourceRoot":"","sources":["../../src/hooks/use-sse.tsx"],"names":[],"mappings":"AAEA,aAAK,SAAS,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAA;AAE9D,aAAK,aAAa,CAAC,CAAC,IAAI;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;IAE5B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,MAAM;;;CAoIlB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtF,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAA;AACjE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AACjG,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAEjD,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Badge/Badge.js"),r=require("./Button/Button.js"),t=require("./Breadcrumbs/Breadcrumbs.js"),o=require("./Drawer/Drawer.js"),s=require("./Input/Input.js"),a=require("./OTPInput/OTPInput.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Badge/Badge.js"),r=require("./Button/Button.js"),t=require("./Breadcrumbs/Breadcrumbs.js"),o=require("./Drawer/Drawer.js"),s=require("./Input/Input.js"),a=require("./OTPInput/OTPInput.js"),u=require("./Modal/Modal.js"),i=require("./Pagination/Pagination.js"),p=require("./PhoneInput/PhoneInput.js"),l=require("./RadioGroup/RadioGroup.js"),n=require("./Select/Select.js"),d=require("./Spinner/Spinner.js"),x=require("./Table/Table.js"),c=require("./Tag/Tag.js"),T=require("./Textarea/Textarea.js"),g=require("./Toast/Toast.js"),f=require("./Tooltip/Tooltip.js"),m=require("./Typography/Typography.js"),j=require("./Dropdown/Dropdown.js"),q=require("./FileUpload/FileUpload.js"),I=require("./Toggle/Toggle.js"),E=require("./ValidationError/index.js"),S=require("./AppIcon/AppIcon.js"),y=require("./VersionUpdateNotice/VersionUpdateNotice.js"),D=require("./ImageLoader/ImageLoader.js"),P=require("./Tabs/Tabs.js"),b=require("./DateInput/index.js"),L=require("./keypad/NumberKeypad/NumberKeypad.js"),_=require("./hooks/use-pagination.js"),A=require("./hooks/use-idle-timeout.js"),h=require("./hooks/use-debounce.js"),V=require("./hooks/use-online-status.js"),M=require("./hooks/use-screen-size.js"),N=require("./hooks/use-scroll-lock.js"),v=require("./services/number.js"),C=require("./services/format.js"),O=require("./services/query.js"),U=require("./services/error.js"),B=require("./services/collection.js"),F=require("./services/validation.js");exports.Badge=e.default,exports.Button=r.default,exports.Breadcrumbs=t.default,exports.Drawer=o.default,exports.Input=s.default,exports.OTPInput=a.default,exports.Modal=u.default,exports.Pagination=i.default,exports.PhoneInput=p.default,exports.RadioGroup=l.default,exports.Select=n.default,exports.Spinner=d.default,exports.Table=x.default,exports.Tag=c.default,exports.Textarea=T.default,exports.Toast=g.default,exports.Tooltip=f.default,exports.Typography=m.default,exports.Dropdown=j.default,exports.FileUpload=q.default,exports.Toggle=I.default,exports.ValidationError=E.default,exports.AppIcon=S.default,exports.appIcons=S.icons,exports.DEFAULT_CHECK_INTERVAL_MS=y.DEFAULT_CHECK_INTERVAL_MS,exports.VersionUpdateNotice=y.default,exports.ImageLoader=D.default,exports.Tabs=P.default,exports.useTabs=P.useTabs,exports.DateInput=b.default,exports.NumberKeypad=L.default,exports.ELLIPSIS=_.ELLIPSIS,exports.usePagination=_.usePagination,exports.DEFAULT_IDLE_TIMEOUT_MS=A.DEFAULT_IDLE_TIMEOUT_MS,exports.useIdleTimeout=A.useIdleTimeout,exports.useInactivityLogout=A.useInactivityLogout,exports.useDebounce=h.useDebounce,exports.useOnlineStatus=V.useOnlineStatus,exports.SCREEN_SIZE_BREAKPOINTS=M.SCREEN_SIZE_BREAKPOINTS,exports.useScreenSize=M.default,exports.useScrollLock=N.default,exports.calculateAmount=v.calculateAmount,exports.range=v.range,exports.currencyFormatter=C.currencyFormatter,exports.currencyFormmater=C.currencyFormmater,exports.formatCurrency=C.formatCurrency,exports.formatDate=C.formatDate,exports.formatDateTime=C.formatDateTime,exports.formatSlugToString=C.formatSlugToString,exports.formatTime=C.formatTime,exports.getRelativeTime=C.getRelativeTime,exports.getTagColor=C.getTagColor,exports.replacePlaceholder=C.replacePlaceholder,exports.titleCase=C.titleCase,exports.createQueryParams=O.createQueryParams,exports.extractErrorMessage=U.extractErrorMessage,exports.getApiErrorMessage=U.getApiErrorMessage,exports.formatArrayToOptions=B.formatArrayToOptions,exports.sortData=B.sortData,exports.isValidEmail=F.isValidEmail,exports.isValidLength=F.isValidLength,exports.isValidNuban=F.isValidNuban,exports.isValidPin=F.isValidPin;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeypadKey.d.ts","sourceRoot":"","sources":["../../../src/keypad/KeypadKey/KeypadKey.tsx"],"names":[],"mappings":"AAGA,oBAAY,UAAU;IACpB,GAAG,MAAM;IACT,GAAG,MAAM;IACT,KAAK,MAAM;IACX,IAAI,MAAM;IACV,IAAI,MAAM;IACV,GAAG,MAAM;IACT,KAAK,MAAM;IACX,KAAK,MAAM;IACX,IAAI,MAAM;IACV,KAAK,iBAAO;IACZ,IAAI,MAAM;IACV,IAAI,WAAM;CACX;AAED,aAAK,cAAc,GAAG;IACpB,SAAS,EAAE,UAAU,CAAA;IACrB,YAAY,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED,QAAA,MAAM,SAAS;kCAAiC,cAAc;;CAI7D,CAAA;AAID,eAAe,SAAS,CAAA;AACxB,YAAY,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/keypad/KeypadKey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACjD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberKeypad.d.ts","sourceRoot":"","sources":["../../../src/keypad/NumberKeypad/NumberKeypad.tsx"],"names":[],"mappings":"AACA,OAAkB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEpD,aAAK,iBAAiB,GAAG;IACvB,YAAY,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED,QAAA,MAAM,YAAY;uBAAsB,iBAAiB;;CAuBxD,CAAA;AAID,eAAe,YAAY,CAAA;AAC3B,YAAY,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/keypad/NumberKeypad/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keypad/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../src/services/collection.ts"],"names":[],"mappings":"AAEA,aAAK,aAAa,GAAG,KAAK,GAAG,MAAM,CAAA;AACnC,UAAU,UAAU,CAAC,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;IACrB,SAAS,EAAE,aAAa,CAAA;CACzB;AAED,QAAA,MAAM,QAAQ,2EAWb,CAAA;AAED,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAED,QAAA,MAAM,oBAAoB;;;GACgD,CAAA;AAE1E,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,CAAA;AACzC,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country.d.ts","sourceRoot":"","sources":["../../../src/services/data/country.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY;;;;GAEjB,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/services/dom.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;;;CAQhB,CAAA;AAED,QAAA,MAAM,QAAQ,eAAsC,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAC,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/services/error.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,mBAAmB,UAAW,OAAO,KAAG,MAAM,GAAG,SAgBtD,CAAA;AAED,QAAA,MAAM,kBAAkB,UAAW,OAAO,wBAAyD,MAMlG,CAAA;AAED,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -15,3 +15,4 @@ declare const getRelativeTime: (value: DateInput, relativeTo?: DateInput, locale
|
|
|
15
15
|
declare const currencyFormatter: (amount: number, currency?: string, locale?: string, options?: Omit<Intl.NumberFormatOptions, 'style' | 'currency'>) => string;
|
|
16
16
|
declare const currencyFormmater: (amount: number, currency?: string, locale?: string, options?: Omit<Intl.NumberFormatOptions, 'style' | 'currency'>) => string;
|
|
17
17
|
export { currencyFormmater, currencyFormatter, formatCurrency, formatDate, formatDateTime, formatSlugToString, formatTime, getRelativeTime, getTagColor, replacePlaceholder, titleCase, };
|
|
18
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/services/format.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU,GAAG,OAAO,GAAG,MAAM,CAAA;AACzC,oBAAY,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;AAE9C,QAAA,MAAM,WAAW;;;CAGP,CAAA;AAEV,QAAA,MAAM,SAAS,UAAW,MAAM,KAAG,MAM8B,CAAA;AAEjE,QAAA,MAAM,kBAAkB,UAAW,MAAM,KAAG,MAAiD,CAAA;AAE7F,QAAA,MAAM,kBAAkB,aAAc,MAAM,mBAAmB,MAAM,EAAE,KAAG,MACoB,CAAA;AAE9F,QAAA,MAAM,cAAc,WACV,MAAM,gDAGL,KAAK,KAAK,mBAAmB,EAAE,OAAO,GAAG,UAAU,CAAC,KAC5D,MAQgB,CAAA;AAQnB,QAAA,MAAM,UAAU,UAAW,SAAS,WAAU,UAAU,sBAA+B,MAKxD,CAAA;AAE/B,QAAA,MAAM,UAAU,UACP,SAAS,6BAEP,KAAK,qBAAqB,KAClC,MAO4B,CAAA;AAE/B,QAAA,MAAM,cAAc,UACX,SAAS,6BAEP,KAAK,qBAAqB,KAClC,MAQ4B,CAAA;AAE/B,QAAA,MAAM,eAAe,UAAW,SAAS,eAAc,SAAS,sBAA+B,MAa9F,CAAA;AAED,QAAA,MAAM,iBAAiB,WArEb,MAAM,gDAGL,KAAK,KAAK,mBAAmB,EAAE,OAAO,GAAG,UAAU,CAAC,KAC5D,MAiEqC,CAAA;AAExC,QAAA,MAAM,iBAAiB,WAvEb,MAAM,gDAGL,KAAK,KAAK,mBAAmB,EAAE,OAAO,GAAG,UAAU,CAAC,KAC5D,MAmEqC,CAAA;AAExC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,SAAS,GACV,CAAA"}
|
|
@@ -7,3 +7,4 @@ export { extractErrorMessage, getApiErrorMessage } from './error';
|
|
|
7
7
|
export { formatArrayToOptions, sortData } from './collection';
|
|
8
8
|
export type { NamedOptionSource, SortConfig, SortDirection } from './collection';
|
|
9
9
|
export { isValidEmail, isValidLength, isValidNuban, isValidPin } from './validation';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC7D,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -3,3 +3,4 @@ declare const range: (start: number, end: number) => number[];
|
|
|
3
3
|
declare type CalculationOperator = 'add' | 'subtract' | 'multiply' | 'divide';
|
|
4
4
|
declare const calculateAmount: (firstOperand: number, secondOperand: number, operator: CalculationOperator) => Decimal;
|
|
5
5
|
export { range, calculateAmount };
|
|
6
|
+
//# sourceMappingURL=number.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/services/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,QAAA,MAAM,KAAK,UAAW,MAAM,OAAO,MAAM,aAGxC,CAAA;AAED,aAAK,mBAAmB,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAA;AAErE,QAAA,MAAM,eAAe,iBAAkB,MAAM,iBAAiB,MAAM,YAAY,mBAAmB,KAAG,OAkCrG,CAAA;AAED,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/services/query.ts"],"names":[],"mappings":"AAAA,aAAK,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;AAC9D,aAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,EAAE,CAAC,CAAA;AAE5D,QAAA,MAAM,iBAAiB,mCAAkC,eASxD,CAAA;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA;AAC5B,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -3,3 +3,4 @@ declare const isValidLength: (value: string, minLength?: number) => boolean;
|
|
|
3
3
|
declare const isValidPin: (pin: string, length?: number) => boolean;
|
|
4
4
|
declare const isValidNuban: (accountNumber: string, bankCode: string) => boolean;
|
|
5
5
|
export { isValidEmail, isValidLength, isValidNuban, isValidPin };
|
|
6
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/services/validation.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,YAAY,UAAW,MAAM,KAAG,OAAmD,CAAA;AAEzF,QAAA,MAAM,aAAa,UAAW,MAAM,yBAAkB,OAAoC,CAAA;AAE1F,QAAA,MAAM,UAAU,QAAS,MAAM,sBAAe,OAAmD,CAAA;AAEjG,QAAA,MAAM,YAAY,kBAAmB,MAAM,YAAY,MAAM,KAAG,OAK/D,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savantlink/sdk",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.28",
|
|
4
4
|
"description": "A package that contains reusable components and services for the SavantLink design system and architecture.",
|
|
5
5
|
"homepage": "https://github.com/savantlink/savantlink-sdk",
|
|
6
6
|
"repository": {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js");let t=null;exports.initializeNotificationSound=()=>e.__awaiter(void 0,void 0,void 0,function*(){null!=t||(t=new AudioContext),"suspended"===t.state&&(yield t.resume())}),exports.playNotificationSound=()=>{if(!t||"running"!==t.state)return;const e=t.currentTime,playTone=(e,i,n)=>{if(!t)return;const o=t.createOscillator(),s=t.createGain();o.type="sine",o.frequency.setValueAtTime(e,i),s.gain.setValueAtTime(.06,i),s.gain.exponentialRampToValueAtTime(.001,i+n),o.connect(s),s.connect(t.destination),o.start(i),o.stop(i+n)};playTone(660,e,.15),playTone(880,e+.12,.18)};
|
|
2
|
-
//# sourceMappingURL=notification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","sources":["../../../assets/sounds/notification.ts"],"sourcesContent":["let audioContext: AudioContext | null = null;\n\nexport const initializeNotificationSound = async () => {\n audioContext ??= new AudioContext();\n\n if (audioContext.state === \"suspended\") {\n await audioContext.resume();\n }\n};\n\nexport const playNotificationSound = () => {\n if (!audioContext || audioContext.state !== \"running\") {\n return;\n }\n\n const now = audioContext.currentTime;\n\n const playTone = (frequency: number, startTime: number, duration: number) => {\n if (!audioContext) {\n return;\n }\n\n const oscillator = audioContext.createOscillator();\n const gain = audioContext.createGain();\n\n oscillator.type = \"sine\";\n oscillator.frequency.setValueAtTime(frequency, startTime);\n\n gain.gain.setValueAtTime(0.06, startTime);\n\n gain.gain.exponentialRampToValueAtTime(0.001, startTime + duration);\n\n oscillator.connect(gain);\n gain.connect(audioContext.destination);\n\n oscillator.start(startTime);\n oscillator.stop(startTime + duration);\n };\n\n // Soft two-note notification chime\n playTone(660, now, 0.15);\n playTone(880, now + 0.12, 0.18);\n};\n"],"names":["audioContext","AudioContext","state","resume","now","currentTime","playTone","frequency","startTime","duration","oscillator","createOscillator","gain","createGain","type","setValueAtTime","exponentialRampToValueAtTime","connect","destination","start","stop"],"mappings":"+HAAA,IAAIA,EAAoC,yCAEG,iDACzCA,UAAAA,EAAiB,IAAIC,cAEM,cAAvBD,EAAaE,cACTF,EAAaG,SAEvB,iCAEqC,KACnC,IAAKH,GAAuC,YAAvBA,EAAaE,MAChC,OAGF,MAAME,EAAMJ,EAAaK,YAEnBC,SAAW,CAACC,EAAmBC,EAAmBC,KACtD,IAAKT,EACH,OAGF,MAAMU,EAAaV,EAAaW,mBAC1BC,EAAOZ,EAAaa,aAE1BH,EAAWI,KAAO,OAClBJ,EAAWH,UAAUQ,eAAeR,EAAWC,GAE/CI,EAAKA,KAAKG,eAAe,IAAMP,GAE/BI,EAAKA,KAAKI,6BAA6B,KAAOR,EAAYC,GAE1DC,EAAWO,QAAQL,GACnBA,EAAKK,QAAQjB,EAAakB,aAE1BR,EAAWS,MAAMX,GACjBE,EAAWU,KAAKZ,EAAYC,IAI9BH,SAAS,IAAKF,EAAK,KACnBE,SAAS,IAAKF,EAAM,IAAM"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),i=require("../assets/sounds/notification.js"),o=require("../hooks/use-notification-stream.js");require("decimal.js-light");const n=t.createContext(void 0);exports.NotificationProvider=({children:r,baseAPIUrl:s,notificationsData:a,markAllNotificationsAsRead:c,markNotificationAsRead:d})=>{const[u,l]=t.useState([]),[f,w]=t.useState(new Set),m=t.useCallback(e=>{l(t=>t.some(t=>t.id===e.id)?t:[e,...t]),i.playNotificationSound()},[]),{isConnected:v}=o.default({baseAPIUrl:s,onNotification:m}),N=t.useMemo(()=>{const e=null!=a?a:[],t=new Map;for(const i of[...u,...e])f.has(i.id)||t.set(i.id,i);return Array.from(t.values()).sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())},[u,a,f]),h=N.length,p=t.useCallback(e=>{w(t=>{const i=new Set(t);return i.add(e),i}),d(e)},[d]),A=t.useCallback(()=>{const e=N.map(e=>e.id);w(t=>{const i=new Set(t);return e.forEach(e=>i.add(e)),i}),c()},[N,c]);return t.useEffect(()=>{const enableNotificationSound=()=>{i.initializeNotificationSound()};return window.addEventListener("pointerdown",enableNotificationSound,{once:!0}),()=>{window.removeEventListener("pointerdown",enableNotificationSound)}},[]),e.jsx(n.Provider,Object.assign({value:{notifications:N,unreadCount:h,isConnected:v,readNotification:p,readAllNotifications:A}},{children:r}),void 0)},exports.useNotifications=()=>{const e=t.useContext(n);if(!e)throw new Error("useNotifications must be used within NotificationProvider");return e};
|
|
2
|
-
//# sourceMappingURL=NotificationContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationContext.js","sources":["../../src/context/NotificationContext.tsx"],"sourcesContent":["'use client'\n\nimport { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'\nimport type { ReactNode } from 'react'\n\nimport { initializeNotificationSound, playNotificationSound } from '../../assets/sounds/notification'\n\nimport { useNotificationStream } from '@/hooks'\nimport { Notification } from '@/hooks/use-notification-stream'\n\nexport type NotificationContextValue = {\n notifications: Notification[]\n unreadCount: number\n isConnected: boolean\n readNotification: (id: string) => void\n readAllNotifications: () => void\n}\n\nexport type NotificationProviderProps = {\n children: ReactNode\n baseAPIUrl: string\n notificationsData: Notification[]\n markNotificationAsRead: (id: string) => void\n markAllNotificationsAsRead: () => void\n}\n\nconst NotificationContext = createContext<NotificationContextValue | undefined>(undefined)\n\nexport const NotificationProvider = ({\n children,\n baseAPIUrl,\n notificationsData,\n markAllNotificationsAsRead,\n markNotificationAsRead,\n}: NotificationProviderProps) => {\n /**\n * Notifications received during the current SSE session.\n */\n const [realtimeNotifications, setRealtimeNotifications] = useState<Notification[]>([])\n\n /**\n * Allows us to optimistically hide notifications immediately\n * without waiting for the notifications query to refetch.\n */\n const [readNotificationIds, setReadNotificationIds] = useState<Set<string>>(new Set())\n\n const handleNotification = useCallback((notification: Notification) => {\n setRealtimeNotifications((current) => {\n /**\n * Protect against the same SSE notification being\n * received more than once.\n */\n if (current.some((item) => item.id === notification.id)) {\n return current\n }\n\n return [notification, ...current]\n })\n\n playNotificationSound()\n }, [])\n\n const { isConnected } = useNotificationStream({\n baseAPIUrl,\n onNotification: handleNotification,\n })\n\n /**\n * Merge:\n *\n * 1. Newly received SSE notifications\n * 2. Persisted notifications returned by the API\n *\n * Map prevents duplicates when an SSE notification later\n * appears in a query/refetch response.\n */\n const notifications = useMemo(() => {\n const persistedNotifications = notificationsData ?? []\n\n const notificationMap = new Map<string, Notification>()\n\n for (const notification of [...realtimeNotifications, ...persistedNotifications]) {\n if (readNotificationIds.has(notification.id)) {\n continue\n }\n\n notificationMap.set(notification.id, notification)\n }\n\n return Array.from(notificationMap.values()).sort(\n (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()\n )\n }, [realtimeNotifications, notificationsData, readNotificationIds])\n\n const unreadCount = notifications.length\n\n const readNotification = useCallback(\n (id: string) => {\n /**\n * Optimistically remove it from the UI.\n */\n setReadNotificationIds((current) => {\n const updated = new Set(current)\n\n updated.add(id)\n\n return updated\n })\n\n markNotificationAsRead(id)\n },\n [markNotificationAsRead]\n )\n\n const readAllNotifications = useCallback(() => {\n const notificationIds = notifications.map((notification) => notification.id)\n\n /**\n * Optimistically mark everything currently visible\n * as read.\n */\n setReadNotificationIds((current) => {\n const updated = new Set(current)\n\n notificationIds.forEach((id) => updated.add(id))\n\n return updated\n })\n\n markAllNotificationsAsRead()\n }, [notifications, markAllNotificationsAsRead])\n\n /**\n * Browsers require user interaction before audio\n * can be played.\n */\n useEffect(() => {\n const enableNotificationSound = () => {\n initializeNotificationSound()\n }\n\n window.addEventListener('pointerdown', enableNotificationSound, {\n once: true,\n })\n\n return () => {\n window.removeEventListener('pointerdown', enableNotificationSound)\n }\n }, [])\n\n return (\n <NotificationContext.Provider\n value={{\n notifications,\n unreadCount,\n isConnected,\n readNotification,\n readAllNotifications,\n }}\n >\n {children}\n </NotificationContext.Provider>\n )\n}\n\nexport const useNotifications = () => {\n const context = useContext(NotificationContext)\n\n if (!context) {\n throw new Error('useNotifications must be used within NotificationProvider')\n }\n\n return context\n}\n"],"names":["NotificationContext","createContext","undefined","children","baseAPIUrl","notificationsData","markAllNotificationsAsRead","markNotificationAsRead","realtimeNotifications","setRealtimeNotifications","useState","readNotificationIds","setReadNotificationIds","Set","handleNotification","useCallback","notification","current","some","item","id","playNotificationSound","isConnected","useNotificationStream","onNotification","notifications","useMemo","persistedNotifications","notificationMap","Map","has","set","Array","from","values","sort","a","b","Date","createdAt","getTime","unreadCount","length","readNotification","updated","add","readAllNotifications","notificationIds","map","forEach","useEffect","enableNotificationSound","initializeNotificationSound","window","addEventListener","once","removeEventListener","_jsx","Provider","value","context","useContext","Error"],"mappings":"qPA0BA,MAAMA,EAAsBC,qBAAoDC,gCAE5C,EAClCC,WACAC,aACAC,oBACAC,6BACAC,6BAKA,MAAOC,EAAuBC,GAA4BC,WAAyB,KAM5EC,EAAqBC,GAA0BF,WAAsB,IAAIG,KAE1EC,EAAqBC,cAAaC,IACtCP,EAA0BQ,GAKpBA,EAAQC,KAAMC,GAASA,EAAKC,KAAOJ,EAAaI,IAC3CH,EAGF,CAACD,KAAiBC,IAG3BI,2BACC,KAEGC,YAAEA,GAAgBC,UAAsB,CAC5CnB,aACAoB,eAAgBV,IAYZW,EAAgBC,UAAQ,KAC5B,MAAMC,EAAyBtB,QAAAA,EAAqB,GAE9CuB,EAAkB,IAAIC,IAE5B,IAAK,MAAMb,IAAgB,IAAIR,KAA0BmB,GACnDhB,EAAoBmB,IAAId,EAAaI,KAIzCQ,EAAgBG,IAAIf,EAAaI,GAAIJ,GAGvC,OAAOgB,MAAMC,KAAKL,EAAgBM,UAAUC,KAC1C,CAACC,EAAGC,IAAM,IAAIC,KAAKD,EAAEE,WAAWC,UAAY,IAAIF,KAAKF,EAAEG,WAAWC,YAEnE,CAAChC,EAAuBH,EAAmBM,IAExC8B,EAAchB,EAAciB,OAE5BC,EAAmB5B,cACtBK,IAICR,EAAwBK,IACtB,MAAM2B,EAAU,IAAI/B,IAAII,GAIxB,OAFA2B,EAAQC,IAAIzB,GAELwB,IAGTrC,EAAuBa,IAEzB,CAACb,IAGGuC,EAAuB/B,cAAY,KACvC,MAAMgC,EAAkBtB,EAAcuB,IAAKhC,GAAiBA,EAAaI,IAMzER,EAAwBK,IACtB,MAAM2B,EAAU,IAAI/B,IAAII,GAIxB,OAFA8B,EAAgBE,QAAS7B,GAAOwB,EAAQC,IAAIzB,IAErCwB,IAGTtC,KACC,CAACmB,EAAenB,IAoBnB,OAdA4C,YAAU,KACR,MAAMC,wBAA0B,KAC9BC,iCAOF,OAJAC,OAAOC,iBAAiB,cAAeH,wBAAyB,CAC9DI,MAAM,IAGD,KACLF,OAAOG,oBAAoB,cAAeL,2BAE3C,IAGDM,MAACzD,EAAoB0D,wBACnBC,MAAO,CACLlC,gBACAgB,cACAnB,cACAqB,mBACAG,mCAGD3C,sCAKyB,KAC9B,MAAMyD,EAAUC,aAAW7D,GAE3B,IAAK4D,EACH,MAAM,IAAIE,MAAM,6DAGlB,OAAOF"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./use-sse.js");exports.default=({baseAPIUrl:n,enabled:t=!0,onNotification:o})=>e.useSSE({url:`${n}/api/v1/notifications/stream`,event:"notification",enabled:t,withCredentials:!0,onMessage:o,onOpen:()=>{},onConnected:()=>{},onError:()=>{}});
|
|
2
|
-
//# sourceMappingURL=use-notification-stream.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-notification-stream.js","sources":["../../src/hooks/use-notification-stream.ts"],"sourcesContent":["'use client'\n\nimport { useSSE } from './use-sse'\n\nexport type Notification = {\n id: string\n type: string\n title: string\n message: string\n actionUrl: string\n createdAt: string\n}\n\ntype UseNotificationStreamOptions = {\n baseAPIUrl: string\n onNotification: (notification: Notification) => void\n enabled?: boolean\n}\n\nconst useNotificationStream = ({ baseAPIUrl, enabled = true, onNotification }: UseNotificationStreamOptions) => {\n return useSSE<Notification>({\n url: `${baseAPIUrl}/api/v1/notifications/stream`,\n\n event: 'notification',\n\n enabled,\n\n withCredentials: true,\n\n onMessage: onNotification,\n\n onOpen: () => {\n // console.log(\"Notification SSE request opened\");\n },\n\n onConnected: () => {\n // console.log(\n // \"Notification stream confirmed by server\",\n // );\n },\n\n onError: () => {\n // console.warn(\n // \"Notification stream disconnected or reconnecting\",\n // );\n },\n })\n}\n\nexport default useNotificationStream\n"],"names":["baseAPIUrl","enabled","onNotification","useSSE","url","event","withCredentials","onMessage","onOpen","onConnected","onError"],"mappings":"kHAmB8B,EAAGA,aAAYC,WAAU,EAAMC,oBACpDC,SAAqB,CAC1BC,IAAK,GAAGJ,gCAERK,MAAO,eAEPJ,UAEAK,iBAAiB,EAEjBC,UAAWL,EAEXM,OAAQ,OAIRC,YAAa,OAMbC,QAAS"}
|
package/dist/hooks/use-sound.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");const playTone=(e,{duration:t=.065,endFrequency:n,peakVolume:a,startFrequency:r,startTime:u=e.currentTime})=>{const i=e.createOscillator(),o=e.createGain();i.type="sine",i.frequency.setValueAtTime(r,u),n&&i.frequency.exponentialRampToValueAtTime(n,u+Math.min(.045,t)),o.gain.setValueAtTime(1e-4,u),o.gain.exponentialRampToValueAtTime(a,u+Math.min(.008,t/3)),o.gain.exponentialRampToValueAtTime(1e-4,u+t),i.connect(o),o.connect(e.destination),i.start(u),i.stop(u+t)};exports.default=()=>{const t=e.useRef(null),n=e.useCallback(()=>{var e;const n=(()=>{if("undefined"==typeof window)return null;const e=window;return window.AudioContext||e.webkitAudioContext||null})();if(!n)return null;const a=null!==(e=t.current)&&void 0!==e?e:new n({latencyHint:"interactive"});return t.current=a,"suspended"===a.state&&a.resume().catch(()=>{}),a},[]);return{playAddCartSound:e.useCallback(()=>{const e=n();e&&"running"===e.state&&playTone(e,{endFrequency:920,peakVolume:.075,startFrequency:620})},[n]),playRemoveCartSound:e.useCallback(()=>{const e=n();e&&"running"===e.state&&playTone(e,{endFrequency:360,peakVolume:.065,startFrequency:640})},[n]),playNotificationSound:e.useCallback(()=>{const e=n();if(!e||"running"!==e.state)return;const t=e.currentTime;playTone(e,{duration:.15,peakVolume:.06,startFrequency:660,startTime:t}),playTone(e,{duration:.18,peakVolume:.06,startFrequency:880,startTime:t+.12})},[n])}};
|
|
2
|
-
//# sourceMappingURL=use-sound.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-sound.js","sources":["../../src/hooks/use-sound.ts"],"sourcesContent":["import { useCallback, useRef } from \"react\";\n\ntype AudioContextConstructor = typeof AudioContext;\n\ntype WindowWithWebkitAudio = Window & {\n webkitAudioContext?: AudioContextConstructor;\n};\n\nconst getAudioContextConstructor = () => {\n if (typeof window === \"undefined\") {\n return null;\n }\n\n const audioWindow = window as WindowWithWebkitAudio;\n\n return window.AudioContext || audioWindow.webkitAudioContext || null;\n};\n\nconst playTone = (\n audioContext: AudioContext,\n {\n duration = 0.065,\n endFrequency,\n peakVolume,\n startFrequency,\n startTime = audioContext.currentTime,\n }: {\n duration?: number;\n endFrequency?: number;\n peakVolume: number;\n startFrequency: number;\n startTime?: number;\n },\n) => {\n const oscillator = audioContext.createOscillator();\n const gain = audioContext.createGain();\n\n oscillator.type = \"sine\";\n\n oscillator.frequency.setValueAtTime(startFrequency, startTime);\n\n if (endFrequency) {\n oscillator.frequency.exponentialRampToValueAtTime(\n endFrequency,\n startTime + Math.min(0.045, duration),\n );\n }\n\n gain.gain.setValueAtTime(0.0001, startTime);\n gain.gain.exponentialRampToValueAtTime(\n peakVolume,\n startTime + Math.min(0.008, duration / 3),\n );\n gain.gain.exponentialRampToValueAtTime(0.0001, startTime + duration);\n\n oscillator.connect(gain);\n gain.connect(audioContext.destination);\n\n oscillator.start(startTime);\n oscillator.stop(startTime + duration);\n};\n\nconst useSound = () => {\n const audioContextRef = useRef<AudioContext | null>(null);\n\n const getAudioContext = useCallback(() => {\n const AudioContextCtor = getAudioContextConstructor();\n\n if (!AudioContextCtor) {\n return null;\n }\n\n const audioContext =\n audioContextRef.current ??\n new AudioContextCtor({\n latencyHint: \"interactive\",\n });\n\n audioContextRef.current = audioContext;\n\n if (audioContext.state === \"suspended\") {\n audioContext.resume().catch(() => undefined);\n }\n\n return audioContext;\n }, []);\n\n const playAddCartSound = useCallback(() => {\n const audioContext = getAudioContext();\n\n if (!audioContext || audioContext.state !== \"running\") {\n return;\n }\n\n playTone(audioContext, {\n endFrequency: 920,\n peakVolume: 0.075,\n startFrequency: 620,\n });\n }, [getAudioContext]);\n\n const playRemoveCartSound = useCallback(() => {\n const audioContext = getAudioContext();\n\n if (!audioContext || audioContext.state !== \"running\") {\n return;\n }\n\n playTone(audioContext, {\n endFrequency: 360,\n peakVolume: 0.065,\n startFrequency: 640,\n });\n }, [getAudioContext]);\n\n const playNotificationSound = useCallback(() => {\n const audioContext = getAudioContext();\n\n if (!audioContext || audioContext.state !== \"running\") {\n return;\n }\n\n const now = audioContext.currentTime;\n\n // Soft two-note notification chime\n playTone(audioContext, {\n duration: 0.15,\n peakVolume: 0.06,\n startFrequency: 660,\n startTime: now,\n });\n\n playTone(audioContext, {\n duration: 0.18,\n peakVolume: 0.06,\n startFrequency: 880,\n startTime: now + 0.12,\n });\n }, [getAudioContext]);\n\n return {\n playAddCartSound,\n playRemoveCartSound,\n playNotificationSound,\n };\n};\n\nexport default useSound\n"],"names":["playTone","audioContext","duration","endFrequency","peakVolume","startFrequency","startTime","currentTime","oscillator","createOscillator","gain","createGain","type","frequency","setValueAtTime","exponentialRampToValueAtTime","Math","min","connect","destination","start","stop","audioContextRef","useRef","getAudioContext","useCallback","AudioContextCtor","window","audioWindow","AudioContext","webkitAudioContext","getAudioContextConstructor","current","latencyHint","state","resume","catch","playAddCartSound","playRemoveCartSound","playNotificationSound","now"],"mappings":"2FAQA,MAUMA,SAAW,CACfC,GAEEC,WAAW,KACXC,eACAC,aACAC,iBACAC,YAAYL,EAAaM,gBAS3B,MAAMC,EAAaP,EAAaQ,mBAC1BC,EAAOT,EAAaU,aAE1BH,EAAWI,KAAO,OAElBJ,EAAWK,UAAUC,eAAeT,EAAgBC,GAEhDH,GACFK,EAAWK,UAAUE,6BACnBZ,EACAG,EAAYU,KAAKC,IAAI,KAAOf,IAIhCQ,EAAKA,KAAKI,eAAe,KAAQR,GACjCI,EAAKA,KAAKK,6BACRX,EACAE,EAAYU,KAAKC,IAAI,KAAOf,EAAW,IAEzCQ,EAAKA,KAAKK,6BAA6B,KAAQT,EAAYJ,GAE3DM,EAAWU,QAAQR,GACnBA,EAAKQ,QAAQjB,EAAakB,aAE1BX,EAAWY,MAAMd,GACjBE,EAAWa,KAAKf,EAAYJ,oBAGb,KACf,MAAMoB,EAAkBC,SAA4B,MAE9CC,EAAkBC,cAAY,WAClC,MAAMC,EA1DyB,MACjC,GAAsB,oBAAXC,OACT,OAAO,KAGT,MAAMC,EAAcD,OAEpB,OAAOA,OAAOE,cAAgBD,EAAYE,oBAAsB,MAmDrCC,GAEzB,IAAKL,EACH,OAAO,KAGT,MAAMzB,YACJqB,EAAgBU,uBAChB,IAAIN,EAAiB,CACnBO,YAAa,gBASjB,OANAX,EAAgBU,QAAU/B,EAEC,cAAvBA,EAAaiC,OACfjC,EAAakC,SAASC,MAAM,QAGvBnC,GACN,IAuDH,MAAO,CACLoC,iBAtDuBZ,cAAY,KACnC,MAAMxB,EAAeuB,IAEhBvB,GAAuC,YAAvBA,EAAaiC,OAIlClC,SAASC,EAAc,CACrBE,aAAc,IACdC,WAAY,KACZC,eAAgB,OAEjB,CAACmB,IA2CFc,oBAzC0Bb,cAAY,KACtC,MAAMxB,EAAeuB,IAEhBvB,GAAuC,YAAvBA,EAAaiC,OAIlClC,SAASC,EAAc,CACrBE,aAAc,IACdC,WAAY,KACZC,eAAgB,OAEjB,CAACmB,IA8BFe,sBA5B4Bd,cAAY,KACxC,MAAMxB,EAAeuB,IAErB,IAAKvB,GAAuC,YAAvBA,EAAaiC,MAChC,OAGF,MAAMM,EAAMvC,EAAaM,YAGzBP,SAASC,EAAc,CACrBC,SAAU,IACVE,WAAY,IACZC,eAAgB,IAChBC,UAAWkC,IAGbxC,SAASC,EAAc,CACrBC,SAAU,IACVE,WAAY,IACZC,eAAgB,IAChBC,UAAWkC,EAAM,OAElB,CAAChB"}
|
package/dist/hooks/use-sse.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useSSE=({url:n,event:t="message",enabled:r=!0,withCredentials:s=!0,onMessage:c,onOpen:o,onConnected:u,onError:a})=>{const[d,i]=e.useState("idle"),v=e.useRef(c),l=e.useRef(o),E=e.useRef(u),f=e.useRef(a);return e.useEffect(()=>{v.current=c},[c]),e.useEffect(()=>{l.current=o},[o]),e.useEffect(()=>{E.current=u},[u]),e.useEffect(()=>{f.current=a},[a]),e.useEffect(()=>{if(!r||!n)return void i("idle");i("connecting");const e=new EventSource(n,{withCredentials:s}),handleOpen=()=>{var e;null===(e=l.current)||void 0===e||e.call(l)},handleConnected=()=>{var e;i("connected"),null===(e=E.current)||void 0===e||e.call(E)},parseMessage=e=>{try{const n=JSON.parse(e.data);v.current(n)}catch(e){}},handleMessage=e=>{parseMessage(e)},handleCustomMessage=e=>{parseMessage(e)},handleError=n=>{var t;e.readyState===EventSource.CONNECTING?i("connecting"):i("error"),null===(t=f.current)||void 0===t||t.call(f,n)};return e.addEventListener("open",handleOpen),e.addEventListener("connected",handleConnected),"message"===t?e.addEventListener("message",handleMessage):e.addEventListener(t,handleCustomMessage),e.addEventListener("error",handleError),()=>{e.removeEventListener("open",handleOpen),e.removeEventListener("connected",handleConnected),"message"===t?e.removeEventListener("message",handleMessage):e.removeEventListener(t,handleCustomMessage),e.removeEventListener("error",handleError),e.close(),i("idle")}},[n,t,r,s]),{status:d,isConnected:"connected"===d}};
|
|
2
|
-
//# sourceMappingURL=use-sse.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-sse.js","sources":["../../src/hooks/use-sse.tsx"],"sourcesContent":["'use client'\n\nimport { useEffect, useRef, useState } from 'react'\n\ntype SSEStatus = 'idle' | 'connecting' | 'connected' | 'error'\n\ntype UseSSEOptions<T> = {\n url: string\n event?: string\n enabled?: boolean\n withCredentials?: boolean\n\n onMessage: (data: T) => void\n\n onOpen?: () => void\n onConnected?: () => void\n onError?: (event: Event) => void\n}\n\nexport const useSSE = <T,>({\n url,\n event = 'message',\n enabled = true,\n withCredentials = true,\n onMessage,\n onOpen,\n onConnected,\n onError,\n}: UseSSEOptions<T>) => {\n const [status, setStatus] = useState<SSEStatus>('idle')\n\n const onMessageRef = useRef(onMessage)\n const onOpenRef = useRef(onOpen)\n const onConnectedRef = useRef(onConnected)\n const onErrorRef = useRef(onError)\n\n useEffect(() => {\n onMessageRef.current = onMessage\n }, [onMessage])\n\n useEffect(() => {\n onOpenRef.current = onOpen\n }, [onOpen])\n\n useEffect(() => {\n onConnectedRef.current = onConnected\n }, [onConnected])\n\n useEffect(() => {\n onErrorRef.current = onError\n }, [onError])\n\n useEffect(() => {\n if (!enabled || !url) {\n setStatus('idle')\n\n return\n }\n\n setStatus('connecting')\n\n const eventSource = new EventSource(url, {\n withCredentials,\n })\n\n const handleOpen = () => {\n // console.log(\"SSE HTTP connection opened\");\n\n onOpenRef.current?.()\n }\n\n const handleConnected = () => {\n // console.log(\"Server confirmed SSE connection\");\n\n setStatus('connected')\n\n onConnectedRef.current?.()\n }\n\n const parseMessage = (messageEvent: MessageEvent<string>) => {\n try {\n const data = JSON.parse(messageEvent.data) as T\n\n onMessageRef.current(data)\n } catch (error) {\n // console.error(\"Invalid SSE payload:\", error);\n }\n }\n\n const handleMessage = (messageEvent: MessageEvent<string>) => {\n parseMessage(messageEvent)\n }\n\n /**\n * Custom SSE events are typed by addEventListener as Event,\n * so convert it to MessageEvent here instead of casting to\n * the global EventListener type.\n */\n const handleCustomMessage = (customEvent: Event) => {\n parseMessage(customEvent as MessageEvent<string>)\n }\n\n const handleError = (errorEvent: Event) => {\n /**\n * EventSource reconnects automatically when the connection\n * is temporarily interrupted.\n */\n if (eventSource.readyState === EventSource.CONNECTING) {\n setStatus('connecting')\n } else {\n setStatus('error')\n }\n\n onErrorRef.current?.(errorEvent)\n }\n\n eventSource.addEventListener('open', handleOpen)\n\n eventSource.addEventListener('connected', handleConnected)\n\n if (event === 'message') {\n eventSource.addEventListener('message', handleMessage)\n } else {\n eventSource.addEventListener(event, handleCustomMessage)\n }\n\n eventSource.addEventListener('error', handleError)\n\n return () => {\n eventSource.removeEventListener('open', handleOpen)\n\n eventSource.removeEventListener('connected', handleConnected)\n\n if (event === 'message') {\n eventSource.removeEventListener('message', handleMessage)\n } else {\n eventSource.removeEventListener(event, handleCustomMessage)\n }\n\n eventSource.removeEventListener('error', handleError)\n\n eventSource.close()\n\n setStatus('idle')\n }\n }, [url, event, enabled, withCredentials])\n\n return {\n status,\n isConnected: status === 'connected',\n }\n}\n"],"names":["url","event","enabled","withCredentials","onMessage","onOpen","onConnected","onError","status","setStatus","useState","onMessageRef","useRef","onOpenRef","onConnectedRef","onErrorRef","useEffect","current","eventSource","EventSource","handleOpen","handleConnected","parseMessage","messageEvent","data","JSON","parse","error","handleMessage","handleCustomMessage","customEvent","handleError","errorEvent","readyState","CONNECTING","addEventListener","removeEventListener","close","isConnected"],"mappings":"0GAmBsB,EACpBA,MACAC,QAAQ,UACRC,WAAU,EACVC,mBAAkB,EAClBC,YACAC,SACAC,cACAC,cAEA,MAAOC,EAAQC,GAAaC,WAAoB,QAE1CC,EAAeC,SAAOR,GACtBS,EAAYD,SAAOP,GACnBS,EAAiBF,SAAON,GACxBS,EAAaH,SAAOL,GAiH1B,OA/GAS,YAAU,KACRL,EAAaM,QAAUb,GACtB,CAACA,IAEJY,YAAU,KACRH,EAAUI,QAAUZ,GACnB,CAACA,IAEJW,YAAU,KACRF,EAAeG,QAAUX,GACxB,CAACA,IAEJU,YAAU,KACRD,EAAWE,QAAUV,GACpB,CAACA,IAEJS,YAAU,KACR,IAAKd,IAAYF,EAGf,YAFAS,EAAU,QAKZA,EAAU,cAEV,MAAMS,EAAc,IAAIC,YAAYnB,EAAK,CACvCG,oBAGIiB,WAAa,qBAGjBP,EAAUI,6BAAVJ,IAGIQ,gBAAkB,WAGtBZ,EAAU,uBAEVK,EAAeG,6BAAfH,IAGIQ,aAAgBC,IACpB,IACE,MAAMC,EAAOC,KAAKC,MAAMH,EAAaC,MAErCb,EAAaM,QAAQO,GACrB,MAAOG,MAKLC,cAAiBL,IACrBD,aAAaC,IAQTM,oBAAuBC,IAC3BR,aAAaQ,IAGTC,YAAeC,UAKfd,EAAYe,aAAed,YAAYe,WACzCzB,EAAU,cAEVA,EAAU,mBAGZM,EAAWE,6BAAXF,EAAqBiB,IAevB,OAZAd,EAAYiB,iBAAiB,OAAQf,YAErCF,EAAYiB,iBAAiB,YAAad,iBAE5B,YAAVpB,EACFiB,EAAYiB,iBAAiB,UAAWP,eAExCV,EAAYiB,iBAAiBlC,EAAO4B,qBAGtCX,EAAYiB,iBAAiB,QAASJ,aAE/B,KACLb,EAAYkB,oBAAoB,OAAQhB,YAExCF,EAAYkB,oBAAoB,YAAaf,iBAE/B,YAAVpB,EACFiB,EAAYkB,oBAAoB,UAAWR,eAE3CV,EAAYkB,oBAAoBnC,EAAO4B,qBAGzCX,EAAYkB,oBAAoB,QAASL,aAEzCb,EAAYmB,QAEZ5B,EAAU,UAEX,CAACT,EAAKC,EAAOC,EAASC,IAElB,CACLK,SACA8B,YAAwB,cAAX9B"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { Notification } from "../hooks/use-notification-stream";
|
|
3
|
-
export declare type NotificationContextValue = {
|
|
4
|
-
notifications: Notification[];
|
|
5
|
-
unreadCount: number;
|
|
6
|
-
isConnected: boolean;
|
|
7
|
-
readNotification: (id: string) => void;
|
|
8
|
-
readAllNotifications: () => void;
|
|
9
|
-
};
|
|
10
|
-
export declare type NotificationProviderProps = {
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
baseAPIUrl: string;
|
|
13
|
-
notificationsData: Notification[];
|
|
14
|
-
markNotificationAsRead: (id: string) => void;
|
|
15
|
-
markAllNotificationsAsRead: () => void;
|
|
16
|
-
};
|
|
17
|
-
export declare const NotificationProvider: ({ children, baseAPIUrl, notificationsData, markAllNotificationsAsRead, markNotificationAsRead, }: NotificationProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare const useNotifications: () => NotificationContextValue;
|