@knocklabs/react-core
Advanced tools
Comparing version 0.2.25 to 0.3.0-rc.0
# Changelog | ||
## 0.3.0-rc.0 | ||
### Minor Changes | ||
- f442962: feat: add in app messages client, hooks, provider, and components | ||
### Patch Changes | ||
- Updated dependencies [f442962] | ||
- @knocklabs/client@0.11.0-rc.0 | ||
## 0.2.25 | ||
@@ -4,0 +15,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./modules/core/context/KnockProvider.js"),i=require("./modules/core/hooks/useAuthenticatedKnockClient.js"),c=require("./modules/core/hooks/useStableOptions.js"),a=require("./modules/core/constants.js"),e=require("./modules/core/utils.js"),n=require("./modules/feed/context/KnockFeedProvider.js"),u=require("./modules/feed/hooks/useNotifications.js"),l=require("./modules/feed/hooks/useFeedSettings.js"),o=require("./modules/feed/hooks/useNotificationStore.js"),r=require("./modules/slack/context/KnockSlackProvider.js"),d=require("./modules/slack/hooks/useSlackConnectionStatus.js"),k=require("./modules/slack/hooks/useSlackChannels.js"),S=require("./modules/slack/hooks/useConnectedSlackChannels.js"),K=require("./modules/slack/hooks/useSlackAuth.js"),s=require("./modules/i18n/context/KnockI18nProvider.js"),C=require("./modules/i18n/hooks/useTranslations.js"),q=require("./modules/i18n/languages/index.js");exports.KnockProvider=t.KnockProvider;exports.useKnockClient=t.useKnockClient;exports.useAuthenticatedKnockClient=i;exports.useStableOptions=c;exports.FilterStatus=a.FilterStatus;exports.feedProviderKey=e.feedProviderKey;exports.formatBadgeCount=e.formatBadgeCount;exports.formatTimestamp=e.formatTimestamp;exports.renderNodeOrFallback=e.renderNodeOrFallback;exports.slackProviderKey=e.slackProviderKey;exports.toSentenceCase=e.toSentenceCase;exports.KnockFeedProvider=n.KnockFeedProvider;exports.useKnockFeed=n.useKnockFeed;exports.useNotifications=u;exports.useFeedSettings=l;exports.useCreateNotificationStore=o.useCreateNotificationStore;exports.useNotificationStore=o.default;exports.KnockSlackProvider=r.KnockSlackProvider;exports.useKnockSlackClient=r.useKnockSlackClient;exports.useSlackConnectionStatus=d;exports.useSlackChannels=k;exports.useConnectedSlackChannels=S;exports.useSlackAuth=K;exports.I18nContext=s.I18nContext;exports.KnockI18nProvider=s.KnockI18nProvider;exports.useTranslations=C.useTranslations;exports.locales=q.locales; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./modules/core/context/KnockProvider.js"),a=require("./modules/core/hooks/useAuthenticatedKnockClient.js"),u=require("./modules/core/hooks/useStableOptions.js"),l=require("./modules/core/constants.js"),e=require("./modules/core/utils.js"),s=require("./modules/feed/context/KnockFeedProvider.js"),d=require("./modules/feed/hooks/useNotifications.js"),k=require("./modules/feed/hooks/useFeedSettings.js"),o=require("./modules/feed/hooks/useNotificationStore.js"),t=require("./modules/in-app-messages/context/KnockInAppMessagesChannelProvider.js"),r=require("./modules/in-app-messages/hooks/useInAppMessages.js"),i=require("./modules/slack/context/KnockSlackProvider.js"),S=require("./modules/slack/hooks/useSlackConnectionStatus.js"),C=require("./modules/slack/hooks/useSlackChannels.js"),K=require("./modules/slack/hooks/useConnectedSlackChannels.js"),p=require("./modules/slack/hooks/useSlackAuth.js"),c=require("./modules/i18n/context/KnockI18nProvider.js"),v=require("./modules/i18n/hooks/useTranslations.js"),P=require("./modules/i18n/languages/index.js");exports.KnockProvider=n.KnockProvider;exports.useKnockClient=n.useKnockClient;exports.useAuthenticatedKnockClient=a;exports.useStableOptions=u;exports.FilterStatus=l.FilterStatus;exports.feedProviderKey=e.feedProviderKey;exports.formatBadgeCount=e.formatBadgeCount;exports.formatTimestamp=e.formatTimestamp;exports.renderNodeOrFallback=e.renderNodeOrFallback;exports.slackProviderKey=e.slackProviderKey;exports.toSentenceCase=e.toSentenceCase;exports.KnockFeedProvider=s.KnockFeedProvider;exports.useKnockFeed=s.useKnockFeed;exports.useNotifications=d;exports.useFeedSettings=k;exports.useCreateNotificationStore=o.useCreateNotificationStore;exports.useNotificationStore=o.default;exports.KnockInAppMessagesChannelProvider=t.KnockInAppMessagesChannelProvider;exports.useInAppMessagesChannel=t.useInAppMessagesChannel;exports.useInAppMessage=r.useInAppMessage;exports.useInAppMessages=r.useInAppMessages;exports.KnockSlackProvider=i.KnockSlackProvider;exports.useKnockSlackClient=i.useKnockSlackClient;exports.useSlackConnectionStatus=S;exports.useSlackChannels=C;exports.useConnectedSlackChannels=K;exports.useSlackAuth=p;exports.I18nContext=c.I18nContext;exports.KnockI18nProvider=c.KnockI18nProvider;exports.useTranslations=v.useTranslations;exports.locales=P.locales; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),b=require("../../i18n/context/KnockI18nProvider.js"),v=require("../hooks/useAuthenticatedKnockClient.js");require("zustand/shallow");function P(e){if(e&&typeof e=="object"&&"default"in e)return e;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=P(f),i=o.createContext(null),m=({apiKey:e,host:n,logLevel:t,userId:r,userToken:a,onUserTokenExpiring:c,timeBeforeExpirationInMs:u,children:s,i18n:d})=>{const l=o.useMemo(()=>({host:n,onUserTokenExpiring:c,timeBeforeExpirationInMs:u,logLevel:t}),[n,c,u,t]),k=v(e,r,a,l);return o.createElement(i.Provider,{value:{knock:k}},o.createElement(b.KnockI18nProvider,{i18n:d},s))},K=()=>{const e=o.useContext(i);if(e===void 0)throw new Error("useKnock must be used within a KnockProvider");return e.knock};exports.KnockProvider=m;exports.useKnockClient=K; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),b=require("../../i18n/context/KnockI18nProvider.js"),K=require("../hooks/useAuthenticatedKnockClient.js");require("zustand/shallow");function m(e){if(e&&typeof e=="object"&&"default"in e)return e;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=m(f),i=o.createContext(null),P=({apiKey:e,host:n,logLevel:t,userId:r,userToken:s,onUserTokenExpiring:c,timeBeforeExpirationInMs:u,children:a,i18n:l})=>{const d=o.useMemo(()=>({host:n,onUserTokenExpiring:c,timeBeforeExpirationInMs:u,logLevel:t}),[n,c,u,t]),k=K(e,r,s,d);return o.createElement(i.Provider,{value:{knock:k}},o.createElement(b.KnockI18nProvider,{i18n:l},a))},p=()=>{const e=o.useContext(i);if(!e)throw new Error("useKnockClient must be used within a KnockProvider");return e.knock};exports.KnockProvider=P;exports.useKnockClient=p; | ||
//# sourceMappingURL=KnockProvider.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),d=require("../../core/context/KnockProvider.js");require("@knocklabs/client");require("zustand/shallow");const l=require("../../core/utils.js"),f=require("../hooks/useNotifications.js"),k=require("../hooks/useNotificationStore.js");function b(e){if(e&&typeof e=="object"&&"default"in e)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const c=b(a),u=c.createContext(void 0),v=({feedId:e,children:o,defaultFeedOptions:t={},colorMode:r="light"})=>{const n=d.useKnockClient(),i=f(n,e,t),s=k.useCreateNotificationStore(i);return c.createElement(u.Provider,{key:l.feedProviderKey(n.userId,e,t),value:{knock:n,feedClient:i,useFeedStore:s,colorMode:r}},o)},K=()=>{const e=c.useContext(u);if(!e)throw new Error("useKnockFeed must be used within a KnockFeedProvider");return e};exports.KnockFeedProvider=v;exports.useKnockFeed=K; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),a=require("../../core/context/KnockProvider.js");require("@knocklabs/client");require("zustand/shallow");const l=require("../../core/utils.js"),f=require("../hooks/useNotifications.js"),k=require("../hooks/useNotificationStore.js");function v(e){if(e&&typeof e=="object"&&"default"in e)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const c=v(d),u=c.createContext(void 0),K=({feedId:e,children:r,defaultFeedOptions:t={},colorMode:o="light"})=>{let n;try{n=a.useKnockClient()}catch{throw new Error("KnockFeedProvider must be used within a KnockProvider.")}const i=f(n,e,t),s=k.useCreateNotificationStore(i);return c.createElement(u.Provider,{key:l.feedProviderKey(n.userId,e,t),value:{knock:n,feedClient:i,useFeedStore:s,colorMode:o}},r)},b=()=>{const e=c.useContext(u);if(!e)throw new Error("useKnockFeed must be used within a KnockFeedProvider");return e};exports.KnockFeedProvider=K;exports.useKnockFeed=b; | ||
//# sourceMappingURL=KnockFeedProvider.js.map |
export * from './modules/core'; | ||
export * from './modules/feed'; | ||
export * from './modules/in-app-messages'; | ||
export * from './modules/slack'; | ||
export * from './modules/i18n'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -5,3 +5,3 @@ { | ||
"author": "@knocklabs", | ||
"version": "0.2.25", | ||
"version": "0.3.0-rc.0", | ||
"license": "MIT", | ||
@@ -53,3 +53,4 @@ "main": "dist/cjs/index.js", | ||
"dependencies": { | ||
"@knocklabs/client": "^0.10.13", | ||
"@knocklabs/client": "^0.11.0-rc.0", | ||
"@tanstack/react-store": "^0.5.5", | ||
"date-fns": "^4.0.0", | ||
@@ -63,3 +64,3 @@ "swr": "^2.2.5", | ||
"@typescript-eslint/eslint-plugin": "^6.20.0", | ||
"@typescript-eslint/parser": "^8.8.0", | ||
"@typescript-eslint/parser": "^8.8.1", | ||
"@vitejs/plugin-react": "^4.3.2", | ||
@@ -66,0 +67,0 @@ "babel-plugin-react-require": "^4.0.3", |
export * from "./modules/core"; | ||
export * from "./modules/feed"; | ||
export * from "./modules/in-app-messages"; | ||
export * from "./modules/slack"; | ||
export * from "./modules/i18n"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
238210
205
2247
6
18
+ Added@tanstack/react-store@^0.5.5
+ Added@knocklabs/client@0.11.0-rc-1.0(transitive)
+ Added@tanstack/react-store@0.5.6(transitive)
+ Added@tanstack/store@0.5.5(transitive)
+ Addednanoid@3.3.7(transitive)
+ Addedreact-dom@18.3.1(transitive)
+ Addedscheduler@0.23.2(transitive)
- Removed@knocklabs/client@0.10.15(transitive)