@adminide-stack/yantra-mobile 12.0.131 → 12.0.132

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.
Files changed (149) hide show
  1. package/lib/components/CustomDrawer.js +2 -2
  2. package/lib/components/CustomDrawer.js.map +1 -1
  3. package/lib/features/apps/AppsCatalog.js +7 -1
  4. package/lib/features/apps/AppsCatalog.js.map +1 -1
  5. package/lib/features/apps/nativeSurfaceTwin.js +35 -0
  6. package/lib/features/apps/nativeSurfaceTwin.js.map +1 -0
  7. package/lib/features/canvas/CanvasBoardsGrid.js +49 -49
  8. package/lib/features/canvas/CanvasBoardsGrid.js.map +1 -1
  9. package/lib/features/canvas/CanvasExperience.js +69 -28
  10. package/lib/features/canvas/CanvasExperience.js.map +1 -1
  11. package/lib/features/canvas/audioEditor/AudioWaveform.js +1 -1
  12. package/lib/features/canvas/designCatalog.js +63 -39
  13. package/lib/features/canvas/designCatalog.js.map +1 -1
  14. package/lib/features/canvas/designCategories.js +56 -0
  15. package/lib/features/canvas/designCategories.js.map +1 -1
  16. package/lib/features/canvas/generator/DirectorSheet.js +3 -2
  17. package/lib/features/canvas/generator/DirectorSheet.js.map +1 -1
  18. package/lib/features/canvas/home/HeroComposer.js +165 -76
  19. package/lib/features/canvas/home/HeroComposer.js.map +1 -1
  20. package/lib/features/canvas/home/HeroMonitor.js +75 -46
  21. package/lib/features/canvas/home/HeroMonitor.js.map +1 -1
  22. package/lib/features/canvas/home/TemplatesGallery.js +273 -138
  23. package/lib/features/canvas/home/TemplatesGallery.js.map +1 -1
  24. package/lib/features/canvas/home/templatesGallerySources.js +221 -0
  25. package/lib/features/canvas/home/templatesGallerySources.js.map +1 -0
  26. package/lib/features/canvas/homeWork.js +12 -11
  27. package/lib/features/canvas/homeWork.js.map +1 -1
  28. package/lib/features/canvas/lazyEditors.js +51 -0
  29. package/lib/features/canvas/lazyEditors.js.map +1 -0
  30. package/lib/features/canvas/rankedCatalogSearch.js +33 -23
  31. package/lib/features/canvas/rankedCatalogSearch.js.map +1 -1
  32. package/lib/features/canvas/set/SetViewportWebView.js +1 -1
  33. package/lib/features/canvas/set/agent/tools.js +1 -1
  34. package/lib/features/canvas/studioCatalog.js +2 -2
  35. package/lib/features/canvas/studioCatalog.js.map +1 -1
  36. package/lib/features/canvas/templateSearch.js +8 -1
  37. package/lib/features/canvas/templateSearch.js.map +1 -1
  38. package/lib/features/canvas/videoEditor/BlurBoxOverlay.js +1 -1
  39. package/lib/features/design/DesignEditorExperience.js +103 -29
  40. package/lib/features/design/DesignEditorExperience.js.map +1 -1
  41. package/lib/features/design/DesignExperience.js +4 -3
  42. package/lib/features/design/DesignExperience.js.map +1 -1
  43. package/lib/features/design/doc/aiDesign.js +1 -1
  44. package/lib/features/design/doc/aiDesign.js.map +1 -1
  45. package/lib/features/design/doc/artifacts.js +40 -13
  46. package/lib/features/design/doc/artifacts.js.map +1 -1
  47. package/lib/features/design/doc/chart.js +387 -13
  48. package/lib/features/design/doc/chart.js.map +1 -1
  49. package/lib/features/design/doc/copyStyle.js +47 -0
  50. package/lib/features/design/doc/copyStyle.js.map +1 -0
  51. package/lib/features/design/doc/docOps.js +22 -4
  52. package/lib/features/design/doc/docOps.js.map +1 -1
  53. package/lib/features/design/doc/geometry.js +32 -18
  54. package/lib/features/design/doc/geometry.js.map +1 -1
  55. package/lib/features/design/doc/newDoc.js +5 -1
  56. package/lib/features/design/doc/newDoc.js.map +1 -1
  57. package/lib/features/design/doc/resize.js +101 -0
  58. package/lib/features/design/doc/resize.js.map +1 -0
  59. package/lib/features/design/doc/sizes.js +15 -2
  60. package/lib/features/design/doc/sizes.js.map +1 -1
  61. package/lib/features/design/editor/ChartDataPanel.js +49 -9
  62. package/lib/features/design/editor/ChartDataPanel.js.map +1 -1
  63. package/lib/features/design/editor/CropOverlay.js +1 -1
  64. package/lib/features/design/editor/DesignCanvas.js +14 -13
  65. package/lib/features/design/editor/DesignCanvas.js.map +1 -1
  66. package/lib/features/design/editor/ExportSheet.js +8 -4
  67. package/lib/features/design/editor/ExportSheet.js.map +1 -1
  68. package/lib/features/design/editor/LayerTools.js +37 -5
  69. package/lib/features/design/editor/LayerTools.js.map +1 -1
  70. package/lib/features/design/editor/Slideshow.js +30 -5
  71. package/lib/features/design/editor/Slideshow.js.map +1 -1
  72. package/lib/features/design/editor/useDesignSave.js +21 -36
  73. package/lib/features/design/editor/useDesignSave.js.map +1 -1
  74. package/lib/features/design/export/exportDesign.js +3 -1
  75. package/lib/features/design/export/exportDesign.js.map +1 -1
  76. package/lib/features/design/home/DesignHome.js +7 -2
  77. package/lib/features/design/home/DesignHome.js.map +1 -1
  78. package/lib/features/design/render/DesignPageView.js +1 -1
  79. package/lib/features/design/render/DesignPageView.js.map +1 -1
  80. package/lib/features/design/render/PageCapture.js +11 -10
  81. package/lib/features/design/render/PageCapture.js.map +1 -1
  82. package/lib/features/design/render/fontRegistry.js +27 -3
  83. package/lib/features/design/render/fontRegistry.js.map +1 -1
  84. package/lib/features/design/render/svgParts.js +27 -74
  85. package/lib/features/design/render/svgParts.js.map +1 -1
  86. package/lib/features/devices/brands/qnScale.js +7 -2
  87. package/lib/features/devices/brands/qnScale.js.map +1 -1
  88. package/lib/features/devices/brands/uuids.js +2 -1
  89. package/lib/features/devices/brands/uuids.js.map +1 -1
  90. package/lib/features/devices/devices.js +2 -1
  91. package/lib/features/devices/devices.js.map +1 -1
  92. package/lib/features/docs/DocBlockRow.js +1 -1
  93. package/lib/features/docs/docArtifacts.js +2 -2
  94. package/lib/features/docs/docArtifacts.js.map +1 -1
  95. package/lib/features/health/healthSync.js +3 -1
  96. package/lib/features/health/healthSync.js.map +1 -1
  97. package/lib/features/health/nativeHealth.js +8 -0
  98. package/lib/features/health/nativeHealth.js.map +1 -0
  99. package/lib/features/links/openInApp.js +11 -1
  100. package/lib/features/links/openInApp.js.map +1 -1
  101. package/lib/features/webbuilder/WebBuilderExperience.js +135 -28
  102. package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
  103. package/lib/features/webbuilder/buildFragments.js +14 -6
  104. package/lib/features/webbuilder/buildFragments.js.map +1 -1
  105. package/lib/features/webbuilder/components/PreviewFrame.js +28 -3
  106. package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
  107. package/lib/features/webbuilder/components/PreviewScreen.js +1 -1
  108. package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
  109. package/lib/features/webbuilder/components/ProjectChat.js +24 -5
  110. package/lib/features/webbuilder/components/ProjectChat.js.map +1 -1
  111. package/lib/features/webbuilder/components/ProjectsScreen.js +18 -2
  112. package/lib/features/webbuilder/components/ProjectsScreen.js.map +1 -1
  113. package/lib/features/webbuilder/components/ui.js +20 -6
  114. package/lib/features/webbuilder/components/ui.js.map +1 -1
  115. package/lib/features/webbuilder/exportCode.js +52 -0
  116. package/lib/features/webbuilder/exportCode.js.map +1 -0
  117. package/lib/features/webbuilder/siteAddress.js +71 -0
  118. package/lib/features/webbuilder/siteAddress.js.map +1 -0
  119. package/lib/features/webbuilder/widgetBlocks.js +30 -0
  120. package/lib/features/webbuilder/widgetBlocks.js.map +1 -0
  121. package/lib/screens/Chat/index.js +5 -6
  122. package/lib/screens/Chat/index.js.map +1 -1
  123. package/lib/screens/ChatHistory/index.js +3 -2
  124. package/lib/screens/ChatHistory/index.js.map +1 -1
  125. package/lib/screens/Home/HomeScreen.js +20 -4
  126. package/lib/screens/Home/HomeScreen.js.map +1 -1
  127. package/lib/screens/Home/components/WebBuilderCodePrewarm.js +18 -0
  128. package/lib/screens/Home/components/WebBuilderCodePrewarm.js.map +1 -0
  129. package/lib/screens/WebBuilderNative/index.js +1 -1
  130. package/lib/screens/WebBuilderNative/index.js.map +1 -1
  131. package/lib/screens/WebBuilderNative/keepAlive.js +112 -0
  132. package/lib/screens/WebBuilderNative/keepAlive.js.map +1 -0
  133. package/lib/screens/WebBuilderNative/runningBuilds.js +40 -0
  134. package/lib/screens/WebBuilderNative/runningBuilds.js.map +1 -0
  135. package/lib/screens/WebBuilderNative/useSandboxKeepAlive.js +57 -0
  136. package/lib/screens/WebBuilderNative/useSandboxKeepAlive.js.map +1 -0
  137. package/lib/screens/WebBuilderNative/useWebBuilderGallery.js +73 -14
  138. package/lib/screens/WebBuilderNative/useWebBuilderGallery.js.map +1 -1
  139. package/lib/screens/WebBuilderNative/useWebBuilderHost.js +143 -34
  140. package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
  141. package/lib/screens/WebBuilderNative/useWebBuilderJobs.js +17 -5
  142. package/lib/screens/WebBuilderNative/useWebBuilderJobs.js.map +1 -1
  143. package/lib/screens/WebBuilderNative/versionUndo.js +144 -0
  144. package/lib/screens/WebBuilderNative/versionUndo.js.map +1 -0
  145. package/lib/screens/WebBuilderNative/webbuilderSnapshotKey.js +1 -0
  146. package/lib/screens/WebBuilderNative/webbuilderSnapshotKey.js.map +1 -0
  147. package/lib/screens/WebBuilderNative/webbuilderTransport.js +90 -6
  148. package/lib/screens/WebBuilderNative/webbuilderTransport.js.map +1 -1
  149. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import {jsxs,jsx}from'react/jsx-runtime';import {useMemo,useState,useCallback}from'react';import {View,Text,Modal,TextInput,ScrollView,ActivityIndicator,StyleSheet}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Image}from'expo-image';import {useCanvasTheme,themedStyles}from'../canvasTheme.js';import {Pressable,pressedStyle,Segmented,RADIUS,SPACE,TYPE}from'../canvasUi.js';import {HeroMonitor}from'./HeroMonitor.js';import {DirectorSheet,DirectorPill}from'../generator/DirectorSheet.js';import {EMPTY_DIRECTION,directedPrompt}from'../generator/direction.js';import {heroShots,heroAspectOf,nextIn,heroSettings,HERO_ASPECTS,HERO_RESOLUTIONS}from'./heroShots.js';var __defProp = Object.defineProperty;
