@forthtilliath/react-native-kit 0.12.0 → 0.14.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/LICENSE +21 -21
- package/README.md +603 -604
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +0 -1
- package/dist/components/list/ColorDot.d.ts +57 -0
- package/dist/components/list/ColorDot.d.ts.map +1 -0
- package/dist/components/list/ColorDot.js +48 -0
- package/dist/components/list/UndoToast.d.ts +100 -0
- package/dist/components/list/UndoToast.d.ts.map +1 -0
- package/dist/components/list/UndoToast.js +104 -0
- package/dist/components/list/index.d.ts +2 -0
- package/dist/components/list/index.d.ts.map +1 -1
- package/dist/components/list/index.js +2 -0
- package/dist/components/picker/PickerModal.d.ts +2 -29
- package/dist/components/picker/PickerModal.d.ts.map +1 -1
- package/dist/components/picker/PickerModal.js +10 -112
- package/dist/components/picker/PickerModal.styles.d.ts +32 -0
- package/dist/components/picker/PickerModal.styles.d.ts.map +1 -0
- package/dist/components/picker/PickerModal.styles.js +82 -0
- package/dist/components/picker/PickerModalRow.d.ts +17 -0
- package/dist/components/picker/PickerModalRow.d.ts.map +1 -0
- package/dist/components/picker/PickerModalRow.js +11 -0
- package/dist/components/picker/usePickerModalSections.d.ts +7 -0
- package/dist/components/picker/usePickerModalSections.d.ts.map +1 -0
- package/dist/components/picker/usePickerModalSections.js +28 -0
- package/dist/components/settings/UpdateSettingsScreen.d.ts +2 -46
- package/dist/components/settings/UpdateSettingsScreen.d.ts.map +1 -1
- package/dist/components/settings/UpdateSettingsScreen.js +4 -78
- package/dist/components/settings/UpdateSettingsScreen.styles.d.ts +49 -0
- package/dist/components/settings/UpdateSettingsScreen.styles.d.ts.map +1 -0
- package/dist/components/settings/UpdateSettingsScreen.styles.js +76 -0
- package/dist/components/settings/UpdateSettingsScreenHistory.d.ts +20 -0
- package/dist/components/settings/UpdateSettingsScreenHistory.d.ts.map +1 -0
- package/dist/components/settings/UpdateSettingsScreenHistory.js +10 -0
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +0 -1
- package/dist/index.d.ts +10 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -11
- package/dist/utils/helpers/index.d.ts +1 -6
- package/dist/utils/helpers/index.d.ts.map +1 -1
- package/dist/utils/helpers/index.js +1 -6
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -1
- package/package.json +4 -3
- package/dist/components/update/ChangelogNotes.d.ts +0 -22
- package/dist/components/update/ChangelogNotes.d.ts.map +0 -1
- package/dist/components/update/ChangelogNotes.js +0 -51
- package/dist/components/update/UpdateAvailableBanner.d.ts +0 -29
- package/dist/components/update/UpdateAvailableBanner.d.ts.map +0 -1
- package/dist/components/update/UpdateAvailableBanner.js +0 -63
- package/dist/components/update/index.d.ts +0 -3
- package/dist/components/update/index.d.ts.map +0 -1
- package/dist/components/update/index.js +0 -2
- package/dist/hooks/useUpdateCheck.d.ts +0 -35
- package/dist/hooks/useUpdateCheck.d.ts.map +0 -1
- package/dist/hooks/useUpdateCheck.js +0 -47
- package/dist/utils/format/escapeCsvField.d.ts +0 -2
- package/dist/utils/format/escapeCsvField.d.ts.map +0 -1
- package/dist/utils/format/escapeCsvField.js +0 -8
- package/dist/utils/format/escapeHtml.d.ts +0 -2
- package/dist/utils/format/escapeHtml.d.ts.map +0 -1
- package/dist/utils/format/escapeHtml.js +0 -9
- package/dist/utils/format/formatCsvNumber.d.ts +0 -2
- package/dist/utils/format/formatCsvNumber.d.ts.map +0 -1
- package/dist/utils/format/formatCsvNumber.js +0 -6
- package/dist/utils/format/index.d.ts +0 -4
- package/dist/utils/format/index.d.ts.map +0 -1
- package/dist/utils/format/index.js +0 -3
- package/dist/utils/helpers/getMostRecentIds.d.ts +0 -6
- package/dist/utils/helpers/getMostRecentIds.d.ts.map +0 -1
- package/dist/utils/helpers/getMostRecentIds.js +0 -19
- package/dist/utils/helpers/getPeriodStartMs.d.ts +0 -3
- package/dist/utils/helpers/getPeriodStartMs.d.ts.map +0 -1
- package/dist/utils/helpers/getPeriodStartMs.js +0 -14
- package/dist/utils/helpers/nextInCycle.d.ts +0 -2
- package/dist/utils/helpers/nextInCycle.d.ts.map +0 -1
- package/dist/utils/helpers/nextInCycle.js +0 -9
- package/dist/utils/helpers/normalizeForSearch.d.ts +0 -2
- package/dist/utils/helpers/normalizeForSearch.d.ts.map +0 -1
- package/dist/utils/helpers/normalizeForSearch.js +0 -15
- package/dist/utils/helpers/rankByNameMatch.d.ts +0 -2
- package/dist/utils/helpers/rankByNameMatch.d.ts.map +0 -1
- package/dist/utils/helpers/rankByNameMatch.js +0 -33
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ImageStyle, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
|
+
import type { PickerItem } from "./PickerModal.js";
|
|
3
|
+
export interface PickerModalRowStyles {
|
|
4
|
+
row: StyleProp<ViewStyle>;
|
|
5
|
+
rowThumbnail: StyleProp<ImageStyle>;
|
|
6
|
+
rowThumbnailPlaceholder: StyleProp<ViewStyle>;
|
|
7
|
+
rowThumbnailPlaceholderIconColor: string;
|
|
8
|
+
rowLabel: StyleProp<TextStyle>;
|
|
9
|
+
rowSubtitle: StyleProp<TextStyle>;
|
|
10
|
+
}
|
|
11
|
+
export interface PickerModalRowProps {
|
|
12
|
+
item: PickerItem;
|
|
13
|
+
styles: PickerModalRowStyles;
|
|
14
|
+
onSelect: (item: PickerItem) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function PickerModalRow({ item, styles, onSelect, }: PickerModalRowProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=PickerModalRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PickerModalRow.d.ts","sourceRoot":"","sources":["../../../src/components/picker/PickerModalRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIhF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1B,YAAY,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACpC,uBAAuB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9C,gCAAgC,EAAE,MAAM,CAAC;IACzC,QAAQ,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/B,WAAW,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC;AAKD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,MAAM,EACN,QAAQ,GACT,EAAE,mBAAmB,+BAmCrB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Image, Pressable, Text, View } from "react-native";
|
|
3
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
4
|
+
// One result row: thumbnail (photo, placeholder icon, or nothing depending
|
|
5
|
+
// on `imageUri`), label, and optional subtitle. Extracted from PickerModal's
|
|
6
|
+
// `renderItem` to keep that file under the project's 300-line-per-file rule.
|
|
7
|
+
export function PickerModalRow({ item, styles, onSelect, }) {
|
|
8
|
+
return (_jsxs(Pressable, { style: styles.row, onPress: () => {
|
|
9
|
+
onSelect(item);
|
|
10
|
+
}, accessibilityRole: "button", accessibilityLabel: item.subtitle ? `${item.label}, ${item.subtitle}` : item.label, children: [item.imageUri ? (_jsx(Image, { source: { uri: item.imageUri }, style: styles.rowThumbnail, accessibilityIgnoresInvertColors: true })) : item.imageUri === null ? (_jsx(View, { style: styles.rowThumbnailPlaceholder, children: _jsx(Ionicons, { name: "cube-outline", size: 18, color: styles.rowThumbnailPlaceholderIconColor }) })) : null, _jsxs(View, { style: { flex: 1 }, children: [_jsx(Text, { style: styles.rowLabel, children: item.label }), item.subtitle ? (_jsx(Text, { style: styles.rowSubtitle, children: item.subtitle })) : null] })] }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PickerItem } from "./PickerModal.js";
|
|
2
|
+
export interface PickerModalSection {
|
|
3
|
+
title: string | null;
|
|
4
|
+
data: PickerItem[];
|
|
5
|
+
}
|
|
6
|
+
export declare function usePickerModalSections(filtered: PickerItem[], isSearching: boolean, groupOrder: string[] | undefined, otherGroupLabel: string): PickerModalSection[];
|
|
7
|
+
//# sourceMappingURL=usePickerModalSections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePickerModalSections.d.ts","sourceRoot":"","sources":["../../../src/components/picker/usePickerModalSections.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,UAAU,EAAE,CAAC;CACpB;AAMD,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,UAAU,EAAE,EACtB,WAAW,EAAE,OAAO,EACpB,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAChC,eAAe,EAAE,MAAM,GACtB,kBAAkB,EAAE,CAoBtB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
// Sections sorted by title: stable order, independent of the source groups'
|
|
3
|
+
// order. No sections during a search (results ranked by relevance, not by
|
|
4
|
+
// group), nor if no item has a group (uncategorized pickers, unchanged
|
|
5
|
+
// behavior).
|
|
6
|
+
export function usePickerModalSections(filtered, isSearching, groupOrder, otherGroupLabel) {
|
|
7
|
+
return useMemo(() => {
|
|
8
|
+
if (isSearching || !filtered.some((item) => item.group)) {
|
|
9
|
+
return [{ title: null, data: filtered }];
|
|
10
|
+
}
|
|
11
|
+
const byGroup = new Map();
|
|
12
|
+
for (const item of filtered) {
|
|
13
|
+
const key = item.group ?? otherGroupLabel;
|
|
14
|
+
const group = byGroup.get(key);
|
|
15
|
+
if (group)
|
|
16
|
+
group.push(item);
|
|
17
|
+
else
|
|
18
|
+
byGroup.set(key, [item]);
|
|
19
|
+
}
|
|
20
|
+
function sortIndex(groupTitle) {
|
|
21
|
+
const index = groupOrder?.indexOf(groupTitle) ?? -1;
|
|
22
|
+
return index === -1 ? (groupOrder?.length ?? 0) : index;
|
|
23
|
+
}
|
|
24
|
+
return [...byGroup.entries()]
|
|
25
|
+
.sort(([a], [b]) => sortIndex(a) - sortIndex(b) || a.localeCompare(b))
|
|
26
|
+
.map(([sectionTitle, data]) => ({ title: sectionTitle, data }));
|
|
27
|
+
}, [filtered, isSearching, groupOrder, otherGroupLabel]);
|
|
28
|
+
}
|
|
@@ -1,49 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export interface UpdateSettingsScreenRelease {
|
|
4
|
-
version: string;
|
|
5
|
-
notes: string;
|
|
6
|
-
apkUrl: string;
|
|
7
|
-
}
|
|
8
|
-
export interface UpdateSettingsScreenHistoryEntry {
|
|
9
|
-
version: string;
|
|
10
|
-
notes: string;
|
|
11
|
-
publishedAt?: string | null;
|
|
12
|
-
}
|
|
13
|
-
export interface UpdateSettingsScreenLabels {
|
|
14
|
-
installedVersionLabel?: string;
|
|
15
|
-
checkButton?: string;
|
|
16
|
-
upToDate?: string;
|
|
17
|
-
checkError?: string;
|
|
18
|
-
downloadError?: string;
|
|
19
|
-
availableTitle?: (version: string) => string;
|
|
20
|
-
installButton?: (version: string) => string;
|
|
21
|
-
installButtonAccessibilityLabel?: (version: string) => string;
|
|
22
|
-
downloadingLabel?: (percent: number) => string;
|
|
23
|
-
downloadingHint?: string;
|
|
24
|
-
historyTitle?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface UpdateSettingsScreenStyles {
|
|
27
|
-
container?: StyleProp<ViewStyle>;
|
|
28
|
-
infoBox?: StyleProp<ViewStyle>;
|
|
29
|
-
infoLabel?: StyleProp<TextStyle>;
|
|
30
|
-
infoValue?: StyleProp<TextStyle>;
|
|
31
|
-
helpText?: StyleProp<TextStyle>;
|
|
32
|
-
errorText?: StyleProp<TextStyle>;
|
|
33
|
-
button?: StyleProp<ViewStyle>;
|
|
34
|
-
buttonDisabled?: StyleProp<ViewStyle>;
|
|
35
|
-
buttonText?: StyleProp<TextStyle>;
|
|
36
|
-
activityIndicatorColor?: string;
|
|
37
|
-
updateAvailableBox?: StyleProp<ViewStyle>;
|
|
38
|
-
updateAvailableTitle?: StyleProp<TextStyle>;
|
|
39
|
-
changelog?: StyleProp<ViewStyle>;
|
|
40
|
-
changelogTitle?: StyleProp<TextStyle>;
|
|
41
|
-
changelogEntry?: StyleProp<ViewStyle>;
|
|
42
|
-
changelogEntryHeader?: StyleProp<ViewStyle>;
|
|
43
|
-
changelogVersion?: StyleProp<TextStyle>;
|
|
44
|
-
changelogDate?: StyleProp<TextStyle>;
|
|
45
|
-
notes?: ChangelogNotesStyles;
|
|
46
|
-
}
|
|
1
|
+
import type { UpdateSettingsScreenHistoryEntry, UpdateSettingsScreenLabels, UpdateSettingsScreenRelease, UpdateSettingsScreenStyles } from "./UpdateSettingsScreen.styles.js";
|
|
2
|
+
export type { UpdateSettingsScreenHistoryEntry, UpdateSettingsScreenLabels, UpdateSettingsScreenRelease, UpdateSettingsScreenStyles, } from "./UpdateSettingsScreen.styles.js";
|
|
47
3
|
export interface UpdateSettingsScreenProps {
|
|
48
4
|
currentVersion: string;
|
|
49
5
|
/** Fetches the latest available release, or `null` if there is none. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSettingsScreen.d.ts","sourceRoot":"","sources":["../../../src/components/settings/UpdateSettingsScreen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpdateSettingsScreen.d.ts","sourceRoot":"","sources":["../../../src/components/settings/UpdateSettingsScreen.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,gCAAgC,EAChC,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,kCAAkC,CAAC;AAI1C,YAAY,EACV,gCAAgC,EAChC,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,kCAAkC,CAAC;AAU1C,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,cAAc,EAAE,MAAM,OAAO,CAAC,2BAA2B,GAAG,IAAI,CAAC,CAAC;IAClE,mEAAmE;IACnE,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,qBAAqB,EAAE,CACrB,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,KACpC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,yDAAyD;IACzD,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,gCAAgC,EAAE,CAAC,CAAC;IACxE,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,MAAM,CAAC,EAAE,0BAA0B,CAAC;CACrC;AAQD,wBAAgB,oBAAoB,CAAC,EACnC,cAAc,EACd,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,UAAoB,EACpB,MAAM,EACN,MAAM,GACP,EAAE,yBAAyB,+BAkL3B"}
|
|
@@ -1,83 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { ActivityIndicator, Pressable, Text, View } from "react-native";
|
|
4
|
-
import { ChangelogNotes } from "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
checkButton: "Rechercher une mise à jour",
|
|
8
|
-
upToDate: "Tu as déjà la dernière version.",
|
|
9
|
-
checkError: "Impossible de vérifier les mises à jour.",
|
|
10
|
-
downloadError: "Le téléchargement a échoué.",
|
|
11
|
-
availableTitle: (version) => `Version ${version} disponible`,
|
|
12
|
-
installButton: () => "Télécharger et installer",
|
|
13
|
-
installButtonAccessibilityLabel: (version) => `Télécharger et installer la version ${version}`,
|
|
14
|
-
downloadingLabel: (percent) => `Téléchargement… ${String(percent)}%`,
|
|
15
|
-
downloadingHint: "Ton téléphone va ensuite te demander confirmation pour installer la mise à jour.",
|
|
16
|
-
historyTitle: "Historique des versions",
|
|
17
|
-
};
|
|
18
|
-
const defaultStyles = {
|
|
19
|
-
container: { gap: 4 },
|
|
20
|
-
infoBox: {
|
|
21
|
-
backgroundColor: "#ffffff",
|
|
22
|
-
borderWidth: 1,
|
|
23
|
-
borderColor: "#e5e7eb",
|
|
24
|
-
borderRadius: 10,
|
|
25
|
-
padding: 14,
|
|
26
|
-
marginBottom: 8,
|
|
27
|
-
},
|
|
28
|
-
infoLabel: { fontSize: 13, fontWeight: "600", color: "#6b7280" },
|
|
29
|
-
infoValue: {
|
|
30
|
-
fontSize: 18,
|
|
31
|
-
fontWeight: "700",
|
|
32
|
-
color: "#111827",
|
|
33
|
-
marginTop: 2,
|
|
34
|
-
},
|
|
35
|
-
helpText: { fontSize: 12, color: "#6b7280", marginTop: 8 },
|
|
36
|
-
errorText: { fontSize: 12, color: "#dc2626", marginTop: 8 },
|
|
37
|
-
button: {
|
|
38
|
-
backgroundColor: "#2563eb",
|
|
39
|
-
borderRadius: 10,
|
|
40
|
-
paddingVertical: 14,
|
|
41
|
-
alignItems: "center",
|
|
42
|
-
marginTop: 8,
|
|
43
|
-
},
|
|
44
|
-
buttonDisabled: { opacity: 0.6 },
|
|
45
|
-
buttonText: { color: "#ffffff", fontSize: 16, fontWeight: "700" },
|
|
46
|
-
activityIndicatorColor: "#ffffff",
|
|
47
|
-
updateAvailableBox: {
|
|
48
|
-
backgroundColor: "#ffffff",
|
|
49
|
-
borderWidth: 1,
|
|
50
|
-
borderColor: "#e5e7eb",
|
|
51
|
-
borderRadius: 10,
|
|
52
|
-
padding: 14,
|
|
53
|
-
marginTop: 12,
|
|
54
|
-
gap: 4,
|
|
55
|
-
},
|
|
56
|
-
updateAvailableTitle: { fontSize: 15, fontWeight: "700", color: "#111827" },
|
|
57
|
-
changelog: { marginTop: 28 },
|
|
58
|
-
changelogTitle: {
|
|
59
|
-
fontSize: 15,
|
|
60
|
-
fontWeight: "700",
|
|
61
|
-
color: "#111827",
|
|
62
|
-
marginBottom: 8,
|
|
63
|
-
},
|
|
64
|
-
changelogEntry: {
|
|
65
|
-
backgroundColor: "#ffffff",
|
|
66
|
-
borderWidth: 1,
|
|
67
|
-
borderColor: "#e5e7eb",
|
|
68
|
-
borderRadius: 10,
|
|
69
|
-
padding: 14,
|
|
70
|
-
marginBottom: 8,
|
|
71
|
-
},
|
|
72
|
-
changelogEntryHeader: {
|
|
73
|
-
flexDirection: "row",
|
|
74
|
-
justifyContent: "space-between",
|
|
75
|
-
alignItems: "center",
|
|
76
|
-
},
|
|
77
|
-
changelogVersion: { fontSize: 14, fontWeight: "700", color: "#111827" },
|
|
78
|
-
changelogDate: { fontSize: 12, color: "#6b7280" },
|
|
79
|
-
notes: undefined,
|
|
80
|
-
};
|
|
4
|
+
import { ChangelogNotes } from "@forthtilliath/expo-release-updates-ui";
|
|
5
|
+
import { defaultLabels, defaultStyles } from "./UpdateSettingsScreen.styles.js";
|
|
6
|
+
import { UpdateSettingsScreenHistory } from "./UpdateSettingsScreenHistory.js";
|
|
81
7
|
// Full "check for update" screen: installed version, a manual check button,
|
|
82
8
|
// the available-update box (with changelog + install button) or an
|
|
83
9
|
// up-to-date/error message, download progress, and — if
|
|
@@ -174,5 +100,5 @@ export function UpdateSettingsScreen({ currentVersion, checkForUpdate, compareVe
|
|
|
174
100
|
void handleCheckForUpdate();
|
|
175
101
|
}, disabled: isBusy, accessibilityRole: "button", accessibilityLabel: t.checkButton, children: updateState.status === "checking" ? (_jsx(ActivityIndicator, { color: activityIndicatorColor })) : (_jsx(Text, { style: merged.buttonText, children: t.checkButton })) })), updateState.status === "up-to-date" && (_jsx(Text, { style: merged.helpText, children: t.upToDate })), updateState.status === "error" && (_jsx(Text, { style: merged.errorText, children: updateState.message })), updateState.status === "available" && (_jsxs(View, { style: merged.updateAvailableBox, children: [_jsx(Text, { style: merged.updateAvailableTitle, children: t.availableTitle(updateState.release.version) }), updateState.release.notes ? (_jsx(ChangelogNotes, { notes: updateState.release.notes, styles: merged.notes })) : null, _jsx(Pressable, { style: merged.button, onPress: () => {
|
|
176
102
|
void handleInstall(updateState.release.apkUrl);
|
|
177
|
-
}, accessibilityRole: "button", accessibilityLabel: t.installButtonAccessibilityLabel(updateState.release.version), children: _jsx(Text, { style: merged.buttonText, children: t.installButton(updateState.release.version) }) })] })), updateState.status === "downloading" && (_jsxs(View, { style: merged.updateAvailableBox, children: [_jsx(Text, { style: merged.helpText, children: t.downloadingLabel(Math.round(updateState.progress * 100)) }), _jsx(Text, { style: merged.helpText, children: t.downloadingHint })] })), releaseHistory && releaseHistory.length > 0 && (
|
|
103
|
+
}, accessibilityRole: "button", accessibilityLabel: t.installButtonAccessibilityLabel(updateState.release.version), children: _jsx(Text, { style: merged.buttonText, children: t.installButton(updateState.release.version) }) })] })), updateState.status === "downloading" && (_jsxs(View, { style: merged.updateAvailableBox, children: [_jsx(Text, { style: merged.helpText, children: t.downloadingLabel(Math.round(updateState.progress * 100)) }), _jsx(Text, { style: merged.helpText, children: t.downloadingHint })] })), releaseHistory && releaseHistory.length > 0 && (_jsx(UpdateSettingsScreenHistory, { releaseHistory: releaseHistory, historyTitle: t.historyTitle, dateLocale: dateLocale, notesStyles: notesStyles, styles: merged }))] }));
|
|
178
104
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
|
+
import type { ChangelogNotesStyles } from "@forthtilliath/expo-release-updates-ui";
|
|
3
|
+
export interface UpdateSettingsScreenRelease {
|
|
4
|
+
version: string;
|
|
5
|
+
notes: string;
|
|
6
|
+
apkUrl: string;
|
|
7
|
+
}
|
|
8
|
+
export interface UpdateSettingsScreenHistoryEntry {
|
|
9
|
+
version: string;
|
|
10
|
+
notes: string;
|
|
11
|
+
publishedAt?: string | null;
|
|
12
|
+
}
|
|
13
|
+
export interface UpdateSettingsScreenLabels {
|
|
14
|
+
installedVersionLabel?: string;
|
|
15
|
+
checkButton?: string;
|
|
16
|
+
upToDate?: string;
|
|
17
|
+
checkError?: string;
|
|
18
|
+
downloadError?: string;
|
|
19
|
+
availableTitle?: (version: string) => string;
|
|
20
|
+
installButton?: (version: string) => string;
|
|
21
|
+
installButtonAccessibilityLabel?: (version: string) => string;
|
|
22
|
+
downloadingLabel?: (percent: number) => string;
|
|
23
|
+
downloadingHint?: string;
|
|
24
|
+
historyTitle?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface UpdateSettingsScreenStyles {
|
|
27
|
+
container?: StyleProp<ViewStyle>;
|
|
28
|
+
infoBox?: StyleProp<ViewStyle>;
|
|
29
|
+
infoLabel?: StyleProp<TextStyle>;
|
|
30
|
+
infoValue?: StyleProp<TextStyle>;
|
|
31
|
+
helpText?: StyleProp<TextStyle>;
|
|
32
|
+
errorText?: StyleProp<TextStyle>;
|
|
33
|
+
button?: StyleProp<ViewStyle>;
|
|
34
|
+
buttonDisabled?: StyleProp<ViewStyle>;
|
|
35
|
+
buttonText?: StyleProp<TextStyle>;
|
|
36
|
+
activityIndicatorColor?: string;
|
|
37
|
+
updateAvailableBox?: StyleProp<ViewStyle>;
|
|
38
|
+
updateAvailableTitle?: StyleProp<TextStyle>;
|
|
39
|
+
changelog?: StyleProp<ViewStyle>;
|
|
40
|
+
changelogTitle?: StyleProp<TextStyle>;
|
|
41
|
+
changelogEntry?: StyleProp<ViewStyle>;
|
|
42
|
+
changelogEntryHeader?: StyleProp<ViewStyle>;
|
|
43
|
+
changelogVersion?: StyleProp<TextStyle>;
|
|
44
|
+
changelogDate?: StyleProp<TextStyle>;
|
|
45
|
+
notes?: ChangelogNotesStyles;
|
|
46
|
+
}
|
|
47
|
+
export declare const defaultLabels: Required<UpdateSettingsScreenLabels>;
|
|
48
|
+
export declare const defaultStyles: Required<Omit<UpdateSettingsScreenStyles, "activityIndicatorColor" | "notes">> & Pick<UpdateSettingsScreenStyles, "activityIndicatorColor" | "notes">;
|
|
49
|
+
//# sourceMappingURL=UpdateSettingsScreen.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateSettingsScreen.styles.d.ts","sourceRoot":"","sources":["../../../src/components/settings/UpdateSettingsScreen.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,0BAA0B;IACzC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,+BAA+B,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9D,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,0BAA0B;IACzC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,oBAAoB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,oBAAoB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5C,gBAAgB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,aAAa,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B;AAED,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,0BAA0B,CAc9D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAClC,IAAI,CAAC,0BAA0B,EAAE,wBAAwB,GAAG,OAAO,CAAC,CACrE,GACC,IAAI,CAAC,0BAA0B,EAAE,wBAAwB,GAAG,OAAO,CA8DpE,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export const defaultLabels = {
|
|
2
|
+
installedVersionLabel: "Version installée",
|
|
3
|
+
checkButton: "Rechercher une mise à jour",
|
|
4
|
+
upToDate: "Tu as déjà la dernière version.",
|
|
5
|
+
checkError: "Impossible de vérifier les mises à jour.",
|
|
6
|
+
downloadError: "Le téléchargement a échoué.",
|
|
7
|
+
availableTitle: (version) => `Version ${version} disponible`,
|
|
8
|
+
installButton: () => "Télécharger et installer",
|
|
9
|
+
installButtonAccessibilityLabel: (version) => `Télécharger et installer la version ${version}`,
|
|
10
|
+
downloadingLabel: (percent) => `Téléchargement… ${String(percent)}%`,
|
|
11
|
+
downloadingHint: "Ton téléphone va ensuite te demander confirmation pour installer la mise à jour.",
|
|
12
|
+
historyTitle: "Historique des versions",
|
|
13
|
+
};
|
|
14
|
+
export const defaultStyles = {
|
|
15
|
+
container: { gap: 4 },
|
|
16
|
+
infoBox: {
|
|
17
|
+
backgroundColor: "#ffffff",
|
|
18
|
+
borderWidth: 1,
|
|
19
|
+
borderColor: "#e5e7eb",
|
|
20
|
+
borderRadius: 10,
|
|
21
|
+
padding: 14,
|
|
22
|
+
marginBottom: 8,
|
|
23
|
+
},
|
|
24
|
+
infoLabel: { fontSize: 13, fontWeight: "600", color: "#6b7280" },
|
|
25
|
+
infoValue: {
|
|
26
|
+
fontSize: 18,
|
|
27
|
+
fontWeight: "700",
|
|
28
|
+
color: "#111827",
|
|
29
|
+
marginTop: 2,
|
|
30
|
+
},
|
|
31
|
+
helpText: { fontSize: 12, color: "#6b7280", marginTop: 8 },
|
|
32
|
+
errorText: { fontSize: 12, color: "#dc2626", marginTop: 8 },
|
|
33
|
+
button: {
|
|
34
|
+
backgroundColor: "#2563eb",
|
|
35
|
+
borderRadius: 10,
|
|
36
|
+
paddingVertical: 14,
|
|
37
|
+
alignItems: "center",
|
|
38
|
+
marginTop: 8,
|
|
39
|
+
},
|
|
40
|
+
buttonDisabled: { opacity: 0.6 },
|
|
41
|
+
buttonText: { color: "#ffffff", fontSize: 16, fontWeight: "700" },
|
|
42
|
+
activityIndicatorColor: "#ffffff",
|
|
43
|
+
updateAvailableBox: {
|
|
44
|
+
backgroundColor: "#ffffff",
|
|
45
|
+
borderWidth: 1,
|
|
46
|
+
borderColor: "#e5e7eb",
|
|
47
|
+
borderRadius: 10,
|
|
48
|
+
padding: 14,
|
|
49
|
+
marginTop: 12,
|
|
50
|
+
gap: 4,
|
|
51
|
+
},
|
|
52
|
+
updateAvailableTitle: { fontSize: 15, fontWeight: "700", color: "#111827" },
|
|
53
|
+
changelog: { marginTop: 28 },
|
|
54
|
+
changelogTitle: {
|
|
55
|
+
fontSize: 15,
|
|
56
|
+
fontWeight: "700",
|
|
57
|
+
color: "#111827",
|
|
58
|
+
marginBottom: 8,
|
|
59
|
+
},
|
|
60
|
+
changelogEntry: {
|
|
61
|
+
backgroundColor: "#ffffff",
|
|
62
|
+
borderWidth: 1,
|
|
63
|
+
borderColor: "#e5e7eb",
|
|
64
|
+
borderRadius: 10,
|
|
65
|
+
padding: 14,
|
|
66
|
+
marginBottom: 8,
|
|
67
|
+
},
|
|
68
|
+
changelogEntryHeader: {
|
|
69
|
+
flexDirection: "row",
|
|
70
|
+
justifyContent: "space-between",
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
},
|
|
73
|
+
changelogVersion: { fontSize: 14, fontWeight: "700", color: "#111827" },
|
|
74
|
+
changelogDate: { fontSize: 12, color: "#6b7280" },
|
|
75
|
+
notes: undefined,
|
|
76
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
|
+
import type { ChangelogNotesStyles } from "@forthtilliath/expo-release-updates-ui";
|
|
3
|
+
import type { UpdateSettingsScreenHistoryEntry } from "./UpdateSettingsScreen.styles.js";
|
|
4
|
+
export interface UpdateSettingsScreenHistoryStyles {
|
|
5
|
+
changelog: StyleProp<ViewStyle>;
|
|
6
|
+
changelogTitle: StyleProp<TextStyle>;
|
|
7
|
+
changelogEntry: StyleProp<ViewStyle>;
|
|
8
|
+
changelogEntryHeader: StyleProp<ViewStyle>;
|
|
9
|
+
changelogVersion: StyleProp<TextStyle>;
|
|
10
|
+
changelogDate: StyleProp<TextStyle>;
|
|
11
|
+
}
|
|
12
|
+
export interface UpdateSettingsScreenHistoryProps {
|
|
13
|
+
releaseHistory: UpdateSettingsScreenHistoryEntry[];
|
|
14
|
+
historyTitle: string;
|
|
15
|
+
dateLocale: string;
|
|
16
|
+
notesStyles: ChangelogNotesStyles;
|
|
17
|
+
styles: UpdateSettingsScreenHistoryStyles;
|
|
18
|
+
}
|
|
19
|
+
export declare function UpdateSettingsScreenHistory({ releaseHistory, historyTitle, dateLocale, notesStyles, styles, }: UpdateSettingsScreenHistoryProps): import("react").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=UpdateSettingsScreenHistory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateSettingsScreenHistory.d.ts","sourceRoot":"","sources":["../../../src/components/settings/UpdateSettingsScreenHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAGnF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAEzF,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,cAAc,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACrC,cAAc,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACrC,oBAAoB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC3C,gBAAgB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACvC,aAAa,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,gCAAgC;IAC/C,cAAc,EAAE,gCAAgC,EAAE,CAAC;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,oBAAoB,CAAC;IAClC,MAAM,EAAE,iCAAiC,CAAC;CAC3C;AAMD,wBAAgB,2BAA2B,CAAC,EAC1C,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,MAAM,GACP,EAAE,gCAAgC,+BAqBlC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text, View } from "react-native";
|
|
3
|
+
import { ChangelogNotes } from "@forthtilliath/expo-release-updates-ui";
|
|
4
|
+
// Past-releases list shown below the "check for update" box, one entry per
|
|
5
|
+
// release (version, publish date, changelog). Extracted from
|
|
6
|
+
// UpdateSettingsScreen to keep that file under the project's
|
|
7
|
+
// 300-line-per-file rule.
|
|
8
|
+
export function UpdateSettingsScreenHistory({ releaseHistory, historyTitle, dateLocale, notesStyles, styles, }) {
|
|
9
|
+
return (_jsxs(View, { style: styles.changelog, children: [_jsx(Text, { style: styles.changelogTitle, children: historyTitle }), releaseHistory.map((release) => (_jsxs(View, { style: styles.changelogEntry, children: [_jsxs(View, { style: styles.changelogEntryHeader, children: [_jsxs(Text, { style: styles.changelogVersion, children: ["v", release.version] }), release.publishedAt ? (_jsx(Text, { style: styles.changelogDate, children: new Date(release.publishedAt).toLocaleDateString(dateLocale) })) : null] }), release.notes ? (_jsx(ChangelogNotes, { notes: release.notes, styles: notesStyles })) : null] }, release.version)))] }));
|
|
10
|
+
}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export * from "./components/list/ColorDot.js";
|
|
1
2
|
export * from "./components/list/SwipeableRow.js";
|
|
2
3
|
export * from "./components/list/Thumbnail.js";
|
|
4
|
+
export * from "./components/list/UndoToast.js";
|
|
3
5
|
export * from "./components/picker/PhotoPicker.js";
|
|
4
6
|
export * from "./components/picker/PickerModal.js";
|
|
5
7
|
export * from "./components/picker/VoiceSearchButton.js";
|
|
@@ -12,19 +14,16 @@ export * from "./components/settings/ThemeSettingsScreen.js";
|
|
|
12
14
|
export * from "./components/settings/UpdateSettingsScreen.js";
|
|
13
15
|
export * from "./components/theme/ThemeOptionList.js";
|
|
14
16
|
export * from "./components/theme/ThemeToggle.js";
|
|
15
|
-
export * from "./components/update/ChangelogNotes.js";
|
|
16
|
-
export * from "./components/update/UpdateAvailableBanner.js";
|
|
17
17
|
export * from "./hooks/useDebouncedChange.js";
|
|
18
18
|
export * from "./hooks/useEffectiveColorScheme.js";
|
|
19
19
|
export * from "./hooks/useSubmitGuard.js";
|
|
20
|
-
export * from "./hooks/useUpdateCheck.js";
|
|
21
|
-
export * from "./utils/format/escapeCsvField.js";
|
|
22
|
-
export * from "./utils/format/escapeHtml.js";
|
|
23
|
-
export * from "./utils/format/formatCsvNumber.js";
|
|
24
20
|
export * from "./utils/helpers/confirmDestructive.js";
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
21
|
+
export { getMostRecentIds, type RecentIdRow, } from "@forthtilliath/ts-kit/array/getMostRecentIds";
|
|
22
|
+
export { nextInCycle } from "@forthtilliath/ts-kit/array/nextInCycle";
|
|
23
|
+
export { rankByNameMatch } from "@forthtilliath/ts-kit/array/rankByNameMatch";
|
|
24
|
+
export { getPeriodStartMs, type PeriodFilter, } from "@forthtilliath/ts-kit/date/getPeriodStartMs";
|
|
25
|
+
export { formatCsvNumber } from "@forthtilliath/ts-kit/number/formatCsvNumber";
|
|
26
|
+
export { escapeCsvField } from "@forthtilliath/ts-kit/string/escapeCsvField";
|
|
27
|
+
export { escapeHtml } from "@forthtilliath/ts-kit/string/escapeHtml";
|
|
28
|
+
export { normalizeForSearch } from "@forthtilliath/ts-kit/string/normalizeForSearch";
|
|
30
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uCAAuC,CAAC;AACtD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uCAAuC,CAAC;AACtD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AAGtD,OAAO,EACL,gBAAgB,EAChB,KAAK,WAAW,GACjB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,KAAK,YAAY,GAClB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
// etc.) remain the recommended default for apps that want to avoid pulling in
|
|
4
4
|
// peer deps they don't have installed (Metro doesn't reliably tree-shake) —
|
|
5
5
|
// see the README.
|
|
6
|
+
export * from "./components/list/ColorDot.js";
|
|
6
7
|
export * from "./components/list/SwipeableRow.js";
|
|
7
8
|
export * from "./components/list/Thumbnail.js";
|
|
9
|
+
export * from "./components/list/UndoToast.js";
|
|
8
10
|
export * from "./components/picker/PhotoPicker.js";
|
|
9
11
|
export * from "./components/picker/PickerModal.js";
|
|
10
12
|
export * from "./components/picker/VoiceSearchButton.js";
|
|
@@ -17,18 +19,17 @@ export * from "./components/settings/ThemeSettingsScreen.js";
|
|
|
17
19
|
export * from "./components/settings/UpdateSettingsScreen.js";
|
|
18
20
|
export * from "./components/theme/ThemeOptionList.js";
|
|
19
21
|
export * from "./components/theme/ThemeToggle.js";
|
|
20
|
-
export * from "./components/update/ChangelogNotes.js";
|
|
21
|
-
export * from "./components/update/UpdateAvailableBanner.js";
|
|
22
22
|
export * from "./hooks/useDebouncedChange.js";
|
|
23
23
|
export * from "./hooks/useEffectiveColorScheme.js";
|
|
24
24
|
export * from "./hooks/useSubmitGuard.js";
|
|
25
|
-
export * from "./hooks/useUpdateCheck.js";
|
|
26
|
-
export * from "./utils/format/escapeCsvField.js";
|
|
27
|
-
export * from "./utils/format/escapeHtml.js";
|
|
28
|
-
export * from "./utils/format/formatCsvNumber.js";
|
|
29
25
|
export * from "./utils/helpers/confirmDestructive.js";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
26
|
+
// Framework-agnostic — actually implemented (and tested/documented) in
|
|
27
|
+
// ts-kit, re-exported here so existing imports of these names keep working.
|
|
28
|
+
export { getMostRecentIds, } from "@forthtilliath/ts-kit/array/getMostRecentIds";
|
|
29
|
+
export { nextInCycle } from "@forthtilliath/ts-kit/array/nextInCycle";
|
|
30
|
+
export { rankByNameMatch } from "@forthtilliath/ts-kit/array/rankByNameMatch";
|
|
31
|
+
export { getPeriodStartMs, } from "@forthtilliath/ts-kit/date/getPeriodStartMs";
|
|
32
|
+
export { formatCsvNumber } from "@forthtilliath/ts-kit/number/formatCsvNumber";
|
|
33
|
+
export { escapeCsvField } from "@forthtilliath/ts-kit/string/escapeCsvField";
|
|
34
|
+
export { escapeHtml } from "@forthtilliath/ts-kit/string/escapeHtml";
|
|
35
|
+
export { normalizeForSearch } from "@forthtilliath/ts-kit/string/normalizeForSearch";
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export * from "./confirmDestructive";
|
|
2
|
-
export * from "./getMostRecentIds";
|
|
3
|
-
export * from "./getPeriodStartMs";
|
|
4
|
-
export * from "./nextInCycle";
|
|
5
|
-
export * from "./normalizeForSearch";
|
|
6
|
-
export * from "./rankByNameMatch";
|
|
1
|
+
export * from "./confirmDestructive.js";
|
|
7
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forthtilliath/react-native-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"./*": "./dist/*.js"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@forthtilliath/expo-release-updates": "0.
|
|
24
|
+
"@forthtilliath/expo-release-updates-ui": "0.2.0",
|
|
25
|
+
"@forthtilliath/ts-kit": "0.4.0"
|
|
25
26
|
},
|
|
26
27
|
"peerDependencies": {
|
|
27
28
|
"@expo/vector-icons": ">=15.0.0",
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
"react-test-renderer": "19.2.3",
|
|
45
46
|
"typescript": "^5.9.3",
|
|
46
47
|
"vitest": "^4.1.10",
|
|
47
|
-
"@forthtilliath/eslint-config": "0.
|
|
48
|
+
"@forthtilliath/eslint-config": "0.4.2",
|
|
48
49
|
"@forthtilliath/typescript-config": "0.0.0"
|
|
49
50
|
},
|
|
50
51
|
"scripts": {
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
|
-
export interface ChangelogNotesStyles {
|
|
3
|
-
heading?: StyleProp<TextStyle>;
|
|
4
|
-
itemRow?: StyleProp<ViewStyle>;
|
|
5
|
-
bullet?: StyleProp<TextStyle>;
|
|
6
|
-
itemText?: StyleProp<TextStyle>;
|
|
7
|
-
text?: StyleProp<TextStyle>;
|
|
8
|
-
bold?: StyleProp<TextStyle>;
|
|
9
|
-
}
|
|
10
|
-
export interface ChangelogNotesProps {
|
|
11
|
-
/** Raw release notes, e.g. straight from a GitHub release body. */
|
|
12
|
-
notes: string;
|
|
13
|
-
/** Override any of the default styles to match your app's theme. */
|
|
14
|
-
styles?: ChangelogNotesStyles;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Renders GitHub-style release notes (parsed by `parseChangelogNotes`) as
|
|
18
|
-
* headings, bulleted items and bold-aware text, instead of showing the raw
|
|
19
|
-
* Markdown syntax in a plain `<Text>`.
|
|
20
|
-
*/
|
|
21
|
-
export declare function ChangelogNotes({ notes, styles }: ChangelogNotesProps): import("react").JSX.Element;
|
|
22
|
-
//# sourceMappingURL=ChangelogNotes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChangelogNotes.d.ts","sourceRoot":"","sources":["../../../src/components/update/ChangelogNotes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpE,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AA0BD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,mBAAmB,+BA+CpE"}
|