@trycourier/courier-react-17 8.1.0 → 8.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,24 @@
1
+ import { CourierToast as CourierToastElement } from '@trycourier/courier-ui-toast';
2
+ import { CourierToastProps } from '@trycourier/courier-react-components';
3
+ /**
4
+ * CourierToast React component.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * const courier = useCourier();
9
+ *
10
+ * useEffect(() => {
11
+ * // Generate a JWT for your user (do this on your backend server)
12
+ * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT
13
+ *
14
+ * // Authenticate the user with the inbox
15
+ * courier.shared.signIn({
16
+ * userId: $YOUR_USER_ID,
17
+ * jwt: jwt,
18
+ * });
19
+ * }, []);
20
+ *
21
+ * return <CourierToast />;
22
+ * ```
23
+ */
24
+ export declare const CourierToast: import('react').ForwardRefExoticComponent<CourierToastProps & import('react').RefAttributes<CourierToastElement>>;
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@trycourier/courier-js"),r=require("react/jsx-runtime"),t=require("react"),o=require("@trycourier/courier-react-components"),n=require("react-dom"),i=require("@trycourier/courier-ui-inbox");function u(e){const r=document.createElement("div");n.render(e,r);const t=r.firstElementChild;if(!(t instanceof HTMLElement))throw new Error("reactNodeToHTMLElement must return a single JSX element that renders to an HTMLElement (e.g., <div>)");return t}const s=t.forwardRef(((e,t)=>r.jsx(o.CourierRenderContext.Provider,{value:u,children:r.jsx(o.CourierInboxComponent,{...e,ref:t})})));s.displayName="CourierInbox";const a=t.forwardRef(((e,t)=>r.jsx(o.CourierRenderContext.Provider,{value:u,children:r.jsx(o.CourierInboxPopupMenuComponent,{...e,ref:t})})));a.displayName="CourierInboxPopupMenu",e.Courier.shared.courierUserAgentName="courier-react-17",e.Courier.shared.courierUserAgentVersion="8.1.0",Object.defineProperty(exports,"useCourier",{enumerable:!0,get:()=>o.useCourier}),Object.defineProperty(exports,"archiveMessage",{enumerable:!0,get:()=>i.archiveMessage}),Object.defineProperty(exports,"clickMessage",{enumerable:!0,get:()=>i.clickMessage}),Object.defineProperty(exports,"defaultDarkTheme",{enumerable:!0,get:()=>i.defaultDarkTheme}),Object.defineProperty(exports,"defaultLightTheme",{enumerable:!0,get:()=>i.defaultLightTheme}),Object.defineProperty(exports,"markAsRead",{enumerable:!0,get:()=>i.markAsRead}),Object.defineProperty(exports,"markAsUnread",{enumerable:!0,get:()=>i.markAsUnread}),Object.defineProperty(exports,"mergeTheme",{enumerable:!0,get:()=>i.mergeTheme}),Object.defineProperty(exports,"openMessage",{enumerable:!0,get:()=>i.openMessage}),exports.CourierInbox=s,exports.CourierInboxPopupMenu=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@trycourier/courier-js"),r=require("react/jsx-runtime"),t=require("react"),o=require("@trycourier/courier-react-components"),u=require("react-dom"),i=require("@trycourier/courier-ui-inbox"),n=require("@trycourier/courier-ui-toast");function a(e){const r=document.createElement("div");return u.render(e,r),r}const s=t.forwardRef(((e,t)=>r.jsx(o.CourierRenderContext.Provider,{value:a,children:r.jsx(o.CourierInboxComponent,{...e,ref:t})})));s.displayName="CourierInbox";const c=t.forwardRef(((e,t)=>r.jsx(o.CourierRenderContext.Provider,{value:a,children:r.jsx(o.CourierInboxPopupMenuComponent,{...e,ref:t})})));c.displayName="CourierInboxPopupMenu";const d=t.forwardRef(((e,t)=>r.jsx(o.CourierRenderContext.Provider,{value:a,children:r.jsx(o.CourierToastComponent,{...e,ref:t})})));d.displayName="CourierToast",e.Courier.shared.courierUserAgentName="courier-react-17",e.Courier.shared.courierUserAgentVersion="8.2.1",Object.defineProperty(exports,"useCourier",{enumerable:!0,get:()=>o.useCourier}),Object.defineProperty(exports,"archiveMessage",{enumerable:!0,get:()=>i.archiveMessage}),Object.defineProperty(exports,"clickMessage",{enumerable:!0,get:()=>i.clickMessage}),Object.defineProperty(exports,"defaultDarkTheme",{enumerable:!0,get:()=>i.defaultDarkTheme}),Object.defineProperty(exports,"defaultLightTheme",{enumerable:!0,get:()=>i.defaultLightTheme}),Object.defineProperty(exports,"markAsRead",{enumerable:!0,get:()=>i.markAsRead}),Object.defineProperty(exports,"markAsUnread",{enumerable:!0,get:()=>i.markAsUnread}),Object.defineProperty(exports,"mergeTheme",{enumerable:!0,get:()=>i.mergeTheme}),Object.defineProperty(exports,"openMessage",{enumerable:!0,get:()=>i.openMessage}),Object.defineProperty(exports,"defaultToastDarkTheme",{enumerable:!0,get:()=>n.defaultDarkTheme}),Object.defineProperty(exports,"defaultToastLightTheme",{enumerable:!0,get:()=>n.defaultLightTheme}),Object.defineProperty(exports,"mergeToastTheme",{enumerable:!0,get:()=>n.mergeTheme}),exports.CourierInbox=s,exports.CourierInboxPopupMenu=c,exports.CourierToast=d;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/utils/render.tsx","../src/components/courier-inbox.tsx","../src/components/courier-inbox-popup-menu.tsx","../src/index.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { render } from \"react-dom\";\n\n/**\n * Converts a React node to an HTMLElement.\n * @param node - The React node to convert.\n * @returns The converted HTMLElement.\n */\nexport function reactNodeToHTMLElement(node: ReactNode): HTMLElement {\n const container = document.createElement('div');\n\n render(node, container);\n\n const element = container.firstElementChild;\n if (!(element instanceof HTMLElement)) {\n throw new Error(\n 'reactNodeToHTMLElement must return a single JSX element that renders to an HTMLElement (e.g., <div>)'\n );\n }\n\n return element;\n}\n","import { forwardRef } from \"react\";\nimport { CourierInbox as CourierInboxElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxComponent, CourierInboxProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInbox React component.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInbox />;\n * ```\n */\nexport const CourierInbox = forwardRef<CourierInboxElement, CourierInboxProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInbox.displayName = 'CourierInbox';\n","import { forwardRef } from \"react\";\nimport { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxPopupMenuComponent, CourierInboxPopupMenuProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInboxPopupMenu React component.\n *\n * This component is used to display a popup menu for a message in the inbox.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInboxPopupMenu />;\n * ```\n */\nexport const CourierInboxPopupMenu = forwardRef<CourierInboxPopupMenuElement, CourierInboxPopupMenuProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxPopupMenuComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInboxPopupMenu.displayName = 'CourierInboxPopupMenu';\n","import { Courier } from '@trycourier/courier-js';\n\nCourier.shared.courierUserAgentName = \"courier-react-17\";\nCourier.shared.courierUserAgentVersion = __PACKAGE_VERSION__;\n\nexport { CourierInbox } from './components/courier-inbox';\nexport { CourierInboxPopupMenu } from './components/courier-inbox-popup-menu';\n\nexport { useCourier } from '@trycourier/courier-react-components';\n\nexport type {\n CourierInboxProps,\n CourierInboxPopupMenuProps,\n} from '@trycourier/courier-react-components';\n\n// Re-export types from courier-js\nexport type {\n CourierProps,\n CourierClientOptions,\n CourierBrand,\n CourierApiUrls,\n CourierUserPreferences,\n CourierUserPreferencesStatus,\n CourierUserPreferencesChannel,\n CourierUserPreferencesPaging,\n CourierUserPreferencesTopic,\n CourierUserPreferencesTopicResponse,\n CourierDevice,\n CourierToken,\n CourierGetInboxMessageResponse,\n CourierGetInboxMessagesResponse,\n InboxMessage,\n InboxAction,\n InboxMessageEventEnvelope,\n} from '@trycourier/courier-js';\n\n// Re-export utility functions from courier-ui-inbox\nexport {\n markAsRead,\n markAsUnread,\n clickMessage,\n archiveMessage,\n openMessage\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export factory prop types from courier-ui-inbox\nexport type {\n CourierInboxHeaderFactoryProps,\n CourierInboxStateLoadingFactoryProps,\n CourierInboxStateEmptyFactoryProps,\n CourierInboxStateErrorFactoryProps,\n CourierInboxListItemFactoryProps,\n CourierInboxListItemActionFactoryProps,\n CourierInboxPaginationItemFactoryProps,\n CourierInboxMenuButtonFactoryProps,\n CourierInboxFeedType\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme types from courier-ui-inbox\nexport type {\n CourierInboxTheme,\n CourierInboxFontTheme,\n CourierInboxIconTheme,\n CourierInboxFilterItemTheme,\n CourierInboxUnreadCountIndicatorTheme,\n CourierInboxUnreadDotIndicatorTheme,\n CourierInboxIconButtonTheme,\n CourierInboxButtonTheme,\n CourierInboxMenuButtonTheme,\n CourierInboxPopupTheme,\n CourierInboxListItemTheme,\n CourierInboxSkeletonLoadingStateTheme,\n CourierInboxInfoStateTheme,\n CourierMenuItemTheme,\n CourierFilterMenuTheme,\n CourierActionMenuTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme utilities from courier-ui-inbox\nexport {\n defaultLightTheme,\n defaultDarkTheme,\n mergeTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export element types from courier-ui-inbox\nexport type { CourierInbox as CourierInboxElement } from '@trycourier/courier-ui-inbox';\nexport type { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from '@trycourier/courier-ui-inbox';\n\n// Re-export types from courier-ui-core\nexport type {\n CourierComponentThemeMode\n} from '@trycourier/courier-ui-core'\n"],"names":["reactNodeToHTMLElement","node","container","document","createElement","render","element","firstElementChild","HTMLElement","Error","CourierInbox","forwardRef","props","ref","jsx","CourierRenderContext","Provider","value","children","CourierInboxComponent","displayName","CourierInboxPopupMenu","CourierInboxPopupMenuComponent","Courier","shared","courierUserAgentName","courierUserAgentVersion"],"mappings":"+RAQO,SAASA,EAAuBC,GACrC,MAAMC,EAAYC,SAASC,cAAc,OAEzCC,EAAAA,OAAOJ,EAAMC,GAEb,MAAMI,EAAUJ,EAAUK,kBAC1B,KAAMD,aAAmBE,aACvB,MAAM,IAAIC,MACR,wGAIJ,OAAOH,CACT,CCKO,MAAMI,EAAeC,EAAAA,YAAmD,CAACC,EAAOC,MAEnFC,IAACC,EAAAA,qBAAqBC,SAArB,CAA8BC,MAAOjB,EACpCkB,WAAAJ,IAACK,EAAAA,sBAAA,IAA0BP,EAAOC,YAKxCH,EAAaU,YAAc,eCNpB,MAAMC,EAAwBV,EAAAA,YAAqE,CAACC,EAAOC,MAE9GC,IAACC,EAAAA,qBAAqBC,SAArB,CAA8BC,MAAOjB,EACpCkB,WAAAJ,IAACQ,EAAAA,+BAAA,IAAmCV,EAAOC,YAKjDQ,EAAsBD,YAAc,wBClCpCG,EAAAA,QAAQC,OAAOC,qBAAuB,mBACtCF,EAAAA,QAAQC,OAAOE,wBAA0B"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/utils/render.tsx","../src/components/courier-inbox.tsx","../src/components/courier-inbox-popup-menu.tsx","../src/components/courier-toast.tsx","../src/index.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { render } from \"react-dom\";\n\n/**\n * Converts a React node to an HTMLElement.\n * @param node - The React node to convert.\n * @returns The converted HTMLElement.\n */\nexport function reactNodeToHTMLElement(node: ReactNode): HTMLElement {\n const container = document.createElement('div');\n\n render(node, container);\n\n return container;\n}\n","import { forwardRef } from \"react\";\nimport { CourierInbox as CourierInboxElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxComponent, CourierInboxProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInbox React component.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInbox />;\n * ```\n */\nexport const CourierInbox = forwardRef<CourierInboxElement, CourierInboxProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInbox.displayName = 'CourierInbox';\n","import { forwardRef } from \"react\";\nimport { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxPopupMenuComponent, CourierInboxPopupMenuProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInboxPopupMenu React component.\n *\n * This component is used to display a popup menu for a message in the inbox.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInboxPopupMenu />;\n * ```\n */\nexport const CourierInboxPopupMenu = forwardRef<CourierInboxPopupMenuElement, CourierInboxPopupMenuProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxPopupMenuComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInboxPopupMenu.displayName = 'CourierInboxPopupMenu';\n","import { forwardRef } from \"react\";\nimport { CourierToast as CourierToastElement } from \"@trycourier/courier-ui-toast\";\nimport { CourierToastComponent, CourierToastProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierToast React component.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierToast />;\n * ```\n */\nexport const CourierToast = forwardRef<CourierToastElement, CourierToastProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierToastComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierToast.displayName = 'CourierToast';\n","import { Courier } from '@trycourier/courier-js';\n\nCourier.shared.courierUserAgentName = \"courier-react-17\";\nCourier.shared.courierUserAgentVersion = __PACKAGE_VERSION__;\n\nexport { CourierInbox } from './components/courier-inbox';\nexport { CourierInboxPopupMenu } from './components/courier-inbox-popup-menu';\nexport { CourierToast } from './components/courier-toast';\n\nexport { useCourier } from '@trycourier/courier-react-components';\n\nexport type {\n CourierInboxProps,\n CourierInboxPopupMenuProps,\n CourierToastProps,\n} from '@trycourier/courier-react-components';\n\n// Re-export types from courier-js\nexport type {\n CourierProps,\n CourierClientOptions,\n CourierBrand,\n CourierApiUrls,\n CourierUserPreferences,\n CourierUserPreferencesStatus,\n CourierUserPreferencesChannel,\n CourierUserPreferencesPaging,\n CourierUserPreferencesTopic,\n CourierUserPreferencesTopicResponse,\n CourierDevice,\n CourierToken,\n CourierGetInboxMessageResponse,\n CourierGetInboxMessagesResponse,\n InboxMessage,\n InboxAction,\n InboxMessageEventEnvelope,\n} from '@trycourier/courier-js';\n\n// Re-export utility functions from courier-ui-inbox\nexport {\n markAsRead,\n markAsUnread,\n clickMessage,\n archiveMessage,\n openMessage\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export factory prop types from courier-ui-inbox\nexport type {\n CourierInboxHeaderFactoryProps,\n CourierInboxStateLoadingFactoryProps,\n CourierInboxStateEmptyFactoryProps,\n CourierInboxStateErrorFactoryProps,\n CourierInboxListItemFactoryProps,\n CourierInboxListItemActionFactoryProps,\n CourierInboxPaginationItemFactoryProps,\n CourierInboxMenuButtonFactoryProps,\n CourierInboxFeedType\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme types from courier-ui-inbox\nexport type {\n CourierInboxTheme,\n CourierInboxFontTheme,\n CourierInboxIconTheme,\n CourierInboxFilterItemTheme,\n CourierInboxUnreadCountIndicatorTheme,\n CourierInboxUnreadDotIndicatorTheme,\n CourierInboxIconButtonTheme,\n CourierInboxButtonTheme,\n CourierInboxMenuButtonTheme,\n CourierInboxPopupTheme,\n CourierInboxListItemTheme,\n CourierInboxSkeletonLoadingStateTheme,\n CourierInboxInfoStateTheme,\n CourierMenuItemTheme,\n CourierFilterMenuTheme,\n CourierActionMenuTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme utilities from courier-ui-inbox\nexport {\n defaultLightTheme,\n defaultDarkTheme,\n mergeTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export element types from courier-ui-inbox\nexport type { CourierInbox as CourierInboxElement } from '@trycourier/courier-ui-inbox';\nexport type { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from '@trycourier/courier-ui-inbox';\n\n// Re-export element types from courier-ui-toast\nexport type { CourierToast as CourierToastElement } from '@trycourier/courier-ui-toast';\n\n// Re-export toast types from courier-ui-toast\nexport type {\n CourierToastTheme,\n CourierToastFontTheme,\n CourierToastIconTheme,\n CourierToastItemTheme,\n CourierToastItemFactoryProps,\n CourierToastItemClickEvent,\n CourierToastDismissButtonOption\n} from '@trycourier/courier-ui-toast';\n\n// Re-export toast theme utilities from courier-ui-toast\nexport {\n defaultLightTheme as defaultToastLightTheme,\n defaultDarkTheme as defaultToastDarkTheme,\n mergeTheme as mergeToastTheme\n} from '@trycourier/courier-ui-toast';\n\n// Re-export types from courier-ui-core\nexport type {\n CourierComponentThemeMode\n} from '@trycourier/courier-ui-core'\n"],"names":["reactNodeToHTMLElement","node","container","document","createElement","render","CourierInbox","forwardRef","props","ref","jsx","CourierRenderContext","Provider","value","children","CourierInboxComponent","displayName","CourierInboxPopupMenu","CourierInboxPopupMenuComponent","CourierToast","CourierToastComponent","Courier","shared","courierUserAgentName","courierUserAgentVersion"],"mappings":"yUAQO,SAASA,EAAuBC,GACrC,MAAMC,EAAYC,SAASC,cAAc,OAIzC,OAFAC,EAAAA,OAAOJ,EAAMC,GAENA,CACT,CCYO,MAAMI,EAAeC,EAAAA,YAAmD,CAACC,EAAOC,MAEnFC,IAACC,EAAAA,qBAAqBC,SAArB,CAA8BC,MAAOb,EACpCc,WAAAJ,IAACK,EAAAA,sBAAA,IAA0BP,EAAOC,YAKxCH,EAAaU,YAAc,eCNpB,MAAMC,EAAwBV,EAAAA,YAAqE,CAACC,EAAOC,MAE9GC,IAACC,EAAAA,qBAAqBC,SAArB,CAA8BC,MAAOb,EACpCc,WAAAJ,IAACQ,EAAAA,+BAAA,IAAmCV,EAAOC,YAKjDQ,EAAsBD,YAAc,wBCV7B,MAAMG,EAAeZ,EAAAA,YAAmD,CAACC,EAAOC,MAEnFC,IAACC,EAAAA,qBAAqBC,SAArB,CAA8BC,MAAOb,EACpCc,WAAAJ,IAACU,EAAAA,sBAAA,IAA0BZ,EAAOC,YAKxCU,EAAaH,YAAc,eChC3BK,EAAAA,QAAQC,OAAOC,qBAAuB,mBACtCF,EAAAA,QAAQC,OAAOE,wBAA0B"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { CourierInbox } from './components/courier-inbox';
2
2
  export { CourierInboxPopupMenu } from './components/courier-inbox-popup-menu';