1
+ import {jsxs,jsx}from'react/jsx-runtime';import {useMemo,useState,useCallback}from'react';import {View,Text,Modal,TextInput,ActivityIndicator,StyleSheet}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Image}from'expo-image';import {useCanvasTheme,themedStyles}from'../canvasTheme.js';import {Pressable,pressedStyle,Segmented,RADIUS,SPACE,TYPE}from'../canvasUi.js';import {HeroMonitor}from'./HeroMonitor.js';import {DirectorSheet}from'../generator/DirectorSheet.js';import {EMPTY_DIRECTION,directedPrompt}from'../generator/direction.js';import {heroShots,heroAspectOf,nextIn,heroSettings,HERO_ASPECTS,HERO_RESOLUTIONS}from'./heroShots.js';var __defProp = Object.defineProperty;
2
2
  var __defProps = Object.defineProperties;
3
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -32,8 +32,10 @@ function HeroComposer({
32
32
  playing,
33
33
  onStartWithPrompt,
34
34
  onPickReference,
35
- onBrowseTemplates
35
+ onBrowseTemplates,
36
+ headerActions
36
37
  }) {
38
+ var _a;
37
39
  const theme = useCanvasTheme();
38
40
  const styles = makeStyles(theme);
39
41
  const shots = useMemo(() => heroShots(featuredLooks, showcase, PHONE_SHOTS), [featuredLooks, showcase]);
@@ -46,7 +48,7 @@ function HeroComposer({
46
48
  const [product, setProduct] = useState(null);
47
49
  const [attaching, setAttaching] = useState(false);
48
50
  const [direction, setDirection] = useState(EMPTY_DIRECTION);
49
- const [directing, setDirecting] = useState(false);
51
+ const [directing, setDirecting] = useState(null);
50
52
  const index = shots.length ? shot % shots.length : 0;
51
53
  const ready = Boolean(draft.trim());
52
54
  const applyShot = useCallback((s) => {
@@ -72,38 +74,31 @@ function HeroComposer({
72
74
  onStartWithPrompt(sent, heroSettings(mode, aspect, resolution, product));
73
75
  };
74
76
  return /* @__PURE__ */ jsxs(View, { style: styles.root, children: [
75
- /* @__PURE__ */ jsxs(View, { style: styles.titleRow, children: [
76
- /* @__PURE__ */ jsx(Text, { style: styles.title, accessibilityRole: "header", children: "Direct the shot" }),
77
- onBrowseTemplates ? /* @__PURE__ */ jsxs(Pressable, { onPress: onBrowseTemplates, hitSlop: 8, style: ({
78
- pressed
79
- }) => [styles.templatesLink, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: "Start from a template", testID: "hero-browse-templates", children: [
80
- /* @__PURE__ */ jsx(Text, { style: styles.templatesLinkLabel, children: "Templates" }),
81
- /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "arrow-right", size: 14, color: theme.mutedForeground })
82
- ] }) : null
83
- ] }),
84
- /* @__PURE__ */ jsx(HeroMonitor, { shots, index, onCut: setShot, paused: ready || focused, playing, still: mode === "image", aspect, resolution, slate: draft, onUseShot: applyShot }),
85
- directing ? /* @__PURE__ */ jsx(Modal, { transparent: true, animationType: "slide", visible: true, onRequestClose: () => setDirecting(false), children: /* @__PURE__ */ jsx(View, { style: styles.sheetHost, children: /* @__PURE__ */ jsx(DirectorSheet, { value: direction, onChange: setDirection, onClose: () => setDirecting(false), prompt: draft }) }) }) : null,
77
+ headerActions ? /* @__PURE__ */ jsx(View, { style: styles.actions, children: headerActions }) : null,
78
+ /* @__PURE__ */ jsx(HeroMonitor, { shots, index, onCut: setShot, paused: ready || focused, playing, still: mode === "image", aspect, resolution, slate: draft }),
79
+ /* @__PURE__ */ jsx(Text, { style: styles.headline, accessibilityRole: "header", children: "Direct the shot." }),
80
+ /* @__PURE__ */ jsx(Text, { style: styles.lede, children: "Every choice you make shows up on the monitor before you spend a run on it." }),
81
+ onBrowseTemplates ? /* @__PURE__ */ jsxs(Pressable, { onPress: onBrowseTemplates, hitSlop: 8, style: ({
82
+ pressed
83
+ }) => [styles.templatesLink, pressedStyle(pressed)], accessibilityRole: "button", testID: "hero-browse-templates", children: [
84
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "view-dashboard-outline", size: 16, color: theme.foreground }),
85
+ /* @__PURE__ */ jsx(Text, { style: styles.templatesLinkLabel, children: "Start from a template" }),
86
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "arrow-right", size: 15, color: theme.mutedForeground })
87
+ ] }) : null,
88
+ directing ? /* @__PURE__ */ jsx(Modal, { transparent: true, animationType: "slide", visible: true, onRequestClose: () => setDirecting(null), children: /* @__PURE__ */ jsx(View, { style: styles.sheetHost, children: /* @__PURE__ */ jsx(DirectorSheet, { initialTab: directing, value: direction, onChange: setDirection, onClose: () => setDirecting(null), prompt: draft }) }) }) : null,
86
89
  /* @__PURE__ */ jsxs(View, { style: styles.composer, children: [
87
- /* @__PURE__ */ jsxs(View, { style: styles.promptWell, children: [
88
- /* @__PURE__ */ jsx(TextInput, { value: draft, onChangeText: setDraft, onFocus: () => setFocused(true), onBlur: () => setFocused(false), placeholder: mode === "video" ? PLACEHOLDER : "A ceramic mug on a sunlit table, soft morning light", placeholderTextColor: theme.tint(0.32), multiline: true, style: styles.prompt, accessibilityLabel: "Describe the shot", testID: "hero-prompt" }),
89
- /* @__PURE__ */ jsx(Pressable, { onPress: submit, disabled: !ready, style: ({
90
+ /* @__PURE__ */ jsx(Segmented, { options: MODES, value: mode, onChange: setMode, style: styles.modes }),
91
+ /* @__PURE__ */ jsx(TextInput, { value: draft, onChangeText: setDraft, onFocus: () => setFocused(true), onBlur: () => setFocused(false), placeholder: ((_a = shots[index]) == null ? void 0 : _a.title) || (mode === "video" ? PLACEHOLDER : "A ceramic mug on a sunlit table"), placeholderTextColor: theme.tint(0.32), multiline: true, style: styles.prompt, accessibilityLabel: "Describe the shot", testID: "hero-prompt" }),
92
+ shots[index] ? (
93
+ // Web's "Tab: use this shot's prompt", as a tap on a phone.
94
+ /* @__PURE__ */ jsxs(Pressable, { onPress: () => applyShot(shots[index]), hitSlop: 6, style: ({
90
95
  pressed
91
- }) => [styles.send, !ready && styles.sendIdle, pressedStyle(pressed && ready)], accessibilityRole: "button", accessibilityLabel: mode === "video" ? "Generate video" : "Generate image", accessibilityState: {
92
- disabled: !ready
93
- }, testID: "hero-generate", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "arrow-up", size: 20, color: theme.primaryForeground }) })
94
- ] }),
95
- /* @__PURE__ */ jsxs(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.optionsScroll, contentContainerStyle: styles.options, keyboardShouldPersistTaps: "handled", children: [
96
- /* @__PURE__ */ jsx(Segmented, { options: MODES, value: mode, onChange: setMode }),
97
- /* @__PURE__ */ jsxs(Pressable, { onPress: () => setAspect(nextIn(HERO_ASPECTS, aspect)), style: ({
98
- pressed
99
- }) => [styles.pill, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Aspect ratio ${aspect}. Tap to change`, children: [
100
- /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "aspect-ratio", size: 15, color: theme.mutedForeground }),
101
- /* @__PURE__ */ jsx(Text, { style: styles.pillLabel, children: aspect })
102
- ] }),
103
- /* @__PURE__ */ jsx(Pressable, { onPress: () => setResolution(nextIn(HERO_RESOLUTIONS, resolution)), style: ({
104
- pressed
105
- }) => [styles.pill, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Resolution ${resolution}. Tap to change`, children: /* @__PURE__ */ jsx(Text, { style: styles.pillLabel, children: resolution }) }),
106
- mode === "video" ? /* @__PURE__ */ jsx(DirectorPill, { value: direction, onPress: () => setDirecting(true) }) : null,
96
+ }) => [styles.useShot, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Use this shot's prompt: ${shots[index].title}`, children: [
97
+ /* @__PURE__ */ jsx(View, { style: styles.useShotKey, children: /* @__PURE__ */ jsx(Text, { style: styles.useShotKeyText, children: "Tap" }) }),
98
+ /* @__PURE__ */ jsx(Text, { style: styles.useShotLabel, children: "Use this shot's prompt" })
99
+ ] })
100
+ ) : null,
101
+ /* @__PURE__ */ jsxs(View, { style: styles.chips, children: [
107
102
  product ? /* @__PURE__ */ jsxs(View, { style: styles.pill, children: [
108
103
  /* @__PURE__ */ jsx(Image, { source: {
109
104
  uri: product
@@ -115,7 +110,30 @@ function HeroComposer({
115
110
  }) => [styles.pill, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: "Add a product reference image", children: [
116
111
  attaching ? /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: theme.mutedForeground }) : /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "image-plus", size: 15, color: theme.mutedForeground }),
117
112
  /* @__PURE__ */ jsx(Text, { style: styles.pillLabel, children: "Product" })
118
- ] }) : null
113
+ ] }) : null,
114
+ mode === "video" ? [["Film setup", "movie-open-outline", "film"], ["Camera", "camera-iris", "camera"], ["Palette", "palette-outline", "look"], ["Lighting", "white-balance-sunny", "look"]].map(([label, icon, tab]) => /* @__PURE__ */ jsxs(Pressable, { onPress: () => setDirecting(tab), style: ({
115
+ pressed
116
+ }) => [styles.pill, styles.pillDashed, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: label, children: [
117
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 16, color: theme.mutedForeground }),
118
+ /* @__PURE__ */ jsx(Text, { style: styles.pillLabelSoft, children: label })
119
+ ] }, label)) : null
120
+ ] }),
121
+ /* @__PURE__ */ jsxs(View, { style: styles.bar, children: [
122
+ /* @__PURE__ */ jsx(Pressable, { onPress: () => setAspect(nextIn(HERO_ASPECTS, aspect)), hitSlop: 6, style: ({
123
+ pressed
124
+ }) => [styles.barOption, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Aspect ratio ${aspect}. Tap to change`, children: /* @__PURE__ */ jsx(Text, { style: styles.barLabel, children: aspect }) }),
125
+ /* @__PURE__ */ jsx(Pressable, { onPress: () => setResolution(nextIn(HERO_RESOLUTIONS, resolution)), hitSlop: 6, style: ({
126
+ pressed
127
+ }) => [styles.barOption, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Resolution ${resolution}. Tap to change`, children: /* @__PURE__ */ jsx(Text, { style: styles.barLabel, children: resolution }) }),
128
+ /* @__PURE__ */ jsx(View, { style: styles.spacer }),
129
+ /* @__PURE__ */ jsxs(Pressable, { onPress: submit, disabled: !ready, style: ({
130
+ pressed
131
+ }) => [styles.generate, ready ? styles.generateReady : null, pressedStyle(pressed && ready)], accessibilityRole: "button", accessibilityLabel: mode === "video" ? "Generate video" : "Generate image", accessibilityState: {
132
+ disabled: !ready
133
+ }, testID: "hero-generate", children: [
134
+ /* @__PURE__ */ jsx(Text, { style: [styles.generateLabel, ready && styles.generateLabelReady], children: "Generate" }),
135
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "arrow-right", size: 16, color: ready ? theme.primaryForeground : theme.mutedForeground })
136
+ ] })
119
137
  ] })
120
138
  ] })
121
139
  ] });
