@appsupportkit/support-sdk 0.3.0 → 0.4.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/lib/commonjs/api.js +49 -15
- package/lib/commonjs/api.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js +1 -1
- package/lib/commonjs/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/LauncherButton.js +4 -4
- package/lib/commonjs/components/LauncherButton.js.map +1 -1
- package/lib/commonjs/components/SupportButton.js +123 -97
- package/lib/commonjs/components/SupportButton.js.map +1 -1
- package/lib/commonjs/components/icons.js +81 -110
- package/lib/commonjs/components/icons.js.map +1 -1
- package/lib/commonjs/components/primitives.js +0 -153
- package/lib/commonjs/components/primitives.js.map +1 -1
- package/lib/commonjs/components/screens/ChatScreen.js +487 -0
- package/lib/commonjs/components/screens/ChatScreen.js.map +1 -0
- package/lib/commonjs/i18n/strings/de.js +3 -0
- package/lib/commonjs/i18n/strings/de.js.map +1 -1
- package/lib/commonjs/i18n/strings/en.js +3 -0
- package/lib/commonjs/i18n/strings/en.js.map +1 -1
- package/lib/commonjs/i18n/strings/es.js +3 -0
- package/lib/commonjs/i18n/strings/es.js.map +1 -1
- package/lib/commonjs/i18n/strings/fr.js +3 -0
- package/lib/commonjs/i18n/strings/fr.js.map +1 -1
- package/lib/commonjs/i18n/strings/hi.js +3 -0
- package/lib/commonjs/i18n/strings/hi.js.map +1 -1
- package/lib/commonjs/i18n/strings/it.js +3 -0
- package/lib/commonjs/i18n/strings/it.js.map +1 -1
- package/lib/commonjs/i18n/strings/ja.js +3 -0
- package/lib/commonjs/i18n/strings/ja.js.map +1 -1
- package/lib/commonjs/i18n/strings/ko.js +3 -0
- package/lib/commonjs/i18n/strings/ko.js.map +1 -1
- package/lib/commonjs/i18n/strings/nl.js +3 -0
- package/lib/commonjs/i18n/strings/nl.js.map +1 -1
- package/lib/commonjs/i18n/strings/pl.js +3 -0
- package/lib/commonjs/i18n/strings/pl.js.map +1 -1
- package/lib/commonjs/i18n/strings/pt.js +3 -0
- package/lib/commonjs/i18n/strings/pt.js.map +1 -1
- package/lib/commonjs/i18n/strings/ru.js +3 -0
- package/lib/commonjs/i18n/strings/ru.js.map +1 -1
- package/lib/commonjs/i18n/strings/tr.js +3 -0
- package/lib/commonjs/i18n/strings/tr.js.map +1 -1
- package/lib/commonjs/i18n/strings/zh.js +3 -0
- package/lib/commonjs/i18n/strings/zh.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/push.js +78 -3
- package/lib/commonjs/push.js.map +1 -1
- package/lib/commonjs/review.js +54 -0
- package/lib/commonjs/review.js.map +1 -0
- package/lib/commonjs/theme.js +142 -23
- package/lib/commonjs/theme.js.map +1 -1
- package/lib/commonjs/types.js +21 -3
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useSupportThreads.js +22 -15
- package/lib/commonjs/useSupportThreads.js.map +1 -1
- package/lib/commonjs/utils.js +13 -33
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/version.js +13 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/api.js +46 -13
- package/lib/module/api.js.map +1 -1
- package/lib/module/components/BottomSheet.js +1 -1
- package/lib/module/components/BottomSheet.js.map +1 -1
- package/lib/module/components/LauncherButton.js +5 -5
- package/lib/module/components/LauncherButton.js.map +1 -1
- package/lib/module/components/SupportButton.js +128 -102
- package/lib/module/components/SupportButton.js.map +1 -1
- package/lib/module/components/icons.js +80 -107
- package/lib/module/components/icons.js.map +1 -1
- package/lib/module/components/primitives.js +2 -146
- package/lib/module/components/primitives.js.map +1 -1
- package/lib/module/components/screens/ChatScreen.js +485 -0
- package/lib/module/components/screens/ChatScreen.js.map +1 -0
- package/lib/module/i18n/strings/de.js +3 -0
- package/lib/module/i18n/strings/de.js.map +1 -1
- package/lib/module/i18n/strings/en.js +3 -0
- package/lib/module/i18n/strings/en.js.map +1 -1
- package/lib/module/i18n/strings/es.js +3 -0
- package/lib/module/i18n/strings/es.js.map +1 -1
- package/lib/module/i18n/strings/fr.js +3 -0
- package/lib/module/i18n/strings/fr.js.map +1 -1
- package/lib/module/i18n/strings/hi.js +3 -0
- package/lib/module/i18n/strings/hi.js.map +1 -1
- package/lib/module/i18n/strings/it.js +3 -0
- package/lib/module/i18n/strings/it.js.map +1 -1
- package/lib/module/i18n/strings/ja.js +3 -0
- package/lib/module/i18n/strings/ja.js.map +1 -1
- package/lib/module/i18n/strings/ko.js +3 -0
- package/lib/module/i18n/strings/ko.js.map +1 -1
- package/lib/module/i18n/strings/nl.js +3 -0
- package/lib/module/i18n/strings/nl.js.map +1 -1
- package/lib/module/i18n/strings/pl.js +3 -0
- package/lib/module/i18n/strings/pl.js.map +1 -1
- package/lib/module/i18n/strings/pt.js +3 -0
- package/lib/module/i18n/strings/pt.js.map +1 -1
- package/lib/module/i18n/strings/ru.js +3 -0
- package/lib/module/i18n/strings/ru.js.map +1 -1
- package/lib/module/i18n/strings/tr.js +3 -0
- package/lib/module/i18n/strings/tr.js.map +1 -1
- package/lib/module/i18n/strings/zh.js +3 -0
- package/lib/module/i18n/strings/zh.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/push.js +77 -3
- package/lib/module/push.js.map +1 -1
- package/lib/module/review.js +48 -0
- package/lib/module/review.js.map +1 -0
- package/lib/module/theme.js +141 -23
- package/lib/module/theme.js.map +1 -1
- package/lib/module/types.js +21 -3
- package/lib/module/types.js.map +1 -1
- package/lib/module/useSupportThreads.js +22 -15
- package/lib/module/useSupportThreads.js.map +1 -1
- package/lib/module/utils.js +12 -32
- package/lib/module/utils.js.map +1 -1
- package/lib/module/version.js +9 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/api.d.ts +33 -12
- package/lib/typescript/api.d.ts.map +1 -1
- package/lib/typescript/components/SupportButton.d.ts +2 -2
- package/lib/typescript/components/SupportButton.d.ts.map +1 -1
- package/lib/typescript/components/icons.d.ts +5 -14
- package/lib/typescript/components/icons.d.ts.map +1 -1
- package/lib/typescript/components/primitives.d.ts +0 -31
- package/lib/typescript/components/primitives.d.ts.map +1 -1
- package/lib/typescript/components/screens/ChatScreen.d.ts +21 -0
- package/lib/typescript/components/screens/ChatScreen.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/de.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/en.d.ts +3 -0
- package/lib/typescript/i18n/strings/en.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/es.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/fr.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/hi.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/it.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/ja.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/ko.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/nl.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/pl.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/pt.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/ru.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/tr.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/zh.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +3 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/push.d.ts +14 -2
- package/lib/typescript/push.d.ts.map +1 -1
- package/lib/typescript/review.d.ts +15 -0
- package/lib/typescript/review.d.ts.map +1 -0
- package/lib/typescript/theme.d.ts +23 -5
- package/lib/typescript/theme.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +54 -11
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/useSupportThreads.d.ts +9 -3
- package/lib/typescript/useSupportThreads.d.ts.map +1 -1
- package/lib/typescript/utils.d.ts +3 -2
- package/lib/typescript/utils.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +7 -0
- package/lib/typescript/version.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/api.ts +59 -30
- package/src/components/BottomSheet.tsx +1 -1
- package/src/components/LauncherButton.tsx +4 -4
- package/src/components/SupportButton.tsx +140 -111
- package/src/components/icons.tsx +60 -101
- package/src/components/primitives.tsx +1 -163
- package/src/components/screens/ChatScreen.tsx +541 -0
- package/src/i18n/strings/de.ts +3 -0
- package/src/i18n/strings/en.ts +3 -0
- package/src/i18n/strings/es.ts +3 -0
- package/src/i18n/strings/fr.ts +3 -0
- package/src/i18n/strings/hi.ts +3 -0
- package/src/i18n/strings/it.ts +3 -0
- package/src/i18n/strings/ja.ts +3 -0
- package/src/i18n/strings/ko.ts +3 -0
- package/src/i18n/strings/nl.ts +3 -0
- package/src/i18n/strings/pl.ts +3 -0
- package/src/i18n/strings/pt.ts +3 -0
- package/src/i18n/strings/ru.ts +3 -0
- package/src/i18n/strings/tr.ts +3 -0
- package/src/i18n/strings/zh.ts +3 -0
- package/src/index.tsx +5 -0
- package/src/push.ts +100 -2
- package/src/review.ts +54 -0
- package/src/theme.ts +182 -28
- package/src/types.ts +53 -11
- package/src/useSupportThreads.ts +31 -18
- package/src/utils.ts +14 -21
- package/src/version.ts +6 -0
- package/lib/commonjs/components/screens/ComposeScreen.js +0 -219
- package/lib/commonjs/components/screens/ComposeScreen.js.map +0 -1
- package/lib/commonjs/components/screens/HomeScreen.js +0 -334
- package/lib/commonjs/components/screens/HomeScreen.js.map +0 -1
- package/lib/commonjs/components/screens/ThreadScreen.js +0 -339
- package/lib/commonjs/components/screens/ThreadScreen.js.map +0 -1
- package/lib/module/components/screens/ComposeScreen.js +0 -217
- package/lib/module/components/screens/ComposeScreen.js.map +0 -1
- package/lib/module/components/screens/HomeScreen.js +0 -330
- package/lib/module/components/screens/HomeScreen.js.map +0 -1
- package/lib/module/components/screens/ThreadScreen.js +0 -337
- package/lib/module/components/screens/ThreadScreen.js.map +0 -1
- package/lib/typescript/components/screens/ComposeScreen.d.ts +0 -12
- package/lib/typescript/components/screens/ComposeScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/HomeScreen.d.ts +0 -19
- package/lib/typescript/components/screens/HomeScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/ThreadScreen.d.ts +0 -12
- package/lib/typescript/components/screens/ThreadScreen.d.ts.map +0 -1
- package/src/components/screens/ComposeScreen.tsx +0 -229
- package/src/components/screens/HomeScreen.tsx +0 -346
- package/src/components/screens/ThreadScreen.tsx +0 -424
package/src/useSupportThreads.ts
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
type ApiConfig,
|
|
23
23
|
} from './api';
|
|
24
24
|
import type { StringKey } from './i18n';
|
|
25
|
-
import type { Thread } from './types';
|
|
25
|
+
import type { StoreListing, Thread } from './types';
|
|
26
26
|
import {
|
|
27
27
|
latestAdminMessageAt,
|
|
28
28
|
pruneWatermarks,
|
|
@@ -31,11 +31,11 @@ import {
|
|
|
31
31
|
type ReadWatermarks,
|
|
32
32
|
} from './unread';
|
|
33
33
|
|
|
34
|
-
// Poll cadence by context: fast where latency is felt (
|
|
34
|
+
// Poll cadence by context: fast where latency is felt (looking at the chat,
|
|
35
35
|
// waiting for a reply), slow when the sheet is closed — and the idle tick
|
|
36
36
|
// uses the count-only endpoint, so it costs ~18 bytes instead of the full
|
|
37
37
|
// thread list.
|
|
38
|
-
const
|
|
38
|
+
const CHAT_POLL_MS = 5_000;
|
|
39
39
|
const SHEET_POLL_MS = 15_000;
|
|
40
40
|
export const IDLE_POLL_MS = 60_000;
|
|
41
41
|
const MIN_POLL_MS = 3_000;
|
|
@@ -102,6 +102,8 @@ export interface SupportThreadsState {
|
|
|
102
102
|
* answered on another device.
|
|
103
103
|
*/
|
|
104
104
|
languageLoaded: boolean;
|
|
105
|
+
/** The app's store listings, for review request buttons. */
|
|
106
|
+
store: StoreListing | null;
|
|
105
107
|
/** User-initiated refresh (pull-to-refresh, retry button). */
|
|
106
108
|
refresh: () => void;
|
|
107
109
|
/** Awaited by send/submit handlers so the list reflects the write. */
|
|
@@ -113,7 +115,7 @@ export function useSupportThreads({
|
|
|
113
115
|
revenuecatId,
|
|
114
116
|
enabled,
|
|
115
117
|
sheetOpen,
|
|
116
|
-
|
|
118
|
+
chatVisible,
|
|
117
119
|
idlePollMs,
|
|
118
120
|
}: {
|
|
119
121
|
config: ApiConfig;
|
|
@@ -121,7 +123,11 @@ export function useSupportThreads({
|
|
|
121
123
|
/** False when props failed validation — no requests are made. */
|
|
122
124
|
enabled: boolean;
|
|
123
125
|
sheetOpen: boolean;
|
|
124
|
-
|
|
126
|
+
/**
|
|
127
|
+
* The chat is on screen. It shows every conversation at once, so all of
|
|
128
|
+
* them are read while it is — including replies that arrive meanwhile.
|
|
129
|
+
*/
|
|
130
|
+
chatVisible: boolean;
|
|
125
131
|
idlePollMs: number;
|
|
126
132
|
}): SupportThreadsState {
|
|
127
133
|
const [threads, setThreads] = useState<Thread[] | null>(null);
|
|
@@ -131,6 +137,7 @@ export function useSupportThreads({
|
|
|
131
137
|
const [errorKey, setErrorKey] = useState<StringKey | null>(null);
|
|
132
138
|
const [serverLanguage, setServerLanguage] = useState<string | null>(null);
|
|
133
139
|
const [languageLoaded, setLanguageLoaded] = useState(false);
|
|
140
|
+
const [store, setStore] = useState<StoreListing | null>(null);
|
|
134
141
|
|
|
135
142
|
const mounted = useRef(true);
|
|
136
143
|
/** Last server payload, before local read reconciliation. */
|
|
@@ -140,11 +147,11 @@ export function useSupportThreads({
|
|
|
140
147
|
const requestSeq = useRef(0);
|
|
141
148
|
const appliedSeq = useRef(0);
|
|
142
149
|
const readEpoch = useRef(0);
|
|
143
|
-
const
|
|
150
|
+
const chatVisibleRef = useRef(chatVisible);
|
|
144
151
|
|
|
145
152
|
useEffect(() => {
|
|
146
|
-
|
|
147
|
-
}, [
|
|
153
|
+
chatVisibleRef.current = chatVisible;
|
|
154
|
+
}, [chatVisible]);
|
|
148
155
|
|
|
149
156
|
useEffect(() => {
|
|
150
157
|
mounted.current = true;
|
|
@@ -251,6 +258,11 @@ export function useSupportThreads({
|
|
|
251
258
|
[publish, sendRead],
|
|
252
259
|
);
|
|
253
260
|
|
|
261
|
+
/** Marks every conversation read — the chat shows them all at once. */
|
|
262
|
+
const markAllRead = useCallback(() => {
|
|
263
|
+
for (const thread of rawThreads.current ?? []) markThreadRead(thread.id);
|
|
264
|
+
}, [markThreadRead]);
|
|
265
|
+
|
|
254
266
|
const fetchThreads = useCallback(
|
|
255
267
|
async (mode: 'initial' | 'user' | 'background') => {
|
|
256
268
|
if (!enabled) return;
|
|
@@ -275,12 +287,12 @@ export function useSupportThreads({
|
|
|
275
287
|
setErrorKey(null);
|
|
276
288
|
setServerLanguage(data.language);
|
|
277
289
|
setLanguageLoaded(true);
|
|
290
|
+
setStore(data.store ?? null);
|
|
278
291
|
publish();
|
|
279
292
|
|
|
280
|
-
// Replies that arrived while the user is
|
|
293
|
+
// Replies that arrived while the user is looking at the chat are
|
|
281
294
|
// read on arrival — otherwise the badge climbed while they read.
|
|
282
|
-
|
|
283
|
-
if (active !== null) markThreadRead(active);
|
|
295
|
+
if (chatVisibleRef.current) markAllRead();
|
|
284
296
|
flushReads();
|
|
285
297
|
} catch (e) {
|
|
286
298
|
if (!mounted.current) return;
|
|
@@ -293,7 +305,7 @@ export function useSupportThreads({
|
|
|
293
305
|
}
|
|
294
306
|
}
|
|
295
307
|
},
|
|
296
|
-
[config, enabled, revenuecatId, publish,
|
|
308
|
+
[config, enabled, revenuecatId, publish, markAllRead, flushReads],
|
|
297
309
|
);
|
|
298
310
|
|
|
299
311
|
/** Badge-only refresh — the cheap endpoint, used while idle. */
|
|
@@ -325,10 +337,10 @@ export function useSupportThreads({
|
|
|
325
337
|
if (sheetOpen) void fetchThreads('background');
|
|
326
338
|
}, [sheetOpen, fetchThreads]);
|
|
327
339
|
|
|
328
|
-
// Opening
|
|
340
|
+
// Opening the chat marks everything read immediately, before the next poll.
|
|
329
341
|
useEffect(() => {
|
|
330
|
-
if (
|
|
331
|
-
}, [
|
|
342
|
+
if (chatVisible) markAllRead();
|
|
343
|
+
}, [chatVisible, markAllRead]);
|
|
332
344
|
|
|
333
345
|
// Cadence follows what the user is looking at; the app returning to the
|
|
334
346
|
// foreground always ticks.
|
|
@@ -337,8 +349,8 @@ export function useSupportThreads({
|
|
|
337
349
|
const idle = !sheetOpen;
|
|
338
350
|
const intervalMs = idle
|
|
339
351
|
? idlePollMs
|
|
340
|
-
:
|
|
341
|
-
?
|
|
352
|
+
: chatVisible
|
|
353
|
+
? CHAT_POLL_MS
|
|
342
354
|
: SHEET_POLL_MS;
|
|
343
355
|
|
|
344
356
|
const tick = () => {
|
|
@@ -366,7 +378,7 @@ export function useSupportThreads({
|
|
|
366
378
|
}, [
|
|
367
379
|
enabled,
|
|
368
380
|
sheetOpen,
|
|
369
|
-
|
|
381
|
+
chatVisible,
|
|
370
382
|
idlePollMs,
|
|
371
383
|
fetchThreads,
|
|
372
384
|
fetchCount,
|
|
@@ -386,6 +398,7 @@ export function useSupportThreads({
|
|
|
386
398
|
errorKey,
|
|
387
399
|
serverLanguage,
|
|
388
400
|
languageLoaded,
|
|
401
|
+
store,
|
|
389
402
|
refresh,
|
|
390
403
|
reload,
|
|
391
404
|
};
|
package/src/utils.ts
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
import type { Translator } from './i18n';
|
|
2
|
+
import type { SupportUser, UserPlan } from './types';
|
|
2
3
|
|
|
3
4
|
// Dates and times follow the language the user picked, not the device's:
|
|
4
5
|
// a sheet that says "Traduction…" above "2 days ago" reads as broken.
|
|
5
6
|
|
|
6
|
-
/** "2h ago" relative time — mirrors the web dashboard's formatting. */
|
|
7
|
-
export function relativeTime(iso: string, strings: Translator): string {
|
|
8
|
-
const then = new Date(iso).getTime();
|
|
9
|
-
const seconds = Math.max(0, Math.floor((Date.now() - then) / 1000));
|
|
10
|
-
if (seconds < 60) return strings.t('time.justNow');
|
|
11
|
-
const minutes = Math.floor(seconds / 60);
|
|
12
|
-
if (minutes < 60) return strings.t('time.minutes', { count: minutes });
|
|
13
|
-
const hours = Math.floor(minutes / 60);
|
|
14
|
-
if (hours < 24) return strings.t('time.hours', { count: hours });
|
|
15
|
-
const days = Math.floor(hours / 24);
|
|
16
|
-
if (days < 7) return strings.t('time.days', { count: days });
|
|
17
|
-
const weeks = Math.floor(days / 7);
|
|
18
|
-
if (weeks < 5) return strings.t('time.weeks', { count: weeks });
|
|
19
|
-
const months = Math.floor(days / 30);
|
|
20
|
-
if (months < 12) return strings.t('time.months', { count: months });
|
|
21
|
-
return strings.t('time.years', { count: Math.floor(days / 365) });
|
|
22
|
-
}
|
|
23
|
-
|
|
24
7
|
export function formatDate(iso: string, strings: Translator): string {
|
|
25
8
|
return new Date(iso).toLocaleDateString(strings.locale, {
|
|
26
9
|
year: 'numeric',
|
|
@@ -62,6 +45,13 @@ export function dayLabel(iso: string, strings: Translator): string {
|
|
|
62
45
|
});
|
|
63
46
|
}
|
|
64
47
|
|
|
48
|
+
const PLANS: UserPlan[] = ['free', 'trial', 'pro'];
|
|
49
|
+
|
|
50
|
+
/** The user's plan, reading the deprecated `isPaid` when `plan` is absent. */
|
|
51
|
+
export function userPlan(user: SupportUser): UserPlan {
|
|
52
|
+
return user.plan ?? (user.isPaid ? 'pro' : 'free');
|
|
53
|
+
}
|
|
54
|
+
|
|
65
55
|
/** Dev-mode prop validation with actionable messages. */
|
|
66
56
|
export function validateProps(props: {
|
|
67
57
|
appName?: unknown;
|
|
@@ -83,13 +73,16 @@ export function validateProps(props: {
|
|
|
83
73
|
}
|
|
84
74
|
const user = props.user as Record<string, unknown> | undefined;
|
|
85
75
|
if (!user || typeof user !== 'object') {
|
|
86
|
-
return 'SupportButton: `user` is required — { name,
|
|
76
|
+
return 'SupportButton: `user` is required — { name, plan, revenuecatId, appVersion }.';
|
|
87
77
|
}
|
|
88
78
|
if (typeof user.name !== 'string' || user.name.length === 0) {
|
|
89
79
|
return 'SupportButton: `user.name` is required (string).';
|
|
90
80
|
}
|
|
91
|
-
if (
|
|
92
|
-
return 'SupportButton: `user.
|
|
81
|
+
if (user.plan !== undefined && !PLANS.includes(user.plan as UserPlan)) {
|
|
82
|
+
return 'SupportButton: `user.plan` must be "free", "trial" or "pro".';
|
|
83
|
+
}
|
|
84
|
+
if (user.plan === undefined && typeof user.isPaid !== 'boolean') {
|
|
85
|
+
return 'SupportButton: `user.plan` is required — "free", "trial" or "pro".';
|
|
93
86
|
}
|
|
94
87
|
if (typeof user.revenuecatId !== 'string' || user.revenuecatId.length === 0) {
|
|
95
88
|
return 'SupportButton: `user.revenuecatId` is required (string) — the RevenueCat app user id.';
|
package/src/version.ts
ADDED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ComposeScreen = ComposeScreen;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _types = require("../../types");
|
|
10
|
-
var _icons = require("../icons");
|
|
11
|
-
var _primitives = require("../primitives");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
/** Scales in once on success — the only celebratory motion in the SDK. */function SentMark({
|
|
14
|
-
theme
|
|
15
|
-
}) {
|
|
16
|
-
const scale = (0, _react.useRef)(new _reactNative.Animated.Value(0.6)).current;
|
|
17
|
-
const opacity = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
18
|
-
(0, _react.useEffect)(() => {
|
|
19
|
-
_reactNative.Animated.parallel([_reactNative.Animated.timing(scale, {
|
|
20
|
-
toValue: 1,
|
|
21
|
-
duration: 320,
|
|
22
|
-
easing: _reactNative.Easing.bezier(0.16, 1, 0.3, 1),
|
|
23
|
-
useNativeDriver: true
|
|
24
|
-
}), _reactNative.Animated.timing(opacity, {
|
|
25
|
-
toValue: 1,
|
|
26
|
-
duration: 200,
|
|
27
|
-
easing: _reactNative.Easing.out(_reactNative.Easing.cubic),
|
|
28
|
-
useNativeDriver: true
|
|
29
|
-
})]).start();
|
|
30
|
-
}, [scale, opacity]);
|
|
31
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
32
|
-
style: {
|
|
33
|
-
width: 56,
|
|
34
|
-
height: 56,
|
|
35
|
-
borderRadius: 28,
|
|
36
|
-
backgroundColor: theme.colors.statusResolvedBg,
|
|
37
|
-
borderWidth: 1,
|
|
38
|
-
borderColor: theme.colors.statusResolved,
|
|
39
|
-
alignItems: 'center',
|
|
40
|
-
justifyContent: 'center',
|
|
41
|
-
opacity,
|
|
42
|
-
transform: [{
|
|
43
|
-
scale
|
|
44
|
-
}]
|
|
45
|
-
},
|
|
46
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CheckIcon, {
|
|
47
|
-
color: theme.colors.statusResolved,
|
|
48
|
-
size: 20
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function ComposeScreen({
|
|
53
|
-
theme,
|
|
54
|
-
strings,
|
|
55
|
-
type,
|
|
56
|
-
onBack,
|
|
57
|
-
onSubmit
|
|
58
|
-
}) {
|
|
59
|
-
const [message, setMessage] = (0, _react.useState)('');
|
|
60
|
-
const [submitting, setSubmitting] = (0, _react.useState)(false);
|
|
61
|
-
const [failedMessage, setFailedMessage] = (0, _react.useState)(null);
|
|
62
|
-
const [sent, setSent] = (0, _react.useState)(false);
|
|
63
|
-
const trimmed = message.trim();
|
|
64
|
-
const valid = trimmed.length >= _types.USER_MESSAGE_MIN && trimmed.length <= _types.USER_MESSAGE_MAX;
|
|
65
|
-
const overLimit = message.length > _types.USER_MESSAGE_MAX;
|
|
66
|
-
const tooShort = trimmed.length > 0 && trimmed.length < _types.USER_MESSAGE_MIN;
|
|
67
|
-
async function handleSubmit() {
|
|
68
|
-
if (!valid || submitting) return;
|
|
69
|
-
setSubmitting(true);
|
|
70
|
-
setFailedMessage(null);
|
|
71
|
-
const errorMessage = await onSubmit(trimmed);
|
|
72
|
-
setSubmitting(false);
|
|
73
|
-
if (errorMessage === null) setSent(true);else setFailedMessage(errorMessage);
|
|
74
|
-
}
|
|
75
|
-
if (sent) {
|
|
76
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
77
|
-
style: {
|
|
78
|
-
flex: 1,
|
|
79
|
-
alignItems: 'center',
|
|
80
|
-
justifyContent: 'center',
|
|
81
|
-
gap: 14,
|
|
82
|
-
paddingHorizontal: 32,
|
|
83
|
-
paddingBottom: 40
|
|
84
|
-
},
|
|
85
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SentMark, {
|
|
86
|
-
theme: theme
|
|
87
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
88
|
-
style: _primitives.textStyles.title(theme),
|
|
89
|
-
children: strings.t('compose.sent')
|
|
90
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
91
|
-
style: [_primitives.textStyles.secondary(theme), {
|
|
92
|
-
textAlign: 'center'
|
|
93
|
-
}],
|
|
94
|
-
children: strings.t('compose.sentHint')
|
|
95
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
96
|
-
style: {
|
|
97
|
-
marginTop: 6
|
|
98
|
-
},
|
|
99
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.PrimaryButton, {
|
|
100
|
-
label: strings.t('compose.done'),
|
|
101
|
-
onPress: onBack,
|
|
102
|
-
theme: theme
|
|
103
|
-
})
|
|
104
|
-
})]
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.KeyboardAvoidingView, {
|
|
108
|
-
style: {
|
|
109
|
-
flex: 1
|
|
110
|
-
},
|
|
111
|
-
behavior: _reactNative.Platform.OS === 'ios' ? 'padding' : undefined,
|
|
112
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
113
|
-
style: {
|
|
114
|
-
flexDirection: 'row',
|
|
115
|
-
alignItems: 'center',
|
|
116
|
-
gap: 10,
|
|
117
|
-
paddingHorizontal: 12,
|
|
118
|
-
paddingBottom: 14
|
|
119
|
-
},
|
|
120
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.IconButton, {
|
|
121
|
-
onPress: onBack,
|
|
122
|
-
theme: theme,
|
|
123
|
-
accessibilityLabel: strings.t('compose.back'),
|
|
124
|
-
size: 32,
|
|
125
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.Chevron, {
|
|
126
|
-
color: theme.colors.textSecondary,
|
|
127
|
-
direction: "left",
|
|
128
|
-
size: 12
|
|
129
|
-
})
|
|
130
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.TypeGlyph, {
|
|
131
|
-
type: type,
|
|
132
|
-
theme: theme,
|
|
133
|
-
size: 32
|
|
134
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
135
|
-
style: {
|
|
136
|
-
flex: 1,
|
|
137
|
-
gap: 1
|
|
138
|
-
},
|
|
139
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
140
|
-
style: _primitives.textStyles.heading(theme),
|
|
141
|
-
children: strings.t(`type.${type}`)
|
|
142
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
143
|
-
style: _primitives.textStyles.meta(theme),
|
|
144
|
-
children: strings.t(`sub.${type}`)
|
|
145
|
-
})]
|
|
146
|
-
})]
|
|
147
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
148
|
-
style: {
|
|
149
|
-
flex: 1,
|
|
150
|
-
paddingHorizontal: 16
|
|
151
|
-
},
|
|
152
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
153
|
-
value: message,
|
|
154
|
-
onChangeText: v => {
|
|
155
|
-
setMessage(v);
|
|
156
|
-
setFailedMessage(null);
|
|
157
|
-
},
|
|
158
|
-
multiline: true,
|
|
159
|
-
autoFocus: true,
|
|
160
|
-
editable: !submitting,
|
|
161
|
-
placeholder: strings.t(`prompt.${type}`),
|
|
162
|
-
placeholderTextColor: theme.colors.textTertiary,
|
|
163
|
-
style: {
|
|
164
|
-
minHeight: 140,
|
|
165
|
-
maxHeight: 240,
|
|
166
|
-
borderWidth: 1,
|
|
167
|
-
borderColor: theme.colors.border,
|
|
168
|
-
borderRadius: theme.radii.card,
|
|
169
|
-
backgroundColor: theme.colors.surface,
|
|
170
|
-
color: theme.colors.textPrimary,
|
|
171
|
-
fontSize: 15,
|
|
172
|
-
lineHeight: 21,
|
|
173
|
-
padding: 14,
|
|
174
|
-
textAlignVertical: 'top'
|
|
175
|
-
}
|
|
176
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
177
|
-
style: {
|
|
178
|
-
flexDirection: 'row',
|
|
179
|
-
alignItems: 'center',
|
|
180
|
-
gap: 10,
|
|
181
|
-
paddingTop: 10,
|
|
182
|
-
paddingHorizontal: 2,
|
|
183
|
-
minHeight: 20
|
|
184
|
-
},
|
|
185
|
-
children: [failedMessage !== null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
186
|
-
style: {
|
|
187
|
-
fontSize: 12,
|
|
188
|
-
color: theme.colors.statusDanger
|
|
189
|
-
},
|
|
190
|
-
children: failedMessage
|
|
191
|
-
}) : tooShort ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
192
|
-
style: _primitives.textStyles.meta(theme),
|
|
193
|
-
children: strings.t('compose.minChars', {
|
|
194
|
-
count: _types.USER_MESSAGE_MIN
|
|
195
|
-
})
|
|
196
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
197
|
-
style: [_primitives.textStyles.meta(theme), {
|
|
198
|
-
marginLeft: 'auto'
|
|
199
|
-
}, overLimit && {
|
|
200
|
-
color: theme.colors.statusDanger
|
|
201
|
-
}],
|
|
202
|
-
children: [message.length, "/", _types.USER_MESSAGE_MAX]
|
|
203
|
-
})]
|
|
204
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
205
|
-
style: {
|
|
206
|
-
paddingTop: 12
|
|
207
|
-
},
|
|
208
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.PrimaryButton, {
|
|
209
|
-
label: strings.t(submitting ? 'compose.sending' : 'compose.send'),
|
|
210
|
-
onPress: handleSubmit,
|
|
211
|
-
disabled: !valid || submitting,
|
|
212
|
-
theme: theme,
|
|
213
|
-
fullWidth: true
|
|
214
|
-
})
|
|
215
|
-
})]
|
|
216
|
-
})]
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
//# sourceMappingURL=ComposeScreen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_types","_icons","_primitives","_jsxRuntime","SentMark","theme","scale","useRef","Animated","Value","current","opacity","useEffect","parallel","timing","toValue","duration","easing","Easing","bezier","useNativeDriver","out","cubic","start","jsx","View","style","width","height","borderRadius","backgroundColor","colors","statusResolvedBg","borderWidth","borderColor","statusResolved","alignItems","justifyContent","transform","children","CheckIcon","color","size","ComposeScreen","strings","type","onBack","onSubmit","message","setMessage","useState","submitting","setSubmitting","failedMessage","setFailedMessage","sent","setSent","trimmed","trim","valid","length","USER_MESSAGE_MIN","USER_MESSAGE_MAX","overLimit","tooShort","handleSubmit","errorMessage","jsxs","flex","gap","paddingHorizontal","paddingBottom","Text","textStyles","title","t","secondary","textAlign","marginTop","PrimaryButton","label","onPress","KeyboardAvoidingView","behavior","Platform","OS","undefined","flexDirection","IconButton","accessibilityLabel","Chevron","textSecondary","direction","TypeGlyph","heading","meta","TextInput","value","onChangeText","v","multiline","autoFocus","editable","placeholder","placeholderTextColor","textTertiary","minHeight","maxHeight","border","radii","card","surface","textPrimary","fontSize","lineHeight","padding","textAlignVertical","paddingTop","statusDanger","count","marginLeft","disabled","fullWidth"],"sourceRoot":"../../../../src","sources":["components/screens/ComposeScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAYA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAKuB,IAAAK,WAAA,GAAAL,OAAA;AAEvB,0EACA,SAASM,QAAQA,CAAC;EAAEC;AAA+B,CAAC,EAAE;EACpD,MAAMC,KAAK,GAAG,IAAAC,aAAM,EAAC,IAAIC,qBAAQ,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAACC,OAAO;EACrD,MAAMC,OAAO,GAAG,IAAAJ,aAAM,EAAC,IAAIC,qBAAQ,CAACC,KAAK,CAAC,CAAC,CAAC,CAAC,CAACC,OAAO;EAErD,IAAAE,gBAAS,EAAC,MAAM;IACdJ,qBAAQ,CAACK,QAAQ,CAAC,CAChBL,qBAAQ,CAACM,MAAM,CAACR,KAAK,EAAE;MACrBS,OAAO,EAAE,CAAC;MACVC,QAAQ,EAAE,GAAG;MACbC,MAAM,EAAEC,mBAAM,CAACC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;MACtCC,eAAe,EAAE;IACnB,CAAC,CAAC,EACFZ,qBAAQ,CAACM,MAAM,CAACH,OAAO,EAAE;MACvBI,OAAO,EAAE,CAAC;MACVC,QAAQ,EAAE,GAAG;MACbC,MAAM,EAAEC,mBAAM,CAACG,GAAG,CAACH,mBAAM,CAACI,KAAK,CAAC;MAChCF,eAAe,EAAE;IACnB,CAAC,CAAC,CACH,CAAC,CAACG,KAAK,CAAC,CAAC;EACZ,CAAC,EAA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