3
+ export { CourierToast } from './components/courier-toast';
3
4
  export { useCourier } from '@trycourier/courier-react-components';
4
- export type { CourierInboxProps, CourierInboxPopupMenuProps, } from '@trycourier/courier-react-components';
5
+ export type { CourierInboxProps, CourierInboxPopupMenuProps, CourierToastProps, } from '@trycourier/courier-react-components';
5
6
  export type { CourierProps, CourierClientOptions, CourierBrand, CourierApiUrls, CourierUserPreferences, CourierUserPreferencesStatus, CourierUserPreferencesChannel, CourierUserPreferencesPaging, CourierUserPreferencesTopic, CourierUserPreferencesTopicResponse, CourierDevice, CourierToken, CourierGetInboxMessageResponse, CourierGetInboxMessagesResponse, InboxMessage, InboxAction, InboxMessageEventEnvelope, } from '@trycourier/courier-js';
6
7
  export { markAsRead, markAsUnread, clickMessage, archiveMessage, openMessage } from '@trycourier/courier-ui-inbox';
7
8
  export type { CourierInboxHeaderFactoryProps, CourierInboxStateLoadingFactoryProps, CourierInboxStateEmptyFactoryProps, CourierInboxStateErrorFactoryProps, CourierInboxListItemFactoryProps, CourierInboxListItemActionFactoryProps, CourierInboxPaginationItemFactoryProps, CourierInboxMenuButtonFactoryProps, CourierInboxFeedType } from '@trycourier/courier-ui-inbox';
