diff --git a/.env b/.env
index b818b2e..2739b86 100644
--- a/.env
+++ b/.env
@@ -17,9 +17,9 @@
# old working .env file
# Production Dev
-# EXPO_PUBLIC_API_URL=https://api.acupedia.in/api
-# EXPO_PUBLIC_STOREFRONT_URL=https://acupedia.in/store
+EXPO_PUBLIC_API_URL=https://api.acupedia.in/api
+EXPO_PUBLIC_STOREFRONT_URL=https://acupedia.in/store
# Local Dev
-EXPO_PUBLIC_API_URL=http://localhost:8000/api
-EXPO_PUBLIC_STOREFRONT_URL=http://localhost:3000
+# EXPO_PUBLIC_API_URL=http://localhost:8000/api
+# EXPO_PUBLIC_STOREFRONT_URL=http://localhost:3000
diff --git a/app.json b/app.json
index 3045da1..e29779d 100644
--- a/app.json
+++ b/app.json
@@ -10,7 +10,12 @@
"ios": {
"bundleIdentifier": "com.anonymous.acupedia",
"supportsTablet": true,
- "icon": "./assets/expo.icon"
+ "icon": "./assets/expo.icon",
+ "infoPlist": {
+ "NSAppTransportSecurity": {
+ "NSAllowsArbitraryLoads": true
+ }
+ }
},
"android": {
"adaptiveIcon": {
diff --git a/src/app/modules/list.tsx b/src/app/modules/list.tsx
index e69de29..8fc75dc 100644
--- a/src/app/modules/list.tsx
+++ b/src/app/modules/list.tsx
@@ -0,0 +1,6 @@
+import React from "react";
+import { Redirect } from "expo-router";
+
+export default function ModulesListRoute() {
+ return ;
+}
diff --git a/src/app/subscription/index.tsx b/src/app/subscription/index.tsx
index 1e875ba..6416c77 100644
--- a/src/app/subscription/index.tsx
+++ b/src/app/subscription/index.tsx
@@ -180,7 +180,7 @@ export default function SubscriptionScreen() {
};
return (
-
+
router.back()} style={styles.backButton}>
@@ -272,7 +272,7 @@ export default function SubscriptionScreen() {
>
) : (
- router.replace("/modules/list")} />
+ router.replace("/modules")} />
)}
@@ -281,13 +281,15 @@ export default function SubscriptionScreen() {
}
const styles = StyleSheet.create({
- safeArea: { flex: 1, backgroundColor: Colors.background },
+ safeArea: { flex: 1, backgroundColor: "#FFFFFF" },
header: {
- height: 60,
+ minHeight: 64,
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
paddingHorizontal: moderateScale(16),
+ paddingTop: Platform.OS === "web" ? 14 : moderateScale(8),
+ paddingBottom: moderateScale(8),
borderBottomWidth: 1,
borderBottomColor: "#ECECEC",
backgroundColor: "#FFFFFF",
diff --git a/src/features/content/components/ContentScreenState.tsx b/src/features/content/components/ContentScreenState.tsx
index a9161a9..fb33621 100644
--- a/src/features/content/components/ContentScreenState.tsx
+++ b/src/features/content/components/ContentScreenState.tsx
@@ -2,10 +2,10 @@ import React from "react";
import {
ActivityIndicator,
Pressable,
- SafeAreaView,
Text,
View,
} from "react-native";
+import { SafeAreaView } from "react-native-safe-area-context";
export function ScreenLoading({ message = "Loading content…" }: { message?: string }) {
return (
diff --git a/src/features/content/components/layout/ContentPageHeader.tsx b/src/features/content/components/layout/ContentPageHeader.tsx
index 5ac1995..b6772b5 100644
--- a/src/features/content/components/layout/ContentPageHeader.tsx
+++ b/src/features/content/components/layout/ContentPageHeader.tsx
@@ -1,5 +1,5 @@
import React, { type ReactNode } from "react";
-import { Pressable, StyleSheet, Text, View } from "react-native";
+import { Platform, Pressable, StyleSheet, Text, View } from "react-native";
import { Ionicons } from "@expo/vector-icons";
import { router } from "expo-router";
import { moderateScale } from "react-native-size-matters";
@@ -92,11 +92,13 @@ export function ContentPageHeader({
const styles = StyleSheet.create({
header: {
- minHeight: 60,
+ minHeight: 64,
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
paddingHorizontal: moderateScale(16),
+ paddingTop: Platform.OS === "web" ? 14 : moderateScale(8),
+ paddingBottom: moderateScale(8),
borderBottomWidth: 1,
borderBottomColor: "#ECECEC",
backgroundColor: "#FFFFFF",
diff --git a/src/features/content/media/ContentMediaGallery.tsx b/src/features/content/media/ContentMediaGallery.tsx
index 8c5bb42..48d6b9b 100644
--- a/src/features/content/media/ContentMediaGallery.tsx
+++ b/src/features/content/media/ContentMediaGallery.tsx
@@ -3,7 +3,6 @@ import React, { memo, useEffect, useMemo, useRef, useState } from "react";
import {
ActivityIndicator,
FlatList,
- Image,
NativeScrollEvent,
NativeSyntheticEvent,
Pressable,
@@ -12,6 +11,7 @@ import {
useWindowDimensions,
View,
} from "react-native";
+import { Image } from "expo-image";
import { useAuthStore } from "@/store/auth.store";
import { Colors } from "@/theme/colors";
@@ -103,12 +103,13 @@ const GalleryImage = memo(function GalleryImage({
setLoading(false)}
- onError={() => {
+ onError={(error) => {
+ console.warn("Failed to load GalleryImage:", source, error);
setLoading(false);
setFailed(true);
}}
diff --git a/src/features/content/media/FullScreenMediaViewer.tsx b/src/features/content/media/FullScreenMediaViewer.tsx
index 78f5464..44ed5e9 100644
--- a/src/features/content/media/FullScreenMediaViewer.tsx
+++ b/src/features/content/media/FullScreenMediaViewer.tsx
@@ -76,7 +76,7 @@ export function FullScreenMediaViewer({
[styles.closeButton, pressed && styles.pressed]}
@@ -107,7 +107,7 @@ export function FullScreenMediaViewer({
item={item}
accessToken={accessToken}
width={width}
- height={Math.max(height - 170, 320)}
+ height={Math.max(height - 150, 320)}
active={index === activeIndex}
onZoomStateChange={index === activeIndex ? setZoomed : undefined}
/>
@@ -128,7 +128,8 @@ export function FullScreenMediaViewer({
const styles = StyleSheet.create({
root: { flex: 1, backgroundColor: Colors.black },
toolbar: {
- height: 58,
+ height: 56,
+ marginTop: 16,
paddingHorizontal: 16,
flexDirection: "row",
alignItems: "center",
@@ -144,7 +145,12 @@ const styles = StyleSheet.create({
backgroundColor: "rgba(255,255,255,0.12)",
},
pressed: { opacity: 0.65 },
- footer: { minHeight: 94, paddingHorizontal: 20, paddingTop: 12, paddingBottom: 18 },
- caption: { color: Colors.white, fontSize: 15, lineHeight: 21, textAlign: "center" },
- hint: { marginTop: 7, color: "#AFAFAF", fontSize: 12, textAlign: "center" },
+ footer: {
+ minHeight: 64,
+ paddingHorizontal: 20,
+ paddingTop: 6,
+ paddingBottom: 8,
+ },
+ caption: { color: Colors.white, fontSize: 15, lineHeight: 20, textAlign: "center" },
+ hint: { marginTop: 4, color: "#AFAFAF", fontSize: 12, textAlign: "center" },
});
diff --git a/src/features/content/media/ZoomableImage.tsx b/src/features/content/media/ZoomableImage.tsx
index 6a7b810..876b218 100644
--- a/src/features/content/media/ZoomableImage.tsx
+++ b/src/features/content/media/ZoomableImage.tsx
@@ -1,5 +1,6 @@
import React, { memo, useEffect, useMemo, useState } from "react";
-import { ActivityIndicator, Image, StyleSheet, Text, View } from "react-native";
+import { ActivityIndicator, StyleSheet, Text, View } from "react-native";
+import { Image } from "expo-image";
import { Gesture, GestureDetector } from "react-native-gesture-handler";
import Animated, {
runOnJS,
@@ -182,13 +183,14 @@ export const ZoomableImage = memo(function ZoomableImage({
setLoading(false)}
- onError={() => {
+ onError={(error) => {
+ console.warn("Failed to load ZoomableImage:", source, error);
setLoading(false);
setFailed(true);
}}
diff --git a/src/features/content/media/media-source.ts b/src/features/content/media/media-source.ts
index bec3ab1..d2e3a8b 100644
--- a/src/features/content/media/media-source.ts
+++ b/src/features/content/media/media-source.ts
@@ -1,4 +1,4 @@
-import type { ImageSourcePropType } from "react-native";
+import type { ImageSource } from "expo-image";
import type { ContentMediaItem } from "../types/media.types";
/**
@@ -44,7 +44,7 @@ export function buildMediaImageSourceFromValues(
storageKey: string | null | undefined,
requiresAuth: boolean | null | undefined,
accessToken: string | null,
-): ImageSourcePropType | null {
+): ImageSource | null {
const uri = resolveMediaUri(url, storageKey);
if (!uri) {
@@ -69,7 +69,7 @@ export function buildMediaImageSourceFromValues(
export function buildMediaImageSource(
item: ContentMediaItem,
accessToken: string | null,
-): ImageSourcePropType | null {
+): ImageSource | null {
return buildMediaImageSourceFromValues(
item.url,
item.storage_key,
diff --git a/src/features/content/renderers/collections/FourLevelsRenderers.tsx b/src/features/content/renderers/collections/FourLevelsRenderers.tsx
new file mode 100644
index 0000000..439b0ac
--- /dev/null
+++ b/src/features/content/renderers/collections/FourLevelsRenderers.tsx
@@ -0,0 +1,168 @@
+import React from "react";
+import { Pressable, StyleSheet, Text, View } from "react-native";
+import { Ionicons } from "@expo/vector-icons";
+import { moderateScale, verticalScale } from "react-native-size-matters";
+
+import { Colors } from "@/theme";
+import { asNumber, asString } from "../helpers/value";
+import { CollectionScaffold } from "../shared/CollectionScaffold";
+import { ContentCountBadge } from "../shared/ContentCountBadge";
+import type {
+ CollectionItemRendererProps,
+ CollectionRendererProps,
+} from "../../types/renderer.types";
+
+export function FourLevelsCollectionRenderer(props: CollectionRendererProps) {
+ const header = (
+
+
+
+
+ Overview
+
+
+ The Four Levels of Diagnosis in Traditional Chinese Medicine (TCM) is a framework mainly used in Warm Disease Theory (Wen Bing), which deals with febrile (heat) diseases caused by external pathogens, especially warm pathogens like viruses or bacteria. It helps practitioners understand the progression of the disease and guide treatment.
+
+
+ The interpretation of clinical manifestations of Warm Diseases according to the Four Levels was formulated by Ye Tian Shi. This is a brilliant theory that provides the most clinically useful tool to diagnose, interpret and treat diseases caused by external Wind-Heat and their consequences, whether they are Warm Diseases or not.
+
+
+ The theory of the Four Levels is clinically more relevant than that of the Six Stages. For example, one of the most common consequences of an invasion of Wind-Heat is the transformation of external Wind-Heat into interior Phlegm-Heat in the Lungs, causing a chest infection: this situation is contemplated in the Four Levels (corresponding to Lung-Heat, Qi level), while it is not contemplated in the Six Stages.
+
+
+ The Qi level contemplates the pattern of Damp-Heat in Stomach and Spleen as a consequence of an invasion of Wind-Heat: this is a very common clinical situation and yet it is one that is not contemplated in the Six Stages.
+
+
+ The Blood level includes patterns which are characterized by convulsions from the development of internal Wind: these are typical complications of children’s diseases such as meningitis but they are not contemplated in the Six Stages.
+
+
+ The Four Levels are the Defensive Qi, Qi, Nutritive Qi and Blood levels (Wei, Qi, Ying, Xue): the first level is the only exterior one characterized by the presence of the external Wind-Heat on the energetic surface of the body. The other three levels are all interior and all characterized by interior Heat; however, the brilliance of this theory lies in its identification of three different depths of penetration of interior pathogenic Heat. Each level has its own distinctive pathology and treatment.
+
+
+ Levels
+
+ );
+
+ return ;
+}
+
+export function FourLevelsCardRenderer({
+ item,
+ onPress,
+}: CollectionItemRendererProps) {
+ const attributes = item.attributes;
+ const title = asString(attributes.title) || asString(attributes.name) || item.title;
+ const label =
+ asString(attributes.content_label) ||
+ asString(attributes.description) ||
+ item.summary ||
+ "Open content";
+
+ const sortOrder = asNumber(attributes.sort_order);
+ const levelNumber = typeof sortOrder === "number" ? sortOrder + 1 : undefined;
+
+ return (
+ [styles.row, pressed && styles.pressed]}
+ >
+
+ {levelNumber !== undefined ? levelNumber : "•"}
+
+
+
+ {title}
+
+ {label}
+
+
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ overviewContainer: {
+ marginBottom: verticalScale(14),
+ },
+ overviewCard: {
+ backgroundColor: "#FFFFFF",
+ borderRadius: moderateScale(16),
+ borderWidth: 1,
+ borderColor: "#E2EAE5",
+ padding: moderateScale(16),
+ marginBottom: verticalScale(14),
+ },
+ overviewHeader: {
+ flexDirection: "row",
+ alignItems: "center",
+ marginBottom: verticalScale(8),
+ gap: moderateScale(8),
+ },
+ overviewTitle: {
+ fontSize: moderateScale(16),
+ fontWeight: "700",
+ color: Colors.textPrimary,
+ },
+ overviewText: {
+ fontSize: moderateScale(13),
+ lineHeight: verticalScale(19),
+ color: Colors.textSecondary,
+ },
+ overviewParagraph: {
+ fontSize: moderateScale(13),
+ lineHeight: verticalScale(19),
+ color: Colors.textSecondary,
+ marginTop: verticalScale(10),
+ },
+ sectionHeading: {
+ fontSize: moderateScale(15),
+ fontWeight: "700",
+ color: Colors.textPrimary,
+ marginBottom: verticalScale(4),
+ marginLeft: moderateScale(4),
+ },
+ row: {
+ minHeight: moderateScale(68),
+ flexDirection: "row",
+ alignItems: "center",
+ padding: moderateScale(14),
+ },
+ pressed: {
+ opacity: 0.72,
+ },
+ iconWrapper: {
+ width: moderateScale(40),
+ height: moderateScale(40),
+ borderRadius: moderateScale(20),
+ justifyContent: "center",
+ alignItems: "center",
+ backgroundColor: "#E8F5E9",
+ },
+ levelNumber: {
+ fontSize: moderateScale(16),
+ fontWeight: "800",
+ color: Colors.primaryDark,
+ },
+ textContainer: {
+ flex: 1,
+ marginLeft: moderateScale(12),
+ marginRight: moderateScale(10),
+ },
+ title: {
+ fontSize: moderateScale(15),
+ fontWeight: "600",
+ color: Colors.textPrimary,
+ marginBottom: verticalScale(2),
+ },
+ description: {
+ fontSize: moderateScale(12),
+ color: Colors.textSecondary,
+ },
+});
diff --git a/src/features/content/renderers/collections/PathogenicFactorsRenderers.tsx b/src/features/content/renderers/collections/PathogenicFactorsRenderers.tsx
new file mode 100644
index 0000000..31825ad
--- /dev/null
+++ b/src/features/content/renderers/collections/PathogenicFactorsRenderers.tsx
@@ -0,0 +1,175 @@
+import React from "react";
+import { Pressable, StyleSheet, Text, View } from "react-native";
+import { Ionicons } from "@expo/vector-icons";
+import { moderateScale, verticalScale } from "react-native-size-matters";
+
+import { Colors } from "@/theme";
+import { asNumber, asString } from "../helpers/value";
+import { CollectionScaffold } from "../shared/CollectionScaffold";
+import type {
+ CollectionItemRendererProps,
+ CollectionRendererProps,
+} from "../../types/renderer.types";
+
+export function PathogenicFactorsCollectionRenderer(
+ props: CollectionRendererProps,
+) {
+ const header = (
+
+
+
+
+ Overview
+
+
+ This method of pattern identification is based on the pathological changes occurring when the body is invaded by pathogenic factors such as Wind, Cold, Summer-Heat, Dampness, Dryness and Fire. Each of these pathogenic factors may be exterior or interior.
+
+
+ They always correspond to a Full pattern according to the Eight Principles. Indeed, from the Eight-Principle point of view, a Full condition is defined as one characterized by the presence of a pathogenic factor while the body’s Qi is still relatively intact.
+
+
+ The pathogenic factor is frequently associated with a Deficiency, in which case the condition is a combined Full–Empty condition. With regard to pathogenic factors, a combined Full-Empty condition can arise in one of two ways: a pathogenic factor can give rise to a Deficiency (e.g. Fire weakens Yin) or a Deficiency can give rise to a pathogenic factor (e.g. Spleen-Qi deficiency gives rise to Dampness).
+
+
+ Generally speaking, pathogenic factors are more relevant as patterns of disharmony than as causes of disease. The diagnosis of a pathogenic factor is made not on the basis of the patient’s history, but on the basis of the pattern of symptoms and signs presented.
+
+
+ Pathogenic Factors
+
+ );
+
+ return ;
+}
+
+export function PathogenicFactorsCardRenderer({
+ item,
+ onPress,
+}: CollectionItemRendererProps) {
+ const a = item.attributes;
+
+ const title =
+ asString(a.name) ||
+ asString(a.title) ||
+ item.title;
+
+ const overview =
+ asString(a.overview) ||
+ asString(a.content) ||
+ item.summary;
+
+ const sortOrder = asNumber(a.sort_order);
+ const factorNumber = typeof sortOrder === "number" && sortOrder > 0 ? sortOrder : undefined;
+
+ return (
+ [styles.row, pressed && styles.pressed]}
+ >
+
+ {factorNumber !== undefined ? (
+ {factorNumber}
+ ) : (
+
+ )}
+
+
+
+
+ {title}
+
+
+ {overview ? (
+
+ {overview}
+
+ ) : null}
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ overviewContainer: {
+ marginBottom: verticalScale(14),
+ },
+ overviewCard: {
+ backgroundColor: "#FFFFFF",
+ borderRadius: moderateScale(16),
+ borderWidth: 1,
+ borderColor: "#E2EAE5",
+ padding: moderateScale(16),
+ marginBottom: verticalScale(14),
+ },
+ overviewHeader: {
+ flexDirection: "row",
+ alignItems: "center",
+ marginBottom: verticalScale(8),
+ gap: moderateScale(8),
+ },
+ overviewTitle: {
+ fontSize: moderateScale(16),
+ fontWeight: "700",
+ color: Colors.textPrimary,
+ },
+ overviewText: {
+ fontSize: moderateScale(13),
+ lineHeight: verticalScale(19),
+ color: Colors.textSecondary,
+ },
+ overviewParagraph: {
+ fontSize: moderateScale(13),
+ lineHeight: verticalScale(19),
+ color: Colors.textSecondary,
+ marginTop: verticalScale(10),
+ },
+ sectionHeading: {
+ fontSize: moderateScale(15),
+ fontWeight: "700",
+ color: Colors.textPrimary,
+ marginBottom: verticalScale(4),
+ marginLeft: moderateScale(4),
+ },
+ row: {
+ minHeight: verticalScale(72),
+ flexDirection: "row",
+ alignItems: "center",
+ paddingHorizontal: moderateScale(14),
+ paddingVertical: verticalScale(13),
+ gap: moderateScale(11),
+ },
+ pressed: {
+ opacity: 0.72,
+ },
+ iconBox: {
+ width: moderateScale(40),
+ height: moderateScale(40),
+ borderRadius: moderateScale(20),
+ alignItems: "center",
+ justifyContent: "center",
+ backgroundColor: "#E8F5E9",
+ },
+ factorNumber: {
+ fontSize: moderateScale(16),
+ fontWeight: "800",
+ color: Colors.primaryDark,
+ },
+ content: {
+ flex: 1,
+ gap: verticalScale(3),
+ },
+ title: {
+ fontSize: moderateScale(16),
+ lineHeight: moderateScale(22),
+ fontWeight: "700",
+ color: Colors.textPrimary,
+ },
+ subtitle: {
+ fontSize: moderateScale(12.5),
+ lineHeight: moderateScale(18),
+ color: Colors.textSecondary,
+ },
+});
diff --git a/src/features/content/renderers/details/PathogenicFactorsDetailRenderer.tsx b/src/features/content/renderers/details/PathogenicFactorsDetailRenderer.tsx
new file mode 100644
index 0000000..ecc25c8
--- /dev/null
+++ b/src/features/content/renderers/details/PathogenicFactorsDetailRenderer.tsx
@@ -0,0 +1,93 @@
+import React from "react";
+import { ScrollView, StyleSheet } from "react-native";
+
+import type { DetailRendererProps } from "../../types/renderer.types";
+
+import { ContentLinkAttributeSections } from "../shared/ContentLinkAttributeSections";
+import { Hero } from "../shared/Hero";
+import { SectionCard } from "../shared/SectionCard";
+import { Paragraphs } from "../shared/Paragraphs";
+import { ImageGallery } from "../shared/ImageGallery";
+import { asString } from "../helpers/value";
+
+export function PathogenicFactorsDetailRenderer({
+ content,
+ data,
+ definitions,
+ presentationAttributes,
+}: DetailRendererProps) {
+ const title =
+ asString(data.name) ||
+ asString(data.title) ||
+ content.title;
+
+ const overview = asString(data.overview);
+ const clinicalManifestations = asString(data.clinical_manifestations);
+ const analysis = asString(data.analysis);
+ const contentText = asString(data.content);
+ const defaultImage = asString(data["default image"]);
+
+ const imageValue = data.image;
+ const media = Array.isArray(imageValue)
+ ? imageValue.filter(
+ (item): item is Record =>
+ item !== null && typeof item === "object" && !Array.isArray(item),
+ )
+ : [];
+
+ return (
+
+
+
+ {media.length > 0 ? : null}
+
+ {defaultImage ? (
+
+
+
+ ) : null}
+
+ {overview ? (
+
+
+
+ ) : null}
+
+ {clinicalManifestations ? (
+
+
+
+ ) : null}
+
+ {analysis ? (
+
+
+
+ ) : null}
+
+ {contentText ? (
+
+
+
+ ) : null}
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ content: {
+ paddingHorizontal: 18,
+ paddingTop: 16,
+ paddingBottom: 40,
+ gap: 14,
+ },
+});
diff --git a/src/features/content/renderers/registry.ts b/src/features/content/renderers/registry.ts
index b00b8c4..0244dc2 100644
--- a/src/features/content/renderers/registry.ts
+++ b/src/features/content/renderers/registry.ts
@@ -30,11 +30,38 @@ import { ReturningYangDetailRenderer } from "./details/ReturningYangDetailRender
import { EarAcupunctureCatalogCollectionRenderer, EarAcupunctureCatalogCardRenderer, EarAcupunctureCollectionRenderer, EarAcupunctureCardRenderer } from "./collections/EarAcupunctureRenderers";
import { EarAcupunctureCatalogDetailRenderer } from "./details/EarAcupunctureCatalogDetailRenderer";
import { EarAcupunctureDetailRenderer } from "./details/EarAcupunctureDetailRenderer";
-import {
- EightPrinciplesCollectionRenderer,
- EightPrinciplesCardRenderer,
-} from "./collections/EightPrinciplesRenderers";
+import { FourLevelsDetailRenderer } from "./details/FourLevelsDetailRenderer";
+import { PatternCollectionRenderer, PatternCardRenderer } from "./collections/PatternRenderers";
+import { PatternDetailRenderer } from "./details/PatternDetailRenderer";
+import { EightPrinciplesCollectionRenderer, EightPrinciplesCardRenderer } from "./collections/EightPrinciplesRenderers";
import { EightPrinciplesDetailRenderer } from "./details/EightPrinciplesDetailRenderer";
+import { FiveElementsCollectionRenderer, FiveElementsCardRenderer } from "./collections/FiveElementsRenderers";
+import { FiveElementsDetailRenderer } from "./details/FiveElementsDetailRenderer";
+import { FourLevelsCollectionRenderer, FourLevelsCardRenderer } from "./collections/FourLevelsRenderers";
+import { SixStagesCollectionRenderer, SixStagesCardRenderer } from "./collections/SixStagesRenderers";
+import { SixStagesDetailRenderer } from "./details/SixStagesDetailRenderer";
+import { ThreeBurnersCollectionRenderer, ThreeBurnersCardRenderer } from "./collections/ThreeBurnersRenderers";
+import { ThreeBurnersDetailRenderer } from "./details/ThreeBurnersDetailRenderer";
+import {
+ TwelveChannelsCollectionRenderer,
+ TwelveChannelsCardRenderer,
+ TwelveChannelsConnectingAndMuscleChannelCollectionRenderer,
+ TwelveChannelsConnectingAndMuscleChannelCardRenderer,
+} from "./collections/TwelveChannelsRenderers";
+import { TwelveChannelsDetailRenderer } from "./details/TwelveChannelsDetailRenderer";
+import { TwelveChannelsConnectingAndMuscleChannelDetailRenderer } from "./details/TwelveChannelsConnectingAndMuscleChannelDetailRenderer";
+import { ExtraOrdinaryVesselCollectionRenderer, ExtraOrdinaryVesselCardRenderer } from "./collections/ExtraOrdinaryVesselRenderers";
+import { ExtraOrdinaryVesselDetailRenderer } from "./details/ExtraOrdinaryVesselDetailRenderer";
+import { DeficiencyExcessPatternsCollectionRenderer, DeficiencyExcessPatternsCardRenderer } from "./collections/DeficiencyExcessPatternsRenderers";
+import { DeficiencyExcessPatternsDetailRenderer } from "./details/DeficiencyExcessPatternsDetailRenderer";
+import { YinYangCollectionRenderer, YinYangCardRenderer } from "./collections/YinYangRenderers";
+import { YinYangDetailRenderer } from "./details/YinYangDetailRenderer";
+import { PathogenicFactorsCollectionRenderer, PathogenicFactorsCardRenderer } from "./collections/PathogenicFactorsRenderers";
+import { PathogenicFactorsDetailRenderer } from "./details/PathogenicFactorsDetailRenderer";
+import { TcmPatternListCollectionRenderer, TcmPatternListCardRenderer } from "./collections/TcmPatternListRenderers";
+import { TcmPatternDetailRenderer } from "./details/TcmPatternDetailRenderer";
+import { DiseaseCollectionRenderer, DiseaseCardRenderer } from "./collections/DiseaseRenderers";
+import { DiseaseDetailRenderer } from "./details/DiseaseDetailRenderer";
export const collectionRenderers: Readonly> = Object.freeze({
module_catalog_collection: ModuleCatalogCollectionRenderer,
@@ -47,7 +74,28 @@ export const collectionRenderers: Readonly> = Object.freeze({
module_catalog_card: ModuleCatalogCardRenderer,
@@ -60,7 +108,28 @@ export const collectionItemRenderers: Readonly> = Object.freeze({
module_catalog_detail: IndexEntryDetailRenderer,
@@ -89,7 +158,28 @@ export const detailRenderers: Readonly>
returning_yang_detail: ReturningYangDetailRenderer,
ear_acupuncture_catalog_detail: EarAcupunctureCatalogDetailRenderer,
ear_acupuncture_detail: EarAcupunctureDetailRenderer,
+ four_levels_detail: FourLevelsDetailRenderer,
+ pattern_detail: PatternDetailRenderer,
eight_principles_detail: EightPrinciplesDetailRenderer,
+ five_elements_detail: FiveElementsDetailRenderer,
+ six_stages_detail: SixStagesDetailRenderer,
+ three_burners_detail: ThreeBurnersDetailRenderer,
+ twelve_channels_detail: TwelveChannelsDetailRenderer,
+ twelve_channels_connecting_and_muscle_channel_detail: TwelveChannelsConnectingAndMuscleChannelDetailRenderer,
+ extra_ordinary_vessel_detail: ExtraOrdinaryVesselDetailRenderer,
+ deficiency_excess_patterns_detail: DeficiencyExcessPatternsDetailRenderer,
+ yin_yang_detail: YinYangDetailRenderer,
+ pathogenic_factors_detail: PathogenicFactorsDetailRenderer,
+ tcm_pattern_list_detail: TcmPatternDetailRenderer,
+ disease_detail: DiseaseDetailRenderer,
+ chinese_scalp_acupuncture_detail: AcuPointDetailRenderer,
+ nutrition_food_detail: GenericDetailRenderer,
+ nutrition_effect_detail: GenericDetailRenderer,
+ m0042_ct0001_detail: IndexEntryDetailRenderer,
+ m0042_ct0002_detail: IndexEntryDetailRenderer,
+ m0042_ct0003_detail: IndexEntryDetailRenderer,
+ m0042_ct0004_detail: IndexEntryDetailRenderer,
+ m0042_ct0005_detail: PatternDetailRenderer,
});
function reportMissingRenderer(kind: string, code?: string | null) {
if (__DEV__) {
diff --git a/src/features/content/renderers/shared/DetailPageShell.tsx b/src/features/content/renderers/shared/DetailPageShell.tsx
index bb58a9a..4f079a1 100644
--- a/src/features/content/renderers/shared/DetailPageShell.tsx
+++ b/src/features/content/renderers/shared/DetailPageShell.tsx
@@ -77,7 +77,7 @@ export function DetailPageShell({ children }: DetailPageShellProps) {
const styles = StyleSheet.create({
screen: {
flex: 1,
- backgroundColor: "#F6F8F7",
+ backgroundColor: "#FFFFFF",
},
body: {
flex: 1,
diff --git a/src/features/content/renderers/shared/ImageGallery.tsx b/src/features/content/renderers/shared/ImageGallery.tsx
index 337fa79..f18e3a0 100644
--- a/src/features/content/renderers/shared/ImageGallery.tsx
+++ b/src/features/content/renderers/shared/ImageGallery.tsx
@@ -1,5 +1,6 @@
import React from "react";
-import { Image, StyleSheet, Text, View } from "react-native";
+import { StyleSheet, Text, View } from "react-native";
+import { Image } from "expo-image";
import { ContentMediaGallery } from "../../media/ContentMediaGallery";
import { useRelationalContentMedia } from "../../media/ContentMediaContext";
import { asString } from "../helpers/value";
@@ -22,7 +23,7 @@ export function ImageGallery({ images }: { images: Record[] })
return (
-
+
{name ? {name} : null}
diff --git a/src/features/content/screens/CollectionTemplateScreen.tsx b/src/features/content/screens/CollectionTemplateScreen.tsx
index cc7fb97..c563e89 100644
--- a/src/features/content/screens/CollectionTemplateScreen.tsx
+++ b/src/features/content/screens/CollectionTemplateScreen.tsx
@@ -1,5 +1,6 @@
import React, { useMemo, useState } from "react";
-import { Pressable, SafeAreaView, StyleSheet, View } from "react-native";
+import { Pressable, StyleSheet, View } from "react-native";
+import { SafeAreaView } from "react-native-safe-area-context";
import { Ionicons } from "@expo/vector-icons";
import { router } from "expo-router";
@@ -130,7 +131,7 @@ export function CollectionTemplateScreen({
);
return (
-
+
router.push(moduleDisplay.homeRoute as never)}
@@ -221,7 +222,7 @@ export function CollectionTemplateScreen({
const styles = StyleSheet.create({
screen: {
flex: 1,
- backgroundColor: "#F6F8F7",
+ backgroundColor: "#FFFFFF",
},
headerActions: {
flexDirection: "row",
diff --git a/src/features/profile/components/EditProfileAvatar.tsx b/src/features/profile/components/EditProfileAvatar.tsx
index 4ac1992..e05af7e 100644
--- a/src/features/profile/components/EditProfileAvatar.tsx
+++ b/src/features/profile/components/EditProfileAvatar.tsx
@@ -1,10 +1,10 @@
import React from "react";
import {
- Image,
Pressable,
StyleSheet,
View,
} from "react-native";
+import { Image } from "expo-image";
import { Ionicons } from "@expo/vector-icons";
import {
moderateScale,
@@ -28,6 +28,7 @@ export default function EditProfileAvatar({
) : (
diff --git a/src/features/profile/components/ProfileAvatar.tsx b/src/features/profile/components/ProfileAvatar.tsx
index 1f6b61c..989b9e4 100644
--- a/src/features/profile/components/ProfileAvatar.tsx
+++ b/src/features/profile/components/ProfileAvatar.tsx
@@ -1,11 +1,11 @@
import React from "react";
import {
- Image,
Pressable,
StyleSheet,
Text,
View,
} from "react-native";
+import { Image } from "expo-image";
import { Ionicons } from "@expo/vector-icons";
import { useRouter } from "expo-router";
import {
@@ -43,6 +43,7 @@ export default function ProfileAvatar({
) : (
diff --git a/src/features/search/screens/FacetedSearchScreen.tsx b/src/features/search/screens/FacetedSearchScreen.tsx
index 4e4f7a2..61fb4ca 100644
--- a/src/features/search/screens/FacetedSearchScreen.tsx
+++ b/src/features/search/screens/FacetedSearchScreen.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useMemo, useState } from "react";
-import { Pressable, StyleSheet, Text, TextInput, View } from "react-native";
+import { Platform, Pressable, StyleSheet, Text, TextInput, View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import { Ionicons } from "@expo/vector-icons";
import { router } from "expo-router";
@@ -325,13 +325,15 @@ export default function FacetedSearchScreen({
}
const styles = StyleSheet.create({
- safe: { flex: 1, backgroundColor: Colors.surface },
+ safe: { flex: 1, backgroundColor: Colors.white },
header: {
- height: 60,
+ minHeight: 64,
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
paddingHorizontal: 16,
+ paddingTop: Platform.OS === "web" ? 14 : 8,
+ paddingBottom: 8,
borderBottomWidth: 1,
borderBottomColor: "#ECECEC",
backgroundColor: Colors.white,
diff --git a/src/screens/modules/ModulesIndexScreen.tsx b/src/screens/modules/ModulesIndexScreen.tsx
index be0a665..9d287f3 100644
--- a/src/screens/modules/ModulesIndexScreen.tsx
+++ b/src/screens/modules/ModulesIndexScreen.tsx
@@ -1,5 +1,6 @@
import React, { useCallback, useEffect, useMemo } from "react";
import {
+ Platform,
ScrollView,
StyleSheet,
Text,
@@ -119,7 +120,7 @@ export default function ModulesIndexScreen() {
);
return (
-
+