@adminide-stack/yantra-mobile 12.0.141-alpha.1 → 12.0.141
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/features/agent-chat/NativeAgentChat.js +21 -4
- package/lib/features/agent-chat/NativeAgentChat.js.map +1 -1
- package/lib/features/chat/ApprovalCard.js +353 -0
- package/lib/features/chat/ApprovalCard.js.map +1 -0
- package/lib/features/chat/AskUserCard.js +9 -2
- package/lib/features/chat/AskUserCard.js.map +1 -1
- package/lib/features/chat/askUser.js +25 -3
- package/lib/features/chat/askUser.js.map +1 -1
- package/lib/features/chat/queuedFollowUpRows.js +13 -0
- package/lib/features/chat/queuedFollowUpRows.js.map +1 -0
- package/lib/features/devices/bodyComposition.js +116 -0
- package/lib/features/devices/bodyComposition.js.map +1 -0
- package/lib/features/devices/readings.js.map +1 -1
- package/lib/features/devices/session.js +22 -2
- package/lib/features/devices/session.js.map +1 -1
- package/lib/features/discover/DiscoverArticle.js +105 -92
- package/lib/features/discover/DiscoverArticle.js.map +1 -1
- package/lib/features/discover/DiscoverFeed.js +97 -48
- package/lib/features/discover/DiscoverFeed.js.map +1 -1
- package/lib/features/discover/DiscoverFollowUp.js +135 -0
- package/lib/features/discover/DiscoverFollowUp.js.map +1 -0
- package/lib/features/discover/DiscoverSidebar.js +555 -0
- package/lib/features/discover/DiscoverSidebar.js.map +1 -0
- package/lib/features/discover/DiscoverSkeletons.js +123 -0
- package/lib/features/discover/DiscoverSkeletons.js.map +1 -0
- package/lib/features/discover/DiscoverStoryCards.js +193 -87
- package/lib/features/discover/DiscoverStoryCards.js.map +1 -1
- package/lib/features/discover/followUpQuery.js +42 -0
- package/lib/features/discover/followUpQuery.js.map +1 -0
- package/lib/features/discover/markets.js +37 -0
- package/lib/features/discover/markets.js.map +1 -0
- package/lib/features/discover/useDiscoverSidebar.js +148 -0
- package/lib/features/discover/useDiscoverSidebar.js.map +1 -0
- package/lib/features/discover/weather.js +42 -0
- package/lib/features/discover/weather.js.map +1 -0
- package/lib/features/expenses/ExpensesAgentChatPane.js +1 -1
- package/lib/features/expenses/ExpensesAgentChatPane.js.map +1 -1
- package/lib/features/inbox/InboxAgentChatPane.js +1 -1
- package/lib/features/inbox/InboxAgentChatPane.js.map +1 -1
- package/lib/features/job-search/JobSearchAgentChatPane.js +1 -0
- package/lib/features/job-search/JobSearchAgentChatPane.js.map +1 -1
- package/lib/features/local-services/LocalServicesAgentChatPane.js +1 -1
- package/lib/features/local-services/LocalServicesAgentChatPane.js.map +1 -1
- package/lib/features/movies/MoviesAgentChatPane.js +1 -1
- package/lib/features/movies/MoviesAgentChatPane.js.map +1 -1
- package/lib/features/notion/NotionBlockSheets.js +206 -0
- package/lib/features/notion/NotionBlockSheets.js.map +1 -0
- package/lib/features/notion/NotionBlockView.js +36 -0
- package/lib/features/notion/NotionBlockView.js.map +1 -0
- package/lib/features/notion/NotionCommentsSheet.js +461 -0
- package/lib/features/notion/NotionCommentsSheet.js.map +1 -0
- package/lib/features/notion/NotionConnectionsSheet.js +244 -0
- package/lib/features/notion/NotionConnectionsSheet.js.map +1 -0
- package/lib/features/notion/NotionHistorySheet.js +439 -0
- package/lib/features/notion/NotionHistorySheet.js.map +1 -0
- package/lib/features/notion/NotionMediaBlocks.js +803 -0
- package/lib/features/notion/NotionMediaBlocks.js.map +1 -0
- package/lib/features/notion/NotionMentionSheet.js +279 -0
- package/lib/features/notion/NotionMentionSheet.js.map +1 -0
- package/lib/features/notion/NotionPageMenu.js +585 -0
- package/lib/features/notion/NotionPageMenu.js.map +1 -0
- package/lib/features/notion/NotionPageTree.js +220 -0
- package/lib/features/notion/NotionPageTree.js.map +1 -0
- package/lib/features/notion/NotionPageView.js +1253 -152
- package/lib/features/notion/NotionPageView.js.map +1 -1
- package/lib/features/notion/NotionShareSheet.js +606 -0
- package/lib/features/notion/NotionShareSheet.js.map +1 -0
- package/lib/features/notion/NotionSheets.js +87 -15
- package/lib/features/notion/NotionSheets.js.map +1 -1
- package/lib/features/notion/NotionSidebarSections.js +492 -0
- package/lib/features/notion/NotionSidebarSections.js.map +1 -0
- package/lib/features/notion/NotionWorkspaceAdmin.js +659 -0
- package/lib/features/notion/NotionWorkspaceAdmin.js.map +1 -0
- package/lib/features/notion/NotionWorkspaceView.js +257 -45
- package/lib/features/notion/NotionWorkspaceView.js.map +1 -1
- package/lib/features/notion/database/DatabaseCells.js +554 -0
- package/lib/features/notion/database/DatabaseCells.js.map +1 -0
- package/lib/features/notion/database/DatabaseDateLayouts.js +792 -0
- package/lib/features/notion/database/DatabaseDateLayouts.js.map +1 -0
- package/lib/features/notion/database/DatabaseLayouts.js +461 -0
- package/lib/features/notion/database/DatabaseLayouts.js.map +1 -0
- package/lib/features/notion/database/DatabaseSheets.js +791 -0
- package/lib/features/notion/database/DatabaseSheets.js.map +1 -0
- package/lib/features/notion/database/NotionDatabaseView.js +817 -0
- package/lib/features/notion/database/NotionDatabaseView.js.map +1 -0
- package/lib/features/notion/database/RowPropertiesPanel.js +162 -0
- package/lib/features/notion/database/RowPropertiesPanel.js.map +1 -0
- package/lib/features/notion/database/chartData.js +89 -0
- package/lib/features/notion/database/chartData.js.map +1 -0
- package/lib/features/notion/database/chartView.js +112 -0
- package/lib/features/notion/database/chartView.js.map +1 -0
- package/lib/features/notion/database/connectorButton.js +33 -0
- package/lib/features/notion/database/connectorButton.js.map +1 -0
- package/lib/features/notion/database/databaseCalc.js +208 -0
- package/lib/features/notion/database/databaseCalc.js.map +1 -0
- package/lib/features/notion/database/databaseCalendar.js +157 -0
- package/lib/features/notion/database/databaseCalendar.js.map +1 -0
- package/lib/features/notion/database/databaseCsv.js +98 -0
- package/lib/features/notion/database/databaseCsv.js.map +1 -0
- package/lib/features/notion/database/databaseCsvActions.js +58 -0
- package/lib/features/notion/database/databaseCsvActions.js.map +1 -0
- package/lib/features/notion/database/databaseFilter.js +473 -0
- package/lib/features/notion/database/databaseFilter.js.map +1 -0
- package/lib/features/notion/database/databaseFormula.js +1072 -0
- package/lib/features/notion/database/databaseFormula.js.map +1 -0
- package/lib/features/notion/database/databaseGroup.js +151 -0
- package/lib/features/notion/database/databaseGroup.js.map +1 -0
- package/lib/features/notion/database/databaseRollup.js +58 -0
- package/lib/features/notion/database/databaseRollup.js.map +1 -0
- package/lib/features/notion/database/databaseTimeline.js +156 -0
- package/lib/features/notion/database/databaseTimeline.js.map +1 -0
- package/lib/features/notion/database/databaseView.js +1188 -0
- package/lib/features/notion/database/databaseView.js.map +1 -0
- package/lib/features/notion/database/databaseViews.js +310 -0
- package/lib/features/notion/database/databaseViews.js.map +1 -0
- package/lib/features/notion/database/relationSource.js +92 -0
- package/lib/features/notion/database/relationSource.js.map +1 -0
- package/lib/features/notion/database/uniqueId.js +17 -0
- package/lib/features/notion/database/uniqueId.js.map +1 -0
- package/lib/features/notion/database/useNotionDatabase.js +617 -0
- package/lib/features/notion/database/useNotionDatabase.js.map +1 -0
- package/lib/features/notion/notionAgentRunStatus.js +39 -0
- package/lib/features/notion/notionAgentRunStatus.js.map +1 -0
- package/lib/features/notion/notionCodeLanguages.js +112 -0
- package/lib/features/notion/notionCodeLanguages.js.map +1 -0
- package/lib/features/notion/notionComments.js +86 -0
- package/lib/features/notion/notionComments.js.map +1 -0
- package/lib/features/notion/notionConnections.js +74 -0
- package/lib/features/notion/notionConnections.js.map +1 -0
- package/lib/features/notion/notionDocuments.js +453 -1
- package/lib/features/notion/notionDocuments.js.map +1 -1
- package/lib/features/notion/notionEditorModel.js +142 -7
- package/lib/features/notion/notionEditorModel.js.map +1 -1
- package/lib/features/notion/notionMarkdownShortcuts.js +51 -0
- package/lib/features/notion/notionMarkdownShortcuts.js.map +1 -0
- package/lib/features/notion/notionMedia.js +119 -0
- package/lib/features/notion/notionMedia.js.map +1 -0
- package/lib/features/notion/notionMentionDate.js +32 -0
- package/lib/features/notion/notionMentionDate.js.map +1 -0
- package/lib/features/notion/notionMentionOptions.js +162 -0
- package/lib/features/notion/notionMentionOptions.js.map +1 -0
- package/lib/features/notion/notionNotesAgent.js +445 -0
- package/lib/features/notion/notionNotesAgent.js.map +1 -0
- package/lib/features/notion/notionPageAccess.js +168 -0
- package/lib/features/notion/notionPageAccess.js.map +1 -0
- package/lib/features/notion/notionPageActions.js +138 -0
- package/lib/features/notion/notionPageActions.js.map +1 -0
- package/lib/features/notion/notionPageHistory.js +154 -0
- package/lib/features/notion/notionPageHistory.js.map +1 -0
- package/lib/features/notion/notionPageKinds.js +200 -0
- package/lib/features/notion/notionPageKinds.js.map +1 -0
- package/lib/features/notion/notionRecents.js +48 -0
- package/lib/features/notion/notionRecents.js.map +1 -0
- package/lib/features/notion/notionRichText.js +177 -0
- package/lib/features/notion/notionRichText.js.map +1 -0
- package/lib/features/notion/notionRichTitle.js +336 -0
- package/lib/features/notion/notionRichTitle.js.map +1 -0
- package/lib/features/notion/useNotionWorkspace.js +272 -13
- package/lib/features/notion/useNotionWorkspace.js.map +1 -1
- package/lib/features/notion/usePageActions.js +155 -0
- package/lib/features/notion/usePageActions.js.map +1 -0
- package/lib/features/resume/ResumeAgentChatPane.js +1 -1
- package/lib/features/resume/ResumeAgentChatPane.js.map +1 -1
- package/lib/features/shopping/ShoppingAgentChatPane.js +1 -1
- package/lib/features/shopping/ShoppingAgentChatPane.js.map +1 -1
- package/lib/features/study/StudyAgentChatPane.js +1 -1
- package/lib/features/study/StudyAgentChatPane.js.map +1 -1
- package/lib/features/travel/TravelAgentChatPane.js +1 -1
- package/lib/features/travel/TravelAgentChatPane.js.map +1 -1
- package/lib/features/webbuilder/WebBuilderExperience.js +40 -8
- package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
- package/lib/features/webbuilder/buildFragments.js +1 -1
- package/lib/features/webbuilder/buildFragments.js.map +1 -1
- package/lib/features/webbuilder/codeFiles.js +302 -0
- package/lib/features/webbuilder/codeFiles.js.map +1 -0
- package/lib/features/webbuilder/codeHighlight.js +209 -0
- package/lib/features/webbuilder/codeHighlight.js.map +1 -0
- package/lib/features/webbuilder/components/CodeView.js +682 -52
- package/lib/features/webbuilder/components/CodeView.js.map +1 -1
- package/lib/features/webbuilder/components/PreviewScreen.js +59 -38
- package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
- package/lib/features/webbuilder/components/ProjectChat.js +3 -3
- package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
- package/lib/features/webbuilder/stepLabels.js +68 -0
- package/lib/features/webbuilder/stepLabels.js.map +1 -0
- package/lib/hooks/useHostChatSteering.js +45 -0
- package/lib/hooks/useHostChatSteering.js.map +1 -0
- package/lib/screens/Chat/index.js +2 -12
- package/lib/screens/Chat/index.js.map +1 -1
- package/lib/screens/Devices/index.js +205 -3
- package/lib/screens/Devices/index.js.map +1 -1
- package/lib/screens/ExpensesNative/useExpensesHostChat.js +25 -5
- package/lib/screens/ExpensesNative/useExpensesHostChat.js.map +1 -1
- package/lib/screens/InboxNative/useInboxHostChat.js +25 -5
- package/lib/screens/InboxNative/useInboxHostChat.js.map +1 -1
- package/lib/screens/JobSearchNative/useJobSearchHostChat.js +25 -5
- package/lib/screens/JobSearchNative/useJobSearchHostChat.js.map +1 -1
- package/lib/screens/LocalServicesNative/useLocalServicesHostChat.js +25 -5
- package/lib/screens/LocalServicesNative/useLocalServicesHostChat.js.map +1 -1
- package/lib/screens/MoviesNative/useMoviesHostChat.js +25 -5
- package/lib/screens/MoviesNative/useMoviesHostChat.js.map +1 -1
- package/lib/screens/NotionPage/index.js +2 -2
- package/lib/screens/NotionPage/index.js.map +1 -1
- package/lib/screens/ResumeNative/useResumeHostChat.js +25 -5
- package/lib/screens/ResumeNative/useResumeHostChat.js.map +1 -1
- package/lib/screens/ShoppingNative/useShoppingHostChat.js +25 -5
- package/lib/screens/ShoppingNative/useShoppingHostChat.js.map +1 -1
- package/lib/screens/StudyNative/useStudyHostChat.js +25 -5
- package/lib/screens/StudyNative/useStudyHostChat.js.map +1 -1
- package/lib/screens/TravelNative/useTravelHostChat.js +25 -5
- package/lib/screens/TravelNative/useTravelHostChat.js.map +1 -1
- package/lib/screens/WebBuilderNative/codeWorkspaceApi.js +222 -0
- package/lib/screens/WebBuilderNative/codeWorkspaceApi.js.map +1 -0
- package/lib/screens/WebBuilderNative/index.js +1 -1
- package/lib/screens/WebBuilderNative/index.js.map +1 -1
- package/lib/screens/WebBuilderNative/sandboxProxyApi.js +126 -4
- package/lib/screens/WebBuilderNative/sandboxProxyApi.js.map +1 -1
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js +120 -11
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import React__default,{useState,useMemo,useCallback,useEffect,useRef}from'react';import {BackHandler,StyleSheet,View,Pressable,ActivityIndicator,ScrollView,Linking,Alert,Animated,Easing,Platform}from'react-native';import {Ionicons}from'@expo/vector-icons';import {Text}from'@admin-layout/gluestack-ui-mobile';import {useNavigation,useRoute,CommonActions}from'@react-navigation/native';import {useSafeAreaInsets,SafeAreaView}from'react-native-safe-area-context';import {mobileColors,mobileTokens}from'../../theme/mobileTokens.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import {deviceKind,DEVICE_KINDS}from'../../features/devices/catalog.js';import {useDevices,useDeviceSession,platformWriter,deviceStore}from'../../features/devices/devices.js';import {describeReading}from'../../features/devices/readings.js';import {useHealthSync}from'../../features/health/healthSync.js';var __defProp = Object.defineProperty;
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import React__default,{useState,useMemo,useCallback,useEffect,useRef}from'react';import {BackHandler,StyleSheet,View,Pressable,ActivityIndicator,ScrollView,Linking,Alert,Animated,Easing,Platform}from'react-native';import {Ionicons}from'@expo/vector-icons';import {Text}from'@admin-layout/gluestack-ui-mobile';import {useNavigation,useRoute,CommonActions}from'@react-navigation/native';import {useSafeAreaInsets,SafeAreaView}from'react-native-safe-area-context';import {mobileColors,mobileTokens}from'../../theme/mobileTokens.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import {deviceKind,DEVICE_KINDS}from'../../features/devices/catalog.js';import {useDevices,useDeviceSession,platformWriter,deviceStore}from'../../features/devices/devices.js';import {describeReading}from'../../features/devices/readings.js';import {compositionRows}from'../../features/devices/bodyComposition.js';import {useHealthSync}from'../../features/health/healthSync.js';var __defProp = Object.defineProperty;
|
|
2
2
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
3
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
4
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -305,6 +305,53 @@ const styles = StyleSheet.create({
|
|
|
305
305
|
fontSize: 14,
|
|
306
306
|
marginTop: 2
|
|
307
307
|
},
|
|
308
|
+
measureBox: {
|
|
309
|
+
alignItems: "center",
|
|
310
|
+
paddingVertical: 24,
|
|
311
|
+
gap: 6
|
|
312
|
+
},
|
|
313
|
+
measureRing: {
|
|
314
|
+
position: "absolute",
|
|
315
|
+
top: 24,
|
|
316
|
+
width: 176,
|
|
317
|
+
height: 176,
|
|
318
|
+
borderRadius: 88,
|
|
319
|
+
borderWidth: 2
|
|
320
|
+
},
|
|
321
|
+
measureCore: {
|
|
322
|
+
width: 176,
|
|
323
|
+
height: 176,
|
|
324
|
+
borderRadius: 88,
|
|
325
|
+
alignItems: "center",
|
|
326
|
+
justifyContent: "center",
|
|
327
|
+
marginBottom: 12
|
|
328
|
+
},
|
|
329
|
+
measureWeight: {
|
|
330
|
+
fontSize: 44,
|
|
331
|
+
fontWeight: "700"
|
|
332
|
+
},
|
|
333
|
+
measureUnit: {
|
|
334
|
+
fontSize: 18,
|
|
335
|
+
fontWeight: "600"
|
|
336
|
+
},
|
|
337
|
+
compositionGrid: {
|
|
338
|
+
flexDirection: "row",
|
|
339
|
+
flexWrap: "wrap",
|
|
340
|
+
marginTop: 10,
|
|
341
|
+
rowGap: 10
|
|
342
|
+
},
|
|
343
|
+
compositionItem: {
|
|
344
|
+
width: "33.33%",
|
|
345
|
+
paddingRight: 8
|
|
346
|
+
},
|
|
347
|
+
compositionLabel: {
|
|
348
|
+
fontSize: 12
|
|
349
|
+
},
|
|
350
|
+
compositionValue: {
|
|
351
|
+
fontSize: 15,
|
|
352
|
+
fontWeight: "600",
|
|
353
|
+
marginTop: 1
|
|
354
|
+
},
|
|
308
355
|
savedLine: {
|
|
309
356
|
flexDirection: "row",
|
|
310
357
|
alignItems: "center",
|
|
@@ -567,7 +614,15 @@ function ReadingsCard({
|
|
|
567
614
|
}], children: whenLabel(r.at, now) }),
|
|
568
615
|
r.kind === "blood-pressure" && ((_a = r.problems) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsx(Text, { style: [styles.readingNote, {
|
|
569
616
|
color: colors.warningText
|
|
570
|
-
}], children: r.problems.join(" ") }) : null
|
|
617
|
+
}], children: r.problems.join(" ") }) : null,
|
|
618
|
+
r.kind === "body" && r.composition ? /* @__PURE__ */ jsx(View, { style: styles.compositionGrid, children: compositionRows(r.composition, units).map((m) => /* @__PURE__ */ jsxs(View, { style: styles.compositionItem, children: [
|
|
619
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.compositionLabel, {
|
|
620
|
+
color: colors.textMuted
|
|
621
|
+
}], children: m.label }),
|
|
622
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.compositionValue, {
|
|
623
|
+
color: colors.text
|
|
624
|
+
}], children: m.value })
|
|
625
|
+
] }, m.label)) }) : null
|
|
571
626
|
] })
|
|
572
627
|
] }, r.id);
|
|
573
628
|
}) })
|
|
@@ -772,10 +827,151 @@ function PickKind({
|
|
|
772
827
|
] }, k.id)) })
|
|
773
828
|
] });
|
|
774
829
|
}
|
|
830
|
+
function formatWeight(kg, units) {
|
|
831
|
+
if (kg === void 0) return "--";
|
|
832
|
+
const v = units === "imperial" ? kg / 0.45359237 : kg;
|
|
833
|
+
return (Math.round(v * 10) / 10).toFixed(1);
|
|
834
|
+
}
|
|
835
|
+
function ScaleMeasuring({
|
|
836
|
+
colors,
|
|
837
|
+
live,
|
|
838
|
+
units
|
|
839
|
+
}) {
|
|
840
|
+
const pulse = useRef(new Animated.Value(0)).current;
|
|
841
|
+
useEffect(() => {
|
|
842
|
+
const loop = Animated.loop(Animated.timing(pulse, {
|
|
843
|
+
toValue: 1,
|
|
844
|
+
duration: 1400,
|
|
845
|
+
easing: Easing.out(Easing.ease),
|
|
846
|
+
useNativeDriver: true
|
|
847
|
+
}));
|
|
848
|
+
loop.start();
|
|
849
|
+
return () => loop.stop();
|
|
850
|
+
}, [pulse]);
|
|
851
|
+
const ringScale = pulse.interpolate({
|
|
852
|
+
inputRange: [0, 1],
|
|
853
|
+
outputRange: [0.9, 1.5]
|
|
854
|
+
});
|
|
855
|
+
const ringOpacity = pulse.interpolate({
|
|
856
|
+
inputRange: [0, 1],
|
|
857
|
+
outputRange: [0.5, 0]
|
|
858
|
+
});
|
|
859
|
+
const unitLabel = units === "imperial" ? "lb" : "kg";
|
|
860
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.measureBox, children: [
|
|
861
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [styles.measureRing, {
|
|
862
|
+
borderColor: colors.primary,
|
|
863
|
+
opacity: ringOpacity,
|
|
864
|
+
transform: [{
|
|
865
|
+
scale: ringScale
|
|
866
|
+
}]
|
|
867
|
+
}], accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" }),
|
|
868
|
+
/* @__PURE__ */ jsx(View, { style: [styles.measureCore, {
|
|
869
|
+
backgroundColor: colors.primarySoft
|
|
870
|
+
}], children: /* @__PURE__ */ jsxs(Text, { style: [styles.measureWeight, {
|
|
871
|
+
color: colors.text
|
|
872
|
+
}], accessibilityLabel: `${formatWeight(live.weightKg, units)} ${unitLabel}`, children: [
|
|
873
|
+
formatWeight(live.weightKg, units),
|
|
874
|
+
/* @__PURE__ */ jsxs(Text, { style: [styles.measureUnit, {
|
|
875
|
+
color: colors.textMuted
|
|
876
|
+
}], children: [
|
|
877
|
+
" ",
|
|
878
|
+
unitLabel
|
|
879
|
+
] })
|
|
880
|
+
] }) }),
|
|
881
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.statusTitle, {
|
|
882
|
+
color: colors.text
|
|
883
|
+
}], children: "Measuring" }),
|
|
884
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.statusBody, {
|
|
885
|
+
color: colors.textMuted
|
|
886
|
+
}], children: "Stand still, barefoot, until it settles." })
|
|
887
|
+
] });
|
|
888
|
+
}
|
|
889
|
+
function BrandLive({
|
|
890
|
+
kind,
|
|
891
|
+
colors,
|
|
892
|
+
live,
|
|
893
|
+
units
|
|
894
|
+
}) {
|
|
895
|
+
var _a, _b, _c;
|
|
896
|
+
const items = [];
|
|
897
|
+
const round1 = (n) => Math.round(n * 10) / 10;
|
|
898
|
+
if (kind === "kitchen-scale") items.push({
|
|
899
|
+
label: "Weight",
|
|
900
|
+
value: `${Math.round((_a = live.grams) != null ? _a : 0)} g`
|
|
901
|
+
});
|
|
902
|
+
if (kind === "tape") {
|
|
903
|
+
const cm = (_b = live.lengthCm) != null ? _b : 0;
|
|
904
|
+
items.push({
|
|
905
|
+
label: live.bodyPart ? live.bodyPart.replace(/_/g, " ") : "Length",
|
|
906
|
+
value: units === "imperial" ? `${round1(cm / 2.54)} in` : `${round1(cm)} cm`
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
if (kind === "jump-rope") {
|
|
910
|
+
items.push({
|
|
911
|
+
label: "Jumps",
|
|
912
|
+
value: String((_c = live.jumps) != null ? _c : 0)
|
|
913
|
+
});
|
|
914
|
+
if (live.elapsedS !== void 0) items.push({
|
|
915
|
+
label: "Time",
|
|
916
|
+
value: clockOf(live.elapsedS)
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
if (kind === "treadmill") {
|
|
920
|
+
if (live.speedKmh !== void 0) items.push({
|
|
921
|
+
label: "Speed",
|
|
922
|
+
value: `${round1(live.speedKmh)} km/h`
|
|
923
|
+
});
|
|
924
|
+
if (live.distanceM !== void 0) items.push({
|
|
925
|
+
label: "Distance",
|
|
926
|
+
value: `${round1(live.distanceM / 1e3)} km`
|
|
927
|
+
});
|
|
928
|
+
if (live.kcal !== void 0) items.push({
|
|
929
|
+
label: "Calories",
|
|
930
|
+
value: `${Math.round(live.kcal)} kcal`
|
|
931
|
+
});
|
|
932
|
+
if (live.elapsedS !== void 0) items.push({
|
|
933
|
+
label: "Time",
|
|
934
|
+
value: clockOf(live.elapsedS)
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
if (kind === "ring") {
|
|
938
|
+
if (live.bpm !== void 0) items.push({
|
|
939
|
+
label: "Heart rate",
|
|
940
|
+
value: `${live.bpm} bpm`
|
|
941
|
+
});
|
|
942
|
+
if (live.spo2 !== void 0) items.push({
|
|
943
|
+
label: "Blood oxygen",
|
|
944
|
+
value: `${live.spo2}%`
|
|
945
|
+
});
|
|
946
|
+
if (live.skinTempC !== void 0) items.push({
|
|
947
|
+
label: "Skin temp",
|
|
948
|
+
value: `${round1(live.skinTempC)} \xB0C`
|
|
949
|
+
});
|
|
950
|
+
if (live.steps !== void 0) items.push({
|
|
951
|
+
label: "Steps",
|
|
952
|
+
value: String(live.steps)
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
if (live.battery !== void 0) items.push({
|
|
956
|
+
label: "Battery",
|
|
957
|
+
value: `${live.battery}%`
|
|
958
|
+
});
|
|
959
|
+
return /* @__PURE__ */ jsx(View, { style: [styles.card, styles.livePanel, {
|
|
960
|
+
backgroundColor: colors.surface
|
|
961
|
+
}], children: /* @__PURE__ */ jsx(View, { style: styles.compositionGrid, children: items.map((m) => /* @__PURE__ */ jsxs(View, { style: styles.compositionItem, children: [
|
|
962
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.compositionLabel, {
|
|
963
|
+
color: colors.textMuted
|
|
964
|
+
}], children: m.label }),
|
|
965
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.compositionValue, {
|
|
966
|
+
color: colors.text
|
|
967
|
+
}], children: m.value })
|
|
968
|
+
] }, m.label)) }) });
|
|
969
|
+
}
|
|
775
970
|
function LivePanel({
|
|
776
971
|
kind,
|
|
777
972
|
colors,
|
|
778
973
|
live,
|
|
974
|
+
units,
|
|
779
975
|
recording,
|
|
780
976
|
connected,
|
|
781
977
|
onStart,
|
|
@@ -784,6 +980,12 @@ function LivePanel({
|
|
|
784
980
|
}) {
|
|
785
981
|
var _a, _b, _c, _d, _e;
|
|
786
982
|
const [type, setType] = useState("run");
|
|
983
|
+
if (kind === "scale") {
|
|
984
|
+
return /* @__PURE__ */ jsx(ScaleMeasuring, { colors, live, units });
|
|
985
|
+
}
|
|
986
|
+
if (kind === "kitchen-scale" || kind === "tape" || kind === "jump-rope" || kind === "treadmill" || kind === "ring") {
|
|
987
|
+
return /* @__PURE__ */ jsx(BrandLive, { kind, colors, live, units });
|
|
988
|
+
}
|
|
787
989
|
const [, tick] = useState(0);
|
|
788
990
|
useEffect(() => {
|
|
789
991
|
if (!recording) return void 0;
|
|
@@ -943,7 +1145,7 @@ function Measure({
|
|
|
943
1145
|
"."
|
|
944
1146
|
] })
|
|
945
1147
|
] }) : null,
|
|
946
|
-
(state.step === "connected" || state.step === "ended") && live ? /* @__PURE__ */ jsx(LivePanel, { kind, colors, live, recording, connected: state.step === "connected", onStart: (type) => session == null ? void 0 : session.startRecording(type), onStop: () => {
|
|
1148
|
+
(state.step === "connected" || state.step === "ended") && live ? /* @__PURE__ */ jsx(LivePanel, { kind, colors, live, units, recording, connected: state.step === "connected", onStart: (type) => session == null ? void 0 : session.startRecording(type), onStop: () => {
|
|
947
1149
|
void (session == null ? void 0 : session.stopRecording());
|
|
948
1150
|
}, onSave: () => {
|
|
949
1151
|
void (session == null ? void 0 : session.saveLive());
|