@appsupportkit/support-sdk 0.2.0 → 0.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/lib/commonjs/api.js +17 -2
- package/lib/commonjs/api.js.map +1 -1
- package/lib/commonjs/components/SupportButton.js +123 -23
- package/lib/commonjs/components/SupportButton.js.map +1 -1
- package/lib/commonjs/components/icons.js +36 -0
- package/lib/commonjs/components/icons.js.map +1 -1
- package/lib/commonjs/components/primitives.js +9 -7
- package/lib/commonjs/components/primitives.js.map +1 -1
- package/lib/commonjs/components/screens/ComposeScreen.js +14 -23
- package/lib/commonjs/components/screens/ComposeScreen.js.map +1 -1
- package/lib/commonjs/components/screens/HomeScreen.js +70 -22
- package/lib/commonjs/components/screens/HomeScreen.js.map +1 -1
- package/lib/commonjs/components/screens/LanguageScreen.js +150 -0
- package/lib/commonjs/components/screens/LanguageScreen.js.map +1 -0
- package/lib/commonjs/components/screens/ThreadScreen.js +31 -19
- package/lib/commonjs/components/screens/ThreadScreen.js.map +1 -1
- package/lib/commonjs/i18n/index.js +101 -0
- package/lib/commonjs/i18n/index.js.map +1 -0
- package/lib/commonjs/i18n/languages.js +95 -0
- package/lib/commonjs/i18n/languages.js.map +1 -0
- package/lib/commonjs/i18n/strings/de.js +72 -0
- package/lib/commonjs/i18n/strings/de.js.map +1 -0
- package/lib/commonjs/i18n/strings/en.js +88 -0
- package/lib/commonjs/i18n/strings/en.js.map +1 -0
- package/lib/commonjs/i18n/strings/es.js +72 -0
- package/lib/commonjs/i18n/strings/es.js.map +1 -0
- package/lib/commonjs/i18n/strings/fr.js +72 -0
- package/lib/commonjs/i18n/strings/fr.js.map +1 -0
- package/lib/commonjs/i18n/strings/hi.js +72 -0
- package/lib/commonjs/i18n/strings/hi.js.map +1 -0
- package/lib/commonjs/i18n/strings/it.js +72 -0
- package/lib/commonjs/i18n/strings/it.js.map +1 -0
- package/lib/commonjs/i18n/strings/ja.js +72 -0
- package/lib/commonjs/i18n/strings/ja.js.map +1 -0
- package/lib/commonjs/i18n/strings/ko.js +72 -0
- package/lib/commonjs/i18n/strings/ko.js.map +1 -0
- package/lib/commonjs/i18n/strings/nl.js +72 -0
- package/lib/commonjs/i18n/strings/nl.js.map +1 -0
- package/lib/commonjs/i18n/strings/pl.js +72 -0
- package/lib/commonjs/i18n/strings/pl.js.map +1 -0
- package/lib/commonjs/i18n/strings/pt.js +72 -0
- package/lib/commonjs/i18n/strings/pt.js.map +1 -0
- package/lib/commonjs/i18n/strings/ru.js +72 -0
- package/lib/commonjs/i18n/strings/ru.js.map +1 -0
- package/lib/commonjs/i18n/strings/tr.js +72 -0
- package/lib/commonjs/i18n/strings/tr.js.map +1 -0
- package/lib/commonjs/i18n/strings/zh.js +72 -0
- package/lib/commonjs/i18n/strings/zh.js.map +1 -0
- package/lib/commonjs/index.js +31 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.js +11 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useSupportThreads.js +19 -9
- package/lib/commonjs/useSupportThreads.js.map +1 -1
- package/lib/commonjs/utils.js +32 -17
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/api.js +16 -2
- package/lib/module/api.js.map +1 -1
- package/lib/module/components/SupportButton.js +126 -26
- package/lib/module/components/SupportButton.js.map +1 -1
- package/lib/module/components/icons.js +35 -0
- package/lib/module/components/icons.js.map +1 -1
- package/lib/module/components/primitives.js +9 -7
- package/lib/module/components/primitives.js.map +1 -1
- package/lib/module/components/screens/ComposeScreen.js +15 -22
- package/lib/module/components/screens/ComposeScreen.js.map +1 -1
- package/lib/module/components/screens/HomeScreen.js +71 -23
- package/lib/module/components/screens/HomeScreen.js.map +1 -1
- package/lib/module/components/screens/LanguageScreen.js +147 -0
- package/lib/module/components/screens/LanguageScreen.js.map +1 -0
- package/lib/module/components/screens/ThreadScreen.js +31 -19
- package/lib/module/components/screens/ThreadScreen.js.map +1 -1
- package/lib/module/i18n/index.js +56 -0
- package/lib/module/i18n/index.js.map +1 -0
- package/lib/module/i18n/languages.js +88 -0
- package/lib/module/i18n/languages.js.map +1 -0
- package/lib/module/i18n/strings/de.js +68 -0
- package/lib/module/i18n/strings/de.js.map +1 -0
- package/lib/module/i18n/strings/en.js +84 -0
- package/lib/module/i18n/strings/en.js.map +1 -0
- package/lib/module/i18n/strings/es.js +68 -0
- package/lib/module/i18n/strings/es.js.map +1 -0
- package/lib/module/i18n/strings/fr.js +68 -0
- package/lib/module/i18n/strings/fr.js.map +1 -0
- package/lib/module/i18n/strings/hi.js +68 -0
- package/lib/module/i18n/strings/hi.js.map +1 -0
- package/lib/module/i18n/strings/it.js +68 -0
- package/lib/module/i18n/strings/it.js.map +1 -0
- package/lib/module/i18n/strings/ja.js +68 -0
- package/lib/module/i18n/strings/ja.js.map +1 -0
- package/lib/module/i18n/strings/ko.js +68 -0
- package/lib/module/i18n/strings/ko.js.map +1 -0
- package/lib/module/i18n/strings/nl.js +68 -0
- package/lib/module/i18n/strings/nl.js.map +1 -0
- package/lib/module/i18n/strings/pl.js +68 -0
- package/lib/module/i18n/strings/pl.js.map +1 -0
- package/lib/module/i18n/strings/pt.js +68 -0
- package/lib/module/i18n/strings/pt.js.map +1 -0
- package/lib/module/i18n/strings/ru.js +68 -0
- package/lib/module/i18n/strings/ru.js.map +1 -0
- package/lib/module/i18n/strings/tr.js +68 -0
- package/lib/module/i18n/strings/tr.js.map +1 -0
- package/lib/module/i18n/strings/zh.js +68 -0
- package/lib/module/i18n/strings/zh.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +11 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/useSupportThreads.js +19 -9
- package/lib/module/useSupportThreads.js.map +1 -1
- package/lib/module/utils.js +32 -17
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/api.d.ts +9 -0
- package/lib/typescript/api.d.ts.map +1 -1
- package/lib/typescript/components/SupportButton.d.ts.map +1 -1
- package/lib/typescript/components/icons.d.ts +5 -0
- package/lib/typescript/components/icons.d.ts.map +1 -1
- package/lib/typescript/components/primitives.d.ts +7 -3
- package/lib/typescript/components/primitives.d.ts.map +1 -1
- package/lib/typescript/components/screens/ComposeScreen.d.ts +3 -1
- package/lib/typescript/components/screens/ComposeScreen.d.ts.map +1 -1
- package/lib/typescript/components/screens/HomeScreen.d.ts +6 -1
- package/lib/typescript/components/screens/HomeScreen.d.ts.map +1 -1
- package/lib/typescript/components/screens/LanguageScreen.d.ts +30 -0
- package/lib/typescript/components/screens/LanguageScreen.d.ts.map +1 -0
- package/lib/typescript/components/screens/ThreadScreen.d.ts +3 -1
- package/lib/typescript/components/screens/ThreadScreen.d.ts.map +1 -1
- package/lib/typescript/i18n/index.d.ts +15 -0
- package/lib/typescript/i18n/index.d.ts.map +1 -0
- package/lib/typescript/i18n/languages.d.ts +36 -0
- package/lib/typescript/i18n/languages.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/de.d.ts +3 -0
- package/lib/typescript/i18n/strings/de.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/en.d.ts +83 -0
- package/lib/typescript/i18n/strings/en.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/es.d.ts +3 -0
- package/lib/typescript/i18n/strings/es.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/fr.d.ts +3 -0
- package/lib/typescript/i18n/strings/fr.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/hi.d.ts +3 -0
- package/lib/typescript/i18n/strings/hi.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/it.d.ts +3 -0
- package/lib/typescript/i18n/strings/it.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/ja.d.ts +3 -0
- package/lib/typescript/i18n/strings/ja.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/ko.d.ts +3 -0
- package/lib/typescript/i18n/strings/ko.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/nl.d.ts +3 -0
- package/lib/typescript/i18n/strings/nl.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/pl.d.ts +3 -0
- package/lib/typescript/i18n/strings/pl.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/pt.d.ts +3 -0
- package/lib/typescript/i18n/strings/pt.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/ru.d.ts +3 -0
- package/lib/typescript/i18n/strings/ru.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/tr.d.ts +3 -0
- package/lib/typescript/i18n/strings/tr.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/zh.d.ts +3 -0
- package/lib/typescript/i18n/strings/zh.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +32 -2
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/useSupportThreads.d.ts +11 -1
- package/lib/typescript/useSupportThreads.d.ts.map +1 -1
- package/lib/typescript/utils.d.ts +6 -5
- package/lib/typescript/utils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/api.ts +24 -1
- package/src/components/SupportButton.tsx +162 -33
- package/src/components/icons.tsx +36 -0
- package/src/components/primitives.tsx +14 -4
- package/src/components/screens/ComposeScreen.tsx +19 -23
- package/src/components/screens/HomeScreen.tsx +84 -25
- package/src/components/screens/LanguageScreen.tsx +172 -0
- package/src/components/screens/ThreadScreen.tsx +48 -21
- package/src/i18n/index.ts +81 -0
- package/src/i18n/languages.ts +106 -0
- package/src/i18n/strings/de.ts +78 -0
- package/src/i18n/strings/en.ts +94 -0
- package/src/i18n/strings/es.ts +77 -0
- package/src/i18n/strings/fr.ts +78 -0
- package/src/i18n/strings/hi.ts +77 -0
- package/src/i18n/strings/it.ts +77 -0
- package/src/i18n/strings/ja.ts +77 -0
- package/src/i18n/strings/ko.ts +76 -0
- package/src/i18n/strings/nl.ts +77 -0
- package/src/i18n/strings/pl.ts +77 -0
- package/src/i18n/strings/pt.ts +77 -0
- package/src/i18n/strings/ru.ts +77 -0
- package/src/i18n/strings/tr.ts +77 -0
- package/src/i18n/strings/zh.ts +75 -0
- package/src/index.tsx +8 -0
- package/src/types.ts +32 -2
- package/src/useSupportThreads.ts +30 -10
- package/src/utils.ts +22 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../src/components/primitives.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAML,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../src/components/primitives.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAML,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGvD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,SAAS,CAI7E;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,CAItE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,CAI3E;AAED,4EAA4E;AAC5E,wBAAgB,SAAS,CA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,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,+BAsCA;AAED,eAAO,MAAM,UAAU;mBACN,YAAY,KAAG,SAAS;qBAMtB,YAAY,KAAG,SAAS;kBAM3B,YAAY,KAAG,SAAS;uBAKnB,YAAY,KAAG,SAAS;kBAK7B,YAAY,KAAG,SAAS;CAKvC,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAK,EACL,OAAO,GACR,EAAE;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;CACrB,+BAqBA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { Translator } from '../../i18n';
|
|
1
2
|
import type { SupportTheme } from '../../theme';
|
|
2
3
|
import type { QueryType } from '../../types';
|
|
3
|
-
export declare function ComposeScreen({ theme, type, onBack, onSubmit, }: {
|
|
4
|
+
export declare function ComposeScreen({ theme, strings, type, onBack, onSubmit, }: {
|
|
4
5
|
theme: SupportTheme;
|
|
6
|
+
strings: Translator;
|
|
5
7
|
type: QueryType;
|
|
6
8
|
onBack: () => void;
|
|
7
9
|
/** Resolves null on success, or a user-facing error message. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposeScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/ComposeScreen.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ComposeScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/ComposeScreen.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAoD7C,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,IAAI,EACJ,MAAM,EACN,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gEAAgE;IAChE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACvD,+BAuJA"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import type { Translator } from '../../i18n';
|
|
2
|
+
import { type Language } from '../../i18n/languages';
|
|
1
3
|
import type { SupportTheme } from '../../theme';
|
|
2
4
|
import type { QueryType, Thread } from '../../types';
|
|
3
|
-
export declare function HomeScreen({ theme, threads, loading, refreshing, error, onRefresh, onCompose, onOpenThread, onClose, }: {
|
|
5
|
+
export declare function HomeScreen({ theme, strings, language, threads, loading, refreshing, error, onRefresh, onCompose, onOpenThread, onChangeLanguage, onClose, }: {
|
|
4
6
|
theme: SupportTheme;
|
|
7
|
+
strings: Translator;
|
|
8
|
+
language: Language;
|
|
5
9
|
threads: Thread[] | null;
|
|
6
10
|
loading: boolean;
|
|
7
11
|
refreshing: boolean;
|
|
@@ -9,6 +13,7 @@ export declare function HomeScreen({ theme, threads, loading, refreshing, error,
|
|
|
9
13
|
onRefresh: () => void;
|
|
10
14
|
onCompose: (type: QueryType) => void;
|
|
11
15
|
onOpenThread: (thread: Thread) => void;
|
|
16
|
+
onChangeLanguage: () => void;
|
|
12
17
|
onClose: () => void;
|
|
13
18
|
}): import("react").JSX.Element;
|
|
14
19
|
//# sourceMappingURL=HomeScreen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HomeScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/HomeScreen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"HomeScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/HomeScreen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAmJrD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,OAAO,EACP,OAAO,EACP,UAAU,EACV,KAAK,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,OAAO,GACR,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,+BAwKA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Translator } from '../../i18n';
|
|
2
|
+
import { type Language } from '../../i18n/languages';
|
|
3
|
+
import type { SupportTheme } from '../../theme';
|
|
4
|
+
/**
|
|
5
|
+
* The one-time language prompt, and the same screen again whenever the user
|
|
6
|
+
* changes their mind from the home header.
|
|
7
|
+
*
|
|
8
|
+
* Selecting a row re-renders the whole sheet in that language immediately —
|
|
9
|
+
* the confirmation button is the only way to see what you are choosing before
|
|
10
|
+
* you commit to it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function LanguageScreen({ theme, strings, selected, onSelect, onConfirm, onBack, onDismiss, saving, error, }: {
|
|
13
|
+
theme: SupportTheme;
|
|
14
|
+
strings: Translator;
|
|
15
|
+
selected: Language;
|
|
16
|
+
onSelect: (language: Language) => void;
|
|
17
|
+
onConfirm: () => void;
|
|
18
|
+
/** Absent on first run: there is nothing to go back to yet. */
|
|
19
|
+
onBack?: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* First run only — dismissing without choosing closes the sheet and leaves
|
|
22
|
+
* the preference unset, so the prompt appears again next time. Saving a
|
|
23
|
+
* language the user never actually picked would be worse: every message
|
|
24
|
+
* they write would be translated from the wrong one.
|
|
25
|
+
*/
|
|
26
|
+
onDismiss?: () => void;
|
|
27
|
+
saving: boolean;
|
|
28
|
+
error: string | null;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=LanguageScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LanguageScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/LanguageScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAShD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,MAAM,EACN,SAAS,EACT,MAAM,EACN,KAAK,GACN,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,+BAuHA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { Translator } from '../../i18n';
|
|
1
2
|
import type { SupportTheme } from '../../theme';
|
|
2
3
|
import type { Thread } from '../../types';
|
|
3
|
-
export declare function ThreadScreen({ theme, thread, onBack, onSend, }: {
|
|
4
|
+
export declare function ThreadScreen({ theme, strings, thread, onBack, onSend, }: {
|
|
4
5
|
theme: SupportTheme;
|
|
6
|
+
strings: Translator;
|
|
5
7
|
thread: Thread;
|
|
6
8
|
onBack: () => void;
|
|
7
9
|
/** Resolves null on success, or a user-facing error message. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/ThreadScreen.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ThreadScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/ThreadScreen.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AA6LzD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,GACP,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gEAAgE;IAChE,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACrD,+BAkNA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Language } from './languages';
|
|
2
|
+
import { type StringKey, type StringTable } from './strings/en';
|
|
3
|
+
export interface Translator {
|
|
4
|
+
language: Language;
|
|
5
|
+
/**
|
|
6
|
+
* BCP-47 tag for Intl — dates and times stay in the user's chosen language
|
|
7
|
+
* rather than the device's, so a sheet never mixes the two.
|
|
8
|
+
*/
|
|
9
|
+
locale: string;
|
|
10
|
+
t: (key: StringKey, vars?: Record<string, string | number>) => string;
|
|
11
|
+
}
|
|
12
|
+
export declare function createTranslator(language: Language): Translator;
|
|
13
|
+
export type { StringKey, StringTable };
|
|
14
|
+
export { asLanguage, baseLanguage, DEFAULT_LANGUAGE, deviceLanguage, isSupportedLanguage, LANGUAGE_LABELS, SUPPORTED_LANGUAGES, type Language, } from './languages';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAM,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AA2CpE,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;CACvE;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAO/D;AAED,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;AACvC,OAAO,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,KAAK,QAAQ,GACd,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The languages the picker offers.
|
|
3
|
+
*
|
|
4
|
+
* Kept in sync by hand with supabase/functions/_shared/languages.ts — the two
|
|
5
|
+
* run in different runtimes and share no build step. Adding one means adding a
|
|
6
|
+
* string table here too, which the compiler enforces.
|
|
7
|
+
*
|
|
8
|
+
* Right-to-left languages are deliberately absent for now: React Native only
|
|
9
|
+
* flips layout direction through I18nManager, which needs an app restart the
|
|
10
|
+
* SDK has no business triggering inside a host app.
|
|
11
|
+
*/
|
|
12
|
+
export declare const SUPPORTED_LANGUAGES: readonly ["en", "es", "fr", "de", "nl", "pt", "it", "pl", "tr", "ru", "ja", "ko", "zh", "hi"];
|
|
13
|
+
export type Language = (typeof SUPPORTED_LANGUAGES)[number];
|
|
14
|
+
/** The language the support team reads and writes. */
|
|
15
|
+
export declare const DEFAULT_LANGUAGE: Language;
|
|
16
|
+
/**
|
|
17
|
+
* Endonyms — a language is listed the way its own speakers write it, so the
|
|
18
|
+
* picker is readable to someone who can't read the current UI language.
|
|
19
|
+
*/
|
|
20
|
+
export declare const LANGUAGE_LABELS: Record<Language, string>;
|
|
21
|
+
/** Strips a region qualifier: "pt-BR" → "pt". */
|
|
22
|
+
export declare function baseLanguage(code: string): string;
|
|
23
|
+
export declare function isSupportedLanguage(code: string): code is Language;
|
|
24
|
+
/** Narrows any string to a supported language, or null. */
|
|
25
|
+
export declare function asLanguage(code: string | null | undefined): Language | null;
|
|
26
|
+
/**
|
|
27
|
+
* The device's language, if the SDK supports it.
|
|
28
|
+
*
|
|
29
|
+
* Used to pre-select a row in the picker and to render the picker itself, so
|
|
30
|
+
* the one screen shown before we know the user's choice is already in a
|
|
31
|
+
* language they probably read. Deliberately not used to *skip* the picker: a
|
|
32
|
+
* device set to French says nothing about which language its owner wants to
|
|
33
|
+
* write support messages in.
|
|
34
|
+
*/
|
|
35
|
+
export declare function deviceLanguage(): Language | null;
|
|
36
|
+
//# sourceMappingURL=languages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../../src/i18n/languages.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,+FAetB,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,EAAE,QAAe,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAepD,CAAC;AAEF,iDAAiD;AACjD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,QAAQ,CAElE;AAED,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,IAAI,CAI3E;AAuBD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,QAAQ,GAAG,IAAI,CAGhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/de.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA2EhB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* English is the source table: every other language is typed against it, so a
|
|
3
|
+
* missing or misspelled key fails the build rather than falling back silently
|
|
4
|
+
* at runtime.
|
|
5
|
+
*
|
|
6
|
+
* Placeholders are `{name}` tokens filled in by `format()` — the table stays
|
|
7
|
+
* pure data so it can be handed to a translator (or lifted to JSON) without
|
|
8
|
+
* touching code.
|
|
9
|
+
*
|
|
10
|
+
* Keys that read identically in English are still separate when their context
|
|
11
|
+
* differs: `home.open` labels a section of several threads, `status.open`
|
|
12
|
+
* labels one thread's state, and plenty of languages inflect those
|
|
13
|
+
* differently.
|
|
14
|
+
*/
|
|
15
|
+
export declare const en: {
|
|
16
|
+
readonly 'home.title': "Support";
|
|
17
|
+
readonly 'home.subtitle': "Start a conversation — we reply right here.";
|
|
18
|
+
readonly 'home.close': "Close support";
|
|
19
|
+
readonly 'home.open': "Open";
|
|
20
|
+
readonly 'home.resolved': "Resolved";
|
|
21
|
+
readonly 'home.empty': "No conversations yet";
|
|
22
|
+
readonly 'home.emptyHint': "Anything you send lands with the team, and their replies come back to this sheet.";
|
|
23
|
+
readonly 'home.noMessages': "No messages yet";
|
|
24
|
+
readonly 'home.you': "You";
|
|
25
|
+
readonly 'home.threadA11y': "{type} thread";
|
|
26
|
+
readonly 'home.threadUnreadA11y': "{type} thread, {count} unread";
|
|
27
|
+
readonly 'home.newA11y': "New {type}";
|
|
28
|
+
readonly 'home.language': "Language";
|
|
29
|
+
readonly 'type.feedback': "Feedback";
|
|
30
|
+
readonly 'type.feature_request': "Feature request";
|
|
31
|
+
readonly 'type.bug_report': "Bug report";
|
|
32
|
+
readonly 'hint.feedback': "Tell us what you think";
|
|
33
|
+
readonly 'hint.feature_request': "Suggest an improvement";
|
|
34
|
+
readonly 'hint.bug_report': "Something isn't working";
|
|
35
|
+
readonly 'prompt.feedback': "What should we know?";
|
|
36
|
+
readonly 'prompt.feature_request': "What would you like to see?";
|
|
37
|
+
readonly 'prompt.bug_report': "What happened, and what did you expect?";
|
|
38
|
+
readonly 'sub.feedback': "Good or bad — it goes straight to the team.";
|
|
39
|
+
readonly 'sub.feature_request': "Tell us what you are trying to do.";
|
|
40
|
+
readonly 'sub.bug_report': "Steps, screen, and what you expected all help.";
|
|
41
|
+
readonly 'compose.back': "Back to conversations";
|
|
42
|
+
readonly 'compose.sent': "Sent";
|
|
43
|
+
readonly 'compose.sentHint': "We'll reply right here. You'll find the conversation under Open, and the button shows a badge when we answer.";
|
|
44
|
+
readonly 'compose.done': "Done";
|
|
45
|
+
readonly 'compose.send': "Send";
|
|
46
|
+
readonly 'compose.sending': "Sending…";
|
|
47
|
+
readonly 'compose.minChars': "At least {count} characters";
|
|
48
|
+
readonly 'thread.support': "Support";
|
|
49
|
+
readonly 'thread.new': "New";
|
|
50
|
+
readonly 'thread.resolvedAt': "Resolved · {date}";
|
|
51
|
+
readonly 'thread.readOnly': "This conversation is resolved and read-only";
|
|
52
|
+
readonly 'thread.placeholder': "Write a reply…";
|
|
53
|
+
readonly 'thread.sendA11y': "Send reply";
|
|
54
|
+
readonly 'thread.sendingA11y': "Sending";
|
|
55
|
+
readonly 'thread.translating': "Translating…";
|
|
56
|
+
readonly 'status.open': "Open";
|
|
57
|
+
readonly 'status.resolved': "Resolved";
|
|
58
|
+
readonly 'error.tryAgain': "Try again";
|
|
59
|
+
readonly 'error.rateLimited': "Too many requests — try again later";
|
|
60
|
+
readonly 'error.offline': "You're offline — check your connection";
|
|
61
|
+
readonly 'error.sendFailed': "Couldn't send — try again";
|
|
62
|
+
readonly 'error.loadFailed': "Couldn't load your conversations";
|
|
63
|
+
readonly 'error.unavailable': "Support is unavailable right now";
|
|
64
|
+
readonly 'error.loadRateLimited': "Too many requests — try again in a bit";
|
|
65
|
+
readonly 'lang.title': "Choose your language";
|
|
66
|
+
readonly 'lang.subtitle': "Write in whichever language you prefer — we translate between you and the support team.";
|
|
67
|
+
readonly 'lang.continue': "Continue";
|
|
68
|
+
readonly 'lang.change': "Change language";
|
|
69
|
+
readonly 'lang.saveFailed': "Couldn't save — try again";
|
|
70
|
+
readonly 'time.justNow': "just now";
|
|
71
|
+
readonly 'time.minutes': "{count}m ago";
|
|
72
|
+
readonly 'time.hours': "{count}h ago";
|
|
73
|
+
readonly 'time.days': "{count}d ago";
|
|
74
|
+
readonly 'time.weeks': "{count}w ago";
|
|
75
|
+
readonly 'time.months': "{count}mo ago";
|
|
76
|
+
readonly 'time.years': "{count}y ago";
|
|
77
|
+
readonly 'time.today': "Today";
|
|
78
|
+
readonly 'time.yesterday': "Yesterday";
|
|
79
|
+
};
|
|
80
|
+
export type StringKey = keyof typeof en;
|
|
81
|
+
/** Every language provides every key — enforced at compile time. */
|
|
82
|
+
export type StringTable = Record<StringKey, string>;
|
|
83
|
+
//# sourceMappingURL=en.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/en.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EL,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAC;AAExC,oEAAoE;AACpE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/fr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA2EhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hi.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/hi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/it.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/ja.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ko.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/ko.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WAyEhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/nl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/pl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/pt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/ru.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/tr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WA0EhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../../src/i18n/strings/zh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,eAAO,MAAM,EAAE,EAAE,WAwEhB,CAAC"}
|
|
@@ -2,6 +2,7 @@ export { SupportButton } from './components/SupportButton';
|
|
|
2
2
|
export { supportDarkTheme, supportLightTheme, resolveTheme, type SupportTheme, } from './theme';
|
|
3
3
|
export { SupportApiError } from './api';
|
|
4
4
|
export { isPushAvailable } from './push';
|
|
5
|
+
export { DEFAULT_LANGUAGE, deviceLanguage, isSupportedLanguage, LANGUAGE_LABELS, SUPPORTED_LANGUAGES, type Language, } from './i18n/languages';
|
|
5
6
|
export type { LauncherVariant, MessageSender, PushPermissionStatus, QueryStatus, QueryType, SupportButtonProps, SupportUser, Thread, ThreadMessage, ThreadsResponse, ThemeName, } from './types';
|
|
6
7
|
export { QUERY_TYPE_LABEL, USER_MESSAGE_MAX, USER_MESSAGE_MIN, } from './types';
|
|
7
8
|
//# 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,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,KAAK,YAAY,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EACV,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,MAAM,EACN,aAAa,EACb,eAAe,EACf,SAAS,GACV,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,KAAK,YAAY,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,KAAK,QAAQ,GACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,MAAM,EACN,aAAa,EACb,eAAe,EACf,SAAS,GACV,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import type { Language } from './i18n/languages';
|
|
2
3
|
export type QueryType = 'feedback' | 'feature_request' | 'bug_report';
|
|
3
4
|
export type QueryStatus = 'open' | 'resolved';
|
|
4
5
|
export type MessageSender = 'user' | 'admin';
|
|
@@ -67,21 +68,43 @@ export interface SupportButtonProps {
|
|
|
67
68
|
* installed — it is an optional peer dependency.
|
|
68
69
|
*/
|
|
69
70
|
expoProjectId?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Pre-selects a language in the picker the first time a user opens support.
|
|
73
|
+
* Pass it when the host app already knows what the user reads — an in-app
|
|
74
|
+
* language setting beats the device locale, which is what the SDK falls
|
|
75
|
+
* back to. It is a default, not an override: the user still chooses, and a
|
|
76
|
+
* choice they have already made always wins.
|
|
77
|
+
*/
|
|
78
|
+
defaultLanguage?: Language;
|
|
70
79
|
}
|
|
71
80
|
export interface ThreadMessage {
|
|
72
81
|
id: string;
|
|
73
82
|
sender: MessageSender;
|
|
83
|
+
/**
|
|
84
|
+
* Already in the user's language: their own messages as they wrote them,
|
|
85
|
+
* support replies translated. The server does the choosing — see the
|
|
86
|
+
* get-threads function.
|
|
87
|
+
*/
|
|
74
88
|
body: string;
|
|
75
89
|
created_at: string;
|
|
76
|
-
|
|
90
|
+
/**
|
|
91
|
+
* A support reply whose translation hasn't landed yet. `body` currently
|
|
92
|
+
* holds the English original; it will change under the reader shortly, so
|
|
93
|
+
* the UI says so rather than letting it flicker.
|
|
94
|
+
*/
|
|
95
|
+
translation_pending: boolean;
|
|
77
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Note the absence of any admin identity: end users see one support team,
|
|
99
|
+
* not the people staffing it, so the names never leave the server. The
|
|
100
|
+
* dashboard still shows who wrote and who resolved what.
|
|
101
|
+
*/
|
|
78
102
|
export interface Thread {
|
|
79
103
|
id: string;
|
|
80
104
|
type: QueryType;
|
|
81
105
|
status: QueryStatus;
|
|
82
106
|
created_at: string;
|
|
83
107
|
resolved_at: string | null;
|
|
84
|
-
resolved_by_name: string | null;
|
|
85
108
|
app_version: string;
|
|
86
109
|
unread_count: number;
|
|
87
110
|
last_message: {
|
|
@@ -94,7 +117,14 @@ export interface Thread {
|
|
|
94
117
|
export interface ThreadsResponse {
|
|
95
118
|
threads: Thread[];
|
|
96
119
|
total_unread: number;
|
|
120
|
+
/** Null when this user has never picked one — the SDK then asks. */
|
|
121
|
+
language: string | null;
|
|
97
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* English labels, kept for host apps that render their own entry points.
|
|
125
|
+
* Inside the sheet the labels come from the string table instead, so they
|
|
126
|
+
* follow the user's language.
|
|
127
|
+
*/
|
|
98
128
|
export declare const QUERY_TYPE_LABEL: Record<QueryType, string>;
|
|
99
129
|
export declare const USER_MESSAGE_MIN = 10;
|
|
100
130
|
export declare const USER_MESSAGE_MAX = 300;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAA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AgB,KAAK,CAAC;AACnC,eAAO,MAAM,gBAAgB,MAAM,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ApiConfig } from './api';
|
|
2
|
+
import type { StringKey } from './i18n';
|
|
2
3
|
import type { Thread } from './types';
|
|
3
4
|
export declare const IDLE_POLL_MS = 60000;
|
|
4
5
|
export interface SupportThreadsState {
|
|
@@ -10,7 +11,16 @@ export interface SupportThreadsState {
|
|
|
10
11
|
/** User-pulled refresh with content already on screen. */
|
|
11
12
|
refreshing: boolean;
|
|
12
13
|
/** Set only when there is nothing cached; background failures stay quiet. */
|
|
13
|
-
|
|
14
|
+
errorKey: StringKey | null;
|
|
15
|
+
/** The language this user picked, or null if they never have. */
|
|
16
|
+
serverLanguage: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* False until the first successful load. `serverLanguage === null` only
|
|
19
|
+
* means "never picked" once this is true — before that it means "don't
|
|
20
|
+
* know yet", and showing the picker on a guess would nag a user who
|
|
21
|
+
* answered on another device.
|
|
22
|
+
*/
|
|
23
|
+
languageLoaded: boolean;
|
|
14
24
|
/** User-initiated refresh (pull-to-refresh, retry button). */
|
|
15
25
|
refresh: () => void;
|
|
16
26
|
/** Awaited by send/submit handlers so the list reflects the write. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSupportThreads.d.ts","sourceRoot":"","sources":["../../src/useSupportThreads.ts"],"names":[],"mappings":"AAgBA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAetC,eAAO,MAAM,YAAY,QAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"useSupportThreads.d.ts","sourceRoot":"","sources":["../../src/useSupportThreads.ts"],"names":[],"mappings":"AAgBA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAetC,eAAO,MAAM,YAAY,QAAS,CAAC;AA8CnC,MAAM,WAAW,mBAAmB;IAClC,iEAAiE;IACjE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,OAAO,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,UAAU,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B,iEAAiE;IACjE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,8DAA8D;IAC9D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,sEAAsE;IACtE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,YAAY,EACZ,OAAO,EACP,SAAS,EACT,cAAc,EACd,UAAU,GACX,EAAE;IACD,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,mBAAmB,CA0QtB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import type { Translator } from './i18n';
|
|
1
2
|
/** "2h ago" relative time — mirrors the web dashboard's formatting. */
|
|
2
|
-
export declare function relativeTime(iso: string): string;
|
|
3
|
-
export declare function formatDate(iso: string): string;
|
|
4
|
-
/** "14:32" in the
|
|
5
|
-
export declare function formatTime(iso: string): string;
|
|
3
|
+
export declare function relativeTime(iso: string, strings: Translator): string;
|
|
4
|
+
export declare function formatDate(iso: string, strings: Translator): string;
|
|
5
|
+
/** "14:32" in the user's locale — shown under a group of messages. */
|
|
6
|
+
export declare function formatTime(iso: string, strings: Translator): string;
|
|
6
7
|
export declare function isSameDay(a: string, b: string): boolean;
|
|
7
8
|
/** Date separator label: Today / Yesterday / "Mon, 5 Jan". */
|
|
8
|
-
export declare function dayLabel(iso: string): string;
|
|
9
|
+
export declare function dayLabel(iso: string, strings: Translator): string;
|
|
9
10
|
/** Dev-mode prop validation with actionable messages. */
|
|
10
11
|
export declare function validateProps(props: {
|
|
11
12
|
appName?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAKzC,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,CAerE;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,CAMnE;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,CAKnE;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAQvD;AAED,8DAA8D;AAC9D,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,MAAM,CAYjE;AAED,yDAAyD;AACzD,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GAAG,MAAM,GAAG,IAAI,CA8BhB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsupportkit/support-sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "In-app customer support for React Native: feedback, feature requests, and bug reports with two-way threads.",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "In-app customer support for React Native: feedback, feature requests, and bug reports with two-way threads, in the user's own language.",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/module/index.js",
|
|
7
7
|
"types": "./lib/typescript/index.d.ts",
|
package/src/api.ts
CHANGED
|
@@ -112,6 +112,20 @@ export function registerPush(
|
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
/** Records the language the user reads and writes support messages in. */
|
|
116
|
+
export function setLanguage(
|
|
117
|
+
config: ApiConfig,
|
|
118
|
+
input: { revenuecatId: string; language: string },
|
|
119
|
+
): Promise<{ language: string }> {
|
|
120
|
+
return request(config, 'set-language', {
|
|
121
|
+
method: 'POST',
|
|
122
|
+
body: JSON.stringify({
|
|
123
|
+
revenuecat_id: input.revenuecatId,
|
|
124
|
+
language: input.language,
|
|
125
|
+
}),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
115
129
|
export function submitQuery(
|
|
116
130
|
config: ApiConfig,
|
|
117
131
|
input: {
|
|
@@ -121,6 +135,7 @@ export function submitQuery(
|
|
|
121
135
|
isPaid: boolean;
|
|
122
136
|
revenuecatId: string;
|
|
123
137
|
appVersion: string;
|
|
138
|
+
language: string;
|
|
124
139
|
},
|
|
125
140
|
): Promise<{ query_id: string }> {
|
|
126
141
|
return request(config, 'submit-query', {
|
|
@@ -133,13 +148,20 @@ export function submitQuery(
|
|
|
133
148
|
is_paid: input.isPaid,
|
|
134
149
|
revenuecat_id: input.revenuecatId,
|
|
135
150
|
app_version: input.appVersion,
|
|
151
|
+
// Sent on every write so a lost set-language call self-heals.
|
|
152
|
+
language: input.language,
|
|
136
153
|
}),
|
|
137
154
|
});
|
|
138
155
|
}
|
|
139
156
|
|
|
140
157
|
export function postMessage(
|
|
141
158
|
config: ApiConfig,
|
|
142
|
-
input: {
|
|
159
|
+
input: {
|
|
160
|
+
queryId: string;
|
|
161
|
+
revenuecatId: string;
|
|
162
|
+
message: string;
|
|
163
|
+
language: string;
|
|
164
|
+
},
|
|
143
165
|
): Promise<{ message_id: string }> {
|
|
144
166
|
return request(config, 'post-message', {
|
|
145
167
|
method: 'POST',
|
|
@@ -147,6 +169,7 @@ export function postMessage(
|
|
|
147
169
|
query_id: input.queryId,
|
|
148
170
|
revenuecat_id: input.revenuecatId,
|
|
149
171
|
message: input.message,
|
|
172
|
+
language: input.language,
|
|
150
173
|
}),
|
|
151
174
|
});
|
|
152
175
|
}
|