@@ -9,4 +10,7 @@ export type { CourierInboxTheme, CourierInboxFontTheme, CourierInboxIconTheme, C
9
10
  export { defaultLightTheme, defaultDarkTheme, mergeTheme } from '@trycourier/courier-ui-inbox';
10
11
  export type { CourierInbox as CourierInboxElement } from '@trycourier/courier-ui-inbox';
11
12
  export type { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from '@trycourier/courier-ui-inbox';
13
+ export type { CourierToast as CourierToastElement } from '@trycourier/courier-ui-toast';
14
+ export type { CourierToastTheme, CourierToastFontTheme, CourierToastIconTheme, CourierToastItemTheme, CourierToastItemFactoryProps, CourierToastItemClickEvent, CourierToastDismissButtonOption } from '@trycourier/courier-ui-toast';
15
+ export { defaultLightTheme as defaultToastLightTheme, defaultDarkTheme as defaultToastDarkTheme, mergeTheme as mergeToastTheme } from '@trycourier/courier-ui-toast';
12
16
  export type { CourierComponentThemeMode } from '@trycourier/courier-ui-core';
package/dist/index.mjs CHANGED
@@ -1,20 +1,15 @@
1
1
  import { Courier } from "@trycourier/courier-js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { forwardRef } from "react";
4
- import { CourierRenderContext, CourierInboxComponent, CourierInboxPopupMenuComponent } from "@trycourier/courier-react-components";
4
+ import { CourierRenderContext, CourierInboxComponent, CourierInboxPopupMenuComponent, CourierToastComponent } from "@trycourier/courier-react-components";
5
5
  import { useCourier } from "@trycourier/courier-react-components";
6
6
  import { render } from "react-dom";
7
7
  import { archiveMessage, clickMessage, defaultDarkTheme, defaultLightTheme, markAsRead, markAsUnread, mergeTheme, openMessage } from "@trycourier/courier-ui-inbox";
8
+ import { defaultDarkTheme as defaultDarkTheme2, defaultLightTheme as defaultLightTheme2, mergeTheme as mergeTheme2 } from "@trycourier/courier-ui-toast";
8
9
  function reactNodeToHTMLElement(node) {
9
10
  const container = document.createElement("div");
10
11
  render(node, container);
11
- const element = container.firstElementChild;
12
- if (!(element instanceof HTMLElement)) {
13
- throw new Error(
14
- "reactNodeToHTMLElement must return a single JSX element that renders to an HTMLElement (e.g., <div>)"
15
- );
16
- }
17
- return element;
12
+ return container;
18
13
  }
19
14
  const CourierInbox = forwardRef((props, ref) => {
20
15
  return /* @__PURE__ */ jsx(CourierRenderContext.Provider, { value: reactNodeToHTMLElement, children: /* @__PURE__ */ jsx(CourierInboxComponent, { ...props, ref }) });
@@ -24,18 +19,26 @@ const CourierInboxPopupMenu = forwardRef((props, ref) => {
24
19
  return /* @__PURE__ */ jsx(CourierRenderContext.Provider, { value: reactNodeToHTMLElement, children: /* @__PURE__ */ jsx(CourierInboxPopupMenuComponent, { ...props, ref }) });
25
20
  });
26
21
  CourierInboxPopupMenu.displayName = "CourierInboxPopupMenu";
22
+ const CourierToast = forwardRef((props, ref) => {
23
+ return /* @__PURE__ */ jsx(CourierRenderContext.Provider, { value: reactNodeToHTMLElement, children: /* @__PURE__ */ jsx(CourierToastComponent, { ...props, ref }) });
24
+ });
25
+ CourierToast.displayName = "CourierToast";
27
26
  Courier.shared.courierUserAgentName = "courier-react-17";
28
- Courier.shared.courierUserAgentVersion = "8.1.0";
27
+ Courier.shared.courierUserAgentVersion = "8.2.1";
29
28
  export {
30
29
  CourierInbox,
31
30
  CourierInboxPopupMenu,
31
+ CourierToast,
32
32
  archiveMessage,
33
33
  clickMessage,
34
34
  defaultDarkTheme,
35
35
  defaultLightTheme,
36
+ defaultDarkTheme2 as defaultToastDarkTheme,
37
+ defaultLightTheme2 as defaultToastLightTheme,
36
38
  markAsRead,
37
39
  markAsUnread,
38
40
  mergeTheme,
41
+ mergeTheme2 as mergeToastTheme,
39
42
  openMessage,
40
43
  useCourier
41
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/utils/render.tsx","../src/components/courier-inbox.tsx","../src/components/courier-inbox-popup-menu.tsx","../src/index.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { render } from \"react-dom\";\n\n/**\n * Converts a React node to an HTMLElement.\n * @param node - The React node to convert.\n * @returns The converted HTMLElement.\n */\nexport function reactNodeToHTMLElement(node: ReactNode): HTMLElement {\n const container = document.createElement('div');\n\n render(node, container);\n\n const element = container.firstElementChild;\n if (!(element instanceof HTMLElement)) {\n throw new Error(\n 'reactNodeToHTMLElement must return a single JSX element that renders to an HTMLElement (e.g., <div>)'\n );\n }\n\n return element;\n}\n","import { forwardRef } from \"react\";\nimport { CourierInbox as CourierInboxElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxComponent, CourierInboxProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInbox React component.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInbox />;\n * ```\n */\nexport const CourierInbox = forwardRef<CourierInboxElement, CourierInboxProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInbox.displayName = 'CourierInbox';\n","import { forwardRef } from \"react\";\nimport { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxPopupMenuComponent, CourierInboxPopupMenuProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInboxPopupMenu React component.\n *\n * This component is used to display a popup menu for a message in the inbox.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInboxPopupMenu />;\n * ```\n */\nexport const CourierInboxPopupMenu = forwardRef<CourierInboxPopupMenuElement, CourierInboxPopupMenuProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxPopupMenuComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInboxPopupMenu.displayName = 'CourierInboxPopupMenu';\n","import { Courier } from '@trycourier/courier-js';\n\nCourier.shared.courierUserAgentName = \"courier-react-17\";\nCourier.shared.courierUserAgentVersion = __PACKAGE_VERSION__;\n\nexport { CourierInbox } from './components/courier-inbox';\nexport { CourierInboxPopupMenu } from './components/courier-inbox-popup-menu';\n\nexport { useCourier } from '@trycourier/courier-react-components';\n\nexport type {\n CourierInboxProps,\n CourierInboxPopupMenuProps,\n} from '@trycourier/courier-react-components';\n\n// Re-export types from courier-js\nexport type {\n CourierProps,\n CourierClientOptions,\n CourierBrand,\n CourierApiUrls,\n CourierUserPreferences,\n CourierUserPreferencesStatus,\n CourierUserPreferencesChannel,\n CourierUserPreferencesPaging,\n CourierUserPreferencesTopic,\n CourierUserPreferencesTopicResponse,\n CourierDevice,\n CourierToken,\n CourierGetInboxMessageResponse,\n CourierGetInboxMessagesResponse,\n InboxMessage,\n InboxAction,\n InboxMessageEventEnvelope,\n} from '@trycourier/courier-js';\n\n// Re-export utility functions from courier-ui-inbox\nexport {\n markAsRead,\n markAsUnread,\n clickMessage,\n archiveMessage,\n openMessage\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export factory prop types from courier-ui-inbox\nexport type {\n CourierInboxHeaderFactoryProps,\n CourierInboxStateLoadingFactoryProps,\n CourierInboxStateEmptyFactoryProps,\n CourierInboxStateErrorFactoryProps,\n CourierInboxListItemFactoryProps,\n CourierInboxListItemActionFactoryProps,\n CourierInboxPaginationItemFactoryProps,\n CourierInboxMenuButtonFactoryProps,\n CourierInboxFeedType\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme types from courier-ui-inbox\nexport type {\n CourierInboxTheme,\n CourierInboxFontTheme,\n CourierInboxIconTheme,\n CourierInboxFilterItemTheme,\n CourierInboxUnreadCountIndicatorTheme,\n CourierInboxUnreadDotIndicatorTheme,\n CourierInboxIconButtonTheme,\n CourierInboxButtonTheme,\n CourierInboxMenuButtonTheme,\n CourierInboxPopupTheme,\n CourierInboxListItemTheme,\n CourierInboxSkeletonLoadingStateTheme,\n CourierInboxInfoStateTheme,\n CourierMenuItemTheme,\n CourierFilterMenuTheme,\n CourierActionMenuTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme utilities from courier-ui-inbox\nexport {\n defaultLightTheme,\n defaultDarkTheme,\n mergeTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export element types from courier-ui-inbox\nexport type { CourierInbox as CourierInboxElement } from '@trycourier/courier-ui-inbox';\nexport type { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from '@trycourier/courier-ui-inbox';\n\n// Re-export types from courier-ui-core\nexport type {\n CourierComponentThemeMode\n} from '@trycourier/courier-ui-core'\n"],"names":[],"mappings":";;;;;;;AAQO,SAAS,uBAAuB,MAA8B;AACnE,QAAM,YAAY,SAAS,cAAc,KAAK;AAE9C,SAAO,MAAM,SAAS;AAEtB,QAAM,UAAU,UAAU;AAC1B,MAAI,EAAE,mBAAmB,cAAc;AACrC,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AAEA,SAAO;AACT;ACKO,MAAM,eAAe,WAAmD,CAAC,OAAO,QAAQ;AAC7F,SACE,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,wBACpC,UAAA,oBAAC,uBAAA,EAAuB,GAAG,OAAO,IAAA,CAAU,EAAA,CAC9C;AAEJ,CAAC;AAED,aAAa,cAAc;ACNpB,MAAM,wBAAwB,WAAqE,CAAC,OAAO,QAAQ;AACxH,SACE,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,wBACpC,UAAA,oBAAC,gCAAA,EAAgC,GAAG,OAAO,IAAA,CAAU,EAAA,CACvD;AAEJ,CAAC;AAED,sBAAsB,cAAc;AClCpC,QAAQ,OAAO,uBAAuB;AACtC,QAAQ,OAAO,0BAA0B;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/utils/render.tsx","../src/components/courier-inbox.tsx","../src/components/courier-inbox-popup-menu.tsx","../src/components/courier-toast.tsx","../src/index.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { render } from \"react-dom\";\n\n/**\n * Converts a React node to an HTMLElement.\n * @param node - The React node to convert.\n * @returns The converted HTMLElement.\n */\nexport function reactNodeToHTMLElement(node: ReactNode): HTMLElement {\n const container = document.createElement('div');\n\n render(node, container);\n\n return container;\n}\n","import { forwardRef } from \"react\";\nimport { CourierInbox as CourierInboxElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxComponent, CourierInboxProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInbox React component.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInbox />;\n * ```\n */\nexport const CourierInbox = forwardRef<CourierInboxElement, CourierInboxProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInbox.displayName = 'CourierInbox';\n","import { forwardRef } from \"react\";\nimport { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from \"@trycourier/courier-ui-inbox\";\nimport { CourierInboxPopupMenuComponent, CourierInboxPopupMenuProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierInboxPopupMenu React component.\n *\n * This component is used to display a popup menu for a message in the inbox.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierInboxPopupMenu />;\n * ```\n */\nexport const CourierInboxPopupMenu = forwardRef<CourierInboxPopupMenuElement, CourierInboxPopupMenuProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierInboxPopupMenuComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierInboxPopupMenu.displayName = 'CourierInboxPopupMenu';\n","import { forwardRef } from \"react\";\nimport { CourierToast as CourierToastElement } from \"@trycourier/courier-ui-toast\";\nimport { CourierToastComponent, CourierToastProps, CourierRenderContext } from \"@trycourier/courier-react-components\";\nimport { reactNodeToHTMLElement } from \"../utils/render\";\n\n/**\n * CourierToast React component.\n *\n * @example\n * ```tsx\n * const courier = useCourier();\n *\n * useEffect(() => {\n * // Generate a JWT for your user (do this on your backend server)\n * const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'; // Replace with actual JWT\n *\n * // Authenticate the user with the inbox\n * courier.shared.signIn({\n * userId: $YOUR_USER_ID,\n * jwt: jwt,\n * });\n * }, []);\n *\n * return <CourierToast />;\n * ```\n */\nexport const CourierToast = forwardRef<CourierToastElement, CourierToastProps>((props, ref) => {\n return (\n <CourierRenderContext.Provider value={reactNodeToHTMLElement}>\n <CourierToastComponent {...props} ref={ref} />\n </CourierRenderContext.Provider>\n );\n});\n\nCourierToast.displayName = 'CourierToast';\n","import { Courier } from '@trycourier/courier-js';\n\nCourier.shared.courierUserAgentName = \"courier-react-17\";\nCourier.shared.courierUserAgentVersion = __PACKAGE_VERSION__;\n\nexport { CourierInbox } from './components/courier-inbox';\nexport { CourierInboxPopupMenu } from './components/courier-inbox-popup-menu';\nexport { CourierToast } from './components/courier-toast';\n\nexport { useCourier } from '@trycourier/courier-react-components';\n\nexport type {\n CourierInboxProps,\n CourierInboxPopupMenuProps,\n CourierToastProps,\n} from '@trycourier/courier-react-components';\n\n// Re-export types from courier-js\nexport type {\n CourierProps,\n CourierClientOptions,\n CourierBrand,\n CourierApiUrls,\n CourierUserPreferences,\n CourierUserPreferencesStatus,\n CourierUserPreferencesChannel,\n CourierUserPreferencesPaging,\n CourierUserPreferencesTopic,\n CourierUserPreferencesTopicResponse,\n CourierDevice,\n CourierToken,\n CourierGetInboxMessageResponse,\n CourierGetInboxMessagesResponse,\n InboxMessage,\n InboxAction,\n InboxMessageEventEnvelope,\n} from '@trycourier/courier-js';\n\n// Re-export utility functions from courier-ui-inbox\nexport {\n markAsRead,\n markAsUnread,\n clickMessage,\n archiveMessage,\n openMessage\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export factory prop types from courier-ui-inbox\nexport type {\n CourierInboxHeaderFactoryProps,\n CourierInboxStateLoadingFactoryProps,\n CourierInboxStateEmptyFactoryProps,\n CourierInboxStateErrorFactoryProps,\n CourierInboxListItemFactoryProps,\n CourierInboxListItemActionFactoryProps,\n CourierInboxPaginationItemFactoryProps,\n CourierInboxMenuButtonFactoryProps,\n CourierInboxFeedType\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme types from courier-ui-inbox\nexport type {\n CourierInboxTheme,\n CourierInboxFontTheme,\n CourierInboxIconTheme,\n CourierInboxFilterItemTheme,\n CourierInboxUnreadCountIndicatorTheme,\n CourierInboxUnreadDotIndicatorTheme,\n CourierInboxIconButtonTheme,\n CourierInboxButtonTheme,\n CourierInboxMenuButtonTheme,\n CourierInboxPopupTheme,\n CourierInboxListItemTheme,\n CourierInboxSkeletonLoadingStateTheme,\n CourierInboxInfoStateTheme,\n CourierMenuItemTheme,\n CourierFilterMenuTheme,\n CourierActionMenuTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export theme utilities from courier-ui-inbox\nexport {\n defaultLightTheme,\n defaultDarkTheme,\n mergeTheme\n} from '@trycourier/courier-ui-inbox';\n\n// Re-export element types from courier-ui-inbox\nexport type { CourierInbox as CourierInboxElement } from '@trycourier/courier-ui-inbox';\nexport type { CourierInboxPopupMenu as CourierInboxPopupMenuElement } from '@trycourier/courier-ui-inbox';\n\n// Re-export element types from courier-ui-toast\nexport type { CourierToast as CourierToastElement } from '@trycourier/courier-ui-toast';\n\n// Re-export toast types from courier-ui-toast\nexport type {\n CourierToastTheme,\n CourierToastFontTheme,\n CourierToastIconTheme,\n CourierToastItemTheme,\n CourierToastItemFactoryProps,\n CourierToastItemClickEvent,\n CourierToastDismissButtonOption\n} from '@trycourier/courier-ui-toast';\n\n// Re-export toast theme utilities from courier-ui-toast\nexport {\n defaultLightTheme as defaultToastLightTheme,\n defaultDarkTheme as defaultToastDarkTheme,\n mergeTheme as mergeToastTheme\n} from '@trycourier/courier-ui-toast';\n\n// Re-export types from courier-ui-core\nexport type {\n CourierComponentThemeMode\n} from '@trycourier/courier-ui-core'\n"],"names":[],"mappings":";;;;;;;;AAQO,SAAS,uBAAuB,MAA8B;AACnE,QAAM,YAAY,SAAS,cAAc,KAAK;AAE9C,SAAO,MAAM,SAAS;AAEtB,SAAO;AACT;ACYO,MAAM,eAAe,WAAmD,CAAC,OAAO,QAAQ;AAC7F,SACE,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,wBACpC,UAAA,oBAAC,uBAAA,EAAuB,GAAG,OAAO,IAAA,CAAU,EAAA,CAC9C;AAEJ,CAAC;AAED,aAAa,cAAc;ACNpB,MAAM,wBAAwB,WAAqE,CAAC,OAAO,QAAQ;AACxH,SACE,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,wBACpC,UAAA,oBAAC,gCAAA,EAAgC,GAAG,OAAO,IAAA,CAAU,EAAA,CACvD;AAEJ,CAAC;AAED,sBAAsB,cAAc;ACV7B,MAAM,eAAe,WAAmD,CAAC,OAAO,QAAQ;AAC7F,SACE,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,wBACpC,UAAA,oBAAC,uBAAA,EAAuB,GAAG,OAAO,IAAA,CAAU,EAAA,CAC9C;AAEJ,CAAC;AAED,aAAa,cAAc;AChC3B,QAAQ,OAAO,uBAAuB;AACtC,QAAQ,OAAO,0BAA0B;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/courier-react-17",
3
- "version": "8.1.0",
3
+ "version": "8.2.1",
4
4
  "description": "React 17 components for the Courier web UI",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -8,11 +8,13 @@
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "cross-env NODE_ENV=production tsc && vite build --mode production",
11
+ "build:ci": "yarn build && yarn generate-api-doc",
11
12
  "watch": "vite build --watch",
12
13
  "preview": "vite preview",
13
14
  "prepare": "npm run build",
14
15
  "test": "jest",
15
- "test:watch": "jest --watch"
16
+ "test:watch": "jest --watch",
17
+ "generate-api-doc": "api-extractor run"
16
18
  },
17
19
  "files": [
18
20
  "dist"
@@ -26,11 +28,15 @@
26
28
  ],
27
29
  "author": "Courier",
28
30
  "license": "MIT",
31
+ "repository": {
32
+ "url": "https://github.com/trycourier/courier-web"
33
+ },
29
34
  "dependencies": {
30
- "@trycourier/courier-js": "2.1.0",
31
- "@trycourier/courier-react-components": "1.1.0",
32
- "@trycourier/courier-ui-core": "1.0.13",
33
- "@trycourier/courier-ui-inbox": "1.1.0"
35
+ "@trycourier/courier-js": "2.1.1",
36
+ "@trycourier/courier-react-components": "1.2.1",
37
+ "@trycourier/courier-ui-core": "1.0.14",
38
+ "@trycourier/courier-ui-inbox": "1.2.1",
39
+ "@trycourier/courier-ui-toast": "1.0.1"
34
40
  },
35
41
  "peerDependencies": {
36
42
  "react": ">=17.0.0, <18.0.0",