@lockin90/ui-native 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Accordion.js +144 -0
- package/lib/commonjs/components/Accordion.js.map +1 -0
- package/lib/commonjs/components/AchievementBadge.js +225 -0
- package/lib/commonjs/components/AchievementBadge.js.map +1 -0
- package/lib/commonjs/components/Alert.js +232 -0
- package/lib/commonjs/components/Alert.js.map +1 -0
- package/lib/commonjs/components/AreaChart.js +506 -0
- package/lib/commonjs/components/AreaChart.js.map +1 -0
- package/lib/commonjs/components/AuroraBackground.js +267 -0
- package/lib/commonjs/components/AuroraBackground.js.map +1 -0
- package/lib/commonjs/components/Avatar.js +187 -0
- package/lib/commonjs/components/Avatar.js.map +1 -0
- package/lib/commonjs/components/AvatarStack.js +95 -0
- package/lib/commonjs/components/AvatarStack.js.map +1 -0
- package/lib/commonjs/components/BackLink.js +77 -0
- package/lib/commonjs/components/BackLink.js.map +1 -0
- package/lib/commonjs/components/Badge.js +136 -0
- package/lib/commonjs/components/Badge.js.map +1 -0
- package/lib/commonjs/components/BarChart.js +641 -0
- package/lib/commonjs/components/BarChart.js.map +1 -0
- package/lib/commonjs/components/BarFill.js +55 -0
- package/lib/commonjs/components/BarFill.js.map +1 -0
- package/lib/commonjs/components/BeeswarmChart.js +615 -0
- package/lib/commonjs/components/BeeswarmChart.js.map +1 -0
- package/lib/commonjs/components/BiomarkerRange.js +610 -0
- package/lib/commonjs/components/BiomarkerRange.js.map +1 -0
- package/lib/commonjs/components/BodyBattery.js +563 -0
- package/lib/commonjs/components/BodyBattery.js.map +1 -0
- package/lib/commonjs/components/BrandMark.js +184 -0
- package/lib/commonjs/components/BrandMark.js.map +1 -0
- package/lib/commonjs/components/BulletChart.js +406 -0
- package/lib/commonjs/components/BulletChart.js.map +1 -0
- package/lib/commonjs/components/Button.js +154 -0
- package/lib/commonjs/components/Button.js.map +1 -0
- package/lib/commonjs/components/CaffeineClock.js +491 -0
- package/lib/commonjs/components/CaffeineClock.js.map +1 -0
- package/lib/commonjs/components/Card.js +142 -0
- package/lib/commonjs/components/Card.js.map +1 -0
- package/lib/commonjs/components/CharCounter.js +106 -0
- package/lib/commonjs/components/CharCounter.js.map +1 -0
- package/lib/commonjs/components/ChartState.js +554 -0
- package/lib/commonjs/components/ChartState.js.map +1 -0
- package/lib/commonjs/components/Checkbox.js +180 -0
- package/lib/commonjs/components/Checkbox.js.map +1 -0
- package/lib/commonjs/components/Chip.js +218 -0
- package/lib/commonjs/components/Chip.js.map +1 -0
- package/lib/commonjs/components/ChoiceChip.js +133 -0
- package/lib/commonjs/components/ChoiceChip.js.map +1 -0
- package/lib/commonjs/components/CodeBlock.js +126 -0
- package/lib/commonjs/components/CodeBlock.js.map +1 -0
- package/lib/commonjs/components/CodeField.js +129 -0
- package/lib/commonjs/components/CodeField.js.map +1 -0
- package/lib/commonjs/components/ColorPicker.js +181 -0
- package/lib/commonjs/components/ColorPicker.js.map +1 -0
- package/lib/commonjs/components/ComboChart.js +419 -0
- package/lib/commonjs/components/ComboChart.js.map +1 -0
- package/lib/commonjs/components/Combobox.js +108 -0
- package/lib/commonjs/components/Combobox.js.map +1 -0
- package/lib/commonjs/components/CompareChart.js +627 -0
- package/lib/commonjs/components/CompareChart.js.map +1 -0
- package/lib/commonjs/components/CompositeChart.js +654 -0
- package/lib/commonjs/components/CompositeChart.js.map +1 -0
- package/lib/commonjs/components/Countdown.js +152 -0
- package/lib/commonjs/components/Countdown.js.map +1 -0
- package/lib/commonjs/components/CreditCardVisual.js +167 -0
- package/lib/commonjs/components/CreditCardVisual.js.map +1 -0
- package/lib/commonjs/components/DateField.js +365 -0
- package/lib/commonjs/components/DateField.js.map +1 -0
- package/lib/commonjs/components/DayTimelineBlocks.js +253 -0
- package/lib/commonjs/components/DayTimelineBlocks.js.map +1 -0
- package/lib/commonjs/components/DayWheel.js +467 -0
- package/lib/commonjs/components/DayWheel.js.map +1 -0
- package/lib/commonjs/components/DeltaPill.js +154 -0
- package/lib/commonjs/components/DeltaPill.js.map +1 -0
- package/lib/commonjs/components/DistributionChart.js +776 -0
- package/lib/commonjs/components/DistributionChart.js.map +1 -0
- package/lib/commonjs/components/Divider.js +74 -0
- package/lib/commonjs/components/Divider.js.map +1 -0
- package/lib/commonjs/components/DonutChart.js +337 -0
- package/lib/commonjs/components/DonutChart.js.map +1 -0
- package/lib/commonjs/components/DotsLoader.js +94 -0
- package/lib/commonjs/components/DotsLoader.js.map +1 -0
- package/lib/commonjs/components/EffectAttributionLine.js +105 -0
- package/lib/commonjs/components/EffectAttributionLine.js.map +1 -0
- package/lib/commonjs/components/EmptyState.js +120 -0
- package/lib/commonjs/components/EmptyState.js.map +1 -0
- package/lib/commonjs/components/EngagementBar.js +122 -0
- package/lib/commonjs/components/EngagementBar.js.map +1 -0
- package/lib/commonjs/components/EnvironmentChart.js +573 -0
- package/lib/commonjs/components/EnvironmentChart.js.map +1 -0
- package/lib/commonjs/components/Eyebrow.js +32 -0
- package/lib/commonjs/components/Eyebrow.js.map +1 -0
- package/lib/commonjs/components/FocalPointPicker.js +196 -0
- package/lib/commonjs/components/FocalPointPicker.js.map +1 -0
- package/lib/commonjs/components/FollowButton.js +95 -0
- package/lib/commonjs/components/FollowButton.js.map +1 -0
- package/lib/commonjs/components/ForecastCallout.js +116 -0
- package/lib/commonjs/components/ForecastCallout.js.map +1 -0
- package/lib/commonjs/components/FormField.js +204 -0
- package/lib/commonjs/components/FormField.js.map +1 -0
- package/lib/commonjs/components/FunnelChart.js +260 -0
- package/lib/commonjs/components/FunnelChart.js.map +1 -0
- package/lib/commonjs/components/Gauge.js +252 -0
- package/lib/commonjs/components/Gauge.js.map +1 -0
- package/lib/commonjs/components/GradientText.js +136 -0
- package/lib/commonjs/components/GradientText.js.map +1 -0
- package/lib/commonjs/components/Heatmap.js +419 -0
- package/lib/commonjs/components/Heatmap.js.map +1 -0
- package/lib/commonjs/components/Highlight.js +55 -0
- package/lib/commonjs/components/Highlight.js.map +1 -0
- package/lib/commonjs/components/Hypnogram.js +842 -0
- package/lib/commonjs/components/Hypnogram.js.map +1 -0
- package/lib/commonjs/components/Icon.js +486 -0
- package/lib/commonjs/components/Icon.js.map +1 -0
- package/lib/commonjs/components/Input.js +142 -0
- package/lib/commonjs/components/Input.js.map +1 -0
- package/lib/commonjs/components/InsightCard.js +119 -0
- package/lib/commonjs/components/InsightCard.js.map +1 -0
- package/lib/commonjs/components/KeyValue.js +93 -0
- package/lib/commonjs/components/KeyValue.js.map +1 -0
- package/lib/commonjs/components/LeaderboardRow.js +140 -0
- package/lib/commonjs/components/LeaderboardRow.js.map +1 -0
- package/lib/commonjs/components/LineChart.js +1544 -0
- package/lib/commonjs/components/LineChart.js.map +1 -0
- package/lib/commonjs/components/ListRow.js +122 -0
- package/lib/commonjs/components/ListRow.js.map +1 -0
- package/lib/commonjs/components/Menu.js +183 -0
- package/lib/commonjs/components/Menu.js.map +1 -0
- package/lib/commonjs/components/MessageBubble.js +117 -0
- package/lib/commonjs/components/MessageBubble.js.map +1 -0
- package/lib/commonjs/components/MessageComposer.js +212 -0
- package/lib/commonjs/components/MessageComposer.js.map +1 -0
- package/lib/commonjs/components/MetaphorWidget.js +1053 -0
- package/lib/commonjs/components/MetaphorWidget.js.map +1 -0
- package/lib/commonjs/components/Meter.js +173 -0
- package/lib/commonjs/components/Meter.js.map +1 -0
- package/lib/commonjs/components/MetricTile.js +268 -0
- package/lib/commonjs/components/MetricTile.js.map +1 -0
- package/lib/commonjs/components/MiniRing.js +30 -0
- package/lib/commonjs/components/MiniRing.js.map +1 -0
- package/lib/commonjs/components/Modal.js +153 -0
- package/lib/commonjs/components/Modal.js.map +1 -0
- package/lib/commonjs/components/MuscleDiagram.js +326 -0
- package/lib/commonjs/components/MuscleDiagram.js.map +1 -0
- package/lib/commonjs/components/NoteField.js +73 -0
- package/lib/commonjs/components/NoteField.js.map +1 -0
- package/lib/commonjs/components/NotificationRow.js +234 -0
- package/lib/commonjs/components/NotificationRow.js.map +1 -0
- package/lib/commonjs/components/Pagination.js +212 -0
- package/lib/commonjs/components/Pagination.js.map +1 -0
- package/lib/commonjs/components/PasswordInput.js +120 -0
- package/lib/commonjs/components/PasswordInput.js.map +1 -0
- package/lib/commonjs/components/PasswordStrengthMeter.js +108 -0
- package/lib/commonjs/components/PasswordStrengthMeter.js.map +1 -0
- package/lib/commonjs/components/PendingPatternCard.js +182 -0
- package/lib/commonjs/components/PendingPatternCard.js.map +1 -0
- package/lib/commonjs/components/PhaseWheel.js +704 -0
- package/lib/commonjs/components/PhaseWheel.js.map +1 -0
- package/lib/commonjs/components/PkChart.js +566 -0
- package/lib/commonjs/components/PkChart.js.map +1 -0
- package/lib/commonjs/components/Popover.js +234 -0
- package/lib/commonjs/components/Popover.js.map +1 -0
- package/lib/commonjs/components/PrBadge.js +71 -0
- package/lib/commonjs/components/PrBadge.js.map +1 -0
- package/lib/commonjs/components/PrCard.js +150 -0
- package/lib/commonjs/components/PrCard.js.map +1 -0
- package/lib/commonjs/components/PricingTierCard.js +237 -0
- package/lib/commonjs/components/PricingTierCard.js.map +1 -0
- package/lib/commonjs/components/ProGate.js +235 -0
- package/lib/commonjs/components/ProGate.js.map +1 -0
- package/lib/commonjs/components/ProgressBar.js +515 -0
- package/lib/commonjs/components/ProgressBar.js.map +1 -0
- package/lib/commonjs/components/Pulse.js +36 -0
- package/lib/commonjs/components/Pulse.js.map +1 -0
- package/lib/commonjs/components/QRCode.js +519 -0
- package/lib/commonjs/components/QRCode.js.map +1 -0
- package/lib/commonjs/components/RadarChart.js +492 -0
- package/lib/commonjs/components/RadarChart.js.map +1 -0
- package/lib/commonjs/components/RangeBar.js +191 -0
- package/lib/commonjs/components/RangeBar.js.map +1 -0
- package/lib/commonjs/components/ReauthDialog.js +261 -0
- package/lib/commonjs/components/ReauthDialog.js.map +1 -0
- package/lib/commonjs/components/RestTimer.js +246 -0
- package/lib/commonjs/components/RestTimer.js.map +1 -0
- package/lib/commonjs/components/RichText.js +81 -0
- package/lib/commonjs/components/RichText.js.map +1 -0
- package/lib/commonjs/components/RichTextEditor.js +274 -0
- package/lib/commonjs/components/RichTextEditor.js.map +1 -0
- package/lib/commonjs/components/Ring.js +239 -0
- package/lib/commonjs/components/Ring.js.map +1 -0
- package/lib/commonjs/components/RoseChart.js +376 -0
- package/lib/commonjs/components/RoseChart.js.map +1 -0
- package/lib/commonjs/components/SankeyChart.js +652 -0
- package/lib/commonjs/components/SankeyChart.js.map +1 -0
- package/lib/commonjs/components/ScatterChart.js +432 -0
- package/lib/commonjs/components/ScatterChart.js.map +1 -0
- package/lib/commonjs/components/ScrollProgress.js +66 -0
- package/lib/commonjs/components/ScrollProgress.js.map +1 -0
- package/lib/commonjs/components/SectionDivider.js +59 -0
- package/lib/commonjs/components/SectionDivider.js.map +1 -0
- package/lib/commonjs/components/SectionHeader.js +53 -0
- package/lib/commonjs/components/SectionHeader.js.map +1 -0
- package/lib/commonjs/components/SegmentedTabs.js +336 -0
- package/lib/commonjs/components/SegmentedTabs.js.map +1 -0
- package/lib/commonjs/components/Select.js +380 -0
- package/lib/commonjs/components/Select.js.map +1 -0
- package/lib/commonjs/components/SessionBanner.js +220 -0
- package/lib/commonjs/components/SessionBanner.js.map +1 -0
- package/lib/commonjs/components/SessionChart.js +1046 -0
- package/lib/commonjs/components/SessionChart.js.map +1 -0
- package/lib/commonjs/components/SetTable.js +351 -0
- package/lib/commonjs/components/SetTable.js.map +1 -0
- package/lib/commonjs/components/ShareCard.js +227 -0
- package/lib/commonjs/components/ShareCard.js.map +1 -0
- package/lib/commonjs/components/Sheet.js +220 -0
- package/lib/commonjs/components/Sheet.js.map +1 -0
- package/lib/commonjs/components/Skeleton.js +28 -0
- package/lib/commonjs/components/Skeleton.js.map +1 -0
- package/lib/commonjs/components/Slider.js +173 -0
- package/lib/commonjs/components/Slider.js.map +1 -0
- package/lib/commonjs/components/Sortable.js +230 -0
- package/lib/commonjs/components/Sortable.js.map +1 -0
- package/lib/commonjs/components/SourceChip.js +111 -0
- package/lib/commonjs/components/SourceChip.js.map +1 -0
- package/lib/commonjs/components/Sparkline.js +110 -0
- package/lib/commonjs/components/Sparkline.js.map +1 -0
- package/lib/commonjs/components/Spinner.js +132 -0
- package/lib/commonjs/components/Spinner.js.map +1 -0
- package/lib/commonjs/components/SplitButton.js +158 -0
- package/lib/commonjs/components/SplitButton.js.map +1 -0
- package/lib/commonjs/components/SsoButton.js +109 -0
- package/lib/commonjs/components/SsoButton.js.map +1 -0
- package/lib/commonjs/components/StackedBar.js +133 -0
- package/lib/commonjs/components/StackedBar.js.map +1 -0
- package/lib/commonjs/components/Stat.js +167 -0
- package/lib/commonjs/components/Stat.js.map +1 -0
- package/lib/commonjs/components/StatTile.js +644 -0
- package/lib/commonjs/components/StatTile.js.map +1 -0
- package/lib/commonjs/components/StateLabel.js +73 -0
- package/lib/commonjs/components/StateLabel.js.map +1 -0
- package/lib/commonjs/components/StatusDot.js +65 -0
- package/lib/commonjs/components/StatusDot.js.map +1 -0
- package/lib/commonjs/components/Stepper.js +355 -0
- package/lib/commonjs/components/Stepper.js.map +1 -0
- package/lib/commonjs/components/SupplementChart.js +1002 -0
- package/lib/commonjs/components/SupplementChart.js.map +1 -0
- package/lib/commonjs/components/TabBar.js +303 -0
- package/lib/commonjs/components/TabBar.js.map +1 -0
- package/lib/commonjs/components/Table.js +458 -0
- package/lib/commonjs/components/Table.js.map +1 -0
- package/lib/commonjs/components/Tabs.js +88 -0
- package/lib/commonjs/components/Tabs.js.map +1 -0
- package/lib/commonjs/components/TagCloud.js +118 -0
- package/lib/commonjs/components/TagCloud.js.map +1 -0
- package/lib/commonjs/components/TagInput.js +298 -0
- package/lib/commonjs/components/TagInput.js.map +1 -0
- package/lib/commonjs/components/TemplateCard.js +206 -0
- package/lib/commonjs/components/TemplateCard.js.map +1 -0
- package/lib/commonjs/components/Timeline.js +219 -0
- package/lib/commonjs/components/Timeline.js.map +1 -0
- package/lib/commonjs/components/TimelineChart.js +1228 -0
- package/lib/commonjs/components/TimelineChart.js.map +1 -0
- package/lib/commonjs/components/Toast.js +156 -0
- package/lib/commonjs/components/Toast.js.map +1 -0
- package/lib/commonjs/components/Toggle.js +166 -0
- package/lib/commonjs/components/Toggle.js.map +1 -0
- package/lib/commonjs/components/Toolbar.js +310 -0
- package/lib/commonjs/components/Toolbar.js.map +1 -0
- package/lib/commonjs/components/Tooltip.js +245 -0
- package/lib/commonjs/components/Tooltip.js.map +1 -0
- package/lib/commonjs/components/TypingIndicator.js +112 -0
- package/lib/commonjs/components/TypingIndicator.js.map +1 -0
- package/lib/commonjs/components/UnitChart.js +482 -0
- package/lib/commonjs/components/UnitChart.js.map +1 -0
- package/lib/commonjs/components/VersionBadge.js +133 -0
- package/lib/commonjs/components/VersionBadge.js.map +1 -0
- package/lib/commonjs/components/VideoThumbnail.js +152 -0
- package/lib/commonjs/components/VideoThumbnail.js.map +1 -0
- package/lib/commonjs/components/VitalsStrip.js +766 -0
- package/lib/commonjs/components/VitalsStrip.js.map +1 -0
- package/lib/commonjs/components/WatchComplication.js +563 -0
- package/lib/commonjs/components/WatchComplication.js.map +1 -0
- package/lib/commonjs/components/ZoneBar.js +149 -0
- package/lib/commonjs/components/ZoneBar.js.map +1 -0
- package/lib/commonjs/components/ZonePyramid.js +398 -0
- package/lib/commonjs/components/ZonePyramid.js.map +1 -0
- package/lib/commonjs/index.js +1140 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/internal/optionalBlur.js +34 -0
- package/lib/commonjs/internal/optionalBlur.js.map +1 -0
- package/lib/commonjs/internal/optionalHaptics.js +40 -0
- package/lib/commonjs/internal/optionalHaptics.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theme.js +73 -0
- package/lib/commonjs/theme.js.map +1 -0
- package/lib/module/components/Accordion.js +139 -0
- package/lib/module/components/Accordion.js.map +1 -0
- package/lib/module/components/AchievementBadge.js +223 -0
- package/lib/module/components/AchievementBadge.js.map +1 -0
- package/lib/module/components/Alert.js +227 -0
- package/lib/module/components/Alert.js.map +1 -0
- package/lib/module/components/AreaChart.js +501 -0
- package/lib/module/components/AreaChart.js.map +1 -0
- package/lib/module/components/AuroraBackground.js +262 -0
- package/lib/module/components/AuroraBackground.js.map +1 -0
- package/lib/module/components/Avatar.js +183 -0
- package/lib/module/components/Avatar.js.map +1 -0
- package/lib/module/components/AvatarStack.js +91 -0
- package/lib/module/components/AvatarStack.js.map +1 -0
- package/lib/module/components/BackLink.js +73 -0
- package/lib/module/components/BackLink.js.map +1 -0
- package/lib/module/components/Badge.js +132 -0
- package/lib/module/components/Badge.js.map +1 -0
- package/lib/module/components/BarChart.js +636 -0
- package/lib/module/components/BarChart.js.map +1 -0
- package/lib/module/components/BarFill.js +51 -0
- package/lib/module/components/BarFill.js.map +1 -0
- package/lib/module/components/BeeswarmChart.js +610 -0
- package/lib/module/components/BeeswarmChart.js.map +1 -0
- package/lib/module/components/BiomarkerRange.js +605 -0
- package/lib/module/components/BiomarkerRange.js.map +1 -0
- package/lib/module/components/BodyBattery.js +558 -0
- package/lib/module/components/BodyBattery.js.map +1 -0
- package/lib/module/components/BrandMark.js +179 -0
- package/lib/module/components/BrandMark.js.map +1 -0
- package/lib/module/components/BulletChart.js +401 -0
- package/lib/module/components/BulletChart.js.map +1 -0
- package/lib/module/components/Button.js +150 -0
- package/lib/module/components/Button.js.map +1 -0
- package/lib/module/components/CaffeineClock.js +486 -0
- package/lib/module/components/CaffeineClock.js.map +1 -0
- package/lib/module/components/Card.js +138 -0
- package/lib/module/components/Card.js.map +1 -0
- package/lib/module/components/CharCounter.js +102 -0
- package/lib/module/components/CharCounter.js.map +1 -0
- package/lib/module/components/ChartState.js +549 -0
- package/lib/module/components/ChartState.js.map +1 -0
- package/lib/module/components/Checkbox.js +175 -0
- package/lib/module/components/Checkbox.js.map +1 -0
- package/lib/module/components/Chip.js +214 -0
- package/lib/module/components/Chip.js.map +1 -0
- package/lib/module/components/ChoiceChip.js +129 -0
- package/lib/module/components/ChoiceChip.js.map +1 -0
- package/lib/module/components/CodeBlock.js +122 -0
- package/lib/module/components/CodeBlock.js.map +1 -0
- package/lib/module/components/CodeField.js +125 -0
- package/lib/module/components/CodeField.js.map +1 -0
- package/lib/module/components/ColorPicker.js +177 -0
- package/lib/module/components/ColorPicker.js.map +1 -0
- package/lib/module/components/ComboChart.js +414 -0
- package/lib/module/components/ComboChart.js.map +1 -0
- package/lib/module/components/Combobox.js +104 -0
- package/lib/module/components/Combobox.js.map +1 -0
- package/lib/module/components/CompareChart.js +622 -0
- package/lib/module/components/CompareChart.js.map +1 -0
- package/lib/module/components/CompositeChart.js +649 -0
- package/lib/module/components/CompositeChart.js.map +1 -0
- package/lib/module/components/Countdown.js +148 -0
- package/lib/module/components/Countdown.js.map +1 -0
- package/lib/module/components/CreditCardVisual.js +163 -0
- package/lib/module/components/CreditCardVisual.js.map +1 -0
- package/lib/module/components/DateField.js +361 -0
- package/lib/module/components/DateField.js.map +1 -0
- package/lib/module/components/DayTimelineBlocks.js +249 -0
- package/lib/module/components/DayTimelineBlocks.js.map +1 -0
- package/lib/module/components/DayWheel.js +462 -0
- package/lib/module/components/DayWheel.js.map +1 -0
- package/lib/module/components/DeltaPill.js +149 -0
- package/lib/module/components/DeltaPill.js.map +1 -0
- package/lib/module/components/DistributionChart.js +771 -0
- package/lib/module/components/DistributionChart.js.map +1 -0
- package/lib/module/components/Divider.js +70 -0
- package/lib/module/components/Divider.js.map +1 -0
- package/lib/module/components/DonutChart.js +332 -0
- package/lib/module/components/DonutChart.js.map +1 -0
- package/lib/module/components/DotsLoader.js +90 -0
- package/lib/module/components/DotsLoader.js.map +1 -0
- package/lib/module/components/EffectAttributionLine.js +101 -0
- package/lib/module/components/EffectAttributionLine.js.map +1 -0
- package/lib/module/components/EmptyState.js +115 -0
- package/lib/module/components/EmptyState.js.map +1 -0
- package/lib/module/components/EngagementBar.js +118 -0
- package/lib/module/components/EngagementBar.js.map +1 -0
- package/lib/module/components/EnvironmentChart.js +568 -0
- package/lib/module/components/EnvironmentChart.js.map +1 -0
- package/lib/module/components/Eyebrow.js +28 -0
- package/lib/module/components/Eyebrow.js.map +1 -0
- package/lib/module/components/FocalPointPicker.js +192 -0
- package/lib/module/components/FocalPointPicker.js.map +1 -0
- package/lib/module/components/FollowButton.js +91 -0
- package/lib/module/components/FollowButton.js.map +1 -0
- package/lib/module/components/ForecastCallout.js +112 -0
- package/lib/module/components/ForecastCallout.js.map +1 -0
- package/lib/module/components/FormField.js +198 -0
- package/lib/module/components/FormField.js.map +1 -0
- package/lib/module/components/FunnelChart.js +255 -0
- package/lib/module/components/FunnelChart.js.map +1 -0
- package/lib/module/components/Gauge.js +249 -0
- package/lib/module/components/Gauge.js.map +1 -0
- package/lib/module/components/GradientText.js +130 -0
- package/lib/module/components/GradientText.js.map +1 -0
- package/lib/module/components/Heatmap.js +414 -0
- package/lib/module/components/Heatmap.js.map +1 -0
- package/lib/module/components/Highlight.js +51 -0
- package/lib/module/components/Highlight.js.map +1 -0
- package/lib/module/components/Hypnogram.js +837 -0
- package/lib/module/components/Hypnogram.js.map +1 -0
- package/lib/module/components/Icon.js +480 -0
- package/lib/module/components/Icon.js.map +1 -0
- package/lib/module/components/Input.js +138 -0
- package/lib/module/components/Input.js.map +1 -0
- package/lib/module/components/InsightCard.js +115 -0
- package/lib/module/components/InsightCard.js.map +1 -0
- package/lib/module/components/KeyValue.js +89 -0
- package/lib/module/components/KeyValue.js.map +1 -0
- package/lib/module/components/LeaderboardRow.js +136 -0
- package/lib/module/components/LeaderboardRow.js.map +1 -0
- package/lib/module/components/LineChart.js +1539 -0
- package/lib/module/components/LineChart.js.map +1 -0
- package/lib/module/components/ListRow.js +118 -0
- package/lib/module/components/ListRow.js.map +1 -0
- package/lib/module/components/Menu.js +179 -0
- package/lib/module/components/Menu.js.map +1 -0
- package/lib/module/components/MessageBubble.js +113 -0
- package/lib/module/components/MessageBubble.js.map +1 -0
- package/lib/module/components/MessageComposer.js +208 -0
- package/lib/module/components/MessageComposer.js.map +1 -0
- package/lib/module/components/MetaphorWidget.js +1048 -0
- package/lib/module/components/MetaphorWidget.js.map +1 -0
- package/lib/module/components/Meter.js +169 -0
- package/lib/module/components/Meter.js.map +1 -0
- package/lib/module/components/MetricTile.js +263 -0
- package/lib/module/components/MetricTile.js.map +1 -0
- package/lib/module/components/MiniRing.js +26 -0
- package/lib/module/components/MiniRing.js.map +1 -0
- package/lib/module/components/Modal.js +148 -0
- package/lib/module/components/Modal.js.map +1 -0
- package/lib/module/components/MuscleDiagram.js +321 -0
- package/lib/module/components/MuscleDiagram.js.map +1 -0
- package/lib/module/components/NoteField.js +69 -0
- package/lib/module/components/NoteField.js.map +1 -0
- package/lib/module/components/NotificationRow.js +230 -0
- package/lib/module/components/NotificationRow.js.map +1 -0
- package/lib/module/components/Pagination.js +207 -0
- package/lib/module/components/Pagination.js.map +1 -0
- package/lib/module/components/PasswordInput.js +116 -0
- package/lib/module/components/PasswordInput.js.map +1 -0
- package/lib/module/components/PasswordStrengthMeter.js +104 -0
- package/lib/module/components/PasswordStrengthMeter.js.map +1 -0
- package/lib/module/components/PendingPatternCard.js +178 -0
- package/lib/module/components/PendingPatternCard.js.map +1 -0
- package/lib/module/components/PhaseWheel.js +699 -0
- package/lib/module/components/PhaseWheel.js.map +1 -0
- package/lib/module/components/PkChart.js +558 -0
- package/lib/module/components/PkChart.js.map +1 -0
- package/lib/module/components/Popover.js +230 -0
- package/lib/module/components/Popover.js.map +1 -0
- package/lib/module/components/PrBadge.js +66 -0
- package/lib/module/components/PrBadge.js.map +1 -0
- package/lib/module/components/PrCard.js +146 -0
- package/lib/module/components/PrCard.js.map +1 -0
- package/lib/module/components/PricingTierCard.js +233 -0
- package/lib/module/components/PricingTierCard.js.map +1 -0
- package/lib/module/components/ProGate.js +229 -0
- package/lib/module/components/ProGate.js.map +1 -0
- package/lib/module/components/ProgressBar.js +511 -0
- package/lib/module/components/ProgressBar.js.map +1 -0
- package/lib/module/components/Pulse.js +32 -0
- package/lib/module/components/Pulse.js.map +1 -0
- package/lib/module/components/QRCode.js +514 -0
- package/lib/module/components/QRCode.js.map +1 -0
- package/lib/module/components/RadarChart.js +487 -0
- package/lib/module/components/RadarChart.js.map +1 -0
- package/lib/module/components/RangeBar.js +187 -0
- package/lib/module/components/RangeBar.js.map +1 -0
- package/lib/module/components/ReauthDialog.js +256 -0
- package/lib/module/components/ReauthDialog.js.map +1 -0
- package/lib/module/components/RestTimer.js +239 -0
- package/lib/module/components/RestTimer.js.map +1 -0
- package/lib/module/components/RichText.js +77 -0
- package/lib/module/components/RichText.js.map +1 -0
- package/lib/module/components/RichTextEditor.js +269 -0
- package/lib/module/components/RichTextEditor.js.map +1 -0
- package/lib/module/components/Ring.js +236 -0
- package/lib/module/components/Ring.js.map +1 -0
- package/lib/module/components/RoseChart.js +371 -0
- package/lib/module/components/RoseChart.js.map +1 -0
- package/lib/module/components/SankeyChart.js +647 -0
- package/lib/module/components/SankeyChart.js.map +1 -0
- package/lib/module/components/ScatterChart.js +427 -0
- package/lib/module/components/ScatterChart.js.map +1 -0
- package/lib/module/components/ScrollProgress.js +62 -0
- package/lib/module/components/ScrollProgress.js.map +1 -0
- package/lib/module/components/SectionDivider.js +55 -0
- package/lib/module/components/SectionDivider.js.map +1 -0
- package/lib/module/components/SectionHeader.js +49 -0
- package/lib/module/components/SectionHeader.js.map +1 -0
- package/lib/module/components/SegmentedTabs.js +332 -0
- package/lib/module/components/SegmentedTabs.js.map +1 -0
- package/lib/module/components/Select.js +375 -0
- package/lib/module/components/Select.js.map +1 -0
- package/lib/module/components/SessionBanner.js +216 -0
- package/lib/module/components/SessionBanner.js.map +1 -0
- package/lib/module/components/SessionChart.js +1040 -0
- package/lib/module/components/SessionChart.js.map +1 -0
- package/lib/module/components/SetTable.js +345 -0
- package/lib/module/components/SetTable.js.map +1 -0
- package/lib/module/components/ShareCard.js +223 -0
- package/lib/module/components/ShareCard.js.map +1 -0
- package/lib/module/components/Sheet.js +216 -0
- package/lib/module/components/Sheet.js.map +1 -0
- package/lib/module/components/Skeleton.js +24 -0
- package/lib/module/components/Skeleton.js.map +1 -0
- package/lib/module/components/Slider.js +169 -0
- package/lib/module/components/Slider.js.map +1 -0
- package/lib/module/components/Sortable.js +226 -0
- package/lib/module/components/Sortable.js.map +1 -0
- package/lib/module/components/SourceChip.js +107 -0
- package/lib/module/components/SourceChip.js.map +1 -0
- package/lib/module/components/Sparkline.js +105 -0
- package/lib/module/components/Sparkline.js.map +1 -0
- package/lib/module/components/Spinner.js +127 -0
- package/lib/module/components/Spinner.js.map +1 -0
- package/lib/module/components/SplitButton.js +154 -0
- package/lib/module/components/SplitButton.js.map +1 -0
- package/lib/module/components/SsoButton.js +104 -0
- package/lib/module/components/SsoButton.js.map +1 -0
- package/lib/module/components/StackedBar.js +129 -0
- package/lib/module/components/StackedBar.js.map +1 -0
- package/lib/module/components/Stat.js +163 -0
- package/lib/module/components/Stat.js.map +1 -0
- package/lib/module/components/StatTile.js +639 -0
- package/lib/module/components/StatTile.js.map +1 -0
- package/lib/module/components/StateLabel.js +69 -0
- package/lib/module/components/StateLabel.js.map +1 -0
- package/lib/module/components/StatusDot.js +61 -0
- package/lib/module/components/StatusDot.js.map +1 -0
- package/lib/module/components/Stepper.js +350 -0
- package/lib/module/components/Stepper.js.map +1 -0
- package/lib/module/components/SupplementChart.js +997 -0
- package/lib/module/components/SupplementChart.js.map +1 -0
- package/lib/module/components/TabBar.js +298 -0
- package/lib/module/components/TabBar.js.map +1 -0
- package/lib/module/components/Table.js +452 -0
- package/lib/module/components/Table.js.map +1 -0
- package/lib/module/components/Tabs.js +84 -0
- package/lib/module/components/Tabs.js.map +1 -0
- package/lib/module/components/TagCloud.js +113 -0
- package/lib/module/components/TagCloud.js.map +1 -0
- package/lib/module/components/TagInput.js +291 -0
- package/lib/module/components/TagInput.js.map +1 -0
- package/lib/module/components/TemplateCard.js +202 -0
- package/lib/module/components/TemplateCard.js.map +1 -0
- package/lib/module/components/Timeline.js +214 -0
- package/lib/module/components/Timeline.js.map +1 -0
- package/lib/module/components/TimelineChart.js +1223 -0
- package/lib/module/components/TimelineChart.js.map +1 -0
- package/lib/module/components/Toast.js +151 -0
- package/lib/module/components/Toast.js.map +1 -0
- package/lib/module/components/Toggle.js +162 -0
- package/lib/module/components/Toggle.js.map +1 -0
- package/lib/module/components/Toolbar.js +306 -0
- package/lib/module/components/Toolbar.js.map +1 -0
- package/lib/module/components/Tooltip.js +241 -0
- package/lib/module/components/Tooltip.js.map +1 -0
- package/lib/module/components/TypingIndicator.js +108 -0
- package/lib/module/components/TypingIndicator.js.map +1 -0
- package/lib/module/components/UnitChart.js +477 -0
- package/lib/module/components/UnitChart.js.map +1 -0
- package/lib/module/components/VersionBadge.js +129 -0
- package/lib/module/components/VersionBadge.js.map +1 -0
- package/lib/module/components/VideoThumbnail.js +147 -0
- package/lib/module/components/VideoThumbnail.js.map +1 -0
- package/lib/module/components/VitalsStrip.js +761 -0
- package/lib/module/components/VitalsStrip.js.map +1 -0
- package/lib/module/components/WatchComplication.js +558 -0
- package/lib/module/components/WatchComplication.js.map +1 -0
- package/lib/module/components/ZoneBar.js +145 -0
- package/lib/module/components/ZoneBar.js.map +1 -0
- package/lib/module/components/ZonePyramid.js +393 -0
- package/lib/module/components/ZonePyramid.js.map +1 -0
- package/lib/module/index.js +166 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internal/optionalBlur.js +30 -0
- package/lib/module/internal/optionalBlur.js.map +1 -0
- package/lib/module/internal/optionalHaptics.js +34 -0
- package/lib/module/internal/optionalHaptics.js.map +1 -0
- package/lib/module/theme.js +6 -0
- package/lib/module/theme.js.map +1 -0
- package/lib/typescript/components/Accordion.d.ts +20 -0
- package/lib/typescript/components/Accordion.d.ts.map +1 -0
- package/lib/typescript/components/AchievementBadge.d.ts +29 -0
- package/lib/typescript/components/AchievementBadge.d.ts.map +1 -0
- package/lib/typescript/components/Alert.d.ts +18 -0
- package/lib/typescript/components/Alert.d.ts.map +1 -0
- package/lib/typescript/components/AreaChart.d.ts +58 -0
- package/lib/typescript/components/AreaChart.d.ts.map +1 -0
- package/lib/typescript/components/AuroraBackground.d.ts +24 -0
- package/lib/typescript/components/AuroraBackground.d.ts.map +1 -0
- package/lib/typescript/components/Avatar.d.ts +38 -0
- package/lib/typescript/components/Avatar.d.ts.map +1 -0
- package/lib/typescript/components/AvatarStack.d.ts +26 -0
- package/lib/typescript/components/AvatarStack.d.ts.map +1 -0
- package/lib/typescript/components/BackLink.d.ts +20 -0
- package/lib/typescript/components/BackLink.d.ts.map +1 -0
- package/lib/typescript/components/Badge.d.ts +12 -0
- package/lib/typescript/components/Badge.d.ts.map +1 -0
- package/lib/typescript/components/BarChart.d.ts +83 -0
- package/lib/typescript/components/BarChart.d.ts.map +1 -0
- package/lib/typescript/components/BarFill.d.ts +15 -0
- package/lib/typescript/components/BarFill.d.ts.map +1 -0
- package/lib/typescript/components/BeeswarmChart.d.ts +71 -0
- package/lib/typescript/components/BeeswarmChart.d.ts.map +1 -0
- package/lib/typescript/components/BiomarkerRange.d.ts +64 -0
- package/lib/typescript/components/BiomarkerRange.d.ts.map +1 -0
- package/lib/typescript/components/BodyBattery.d.ts +70 -0
- package/lib/typescript/components/BodyBattery.d.ts.map +1 -0
- package/lib/typescript/components/BrandMark.d.ts +10 -0
- package/lib/typescript/components/BrandMark.d.ts.map +1 -0
- package/lib/typescript/components/BulletChart.d.ts +61 -0
- package/lib/typescript/components/BulletChart.d.ts.map +1 -0
- package/lib/typescript/components/Button.d.ts +27 -0
- package/lib/typescript/components/Button.d.ts.map +1 -0
- package/lib/typescript/components/CaffeineClock.d.ts +64 -0
- package/lib/typescript/components/CaffeineClock.d.ts.map +1 -0
- package/lib/typescript/components/Card.d.ts +23 -0
- package/lib/typescript/components/Card.d.ts.map +1 -0
- package/lib/typescript/components/CharCounter.d.ts +30 -0
- package/lib/typescript/components/CharCounter.d.ts.map +1 -0
- package/lib/typescript/components/ChartState.d.ts +58 -0
- package/lib/typescript/components/ChartState.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox.d.ts +44 -0
- package/lib/typescript/components/Checkbox.d.ts.map +1 -0
- package/lib/typescript/components/Chip.d.ts +17 -0
- package/lib/typescript/components/Chip.d.ts.map +1 -0
- package/lib/typescript/components/ChoiceChip.d.ts +31 -0
- package/lib/typescript/components/ChoiceChip.d.ts.map +1 -0
- package/lib/typescript/components/CodeBlock.d.ts +18 -0
- package/lib/typescript/components/CodeBlock.d.ts.map +1 -0
- package/lib/typescript/components/CodeField.d.ts +22 -0
- package/lib/typescript/components/CodeField.d.ts.map +1 -0
- package/lib/typescript/components/ColorPicker.d.ts +20 -0
- package/lib/typescript/components/ColorPicker.d.ts.map +1 -0
- package/lib/typescript/components/ComboChart.d.ts +56 -0
- package/lib/typescript/components/ComboChart.d.ts.map +1 -0
- package/lib/typescript/components/Combobox.d.ts +39 -0
- package/lib/typescript/components/Combobox.d.ts.map +1 -0
- package/lib/typescript/components/CompareChart.d.ts +80 -0
- package/lib/typescript/components/CompareChart.d.ts.map +1 -0
- package/lib/typescript/components/CompositeChart.d.ts +83 -0
- package/lib/typescript/components/CompositeChart.d.ts.map +1 -0
- package/lib/typescript/components/Countdown.d.ts +28 -0
- package/lib/typescript/components/Countdown.d.ts.map +1 -0
- package/lib/typescript/components/CreditCardVisual.d.ts +26 -0
- package/lib/typescript/components/CreditCardVisual.d.ts.map +1 -0
- package/lib/typescript/components/DateField.d.ts +39 -0
- package/lib/typescript/components/DateField.d.ts.map +1 -0
- package/lib/typescript/components/DayTimelineBlocks.d.ts +40 -0
- package/lib/typescript/components/DayTimelineBlocks.d.ts.map +1 -0
- package/lib/typescript/components/DayWheel.d.ts +70 -0
- package/lib/typescript/components/DayWheel.d.ts.map +1 -0
- package/lib/typescript/components/DeltaPill.d.ts +22 -0
- package/lib/typescript/components/DeltaPill.d.ts.map +1 -0
- package/lib/typescript/components/DistributionChart.d.ts +94 -0
- package/lib/typescript/components/DistributionChart.d.ts.map +1 -0
- package/lib/typescript/components/Divider.d.ts +16 -0
- package/lib/typescript/components/Divider.d.ts.map +1 -0
- package/lib/typescript/components/DonutChart.d.ts +70 -0
- package/lib/typescript/components/DonutChart.d.ts.map +1 -0
- package/lib/typescript/components/DotsLoader.d.ts +19 -0
- package/lib/typescript/components/DotsLoader.d.ts.map +1 -0
- package/lib/typescript/components/EffectAttributionLine.d.ts +24 -0
- package/lib/typescript/components/EffectAttributionLine.d.ts.map +1 -0
- package/lib/typescript/components/EmptyState.d.ts +17 -0
- package/lib/typescript/components/EmptyState.d.ts.map +1 -0
- package/lib/typescript/components/EngagementBar.d.ts +23 -0
- package/lib/typescript/components/EngagementBar.d.ts.map +1 -0
- package/lib/typescript/components/EnvironmentChart.d.ts +89 -0
- package/lib/typescript/components/EnvironmentChart.d.ts.map +1 -0
- package/lib/typescript/components/Eyebrow.d.ts +7 -0
- package/lib/typescript/components/Eyebrow.d.ts.map +1 -0
- package/lib/typescript/components/FocalPointPicker.d.ts +31 -0
- package/lib/typescript/components/FocalPointPicker.d.ts.map +1 -0
- package/lib/typescript/components/FollowButton.d.ts +21 -0
- package/lib/typescript/components/FollowButton.d.ts.map +1 -0
- package/lib/typescript/components/ForecastCallout.d.ts +21 -0
- package/lib/typescript/components/ForecastCallout.d.ts.map +1 -0
- package/lib/typescript/components/FormField.d.ts +32 -0
- package/lib/typescript/components/FormField.d.ts.map +1 -0
- package/lib/typescript/components/FunnelChart.d.ts +46 -0
- package/lib/typescript/components/FunnelChart.d.ts.map +1 -0
- package/lib/typescript/components/Gauge.d.ts +70 -0
- package/lib/typescript/components/Gauge.d.ts.map +1 -0
- package/lib/typescript/components/GradientText.d.ts +21 -0
- package/lib/typescript/components/GradientText.d.ts.map +1 -0
- package/lib/typescript/components/Heatmap.d.ts +87 -0
- package/lib/typescript/components/Heatmap.d.ts.map +1 -0
- package/lib/typescript/components/Highlight.d.ts +11 -0
- package/lib/typescript/components/Highlight.d.ts.map +1 -0
- package/lib/typescript/components/Hypnogram.d.ts +94 -0
- package/lib/typescript/components/Hypnogram.d.ts.map +1 -0
- package/lib/typescript/components/Icon.d.ts +30 -0
- package/lib/typescript/components/Icon.d.ts.map +1 -0
- package/lib/typescript/components/Input.d.ts +25 -0
- package/lib/typescript/components/Input.d.ts.map +1 -0
- package/lib/typescript/components/InsightCard.d.ts +37 -0
- package/lib/typescript/components/InsightCard.d.ts.map +1 -0
- package/lib/typescript/components/KeyValue.d.ts +18 -0
- package/lib/typescript/components/KeyValue.d.ts.map +1 -0
- package/lib/typescript/components/LeaderboardRow.d.ts +31 -0
- package/lib/typescript/components/LeaderboardRow.d.ts.map +1 -0
- package/lib/typescript/components/LineChart.d.ts +166 -0
- package/lib/typescript/components/LineChart.d.ts.map +1 -0
- package/lib/typescript/components/ListRow.d.ts +37 -0
- package/lib/typescript/components/ListRow.d.ts.map +1 -0
- package/lib/typescript/components/Menu.d.ts +28 -0
- package/lib/typescript/components/Menu.d.ts.map +1 -0
- package/lib/typescript/components/MessageBubble.d.ts +20 -0
- package/lib/typescript/components/MessageBubble.d.ts.map +1 -0
- package/lib/typescript/components/MessageComposer.d.ts +20 -0
- package/lib/typescript/components/MessageComposer.d.ts.map +1 -0
- package/lib/typescript/components/MetaphorWidget.d.ts +107 -0
- package/lib/typescript/components/MetaphorWidget.d.ts.map +1 -0
- package/lib/typescript/components/Meter.d.ts +34 -0
- package/lib/typescript/components/Meter.d.ts.map +1 -0
- package/lib/typescript/components/MetricTile.d.ts +43 -0
- package/lib/typescript/components/MetricTile.d.ts.map +1 -0
- package/lib/typescript/components/MiniRing.d.ts +9 -0
- package/lib/typescript/components/MiniRing.d.ts.map +1 -0
- package/lib/typescript/components/Modal.d.ts +19 -0
- package/lib/typescript/components/Modal.d.ts.map +1 -0
- package/lib/typescript/components/MuscleDiagram.d.ts +37 -0
- package/lib/typescript/components/MuscleDiagram.d.ts.map +1 -0
- package/lib/typescript/components/NoteField.d.ts +9 -0
- package/lib/typescript/components/NoteField.d.ts.map +1 -0
- package/lib/typescript/components/NotificationRow.d.ts +36 -0
- package/lib/typescript/components/NotificationRow.d.ts.map +1 -0
- package/lib/typescript/components/Pagination.d.ts +22 -0
- package/lib/typescript/components/Pagination.d.ts.map +1 -0
- package/lib/typescript/components/PasswordInput.d.ts +24 -0
- package/lib/typescript/components/PasswordInput.d.ts.map +1 -0
- package/lib/typescript/components/PasswordStrengthMeter.d.ts +18 -0
- package/lib/typescript/components/PasswordStrengthMeter.d.ts.map +1 -0
- package/lib/typescript/components/PendingPatternCard.d.ts +27 -0
- package/lib/typescript/components/PendingPatternCard.d.ts.map +1 -0
- package/lib/typescript/components/PhaseWheel.d.ts +103 -0
- package/lib/typescript/components/PhaseWheel.d.ts.map +1 -0
- package/lib/typescript/components/PkChart.d.ts +67 -0
- package/lib/typescript/components/PkChart.d.ts.map +1 -0
- package/lib/typescript/components/Popover.d.ts +27 -0
- package/lib/typescript/components/Popover.d.ts.map +1 -0
- package/lib/typescript/components/PrBadge.d.ts +21 -0
- package/lib/typescript/components/PrBadge.d.ts.map +1 -0
- package/lib/typescript/components/PrCard.d.ts +29 -0
- package/lib/typescript/components/PrCard.d.ts.map +1 -0
- package/lib/typescript/components/PricingTierCard.d.ts +46 -0
- package/lib/typescript/components/PricingTierCard.d.ts.map +1 -0
- package/lib/typescript/components/ProGate.d.ts +26 -0
- package/lib/typescript/components/ProGate.d.ts.map +1 -0
- package/lib/typescript/components/ProgressBar.d.ts +60 -0
- package/lib/typescript/components/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/components/Pulse.d.ts +8 -0
- package/lib/typescript/components/Pulse.d.ts.map +1 -0
- package/lib/typescript/components/QRCode.d.ts +17 -0
- package/lib/typescript/components/QRCode.d.ts.map +1 -0
- package/lib/typescript/components/RadarChart.d.ts +59 -0
- package/lib/typescript/components/RadarChart.d.ts.map +1 -0
- package/lib/typescript/components/RangeBar.d.ts +38 -0
- package/lib/typescript/components/RangeBar.d.ts.map +1 -0
- package/lib/typescript/components/ReauthDialog.d.ts +44 -0
- package/lib/typescript/components/ReauthDialog.d.ts.map +1 -0
- package/lib/typescript/components/RestTimer.d.ts +45 -0
- package/lib/typescript/components/RestTimer.d.ts.map +1 -0
- package/lib/typescript/components/RichText.d.ts +26 -0
- package/lib/typescript/components/RichText.d.ts.map +1 -0
- package/lib/typescript/components/RichTextEditor.d.ts +25 -0
- package/lib/typescript/components/RichTextEditor.d.ts.map +1 -0
- package/lib/typescript/components/Ring.d.ts +63 -0
- package/lib/typescript/components/Ring.d.ts.map +1 -0
- package/lib/typescript/components/RoseChart.d.ts +54 -0
- package/lib/typescript/components/RoseChart.d.ts.map +1 -0
- package/lib/typescript/components/SankeyChart.d.ts +93 -0
- package/lib/typescript/components/SankeyChart.d.ts.map +1 -0
- package/lib/typescript/components/ScatterChart.d.ts +59 -0
- package/lib/typescript/components/ScatterChart.d.ts.map +1 -0
- package/lib/typescript/components/ScrollProgress.d.ts +24 -0
- package/lib/typescript/components/ScrollProgress.d.ts.map +1 -0
- package/lib/typescript/components/SectionDivider.d.ts +18 -0
- package/lib/typescript/components/SectionDivider.d.ts.map +1 -0
- package/lib/typescript/components/SectionHeader.d.ts +18 -0
- package/lib/typescript/components/SectionHeader.d.ts.map +1 -0
- package/lib/typescript/components/SegmentedTabs.d.ts +85 -0
- package/lib/typescript/components/SegmentedTabs.d.ts.map +1 -0
- package/lib/typescript/components/Select.d.ts +47 -0
- package/lib/typescript/components/Select.d.ts.map +1 -0
- package/lib/typescript/components/SessionBanner.d.ts +45 -0
- package/lib/typescript/components/SessionBanner.d.ts.map +1 -0
- package/lib/typescript/components/SessionChart.d.ts +130 -0
- package/lib/typescript/components/SessionChart.d.ts.map +1 -0
- package/lib/typescript/components/SetTable.d.ts +58 -0
- package/lib/typescript/components/SetTable.d.ts.map +1 -0
- package/lib/typescript/components/ShareCard.d.ts +40 -0
- package/lib/typescript/components/ShareCard.d.ts.map +1 -0
- package/lib/typescript/components/Sheet.d.ts +22 -0
- package/lib/typescript/components/Sheet.d.ts.map +1 -0
- package/lib/typescript/components/Skeleton.d.ts +9 -0
- package/lib/typescript/components/Skeleton.d.ts.map +1 -0
- package/lib/typescript/components/Slider.d.ts +27 -0
- package/lib/typescript/components/Slider.d.ts.map +1 -0
- package/lib/typescript/components/Sortable.d.ts +25 -0
- package/lib/typescript/components/Sortable.d.ts.map +1 -0
- package/lib/typescript/components/SourceChip.d.ts +24 -0
- package/lib/typescript/components/SourceChip.d.ts.map +1 -0
- package/lib/typescript/components/Sparkline.d.ts +28 -0
- package/lib/typescript/components/Sparkline.d.ts.map +1 -0
- package/lib/typescript/components/Spinner.d.ts +23 -0
- package/lib/typescript/components/Spinner.d.ts.map +1 -0
- package/lib/typescript/components/SplitButton.d.ts +21 -0
- package/lib/typescript/components/SplitButton.d.ts.map +1 -0
- package/lib/typescript/components/SsoButton.d.ts +10 -0
- package/lib/typescript/components/SsoButton.d.ts.map +1 -0
- package/lib/typescript/components/StackedBar.d.ts +32 -0
- package/lib/typescript/components/StackedBar.d.ts.map +1 -0
- package/lib/typescript/components/Stat.d.ts +33 -0
- package/lib/typescript/components/Stat.d.ts.map +1 -0
- package/lib/typescript/components/StatTile.d.ts +90 -0
- package/lib/typescript/components/StatTile.d.ts.map +1 -0
- package/lib/typescript/components/StateLabel.d.ts +12 -0
- package/lib/typescript/components/StateLabel.d.ts.map +1 -0
- package/lib/typescript/components/StatusDot.d.ts +13 -0
- package/lib/typescript/components/StatusDot.d.ts.map +1 -0
- package/lib/typescript/components/Stepper.d.ts +47 -0
- package/lib/typescript/components/Stepper.d.ts.map +1 -0
- package/lib/typescript/components/SupplementChart.d.ts +121 -0
- package/lib/typescript/components/SupplementChart.d.ts.map +1 -0
- package/lib/typescript/components/TabBar.d.ts +52 -0
- package/lib/typescript/components/TabBar.d.ts.map +1 -0
- package/lib/typescript/components/Table.d.ts +64 -0
- package/lib/typescript/components/Table.d.ts.map +1 -0
- package/lib/typescript/components/Tabs.d.ts +16 -0
- package/lib/typescript/components/Tabs.d.ts.map +1 -0
- package/lib/typescript/components/TagCloud.d.ts +31 -0
- package/lib/typescript/components/TagCloud.d.ts.map +1 -0
- package/lib/typescript/components/TagInput.d.ts +37 -0
- package/lib/typescript/components/TagInput.d.ts.map +1 -0
- package/lib/typescript/components/TemplateCard.d.ts +43 -0
- package/lib/typescript/components/TemplateCard.d.ts.map +1 -0
- package/lib/typescript/components/Timeline.d.ts +18 -0
- package/lib/typescript/components/Timeline.d.ts.map +1 -0
- package/lib/typescript/components/TimelineChart.d.ts +124 -0
- package/lib/typescript/components/TimelineChart.d.ts.map +1 -0
- package/lib/typescript/components/Toast.d.ts +18 -0
- package/lib/typescript/components/Toast.d.ts.map +1 -0
- package/lib/typescript/components/Toggle.d.ts +22 -0
- package/lib/typescript/components/Toggle.d.ts.map +1 -0
- package/lib/typescript/components/Toolbar.d.ts +48 -0
- package/lib/typescript/components/Toolbar.d.ts.map +1 -0
- package/lib/typescript/components/Tooltip.d.ts +16 -0
- package/lib/typescript/components/Tooltip.d.ts.map +1 -0
- package/lib/typescript/components/TypingIndicator.d.ts +16 -0
- package/lib/typescript/components/TypingIndicator.d.ts.map +1 -0
- package/lib/typescript/components/UnitChart.d.ts +84 -0
- package/lib/typescript/components/UnitChart.d.ts.map +1 -0
- package/lib/typescript/components/VersionBadge.d.ts +17 -0
- package/lib/typescript/components/VersionBadge.d.ts.map +1 -0
- package/lib/typescript/components/VideoThumbnail.d.ts +24 -0
- package/lib/typescript/components/VideoThumbnail.d.ts.map +1 -0
- package/lib/typescript/components/VitalsStrip.d.ts +53 -0
- package/lib/typescript/components/VitalsStrip.d.ts.map +1 -0
- package/lib/typescript/components/WatchComplication.d.ts +84 -0
- package/lib/typescript/components/WatchComplication.d.ts.map +1 -0
- package/lib/typescript/components/ZoneBar.d.ts +33 -0
- package/lib/typescript/components/ZoneBar.d.ts.map +1 -0
- package/lib/typescript/components/ZonePyramid.d.ts +51 -0
- package/lib/typescript/components/ZonePyramid.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +288 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/internal/optionalBlur.d.ts +13 -0
- package/lib/typescript/internal/optionalBlur.d.ts.map +1 -0
- package/lib/typescript/internal/optionalHaptics.d.ts +7 -0
- package/lib/typescript/internal/optionalHaptics.d.ts.map +1 -0
- package/lib/typescript/theme.d.ts +5 -0
- package/lib/typescript/theme.d.ts.map +1 -0
- package/package.json +92 -3
- package/src/components/Accordion.tsx +130 -0
- package/src/components/AchievementBadge.tsx +217 -0
- package/src/components/Alert.tsx +149 -0
- package/src/components/AreaChart.tsx +546 -0
- package/src/components/AuroraBackground.tsx +198 -0
- package/src/components/Avatar.tsx +164 -0
- package/src/components/AvatarStack.tsx +94 -0
- package/src/components/BackLink.tsx +64 -0
- package/src/components/Badge.tsx +91 -0
- package/src/components/BarChart.tsx +643 -0
- package/src/components/BarFill.tsx +37 -0
- package/src/components/BeeswarmChart.tsx +567 -0
- package/src/components/BiomarkerRange.tsx +571 -0
- package/src/components/BodyBattery.tsx +551 -0
- package/src/components/BrandMark.tsx +107 -0
- package/src/components/BulletChart.tsx +433 -0
- package/src/components/Button.tsx +127 -0
- package/src/components/CaffeineClock.tsx +472 -0
- package/src/components/Card.tsx +139 -0
- package/src/components/CharCounter.tsx +113 -0
- package/src/components/ChartState.tsx +473 -0
- package/src/components/Checkbox.tsx +175 -0
- package/src/components/Chip.tsx +132 -0
- package/src/components/ChoiceChip.tsx +119 -0
- package/src/components/CodeBlock.tsx +106 -0
- package/src/components/CodeField.tsx +137 -0
- package/src/components/ColorPicker.tsx +169 -0
- package/src/components/ComboChart.tsx +476 -0
- package/src/components/Combobox.tsx +141 -0
- package/src/components/CompareChart.tsx +651 -0
- package/src/components/CompositeChart.tsx +609 -0
- package/src/components/Countdown.tsx +155 -0
- package/src/components/CreditCardVisual.tsx +151 -0
- package/src/components/DateField.tsx +346 -0
- package/src/components/DayTimelineBlocks.tsx +270 -0
- package/src/components/DayWheel.tsx +483 -0
- package/src/components/DeltaPill.tsx +114 -0
- package/src/components/DistributionChart.tsx +739 -0
- package/src/components/Divider.tsx +61 -0
- package/src/components/DonutChart.tsx +399 -0
- package/src/components/DotsLoader.tsx +74 -0
- package/src/components/EffectAttributionLine.tsx +82 -0
- package/src/components/EmptyState.tsx +108 -0
- package/src/components/EngagementBar.tsx +140 -0
- package/src/components/EnvironmentChart.tsx +522 -0
- package/src/components/Eyebrow.tsx +22 -0
- package/src/components/FocalPointPicker.tsx +193 -0
- package/src/components/FollowButton.tsx +78 -0
- package/src/components/ForecastCallout.tsx +100 -0
- package/src/components/FormField.tsx +217 -0
- package/src/components/FunnelChart.tsx +310 -0
- package/src/components/Gauge.tsx +329 -0
- package/src/components/GradientText.tsx +114 -0
- package/src/components/Heatmap.tsx +459 -0
- package/src/components/Highlight.tsx +36 -0
- package/src/components/Hypnogram.tsx +751 -0
- package/src/components/Icon.tsx +680 -0
- package/src/components/Input.tsx +125 -0
- package/src/components/InsightCard.tsx +130 -0
- package/src/components/KeyValue.tsx +83 -0
- package/src/components/LeaderboardRow.tsx +156 -0
- package/src/components/LineChart.tsx +1529 -0
- package/src/components/ListRow.tsx +153 -0
- package/src/components/Menu.tsx +156 -0
- package/src/components/MessageBubble.tsx +118 -0
- package/src/components/MessageComposer.tsx +202 -0
- package/src/components/MetaphorWidget.tsx +848 -0
- package/src/components/Meter.tsx +186 -0
- package/src/components/MetricTile.tsx +247 -0
- package/src/components/MiniRing.tsx +17 -0
- package/src/components/Modal.tsx +129 -0
- package/src/components/MuscleDiagram.tsx +319 -0
- package/src/components/NoteField.tsx +68 -0
- package/src/components/NotificationRow.tsx +230 -0
- package/src/components/Pagination.tsx +188 -0
- package/src/components/PasswordInput.tsx +111 -0
- package/src/components/PasswordStrengthMeter.tsx +104 -0
- package/src/components/PendingPatternCard.tsx +163 -0
- package/src/components/PhaseWheel.tsx +781 -0
- package/src/components/PkChart.tsx +539 -0
- package/src/components/Popover.tsx +206 -0
- package/src/components/PrBadge.tsx +51 -0
- package/src/components/PrCard.tsx +132 -0
- package/src/components/PricingTierCard.tsx +234 -0
- package/src/components/ProGate.tsx +194 -0
- package/src/components/ProgressBar.tsx +439 -0
- package/src/components/Pulse.tsx +17 -0
- package/src/components/QRCode.tsx +555 -0
- package/src/components/RadarChart.tsx +538 -0
- package/src/components/RangeBar.tsx +206 -0
- package/src/components/ReauthDialog.tsx +282 -0
- package/src/components/RestTimer.tsx +193 -0
- package/src/components/RichText.tsx +71 -0
- package/src/components/RichTextEditor.tsx +207 -0
- package/src/components/Ring.tsx +269 -0
- package/src/components/RoseChart.tsx +375 -0
- package/src/components/SankeyChart.tsx +687 -0
- package/src/components/ScatterChart.tsx +498 -0
- package/src/components/ScrollProgress.tsx +61 -0
- package/src/components/SectionDivider.tsx +51 -0
- package/src/components/SectionHeader.tsx +41 -0
- package/src/components/SegmentedTabs.tsx +389 -0
- package/src/components/Select.tsx +335 -0
- package/src/components/SessionBanner.tsx +195 -0
- package/src/components/SessionChart.tsx +917 -0
- package/src/components/SetTable.tsx +341 -0
- package/src/components/ShareCard.tsx +145 -0
- package/src/components/Sheet.tsx +212 -0
- package/src/components/Skeleton.tsx +13 -0
- package/src/components/Slider.tsx +187 -0
- package/src/components/Sortable.tsx +263 -0
- package/src/components/SourceChip.tsx +95 -0
- package/src/components/Sparkline.tsx +108 -0
- package/src/components/Spinner.tsx +128 -0
- package/src/components/SplitButton.tsx +111 -0
- package/src/components/SsoButton.tsx +93 -0
- package/src/components/StackedBar.tsx +138 -0
- package/src/components/Stat.tsx +118 -0
- package/src/components/StatTile.tsx +581 -0
- package/src/components/StateLabel.tsx +62 -0
- package/src/components/StatusDot.tsx +58 -0
- package/src/components/Stepper.tsx +359 -0
- package/src/components/SupplementChart.tsx +1044 -0
- package/src/components/TabBar.tsx +297 -0
- package/src/components/Table.tsx +448 -0
- package/src/components/Tabs.tsx +85 -0
- package/src/components/TagCloud.tsx +111 -0
- package/src/components/TagInput.tsx +325 -0
- package/src/components/TemplateCard.tsx +181 -0
- package/src/components/Timeline.tsx +132 -0
- package/src/components/TimelineChart.tsx +1035 -0
- package/src/components/Toast.tsx +138 -0
- package/src/components/Toggle.tsx +155 -0
- package/src/components/Toolbar.tsx +292 -0
- package/src/components/Tooltip.tsx +193 -0
- package/src/components/TypingIndicator.tsx +106 -0
- package/src/components/UnitChart.tsx +519 -0
- package/src/components/VersionBadge.tsx +129 -0
- package/src/components/VideoThumbnail.tsx +140 -0
- package/src/components/VitalsStrip.tsx +636 -0
- package/src/components/WatchComplication.tsx +536 -0
- package/src/components/ZoneBar.tsx +148 -0
- package/src/components/ZonePyramid.tsx +405 -0
- package/src/components/__tests__/Chip.test.tsx +33 -0
- package/src/components/__tests__/CodeInput.test.tsx +62 -0
- package/src/components/__tests__/DeltaPill.test.tsx +41 -0
- package/src/components/__tests__/GradientText.test.tsx +69 -0
- package/src/components/__tests__/Icon.test.tsx +61 -0
- package/src/components/__tests__/Input.test.tsx +30 -0
- package/src/components/__tests__/LineChart.test.tsx +62 -0
- package/src/components/__tests__/ListRow.test.tsx +28 -0
- package/src/components/__tests__/PkChart.test.tsx +47 -0
- package/src/components/__tests__/PrBadge.test.tsx +32 -0
- package/src/components/__tests__/PrCard.test.tsx +49 -0
- package/src/components/__tests__/RestTimer.test.tsx +94 -0
- package/src/components/__tests__/SegmentedTabs.test.tsx +58 -0
- package/src/components/__tests__/SessionBanner.test.tsx +96 -0
- package/src/components/__tests__/SetTable.test.tsx +105 -0
- package/src/components/__tests__/SourceChip.test.tsx +82 -0
- package/src/components/__tests__/SupplementChart.test.tsx +71 -0
- package/src/components/__tests__/Table.test.tsx +81 -0
- package/src/components/__tests__/TemplateCard.test.tsx +85 -0
- package/src/components/__tests__/Toggle.test.tsx +49 -0
- package/src/components/__tests__/UnitChart.test.tsx +44 -0
- package/src/components/__tests__/markup.ts +142 -0
- package/src/components/__tests__/react-dom-server.d.ts +11 -0
- package/src/index.ts +320 -0
- package/src/internal/optionalBlur.ts +37 -0
- package/src/internal/optionalHaptics.ts +38 -0
- package/src/theme.ts +26 -0
- package/README.md +0 -3
|
@@ -0,0 +1,1044 @@
|
|
|
1
|
+
import { useId, type ReactNode } from 'react';
|
|
2
|
+
import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import Svg, {
|
|
4
|
+
Circle,
|
|
5
|
+
ClipPath,
|
|
6
|
+
Defs,
|
|
7
|
+
FeGaussianBlur,
|
|
8
|
+
Filter,
|
|
9
|
+
G,
|
|
10
|
+
Line,
|
|
11
|
+
LinearGradient,
|
|
12
|
+
Path,
|
|
13
|
+
Rect,
|
|
14
|
+
Stop,
|
|
15
|
+
Text as SvgText,
|
|
16
|
+
} from 'react-native-svg';
|
|
17
|
+
import { colors, fonts } from '@lockin90/tokens';
|
|
18
|
+
|
|
19
|
+
/* SupplementChart — the catalog supplement-level family (SP-01…SP-10,
|
|
20
|
+
lockin90-design/charts/supplement-charts.html): saturation, decay and
|
|
21
|
+
adherence — what's actually in the system. Nine variants drawn in a fixed
|
|
22
|
+
320×150 viewBox: the creatine saturation story, active-stack rows,
|
|
23
|
+
half-life decay, dose-vs-level, depletion forecast, adherence strip,
|
|
24
|
+
multi-supplement kinetics and the liquid battery vessels (glass body +
|
|
25
|
+
battery cap + wavy two-Q liquid surface + clipped bubbles + zone-colored
|
|
26
|
+
fill + a % readout that inverts when submerged). Native twin of
|
|
27
|
+
`@lockin90/ui` SupplementChart — same prop API; glows are Gaussian-blurred
|
|
28
|
+
duplicate shapes (Fabric-native SVG filters — Ring precedent).
|
|
29
|
+
(SP-08 does not exist — a numbering gap in the catalog.) */
|
|
30
|
+
|
|
31
|
+
export type SupplementChartVariant =
|
|
32
|
+
| 'saturation-story' /* SP-01 — level builds to SATURATED → MISSED window → rebuilds */
|
|
33
|
+
| 'active-stack' /* SP-02 — 4 rows: name + level bar + % + status pill */
|
|
34
|
+
| 'half-life' /* SP-03 — exponential decay from the dose tag + NOW pulse */
|
|
35
|
+
| 'dose-level' /* SP-04 — dose dots + faint intake stems + level line */
|
|
36
|
+
| 'depletion-forecast' /* SP-05 — solid past · dashed projection · LOW pulse */
|
|
37
|
+
| 'adherence-level' /* SP-06 — taken/missed cells strip + resulting level line */
|
|
38
|
+
| 'stack-levels' /* SP-07 — 3 level curves with different kinetics + pills */
|
|
39
|
+
| 'liquid-batteries' /* SP-09 — 5 battery vessels in a bar-chart row */
|
|
40
|
+
| 'battery-hero'; /* SP-10 — one large 56px vessel + FULL/LOW ticks + stats */
|
|
41
|
+
|
|
42
|
+
/** One `active-stack` row (SP-02). */
|
|
43
|
+
export interface SupplementRow {
|
|
44
|
+
/** Row label (e.g. 'CREATINE'). */
|
|
45
|
+
name: string;
|
|
46
|
+
/** Level 0–1 — bar fill + % readout. */
|
|
47
|
+
level: number;
|
|
48
|
+
/** Bar/pill color token (e.g. `colors.cyan`); defaults to the level's zone. */
|
|
49
|
+
color?: string;
|
|
50
|
+
/** Status pill text; defaults by level (SATURATED / OK / TAKE TODAY / DEPLETED). */
|
|
51
|
+
status?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** One `stack-levels` curve (SP-07). */
|
|
55
|
+
export interface SupplementSeries {
|
|
56
|
+
/** Series name — the right-side chip pill. */
|
|
57
|
+
name: string;
|
|
58
|
+
/** Level samples 0–1, oldest → newest. */
|
|
59
|
+
levels: number[];
|
|
60
|
+
/** Line color token; defaults to mint → cyan → amber by position. */
|
|
61
|
+
color?: string;
|
|
62
|
+
/** Dashed `4 3` line (the caffeine sawtooth look). */
|
|
63
|
+
dash?: boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** One liquid vessel (SP-09). */
|
|
67
|
+
export interface SupplementVessel {
|
|
68
|
+
/** Name under the vessel (e.g. 'CREATINE'). */
|
|
69
|
+
name: string;
|
|
70
|
+
/** Fill level 0–1 — drives the liquid height and the zone color. */
|
|
71
|
+
level: number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface SupplementChartProps {
|
|
75
|
+
/** Catalog variant (SP-01…SP-07 / SP-09 / SP-10). */
|
|
76
|
+
variant?: SupplementChartVariant;
|
|
77
|
+
/** Per-day dose adherence, oldest → newest (`true` = taken) — drives the
|
|
78
|
+
* saturation model, dose dots and adherence cells (SP-01/04/06). */
|
|
79
|
+
doses?: boolean[];
|
|
80
|
+
/** Explicit 0–1 level series — overrides the doses-driven model; the PAST
|
|
81
|
+
* levels for `depletion-forecast` (SP-05). */
|
|
82
|
+
levels?: number[];
|
|
83
|
+
/** Saturation model: per-dose build rate toward 1 (catalog `kUp`). */
|
|
84
|
+
kUp?: number;
|
|
85
|
+
/** Saturation model: per-missed-day decay rate (catalog `kDown`). */
|
|
86
|
+
kDown?: number;
|
|
87
|
+
/** `active-stack` rows (SP-02) — the first four are drawn. */
|
|
88
|
+
rows?: SupplementRow[];
|
|
89
|
+
/** `stack-levels` curves (SP-07) — the first three are drawn. */
|
|
90
|
+
series?: SupplementSeries[];
|
|
91
|
+
/** `liquid-batteries` vessels (SP-09) — the first five are drawn. */
|
|
92
|
+
vessels?: SupplementVessel[];
|
|
93
|
+
/** `battery-hero` vessel level 0–1 (SP-10) — also the big % readout. */
|
|
94
|
+
level?: number;
|
|
95
|
+
/** Half-life in hours (SP-03 decay: `0.5^(t/halfLifeH)`). */
|
|
96
|
+
halfLifeH?: number;
|
|
97
|
+
/** `half-life` x-window in hours (0h → +windowH). */
|
|
98
|
+
windowH?: number;
|
|
99
|
+
/** `half-life` NOW rule position, hours since the dose. */
|
|
100
|
+
nowH?: number;
|
|
101
|
+
/** `half-life` dose size in mg — derives the default dose/now labels. */
|
|
102
|
+
doseMg?: number;
|
|
103
|
+
/** `half-life` dose tag (default `DOSE ${doseMg} MG`). */
|
|
104
|
+
doseLabel?: string;
|
|
105
|
+
/** `half-life` NOW pill (default `STILL ACTIVE · ${remaining} MG`). */
|
|
106
|
+
nowNote?: string;
|
|
107
|
+
/** `depletion-forecast` total days (past + projection). */
|
|
108
|
+
projectDays?: number;
|
|
109
|
+
/** `depletion-forecast` per-day retention (level × rate per day). */
|
|
110
|
+
decayRate?: number;
|
|
111
|
+
/** LOW crossing threshold 0–1 (the catalog low band edge). */
|
|
112
|
+
lowThreshold?: number;
|
|
113
|
+
/** `depletion-forecast` pill (default `LOW IN ${n} DAYS — RESTOCK`). */
|
|
114
|
+
restockNote?: string;
|
|
115
|
+
/** Variant annotation pill — SP-01 rebuild note (default derived
|
|
116
|
+
* `STILL n% · REBUILDING`), SP-04 key (default `DOTS = DOSES · LINE = LEVEL`),
|
|
117
|
+
* SP-06 level pill (default `LEVEL n%`). */
|
|
118
|
+
note?: string;
|
|
119
|
+
/** Data index the SP-01 `note` anchors to (default: last missed day). */
|
|
120
|
+
noteAt?: number;
|
|
121
|
+
/** Level-line color token; defaults per variant (mint; cyan for
|
|
122
|
+
* `depletion-forecast` / `adherence-level`). */
|
|
123
|
+
color?: string;
|
|
124
|
+
/** `battery-hero` caption under the big % (e.g. 'CREATINE · 5G DAILY'). */
|
|
125
|
+
heroCaption?: string;
|
|
126
|
+
/** `battery-hero` status pill (e.g. 'SATURATED'). */
|
|
127
|
+
heroStatus?: string;
|
|
128
|
+
/** `battery-hero` status pill color token. */
|
|
129
|
+
heroStatusColor?: string;
|
|
130
|
+
/** `battery-hero` bottom note (e.g. 'HOLDS ~9 DAYS OFF'). */
|
|
131
|
+
heroNote?: string;
|
|
132
|
+
/** `battery-hero` LOW side-tick position 0–1. */
|
|
133
|
+
lowAt?: number;
|
|
134
|
+
/** Top-left mono caption (e.g. 'CREATINE · 5G DAILY'). */
|
|
135
|
+
title?: string;
|
|
136
|
+
/** Top-right display stat (e.g. 'LVL 78%'). */
|
|
137
|
+
stat?: string;
|
|
138
|
+
/** `stat` color token. */
|
|
139
|
+
statColor?: string;
|
|
140
|
+
/** SATURATED / LOW zone level bands behind the plot (level variants only;
|
|
141
|
+
* default on — `adherence-level` and the row/vessel variants never draw them). */
|
|
142
|
+
bands?: boolean;
|
|
143
|
+
/** Bottom-left axis caption (default 'DAY 1'; `half-life` → '0H'). */
|
|
144
|
+
startLabel?: string;
|
|
145
|
+
/** Bottom-right axis caption (default 'TODAY'; `half-life` → `+${windowH}H`). */
|
|
146
|
+
endLabel?: string;
|
|
147
|
+
/** Glow underlay (the catalog `cfg.shine`) — a wider faint duplicate on native. */
|
|
148
|
+
shine?: boolean;
|
|
149
|
+
/** Accessible description of the chart. */
|
|
150
|
+
ariaLabel?: string;
|
|
151
|
+
/** Optional container style. */
|
|
152
|
+
style?: StyleProp<ViewStyle>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* ---- catalog geometry (viewBox units — charts/catalog.js) ---- */
|
|
156
|
+
const W = 320;
|
|
157
|
+
const H = 150;
|
|
158
|
+
const PAD = { l: 10, r: 12, t: 16, b: 14 };
|
|
159
|
+
const PLOT_W = W - PAD.l - PAD.r; // 298
|
|
160
|
+
const PLOT_H = H - PAD.t - PAD.b; // 120
|
|
161
|
+
|
|
162
|
+
/** Round for compact attribute values. */
|
|
163
|
+
const rd = (n: number) => Math.round(n * 100) / 100;
|
|
164
|
+
|
|
165
|
+
/** y of a 0–1 plot fraction. */
|
|
166
|
+
const yAt = (v: number) => PAD.t + (1 - v) * PLOT_H;
|
|
167
|
+
/** the supplement page's inset day x-scale. */
|
|
168
|
+
const dayX = (i: number, n: number) => PAD.l + 14 + ((PLOT_W - 22) * i) / Math.max(1, n - 1);
|
|
169
|
+
/** the supplement page's level y-scale (levels ride 6%…92% of the plot). */
|
|
170
|
+
const lvlY = (v: number) => yAt(0.06 + v * 0.86);
|
|
171
|
+
|
|
172
|
+
/** zone verdict for a 0–1 level (the catalog vessel/zoneOf thresholds). */
|
|
173
|
+
const zoneOf = (v: number) => (v >= 0.62 ? colors.zoneHigh : v >= 0.38 ? colors.zoneMid : colors.zoneLow);
|
|
174
|
+
|
|
175
|
+
/** the catalog saturation model: doses build toward 1, missed days decay. */
|
|
176
|
+
function satLevels(taken: boolean[], kUp: number, kDown: number): number[] {
|
|
177
|
+
let lvl = 0;
|
|
178
|
+
return taken.map((t) => {
|
|
179
|
+
lvl = t ? lvl + (1 - lvl) * kUp : lvl * (1 - kDown);
|
|
180
|
+
return lvl;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
type Pt = [number, number];
|
|
185
|
+
|
|
186
|
+
/** Straight polyline through the points. */
|
|
187
|
+
function linePath(pts: Pt[]): string {
|
|
188
|
+
if (pts.length === 0) return '';
|
|
189
|
+
return pts.map(([x, y], i) => `${i === 0 ? 'M' : 'L'}${rd(x)},${rd(y)}`).join(' ');
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** Fritsch–Carlson monotone cubic — the catalog's `smoothPath` (no overshoot). */
|
|
193
|
+
function monotonePath(pts: Pt[]): string {
|
|
194
|
+
const n = pts.length;
|
|
195
|
+
if (n < 3) return linePath(pts);
|
|
196
|
+
const dx: number[] = [];
|
|
197
|
+
const m: number[] = [];
|
|
198
|
+
const tg: number[] = [];
|
|
199
|
+
for (let i = 0; i < n - 1; i++) {
|
|
200
|
+
dx[i] = pts[i + 1][0] - pts[i][0];
|
|
201
|
+
m[i] = (pts[i + 1][1] - pts[i][1]) / dx[i];
|
|
202
|
+
}
|
|
203
|
+
tg[0] = m[0];
|
|
204
|
+
tg[n - 1] = m[n - 2];
|
|
205
|
+
for (let i = 1; i < n - 1; i++) tg[i] = m[i - 1] * m[i] <= 0 ? 0 : (m[i - 1] + m[i]) / 2;
|
|
206
|
+
for (let i = 0; i < n - 1; i++) {
|
|
207
|
+
if (m[i] === 0) {
|
|
208
|
+
tg[i] = 0;
|
|
209
|
+
tg[i + 1] = 0;
|
|
210
|
+
} else {
|
|
211
|
+
const a = tg[i] / m[i];
|
|
212
|
+
const b = tg[i + 1] / m[i];
|
|
213
|
+
const s = a * a + b * b;
|
|
214
|
+
if (s > 9) {
|
|
215
|
+
const tau = 3 / Math.sqrt(s);
|
|
216
|
+
tg[i] = tau * a * m[i];
|
|
217
|
+
tg[i + 1] = tau * b * m[i];
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
let d = `M${rd(pts[0][0])},${rd(pts[0][1])}`;
|
|
222
|
+
for (let i = 0; i < n - 1; i++) {
|
|
223
|
+
const h = dx[i] / 3;
|
|
224
|
+
d += ` C${rd(pts[i][0] + h)},${rd(pts[i][1] + h * tg[i])} ${rd(pts[i + 1][0] - h)},${rd(
|
|
225
|
+
pts[i + 1][1] - h * tg[i + 1],
|
|
226
|
+
)} ${rd(pts[i + 1][0])},${rd(pts[i + 1][1])}`;
|
|
227
|
+
}
|
|
228
|
+
return d;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** Mono catalog label (8.5px JetBrains Mono, ~.06em tracking). */
|
|
232
|
+
function Label({
|
|
233
|
+
x,
|
|
234
|
+
y,
|
|
235
|
+
fill,
|
|
236
|
+
anchor = 'middle',
|
|
237
|
+
children,
|
|
238
|
+
}: {
|
|
239
|
+
x: number;
|
|
240
|
+
y: number;
|
|
241
|
+
fill: string;
|
|
242
|
+
anchor?: 'start' | 'middle' | 'end';
|
|
243
|
+
children: string;
|
|
244
|
+
}) {
|
|
245
|
+
return (
|
|
246
|
+
<SvgText x={rd(x)} y={rd(y)} fill={fill} textAnchor={anchor} fontSize={8.5} fontFamily={fonts.mono} letterSpacing={0.5}>
|
|
247
|
+
{children}
|
|
248
|
+
</SvgText>
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** Chip-pill tag (the catalog `tag()`): dark bg-0 pill + tinted hairline. */
|
|
253
|
+
function Tag({
|
|
254
|
+
x,
|
|
255
|
+
y,
|
|
256
|
+
color,
|
|
257
|
+
anchor = 'middle',
|
|
258
|
+
text,
|
|
259
|
+
}: {
|
|
260
|
+
x: number;
|
|
261
|
+
y: number;
|
|
262
|
+
color: string;
|
|
263
|
+
anchor?: 'start' | 'middle' | 'end';
|
|
264
|
+
text: string;
|
|
265
|
+
}) {
|
|
266
|
+
const wpx = text.length * 5.35 + 12;
|
|
267
|
+
let xa = anchor === 'end' ? x - wpx : anchor === 'start' ? x : x - wpx / 2;
|
|
268
|
+
xa = Math.max(PAD.l - 4, Math.min(xa, W - PAD.r - wpx + 4));
|
|
269
|
+
return (
|
|
270
|
+
<G>
|
|
271
|
+
<Rect
|
|
272
|
+
x={rd(xa)}
|
|
273
|
+
y={rd(y - 6.5)}
|
|
274
|
+
width={rd(wpx)}
|
|
275
|
+
height={13}
|
|
276
|
+
rx={6.5}
|
|
277
|
+
fill={`${colors.bg0}C7`}
|
|
278
|
+
stroke={color}
|
|
279
|
+
strokeOpacity={0.35}
|
|
280
|
+
strokeWidth={0.8}
|
|
281
|
+
/>
|
|
282
|
+
<SvgText
|
|
283
|
+
x={rd(xa + wpx / 2)}
|
|
284
|
+
y={rd(y + 2.8)}
|
|
285
|
+
fill={color}
|
|
286
|
+
textAnchor="middle"
|
|
287
|
+
fontSize={8}
|
|
288
|
+
fontFamily={fonts.mono}
|
|
289
|
+
letterSpacing={0.4}
|
|
290
|
+
>
|
|
291
|
+
{text}
|
|
292
|
+
</SvgText>
|
|
293
|
+
</G>
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/** Glowing dot + static halo ring — the catalog `pulseDot`. Native draws a
|
|
298
|
+
* wider faint duplicate for the glow and a static ring for the pulse (no
|
|
299
|
+
* SMIL/JS animation — the Ring precedent). */
|
|
300
|
+
function PulseDot({ x, y, color }: { x: number; y: number; color: string }) {
|
|
301
|
+
return (
|
|
302
|
+
<G>
|
|
303
|
+
<Circle cx={rd(x)} cy={rd(y)} r={6.6} fill={color} opacity={0.35} />
|
|
304
|
+
<Circle cx={rd(x)} cy={rd(y)} r={3.6} fill={color} />
|
|
305
|
+
<Circle cx={rd(x)} cy={rd(y)} r={7} fill="none" stroke={color} strokeWidth={1.4} opacity={0.4} />
|
|
306
|
+
</G>
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/** SATURATED / LOW zone level bands (5% washes + edge band labels — right by
|
|
311
|
+
* default; `labelsLeft` moves them to the band's left edge when the right
|
|
312
|
+
* edge is occupied, e.g. by SP-07's end-of-line series pills). */
|
|
313
|
+
function LevelBands({ labelsLeft = false }: { labelsLeft?: boolean }) {
|
|
314
|
+
const bands: Array<[number, number, string, string]> = [
|
|
315
|
+
[0.72, 1, colors.zoneHigh, 'SATURATED'],
|
|
316
|
+
[0.35, 0.72, colors.zoneMid, ''],
|
|
317
|
+
[0, 0.35, colors.zoneLow, 'LOW'],
|
|
318
|
+
];
|
|
319
|
+
return (
|
|
320
|
+
<G>
|
|
321
|
+
{bands.map(([lo, hi, color, text], i) => (
|
|
322
|
+
<G key={i}>
|
|
323
|
+
<Rect
|
|
324
|
+
x={PAD.l}
|
|
325
|
+
y={rd(lvlY(hi))}
|
|
326
|
+
width={PLOT_W}
|
|
327
|
+
height={rd(lvlY(lo) - lvlY(hi))}
|
|
328
|
+
fill={color}
|
|
329
|
+
opacity={0.05}
|
|
330
|
+
/>
|
|
331
|
+
{text ? (
|
|
332
|
+
<Label
|
|
333
|
+
x={labelsLeft ? PAD.l + 2 : W - PAD.r - 2}
|
|
334
|
+
y={lvlY(hi) + 9}
|
|
335
|
+
fill={color}
|
|
336
|
+
anchor={labelsLeft ? 'start' : 'end'}
|
|
337
|
+
>
|
|
338
|
+
{text}
|
|
339
|
+
</Label>
|
|
340
|
+
) : null}
|
|
341
|
+
</G>
|
|
342
|
+
))}
|
|
343
|
+
</G>
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/** Dose dots under the plot — filled mint = taken, dashed coral = missed. */
|
|
348
|
+
function DoseDots({ taken, y }: { taken: boolean[]; y: number }) {
|
|
349
|
+
const n = taken.length;
|
|
350
|
+
return (
|
|
351
|
+
<G>
|
|
352
|
+
{taken.map((t, i) =>
|
|
353
|
+
t ? (
|
|
354
|
+
<Circle key={i} cx={rd(dayX(i, n))} cy={y} r={3} fill={colors.mint} />
|
|
355
|
+
) : (
|
|
356
|
+
<Circle
|
|
357
|
+
key={i}
|
|
358
|
+
cx={rd(dayX(i, n))}
|
|
359
|
+
cy={y}
|
|
360
|
+
r={3}
|
|
361
|
+
fill="none"
|
|
362
|
+
stroke={colors.zoneLow}
|
|
363
|
+
strokeWidth={1.3}
|
|
364
|
+
strokeDasharray={[1.5, 1.5]}
|
|
365
|
+
/>
|
|
366
|
+
),
|
|
367
|
+
)}
|
|
368
|
+
</G>
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/** One liquid battery vessel: cap + glass body + clipped wavy liquid +
|
|
373
|
+
* surface highlight + bubbles + a % that inverts when submerged. */
|
|
374
|
+
function VesselGlyph({
|
|
375
|
+
x,
|
|
376
|
+
y,
|
|
377
|
+
w,
|
|
378
|
+
h,
|
|
379
|
+
level,
|
|
380
|
+
vid,
|
|
381
|
+
bubbles,
|
|
382
|
+
shine,
|
|
383
|
+
}: {
|
|
384
|
+
x: number;
|
|
385
|
+
y: number;
|
|
386
|
+
w: number;
|
|
387
|
+
h: number;
|
|
388
|
+
level: number;
|
|
389
|
+
vid: string;
|
|
390
|
+
bubbles: boolean;
|
|
391
|
+
shine: boolean;
|
|
392
|
+
}) {
|
|
393
|
+
const lv = Math.max(0, Math.min(1, level));
|
|
394
|
+
const col = zoneOf(lv);
|
|
395
|
+
const lt = y + h - 2 - lv * (h - 6);
|
|
396
|
+
const amp = 2.6;
|
|
397
|
+
const xw = x + 1.5;
|
|
398
|
+
const ww = w - 3;
|
|
399
|
+
// wavy liquid surface — TWO Q-curves (the signature), then close to the base
|
|
400
|
+
const surface =
|
|
401
|
+
`M${rd(xw)} ${rd(lt)}` +
|
|
402
|
+
`Q${rd(xw + ww * 0.25)} ${rd(lt - amp)} ${rd(xw + ww * 0.5)} ${rd(lt)}` +
|
|
403
|
+
`Q${rd(xw + ww * 0.75)} ${rd(lt + amp)} ${rd(xw + ww)} ${rd(lt)}`;
|
|
404
|
+
const wave = `${surface}L${rd(xw + ww)} ${rd(y + h)}L${rd(xw)} ${rd(y + h)}Z`;
|
|
405
|
+
// % readout placement: centered in the liquid when the fill is tall enough
|
|
406
|
+
// to hold it (≥ 30%), else riding just above the wavy surface
|
|
407
|
+
const inLiquid = lv >= 0.3;
|
|
408
|
+
const pctY = inLiquid ? (lt + y + h) / 2 + 3 : lt - amp - 4;
|
|
409
|
+
const bubbleSpec: Array<[number, number, number]> = [
|
|
410
|
+
[0.3, 0.35, 2],
|
|
411
|
+
[0.62, 0.55, 1.4],
|
|
412
|
+
[0.45, 0.75, 1.8],
|
|
413
|
+
[0.72, 0.3, 1.2],
|
|
414
|
+
];
|
|
415
|
+
return (
|
|
416
|
+
<G>
|
|
417
|
+
<Defs>
|
|
418
|
+
<ClipPath id={`${vid}-c`}>
|
|
419
|
+
<Rect x={rd(x + 1.5)} y={rd(y + 1.5)} width={rd(w - 3)} height={rd(h - 3)} rx={7.5} />
|
|
420
|
+
</ClipPath>
|
|
421
|
+
<LinearGradient id={`${vid}-l`} x1="0%" y1="0%" x2="0%" y2="100%">
|
|
422
|
+
<Stop offset="0%" stopColor={col} stopOpacity={0.9} />
|
|
423
|
+
<Stop offset="100%" stopColor={col} stopOpacity={0.45} />
|
|
424
|
+
</LinearGradient>
|
|
425
|
+
{shine ? (
|
|
426
|
+
/* real Gaussian blur for the liquid shine — the native twin of the
|
|
427
|
+
web vessel's `.lk-supp-shine-wide` `blur(6px)` fill duplicate */
|
|
428
|
+
<Filter
|
|
429
|
+
id={`${vid}-blur`}
|
|
430
|
+
filterUnits="userSpaceOnUse"
|
|
431
|
+
x={x - 12}
|
|
432
|
+
y={y - 12}
|
|
433
|
+
width={w + 24}
|
|
434
|
+
height={h + 24}
|
|
435
|
+
>
|
|
436
|
+
<FeGaussianBlur stdDeviation={3} />
|
|
437
|
+
</Filter>
|
|
438
|
+
) : null}
|
|
439
|
+
</Defs>
|
|
440
|
+
{/* battery cap */}
|
|
441
|
+
<Rect
|
|
442
|
+
x={rd(x + w / 2 - w * 0.2)}
|
|
443
|
+
y={y - 5}
|
|
444
|
+
width={rd(w * 0.4)}
|
|
445
|
+
height={5}
|
|
446
|
+
rx={2}
|
|
447
|
+
fill={colors.text}
|
|
448
|
+
opacity={0.28}
|
|
449
|
+
/>
|
|
450
|
+
{/* glass body */}
|
|
451
|
+
<Rect
|
|
452
|
+
x={x}
|
|
453
|
+
y={y}
|
|
454
|
+
width={w}
|
|
455
|
+
height={h}
|
|
456
|
+
rx={9}
|
|
457
|
+
fill={colors.glass}
|
|
458
|
+
stroke={colors.text}
|
|
459
|
+
strokeOpacity={0.22}
|
|
460
|
+
strokeWidth={1.4}
|
|
461
|
+
/>
|
|
462
|
+
{/* liquid shine — a Gaussian-blurred unclipped duplicate under the fill
|
|
463
|
+
(the web vessel's `blur(6px)` clone) */}
|
|
464
|
+
{shine ? <Path d={wave} fill={col} opacity={0.5} filter={`url(#${vid}-blur)`} /> : null}
|
|
465
|
+
{/* liquid, clipped to the body */}
|
|
466
|
+
<Path d={wave} fill={`url(#${vid}-l)`} clipPath={`url(#${vid}-c)`} />
|
|
467
|
+
{/* liquid surface highlight */}
|
|
468
|
+
<Path d={surface} fill="none" stroke={col} strokeWidth={1.6} opacity={0.95} clipPath={`url(#${vid}-c)`} />
|
|
469
|
+
{/* bubbles */}
|
|
470
|
+
{bubbles
|
|
471
|
+
? bubbleSpec.map(([fx, fy, r], i) => (
|
|
472
|
+
<Circle
|
|
473
|
+
key={i}
|
|
474
|
+
cx={rd(x + w * fx)}
|
|
475
|
+
cy={rd(y + h - (h - 6) * lv * fy)}
|
|
476
|
+
r={r}
|
|
477
|
+
fill="none"
|
|
478
|
+
stroke={colors.text}
|
|
479
|
+
strokeOpacity={0.4}
|
|
480
|
+
strokeWidth={0.8}
|
|
481
|
+
clipPath={`url(#${vid}-c)`}
|
|
482
|
+
/>
|
|
483
|
+
))
|
|
484
|
+
: null}
|
|
485
|
+
{/* % readout — centered in the liquid (inverted) when the fill can hold
|
|
486
|
+
it, else just above the liquid surface */}
|
|
487
|
+
<SvgText
|
|
488
|
+
x={rd(x + w / 2)}
|
|
489
|
+
y={rd(pctY)}
|
|
490
|
+
fill={inLiquid ? colors.bg0 : colors.text}
|
|
491
|
+
textAnchor="middle"
|
|
492
|
+
fontSize={10.5}
|
|
493
|
+
fontWeight="600"
|
|
494
|
+
fontFamily={fonts.mono}
|
|
495
|
+
>
|
|
496
|
+
{String(Math.round(lv * 100))}
|
|
497
|
+
</SvgText>
|
|
498
|
+
</G>
|
|
499
|
+
);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/* the catalog's creatine story — 5 doses · 3 missed · rebuild */
|
|
503
|
+
const CREATINE_DOSES = [
|
|
504
|
+
true, true, true, true, true, false, false, false, true, true, true, true, true, true,
|
|
505
|
+
];
|
|
506
|
+
|
|
507
|
+
const DEFAULT_ROWS: SupplementRow[] = [
|
|
508
|
+
{ name: 'CREATINE', level: 0.82, color: colors.mint, status: 'SATURATED' },
|
|
509
|
+
{ name: 'MAGNESIUM', level: 0.64, color: colors.cyan, status: 'OK' },
|
|
510
|
+
{ name: 'VITAMIN D', level: 0.31, color: colors.zoneMid, status: 'TAKE TODAY' },
|
|
511
|
+
{ name: 'OMEGA-3', level: 0.12, color: colors.zoneLow, status: 'DEPLETED' },
|
|
512
|
+
];
|
|
513
|
+
|
|
514
|
+
const DEFAULT_VESSELS: SupplementVessel[] = [
|
|
515
|
+
{ name: 'CREATINE', level: 0.82 },
|
|
516
|
+
{ name: 'MAGNES.', level: 0.64 },
|
|
517
|
+
{ name: 'VIT D', level: 0.31 },
|
|
518
|
+
{ name: 'OMEGA-3', level: 0.12 },
|
|
519
|
+
{ name: 'ZINC', level: 0.55 },
|
|
520
|
+
];
|
|
521
|
+
|
|
522
|
+
const DEFAULT_FORECAST_PAST = [0.2, 0.44, 0.62, 0.75, 0.84, 0.9];
|
|
523
|
+
const DOSE_LEVEL_DOSES = [
|
|
524
|
+
true, true, false, true, true, true, false, true, true, false, false, true, true, true,
|
|
525
|
+
];
|
|
526
|
+
const ADHERENCE_DOSES = [
|
|
527
|
+
true, true, true, false, true, true, true, true, false, false, true, true, true, true,
|
|
528
|
+
];
|
|
529
|
+
|
|
530
|
+
/** derive an SP-02 status pill from the level. */
|
|
531
|
+
const statusOf = (v: number) =>
|
|
532
|
+
v >= 0.72 ? 'SATURATED' : v >= 0.38 ? 'OK' : v >= 0.2 ? 'TAKE TODAY' : 'DEPLETED';
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* SupplementChart — the supplement-level family (catalog SP-01…SP-10):
|
|
536
|
+
* saturation, decay, adherence and the liquid tank view. Level variants share
|
|
537
|
+
* the zone level-band frame (SATURATED ≥ 0.72 / LOW < 0.35) and the catalog
|
|
538
|
+
* saturation model (`kUp`/`kDown`) so real dose logs drive the story; the
|
|
539
|
+
* battery variants render the signature glass vessels with a wavy clipped
|
|
540
|
+
* liquid, bubbles and zone-colored fill. All levels are 0–1.
|
|
541
|
+
*/
|
|
542
|
+
export function SupplementChart({
|
|
543
|
+
variant = 'saturation-story',
|
|
544
|
+
doses,
|
|
545
|
+
levels,
|
|
546
|
+
kUp = 0.32,
|
|
547
|
+
kDown = 0.18,
|
|
548
|
+
rows = DEFAULT_ROWS,
|
|
549
|
+
series,
|
|
550
|
+
vessels = DEFAULT_VESSELS,
|
|
551
|
+
level = 0.78,
|
|
552
|
+
halfLifeH = 5,
|
|
553
|
+
windowH = 12,
|
|
554
|
+
nowH = 6.5,
|
|
555
|
+
doseMg = 200,
|
|
556
|
+
doseLabel,
|
|
557
|
+
nowNote,
|
|
558
|
+
projectDays = 14,
|
|
559
|
+
decayRate = 0.82,
|
|
560
|
+
lowThreshold = 0.35,
|
|
561
|
+
restockNote,
|
|
562
|
+
note,
|
|
563
|
+
noteAt,
|
|
564
|
+
color,
|
|
565
|
+
heroCaption = 'CREATINE · 5G DAILY',
|
|
566
|
+
heroStatus = 'SATURATED',
|
|
567
|
+
heroStatusColor = colors.zoneHigh,
|
|
568
|
+
heroNote = 'HOLDS ~9 DAYS OFF',
|
|
569
|
+
lowAt = 0.35,
|
|
570
|
+
title,
|
|
571
|
+
stat,
|
|
572
|
+
statColor = colors.text,
|
|
573
|
+
bands,
|
|
574
|
+
startLabel,
|
|
575
|
+
endLabel,
|
|
576
|
+
shine = false,
|
|
577
|
+
ariaLabel = 'Supplement level chart',
|
|
578
|
+
style,
|
|
579
|
+
}: SupplementChartProps) {
|
|
580
|
+
const uid = useId().replace(/[^a-zA-Z0-9-]/g, '');
|
|
581
|
+
const blurId = `lk-supp-blur-${uid}`;
|
|
582
|
+
|
|
583
|
+
const lineColor =
|
|
584
|
+
color ?? (variant === 'depletion-forecast' || variant === 'adherence-level' ? colors.cyan : colors.mint);
|
|
585
|
+
|
|
586
|
+
/** level line + optional glow underlay (Gaussian-blurred duplicate on native). */
|
|
587
|
+
const levelLine = (
|
|
588
|
+
pts: Pt[],
|
|
589
|
+
opts: { stroke?: string; w?: number; dash?: [number, number]; opacity?: number; glow?: boolean } = {},
|
|
590
|
+
) => {
|
|
591
|
+
const d = monotonePath(pts);
|
|
592
|
+
const stroke = opts.stroke ?? lineColor;
|
|
593
|
+
const sw = opts.w ?? 2.5;
|
|
594
|
+
return (
|
|
595
|
+
<G>
|
|
596
|
+
{/* glow — a Gaussian-blurred duplicate of the line behind it: the same
|
|
597
|
+
soft glow the web line gets from its `blur(5px)` underlay. (Feather
|
|
598
|
+
copies read as banded outlines on device.) */}
|
|
599
|
+
{opts.glow ? (
|
|
600
|
+
<Path
|
|
601
|
+
d={d}
|
|
602
|
+
fill="none"
|
|
603
|
+
stroke={stroke}
|
|
604
|
+
strokeWidth={sw + 5}
|
|
605
|
+
strokeLinecap="round"
|
|
606
|
+
opacity={0.45}
|
|
607
|
+
filter={`url(#${blurId})`}
|
|
608
|
+
/>
|
|
609
|
+
) : null}
|
|
610
|
+
<Path
|
|
611
|
+
d={d}
|
|
612
|
+
fill="none"
|
|
613
|
+
stroke={stroke}
|
|
614
|
+
strokeWidth={sw}
|
|
615
|
+
strokeLinecap="round"
|
|
616
|
+
strokeDasharray={opts.dash}
|
|
617
|
+
opacity={opts.opacity}
|
|
618
|
+
/>
|
|
619
|
+
</G>
|
|
620
|
+
);
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
let body: ReactNode = null;
|
|
624
|
+
let showBands = false;
|
|
625
|
+
let bandLabelsLeft = false;
|
|
626
|
+
let axis: [string, string] | null = null;
|
|
627
|
+
|
|
628
|
+
if (variant === 'saturation-story') {
|
|
629
|
+
/* SP-01 — the creatine story */
|
|
630
|
+
const taken = doses ?? CREATINE_DOSES;
|
|
631
|
+
const n = taken.length;
|
|
632
|
+
const lv = levels ?? satLevels(taken, kUp, kDown);
|
|
633
|
+
const pts: Pt[] = lv.map((v, i) => [dayX(i, n), lvlY(v)]);
|
|
634
|
+
showBands = bands ?? true;
|
|
635
|
+
axis = [startLabel ?? 'DAY 1', endLabel ?? 'TODAY'];
|
|
636
|
+
// the missed window: first run of ≥2 consecutive misses
|
|
637
|
+
let m0 = -1;
|
|
638
|
+
let m1 = -1;
|
|
639
|
+
for (let i = 0; i < n; i++) {
|
|
640
|
+
if (!taken[i]) {
|
|
641
|
+
if (m0 === -1) {
|
|
642
|
+
m0 = i;
|
|
643
|
+
m1 = i;
|
|
644
|
+
} else if (m1 === i - 1) {
|
|
645
|
+
m1 = i;
|
|
646
|
+
}
|
|
647
|
+
} else if (m0 !== -1 && m1 >= m0 + 1) break;
|
|
648
|
+
else if (m0 !== -1 && m1 === m0) {
|
|
649
|
+
m0 = -1;
|
|
650
|
+
m1 = -1;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
const hasMiss = m0 !== -1 && m1 > m0;
|
|
654
|
+
// SATURATED pill: the peak before the missed window, else first level ≥ 0.72
|
|
655
|
+
const satIdx = hasMiss ? m0 - 1 : lv.findIndex((v) => v >= 0.72);
|
|
656
|
+
const nAt = noteAt ?? (hasMiss ? m1 : -1);
|
|
657
|
+
const noteText = note ?? (nAt >= 0 ? `STILL ${Math.round((lv[nAt] ?? 0) * 100)}% · REBUILDING` : undefined);
|
|
658
|
+
body = n === 0 ? null : (
|
|
659
|
+
<G>
|
|
660
|
+
<DoseDots taken={taken} y={H - PAD.b - 4} />
|
|
661
|
+
{levelLine(pts, { glow: shine })}
|
|
662
|
+
{hasMiss ? (
|
|
663
|
+
<G>
|
|
664
|
+
<Rect
|
|
665
|
+
x={rd(dayX(m0, n) - 6)}
|
|
666
|
+
y={PAD.t}
|
|
667
|
+
width={rd(dayX(m1, n) - dayX(m0, n) + 12)}
|
|
668
|
+
height={PLOT_H - 10}
|
|
669
|
+
rx={5}
|
|
670
|
+
fill={colors.zoneLow}
|
|
671
|
+
opacity={0.07}
|
|
672
|
+
/>
|
|
673
|
+
<Tag x={(dayX(m0, n) + dayX(m1, n)) / 2} y={PAD.t + 8} color={colors.zoneLow} text={`MISSED × ${m1 - m0 + 1}`} />
|
|
674
|
+
</G>
|
|
675
|
+
) : null}
|
|
676
|
+
{satIdx >= 0 && lv[satIdx] >= 0.72 ? (
|
|
677
|
+
<Tag x={dayX(satIdx, n)} y={pts[satIdx][1] - 13} color={colors.mint} text="SATURATED" />
|
|
678
|
+
) : null}
|
|
679
|
+
{noteText && nAt >= 0 && nAt < n ? (
|
|
680
|
+
<Tag x={dayX(nAt, n) + 10} y={pts[nAt][1] + 15} color={colors.zoneMid} anchor="start" text={noteText} />
|
|
681
|
+
) : null}
|
|
682
|
+
<PulseDot x={pts[n - 1][0]} y={pts[n - 1][1]} color={colors.mint} />
|
|
683
|
+
</G>
|
|
684
|
+
);
|
|
685
|
+
} else if (variant === 'active-stack') {
|
|
686
|
+
/* SP-02 — 4 rows: name + level bar + % + status pill */
|
|
687
|
+
const rws = rows.slice(0, 4);
|
|
688
|
+
const rh = PLOT_H / 4;
|
|
689
|
+
const barW = PLOT_W - 150;
|
|
690
|
+
body = (
|
|
691
|
+
<G>
|
|
692
|
+
{rws.map((r, ri) => {
|
|
693
|
+
const y = PAD.t + 8 + ri * rh + rh / 2;
|
|
694
|
+
const c = r.color ?? zoneOf(r.level);
|
|
695
|
+
return (
|
|
696
|
+
<G key={ri}>
|
|
697
|
+
<Label x={PAD.l + 66} y={y - 8} fill={colors.textDim} anchor="end">
|
|
698
|
+
{r.name}
|
|
699
|
+
</Label>
|
|
700
|
+
<Rect x={PAD.l + 74} y={rd(y - 13)} width={barW} height={10} rx={5} fill={colors.glass2} />
|
|
701
|
+
<Rect
|
|
702
|
+
x={PAD.l + 74}
|
|
703
|
+
y={rd(y - 13)}
|
|
704
|
+
width={rd(Math.max(10, barW * Math.max(0, Math.min(1, r.level))))}
|
|
705
|
+
height={10}
|
|
706
|
+
rx={5}
|
|
707
|
+
fill={c}
|
|
708
|
+
opacity={0.92}
|
|
709
|
+
/>
|
|
710
|
+
<Label x={PAD.l + 80 + barW} y={y - 5} fill={c} anchor="start">
|
|
711
|
+
{`${Math.round(r.level * 100)}%`}
|
|
712
|
+
</Label>
|
|
713
|
+
<Tag x={PAD.l + 74 + barW} y={y + 6} color={c} anchor="end" text={r.status ?? statusOf(r.level)} />
|
|
714
|
+
</G>
|
|
715
|
+
);
|
|
716
|
+
})}
|
|
717
|
+
</G>
|
|
718
|
+
);
|
|
719
|
+
} else if (variant === 'half-life') {
|
|
720
|
+
/* SP-03 — exponential decay from the dose */
|
|
721
|
+
const n = 25;
|
|
722
|
+
const pts: Pt[] = [];
|
|
723
|
+
for (let i = 0; i < n; i++) {
|
|
724
|
+
const t = (i / (n - 1)) * windowH;
|
|
725
|
+
pts.push([dayX(i, n), lvlY(Math.pow(0.5, t / halfLifeH))]);
|
|
726
|
+
}
|
|
727
|
+
showBands = bands ?? true;
|
|
728
|
+
axis = [startLabel ?? '0H', endLabel ?? `+${windowH}H`];
|
|
729
|
+
const remain = Math.pow(0.5, nowH / halfLifeH);
|
|
730
|
+
const nowX = PAD.l + 14 + (PLOT_W - 22) * Math.max(0, Math.min(1, nowH / windowH));
|
|
731
|
+
const nowY = lvlY(remain);
|
|
732
|
+
body = (
|
|
733
|
+
<G>
|
|
734
|
+
{levelLine(pts, { stroke: color ?? colors.zoneMid, glow: shine })}
|
|
735
|
+
<Line x1={rd(nowX)} x2={rd(nowX)} y1={PAD.t - 2} y2={H - PAD.b} stroke={colors.text} strokeOpacity={0.22} strokeWidth={1} />
|
|
736
|
+
<Label x={nowX} y={PAD.t - 5} fill={colors.textDim}>
|
|
737
|
+
NOW
|
|
738
|
+
</Label>
|
|
739
|
+
<PulseDot x={nowX} y={nowY} color={colors.zoneMid} />
|
|
740
|
+
<Tag
|
|
741
|
+
x={nowX + 10}
|
|
742
|
+
y={nowY - 14}
|
|
743
|
+
color={colors.zoneMid}
|
|
744
|
+
anchor="start"
|
|
745
|
+
text={nowNote ?? `STILL ACTIVE · ${Math.round(doseMg * remain)} MG`}
|
|
746
|
+
/>
|
|
747
|
+
<Tag
|
|
748
|
+
x={dayX(2, n) + 16}
|
|
749
|
+
y={lvlY(0.97) + 12}
|
|
750
|
+
color={colors.textDim}
|
|
751
|
+
anchor="start"
|
|
752
|
+
text={doseLabel ?? `DOSE ${doseMg} MG`}
|
|
753
|
+
/>
|
|
754
|
+
</G>
|
|
755
|
+
);
|
|
756
|
+
} else if (variant === 'dose-level') {
|
|
757
|
+
/* SP-04 — dose dots + faint intake stems + resulting level line */
|
|
758
|
+
const taken = doses ?? DOSE_LEVEL_DOSES;
|
|
759
|
+
const n = taken.length;
|
|
760
|
+
const lv = levels ?? satLevels(taken, kUp, kDown);
|
|
761
|
+
const pts: Pt[] = lv.map((v, i) => [dayX(i, n), lvlY(v)]);
|
|
762
|
+
showBands = bands ?? true;
|
|
763
|
+
body = n === 0 ? null : (
|
|
764
|
+
<G>
|
|
765
|
+
{taken.map((t, i) =>
|
|
766
|
+
t ? (
|
|
767
|
+
<Line
|
|
768
|
+
key={i}
|
|
769
|
+
x1={rd(dayX(i, n))}
|
|
770
|
+
x2={rd(dayX(i, n))}
|
|
771
|
+
y1={H - PAD.b}
|
|
772
|
+
y2={rd(lvlY(lv[i]))}
|
|
773
|
+
stroke={colors.mint}
|
|
774
|
+
strokeWidth={3}
|
|
775
|
+
strokeLinecap="round"
|
|
776
|
+
opacity={0.22}
|
|
777
|
+
/>
|
|
778
|
+
) : null,
|
|
779
|
+
)}
|
|
780
|
+
<DoseDots taken={taken} y={H - PAD.b - 4} />
|
|
781
|
+
{levelLine(pts, { glow: shine })}
|
|
782
|
+
<Tag x={W - PAD.r - 4} y={PAD.t + 10} color={colors.textDim} anchor="end" text={note ?? 'DOTS = DOSES · LINE = LEVEL'} />
|
|
783
|
+
</G>
|
|
784
|
+
);
|
|
785
|
+
} else if (variant === 'depletion-forecast') {
|
|
786
|
+
/* SP-05 — solid past · dashed decay projection · LOW crossing pulse */
|
|
787
|
+
const past = levels ?? DEFAULT_FORECAST_PAST;
|
|
788
|
+
const n = Math.max(projectDays, past.length + 1);
|
|
789
|
+
const all = past.slice();
|
|
790
|
+
for (let i = past.length; i < n; i++) all.push(all[i - 1] * decayRate);
|
|
791
|
+
const pts: Pt[] = all.map((v, i) => [dayX(i, n), lvlY(v)]);
|
|
792
|
+
showBands = bands ?? true;
|
|
793
|
+
const nowPt = past.length > 0 ? pts[past.length - 1] : null;
|
|
794
|
+
let crossI = -1;
|
|
795
|
+
for (let i = past.length; i < n; i++)
|
|
796
|
+
if (all[i] < lowThreshold) {
|
|
797
|
+
crossI = i;
|
|
798
|
+
break;
|
|
799
|
+
}
|
|
800
|
+
body = nowPt == null ? null : (
|
|
801
|
+
<G>
|
|
802
|
+
{levelLine(pts.slice(0, past.length), { stroke: lineColor, glow: shine })}
|
|
803
|
+
{levelLine(pts.slice(past.length - 1), { stroke: lineColor, dash: [5, 5], opacity: 0.75 })}
|
|
804
|
+
<Line x1={rd(nowPt[0])} x2={rd(nowPt[0])} y1={PAD.t - 2} y2={H - PAD.b} stroke={colors.text} strokeOpacity={0.22} strokeWidth={1} />
|
|
805
|
+
<Label x={nowPt[0]} y={PAD.t - 5} fill={colors.textDim}>
|
|
806
|
+
NOW
|
|
807
|
+
</Label>
|
|
808
|
+
{crossI >= 0 ? (
|
|
809
|
+
<G>
|
|
810
|
+
<PulseDot x={pts[crossI][0]} y={pts[crossI][1]} color={colors.zoneLow} />
|
|
811
|
+
<Tag
|
|
812
|
+
x={pts[crossI][0] - 6}
|
|
813
|
+
y={pts[crossI][1] - 15}
|
|
814
|
+
color={colors.zoneLow}
|
|
815
|
+
anchor="end"
|
|
816
|
+
text={restockNote ?? `LOW IN ${crossI - past.length + 1} DAYS — RESTOCK`}
|
|
817
|
+
/>
|
|
818
|
+
</G>
|
|
819
|
+
) : null}
|
|
820
|
+
</G>
|
|
821
|
+
);
|
|
822
|
+
} else if (variant === 'adherence-level') {
|
|
823
|
+
/* SP-06 — taken/missed day cells + the resulting level line under */
|
|
824
|
+
const taken = doses ?? ADHERENCE_DOSES;
|
|
825
|
+
const n = taken.length;
|
|
826
|
+
const lv = levels ?? satLevels(taken, kUp, kDown);
|
|
827
|
+
// the line rides at 62% of the model level so it clears the cells strip
|
|
828
|
+
const pts: Pt[] = lv.map((v, i) => [dayX(i, n), lvlY(v * 0.62)]);
|
|
829
|
+
const cw = (PLOT_W - 26) / Math.max(1, n);
|
|
830
|
+
body = n === 0 ? null : (
|
|
831
|
+
<G>
|
|
832
|
+
{taken.map((t, i) => (
|
|
833
|
+
<Rect
|
|
834
|
+
key={i}
|
|
835
|
+
x={rd(dayX(i, n) - cw / 2 + 1)}
|
|
836
|
+
y={PAD.t + 4}
|
|
837
|
+
width={rd(cw - 2)}
|
|
838
|
+
height={12}
|
|
839
|
+
rx={3}
|
|
840
|
+
fill={t ? colors.mint : 'none'}
|
|
841
|
+
stroke={t ? 'none' : colors.zoneLow}
|
|
842
|
+
strokeWidth={t ? 0 : 1}
|
|
843
|
+
strokeDasharray={t ? undefined : [2, 2]}
|
|
844
|
+
opacity={t ? 0.75 : 1}
|
|
845
|
+
/>
|
|
846
|
+
))}
|
|
847
|
+
<Label x={PAD.l + 14} y={PAD.t + 26} fill={colors.textFaint} anchor="start">
|
|
848
|
+
TAKEN / MISSED
|
|
849
|
+
</Label>
|
|
850
|
+
{levelLine(pts, { stroke: lineColor, glow: shine })}
|
|
851
|
+
<Tag
|
|
852
|
+
x={W - PAD.r - 4}
|
|
853
|
+
y={lvlY(0.62 * lv[n - 1]) - 13}
|
|
854
|
+
color={lineColor}
|
|
855
|
+
anchor="end"
|
|
856
|
+
text={note ?? `LEVEL ${Math.round(lv[n - 1] * 100)}%`}
|
|
857
|
+
/>
|
|
858
|
+
</G>
|
|
859
|
+
);
|
|
860
|
+
} else if (variant === 'stack-levels') {
|
|
861
|
+
/* SP-07 — 3 level curves with different kinetics + end-of-line pills */
|
|
862
|
+
const trio = (series ?? DEFAULT_STACK_SERIES).slice(0, 3);
|
|
863
|
+
const widths = [2.5, 2, 1.8];
|
|
864
|
+
const opacities = [1, 0.85, 0.8];
|
|
865
|
+
const colorsBy = [colors.mint, colors.cyan, colors.zoneMid];
|
|
866
|
+
showBands = bands ?? true;
|
|
867
|
+
bandLabelsLeft = true; // the right edge belongs to the series pills
|
|
868
|
+
// pill y from each series' FINAL level; overlapping pills are pushed apart
|
|
869
|
+
// (min gap = pill height + 2) top-down, then clamped inside the plot
|
|
870
|
+
const pillH = 13;
|
|
871
|
+
const pillYs = trio.map((s) => lvlY(s.levels[s.levels.length - 1] ?? 0));
|
|
872
|
+
const order = pillYs.map((y, si) => ({ si, y })).sort((a, b) => a.y - b.y);
|
|
873
|
+
const yMin = PAD.t + pillH / 2;
|
|
874
|
+
const yMax = H - PAD.b - pillH / 2;
|
|
875
|
+
order.forEach((p, i) => {
|
|
876
|
+
p.y = Math.max(yMin, Math.min(p.y, yMax));
|
|
877
|
+
if (i > 0) p.y = Math.max(p.y, order[i - 1].y + pillH + 2);
|
|
878
|
+
});
|
|
879
|
+
// if the pushed chain ran past the plot bottom, shift it back up whole
|
|
880
|
+
const over = order.length > 0 ? order[order.length - 1].y - yMax : 0;
|
|
881
|
+
if (over > 0) order.forEach((p) => (p.y -= over));
|
|
882
|
+
order.forEach((p) => (pillYs[p.si] = p.y));
|
|
883
|
+
body = (
|
|
884
|
+
<G>
|
|
885
|
+
{trio.map((s, si) => {
|
|
886
|
+
const n = s.levels.length;
|
|
887
|
+
const pts: Pt[] = s.levels.map((v, i) => [dayX(i, n), lvlY(v)]);
|
|
888
|
+
return (
|
|
889
|
+
<G key={si}>
|
|
890
|
+
{levelLine(pts, {
|
|
891
|
+
stroke: s.color ?? colorsBy[si],
|
|
892
|
+
w: widths[si],
|
|
893
|
+
dash: s.dash ? [4, 3] : undefined,
|
|
894
|
+
opacity: opacities[si] === 1 ? undefined : opacities[si],
|
|
895
|
+
glow: shine && si === 0,
|
|
896
|
+
})}
|
|
897
|
+
</G>
|
|
898
|
+
);
|
|
899
|
+
})}
|
|
900
|
+
{trio.map((s, si) => (
|
|
901
|
+
<Tag key={si} x={W - PAD.r - 4} y={pillYs[si]} color={s.color ?? colorsBy[si]} anchor="end" text={s.name} />
|
|
902
|
+
))}
|
|
903
|
+
</G>
|
|
904
|
+
);
|
|
905
|
+
} else if (variant === 'liquid-batteries') {
|
|
906
|
+
/* SP-09 — 5 battery vessels in a bar-chart row */
|
|
907
|
+
const vs = vessels.slice(0, 5);
|
|
908
|
+
const n = vs.length;
|
|
909
|
+
const slot = PLOT_W / n;
|
|
910
|
+
const bw = 34;
|
|
911
|
+
const bh = PLOT_H - 26;
|
|
912
|
+
body = (
|
|
913
|
+
<G>
|
|
914
|
+
{vs.map((v, i) => {
|
|
915
|
+
const x = PAD.l + i * slot + (slot - bw) / 2;
|
|
916
|
+
const y = PAD.t + 10;
|
|
917
|
+
return (
|
|
918
|
+
<G key={i}>
|
|
919
|
+
<VesselGlyph
|
|
920
|
+
x={x}
|
|
921
|
+
y={y}
|
|
922
|
+
w={bw}
|
|
923
|
+
h={bh}
|
|
924
|
+
level={v.level}
|
|
925
|
+
vid={`lk-supp-${uid}-${i}`}
|
|
926
|
+
bubbles={v.level > 0.3}
|
|
927
|
+
shine={shine}
|
|
928
|
+
/>
|
|
929
|
+
<Label x={x + bw / 2} y={H - 2} fill={zoneOf(v.level)}>
|
|
930
|
+
{v.name}
|
|
931
|
+
</Label>
|
|
932
|
+
</G>
|
|
933
|
+
);
|
|
934
|
+
})}
|
|
935
|
+
</G>
|
|
936
|
+
);
|
|
937
|
+
} else {
|
|
938
|
+
/* SP-10 — battery-hero: one large 56px vessel + side ticks + stats */
|
|
939
|
+
const bx = 78;
|
|
940
|
+
const by = PAD.t + 12;
|
|
941
|
+
const bw = 56;
|
|
942
|
+
const bh = PLOT_H - 20;
|
|
943
|
+
const lowY = by + bh - (bh - 6) * lowAt;
|
|
944
|
+
body = (
|
|
945
|
+
<G>
|
|
946
|
+
<VesselGlyph x={bx} y={by} w={bw} h={bh} level={level} vid={`lk-supp-${uid}-hero`} bubbles shine={shine} />
|
|
947
|
+
{/* FULL / LOW ticks */}
|
|
948
|
+
<Line x1={bx + bw + 4} x2={bx + bw + 10} y1={by + 4} y2={by + 4} stroke={colors.text} strokeOpacity={0.35} strokeWidth={1} />
|
|
949
|
+
<Label x={bx + bw + 14} y={by + 7} fill={colors.textFaint} anchor="start">
|
|
950
|
+
FULL
|
|
951
|
+
</Label>
|
|
952
|
+
<Line x1={bx + bw + 4} x2={bx + bw + 10} y1={rd(lowY)} y2={rd(lowY)} stroke={colors.zoneLow} strokeWidth={1} />
|
|
953
|
+
<Label x={bx + bw + 14} y={lowY + 3} fill={colors.zoneLow} anchor="start">
|
|
954
|
+
LOW
|
|
955
|
+
</Label>
|
|
956
|
+
{/* right-side stats */}
|
|
957
|
+
<SvgText x={196} y={56} fill={colors.text} fontSize={24} fontFamily={fonts.display} fontWeight="700">
|
|
958
|
+
{`${Math.round(Math.max(0, Math.min(1, level)) * 100)}%`}
|
|
959
|
+
</SvgText>
|
|
960
|
+
{heroCaption ? (
|
|
961
|
+
<Label x={196} y={72} fill={colors.textDim} anchor="start">
|
|
962
|
+
{heroCaption}
|
|
963
|
+
</Label>
|
|
964
|
+
) : null}
|
|
965
|
+
{heroStatus ? <Tag x={196 + 34} y={92} color={heroStatusColor} text={heroStatus} /> : null}
|
|
966
|
+
{heroNote ? (
|
|
967
|
+
<Label x={196} y={112} fill={colors.textFaint} anchor="start">
|
|
968
|
+
{heroNote}
|
|
969
|
+
</Label>
|
|
970
|
+
) : null}
|
|
971
|
+
</G>
|
|
972
|
+
);
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
return (
|
|
976
|
+
<View accessibilityRole="image" accessibilityLabel={ariaLabel} style={[styles.root, style]}>
|
|
977
|
+
<Svg width="100%" height="100%" viewBox={`0 0 ${W} ${H}`}>
|
|
978
|
+
{/* real Gaussian blur for the level-line glow (Fabric-native in
|
|
979
|
+
react-native-svg 15) — the native twin of the web `.lk-supp-shine`
|
|
980
|
+
`blur(5px)` underlay. Region in user space so a flat (plateaued)
|
|
981
|
+
level line never clips the blur to its bounding box. */}
|
|
982
|
+
<Defs>
|
|
983
|
+
<Filter
|
|
984
|
+
id={blurId}
|
|
985
|
+
filterUnits="userSpaceOnUse"
|
|
986
|
+
x={-10}
|
|
987
|
+
y={-10}
|
|
988
|
+
width={W + 20}
|
|
989
|
+
height={H + 20}
|
|
990
|
+
>
|
|
991
|
+
<FeGaussianBlur stdDeviation={2.5} />
|
|
992
|
+
</Filter>
|
|
993
|
+
</Defs>
|
|
994
|
+
{title ? (
|
|
995
|
+
<Label x={PAD.l + 2} y={11} fill={colors.textFaint} anchor="start">
|
|
996
|
+
{title}
|
|
997
|
+
</Label>
|
|
998
|
+
) : null}
|
|
999
|
+
{stat ? (
|
|
1000
|
+
<SvgText x={W - PAD.r - 2} y={12} fill={statColor} textAnchor="end" fontSize={12} fontFamily={fonts.display} fontWeight="700">
|
|
1001
|
+
{stat}
|
|
1002
|
+
</SvgText>
|
|
1003
|
+
) : null}
|
|
1004
|
+
{showBands ? <LevelBands labelsLeft={bandLabelsLeft} /> : null}
|
|
1005
|
+
{body}
|
|
1006
|
+
{axis ? (
|
|
1007
|
+
<G>
|
|
1008
|
+
<Label x={PAD.l + 14} y={H - 2} fill={colors.textFaint} anchor="start">
|
|
1009
|
+
{axis[0]}
|
|
1010
|
+
</Label>
|
|
1011
|
+
<Label x={W - PAD.r - 2} y={H - 2} fill={colors.textFaint} anchor="end">
|
|
1012
|
+
{axis[1]}
|
|
1013
|
+
</Label>
|
|
1014
|
+
</G>
|
|
1015
|
+
) : null}
|
|
1016
|
+
</Svg>
|
|
1017
|
+
</View>
|
|
1018
|
+
);
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
/* SP-07 default — the catalog's three kinetics (slow build · mid · sawtooth) */
|
|
1022
|
+
const DEFAULT_STACK_SERIES: SupplementSeries[] = [
|
|
1023
|
+
{ name: 'CREATINE', levels: satLevels(CREATINE_DOSES, 0.3, 0.12), color: colors.mint },
|
|
1024
|
+
{
|
|
1025
|
+
name: 'MAGNESIUM',
|
|
1026
|
+
levels: satLevels(
|
|
1027
|
+
[true, false, true, true, false, true, true, false, true, true, true, false, true, true],
|
|
1028
|
+
0.45,
|
|
1029
|
+
0.35,
|
|
1030
|
+
),
|
|
1031
|
+
color: colors.cyan,
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
name: 'CAFFEINE',
|
|
1035
|
+
levels: Array.from({ length: 14 }, (_, i) => 0.15 + 0.5 * Math.abs(Math.sin(i * 1.7)) * Math.pow(0.9, i % 3)),
|
|
1036
|
+
color: colors.zoneMid,
|
|
1037
|
+
dash: true,
|
|
1038
|
+
},
|
|
1039
|
+
];
|
|
1040
|
+
|
|
1041
|
+
const styles = StyleSheet.create({
|
|
1042
|
+
/* fixed catalog aspect (320×150); the Svg scales the viewBox to fit */
|
|
1043
|
+
root: { width: '100%', aspectRatio: W / H },
|
|
1044
|
+
});
|