@@ -128,71 +146,100 @@ const makeStyles = themedStyles((theme) => StyleSheet.create({
128
146
  sheetHost: {
129
147
  flex: 1
130
148
  },
131
- titleRow: {
149
+ actions: {
132
150
  flexDirection: "row",
133
- alignItems: "center",
134
- justifyContent: "space-between",
135
- gap: SPACE.md
151
+ justifyContent: "flex-end",
152
+ gap: SPACE.sm,
153
+ marginBottom: -4
136
154
  },
137
- title: __spreadProps(__spreadValues({}, TYPE.heading), {
155
+ headline: {
156
+ fontSize: 36,
157
+ lineHeight: 40,
158
+ fontWeight: "800",
159
+ letterSpacing: -1,
138
160
  color: theme.foreground,
139
- flexShrink: 1
161
+ marginTop: SPACE.sm
162
+ },
163
+ lede: __spreadProps(__spreadValues({}, TYPE.body), {
164
+ color: theme.mutedForeground,
165
+ marginTop: -4
140
166
  }),
141
167
  templatesLink: {
142
168
  flexDirection: "row",
143
169
  alignItems: "center",
144
- gap: SPACE.xs,
170
+ gap: SPACE.xs + 2,
171
+ alignSelf: "flex-start",
145
172
  minHeight: 32
146
173
  },
147
174
  templatesLinkLabel: __spreadProps(__spreadValues({}, TYPE.label), {
148
- color: theme.mutedForeground
175
+ fontSize: 14,
176
+ color: theme.foreground
149
177
  }),
178
+ // A raised card, as the web composer: white on the page, hairline edge, soft shadow.
150
179
  composer: {
151
- gap: SPACE.sm,
152
- padding: SPACE.sm,
180
+ gap: SPACE.md,
181
+ padding: SPACE.md,
153
182
  borderRadius: RADIUS.xl,
154
- backgroundColor: theme.card
183
+ backgroundColor: theme.surface,
184
+ borderWidth: StyleSheet.hairlineWidth,
185
+ borderColor: theme.border,
186
+ shadowColor: "#000",
187
+ shadowOpacity: theme.isDark ? 0 : 0.06,
188
+ shadowRadius: 14,
189
+ shadowOffset: {
190
+ width: 0,
191
+ height: 6
192
+ },
193
+ elevation: theme.isDark ? 0 : 2
155
194
  },
156
- promptWell: {
157
- flexDirection: "row",
158
- alignItems: "flex-end",
159
- gap: SPACE.sm,
160
- paddingLeft: SPACE.md,
161
- paddingRight: SPACE.xs + 2,
162
- paddingVertical: SPACE.xs + 2,
163
- borderRadius: RADIUS.lg,
164
- backgroundColor: theme.isDark ? theme.secondary : theme.surface
195
+ modes: {
196
+ alignSelf: "flex-start"
165
197
  },
166
198
  prompt: __spreadProps(__spreadValues({}, TYPE.body), {
167
- flex: 1,
168
- minHeight: 64,
169
- maxHeight: 160,
170
- paddingTop: SPACE.sm,
171
- paddingBottom: SPACE.sm,
199
+ fontSize: 16,
200
+ minHeight: 96,
201
+ maxHeight: 180,
202
+ paddingHorizontal: SPACE.md,
203
+ paddingTop: SPACE.md,
204
+ paddingBottom: SPACE.md,
205
+ borderRadius: RADIUS.lg,
206
+ backgroundColor: theme.card,
172
207
  color: theme.foreground,
173
208
  textAlignVertical: "top"
174
209
  }),
175
- send: {
176
- width: 40,
177
- height: 40,
178
- borderRadius: 20,
210
+ chips: {
211
+ flexDirection: "row",
212
+ flexWrap: "wrap",
179
213
  alignItems: "center",
180
- justifyContent: "center",
181
- backgroundColor: theme.primary
182
- },
183
- // Stays lime so the main action is always findable; dimmed until there is a prompt.
184
- sendIdle: {
185
- opacity: 0.4
214
+ gap: SPACE.sm
186
215
  },
187
- optionsScroll: {
188
- flexGrow: 0
216
+ pillDashed: {
217
+ borderStyle: "dashed"
189
218
  },
190
- options: {
219
+ pillLabelSoft: __spreadProps(__spreadValues({}, TYPE.label), {
220
+ color: theme.mutedForeground
221
+ }),
222
+ useShot: {
191
223
  flexDirection: "row",
192
224
  alignItems: "center",
193
225
  gap: SPACE.sm,
194
- paddingHorizontal: 2
226
+ alignSelf: "flex-start",
227
+ marginTop: -4
228
+ },
229
+ useShotKey: {
230
+ paddingHorizontal: SPACE.sm,
231
+ paddingVertical: 2,
232
+ borderRadius: RADIUS.sm,
233
+ borderWidth: StyleSheet.hairlineWidth,
234
+ borderColor: theme.borderStrong
195
235
  },
236
+ useShotKeyText: __spreadProps(__spreadValues({}, TYPE.caption), {
237
+ color: theme.mutedForeground
238
+ }),
239
+ useShotLabel: __spreadProps(__spreadValues({}, TYPE.caption), {
240
+ fontWeight: "400",
241
+ color: theme.mutedForeground
242
+ }),
196
243
  pill: {
197
244
  flexDirection: "row",
198
245
  alignItems: "center",
@@ -200,7 +247,9 @@ const makeStyles = themedStyles((theme) => StyleSheet.create({
200
247
  minHeight: 36,
201
248
  paddingHorizontal: SPACE.md,
202
249
  borderRadius: RADIUS.pill,
203
- backgroundColor: theme.isDark ? theme.secondary : theme.surface
250
+ borderWidth: StyleSheet.hairlineWidth,
251
+ borderColor: theme.borderStrong,
252
+ backgroundColor: theme.surface
204
253
  },
205
254
  refThumb: {
206
255
  width: 20,
@@ -208,7 +257,47 @@ const makeStyles = themedStyles((theme) => StyleSheet.create({
208
257
  borderRadius: 5
209
258
  },
210
259
  pillLabel: __spreadProps(__spreadValues({}, TYPE.label), {
211
- fontVariant: ["tabular-nums"],
212
260
  color: theme.foreground
213
- })
261
+ }),
262
+ bar: {
263
+ flexDirection: "row",
264
+ alignItems: "center",
265
+ gap: SPACE.md,
266
+ paddingTop: SPACE.md,
267
+ borderTopWidth: StyleSheet.hairlineWidth,
268
+ borderTopColor: theme.border
269
+ },
270
+ barOption: {
271
+ minHeight: 36,
272
+ justifyContent: "center",
273
+ paddingHorizontal: SPACE.xs
274
+ },
275
+ barLabel: __spreadProps(__spreadValues({}, TYPE.label), {
276
+ fontSize: 14,
277
+ fontVariant: ["tabular-nums"],
278
+ color: theme.mutedForeground
279
+ }),
280
+ spacer: {
281
+ flex: 1
282
+ },
283
+ generate: {
284
+ flexDirection: "row",
285
+ alignItems: "center",
286
+ gap: SPACE.sm,
287
+ minHeight: 44,
288
+ paddingHorizontal: SPACE.lg + 2,
289
+ borderRadius: RADIUS.md,
290
+ backgroundColor: theme.card
291
+ },
292
+ // Lime once there is a prompt: the one main action, as web turns it on.
293
+ generateReady: {
294
+ backgroundColor: theme.primary
295
+ },
296
+ generateLabel: __spreadProps(__spreadValues({}, TYPE.label), {
297
+ fontSize: 15,
298
+ color: theme.mutedForeground
299
+ }),
300
+ generateLabelReady: {
301
+ color: theme.primaryForeground
302
+ }
214
303
  }));export{HeroComposer};//# sourceMappingURL=HeroComposer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeroComposer.js","sources":["../../../../src/features/canvas/home/HeroComposer.tsx"],"sourcesContent":["/**\n * \"Direct the shot\" - the home hero, native twin of canvas-surface\n * `CanvasHome.tsx` (hero + composer). The monitor previews what the composer\n * will make; Generate opens a fresh canvas with the generator seeded from it.\n *\n * Monitor looping shots (HeroMonitor), \"Use this shot\" copies a prompt\n * Composer image / video, the prompt, a product reference, aspect and\n * resolution pills, Generate\n *\n * Film / camera / palette / lighting ride the \"Direct\" pill (generator/DirectorSheet)\n * and are applied to the prompt on Generate, as web CanvasHome does. The\n * character picker and model chip are not here yet.\n */\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { ActivityIndicator, Modal, ScrollView, StyleSheet, Text, TextInput, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { Image } from 'expo-image';\nimport type { StudioLook } from '../studioLooks';\nimport type { ShowcaseClip } from '../seedanceShowcase';\nimport { useCanvasTheme, themedStyles, type CanvasPalette } from '../canvasTheme';\nimport { Pressable, RADIUS, SPACE, Segmented, TYPE, pressedStyle } from '../canvasUi';\nimport { HeroMonitor } from './HeroMonitor';\nimport { DirectorPill, DirectorSheet } from '../generator/DirectorSheet';\nimport { EMPTY_DIRECTION, directedPrompt, type Direction } from '../generator/direction';\nimport {\n HERO_ASPECTS,\n HERO_RESOLUTIONS,\n heroAspectOf,\n heroSettings,\n heroShots,\n nextIn,\n type HeroAspect,\n type HeroMode,\n type HeroResolution,\n type HeroSettings,\n type HeroShot,\n} from './heroShots';\n\nconst MODES = [\n { id: 'image' as const, label: 'Image' },\n { id: 'video' as const, label: 'Video' },\n];\nconst PLACEHOLDER = 'A slow push-in on a ceramic mug on a sunlit table, steam curling, shallow focus';\n/** The monitor's four thumbs on a phone; it cycles only what it shows. */\nconst PHONE_SHOTS = 4;\n\nexport function HeroComposer({\n featuredLooks,\n showcase,\n playing,\n onStartWithPrompt,\n onPickReference,\n onBrowseTemplates,\n}: {\n featuredLooks: readonly StudioLook[];\n showcase: readonly ShowcaseClip[];\n /** The home playback governor: true while the hero is the region on screen. */\n playing: boolean;\n onStartWithPrompt: (prompt: string, settings: HeroSettings) => void;\n /** Picks an image from the device and answers its uploaded URL (null when cancelled). */\n onPickReference?: () => Promise<string | null>;\n onBrowseTemplates?: () => void;\n}) {\n const theme = useCanvasTheme();\n const styles = makeStyles(theme);\n const shots = useMemo(() => heroShots(featuredLooks, showcase, PHONE_SHOTS), [featuredLooks, showcase]);\n const [shot, setShot] = useState(0);\n const [mode, setMode] = useState<HeroMode>('video');\n const [draft, setDraft] = useState('');\n const [focused, setFocused] = useState(false);\n const [aspect, setAspect] = useState<HeroAspect>('16:9');\n const [resolution, setResolution] = useState<HeroResolution>('720p');\n const [product, setProduct] = useState<string | null>(null);\n const [attaching, setAttaching] = useState(false);\n const [direction, setDirection] = useState<Direction>(EMPTY_DIRECTION);\n const [directing, setDirecting] = useState(false);\n const index = shots.length ? shot % shots.length : 0;\n const ready = Boolean(draft.trim());\n\n const applyShot = useCallback((s: HeroShot) => {\n setDraft(s.prompt);\n setMode('video');\n const fit = heroAspectOf(s.aspect);\n if (fit) setAspect(fit);\n }, []);\n\n const attach = async () => {\n if (!onPickReference || attaching) return;\n setAttaching(true);\n try {\n const url = await onPickReference();\n if (url) setProduct(url);\n } finally {\n setAttaching(false);\n }\n };\n\n const submit = () => {\n const text = draft.trim();\n if (!text) return;\n // Web CanvasHome: applyCinematic(draft, composeCameraPhrase(camera), cine). Video only.\n const sent = mode === 'video' ? directedPrompt(text, direction) : text;\n onStartWithPrompt(sent, heroSettings(mode, aspect, resolution, product));\n };\n\n return (\n <View style={styles.root}>\n <View style={styles.titleRow}>\n <Text style={styles.title} accessibilityRole=\"header\">\n Direct the shot\n </Text>\n {onBrowseTemplates ? (\n <Pressable\n onPress={onBrowseTemplates}\n hitSlop={8}\n style={({ pressed }) => [styles.templatesLink, pressedStyle(pressed)]}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Start from a template\"\n testID=\"hero-browse-templates\"\n >\n <Text style={styles.templatesLinkLabel}>Templates</Text>\n <MaterialCommunityIcons name=\"arrow-right\" size={14} color={theme.mutedForeground} />\n </Pressable>\n ) : null}\n </View>\n\n <HeroMonitor\n shots={shots}\n index={index}\n onCut={setShot}\n paused={ready || focused}\n playing={playing}\n still={mode === 'image'}\n aspect={aspect}\n resolution={resolution}\n slate={draft}\n onUseShot={applyShot}\n />\n\n {directing ? (\n <Modal transparent animationType=\"slide\" visible onRequestClose={() => setDirecting(false)}>\n <View style={styles.sheetHost}>\n <DirectorSheet\n value={direction}\n onChange={setDirection}\n onClose={() => setDirecting(false)}\n prompt={draft}\n />\n </View>\n </Modal>\n ) : null}\n\n <View style={styles.composer}>\n {/* The prompt carries its own send, like the home prompt bar. */}\n <View style={styles.promptWell}>\n <TextInput\n value={draft}\n onChangeText={setDraft}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n placeholder={\n mode === 'video' ? PLACEHOLDER : 'A ceramic mug on a sunlit table, soft morning light'\n }\n placeholderTextColor={theme.tint(0.32)}\n multiline\n style={styles.prompt}\n accessibilityLabel=\"Describe the shot\"\n testID=\"hero-prompt\"\n />\n <Pressable\n onPress={submit}\n disabled={!ready}\n style={({ pressed }) => [\n styles.send,\n !ready && styles.sendIdle,\n pressedStyle(pressed && ready),\n ]}\n accessibilityRole=\"button\"\n accessibilityLabel={mode === 'video' ? 'Generate video' : 'Generate image'}\n accessibilityState={{ disabled: !ready }}\n testID=\"hero-generate\"\n >\n <MaterialCommunityIcons name=\"arrow-up\" size={20} color={theme.primaryForeground} />\n </Pressable>\n </View>\n\n {/* Every setting in one row: what it makes, its frame, and how it is shot. */}\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n style={styles.optionsScroll}\n contentContainerStyle={styles.options}\n keyboardShouldPersistTaps=\"handled\"\n >\n <Segmented options={MODES} value={mode} onChange={setMode} />\n <Pressable\n onPress={() => setAspect(nextIn(HERO_ASPECTS, aspect))}\n style={({ pressed }) => [styles.pill, pressedStyle(pressed)]}\n accessibilityRole=\"button\"\n accessibilityLabel={`Aspect ratio ${aspect}. Tap to change`}\n >\n <MaterialCommunityIcons name=\"aspect-ratio\" size={15} color={theme.mutedForeground} />\n <Text style={styles.pillLabel}>{aspect}</Text>\n </Pressable>\n <Pressable\n onPress={() => setResolution(nextIn(HERO_RESOLUTIONS, resolution))}\n style={({ pressed }) => [styles.pill, pressedStyle(pressed)]}\n accessibilityRole=\"button\"\n accessibilityLabel={`Resolution ${resolution}. Tap to change`}\n >\n <Text style={styles.pillLabel}>{resolution}</Text>\n </Pressable>\n {mode === 'video' ? <DirectorPill value={direction} onPress={() => setDirecting(true)} /> : null}\n {product ? (\n <View style={styles.pill}>\n <Image source={{ uri: product }} style={styles.refThumb} contentFit=\"cover\" />\n <Text style={styles.pillLabel}>Product</Text>\n <Pressable\n onPress={() => setProduct(null)}\n hitSlop={10}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Remove product reference\"\n >\n <MaterialCommunityIcons name=\"close\" size={14} color={theme.mutedForeground} />\n </Pressable>\n </View>\n ) : onPickReference ? (\n <Pressable\n onPress={() => void attach()}\n disabled={attaching}\n style={({ pressed }) => [styles.pill, pressedStyle(pressed)]}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Add a product reference image\"\n >\n {attaching ? (\n <ActivityIndicator size=\"small\" color={theme.mutedForeground} />\n ) : (\n <MaterialCommunityIcons name=\"image-plus\" size={15} color={theme.mutedForeground} />\n )}\n <Text style={styles.pillLabel}>Product</Text>\n </Pressable>\n ) : null}\n </ScrollView>\n </View>\n </View>\n );\n}\n\nconst makeStyles = themedStyles((theme: CanvasPalette) =>\n StyleSheet.create({\n root: { gap: SPACE.md, marginBottom: SPACE.xl },\n sheetHost: { flex: 1 },\n titleRow: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', gap: SPACE.md },\n title: { ...TYPE.heading, color: theme.foreground, flexShrink: 1 },\n templatesLink: { flexDirection: 'row', alignItems: 'center', gap: SPACE.xs, minHeight: 32 },\n templatesLinkLabel: { ...TYPE.label, color: theme.mutedForeground },\n composer: {\n gap: SPACE.sm,\n padding: SPACE.sm,\n borderRadius: RADIUS.xl,\n backgroundColor: theme.card,\n },\n promptWell: {\n flexDirection: 'row',\n alignItems: 'flex-end',\n gap: SPACE.sm,\n paddingLeft: SPACE.md,\n paddingRight: SPACE.xs + 2,\n paddingVertical: SPACE.xs + 2,\n borderRadius: RADIUS.lg,\n backgroundColor: theme.isDark ? theme.secondary : theme.surface,\n },\n prompt: {\n ...TYPE.body,\n flex: 1,\n minHeight: 64,\n maxHeight: 160,\n paddingTop: SPACE.sm,\n paddingBottom: SPACE.sm,\n color: theme.foreground,\n textAlignVertical: 'top',\n },\n send: {\n width: 40,\n height: 40,\n borderRadius: 20,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.primary,\n },\n // Stays lime so the main action is always findable; dimmed until there is a prompt.\n sendIdle: { opacity: 0.4 },\n optionsScroll: { flexGrow: 0 },\n options: { flexDirection: 'row', alignItems: 'center', gap: SPACE.sm, paddingHorizontal: 2 },\n pill: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: SPACE.xs + 2,\n minHeight: 36,\n paddingHorizontal: SPACE.md,\n borderRadius: RADIUS.pill,\n backgroundColor: theme.isDark ? theme.secondary : theme.surface,\n },\n refThumb: { width: 20, height: 20, borderRadius: 5 },\n pillLabel: { ...TYPE.label, fontVariant: ['tabular-nums'], color: theme.foreground },\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,MAAM,QAAQ,CAAC;AAAA,EACb,EAAI,EAAA,OAAA;AAAA,EACJ,KAAO,EAAA;AACT,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,OAAA;AAAA,EACJ,KAAO,EAAA;AACT,CAAC,CAAA;AACD,MAAM,WAAc,GAAA,iFAAA;AAEpB,MAAM,WAAc,GAAA,CAAA;AACb,SAAS,YAAa,CAAA;AAAA,EAC3B,aAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF,CASG,EAAA;AACD,EAAA,MAAM,QAAQ,cAAe,EAAA;AAC7B,EAAM,MAAA,MAAA,GAAS,WAAW,KAAK,CAAA;AAC/B,EAAM,MAAA,KAAA,GAAQ,OAAQ,CAAA,MAAM,SAAU,CAAA,aAAA,EAAe,QAAU,EAAA,WAAW,CAAG,EAAA,CAAC,aAAe,EAAA,QAAQ,CAAC,CAAA;AACtG,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,CAAC,CAAA;AAClC,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAmB,OAAO,CAAA;AAClD,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAAS,EAAE,CAAA;AACrC,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAS,KAAK,CAAA;AAC5C,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,SAAqB,MAAM,CAAA;AACvD,EAAA,MAAM,CAAC,UAAA,EAAY,aAAa,CAAA,GAAI,SAAyB,MAAM,CAAA;AACnE,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Y,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA,QAAA;AAAA,IAChB,iBAAiB,KAAM,CAAA;AAAA,GACzB;AAAA;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,OAAS,EAAA;AAAA,GACX;AAAA,EACA,aAAe,EAAA;AAAA,IACb,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,OAAS,EAAA;AAAA,IACP,aAAe,EAAA,KAAA;AAAA,IACf,UAAY,EAAA,QAAA;AAAA,IACZ,KAAK,KAAM,CAAA,EAAA;AAAA,IACX,iBAAmB,EAAA;AAAA,GACrB;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,aAAe,EAAA,KAAA;AAAA,IACf,UAAY,EAAA,QAAA;AAAA,IACZ,GAAA,EAAK,MAAM,EAAK,GAAA,CAAA;AAAA,IAChB,SAAW,EAAA,EAAA;AAAA,IACX,mBAAmB,KAAM,CAAA,EAAA;AAAA,IACzB,cAAc,MAAO,CAAA,IAAA;AAAA,IACrB,eAAiB,EAAA,KAAA,CAAM,MAAS,GAAA,KAAA,CAAM,YAAY,KAAM,CAAA;AAAA,GAC1D;AAAA,EACA,QAAU,EAAA;AAAA,IACR,KAAO,EAAA,EAAA;AAAA,IACP,MAAQ,EAAA,EAAA;AAAA,IACR,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,SAAA,EAAW,aACN,CAAA,cAAA,CAAA,EAAA,EAAA,IAAA,CAAK,KADC,CAAA,EAAA;AAAA,IAET,WAAA,EAAa,CAAC,cAAc,CAAA;AAAA,IAC5B,OAAO,KAAM,CAAA;AAAA,GACf;AACF,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"HeroComposer.js","sources":["../../../../src/features/canvas/home/HeroComposer.tsx"],"sourcesContent":["/**\n * \"Direct the shot\" - the home hero, native twin of canvas-surface\n * `CanvasHome.tsx` (hero + composer). The monitor previews what the composer\n * will make; Generate opens a fresh canvas with the generator seeded from it.\n *\n * Monitor looping shots (HeroMonitor), \"Use this shot\" copies a prompt\n * Composer image / video, the prompt, a product reference, aspect and\n * resolution pills, Generate\n *\n * Film / camera / palette / lighting ride the \"Direct\" pill (generator/DirectorSheet)\n * and are applied to the prompt on Generate, as web CanvasHome does. The\n * character picker and model chip are not here yet.\n */\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { ActivityIndicator, Modal, StyleSheet, Text, TextInput, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { Image } from 'expo-image';\nimport type { StudioLook } from '../studioLooks';\nimport type { ShowcaseClip } from '../seedanceShowcase';\nimport { useCanvasTheme, themedStyles, type CanvasPalette } from '../canvasTheme';\nimport { Pressable, RADIUS, SPACE, Segmented, TYPE, pressedStyle } from '../canvasUi';\nimport { HeroMonitor } from './HeroMonitor';\nimport { DirectorSheet, type DirectorTab } from '../generator/DirectorSheet';\nimport { EMPTY_DIRECTION, directedPrompt, type Direction } from '../generator/direction';\nimport {\n HERO_ASPECTS,\n HERO_RESOLUTIONS,\n heroAspectOf,\n heroSettings,\n heroShots,\n nextIn,\n type HeroAspect,\n type HeroMode,\n type HeroResolution,\n type HeroSettings,\n type HeroShot,\n} from './heroShots';\n\nconst MODES = [\n { id: 'image' as const, label: 'Image' },\n { id: 'video' as const, label: 'Video' },\n];\nconst PLACEHOLDER = 'A slow push-in on a ceramic mug on a sunlit table, steam curling, shallow focus';\n/** The monitor's four thumbs on a phone; it cycles only what it shows. */\nconst PHONE_SHOTS = 4;\n\nexport function HeroComposer({\n featuredLooks,\n showcase,\n playing,\n onStartWithPrompt,\n onPickReference,\n onBrowseTemplates,\n headerActions,\n}: {\n featuredLooks: readonly StudioLook[];\n showcase: readonly ShowcaseClip[];\n /** The home playback governor: true while the hero is the region on screen. */\n playing: boolean;\n onStartWithPrompt: (prompt: string, settings: HeroSettings) => void;\n /** Picks an image from the device and answers its uploaded URL (null when cancelled). */\n onPickReference?: () => Promise<string | null>;\n onBrowseTemplates?: () => void;\n /** Round buttons beside the headline (AI Chat, theme); the hero is the top of home. */\n headerActions?: React.ReactNode;\n}) {\n const theme = useCanvasTheme();\n const styles = makeStyles(theme);\n const shots = useMemo(() => heroShots(featuredLooks, showcase, PHONE_SHOTS), [featuredLooks, showcase]);\n const [shot, setShot] = useState(0);\n const [mode, setMode] = useState<HeroMode>('video');\n const [draft, setDraft] = useState('');\n const [focused, setFocused] = useState(false);\n const [aspect, setAspect] = useState<HeroAspect>('16:9');\n const [resolution, setResolution] = useState<HeroResolution>('720p');\n const [product, setProduct] = useState<string | null>(null);\n const [attaching, setAttaching] = useState(false);\n const [direction, setDirection] = useState<Direction>(EMPTY_DIRECTION);\n const [directing, setDirecting] = useState<DirectorTab | null>(null);\n const index = shots.length ? shot % shots.length : 0;\n const ready = Boolean(draft.trim());\n\n const applyShot = useCallback((s: HeroShot) => {\n setDraft(s.prompt);\n setMode('video');\n const fit = heroAspectOf(s.aspect);\n if (fit) setAspect(fit);\n }, []);\n\n const attach = async () => {\n if (!onPickReference || attaching) return;\n setAttaching(true);\n try {\n const url = await onPickReference();\n if (url) setProduct(url);\n } finally {\n setAttaching(false);\n }\n };\n\n const submit = () => {\n const text = draft.trim();\n if (!text) return;\n // Web CanvasHome: applyCinematic(draft, composeCameraPhrase(camera), cine). Video only.\n const sent = mode === 'video' ? directedPrompt(text, direction) : text;\n onStartWithPrompt(sent, heroSettings(mode, aspect, resolution, product));\n };\n\n return (\n <View style={styles.root}>\n {headerActions ? <View style={styles.actions}>{headerActions}</View> : null}\n\n {/* Web CanvasHome on a phone: the monitor first, then the headline and the composer. */}\n <HeroMonitor\n shots={shots}\n index={index}\n onCut={setShot}\n paused={ready || focused}\n playing={playing}\n still={mode === 'image'}\n aspect={aspect}\n resolution={resolution}\n slate={draft}\n />\n\n <Text style={styles.headline} accessibilityRole=\"header\">\n Direct the shot.\n </Text>\n <Text style={styles.lede}>Every choice you make shows up on the monitor before you spend a run on it.</Text>\n {onBrowseTemplates ? (\n <Pressable\n onPress={onBrowseTemplates}\n hitSlop={8}\n style={({ pressed }) => [styles.templatesLink, pressedStyle(pressed)]}\n accessibilityRole=\"button\"\n testID=\"hero-browse-templates\"\n >\n <MaterialCommunityIcons name=\"view-dashboard-outline\" size={16} color={theme.foreground} />\n <Text style={styles.templatesLinkLabel}>Start from a template</Text>\n <MaterialCommunityIcons name=\"arrow-right\" size={15} color={theme.mutedForeground} />\n </Pressable>\n ) : null}\n\n {directing ? (\n <Modal transparent animationType=\"slide\" visible onRequestClose={() => setDirecting(null)}>\n <View style={styles.sheetHost}>\n <DirectorSheet\n initialTab={directing}\n value={direction}\n onChange={setDirection}\n onClose={() => setDirecting(null)}\n prompt={draft}\n />\n </View>\n </Modal>\n ) : null}\n\n <View style={styles.composer}>\n <Segmented options={MODES} value={mode} onChange={setMode} style={styles.modes} />\n <TextInput\n value={draft}\n onChangeText={setDraft}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n placeholder={\n shots[index]?.title || (mode === 'video' ? PLACEHOLDER : 'A ceramic mug on a sunlit table')\n }\n placeholderTextColor={theme.tint(0.32)}\n multiline\n style={styles.prompt}\n accessibilityLabel=\"Describe the shot\"\n testID=\"hero-prompt\"\n />\n {shots[index] ? (\n // Web's \"Tab: use this shot's prompt\", as a tap on a phone.\n <Pressable\n onPress={() => applyShot(shots[index])}\n hitSlop={6}\n style={({ pressed }) => [styles.useShot, pressedStyle(pressed)]}\n accessibilityRole=\"button\"\n accessibilityLabel={`Use this shot's prompt: ${shots[index].title}`}\n >\n <View style={styles.useShotKey}>\n <Text style={styles.useShotKeyText}>Tap</Text>\n </View>\n <Text style={styles.useShotLabel}>Use this shot's prompt</Text>\n </Pressable>\n ) : null}\n <View style={styles.chips}>\n {product ? (\n <View style={styles.pill}>\n <Image source={{ uri: product }} style={styles.refThumb} contentFit=\"cover\" />\n <Text style={styles.pillLabel}>Product</Text>\n <Pressable\n onPress={() => setProduct(null)}\n hitSlop={10}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Remove product reference\"\n >\n <MaterialCommunityIcons name=\"close\" size={14} color={theme.mutedForeground} />\n </Pressable>\n </View>\n ) : onPickReference ? (\n <Pressable\n onPress={() => void attach()}\n disabled={attaching}\n style={({ pressed }) => [styles.pill, pressedStyle(pressed)]}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Add a product reference image\"\n >\n {attaching ? (\n <ActivityIndicator size=\"small\" color={theme.mutedForeground} />\n ) : (\n <MaterialCommunityIcons name=\"image-plus\" size={15} color={theme.mutedForeground} />\n )}\n <Text style={styles.pillLabel}>Product</Text>\n </Pressable>\n ) : null}\n {mode === 'video'\n ? (\n [\n ['Film setup', 'movie-open-outline', 'film'],\n ['Camera', 'camera-iris', 'camera'],\n ['Palette', 'palette-outline', 'look'],\n ['Lighting', 'white-balance-sunny', 'look'],\n ] as const\n ).map(([label, icon, tab]) => (\n <Pressable\n key={label}\n onPress={() => setDirecting(tab)}\n style={({ pressed }) => [styles.pill, styles.pillDashed, pressedStyle(pressed)]}\n accessibilityRole=\"button\"\n accessibilityLabel={label}\n >\n <MaterialCommunityIcons name={icon} size={16} color={theme.mutedForeground} />\n <Text style={styles.pillLabelSoft}>{label}</Text>\n </Pressable>\n ))\n : null}\n </View>\n <View style={styles.bar}>\n <Pressable\n onPress={() => setAspect(nextIn(HERO_ASPECTS, aspect))}\n hitSlop={6}\n style={({ pressed }) => [styles.barOption, pressedStyle(pressed)]}\n accessibilityRole=\"button\"\n accessibilityLabel={`Aspect ratio ${aspect}. Tap to change`}\n >\n <Text style={styles.barLabel}>{aspect}</Text>\n </Pressable>\n <Pressable\n onPress={() => setResolution(nextIn(HERO_RESOLUTIONS, resolution))}\n hitSlop={6}\n style={({ pressed }) => [styles.barOption, pressedStyle(pressed)]}\n accessibilityRole=\"button\"\n accessibilityLabel={`Resolution ${resolution}. Tap to change`}\n >\n <Text style={styles.barLabel}>{resolution}</Text>\n </Pressable>\n <View style={styles.spacer} />\n <Pressable\n onPress={submit}\n disabled={!ready}\n style={({ pressed }) => [\n styles.generate,\n ready ? styles.generateReady : null,\n pressedStyle(pressed && ready),\n ]}\n accessibilityRole=\"button\"\n accessibilityLabel={mode === 'video' ? 'Generate video' : 'Generate image'}\n accessibilityState={{ disabled: !ready }}\n testID=\"hero-generate\"\n >\n <Text style={[styles.generateLabel, ready && styles.generateLabelReady]}>Generate</Text>\n <MaterialCommunityIcons\n name=\"arrow-right\"\n size={16}\n color={ready ? theme.primaryForeground : theme.mutedForeground}\n />\n </Pressable>\n </View>\n </View>\n </View>\n );\n}\n\nconst makeStyles = themedStyles((theme: CanvasPalette) =>\n StyleSheet.create({\n root: { gap: SPACE.md, marginBottom: SPACE.xl },\n sheetHost: { flex: 1 },\n actions: { flexDirection: 'row', justifyContent: 'flex-end', gap: SPACE.sm, marginBottom: -SPACE.xs },\n headline: {\n fontSize: 36,\n lineHeight: 40,\n fontWeight: '800',\n letterSpacing: -1,\n color: theme.foreground,\n marginTop: SPACE.sm,\n },\n lede: { ...TYPE.body, color: theme.mutedForeground, marginTop: -SPACE.xs },\n templatesLink: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: SPACE.xs + 2,\n alignSelf: 'flex-start',\n minHeight: 32,\n },\n templatesLinkLabel: { ...TYPE.label, fontSize: 14, color: theme.foreground },\n // A raised card, as the web composer: white on the page, hairline edge, soft shadow.\n composer: {\n gap: SPACE.md,\n padding: SPACE.md,\n borderRadius: RADIUS.xl,\n backgroundColor: theme.surface,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: theme.border,\n shadowColor: '#000',\n shadowOpacity: theme.isDark ? 0 : 0.06,\n shadowRadius: 14,\n shadowOffset: { width: 0, height: 6 },\n elevation: theme.isDark ? 0 : 2,\n },\n modes: { alignSelf: 'flex-start' },\n prompt: {\n ...TYPE.body,\n fontSize: 16,\n minHeight: 96,\n maxHeight: 180,\n paddingHorizontal: SPACE.md,\n paddingTop: SPACE.md,\n paddingBottom: SPACE.md,\n borderRadius: RADIUS.lg,\n backgroundColor: theme.card,\n color: theme.foreground,\n textAlignVertical: 'top',\n },\n chips: { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', gap: SPACE.sm },\n pillDashed: { borderStyle: 'dashed' },\n pillLabelSoft: { ...TYPE.label, color: theme.mutedForeground },\n useShot: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: SPACE.sm,\n alignSelf: 'flex-start',\n marginTop: -SPACE.xs,\n },\n useShotKey: {\n paddingHorizontal: SPACE.sm,\n paddingVertical: 2,\n borderRadius: RADIUS.sm,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: theme.borderStrong,\n },\n useShotKeyText: { ...TYPE.caption, color: theme.mutedForeground },\n useShotLabel: { ...TYPE.caption, fontWeight: '400', color: theme.mutedForeground },\n pill: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: SPACE.xs + 2,\n minHeight: 36,\n paddingHorizontal: SPACE.md,\n borderRadius: RADIUS.pill,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: theme.borderStrong,\n backgroundColor: theme.surface,\n },\n refThumb: { width: 20, height: 20, borderRadius: 5 },\n pillLabel: { ...TYPE.label, color: theme.foreground },\n bar: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: SPACE.md,\n paddingTop: SPACE.md,\n borderTopWidth: StyleSheet.hairlineWidth,\n borderTopColor: theme.border,\n },\n barOption: { minHeight: 36, justifyContent: 'center', paddingHorizontal: SPACE.xs },\n barLabel: { ...TYPE.label, fontSize: 14, fontVariant: ['tabular-nums'], color: theme.mutedForeground },\n spacer: { flex: 1 },\n generate: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: SPACE.sm,\n minHeight: 44,\n paddingHorizontal: SPACE.lg + 2,\n borderRadius: RADIUS.md,\n backgroundColor: theme.card,\n },\n // Lime once there is a prompt: the one main action, as web turns it on.\n generateReady: { backgroundColor: theme.primary },\n generateLabel: { ...TYPE.label, fontSize: 15, color: theme.mutedForeground },\n generateLabelReady: { color: theme.primaryForeground },\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,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gB,KAAM,CAAA;AAAA,GACxB;AAAA,EACA,SAAW,EAAA;AAAA,IACT,SAAW,EAAA,EAAA;AAAA,IACX,cAAgB,EAAA,QAAA;AAAA,IAChB,mBAAmB,KAAM,CAAA;AAAA,GAC3B;AAAA,EACA,QAAA,EAAU,aACL,CAAA,cAAA,CAAA,EAAA,EAAA,IAAA,CAAK,KADA,CAAA,EAAA;AAAA,IAER,QAAU,EAAA,EAAA;AAAA,IACV,WAAA,EAAa,CAAC,cAAc,CAAA;AAAA,IAC5B,OAAO,KAAM,CAAA;AAAA,GACf,CAAA;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA,GACR;AAAA,EACA,QAAU,EAAA;AAAA,IACR,aAAe,EAAA,KAAA;AAAA,IACf,UAAY,EAAA,QAAA;AAAA,IACZ,KAAK,KAAM,CAAA,EAAA;AAAA,IACX,SAAW,EAAA,EAAA;AAAA,IACX,iBAAA,EAAmB,MAAM,EAAK,GAAA,CAAA;AAAA,IAC9B,cAAc,MAAO,CAAA,EAAA;AAAA,IACrB,iBAAiB,KAAM,CAAA;AAAA,GACzB;AAAA;AAAA,EAEA,aAAe,EAAA;AAAA,IACb,iBAAiB,KAAM,CAAA;AAAA,GACzB;AAAA,EACA,aAAA,EAAe,aACV,CAAA,cAAA,CAAA,EAAA,EAAA,IAAA,CAAK,KADK,CAAA,EAAA;AAAA,IAEb,QAAU,EAAA,EAAA;AAAA,IACV,OAAO,KAAM,CAAA;AAAA,GACf,CAAA;AAAA,EACA,kBAAoB,EAAA;AAAA,IAClB,OAAO,KAAM,CAAA;AAAA;AAEjB,CAAC,CAAC,CAAA"}
@@ -1,4 +1,4 @@
1
- import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useState,useRef,useEffect,useCallback}from'react';import {View,Text,StyleSheet,Linking}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {useCanvasTheme,themedStyles}from'../canvasTheme.js';import {Skeleton,RADIUS,Pressable,pressedStyle,SPACE,TYPE}from'../canvasUi.js';import {LoopingVideo}from'./LoopingVideo.js';import {HERO_CUT_MS,cropInset,heroTimecode}from'./heroShots.js';var __defProp = Object.defineProperty;
1
+ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useState,useRef,useEffect,useCallback}from'react';import {View,Text,StyleSheet,Linking}from'react-native';import {Image}from'expo-image';import {useCanvasTheme,themedStyles}from'../canvasTheme.js';import {Skeleton,RADIUS,Pressable,SPACE,TYPE}from'../canvasUi.js';import {LoopingVideo}from'./LoopingVideo.js';import {HERO_CUT_MS,cropInset,heroTimecode}from'./heroShots.js';var __defProp = Object.defineProperty;
2
2
  var __defProps = Object.defineProperties;
3
3
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -27,8 +27,7 @@ function HeroMonitor({
27
27
  still,
28
28
  aspect,
29
29
  resolution,
30
- slate,
31
- onUseShot
30
+ slate
32
31
  }) {
33
32
  const theme = useCanvasTheme();
34
33
  const styles = makeStyles(theme);
@@ -99,28 +98,29 @@ function HeroMonitor({
99
98
  /* @__PURE__ */ jsx(Text, { style: styles.mono, children: resolution })
100
99
  ] }),
101
100
  /* @__PURE__ */ jsx(View, { style: styles.slate, pointerEvents: "none", children: /* @__PURE__ */ jsx(Text, { style: styles.slateText, numberOfLines: 2, children: slate.trim() || shot.title }) }),
102
- /* @__PURE__ */ jsxs(Pressable, { onPress: () => onUseShot(shot), style: ({
103
- pressed
104
- }) => [styles.useShot, pressedStyle(pressed)], accessibilityRole: "button", accessibilityLabel: `Use this shot's prompt: ${shot.title}`, children: [
105
- /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "content-copy", size: 13, color: "#fafafa" }),
106
- /* @__PURE__ */ jsx(Text, { style: styles.useShotLabel, children: "Use shot" })
107
- ] })
101
+ /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles.corner, styles.cornerTL] }),
102
+ /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles.corner, styles.cornerTR] }),
103
+ /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles.corner, styles.cornerBL] }),
104
+ /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: [styles.corner, styles.cornerBR] }),
105
+ /* @__PURE__ */ jsx(View, { style: styles.lens, pointerEvents: "none", children: /* @__PURE__ */ jsx(Text, { style: styles.lensText, children: "Auto lens" }) })
108
106
  ] }),
