@verifiedinc-public/shared-ui-elements 7.7.1 → 7.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.
@@ -0,0 +1 @@
1
+ "use strict";async function c({event:n,clientSalt:t}){const e=Date.now(),a=`${n}:${e}:${t}`,r=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(a)),i=Array.from(new Uint8Array(r)).map(o=>o.toString(16).padStart(2,"0")).join("");return{timestamp:e,signature:i,clientSalt:t}}export{c as p};
@@ -9,3 +9,4 @@ export * from './string';
9
9
  export * from './color';
10
10
  export * from './address';
11
11
  export * from './makeGoogleFont';
12
+ export * from './notification';
@@ -1 +1 @@
1
- "use strict";import{wrapPromise as a}from"./wrapPromise/index.mjs";import{f as s,b as o,a as r,c as e,s as t,t as m,u as i}from"../shared/uuidColor-CbuBMrIl.mjs";import{c as d,g as n,a as p,p as l,s as f,v as C}from"../shared/phone-cSkbYk4g.mjs";import{masks as T}from"./masks/index.mjs";import{o as g,s as h,a as F}from"../shared/ssn-I4gN8M-_.mjs";import{toCapitalize as y,toSentenceCase as D}from"./string/index.mjs";import{k as P}from"../shared/formatKebabToPretty-Du43TgPC.mjs";import{g as U}from"../shared/generateKeyFromString-D1AuwK4y.mjs";import{alpha as S,contrastColor as c,darken as u,getThemeFromPrimaryColor as Y,lighten as k}from"./color/index.mjs";import{addressFormatter as M,fromUSAddress as A,parseCountryCode as N,toUSaddress as _,toUSaddressPretty as b}from"./address/index.mjs";import{D as x,a as E,m as H}from"../shared/makeGoogleFont-pok2oDWs.mjs";export{x as DEFAULT_FONT_FAMILY,E as DEFAULT_FONT_WEIGHTS,M as addressFormatter,S as alpha,c as contrastColor,d as countries,u as darken,s as formatDateMMDDYYYY,o as formatDateMMYY,r as formatDateToTimestamp,e as formatExtendedDate,A as fromUSAddress,U as generateKeyFromString,n as getPhoneData,p as getPhoneDataByFieldName,Y as getThemeFromPrimaryColor,P as kebabCaseToPretty,k as lighten,H as makeGoogleFontUrl,T as masks,g as omitProperties,N as parseCountryCode,l as parseToPhoneNational,f as sortByCountryName,h as ssnFormatter,F as ssnRegex,t as stringToHashedColor,y as toCapitalize,D as toSentenceCase,_ as toUSaddress,b as toUSaddressPretty,m as toUTCMilliseconds,i as uuidToHashedColor,C as validatePhone,a as wrapPromise};
1
+ "use strict";import{wrapPromise as a}from"./wrapPromise/index.mjs";import{f as s,b as o,a as r,c as e,s as t,t as m,u as i}from"../shared/uuidColor-CbuBMrIl.mjs";import{c as n,g as p,a as d,p as f,s as l,v as C}from"../shared/phone-cSkbYk4g.mjs";import{masks as T}from"./masks/index.mjs";import{o as g,s as h,a as F}from"../shared/ssn-I4gN8M-_.mjs";import{toCapitalize as y,toSentenceCase as D}from"./string/index.mjs";import{k as P}from"../shared/formatKebabToPretty-Du43TgPC.mjs";import{g as S}from"../shared/generateKeyFromString-D1AuwK4y.mjs";import{alpha as U,contrastColor as c,darken as u,getThemeFromPrimaryColor as k,lighten as M}from"./color/index.mjs";import{addressFormatter as Y,fromUSAddress as A,parseCountryCode as N,toUSaddress as _,toUSaddressPretty as b}from"./address/index.mjs";import{D as x,a as E,m as H}from"../shared/makeGoogleFont-pok2oDWs.mjs";import{p as L}from"../shared/notification-sBaCxCY5.mjs";export{x as DEFAULT_FONT_FAMILY,E as DEFAULT_FONT_WEIGHTS,Y as addressFormatter,U as alpha,c as contrastColor,n as countries,u as darken,s as formatDateMMDDYYYY,o as formatDateMMYY,r as formatDateToTimestamp,e as formatExtendedDate,A as fromUSAddress,S as generateKeyFromString,p as getPhoneData,d as getPhoneDataByFieldName,k as getThemeFromPrimaryColor,P as kebabCaseToPretty,M as lighten,H as makeGoogleFontUrl,T as masks,g as omitProperties,N as parseCountryCode,f as parseToPhoneNational,L as prepareNotification,l as sortByCountryName,h as ssnFormatter,F as ssnRegex,t as stringToHashedColor,y as toCapitalize,D as toSentenceCase,_ as toUSaddress,b as toUSaddressPretty,m as toUTCMilliseconds,i as uuidToHashedColor,C as validatePhone,a as wrapPromise};
@@ -0,0 +1,15 @@
1
+ export type PrepareNotificationOptions = {
2
+ event: string;
3
+ clientSalt: string;
4
+ };
5
+ export type SignedNotification = {
6
+ timestamp: number;
7
+ signature: string;
8
+ clientSalt: string;
9
+ };
10
+ /**
11
+ * Prepares a notification by creating a unique signature and timestamp.
12
+ * @param options - The notification payload containing event and clientSalt.
13
+ * @returns A promise that resolves to the prepared notification object.
14
+ */
15
+ export declare function prepareNotification({ event, clientSalt, }: PrepareNotificationOptions): Promise<SignedNotification>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verifiedinc-public/shared-ui-elements",
3
- "version": "7.7.1",
3
+ "version": "7.8.0",
4
4
  "description": "A set of UI components, utilities that is shareable with the core apps.",
5
5
  "private": false,
6
6
  "keywords": [],