@planningcenter/chat-react-native 1.3.0-rc.4 → 1.3.0-rc.6

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/build/components/conversations.d.ts +1 -1
  3. package/build/components/conversations.d.ts.map +1 -1
  4. package/build/components/conversations.js +19 -34
  5. package/build/components/conversations.js.map +1 -1
  6. package/build/components/error_boundary.d.ts +3 -1
  7. package/build/components/error_boundary.d.ts.map +1 -1
  8. package/build/components/error_boundary.js.map +1 -1
  9. package/build/contexts/api_provider.d.ts +13 -0
  10. package/build/contexts/api_provider.d.ts.map +1 -0
  11. package/build/contexts/api_provider.js +51 -0
  12. package/build/contexts/api_provider.js.map +1 -0
  13. package/build/contexts/chat_context.d.ts +15 -0
  14. package/build/contexts/chat_context.d.ts.map +1 -0
  15. package/build/contexts/chat_context.js +18 -0
  16. package/build/contexts/chat_context.js.map +1 -0
  17. package/build/hooks/use_async_storage.d.ts +4 -0
  18. package/build/hooks/use_async_storage.d.ts.map +1 -0
  19. package/build/hooks/use_async_storage.js +31 -0
  20. package/build/hooks/use_async_storage.js.map +1 -0
  21. package/build/hooks/use_create_chat_theme.d.ts +10 -0
  22. package/build/hooks/use_create_chat_theme.d.ts.map +1 -0
  23. package/build/hooks/use_create_chat_theme.js +20 -0
  24. package/build/hooks/use_create_chat_theme.js.map +1 -0
  25. package/build/hooks/use_theme.d.ts +3 -0
  26. package/build/hooks/use_theme.d.ts.map +1 -0
  27. package/build/hooks/use_theme.js +7 -0
  28. package/build/hooks/use_theme.js.map +1 -0
  29. package/build/index.d.ts +5 -3
  30. package/build/index.d.ts.map +1 -1
  31. package/build/index.js +3 -2
  32. package/build/index.js.map +1 -1
  33. package/build/utils/theme.d.ts +34 -0
  34. package/build/utils/theme.d.ts.map +1 -0
  35. package/build/utils/theme.js +33 -0
  36. package/build/utils/theme.js.map +1 -0
  37. package/build/vendor/tapestry/tapestry_alias_tokens_color_map.d.ts +41 -0
  38. package/build/vendor/tapestry/tapestry_alias_tokens_color_map.d.ts.map +1 -0
  39. package/build/vendor/tapestry/tapestry_alias_tokens_color_map.js +50 -0
  40. package/build/vendor/tapestry/tapestry_alias_tokens_color_map.js.map +1 -0
  41. package/build/vendor/tapestry/tokens.d.ts +38 -0
  42. package/build/vendor/tapestry/tokens.d.ts.map +1 -0
  43. package/build/vendor/tapestry/tokens.js +50 -0
  44. package/build/vendor/tapestry/tokens.js.map +1 -0
  45. package/package.json +4 -2
  46. package/src/components/conversations.tsx +24 -37
  47. package/src/components/error_boundary.tsx +1 -1
  48. package/src/contexts/api_provider.tsx +69 -0
  49. package/src/contexts/chat_context.tsx +29 -0
  50. package/src/hooks/use_async_storage.ts +41 -0
  51. package/src/hooks/use_create_chat_theme.tsx +31 -0
  52. package/src/hooks/use_theme.tsx +9 -0
  53. package/src/index.tsx +12 -3
  54. package/src/types.d.ts +9 -4
  55. package/src/utils/theme.ts +73 -0
  56. package/src/vendor/tapestry/tapestry_alias_tokens_color_map.ts +82 -0
  57. package/src/vendor/tapestry/tokens.ts +97 -0
  58. package/build/context/chat_context.d.ts +0 -9
  59. package/build/context/chat_context.d.ts.map +0 -1
  60. package/build/context/chat_context.js +0 -7
  61. package/build/context/chat_context.js.map +0 -1
  62. package/src/context/chat_context.tsx +0 -14