109
- /* @__PURE__ */ jsx(View, { style: styles.dots, children: shots.slice(0, PHONE_THUMBS).map((s, i) => {
107
+ /* @__PURE__ */ jsx(View, { style: styles.thumbs, children: shots.slice(0, PHONE_THUMBS).map((s, i) => {
110
108
  const on = i === index;
111
- return /* @__PURE__ */ jsx(Pressable, { onPress: () => onCut(i), hitSlop: 8, style: [styles.dotHit], accessibilityRole: "button", accessibilityLabel: s.title, accessibilityState: {
109
+ return /* @__PURE__ */ jsx(Pressable, { onPress: () => onCut(i), style: [styles.thumb, on && styles.thumbOn], accessibilityRole: "button", accessibilityLabel: s.title, accessibilityState: {
112
110
  selected: on
113
- }, children: /* @__PURE__ */ jsx(View, { style: [styles.pager, on && styles.pagerOn] }) }, s.id);
111
+ }, children: s.poster ? /* @__PURE__ */ jsx(Image, { source: {
112
+ uri: s.poster
113
+ }, style: [StyleSheet.absoluteFill, !on && styles.thumbDim], contentFit: "cover" }) : null }, s.id);
114
114
  }) }),
115
- shot.credit ? (
116
- // The clip's licence asks for credit: one quiet line, only for those clips.
117
- /* @__PURE__ */ jsx(Pressable, { onPress: openCredit, hitSlop: 6, accessibilityRole: "link", accessibilityLabel: `${shot.title} by ${shot.credit.author}, ${shot.credit.license}. Open the original post`, children: /* @__PURE__ */ jsx(Text, { style: styles.creditText, numberOfLines: 1, children: `${shot.credit.author} \xB7 ${shot.credit.license}` }) })
118
- ) : null
115
+ /* @__PURE__ */ jsxs(View, { children: [
116
+ shot.credit ? /* @__PURE__ */ jsx(Pressable, { onPress: openCredit, hitSlop: 6, accessibilityRole: "link", accessibilityLabel: `${shot.title} by ${shot.credit.author}, ${shot.credit.license}. Open the original post`, children: /* @__PURE__ */ jsx(Text, { style: [styles.caption, styles.captionLink], numberOfLines: 1, children: `${shot.title} \xB7 ${shot.credit.author} \xB7 ${shot.credit.license}` }) }) : /* @__PURE__ */ jsx(Text, { style: styles.caption, numberOfLines: 1, children: `Studio look \xB7 ${shot.title}` }),
117
+ /* @__PURE__ */ jsx(Text, { style: styles.caption, children: "Cuts every 7s, pauses while you type" })
118
+ ] })
119
119
  ] });
120
120
  }
