@planningcenter/chat-react-native 1.3.0-rc.7 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
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.7](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.7) (2025-02-11)
6
+ ## [1.3.0](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0) (2025-02-12)
7
7
 
8
8
 
9
9
  ### Features
@@ -17,85 +17,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
17
17
 
18
18
 
19
19
 
20
- ## [1.3.0-rc.6](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.6) (2025-02-11)
21
-
22
-
23
- ### Features
24
-
25
- * add auth to the example app ([#50](https://github.com/planningcenter/chat-js/issues/50)) ([5e0ae00](https://github.com/planningcenter/chat-js/commit/5e0ae008345743f6bba388e982a3ad768265971a))
26
- * **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))
27
- * create higher fidelity components ([#54](https://github.com/planningcenter/chat-js/issues/54)) ([367b707](https://github.com/planningcenter/chat-js/commit/367b7076b6d3a81ede7852248e98a199adea9978))
28
- * drop stream and set global dependencies ([#49](https://github.com/planningcenter/chat-js/issues/49)) ([1214b9f](https://github.com/planningcenter/chat-js/commit/1214b9fbc17f4ab67a1de1d39954604a28268f35))
29
- * **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)
30
-
31
-
32
-
33
- ## [1.3.0-rc.5](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.5) (2025-02-10)
34
-
35
-
36
- ### Features
37
-
38
- * add auth to the example app ([#50](https://github.com/planningcenter/chat-js/issues/50)) ([5e0ae00](https://github.com/planningcenter/chat-js/commit/5e0ae008345743f6bba388e982a3ad768265971a))
39
- * create higher fidelity components ([#54](https://github.com/planningcenter/chat-js/issues/54)) ([367b707](https://github.com/planningcenter/chat-js/commit/367b7076b6d3a81ede7852248e98a199adea9978))
40
- * drop stream and set global dependencies ([#49](https://github.com/planningcenter/chat-js/issues/49)) ([1214b9f](https://github.com/planningcenter/chat-js/commit/1214b9fbc17f4ab67a1de1d39954604a28268f35))
41
- * **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)
42
-
43
-
44
-
45
- ## [1.3.0-rc.4](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.4) (2025-02-07)
46
-
47
-
48
- ### Features
49
-
50
- * add auth to the example app ([#50](https://github.com/planningcenter/chat-js/issues/50)) ([5e0ae00](https://github.com/planningcenter/chat-js/commit/5e0ae008345743f6bba388e982a3ad768265971a))
51
- * create higher fidelity components ([#54](https://github.com/planningcenter/chat-js/issues/54)) ([367b707](https://github.com/planningcenter/chat-js/commit/367b7076b6d3a81ede7852248e98a199adea9978))
52
- * drop stream and set global dependencies ([#49](https://github.com/planningcenter/chat-js/issues/49)) ([1214b9f](https://github.com/planningcenter/chat-js/commit/1214b9fbc17f4ab67a1de1d39954604a28268f35))
53
- * **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)
54
-
55
-
56
-
57
- ## [1.3.0-rc.3](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.3) (2025-02-06)
58
-
59
-
60
- ### Features
61
-
62
- * add auth to the example app ([#50](https://github.com/planningcenter/chat-js/issues/50)) ([5e0ae00](https://github.com/planningcenter/chat-js/commit/5e0ae008345743f6bba388e982a3ad768265971a))
63
- * drop stream and set global dependencies ([#49](https://github.com/planningcenter/chat-js/issues/49)) ([1214b9f](https://github.com/planningcenter/chat-js/commit/1214b9fbc17f4ab67a1de1d39954604a28268f35))
64
- * **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)
65
-
66
-
67
-
68
- ## [1.3.0-rc.2](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.2) (2025-02-06)
69
-
70
-
71
- ### Features
72
-
73
- * add auth to the example app ([#50](https://github.com/planningcenter/chat-js/issues/50)) ([5e0ae00](https://github.com/planningcenter/chat-js/commit/5e0ae008345743f6bba388e982a3ad768265971a))
74
- * drop stream and set global dependencies ([#49](https://github.com/planningcenter/chat-js/issues/49)) ([1214b9f](https://github.com/planningcenter/chat-js/commit/1214b9fbc17f4ab67a1de1d39954604a28268f35))
75
- * **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)
76
-
77
-
78
-
79
- ## [1.3.0-rc.1](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.1) (2025-02-06)
80
-
81
-
82
- ### Features
83
-
84
- * add auth to the example app ([#50](https://github.com/planningcenter/chat-js/issues/50)) ([5e0ae00](https://github.com/planningcenter/chat-js/commit/5e0ae008345743f6bba388e982a3ad768265971a))
85
- * drop stream and set global dependencies ([#49](https://github.com/planningcenter/chat-js/issues/49)) ([1214b9f](https://github.com/planningcenter/chat-js/commit/1214b9fbc17f4ab67a1de1d39954604a28268f35))
86
- * **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)
87
-
88
-
89
-
90
- ## [1.3.0-rc.0](https://github.com/planningcenter/chat-js/compare/v1.2.0...v1.3.0-rc.0) (2025-01-24)
91
-
92
-
93
- ### Features
94
-
95
- * **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)
96
-
97
-
98
-
99
20
  ## [1.2.0](https://github.com/planningcenter/chat-js/compare/v1.1.0...v1.2.0) (2025-01-16)
100
21
 
101
22
 
@@ -1 +1 @@
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
+ {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/components/conversations.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+B,MAAM,OAAO,CAAA;AAanD,wBAAgB,aAAa,6BAgB5B"}
@@ -1,6 +1,7 @@
1
+ import { useNavigation } from '@react-navigation/native';
1
2
  import { QueryErrorResetBoundary, useSuspenseQuery } from '@tanstack/react-query';
2
3
  import React, { Suspense, useContext } from 'react';
3
- import { FlatList, StyleSheet, Text } from 'react-native';
4
+ import { FlatList, Pressable, StyleSheet, Text } from 'react-native';
4
5
  import { ChatContext } from '../contexts/chat_context';
5
6
  import { useTheme } from '../hooks/use_theme';
6
7
  import ErrorBoundary from './error_boundary';
@@ -21,7 +22,10 @@ const Loaded = () => {
21
22
  const { data: conversations } = useSuspenseQuery({
22
23
  queryKey: ['/chat/v2/me/conversations'],
23
24
  });
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>}/>);
25
+ const navigation = useNavigation();
26
+ return (<FlatList data={conversations?.data} contentContainerStyle={styles.container} ListEmptyComponent={<Text>No conversations found</Text>} ListHeaderComponent={<Text style={styles.foo}>Conversations</Text>} renderItem={({ item }) => (<Pressable onPress={() => navigation.navigate('Settings')}>
27
+ <Text style={styles.listItem}>{item.attributes.title}</Text>
28
+ </Pressable>)}/>);
25
29
  };
26
30
  const useStyles = () => {
27
31
  const { colors } = useTheme();
@@ -1 +1 @@
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,C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AE,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
+ {"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/components/conversations.tsx"],"names":[],"mappings":"AAAA,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AI,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,CACxB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CACxD;UAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,IAAI,CAC7D;QAAA,EAAE,SAAS,CAAC,CACb,CAAC,EACF,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 { useNavigation } from '@react-navigation/native'\nimport { QueryErrorResetBoundary, useSuspenseQuery } from '@tanstack/react-query'\nimport React, { Suspense, useContext } from 'react'\nimport { FlatList, Pressable, 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 const navigation = useNavigation()\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 }) => (\n <Pressable onPress={() => navigation.navigate('Settings')}>\n <Text style={styles.listItem}>{item.attributes.title}</Text>\n </Pressable>\n )}\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/chat-react-native",
3
- "version": "1.3.0-rc.7",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -13,6 +13,9 @@
13
13
  "prepublishOnly": "expo-module prepublishOnly"
14
14
  },
15
15
  "peerDependencies": {
16
+ "@react-navigation/elements": "*",
17
+ "@react-navigation/native": "*",
18
+ "@react-navigation/native-stack": "*",
16
19
  "@tanstack/react-query": "^5.0.0",
17
20
  "lodash": "*",
18
21
  "react": "*",
@@ -20,6 +23,9 @@
20
23
  },
21
24
  "devDependencies": {
22
25
  "@react-native/eslint-config": "^0.77.0",
26
+ "@react-navigation/elements": "^2.2.3",
27
+ "@react-navigation/native": "^7.0.14",
28
+ "@react-navigation/native-stack": "^7.2.0",
23
29
  "@tanstack/react-query": "^5.66.0",
24
30
  "@typescript-eslint/parser": "^8.23.0",
25
31
  "expo-module-scripts": "^3.4.0",
@@ -27,5 +33,5 @@
27
33
  "prettier": "^3.4.2",
28
34
  "react-native": "0.74.5"
29
35
  },
30
- "gitHead": "d523042ca47c1d2dd74744bf400ac3491a0a83ae"
36
+ "gitHead": "fccff0f8691ba483d7f504423a1bd649c94a5af8"
31
37
  }
@@ -1,6 +1,7 @@
1
+ import { useNavigation } from '@react-navigation/native'
1
2
  import { QueryErrorResetBoundary, useSuspenseQuery } from '@tanstack/react-query'
2
3
  import React, { Suspense, useContext } from 'react'
3
- import { FlatList, StyleSheet, Text } from 'react-native'
4
+ import { FlatList, Pressable, StyleSheet, Text } from 'react-native'
4
5
  import { ChatContext } from '../contexts/chat_context'
5
6
  import { useTheme } from '../hooks/use_theme'
6
7
  import { ConversationRecord } from '../types'
@@ -35,6 +36,7 @@ const Loaded = () => {
35
36
  const { data: conversations } = useSuspenseQuery<ConversationsResponse>({
36
37
  queryKey: ['/chat/v2/me/conversations'],
37
38
  })
39
+ const navigation = useNavigation()
38
40
 
39
41
  return (
40
42
  <FlatList
@@ -42,7 +44,11 @@ const Loaded = () => {
42
44
  contentContainerStyle={styles.container}
43
45
  ListEmptyComponent={<Text>No conversations found</Text>}
44
46
  ListHeaderComponent={<Text style={styles.foo}>Conversations</Text>}
45
- renderItem={({ item }) => <Text style={styles.listItem}>{item.attributes.title}</Text>}
47
+ renderItem={({ item }) => (
48
+ <Pressable onPress={() => navigation.navigate('Settings')}>
49
+ <Text style={styles.listItem}>{item.attributes.title}</Text>
50
+ </Pressable>
51
+ )}
46
52
  />
47
53
  )
48
54
  }
package/src/types.d.ts CHANGED
@@ -22,3 +22,14 @@ export type OAuthToken = {
22
22
  export type DeepPartial<T> = {
23
23
  [P in keyof T]?: DeepPartial<T[P]>
24
24
  }
25
+
26
+ export type RootStackParamList = {
27
+ Settings: undefined
28
+ Conversations: undefined
29
+ }
30
+
31
+ declare global {
32
+ namespace ReactNavigation {
33
+ interface RootParamList extends RootStackParamList {}
34
+ }
35
+ }