package/CHANGELOG.md CHANGED
@@ -3,6 +3,31 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.3.0-rc.6](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.6) (2025-02-11)
7
+
8
+
9
+ ### Features
10
+
11
+ * add auth to the example app ([#50](https://github.com/planningcenter/chat-js/issues/50)) ([5e0ae00](https://github.com/planningcenter/chat-js/commit/5e0ae008345743f6bba388e982a3ad768265971a))
12
+ * **Api:** teach app about enviroments and make fetching a snap ([#55](https://github.com/planningcenter/chat-js/issues/55)) ([bb7aa56](https://github.com/planningcenter/chat-js/commit/bb7aa567ea362b53faceed9c98ca3b315a0229f5))
13
+ * create higher fidelity components ([#54](https://github.com/planningcenter/chat-js/issues/54)) ([367b707](https://github.com/planningcenter/chat-js/commit/367b7076b6d3a81ede7852248e98a199adea9978))
14
+ * drop stream and set global dependencies ([#49](https://github.com/planningcenter/chat-js/issues/49)) ([1214b9f](https://github.com/planningcenter/chat-js/commit/1214b9fbc17f4ab67a1de1d39954604a28268f35))
15
+ * **StreamChat:** export core package ([#41](https://github.com/planningcenter/chat-js/issues/41)) ([e9afde0](https://github.com/planningcenter/chat-js/commit/e9afde0e2a11d9c7e13b84f8eee8a6cfa7aff795)), closes [#45](https://github.com/planningcenter/chat-js/issues/45)
16
+
17
+
18
+
19
+ ## [1.3.0-rc.5](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.5) (2025-02-10)
20
+
21
+
22
+ ### Features
23
+
24
+ * add auth to the example app ([#50](https://github.com/planningcenter/chat-js/issues/50)) ([5e0ae00](https://github.com/planningcenter/chat-js/commit/5e0ae008345743f6bba388e982a3ad768265971a))
25
+ * create higher fidelity components ([#54](https://github.com/planningcenter/chat-js/issues/54)) ([367b707](https://github.com/planningcenter/chat-js/commit/367b7076b6d3a81ede7852248e98a199adea9978))
26
+ * drop stream and set global dependencies ([#49](https://github.com/planningcenter/chat-js/issues/49)) ([1214b9f](https://github.com/planningcenter/chat-js/commit/1214b9fbc17f4ab67a1de1d39954604a28268f35))
27
+ * **StreamChat:** export core package ([#41](https://github.com/planningcenter/chat-js/issues/41)) ([e9afde0](https://github.com/planningcenter/chat-js/commit/e9afde0e2a11d9c7e13b84f8eee8a6cfa7aff795)), closes [#45](https://github.com/planningcenter/chat-js/issues/45)
28
+
29
+
30
+
6
31
  ## [1.3.0-rc.4](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.4) (2025-02-07)
7
32
 
8
33
 
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- export declare function Conversations(): React.JSX.Element;
2
+ export declare function Conversations(): React.JSX.Element | null;
3
3
  //# sourceMappingURL=conversations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/components/conversations.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAA;AAYnD,wBAAgB,aAAa,sBAQ5B"}
1
+ {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/components/conversations.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAA;AAanD,wBAAgB,aAAa,6BAgB5B"}
@@ -1,49 +1,34 @@
1
- import { useSuspenseQuery } from '@tanstack/react-query';
1
+ import { QueryErrorResetBoundary, useSuspenseQuery } from '@tanstack/react-query';
2
2
  import React, { Suspense, useContext } from 'react';
3
3
  import { FlatList, StyleSheet, Text } from 'react-native';
4
- import { ChatContext } from '../context/chat_context';
4
+ import { ChatContext } from '../contexts/chat_context';
5
+ import { useTheme } from '../hooks/use_theme';
5
6
  import ErrorBoundary from './error_boundary';
6
7
  export function Conversations() {
7
- return (<ErrorBoundary>
8
- <Suspense fallback={<></>}>
9
- <Loaded />
10
- </Suspense>
11
- </ErrorBoundary>);
8
+ const { token } = useContext(ChatContext);
9
+ if (!token)
10
+ return null;
11
+ return (<QueryErrorResetBoundary>
12
+ {({ reset }) => (<ErrorBoundary onReset={reset}>
13
+ <Suspense fallback={<Text>loading...</Text>}>
14
+ <Loaded />
15
+ </Suspense>
16
+ </ErrorBoundary>)}
17
+ </QueryErrorResetBoundary>);
12
18
  }
13
19
  const Loaded = () => {
14
- const { token, onTokenExpired } = useContext(ChatContext);
15
20
  const styles = useStyles();
16
21
  const { data: conversations } = useSuspenseQuery({
17
- queryKey: ['conversations', token],
18
- queryFn: () =>
19
- // TODO: replace with an api client
20
- fetch('https://api.planningcenteronline.com/chat/v2/me/conversations', {
21
- headers: {
22
- Authorization: `Bearer ${token?.access_token}`,
23
- },
24
- })
25
- .then(validateResponse)
26
- .then(response => response.json())
27
- .catch(error => {
28
- if (error.message === 'Token expired') {
29
- onTokenExpired();
30
- }
31
- return null;
32
- }),
22
+ queryKey: ['/chat/v2/me/conversations'],
33
23
  });
34
- return (<FlatList data={conversations?.data} ListEmptyComponent={<Text>No conversations</Text>} contentContainerStyle={styles.container} ListHeaderComponent={<Text style={styles.foo}>Conversations</Text>} renderItem={({ item }) => <Text>{item.attributes.title}</Text>}/>);
24
+ return (<FlatList data={conversations?.data} contentContainerStyle={styles.container} ListEmptyComponent={<Text>No conversations found</Text>} ListHeaderComponent={<Text style={styles.foo}>Conversations</Text>} renderItem={({ item }) => <Text style={styles.listItem}>{item.attributes.title}</Text>}/>);
35
25
  };
36
26
  const useStyles = () => {
27
+ const { colors } = useTheme();
37
28
  return StyleSheet.create({
38
- container: { columnGap: 16 },
39
- foo: { fontSize: 24 },
29
+ container: { columnGap: 16, backgroundColor: colors.fillColorNeutral080 },
30
+ foo: { fontSize: 24, color: colors.testColor },
31
+ listItem: { color: colors.fillColorNeutral020 },
40
32
  });
41
33
  };
42
- const validateResponse = (response) => {
43
- const isExpired = response.status === 401;
44
- if (isExpired) {
45
- throw new Error('Token expired');
46
- }
47
- return response;
48
- };
49
34
  //# sourceMappingURL=conversations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/components/conversations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAQ5C,MAAM,UAAU,aAAa;IAC3B,OAAO,CACL,CAAC,aAAa,CACZ;MAAA,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CACxB;QAAA,CAAC,MAAM,CAAC,AAAD,EACT;MAAA,EAAE,QAAQ,CACZ;IAAA,EAAE,aAAa,CAAC,CACjB,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,GAAG,EAAE;IAClB,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IACzD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAwB;QACtE,QAAQ,EAAE,CAAC,eAAe,EAAE,KAAK,CAAC;QAClC,OAAO,EAAE,GAAG,EAAE;QACZ,mCAAmC;QACnC,KAAK,CAAC,+DAA+D,EAAE;YACrE,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,KAAK,EAAE,YAAY,EAAE;aAC/C;SACF,CAAC;aACC,IAAI,CAAC,gBAAgB,CAAC;aACtB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;aACjC,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,IAAI,KAAK,CAAC,OAAO,KAAK,eAAe,EAAE,CAAC;gBACtC,cAAc,EAAE,CAAA;YAClB,CAAC;YACD,OAAO,IAAI,CAAA;QACb,CAAC,CAAC;KACP,CAAC,CAAA;IAEF,OAAO,CACL,CAAC,QAAQ,CACP,IAAI,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,CAC1B,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAClD,qBAAqB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CACxC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CACnE,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC,EAC/D,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QAC5B,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;KACtB,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,QAAkB,EAAE,EAAE;IAC9C,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,KAAK,GAAG,CAAA;IACzC,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA","sourcesContent":["import { useSuspenseQuery } from '@tanstack/react-query'\nimport React, { Suspense, useContext } from 'react'\nimport { FlatList, StyleSheet, Text } from 'react-native'\nimport { ChatContext } from '../context/chat_context'\nimport { ConversationRecord } from '../types'\nimport ErrorBoundary from './error_boundary'\n\ntype ConversationsResponse = {\n data: ConversationRecord[]\n links: Record<string, string>\n meta: Record<string, string>\n}\n\nexport function Conversations() {\n return (\n <ErrorBoundary>\n <Suspense fallback={<></>}>\n <Loaded />\n </Suspense>\n </ErrorBoundary>\n )\n}\n\nconst Loaded = () => {\n const { token, onTokenExpired } = useContext(ChatContext)\n const styles = useStyles()\n const { data: conversations } = useSuspenseQuery<ConversationsResponse>({\n queryKey: ['conversations', token],\n queryFn: () =>\n // TODO: replace with an api client\n fetch('https://api.planningcenteronline.com/chat/v2/me/conversations', {\n headers: {\n Authorization: `Bearer ${token?.access_token}`,\n },\n })\n .then(validateResponse)\n .then(response => response.json())\n .catch(error => {\n if (error.message === 'Token expired') {\n onTokenExpired()\n }\n return null\n }),\n })\n\n return (\n <FlatList\n data={conversations?.data}\n ListEmptyComponent={<Text>No conversations</Text>}\n contentContainerStyle={styles.container}\n ListHeaderComponent={<Text style={styles.foo}>Conversations</Text>}\n renderItem={({ item }) => <Text>{item.attributes.title}</Text>}\n />\n )\n}\n\nconst useStyles = () => {\n return StyleSheet.create({\n container: { columnGap: 16 },\n foo: { fontSize: 24 },\n })\n}\n\nconst validateResponse = (response: Response) => {\n const isExpired = response.status === 401\n if (isExpired) {\n throw new Error('Token expired')\n }\n\n return response\n}\n"]}
1
+ {"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/components/conversations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACjF,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAQ5C,MAAM,UAAU,aAAa;IAC3B,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IAEzC,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IAEvB,OAAO,CACL,CAAC,uBAAuB,CACtB;MAAA,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACd,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAC5B;UAAA,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAC1C;YAAA,CAAC,MAAM,CAAC,AAAD,EACT;UAAA,EAAE,QAAQ,CACZ;QAAA,EAAE,aAAa,CAAC,CACjB,CACH;IAAA,EAAE,uBAAuB,CAAC,CAC3B,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,GAAG,EAAE;IAClB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAwB;QACtE,QAAQ,EAAE,CAAC,2BAA2B,CAAC;KACxC,CAAC,CAAA;IAEF,OAAO,CACL,CAAC,QAAQ,CACP,IAAI,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,CAC1B,qBAAqB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CACxC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC,CACxD,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CACnE,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC,EACvF,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,eAAe,EAAE,MAAM,CAAC,mBAAmB,EAAE;QACzE,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE;QAC9C,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,mBAAmB,EAAE;KAChD,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { QueryErrorResetBoundary, useSuspenseQuery } from '@tanstack/react-query'\nimport React, { Suspense, useContext } from 'react'\nimport { FlatList, StyleSheet, Text } from 'react-native'\nimport { ChatContext } from '../contexts/chat_context'\nimport { useTheme } from '../hooks/use_theme'\nimport { ConversationRecord } from '../types'\nimport ErrorBoundary from './error_boundary'\n\ntype ConversationsResponse = {\n data: ConversationRecord[]\n links: Record<string, string>\n meta: Record<string, string>\n}\n\nexport function Conversations() {\n const { token } = useContext(ChatContext)\n\n if (!token) return null\n\n return (\n <QueryErrorResetBoundary>\n {({ reset }) => (\n <ErrorBoundary onReset={reset}>\n <Suspense fallback={<Text>loading...</Text>}>\n <Loaded />\n </Suspense>\n </ErrorBoundary>\n )}\n </QueryErrorResetBoundary>\n )\n}\n\nconst Loaded = () => {\n const styles = useStyles()\n const { data: conversations } = useSuspenseQuery<ConversationsResponse>({\n queryKey: ['/chat/v2/me/conversations'],\n })\n\n return (\n <FlatList\n data={conversations?.data}\n contentContainerStyle={styles.container}\n ListEmptyComponent={<Text>No conversations found</Text>}\n ListHeaderComponent={<Text style={styles.foo}>Conversations</Text>}\n renderItem={({ item }) => <Text style={styles.listItem}>{item.attributes.title}</Text>}\n />\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: { columnGap: 16, backgroundColor: colors.fillColorNeutral080 },\n foo: { fontSize: 24, color: colors.testColor },\n listItem: { color: colors.fillColorNeutral020 },\n })\n}\n"]}
@@ -1,5 +1,7 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- declare class ErrorBoundary extends React.Component<PropsWithChildren<{}>> {
2
+ declare class ErrorBoundary extends React.Component<PropsWithChildren<{
3
+ onReset?: () => void;
4
+ }>> {
3
5
  state: {
4
6
  error: null;
5
7
  unsubscriber: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"error_boundary.d.ts","sourceRoot":"","sources":["../../src/components/error_boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAGhD,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;IAChE,KAAK;;;MAGJ;IAED,iBAAiB,CAAC,KAAK,EAAE,GAAG;IAI5B,WAAW,CAAC,KAAK,EAAE,GAAG;IAItB,MAAM;CAOP;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"error_boundary.d.ts","sourceRoot":"","sources":["../../src/components/error_boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAGhD,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,CAAC;IACtF,KAAK;;;MAGJ;IAED,iBAAiB,CAAC,KAAK,EAAE,GAAG;IAI5B,WAAW,CAAC,KAAK,EAAE,GAAG;IAItB,MAAM;CAOP;AAED,eAAe,aAAa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"error_boundary.js","sourceRoot":"","sources":["../../src/components/error_boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,aAAc,SAAQ,KAAK,CAAC,SAAgC;IAChE,KAAK,GAAG;QACN,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;KACvB,CAAA;IAED,iBAAiB,CAAC,KAAU;QAC1B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;IACzB,CAAC;IAED,WAAW,CAAC,KAAU;QACpB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAC1B,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QACjE,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA;QAC5B,CAAC;IACH,CAAC;CACF;AAED,eAAe,aAAa,CAAA","sourcesContent":["import React, { PropsWithChildren } from 'react'\nimport { Text } from 'react-native'\n\nclass ErrorBoundary extends React.Component<PropsWithChildren<{}>> {\n state = {\n error: null,\n unsubscriber: () => {},\n }\n\n componentDidCatch(error: any) {\n this.handleError(error)\n }\n\n handleError(error: any) {\n this.setState({ error })\n }\n\n render() {\n if (this.state.error) {\n return <Text>{JSON.stringify(this.state.error, null, 2)}</Text>\n } else {\n return this.props.children\n }\n }\n}\n\nexport default ErrorBoundary\n"]}
1
+ {"version":3,"file":"error_boundary.js","sourceRoot":"","sources":["../../src/components/error_boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,aAAc,SAAQ,KAAK,CAAC,SAAsD;IACtF,KAAK,GAAG;QACN,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;KACvB,CAAA;IAED,iBAAiB,CAAC,KAAU;QAC1B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;IACzB,CAAC;IAED,WAAW,CAAC,KAAU;QACpB,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAC1B,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QACjE,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA;QAC5B,CAAC;IACH,CAAC;CACF;AAED,eAAe,aAAa,CAAA","sourcesContent":["import React, { PropsWithChildren } from 'react'\nimport { Text } from 'react-native'\n\nclass ErrorBoundary extends React.Component<PropsWithChildren<{ onReset?: () => void }>> {\n state = {\n error: null,\n unsubscriber: () => {},\n }\n\n componentDidCatch(error: any) {\n this.handleError(error)\n }\n\n handleError(error: any) {\n this.setState({ error })\n }\n\n render() {\n if (this.state.error) {\n return <Text>{JSON.stringify(this.state.error, null, 2)}</Text>\n } else {\n return this.props.children\n }\n }\n}\n\nexport default ErrorBoundary\n"]}
@@ -0,0 +1,13 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ import React from 'react';
3
+ import { ViewProps } from 'react-native';
4
+ import { OAuthToken } from '../types';
5
+ type ENV = 'production' | 'staging' | 'development';
6
+ export declare const queryClient: QueryClient;
7
+ export declare function ApiProvider({ children, env, token, onTokenExpired, }: ViewProps & {
8
+ env?: ENV;
9
+ token?: OAuthToken;
10
+ onTokenExpired: () => void;
11
+ }): React.JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=api_provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api_provider.d.ts","sourceRoot":"","sources":["../../src/contexts/api_provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiC,MAAM,uBAAuB,CAAA;AAClF,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,KAAK,GAAG,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,CAAA;AAkCnD,eAAO,MAAM,WAAW,aAMtB,CAAA;AAEF,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,GAAkB,EAClB,KAAK,EACL,cAAc,GACf,EAAE,SAAS,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAAC,cAAc,EAAE,MAAM,IAAI,CAAA;CAAE,qBAM3E"}
@@ -0,0 +1,51 @@
1
+ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
2
+ import React from 'react';
3
+ let environment = 'production';
4
+ let oauthToken;
5
+ let handleTokenExpired;
6
+ const hostMap = {
7
+ production: 'https://api.planningcenteronline.com',
8
+ staging: 'https://api-staging.planningcenteronline.com',
9
+ development: 'https://api.pco.test',
10
+ };
11
+ const defaultQueryFn = ({ queryKey }) => {
12
+ if (!oauthToken) {
13
+ console.error('No token present');
14
+ throw new Error('No token present');
15
+ }
16
+ const url = `${hostMap[environment]}${queryKey[0]}`;
17
+ return fetch(url, {
18
+ headers: {
19
+ Authorization: `Bearer ${oauthToken?.access_token}`,
20
+ },
21
+ })
22
+ .then(validateResponse)
23
+ .then(response => response.json())
24
+ .catch(error => {
25
+ if (error.message === 'Token expired') {
26
+ handleTokenExpired();
27
+ }
28
+ return null;
29
+ });
30
+ };
31
+ export const queryClient = new QueryClient({
32
+ defaultOptions: {
33
+ queries: {
34
+ queryFn: defaultQueryFn,
35
+ },
36
+ },
37
+ });
38
+ export function ApiProvider({ children, env = 'production', token, onTokenExpired, }) {
39
+ oauthToken = token;
40
+ handleTokenExpired = onTokenExpired;
41
+ environment = env;
42
+ return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
43
+ }
44
+ const validateResponse = (response) => {
45
+ const isExpired = response.status === 401;
46
+ if (isExpired) {
47
+ throw new Error('Token expired');
48
+ }
49
+ return response;
50
+ };
51
+ //# sourceMappingURL=api_provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api_provider.js","sourceRoot":"","sources":["../../src/contexts/api_provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAY,MAAM,uBAAuB,CAAA;AAClF,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,IAAI,WAAW,GAAQ,YAAY,CAAA;AACnC,IAAI,UAAkC,CAAA;AACtC,IAAI,kBAA8B,CAAA;AAElC,MAAM,OAAO,GAAG;IACd,UAAU,EAAE,sCAAsC;IAClD,OAAO,EAAE,8CAA8C;IACvD,WAAW,EAAE,sBAAsB;CACpC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAA0B,EAAE,EAAE;IAC9D,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;QACjC,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAA;IACrC,CAAC;IAED,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAA;IAEnD,OAAO,KAAK,CAAC,GAAG,EAAE;QAChB,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,UAAU,EAAE,YAAY,EAAE;SACpD;KACF,CAAC;SACC,IAAI,CAAC,gBAAgB,CAAC;SACtB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;SACjC,KAAK,CAAC,KAAK,CAAC,EAAE;QACb,IAAI,KAAK,CAAC,OAAO,KAAK,eAAe,EAAE,CAAC;YACtC,kBAAkB,EAAE,CAAA;QACtB,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC,CAAC,CAAA;AACN,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC;IACzC,cAAc,EAAE;QACd,OAAO,EAAE;YACP,OAAO,EAAE,cAAc;SACxB;KACF;CACF,CAAC,CAAA;AAEF,MAAM,UAAU,WAAW,CAAC,EAC1B,QAAQ,EACR,GAAG,GAAG,YAAY,EAClB,KAAK,EACL,cAAc,GAC4D;IAC1E,UAAU,GAAG,KAAK,CAAA;IAClB,kBAAkB,GAAG,cAAc,CAAA;IACnC,WAAW,GAAG,GAAG,CAAA;IAEjB,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAC,CAAA;AACnF,CAAC;AAED,MAAM,gBAAgB,GAAG,CAAC,QAAkB,EAAE,EAAE;IAC9C,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,KAAK,GAAG,CAAA;IAEzC,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA","sourcesContent":["import { QueryClient, QueryClientProvider, QueryKey } from '@tanstack/react-query'\nimport React from 'react'\nimport { ViewProps } from 'react-native'\nimport { OAuthToken } from '../types'\n\ntype ENV = 'production' | 'staging' | 'development'\nlet environment: ENV = 'production'\nlet oauthToken: OAuthToken | undefined\nlet handleTokenExpired: () => void\n\nconst hostMap = {\n production: 'https://api.planningcenteronline.com',\n staging: 'https://api-staging.planningcenteronline.com',\n development: 'https://api.pco.test',\n}\n\nconst defaultQueryFn = ({ queryKey }: { queryKey: QueryKey }) => {\n if (!oauthToken) {\n console.error('No token present')\n throw new Error('No token present')\n }\n\n const url = `${hostMap[environment]}${queryKey[0]}`\n\n return fetch(url, {\n headers: {\n Authorization: `Bearer ${oauthToken?.access_token}`,\n },\n })\n .then(validateResponse)\n .then(response => response.json())\n .catch(error => {\n if (error.message === 'Token expired') {\n handleTokenExpired()\n }\n return null\n })\n}\n\nexport const queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n queryFn: defaultQueryFn,\n },\n },\n})\n\nexport function ApiProvider({\n children,\n env = 'production',\n token,\n onTokenExpired,\n}: ViewProps & { env?: ENV; token?: OAuthToken; onTokenExpired: () => void }) {\n oauthToken = token\n handleTokenExpired = onTokenExpired\n environment = env\n\n return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>\n}\n\nconst validateResponse = (response: Response) => {\n const isExpired = response.status === 401\n\n if (isExpired) {\n throw new Error('Token expired')\n }\n\n return response\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { OAuthToken } from '../types';
3
+ type ContextValue = {
4
+ token?: OAuthToken;
5
+ onTokenExpired: () => void;
6
+ theme: any;
7
+ env?: 'production' | 'staging' | 'development';
8
+ };
9
+ export declare const ChatContext: React.Context<ContextValue>;
10
+ export declare function ChatProvider({ children, value }: {
11
+ children: any;
12
+ value: ContextValue;
13
+ }): React.JSX.Element | null;
14
+ export {};
15
+ //# sourceMappingURL=chat_context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat_context.d.ts","sourceRoot":"","sources":["../../src/contexts/chat_context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAGrC,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,cAAc,EAAE,MAAM,IAAI,CAAA;IAC1B,KAAK,EAAE,GAAG,CAAA;IACV,GAAG,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,aAAa,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,WAAW,6BAKtB,CAAA;AAEF,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,4BAUvF"}
@@ -0,0 +1,18 @@
1
+ import React, { createContext } from 'react';
2
+ import { ApiProvider } from './api_provider';
3
+ export const ChatContext = createContext({
4
+ theme: undefined,
5
+ token: undefined,
6
+ env: undefined,
7
+ onTokenExpired: () => { },
8
+ });
9
+ export function ChatProvider({ children, value }) {
10
+ if (!Object.keys(value.token || {}).length)
11
+ return null;
12
+ return (<ChatContext.Provider value={value}>
13
+ <ApiProvider env={value.env} token={value.token} onTokenExpired={value.onTokenExpired}>
14
+ {children}
15
+ </ApiProvider>
16
+ </ChatContext.Provider>);
17
+ }
18
+ //# sourceMappingURL=chat_context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat_context.js","sourceRoot":"","sources":["../../src/contexts/chat_context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAS5C,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAe;IACrD,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,SAAS;IACd,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;CACzB,CAAC,CAAA;AAEF,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,KAAK,EAA0C;IACtF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAEvD,OAAO,CACL,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CACjC;MAAA,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CACpF;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,WAAW,CACf;IAAA,EAAE,WAAW,CAAC,QAAQ,CAAC,CACxB,CAAA;AACH,CAAC","sourcesContent":["import React, { createContext } from 'react'\nimport { OAuthToken } from '../types'\nimport { ApiProvider } from './api_provider'\n\ntype ContextValue = {\n token?: OAuthToken\n onTokenExpired: () => void\n theme: any\n env?: 'production' | 'staging' | 'development'\n}\n\nexport const ChatContext = createContext<ContextValue>({\n theme: undefined,\n token: undefined,\n env: undefined,\n onTokenExpired: () => {},\n})\n\nexport function ChatProvider({ children, value }: { children: any; value: ContextValue }) {\n if (!Object.keys(value.token || {}).length) return null\n\n return (\n <ChatContext.Provider value={value}>\n <ApiProvider env={value.env} token={value.token} onTokenExpired={value.onTokenExpired}>\n {children}\n </ApiProvider>\n </ChatContext.Provider>\n )\n}\n"]}
@@ -0,0 +1,4 @@
1
+ type SetValue<TCacheData> = (_itemValue?: TCacheData | null) => void;
2
+ export declare function useAsyncStorage<TCacheData>(key: string, initialValue: TCacheData): [TCacheData, SetValue<TCacheData>];
3
+ export {};
4
+ //# sourceMappingURL=use_async_storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use_async_storage.d.ts","sourceRoot":"","sources":["../../src/hooks/use_async_storage.ts"],"names":[],"mappings":"AAMA,KAAK,QAAQ,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAA;AAEpE,wBAAgB,eAAe,CAAC,UAAU,EACxC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,UAAU,GACvB,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CA6BpC"}
@@ -0,0 +1,31 @@
1
+ import AsyncStorage from '@react-native-async-storage/async-storage';
2
+ import { useSuspenseQuery } from '@tanstack/react-query';
3
+ import { useCallback } from 'react';
4
+ const cacheKeyGenerator = (key) => [`AsyncStorageResource:${key}`];
5
+ export function useAsyncStorage(key, initialValue) {
6
+ const cacheKey = cacheKeyGenerator(key);
7
+ const { data: value, refetch } = useSuspenseQuery({
8
+ queryKey: cacheKey,
9
+ queryFn: () => AsyncStorage.getItem(key).then(storedValue => {
10
+ if (!storedValue)
11
+ return initialValue;
12
+ try {
13
+ return JSON.parse(storedValue);
14
+ }
15
+ catch {
16
+ return storedValue;
17
+ }
18
+ }),
19
+ });
20
+ const setValue = useCallback(itemValue => {
21
+ if (itemValue === null || itemValue === undefined) {
22
+ AsyncStorage.removeItem(key);
23
+ }
24
+ else {
25
+ AsyncStorage.setItem(key, JSON.stringify(itemValue));
26
+ }
27
+ refetch();
28
+ }, [key, refetch]);
29
+ return [value || initialValue, setValue];
30
+ }
31
+ //# sourceMappingURL=use_async_storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use_async_storage.js","sourceRoot":"","sources":["../../src/hooks/use_async_storage.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,2CAA2C,CAAA;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAEnC,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,wBAAwB,GAAG,EAAE,CAAC,CAAA;AAI1E,MAAM,UAAU,eAAe,CAC7B,GAAW,EACX,YAAwB;IAExB,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAA;IACvC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAa;QAC5D,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,GAAG,EAAE,CACZ,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YAC3C,IAAI,CAAC,WAAW;gBAAE,OAAO,YAAY,CAAA;YAErC,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;YAChC,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,WAAW,CAAA;YACpB,CAAC;QACH,CAAC,CAAC;KACL,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAyB,WAAW,CAChD,SAAS,CAAC,EAAE;QACV,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAClD,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;QAC9B,CAAC;aAAM,CAAC;YACN,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAA;QACtD,CAAC;QACD,OAAO,EAAE,CAAA;IACX,CAAC,EACD,CAAC,GAAG,EAAE,OAAO,CAAC,CACf,CAAA;IAED,OAAO,CAAC,KAAK,IAAI,YAAY,EAAE,QAAQ,CAAC,CAAA;AAC1C,CAAC","sourcesContent":["import AsyncStorage from '@react-native-async-storage/async-storage'\nimport { useSuspenseQuery } from '@tanstack/react-query'\nimport { useCallback } from 'react'\n\nconst cacheKeyGenerator = (key: string) => [`AsyncStorageResource:${key}`]\n\ntype SetValue<TCacheData> = (_itemValue?: TCacheData | null) => void\n\nexport function useAsyncStorage<TCacheData>(\n key: string,\n initialValue: TCacheData\n): [TCacheData, SetValue<TCacheData>] {\n const cacheKey = cacheKeyGenerator(key)\n const { data: value, refetch } = useSuspenseQuery<TCacheData>({\n queryKey: cacheKey,\n queryFn: () =>\n AsyncStorage.getItem(key).then(storedValue => {\n if (!storedValue) return initialValue\n\n try {\n return JSON.parse(storedValue)\n } catch {\n return storedValue\n }\n }),\n })\n\n const setValue: SetValue<TCacheData> = useCallback(\n itemValue => {\n if (itemValue === null || itemValue === undefined) {\n AsyncStorage.removeItem(key)\n } else {\n AsyncStorage.setItem(key, JSON.stringify(itemValue))\n }\n refetch()\n },\n [key, refetch]\n )\n\n return [value || initialValue, setValue]\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { ColorSchemeName } from 'react-native';
2
+ import { DefaultTheme } from '../utils/theme';
3
+ import { DeepPartial } from '../types';
4
+ interface CreateChatThemeProps {
5
+ theme?: DeepPartial<DefaultTheme>;
6
+ colorScheme?: ColorSchemeName;
7
+ }
8
+ export declare const useCreateChatTheme: ({ theme: customTheme, colorScheme: appColorScheme, }: CreateChatThemeProps) => any;
9
+ export {};
10
+ //# sourceMappingURL=use_create_chat_theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use_create_chat_theme.d.ts","sourceRoot":"","sources":["../../src/hooks/use_create_chat_theme.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAgB,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAItC,UAAU,oBAAoB;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAA;IACjC,WAAW,CAAC,EAAE,eAAe,CAAA;CAC9B;AAED,eAAO,MAAM,kBAAkB,yDAG5B,oBAAoB,QAetB,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { useMemo } from 'react';
2
+ import { useColorScheme } from 'react-native';
3
+ import { defaultTheme } from '../utils/theme';
4
+ import { tapestryAliasTokensColorMap } from '../vendor/tapestry/tapestry_alias_tokens_color_map';
5
+ import { merge } from 'lodash';
6
+ export const useCreateChatTheme = ({ theme: customTheme = {}, colorScheme: appColorScheme, }) => {
7
+ const internalColorScheme = useColorScheme() || 'light';
8
+ const colorScheme = appColorScheme || internalColorScheme;
9
+ const memoizedTheme = useMemo(() => {
10
+ return {
11
+ ...merge({}, defaultTheme(colorScheme), customTheme),
12
+ colors: {
13
+ ...merge({}, defaultTheme(colorScheme).colors, customTheme?.colors),
14
+ ...tapestryAliasTokensColorMap[colorScheme],
15
+ },
16
+ };
17
+ }, [colorScheme, customTheme]);
18
+ return memoizedTheme;
19
+ };
20
+ //# sourceMappingURL=use_create_chat_theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use_create_chat_theme.js","sourceRoot":"","sources":["../../src/hooks/use_create_chat_theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAmB,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAA;AAE3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAA;AAChG,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAO9B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,KAAK,EAAE,WAAW,GAAG,EAAE,EACvB,WAAW,EAAE,cAAc,GACN,EAAE,EAAE;IACzB,MAAM,mBAAmB,GAAG,cAAc,EAAE,IAAI,OAAO,CAAA;IACvD,MAAM,WAAW,GAAG,cAAc,IAAI,mBAAmB,CAAA;IAEzD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE;QACjC,OAAO;YACL,GAAG,KAAK,CAAC,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;YACpD,MAAM,EAAE;gBACN,GAAG,KAAK,CAAC,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC;gBACnE,GAAG,2BAA2B,CAAC,WAAW,CAAC;aAC5C;SACF,CAAA;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAA;IAE9B,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { useMemo } from 'react'\nimport { useColorScheme, ColorSchemeName } from 'react-native'\nimport { defaultTheme, DefaultTheme } from '../utils/theme'\nimport { DeepPartial } from '../types'\nimport { tapestryAliasTokensColorMap } from '../vendor/tapestry/tapestry_alias_tokens_color_map'\nimport { merge } from 'lodash'\n\ninterface CreateChatThemeProps {\n theme?: DeepPartial<DefaultTheme>\n colorScheme?: ColorSchemeName\n}\n\nexport const useCreateChatTheme = ({\n theme: customTheme = {},\n colorScheme: appColorScheme,\n}: CreateChatThemeProps) => {\n const internalColorScheme = useColorScheme() || 'light'\n const colorScheme = appColorScheme || internalColorScheme\n\n const memoizedTheme = useMemo(() => {\n return {\n ...merge({}, defaultTheme(colorScheme), customTheme),\n colors: {\n ...merge({}, defaultTheme(colorScheme).colors, customTheme?.colors),\n ...tapestryAliasTokensColorMap[colorScheme],\n },\n }\n }, [colorScheme, customTheme])\n\n return memoizedTheme\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import { ChatTheme } from '../utils/theme';
2
+ export declare const useTheme: () => ChatTheme;
3
+ //# sourceMappingURL=use_theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use_theme.d.ts","sourceRoot":"","sources":["../../src/hooks/use_theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,eAAO,MAAM,QAAQ,QAAO,SAI3B,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { useContext } from 'react';
2
+ import { ChatContext } from '../contexts/chat_context';
3
+ export const useTheme = () => {
4
+ const { theme } = useContext(ChatContext);
5
+ return theme;
6
+ };
7
+ //# sourceMappingURL=use_theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use_theme.js","sourceRoot":"","sources":["../../src/hooks/use_theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAGtD,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAc,EAAE;IACtC,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IAEzC,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { useContext } from 'react'\nimport { ChatContext } from '../contexts/chat_context'\nimport { ChatTheme } from '../utils/theme'\n\nexport const useTheme = (): ChatTheme => {\n const { theme } = useContext(ChatContext)\n\n return theme\n}\n"]}
package/build/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Conversations } from './components/conversations';
2
- import { ChatContext } from './context/chat_context';
3
- import { OauthToken } from './types';
4
- export { ChatContext, Conversations, OauthToken as OathToken };
2
+ import { ChatContext, ChatProvider } from './contexts/chat_context';
3
+ import { useCreateChatTheme } from './hooks/use_create_chat_theme';
4
+ import { OAuthToken } from './types';
5
+ import { TemporaryDefaultColorsType } from './utils/theme';
6
+ export { ChatContext, ChatProvider, Conversations, OAuthToken, TemporaryDefaultColorsType, useCreateChatTheme, };
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,IAAI,SAAS,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAA;AAE1D,OAAO,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,0BAA0B,EAC1B,kBAAkB,GACnB,CAAA"}
package/build/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Conversations } from './components/conversations';
2
- import { ChatContext } from './context/chat_context';
3
- export { ChatContext, Conversations };
2
+ import { ChatContext, ChatProvider } from './contexts/chat_context';
3
+ import { useCreateChatTheme } from './hooks/use_create_chat_theme';
4
+ export { ChatContext, ChatProvider, Conversations, useCreateChatTheme, };
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGpD,OAAO,EAAE,WAAW,EAAE,aAAa,EAA2B,CAAA","sourcesContent":["import { Conversations } from './components/conversations'\nimport { ChatContext } from './context/chat_context'\nimport { OauthToken } from './types'\n\nexport { ChatContext, Conversations, OauthToken as OathToken }\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAIlE,OAAO,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EAGb,kBAAkB,GACnB,CAAA","sourcesContent":["import { Conversations } from './components/conversations'\nimport { ChatContext, ChatProvider } from './contexts/chat_context'\nimport { useCreateChatTheme } from './hooks/use_create_chat_theme'\nimport { OAuthToken } from './types'\nimport { TemporaryDefaultColorsType } from './utils/theme'\n\nexport {\n ChatContext,\n ChatProvider,\n Conversations,\n OAuthToken,\n TemporaryDefaultColorsType,\n useCreateChatTheme,\n}\n"]}
@@ -0,0 +1,34 @@
1
+ import { TextStyle, ViewStyle, ColorSchemeName } from 'react-native';
2
+ import { tapestryAliasTokensColorMap } from '../vendor/tapestry/tapestry_alias_tokens_color_map';
3
+ export interface ChatTheme extends DefaultTheme {
4
+ colors: DefaultTheme['colors'] & (typeof tapestryAliasTokensColorMap.light | typeof tapestryAliasTokensColorMap.dark);
5
+ }
6
+ /** =============================================
7
+ NOTE: The specific values for `colors` and the `productBadge` are temporary examples that can be replaced once we start building out UI. This line's comment can be removed at that time too.
8
+
9
+ The default theme is intended to support two types of customizations:
10
+ 1. Specific color properties for a chat component (eg. `primaryButtonBackgroundColor`)
11
+ 2. Any styles for a specific component. (Use only one level of nesting.)
12
+ ```
13
+ primaryButton: {
14
+ container: ViewStyle
15
+ text: TextStyle
16
+ }
17
+ ```
18
+ ============================================= */
19
+ export interface DefaultTheme {
20
+ colors: ChatColors;
21
+ temporaryProductBadge: {
22
+ container: ViewStyle;
23
+ text: TextStyle;
24
+ };
25
+ }
26
+ export declare const defaultTheme: (colorScheme: ColorSchemeName) => DefaultTheme;
27
+ export type TemporaryDefaultColorsType = Partial<ChatColors>;
28
+ interface ChatColors {
29
+ name: string;
30
+ temporaryButtonBackgroundColor: string;
31
+ testColor: string;
32
+ }
33
+ export {};
34
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAA;AAEhG,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAC5B,CAAC,OAAO,2BAA2B,CAAC,KAAK,GAAG,OAAO,2BAA2B,CAAC,IAAI,CAAC,CAAA;CACvF;AAED;;;;;;;;;;;;gDAYgD;AAEhD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,UAAU,CAAA;IAClB,qBAAqB,EAAE;QACrB,SAAS,EAAE,SAAS,CAAA;QACpB,IAAI,EAAE,SAAS,CAAA;KAChB,CAAA;CACF;AAED,eAAO,MAAM,YAAY,gBAAiB,eAAe,KAAG,YAgB3D,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AAE5D,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,8BAA8B,EAAE,MAAM,CAAA;IACtC,SAAS,EAAE,MAAM,CAAA;CAClB"}
@@ -0,0 +1,33 @@
1
+ import { tokens } from '../vendor/tapestry/tokens';
2
+ import { tapestryAliasTokensColorMap } from '../vendor/tapestry/tapestry_alias_tokens_color_map';
3
+ export const defaultTheme = (colorScheme) => {
4
+ const scheme = colorScheme || 'light';
5
+ return {
6
+ colors: chatThemeColorMap[scheme],
7
+ temporaryProductBadge: {
8
+ container: {
9
+ paddingHorizontal: tokens.spacing1,
10
+ backgroundColor: tapestryAliasTokensColorMap[scheme].fillColorNeutral070,
11
+ borderWidth: tokens.borderSizeDefault,
12
+ },
13
+ text: {
14
+ textAlign: 'center',
15
+ },
16
+ },
17
+ };
18
+ };
19
+ const colorsChatLight = {
20
+ name: 'light',
21
+ temporaryButtonBackgroundColor: tokens.colorNeutral95,
22
+ testColor: 'red',
23
+ };
24
+ const colorsChatDark = {
25
+ name: 'dark',
26
+ temporaryButtonBackgroundColor: tokens.colorNeutral17,
27
+ testColor: 'blue',
28
+ };
29
+ const chatThemeColorMap = {
30
+ light: colorsChatLight,
31
+ dark: colorsChatDark,
32
+ };
33
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAClD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAA;AA6BhG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,WAA4B,EAAgB,EAAE;IACzE,MAAM,MAAM,GAAG,WAAW,IAAI,OAAO,CAAA;IAErC,OAAO;QACL,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;QACjC,qBAAqB,EAAE;YACrB,SAAS,EAAE;gBACT,iBAAiB,EAAE,MAAM,CAAC,QAAQ;gBAClC,eAAe,EAAE,2BAA2B,CAAC,MAAM,CAAC,CAAC,mBAAmB;gBACxE,WAAW,EAAE,MAAM,CAAC,iBAAiB;aACtC;YACD,IAAI,EAAE;gBACJ,SAAS,EAAE,QAAQ;aACpB;SACF;KACF,CAAA;AACH,CAAC,CAAA;AAUD,MAAM,eAAe,GAAe;IAClC,IAAI,EAAE,OAAO;IACb,8BAA8B,EAAE,MAAM,CAAC,cAAc;IACrD,SAAS,EAAE,KAAK;CACjB,CAAA;AAED,MAAM,cAAc,GAAe;IACjC,IAAI,EAAE,MAAM;IACZ,8BAA8B,EAAE,MAAM,CAAC,cAAc;IACrD,SAAS,EAAE,MAAM;CAClB,CAAA;AAED,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,cAAc;CACrB,CAAA","sourcesContent":["import { TextStyle, ViewStyle, ColorSchemeName } from 'react-native'\nimport { tokens } from '../vendor/tapestry/tokens'\nimport { tapestryAliasTokensColorMap } from '../vendor/tapestry/tapestry_alias_tokens_color_map'\n\nexport interface ChatTheme extends DefaultTheme {\n colors: DefaultTheme['colors'] &\n (typeof tapestryAliasTokensColorMap.light | typeof tapestryAliasTokensColorMap.dark)\n}\n\n/** =============================================\n NOTE: The specific values for `colors` and the `productBadge` are temporary examples that can be replaced once we start building out UI. This line's comment can be removed at that time too.\n\n The default theme is intended to support two types of customizations:\n 1. Specific color properties for a chat component (eg. `primaryButtonBackgroundColor`)\n 2. Any styles for a specific component. (Use only one level of nesting.)\n ```\n primaryButton: {\n container: ViewStyle\n text: TextStyle\n }\n ```\n============================================= */\n\nexport interface DefaultTheme {\n colors: ChatColors\n temporaryProductBadge: {\n container: ViewStyle\n text: TextStyle\n }\n}\n\nexport const defaultTheme = (colorScheme: ColorSchemeName): DefaultTheme => {\n const scheme = colorScheme || 'light'\n\n return {\n colors: chatThemeColorMap[scheme],\n temporaryProductBadge: {\n container: {\n paddingHorizontal: tokens.spacing1,\n backgroundColor: tapestryAliasTokensColorMap[scheme].fillColorNeutral070,\n borderWidth: tokens.borderSizeDefault,\n },\n text: {\n textAlign: 'center',\n },\n },\n }\n}\n\nexport type TemporaryDefaultColorsType = Partial<ChatColors>\n\ninterface ChatColors {\n name: string\n temporaryButtonBackgroundColor: string\n testColor: string\n}\n\nconst colorsChatLight: ChatColors = {\n name: 'light',\n temporaryButtonBackgroundColor: tokens.colorNeutral95,\n testColor: 'red',\n}\n\nconst colorsChatDark: ChatColors = {\n name: 'dark',\n temporaryButtonBackgroundColor: tokens.colorNeutral17,\n testColor: 'blue',\n}\n\nconst chatThemeColorMap = {\n light: colorsChatLight,\n dark: colorsChatDark,\n}\n"]}
@@ -0,0 +1,41 @@
1
+ export declare const tapestryAliasTokensColorMap: {
2
+ light: {
3
+ name: string;
4
+ iconColorDefaultPrimary: string;
5
+ iconColorDefaultSecondary: string;
6
+ iconColorDefaultDim: string;
7
+ iconColorDefaultDisabled: string;
8
+ iconColorDefaultInverted: string;
9
+ fillColorNeutral000: string;
10
+ fillColorNeutral010: string;
11
+ fillColorNeutral020: string;
12
+ fillColorNeutral030: string;
13
+ fillColorNeutral040: string;
14
+ fillColorNeutral050Base: string;
15
+ fillColorNeutral060: string;
16
+ fillColorNeutral070: string;
17
+ fillColorNeutral080: string;
18
+ fillColorNeutral090: string;
19
+ fillColorNeutral100Inverted: string;
20
+ };
21
+ dark: {
22
+ name: string;
23
+ iconColorDefaultPrimary: string;
24
+ iconColorDefaultSecondary: string;
25
+ iconColorDefaultDim: string;
26
+ iconColorDefaultDisabled: string;
27
+ iconColorDefaultInverted: string;
28
+ fillColorNeutral000: string;
29
+ fillColorNeutral010: string;
30
+ fillColorNeutral020: string;
31
+ fillColorNeutral030: string;
32
+ fillColorNeutral040: string;
33
+ fillColorNeutral050Base: string;
34
+ fillColorNeutral060: string;
35
+ fillColorNeutral070: string;
36
+ fillColorNeutral080: string;
37
+ fillColorNeutral090: string;
38
+ fillColorNeutral100Inverted: string;
39
+ };
40
+ };
41
+ //# sourceMappingURL=tapestry_alias_tokens_color_map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tapestry_alias_tokens_color_map.d.ts","sourceRoot":"","sources":["../../../src/vendor/tapestry/tapestry_alias_tokens_color_map.ts"],"names":[],"mappings":"AA8EA,eAAO,MAAM,2BAA2B;;cA1BhC,MAAM;iCACa,MAAM;mCACJ,MAAM;6BACZ,MAAM;kCACD,MAAM;kCACN,MAAM;6BAjDX,MAAM;6BACN,MAAM;6BACN,MAAM;6BACN,MAAM;6BACN,MAAM;iCACF,MAAM;6BACV,MAAM;6BACN,MAAM;6BACN,MAAM;6BACN,MAAM;qCACE,MAAM;;;cAkC7B,MAAM;iCACa,MAAM;mCACJ,MAAM;6BACZ,MAAM;kCACD,MAAM;kCACN,MAAM;6BAjDX,MAAM;6BACN,MAAM;6BACN,MAAM;6BACN,MAAM;6BACN,MAAM;iCACF,MAAM;6BACV,MAAM;6BACN,MAAM;6BACN,MAAM;6BACN,MAAM;qCACE,MAAM;;CA+DpC,CAAA"}