@hellocoop/react 1.0.2 → 1.0.4

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/auth.d.ts CHANGED
@@ -1,20 +1,8 @@
1
- import type { Claims } from '@hellocoop/types';
2
- type AuthCookie = {
3
- sub: string;
4
- iat: number;
5
- } & Claims & {
6
- [key: string]: any;
7
- };
8
- export type Auth = {
9
- isLoggedIn: false;
10
- } | ({
11
- isLoggedIn: true;
12
- } & AuthCookie);
1
+ import type { Auth } from '@hellocoop/types';
13
2
  export type AuthState = {
14
3
  auth: Auth | {};
15
4
  isLoading: boolean;
16
5
  isLoggedIn: boolean | undefined;
17
6
  };
18
7
  export declare const useAuth: () => AuthState;
19
- export {};
20
8
  //# sourceMappingURL=auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAe9C,KAAK,UAAU,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAA;CACd,GAAG,MAAM,GAAG;IACT,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAA;AAEL,MAAM,MAAM,IAAI,GAAG;IACf,UAAU,EAAE,KAAK,CAAA;CACpB,GAAG,CAAC;IACD,UAAU,EAAE,IAAI,CAAC;CACpB,GAAG,UAAU,CAAE,CAAA;AAGhB,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,OAAO,QAAO,SAS1B,CAAA"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAe5C,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,OAAO,QAAO,SAS1B,CAAA"}
package/dist/buttons.js CHANGED
@@ -32,13 +32,13 @@ function BaseButton({ scope, updateScope, targetURI, providerHint, label, style,
32
32
  var _a;
33
33
  //check if dev has added Hellō stylesheet to pages with Hellō buttons
34
34
  if (typeof window != 'undefined' && !checkedForStylesheet) {
35
- const hasStylesheet = !Array.from(document.head.getElementsByTagName('link')).find((element) => {
35
+ const hasStylesheet = Array.from(document.head.getElementsByTagName('link')).find((element) => {
36
36
  var _a;
37
37
  return element.getAttribute('rel') === 'stylesheet' &&
38
38
  ((_a = element.getAttribute('href')) === null || _a === void 0 ? void 0 : _a.startsWith(types_1.Button.STYLES_URL));
39
39
  });
40
40
  if (!hasStylesheet)
41
- console.info('Could not find Hellō stylesheet. Please add to pages with Hellō buttons. See http://hello.dev/docs/buttons/#stylesheet for more info.');
41
+ console.warn('Could not find Hellō stylesheet. Please add to pages with Hellō buttons. See http://hello.dev/docs/buttons/#stylesheet for more info.');
42
42
  checkedForStylesheet = true;
43
43
  }
44
44
  const helloBtnClass = (_a = types_1.Button.CLASS_MAPPING[color]) === null || _a === void 0 ? void 0 : _a[theme];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hellocoop/react",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "React SDK for Hellō https://hello.dev",
5
5
  "repository": {
6
6
  "type": "git",