121
121
  const makeStyles = themedStyles((theme) => StyleSheet.create({
122
122
  root: {
123
- gap: SPACE.xs + 2
123
+ gap: SPACE.sm + 2
124
124
  },
125
125
  loadingFrame: {
126
126
  width: "100%",
@@ -143,7 +143,7 @@ const makeStyles = themedStyles((theme) => StyleSheet.create({
143
143
  topBar: {
144
144
  position: "absolute",
145
145
  top: SPACE.sm,
146
- left: SPACE.sm,
146
+ alignSelf: "center",
147
147
  flexDirection: "row",
148
148
  alignItems: "center",
149
149
  gap: SPACE.sm,
@@ -182,44 +182,73 @@ const makeStyles = themedStyles((theme) => StyleSheet.create({
182
182
  slateText: __spreadProps(__spreadValues({}, TYPE.caption), {
183
183
  color: "#fafafa"
184
184
  }),
185
- dots: {
185
+ thumbs: {
186
186
  flexDirection: "row",
187
- justifyContent: "center",
188
- gap: SPACE.xs
187
+ gap: SPACE.sm
189
188
  },
190
- dotHit: {
191
- paddingVertical: SPACE.xs,
192
- paddingHorizontal: 2
189
+ thumb: {
190
+ flex: 1,
191
+ aspectRatio: 16 / 10,
192
+ borderRadius: RADIUS.md,
193
+ overflow: "hidden",
194
+ backgroundColor: theme.card,
195
+ borderWidth: 2,
196
+ borderColor: "transparent"
193
197
  },
194
- pager: {
195
- width: 6,
196
- height: 6,
197
- borderRadius: 3,
198
- backgroundColor: theme.borderStrong
198
+ thumbOn: {
199
+ borderColor: theme.foreground
199
200
  },
200
- pagerOn: {
201
- width: 18,
202
- backgroundColor: theme.foreground
201
+ thumbDim: {
202
+ opacity: 0.7
203
203
  },
204
- creditText: __spreadProps(__spreadValues({}, TYPE.caption), {
205
- textAlign: "center",
206
- color: theme.mutedForeground,
207
- textDecorationLine: "underline"
204
+ caption: __spreadProps(__spreadValues({}, TYPE.caption), {
205
+ fontWeight: "400",
206
+ lineHeight: 18,
207
+ color: theme.mutedForeground
208
208
  }),
209
- useShot: {
209
+ captionLink: {
210
+ textDecorationLine: "underline"
211
+ },
212
+ corner: {
213
+ position: "absolute",
214
+ width: 18,
215
+ height: 18,
216
+ borderColor: "rgba(255,255,255,0.75)"
217
+ },
218
+ cornerTL: {
219
+ top: SPACE.md,
220
+ left: SPACE.md,
221
+ borderTopWidth: 1.5,
222
+ borderLeftWidth: 1.5
223
+ },
224
+ cornerTR: {
225
+ top: SPACE.md,
226
+ right: SPACE.md,
227
+ borderTopWidth: 1.5,
228
+ borderRightWidth: 1.5
229
+ },
230
+ cornerBL: {
231
+ bottom: SPACE.md,
232
+ left: SPACE.md,
233
+ borderBottomWidth: 1.5,
234
+ borderLeftWidth: 1.5
235
+ },
236
+ cornerBR: {
237
+ bottom: SPACE.md,
238
+ right: SPACE.md,
239
+ borderBottomWidth: 1.5,
240
+ borderRightWidth: 1.5
241
+ },
242
+ lens: {
210
243
  position: "absolute",
211
- top: SPACE.sm,
212
244
  right: SPACE.sm,
213
- flexDirection: "row",
214
- alignItems: "center",
215
- gap: SPACE.xs,
216
- minHeight: 30,
217
- paddingHorizontal: SPACE.sm + 2,
218
- borderRadius: RADIUS.pill,
245
+ bottom: SPACE.sm,
246
+ paddingHorizontal: SPACE.sm,
247
+ paddingVertical: SPACE.xs,
248
+ borderRadius: RADIUS.sm,
219
249
  backgroundColor: "rgba(0,0,0,0.5)"
220
250
  },
221
- useShotLabel: __spreadProps(__spreadValues({}, TYPE.caption), {
222
- fontWeight: "600",
251
+ lensText: __spreadProps(__spreadValues({}, TYPE.caption), {
223
252
  color: "#fafafa"
224
253
  })
225
254
  }));export{HeroMonitor};//# sourceMappingURL=HeroMonitor.js.map