@vvedantb/native-ui 0.38.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/dist/Avatar.jsx +22 -19
  2. package/dist/BottomSheetContainer.jsx +0 -6
  3. package/dist/BulkActionBar.jsx +0 -24
  4. package/dist/Button.jsx +92 -116
  5. package/dist/Card.jsx +56 -50
  6. package/dist/ColorSwatches.jsx +0 -6
  7. package/dist/Dialog.jsx +0 -12
  8. package/dist/DropdownMenu.jsx +0 -10
  9. package/dist/EmptyState.jsx +0 -3
  10. package/dist/ExpoWebRoot.jsx +0 -6
  11. package/dist/Field.jsx +0 -17
  12. package/dist/FloatingSurface.jsx +95 -80
  13. package/dist/FloatingTabBar.jsx +0 -23
  14. package/dist/IconButton.jsx +0 -1
  15. package/dist/LoadingState.jsx +0 -6
  16. package/dist/PasswordInput.jsx +0 -15
  17. package/dist/PillTabs.jsx +39 -36
  18. package/dist/SearchInput.jsx +0 -13
  19. package/dist/SectionLabel.jsx +0 -1
  20. package/dist/SharedTransition.jsx +0 -3
  21. package/dist/Skeleton.jsx +0 -2
  22. package/dist/Spinner.jsx +0 -2
  23. package/dist/StatusDot.jsx +0 -5
  24. package/dist/Switch.jsx +32 -22
  25. package/dist/Tabs.jsx +27 -26
  26. package/dist/Textarea.jsx +0 -1
  27. package/dist/ThemeToggle.jsx +0 -1
  28. package/dist/Toast.jsx +80 -91
  29. package/dist/UpdateChecker.jsx +0 -1
  30. package/dist/ai/activity-question.jsx +0 -6
  31. package/dist/ai/activity-step-label.js +0 -6
  32. package/dist/ai/activity-step-types.js +0 -4
  33. package/dist/ai/activity-tasks-utils.js +0 -17
  34. package/dist/ai/activity-timeline.js +0 -8
  35. package/dist/ai/attachments.jsx +0 -2
  36. package/dist/ai/chain-of-thought.jsx +0 -3
  37. package/dist/ai/chat-text.js +2 -3
  38. package/dist/ai/chat-thread.jsx +0 -1
  39. package/dist/ai/choice-question.jsx +0 -10
  40. package/dist/ai/code-block.jsx +0 -31
  41. package/dist/ai/collapsible.jsx +0 -14
  42. package/dist/ai/conversation-context.js +0 -3
  43. package/dist/ai/conversation.jsx +2 -48
  44. package/dist/ai/file-chip.jsx +0 -2
  45. package/dist/ai/icon-button.jsx +10 -18
  46. package/dist/ai/index.js +0 -5
  47. package/dist/ai/message-context-menu.jsx +0 -7
  48. package/dist/ai/message.jsx +0 -21
  49. package/dist/ai/prompt-input-menu.jsx +0 -3
  50. package/dist/ai/prompt-input.jsx +2 -29
  51. package/dist/ai/response-text.jsx +0 -6
  52. package/dist/ai/sources.jsx +0 -1
  53. package/dist/ai/suggestion.jsx +0 -1
  54. package/dist/ai/trace.jsx +0 -11
  55. package/dist/ai/unified-diff.jsx +0 -4
  56. package/dist/auth/AuthScreen.jsx +0 -5
  57. package/dist/auth/GoogleSignInButton.jsx +0 -3
  58. package/dist/auth/SecondFactorScreen.jsx +0 -2
  59. package/dist/auth/SignInScreen.jsx +0 -17
  60. package/dist/auth/authErrors.js +0 -4
  61. package/dist/auth/clerkCore3.js +0 -7
  62. package/dist/auth/index.js +0 -4
  63. package/dist/auth/totp.js +0 -2
  64. package/dist/brand/GoogleMark.jsx +0 -1
  65. package/dist/brand/ProviderIcon.jsx +0 -2
  66. package/dist/brand/index.js +0 -3
  67. package/dist/brand/svg.js +0 -6
  68. package/dist/configureTheme.js +0 -9
  69. package/dist/controlStyles.js +0 -14
  70. package/dist/crash/lastCrash.js +3 -24
  71. package/dist/entries/ai.js +0 -3
  72. package/dist/entries/ambient.js +0 -2
  73. package/dist/entries/app-root.js +0 -5
  74. package/dist/entries/auth.js +0 -4
  75. package/dist/entries/bottom-sheet.js +0 -2
  76. package/dist/entries/brand.js +0 -1
  77. package/dist/entries/button.js +0 -1
  78. package/dist/entries/crash.js +0 -3
  79. package/dist/entries/date-time.js +0 -2
  80. package/dist/entries/expo-router.js +0 -3
  81. package/dist/entries/expo-web-root.js +0 -2
  82. package/dist/entries/floating.js +0 -2
  83. package/dist/entries/generative-ui.js +0 -4
  84. package/dist/entries/gesture-handler.js +0 -3
  85. package/dist/entries/keyboard-controller.js +0 -3
  86. package/dist/entries/layout.js +0 -2
  87. package/dist/entries/markdown.js +0 -3
  88. package/dist/entries/marketing.js +0 -1
  89. package/dist/entries/page-title.js +0 -5
  90. package/dist/entries/password-input.js +0 -2
  91. package/dist/entries/paste-input.js +0 -3
  92. package/dist/entries/primitives.js +0 -6
  93. package/dist/entries/search-input.js +0 -2
  94. package/dist/entries/tab-bar.js +0 -2
  95. package/dist/entries/theme.js +1 -2
  96. package/dist/entries/toast.js +0 -3
  97. package/dist/entries/video.js +0 -2
  98. package/dist/entries/webview.js +0 -2
  99. package/dist/examples/AiChatGallery.jsx +0 -11
  100. package/dist/examples/ParityGallery.jsx +0 -12
  101. package/dist/floating.js +0 -8
  102. package/dist/generative-ui/GenerativeUiPanel.jsx +0 -2
  103. package/dist/generative-ui/components.jsx +0 -8
  104. package/dist/glass.js +55 -0
  105. package/dist/glassBlur.jsx +0 -12
  106. package/dist/highlight.js +0 -26
  107. package/dist/index.js +1 -2
  108. package/dist/loadingGrid.js +0 -13
  109. package/dist/markdown/Markdown.jsx +0 -59
  110. package/dist/markdown/MarkdownTable.jsx +0 -18
  111. package/dist/markdown/tableText.js +0 -5
  112. package/dist/marketing/UpgradeToProCard.jsx +0 -5
  113. package/dist/marketing/pricing.js +0 -3
  114. package/dist/media/ImageGallery.jsx +0 -16
  115. package/dist/media/imageZoom.js +0 -4
  116. package/dist/media/zoom-image-gesture.jsx +0 -8
  117. package/dist/media/zoomImage.js +0 -3
  118. package/dist/motion.js +0 -3
  119. package/dist/neutralTheme.js +0 -5
  120. package/dist/pagerSwipe.js +0 -16
  121. package/dist/palette.js +0 -10
  122. package/dist/primitives/button.jsx +0 -5
  123. package/dist/primitives/keyboard-controller.jsx +0 -27
  124. package/dist/primitives/native-only-animated-view.jsx +0 -5
  125. package/dist/primitives/overlay.jsx +0 -2
  126. package/dist/primitives/pager-gesture.jsx +3 -29
  127. package/dist/primitives/paste-input.jsx +0 -5
  128. package/dist/primitives/select.jsx +0 -8
  129. package/dist/primitives/sheet-drag.jsx +0 -3
  130. package/dist/primitives/sheet-gesture.jsx +0 -8
  131. package/dist/primitives/swipe-row-gesture.jsx +3 -45
  132. package/dist/primitives/text.jsx +0 -5
  133. package/dist/primitives/toast-drag-gesture.jsx +4 -24
  134. package/dist/primitives/web-click-guard.js +0 -3
  135. package/dist/primitives/window-layer.jsx +0 -14
  136. package/dist/push.js +0 -6
  137. package/dist/relativeTime.js +0 -13
  138. package/dist/settings/MoreFromProjectV.jsx +0 -5
  139. package/dist/settings/ThemeModePicker.jsx +0 -4
  140. package/dist/settings/projectVMobileApps.js +1 -6
  141. package/dist/sheetDrag.js +0 -10
  142. package/dist/swipeRow.js +0 -15
  143. package/dist/tabBarRoutes.js +0 -4
  144. package/dist/tabIndicator.js +0 -4
  145. package/dist/tailwind-preset.cjs +0 -54
  146. package/dist/tailwind-preset.d.cts +0 -8
  147. package/dist/theme.jsx +29 -21
  148. package/dist/themeModeStore.js +0 -5
  149. package/dist/toastChrome.js +0 -6
  150. package/dist/toastDrag.js +0 -14
  151. package/dist/toastStore.js +0 -4
  152. package/dist/updateCheck.js +0 -7
  153. package/dist/video/InlineVideo.jsx +0 -2
  154. package/dist/webview/htmlView.js +0 -5
  155. package/package.json +3 -3
  156. package/src/ArtifactList.tsx +0 -2
  157. package/src/Avatar.tsx +3 -3
  158. package/src/Badge.tsx +0 -1
  159. package/src/BottomSheetContainer.tsx +0 -11
  160. package/src/BulkActionBar.tsx +0 -66
  161. package/src/Button.tsx +4 -40
  162. package/src/CaptureButton.tsx +0 -1
  163. package/src/Card.tsx +3 -15
  164. package/src/Checkbox.tsx +0 -2
  165. package/src/ColorSwatches.tsx +0 -9
  166. package/src/ConfirmDialog.tsx +0 -7
  167. package/src/DateTimeField.tsx +0 -5
  168. package/src/Dialog.tsx +0 -27
  169. package/src/DividedList.tsx +0 -1
  170. package/src/DropdownMenu.tsx +0 -51
  171. package/src/EmptyState.tsx +0 -5
  172. package/src/ExpoWebRoot.tsx +0 -10
  173. package/src/Field.tsx +0 -14
  174. package/src/FloatingFAB.tsx +0 -3
  175. package/src/FloatingSurface.tsx +11 -8
  176. package/src/FloatingTabBar.tsx +0 -25
  177. package/src/IconButton.tsx +0 -5
  178. package/src/Input.tsx +0 -1
  179. package/src/Label.tsx +0 -1
  180. package/src/LabeledSwitchRow.tsx +0 -2
  181. package/src/ListRow.tsx +0 -12
  182. package/src/LoadingState.tsx +0 -12
  183. package/src/MenuSheet.tsx +0 -2
  184. package/src/PageIndicator.tsx +0 -2
  185. package/src/PageTitle.tsx +0 -15
  186. package/src/Pager.tsx +0 -9
  187. package/src/PasswordInput.tsx +0 -24
  188. package/src/PillTabs.tsx +3 -11
  189. package/src/PinnedBotTile.tsx +0 -6
  190. package/src/Progress.tsx +0 -3
  191. package/src/ReactionRow.tsx +0 -8
  192. package/src/ScreenContainer.tsx +0 -4
  193. package/src/SearchInput.tsx +0 -25
  194. package/src/SectionLabel.tsx +0 -2
  195. package/src/Select.tsx +0 -6
  196. package/src/Separator.tsx +0 -2
  197. package/src/SharedTransition.tsx +0 -7
  198. package/src/Sheet.tsx +0 -3
  199. package/src/SheetRow.tsx +0 -12
  200. package/src/Skeleton.tsx +0 -10
  201. package/src/Spinner.tsx +0 -6
  202. package/src/StackPageHeader.tsx +0 -16
  203. package/src/StatGrid.tsx +0 -1
  204. package/src/StatusDot.tsx +0 -6
  205. package/src/SurfaceRow.tsx +0 -12
  206. package/src/SwipeableRow.tsx +0 -4
  207. package/src/Switch.tsx +3 -4
  208. package/src/Tabs.tsx +3 -27
  209. package/src/Textarea.tsx +0 -2
  210. package/src/ThemeToggle.tsx +0 -1
  211. package/src/Toast.tsx +3 -19
  212. package/src/UpdateChecker.tsx +0 -46
  213. package/src/ai/activity-question.tsx +0 -8
  214. package/src/ai/activity-step-detail.tsx +0 -5
  215. package/src/ai/activity-step-label.ts +0 -5
  216. package/src/ai/activity-step-types.ts +0 -24
  217. package/src/ai/activity-step.tsx +0 -4
  218. package/src/ai/activity-tasks-utils.ts +0 -13
  219. package/src/ai/activity-timeline.ts +0 -6
  220. package/src/ai/attachments.tsx +0 -13
  221. package/src/ai/chain-of-thought.tsx +0 -5
  222. package/src/ai/chat-jump-rail.tsx +0 -2
  223. package/src/ai/chat-text.ts +2 -3
  224. package/src/ai/chat-thread.tsx +0 -9
  225. package/src/ai/choice-question.tsx +0 -36
  226. package/src/ai/code-block.tsx +0 -52
  227. package/src/ai/collapsible.tsx +0 -12
  228. package/src/ai/conversation-context.ts +0 -14
  229. package/src/ai/conversation.tsx +0 -58
  230. package/src/ai/file-chip.tsx +0 -1
  231. package/src/ai/icon-button.tsx +5 -22
  232. package/src/ai/index.ts +0 -5
  233. package/src/ai/message-action-sheet.tsx +0 -8
  234. package/src/ai/message-context-menu.tsx +0 -22
  235. package/src/ai/message-quote.tsx +0 -4
  236. package/src/ai/message.tsx +0 -66
  237. package/src/ai/prompt-input-menu.tsx +0 -19
  238. package/src/ai/prompt-input.tsx +1 -98
  239. package/src/ai/reasoning.tsx +0 -6
  240. package/src/ai/reply-quote-chip.tsx +0 -5
  241. package/src/ai/response-text.tsx +0 -8
  242. package/src/ai/shimmer.tsx +0 -2
  243. package/src/ai/sources.tsx +0 -3
  244. package/src/ai/subagent-cards.tsx +0 -13
  245. package/src/ai/suggestion.tsx +0 -4
  246. package/src/ai/tool-approval-card.tsx +0 -14
  247. package/src/ai/trace.tsx +0 -23
  248. package/src/ai/unified-diff.tsx +0 -16
  249. package/src/ai/use-streaming-disclosure.ts +0 -4
  250. package/src/app-root/AuthGroupGate.tsx +0 -8
  251. package/src/app-root/SsoCallbackScreen.tsx +0 -10
  252. package/src/app-root/fonts.ts +0 -2
  253. package/src/auth/AccountScreens.tsx +0 -16
  254. package/src/auth/AuthProviders.tsx +0 -13
  255. package/src/auth/AuthScreen.tsx +0 -12
  256. package/src/auth/GoogleSignInButton.tsx +0 -12
  257. package/src/auth/SecondFactorScreen.tsx +0 -16
  258. package/src/auth/SignInScreen.tsx +0 -68
  259. package/src/auth/authErrors.ts +0 -6
  260. package/src/auth/clerkCore3.ts +0 -6
  261. package/src/auth/index.ts +0 -4
  262. package/src/auth/totp.ts +0 -13
  263. package/src/brand/AppIcons.tsx +0 -6
  264. package/src/brand/AppMark.tsx +0 -5
  265. package/src/brand/AppWordmark.tsx +0 -7
  266. package/src/brand/GoogleMark.tsx +0 -4
  267. package/src/brand/ProviderIcon.tsx +0 -6
  268. package/src/brand/familyApps.ts +0 -2
  269. package/src/brand/index.ts +0 -3
  270. package/src/brand/svg.ts +0 -9
  271. package/src/configureTheme.ts +0 -10
  272. package/src/controlStyles.ts +0 -12
  273. package/src/crash/LastCrashDialog.tsx +0 -6
  274. package/src/crash/lastCrash.ts +0 -21
  275. package/src/entries/ai.ts +0 -3
  276. package/src/entries/ambient.ts +0 -2
  277. package/src/entries/app-root.ts +0 -5
  278. package/src/entries/auth.ts +0 -4
  279. package/src/entries/bottom-sheet.ts +0 -2
  280. package/src/entries/brand.ts +0 -1
  281. package/src/entries/button.ts +0 -1
  282. package/src/entries/crash.ts +0 -3
  283. package/src/entries/date-time.ts +0 -2
  284. package/src/entries/expo-router.ts +0 -3
  285. package/src/entries/expo-web-root.ts +0 -2
  286. package/src/entries/floating.ts +0 -2
  287. package/src/entries/generative-ui.ts +0 -4
  288. package/src/entries/gesture-handler.ts +0 -3
  289. package/src/entries/keyboard-controller.ts +0 -3
  290. package/src/entries/layout.ts +0 -2
  291. package/src/entries/markdown.ts +0 -3
  292. package/src/entries/marketing.ts +0 -1
  293. package/src/entries/page-title.ts +0 -5
  294. package/src/entries/password-input.ts +0 -2
  295. package/src/entries/paste-input.ts +0 -3
  296. package/src/entries/primitives.ts +0 -6
  297. package/src/entries/search-input.ts +0 -2
  298. package/src/entries/tab-bar.ts +0 -2
  299. package/src/entries/theme.ts +2 -2
  300. package/src/entries/toast.ts +0 -3
  301. package/src/entries/video.ts +0 -2
  302. package/src/entries/webview.ts +0 -2
  303. package/src/examples/AiChatGallery.tsx +0 -11
  304. package/src/examples/ParityGallery.tsx +0 -25
  305. package/src/floating.ts +0 -6
  306. package/src/generative-ui/GenerativeUiPanel.tsx +0 -15
  307. package/src/generative-ui/components.tsx +0 -9
  308. package/src/generative-ui/context.ts +0 -2
  309. package/src/glass.ts +31 -0
  310. package/src/glassBlur.tsx +0 -15
  311. package/src/highlight.ts +0 -20
  312. package/src/index.ts +2 -2
  313. package/src/loadingGrid.ts +0 -12
  314. package/src/markdown/Markdown.tsx +0 -71
  315. package/src/markdown/MarkdownTable.tsx +0 -23
  316. package/src/markdown/tableText.ts +0 -3
  317. package/src/marketing/PricingModal.tsx +0 -13
  318. package/src/marketing/UpgradeToProCard.tsx +0 -14
  319. package/src/marketing/pricing.ts +0 -12
  320. package/src/media/ImageGallery.tsx +0 -18
  321. package/src/media/MediaCard.tsx +0 -8
  322. package/src/media/imageZoom.ts +0 -4
  323. package/src/media/zoom-image-gesture.tsx +0 -9
  324. package/src/media/zoomImage.ts +0 -5
  325. package/src/motion.ts +0 -3
  326. package/src/neutralTheme.ts +0 -3
  327. package/src/pagerSwipe.ts +0 -13
  328. package/src/palette.ts +0 -10
  329. package/src/pressScale.ts +0 -7
  330. package/src/primitives/button.tsx +0 -4
  331. package/src/primitives/card.tsx +0 -1
  332. package/src/primitives/input.tsx +0 -4
  333. package/src/primitives/keyboard-controller.tsx +0 -25
  334. package/src/primitives/keyboard-parts.tsx +0 -27
  335. package/src/primitives/native-only-animated-view.tsx +0 -5
  336. package/src/primitives/overlay.tsx +0 -25
  337. package/src/primitives/pager-gesture.tsx +0 -20
  338. package/src/primitives/paste-input.tsx +0 -4
  339. package/src/primitives/paste-parts.tsx +0 -1
  340. package/src/primitives/select.tsx +0 -16
  341. package/src/primitives/sheet-drag.tsx +0 -19
  342. package/src/primitives/sheet-gesture.tsx +0 -22
  343. package/src/primitives/swipe-row-gesture.tsx +0 -33
  344. package/src/primitives/switch.tsx +0 -4
  345. package/src/primitives/text.tsx +0 -4
  346. package/src/primitives/toast-drag-gesture.tsx +0 -13
  347. package/src/primitives/web-click-guard.ts +0 -2
  348. package/src/primitives/window-layer.tsx +0 -18
  349. package/src/push.ts +0 -15
  350. package/src/relativeTime.ts +0 -21
  351. package/src/router/RouterStackPageHeader.tsx +0 -1
  352. package/src/settings/MoreFromProjectV.tsx +0 -8
  353. package/src/settings/SettingsEmptyState.tsx +0 -2
  354. package/src/settings/SettingsSection.tsx +0 -3
  355. package/src/settings/SettingsToggleRow.tsx +0 -4
  356. package/src/settings/ThemeModePicker.tsx +0 -11
  357. package/src/settings/projectVMobileApps.ts +0 -8
  358. package/src/sheetDrag.ts +0 -9
  359. package/src/swipeRow.ts +0 -23
  360. package/src/tabBarRoutes.ts +0 -13
  361. package/src/tabIndicator.ts +0 -5
  362. package/src/tailwind-preset.cjs +0 -54
  363. package/src/tailwind-preset.d.cts +0 -8
  364. package/src/theme.tsx +11 -2
  365. package/src/themeModeStore.ts +0 -9
  366. package/src/toastChrome.ts +0 -6
  367. package/src/toastDrag.ts +0 -13
  368. package/src/toastStore.ts +0 -7
  369. package/src/updateCheck.ts +0 -15
  370. package/src/video/InlineVideo.tsx +0 -5
  371. package/src/webview/HtmlView.tsx +0 -23
  372. package/src/webview/HtmlView.web.tsx +0 -1
  373. package/src/webview/htmlView.ts +0 -5
@@ -10,8 +10,6 @@ const openUrl = url => {
10
10
  void Linking.openURL(url);
11
11
  };
12
12
  const UnsupportedContext = createContext(undefined);
13
-
14
- /** json-render's fallback for an unknown type, drawn by the app's `renderUnsupported`. */
15
13
  function UnsupportedElement(t0) {
16
14
  const $ = _c(3);
17
15
  const {
@@ -14,14 +14,6 @@ import { tokens } from "../tokens";
14
14
  import { useScheme } from "../useScheme";
15
15
  import { useGenerativeUiPanel } from "./context";
16
16
  import { ALIGN, BADGE_VARIANT, BUTTON_VARIANT, GAP, toneSurface, toneText } from "./styles";
17
-
18
- /**
19
- * The phone parts of a generative UI panel, one per catalog component, drawn
20
- * as the web `@vvedantb/ui/generative-ui` draws them: the same sizes, tones and
21
- * gaps, on the native theme tokens.
22
- */
23
-
24
- /** The web `text-2xs` (11 / 14), for a metric's delta; the other sizes are the shared `text-*`. */
25
17
  const TEXT_2XS = {
26
18
  fontSize: 11,
27
19
  lineHeight: 14
package/dist/glass.js ADDED
@@ -0,0 +1,55 @@
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { useSurface } from "./theme";
3
+ import { useScheme } from "./useScheme";
4
+ const HIGHLIGHT = {
5
+ light: 0.5,
6
+ dark: 0.12
7
+ };
8
+ const RIM = {
9
+ light: 0.4,
10
+ dark: 0.08
11
+ };
12
+ const DROP = {
13
+ surface: "0px 1px 3px rgba(0, 0, 0, 0.08)",
14
+ control: "0px 1px 2px rgba(0, 0, 0, 0.12)",
15
+ small: "0px 1px 1px rgba(0, 0, 0, 0.08)"
16
+ };
17
+
18
+ /**
19
+ * The glass finish as a `boxShadow` string: a thin inset rim, a soft top-left
20
+ * highlight and a small drop shadow. The same recipe as the web components.
21
+ */
22
+ export function glassShadow(kind, scheme) {
23
+ const rim = `inset 0px 0px 0px 1px rgba(255, 255, 255, ${RIM[scheme]})`;
24
+ const highlight = `inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, ${HIGHLIGHT[scheme]})`;
25
+ return `${rim}, ${highlight}, ${DROP[kind]}`;
26
+ }
27
+
28
+ /** The glass style for `kind`, or `null` when `NativeUiProvider` sets `surface="flat"`. */
29
+ export function useGlass(kind) {
30
+ const $ = _c(5);
31
+ const scheme = useScheme();
32
+ if (useSurface() === "flat") {
33
+ return null;
34
+ }
35
+ let t0;
36
+ if ($[0] !== kind || $[1] !== scheme) {
37
+ t0 = glassShadow(kind, scheme);
38
+ $[0] = kind;
39
+ $[1] = scheme;
40
+ $[2] = t0;
41
+ } else {
42
+ t0 = $[2];
43
+ }
44
+ let t1;
45
+ if ($[3] !== t0) {
46
+ t1 = {
47
+ boxShadow: t0
48
+ };
49
+ $[3] = t0;
50
+ $[4] = t1;
51
+ } else {
52
+ t1 = $[4];
53
+ }
54
+ return t1;
55
+ }
@@ -2,14 +2,6 @@ import { c as _c } from "react/compiler-runtime";
2
2
  import { createContext, useContext, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
3
3
  import { StyleSheet, View } from "react-native";
4
4
  import { loadBlur } from "./blur";
5
-
6
- /**
7
- * The current blur target, outside React state. A target change (each tab
8
- * switch hands it from one tab to the next) then re-renders only the glass
9
- * that subscribes, not the whole tab tree under the provider: as a context
10
- * value it walked every mounted tab twice per switch.
11
- */
12
-
13
5
  function createBlurTargetStore() {
14
6
  let current = null;
15
7
  const listeners = new Set();
@@ -26,10 +18,6 @@ function createBlurTargetStore() {
26
18
  }
27
19
  };
28
20
  }
29
-
30
- // `null` outside a provider and inside a target (a blur view must not sit
31
- // inside its own target). The value is the provider's one store, so it never
32
- // changes.
33
21
  const BlurTargetStoreContext = createContext(null);
34
22
  const noSubscribe = () => () => {};
35
23
  const noTarget = () => null;
package/dist/highlight.js CHANGED
@@ -14,8 +14,6 @@ export function loadPrismReactRenderer() {
14
14
  prismReactRenderer = null;
15
15
  }
16
16
  }
17
- // `?? null`: with the real peer types installed, TypeScript keeps `undefined`
18
- // in the type after the `try` (the package typecheck only sees a stub).
19
17
  return prismReactRenderer ?? null;
20
18
  }
21
19
  /**
@@ -48,8 +46,6 @@ export const GITHUB_CODE_COLORS = {
48
46
  deleted: "#fdaeb7"
49
47
  }
50
48
  };
51
-
52
- /** Prism token types to their GitHub role. Types not listed are plain. */
53
49
  const PRISM_ROLE = {
54
50
  comment: "comment",
55
51
  prolog: "comment",
@@ -111,23 +107,17 @@ export const SCRIPT_LANGUAGES = new Set(["js", "jsx", "javascript", "mjs", "cjs"
111
107
 
112
108
  /** Languages `shellTokens` colours. `prism-react-renderer` bundles no shell grammar. */
113
109
  export const SHELL_LANGUAGES = new Set(["bash", "sh", "shell", "zsh", "shellscript", "console"]);
114
-
115
- /** Keywords Shiki colours as constants (`constant.language`, `variable.language`, a `void` type). */
116
110
  const SCRIPT_CONSTANT_KEYWORDS = new Set(["null", "undefined", "this", "super", "void"]);
117
111
  const IDENTIFIER = /^[A-Za-z_$][\w$]*$/;
118
-
119
- /** A token's role before context: what Prism's types say, with the Shiki differences that need no context. */
120
112
  function scriptBaseRole({
121
113
  types,
122
114
  content
123
115
  }) {
124
- // Inside `${…}` Shiki keeps the punctuation in the string colour and the code in its own.
125
116
  const interpolation = types.lastIndexOf("interpolation");
126
117
  if (interpolation >= 0) {
127
118
  const inner = types.slice(interpolation + 1);
128
119
  return inner.includes("punctuation") || inner.includes("interpolation-punctuation") ? "string" : prismRole(inner);
129
120
  }
130
- // A regex character class, brackets and escapes too.
131
121
  if (types.includes("char-class")) return "constant";
132
122
  const role = prismRole(types);
133
123
  if (role === "keyword" && SCRIPT_CONSTANT_KEYWORDS.has(content)) return "constant";
@@ -135,7 +125,6 @@ function scriptBaseRole({
135
125
  if (types.includes("function") && content === "constructor") return "keyword";
136
126
  return role;
137
127
  }
138
- /** Splits a token so escapes in strings and each word of plain text get a role of their own. */
139
128
  function splitPiece(piece) {
140
129
  const parts = piece.role === "string" && !piece.types.includes("regex") ? piece.content.split(/(\\.)/) : piece.role === "plain" ? piece.content.split(/([A-Za-z_$][\w$]*)/) : [piece.content];
141
130
  return parts.filter(part => part !== "").map(part => ({
@@ -162,7 +151,6 @@ export function scriptTokens(lines) {
162
151
  role: scriptBaseRole(token),
163
152
  line
164
153
  })));
165
- // Indices of the pieces that are not whitespace.
166
154
  const sig = pieces.flatMap((piece, index) => piece.content.trim() === "" ? [] : [index]);
167
155
  const at = position => {
168
156
  const index = sig[position];
@@ -180,7 +168,6 @@ export function scriptTokens(lines) {
180
168
  }
181
169
  return undefined;
182
170
  };
183
- // An arrow function's parameters, or a declared function's or method's.
184
171
  const isParameterList = (open, close) => {
185
172
  const before = at(open - 1);
186
173
  if (isWord(before, "function") || isWord(before, "constructor")) return true;
@@ -210,7 +197,6 @@ export function scriptTokens(lines) {
210
197
  }
211
198
  let inImport = false;
212
199
  let constPattern = 0;
213
- // `Map<string, number>`: Shiki draws type-argument brackets plain, Prism as operators.
214
200
  let generic = 0;
215
201
  for (let position = 0; position < sig.length; position += 1) {
216
202
  const piece = at(position);
@@ -218,7 +204,6 @@ export function scriptTokens(lines) {
218
204
  const previous = at(position - 1);
219
205
  if (piece.role === "keyword" && piece.content === "import") inImport = true;
220
206
  if (piece.role === "keyword" && piece.content === "from") inImport = false;
221
- // `const { a, b } = …`: every name in the pattern.
222
207
  if (isWord(previous, "const") && (piece.content === "{" || piece.content === "[")) constPattern = 1;else if (constPattern > 0 && (piece.content === "{" || piece.content === "[")) constPattern += 1;else if (constPattern > 0 && (piece.content === "}" || piece.content === "]")) constPattern -= 1;
223
208
  if (piece.role === "keyword" && piece.content === "<" && pieces[(sig[position] ?? 0) - 1]?.role === "function") {
224
209
  piece.role = "plain";
@@ -252,14 +237,8 @@ function mergeLines(pieces, count) {
252
237
  }
253
238
  return out;
254
239
  }
255
-
256
- /** Shell words Shiki colours as keywords. */
257
240
  const SHELL_KEYWORDS = new Set(["if", "then", "else", "elif", "fi", "for", "while", "until", "do", "done", "case", "esac", "in", "function", "select", "break", "continue", "return", "export", "local", "readonly", "declare"]);
258
-
259
- /** After these a new command starts. */
260
241
  const SHELL_COMMAND_KEYWORDS = new Set(["then", "else", "do", "if", "while", "until", "elif"]);
261
-
262
- /** Shell builtins Shiki colours as constants (`support.function.builtin`). */
263
242
  const SHELL_BUILTINS = new Set(["echo", "cd", "printf", "source", "set", "unset", "exit", "pwd", "read", "eval", "exec", "shift", "trap", "wait", "type", "alias", "unalias", "true", "false", "test", "ulimit", "umask", "kill"]);
264
243
 
265
244
  /**
@@ -283,9 +262,7 @@ export function shellTokens(code) {
283
262
  };
284
263
  let index = 0;
285
264
  let command = true;
286
- // `for NAME in`: the name is plain, then `in` is a keyword.
287
265
  let forState = "none";
288
- // Inside `[ … ]` Shiki draws test operators (`-f`) as keywords and words plain.
289
266
  let inTest = false;
290
267
  while (index < source.length) {
291
268
  const rest = source.slice(index);
@@ -300,7 +277,6 @@ export function shellTokens(code) {
300
277
  break;
301
278
  }
302
279
  if (rest.startsWith('"')) {
303
- // Double quotes: the string colour, with `$VAR` and `${VAR}` names plain.
304
280
  const end = rest.slice(1).search(/(?<!\\)"/);
305
281
  const text = end < 0 ? rest : rest.slice(0, end + 2);
306
282
  for (const part of text.split(/(\$\{[^}]*\}|\$[A-Za-z_]\w*)/)) {
@@ -326,7 +302,6 @@ export function shellTokens(code) {
326
302
  const operator = /^(?:\d?>>?&?\d?|<|\|\||\||&&|;|&|\$\(|\(|\)|`)/.exec(rest);
327
303
  if (operator) {
328
304
  const text = operator[0];
329
- // Shiki: `|`, `||` and redirects in the keyword colour, `&&` and `;` plain.
330
305
  push(text, text === "&&" || text === ";" || text === "$(" || text === "(" || text === ")" || text === "`" ? "plain" : "keyword");
331
306
  index += text.length;
332
307
  command = text !== ")" && !/^\d?>/.test(text) && text !== "<";
@@ -348,7 +323,6 @@ export function shellTokens(code) {
348
323
  forState = word === "for" ? "name" : "none";
349
324
  continue;
350
325
  }
351
- // A test's brackets are plain, and what follows them is not a command.
352
326
  if (word === "[" || word === "[[" || word === "]" || word === "]]") {
353
327
  push(word, "plain");
354
328
  command = false;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { cn } from "./cn";
2
- export { tokens, NativeUiProvider, useNativeUi, useLargerText, useAccentColor, DEFAULT_ACCENT } from "./theme";
2
+ export { tokens, NativeUiProvider, useNativeUi, useLargerText, useAccentColor, useSurface, DEFAULT_ACCENT } from "./theme";
3
3
  export { palette, withAlpha } from "./palette";
4
4
  export { configureTheme } from "./configureTheme";
5
5
  export { NEUTRAL_PALETTE, NEUTRAL_CHANNELS, paintDarkFamily } from "./neutralTheme";
@@ -90,7 +90,6 @@ export { ArtifactList } from "./ArtifactList";
90
90
  export { MoreFromProjectV, FromProjectV } from "./settings/MoreFromProjectV";
91
91
  export { PROJECT_V_MOBILE_APPS, projectVMobileApp, otherProjectVMobileApps, openProjectVApp, projectVAppOpenSteps, VSTORE_HOME_URL, androidIntentUrl } from "./settings/projectVMobileApps";
92
92
  export { PINK_50, PINK_100, PINK_600, PINK_700, NEUTRAL_100, NEUTRAL_500, NEUTRAL_900, Colors } from "./colors";
93
- // Family app marks and their pure data (copied from `@vvedantb/ui/brand`), and `GoogleMark`.
94
93
  export * from "./brand";
95
94
  export { UpgradeToProCard } from "./marketing/UpgradeToProCard";
96
95
  export { PricingModal } from "./marketing/PricingModal";
@@ -1,17 +1,5 @@
1
- /**
2
- * The web `LoadingState` `Drive` pixel grid (`packages/ui/src/ui/loading-state.tsx`)
3
- * as plain numbers, so the timing stays testable apart from Reanimated. Each
4
- * function is a worklet: the grid runs it on the UI thread every frame.
5
- *
6
- * Nine cells in a 3x3 grid pulse in a chevron wavefront that drives right.
7
- * The 650 ms cycle is shorter than the sweep (0-360 ms of delays), so two
8
- * fronts are always in flight.
9
- */
10
-
11
1
  /** One pulse of a cell, in ms: the web `PATTERNS.Drive.dur`. */
12
2
  export const DRIVE_CYCLE_MS = 650;
13
-
14
- /** A cell's opacity at the low and high keyframes. */
15
3
  const LOW = 0.12;
16
4
  const HIGH = 1;
17
5
  /** A cell's still opacity before its delay ends: the web inline `opacity: 0.15`. */
@@ -54,7 +42,6 @@ export function cssEaseInOut(x) {
54
42
 
55
43
  if (x <= 0) return 0;
56
44
  if (x >= 1) return 1;
57
- // x(t) = 3(1-t)^2 t x1 + 3(1-t) t^2 x2 + t^3 rises with t, so bisect for t.
58
45
  const curve = (t, p1, p2) => 3 * (1 - t) * (1 - t) * t * p1 + 3 * (1 - t) * t * t * p2 + t * t * t;
59
46
  let lo = 0;
60
47
  let hi = 1;
@@ -158,8 +158,6 @@ export function markdownStyles(scheme, body, color, headings = "default") {
158
158
  ...trackingStyle(12, "wide"),
159
159
  textTransform: "uppercase",
160
160
  color: tokens.color.muted[scheme],
161
- // With the half gap each block keeps (margins do not collapse): 16 above,
162
- // the next block's 8 below (the web `mt-4 mb-1.5`, collapsed).
163
161
  marginTop: MARKDOWN_SCALE.blockGap / 2,
164
162
  marginBottom: 0,
165
163
  paddingBottom: 0,
@@ -173,7 +171,6 @@ export function markdownStyles(scheme, body, color, headings = "default") {
173
171
  letterSpacing: -0.01 * body.fontSize * scale,
174
172
  color,
175
173
  marginVertical: MARKDOWN_SCALE.blockGap / 2,
176
- // `react-native-marked` rules h1 and h2 off; the web has no rule.
177
174
  paddingBottom: 0,
178
175
  borderBottomWidth: 0
179
176
  });
@@ -181,8 +178,6 @@ export function markdownStyles(scheme, body, color, headings = "default") {
181
178
  const gap = {
182
179
  marginVertical: MARKDOWN_SCALE.blockGap / 2
183
180
  };
184
- // The library's inline styles start from its own 16 / 24 text, so each one
185
- // restates the body size, or a bold or linked word grows the line.
186
181
  const inline = {
187
182
  fontSize: body.fontSize,
188
183
  lineHeight: body.lineHeight
@@ -266,11 +261,6 @@ export function inlineCodeStyle(scheme, fontSize, color) {
266
261
  } : null)
267
262
  };
268
263
  }
269
-
270
- /**
271
- * A paragraph block. A component of its own so `listItem` can find it in a
272
- * loose list (the parser's own paragraph is a plain `View`).
273
- */
274
264
  function Paragraph(t0) {
275
265
  const $ = _c(3);
276
266
  const {
@@ -288,11 +278,6 @@ function Paragraph(t0) {
288
278
  }
289
279
  return t1;
290
280
  }
291
- /**
292
- * An inline-code chip (see `codespan`). A component of its own so
293
- * `restyleText` can find it: NativeWind's JSX swaps a `Text` made in this
294
- * file for its own wrapper, so the type no longer equals `Text`.
295
- */
296
281
  function InlineCode(t0) {
297
282
  const $ = _c(3);
298
283
  const {
@@ -310,13 +295,6 @@ function InlineCode(t0) {
310
295
  }
311
296
  return t1;
312
297
  }
313
-
314
- /**
315
- * `node` with `map` applied to the style of every `Text` in it. The parser
316
- * bakes the text style into each `Text`, and React Native text takes no
317
- * style from a parent view, so a block that restyles its text (a quote, a
318
- * table) rewrites it here. Links keep their own style.
319
- */
320
298
  function restyleText(node, map) {
321
299
  return Children.map(node, child => {
322
300
  if (!isValidElement(child)) return child;
@@ -330,8 +308,6 @@ function restyleText(node, map) {
330
308
  return children === undefined ? child : cloneElement(child, {}, children);
331
309
  });
332
310
  }
333
-
334
- /** A link's text with its styling stripped: the strings in it, in order. */
335
311
  function plainText(node) {
336
312
  let out = "";
337
313
  Children.forEach(node, child => {
@@ -339,11 +315,6 @@ function plainText(node) {
339
315
  });
340
316
  return out;
341
317
  }
342
-
343
- /**
344
- * A cell's plain text, as the web reads a cell's `textContent` for Copy
345
- * table: inline code without the no-break spaces that pad its chip.
346
- */
347
318
  function cellText(cell) {
348
319
  return nodeText(cell).trim();
349
320
  }
@@ -362,13 +333,6 @@ export const MARKDOWN_LIST = {
362
333
  itemGap: 4,
363
334
  disc: 5
364
335
  };
365
-
366
- /**
367
- * `react-native-marked`'s renderer with native-ui code and lists: `CodeBlock`
368
- * panels, inline-code chips, and lists drawn as the web `.markdown` lists
369
- * (the library's own markers apply its marker style to every item). Links,
370
- * quotes and tables are drawn here too.
371
- */
372
336
  class NativeUiMarkdownRenderer extends Renderer {
373
337
  constructor(scheme, fontSize, color, onCopyCode, onCopyTable, renderLink) {
374
338
  super();
@@ -379,12 +343,6 @@ class NativeUiMarkdownRenderer extends Renderer {
379
343
  this.onCopyTable = onCopyTable;
380
344
  this.renderLink = renderLink;
381
345
  }
382
-
383
- /**
384
- * Web `.markdown-link`, medium weight. The parser gives a link the
385
- * paragraph's regular face, so the face is set here, on the link and the
386
- * text in it.
387
- */
388
346
  link(children, href, styles, title) {
389
347
  const custom = this.renderLink?.(href, plainText(children));
390
348
  if (custom !== undefined) return <Fragment key={this.getKey()}>{custom}</Fragment>;
@@ -396,11 +354,8 @@ class NativeUiMarkdownRenderer extends Renderer {
396
354
  const content = typeof children === "string" ? children : Children.toArray(restyleText(children, medium));
397
355
  return super.link(content, href, medium(styles ?? {}), title);
398
356
  }
399
-
400
- /** Web `.markdown blockquote`: the left rule, and the text in the muted colour. */
401
357
  blockquote(children, styles) {
402
358
  const muted = tokens.color.muted[this.scheme];
403
- // The inner blocks' outer margins come off, as web margins collapse into the quote's.
404
359
  return <View key={this.getKey()} style={styles}>
405
360
  <View style={{
406
361
  marginVertical: -MARKDOWN_SCALE.blockGap / 2
@@ -412,11 +367,6 @@ class NativeUiMarkdownRenderer extends Renderer {
412
367
  </View>
413
368
  </View>;
414
369
  }
415
-
416
- /**
417
- * The web table on its panel (`MarkdownTable`): header cells semibold,
418
- * rows split by a 70% border, and the table actions above it.
419
- */
420
370
  table(header, rows) {
421
371
  const {
422
372
  fontScale,
@@ -424,7 +374,6 @@ class NativeUiMarkdownRenderer extends Renderer {
424
374
  } = MARKDOWN_TABLE;
425
375
  const small = style => {
426
376
  const size = typeof style.fontSize === "number" ? style.fontSize * fontScale : this.fontSize * fontScale;
427
- // Body text takes the table line height; inline code keeps its own.
428
377
  return style.fontFamily === MONO_FONT ? {
429
378
  ...style,
430
379
  fontSize: size
@@ -453,12 +402,6 @@ class NativeUiMarkdownRenderer extends Renderer {
453
402
  {children}
454
403
  </Paragraph>;
455
404
  }
456
-
457
- /**
458
- * A loose list (items a blank line apart, as Eva's doc editor writes them)
459
- * puts each item's text in a paragraph. Its outer margins come off, as in
460
- * a quote, so the text sits on the marker's line, as the tight list.
461
- */
462
405
  listItem(children, styles) {
463
406
  const loose = children.some(child => isValidElement(child) && child.type === Paragraph);
464
407
  if (!loose) return super.listItem(children, styles);
@@ -472,7 +415,6 @@ class NativeUiMarkdownRenderer extends Renderer {
472
415
  return <CodeBlock key={this.getKey()} variant="markdown" code={text} language={language || undefined} onCopy={this.onCopyCode} />;
473
416
  }
474
417
  codespan(text) {
475
- // Text in Text takes no padding: no-break spaces pad the chip and keep it on one line.
476
418
  return <InlineCode key={this.getKey()} style={inlineCodeStyle(this.scheme, this.fontSize, this.color)}>
477
419
  {`\u00A0${text}\u00A0`}
478
420
  </InlineCode>;
@@ -480,7 +422,6 @@ class NativeUiMarkdownRenderer extends Renderer {
480
422
  list(ordered, li, _listStyle, textStyle, startIndex = 1) {
481
423
  const muted = tokens.color.muted[this.scheme];
482
424
  const lineHeight = typeof textStyle?.lineHeight === "number" ? textStyle.lineHeight : 24;
483
- // A drawn disc: the font's bullet glyph is far smaller than the web `disc` marker.
484
425
  const disc = MARKDOWN_LIST.disc;
485
426
  return <View key={this.getKey()} style={{
486
427
  marginVertical: MARKDOWN_SCALE.blockGap / 2,
@@ -30,27 +30,14 @@ export const MARKDOWN_TABLE = {
30
30
  bottom: 6
31
31
  },
32
32
  tableMargin: 10,
33
- /** The web action row: 24 buttons in a 27 row. */
34
33
  actionsHeight: 27,
35
- /**
36
- * The web buttons sit 4 apart; here 16, so each slops to 44 without
37
- * taking its neighbour's taps.
38
- */
39
34
  actionsGap: 16
40
35
  };
41
-
42
- /**
43
- * The full-screen table sizes each column to its text, as the web table does
44
- * (`markdownTableColumnWidths`). 8.5 a character fits the 12 mono of inline
45
- * code with its chip padding, so a code cell does not wrap; body text is narrower.
46
- */
47
36
  const FULL_SCREEN_COLUMN = {
48
37
  charWidth: 8.5,
49
38
  min: 72,
50
39
  max: 320
51
40
  };
52
-
53
- /** The web Copy table menu, in its order. */
54
41
  const COPY_FORMATS = [{
55
42
  format: "markdown",
56
43
  title: "Markdown"
@@ -61,11 +48,6 @@ const COPY_FORMATS = [{
61
48
  format: "tsv",
62
49
  title: "TSV"
63
50
  }];
64
- /**
65
- * The cells as rows. `widths` gives every column its own width (the
66
- * full-screen view, which scrolls sideways); without it the columns share the
67
- * width equally and the cells wrap, so they line up in a chat column.
68
- */
69
51
  function TableRows(t0) {
70
52
  const $ = _c(17);
71
53
  const {
@@ -4,7 +4,6 @@
4
4
  * and TSV), from each cell's plain text.
5
5
  */
6
6
 
7
- /** CSV: a cell with a comma, quote or line break is quoted, its quotes doubled. Lines join with `\n`. */
8
7
  function toCsv({
9
8
  headers,
10
9
  rows
@@ -12,8 +11,6 @@ function toCsv({
12
11
  const cell = text => /[",\n\r]/.test(text) ? `"${text.replace(/"/g, '""')}"` : text;
13
12
  return [...(headers.length > 0 ? [headers] : []), ...rows].map(row => row.map(cell).join(",")).join("\n");
14
13
  }
15
-
16
- /** TSV: tabs and line breaks in a cell are written as `\t`, `\n` and `\r`. */
17
14
  function toTsv({
18
15
  headers,
19
16
  rows
@@ -29,8 +26,6 @@ const MARKDOWN_ESCAPES = {
29
26
  "<": "&lt;",
30
27
  ">": "&gt;"
31
28
  };
32
-
33
- /** GitHub markdown: pipes and backslashes escaped, line breaks as `<br>`, short rows padded to the header. */
34
29
  function toMarkdown({
35
30
  headers,
36
31
  rows
@@ -5,12 +5,7 @@ import { sizeStyle, textStyle, typeStyle } from "../controlStyles";
5
5
  import { tokens } from "../tokens";
6
6
  import { useLargerText } from "../theme";
7
7
  import { useScheme } from "../useScheme";
8
-
9
- /** Web `rounded-2xl` (16) on the card. */
10
8
  const RADIUS = tokens.radius.lg;
11
-
12
- // The web `Button` `sm` (`h-8 px-3 text-xs`) uses `max-sm:hit-target`, 8 on
13
- // each side: 32 + 16 = 48, as the native `Button` `small`.
14
9
  const HIT_SLOP = 8;
15
10
  /**
16
11
  * Upgrade prompt, the native `SidebarUpgradeCard`: the title and an "Upgrade"
@@ -1,6 +1,3 @@
1
- // Plan types and pure helpers for `PricingModal`, the same shapes and rules as
2
- // the web `PricingModal` multi-plan layout. No React Native imports.
3
-
4
1
  import { V_PRO_APP_BENEFITS } from "../brand/vProAppBenefits";
5
2
  /** `featured`, else `highlighted` (the web rule: `featured ?? highlighted`). */
6
3
  export function isEmphasised(plan) {
@@ -67,8 +67,6 @@ export function ImageGallery(t0) {
67
67
  }
68
68
  return t4;
69
69
  }
70
-
71
- /** The hairline-ringed, rounded frame of a gallery image or grid. */
72
70
  function useMediaFrame() {
73
71
  const $ = _c(3);
74
72
  const scheme = useScheme();
@@ -91,12 +89,6 @@ function useMediaFrame() {
91
89
  }
92
90
  return t2;
93
91
  }
94
-
95
- /**
96
- * A lone image, sized from the column and the image's own shape and capped
97
- * at 384 high, so a tall capture keeps its shape instead of being cropped.
98
- * Until both are known it holds a full-width 4:3 box.
99
- */
100
92
  function SingleImage(t0) {
101
93
  const $ = _c(18);
102
94
  const {
@@ -185,12 +177,6 @@ function SingleImage(t0) {
185
177
  }
186
178
  return t9;
187
179
  }
188
-
189
- /**
190
- * Two columns of 4:3 tiles, filled as the web grid's rows are: tiles 0 and 2
191
- * on the left, 1 and 3 on the right. With three, the first fills the left
192
- * column, as tall as the two on the right.
193
- */
194
180
  function ImageGrid(t0) {
195
181
  const $ = _c(27);
196
182
  const {
@@ -380,8 +366,6 @@ export function ImageViewer(t0) {
380
366
  }
381
367
  return t2;
382
368
  }
383
-
384
- /** The zoom parts' gesture root, when there are zoom parts. */
385
369
  function ViewerRoot(t0) {
386
370
  const $ = _c(3);
387
371
  const {
@@ -1,6 +1,3 @@
1
- // The zoom rules of `ImageViewer`, as plain worklets: the gesture part
2
- // (`zoom-image-gesture`) runs them on the UI thread, and tests call them.
3
-
4
1
  /** Fitted size is 1; a pinch goes up to 5 and rubber-bands a little past both ends. */
5
2
  export const ZOOM = {
6
3
  min: 1,
@@ -56,7 +53,6 @@ export function doubleTapZoom(scale, point, size) {
56
53
  y: 0
57
54
  };
58
55
  const next = ZOOM.doubleTap;
59
- // The tapped point, from centre, moves out by `next`; shift back by that much.
60
56
  const x = -(point.x - size.width / 2) * (next - 1);
61
57
  const y = -(point.y - size.height / 2) * (next - 1);
62
58
  return {
@@ -4,12 +4,6 @@ import { Image, StyleSheet, View } from "react-native";
4
4
  import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
5
5
  import Animated, { ReduceMotion, runOnJS, useAnimatedStyle, useSharedValue, withSpring } from "react-native-reanimated";
6
6
  import { clampPan, doubleTapZoom, isZoomed, settleScale, zoomScale, ZOOM } from "./imageZoom";
7
-
8
- // Pinch, pan and double tap for an `ImageViewer` page, on Gesture Handler: the
9
- // track phase runs as worklets on the UI thread, so the image never lags the
10
- // fingers. The rules are plain worklets in `imageZoom`.
11
-
12
- /** The settle after a release or a double tap: quick, no bounce past the edges. */
13
7
  const ZOOM_SPRING = {
14
8
  duration: 300,
15
9
  dampingRatio: 1,
@@ -172,8 +166,6 @@ function ZoomImage(t0) {
172
166
  }
173
167
  return t10;
174
168
  }
175
-
176
- /** Gestures inside a `Modal` need a root view of their own. */
177
169
  function ZoomRoot(t0) {
178
170
  const $ = _c(2);
179
171
  const {
@@ -1,8 +1,5 @@
1
1
  import { createContext } from "react";
2
2
 
3
- // The seam between `ImageViewer` and its optional zoom (`zoom-image-gesture`),
4
- // kept apart from both so the gesture provider does not load the viewer.
5
-
6
3
  /** The zoomable page and the root its gestures need inside the viewer's `Modal`. */
7
4
 
8
5
  /**
package/dist/motion.js CHANGED
@@ -1,9 +1,6 @@
1
1
  import { Easing, ReduceMotion } from "react-native-reanimated";
2
2
  import { useReduceMotion } from "./useReduceMotion";
3
3
 
4
- // The kit's motion values, from the `animate-expo` tables, so every part
5
- // eases and springs in one family.
6
-
7
4
  /** Strong ease-out: things entering or leaving the screen. */
8
5
  export const EASE_OUT = Easing.bezier(0.23, 1, 0.32, 1);
9
6
 
@@ -23,10 +23,6 @@ export const NEUTRAL_CHANNELS = {
23
23
  muted: "159 160 162",
24
24
  foreground: "250 250 250"
25
25
  };
26
-
27
- /** The kit dark-slot values that Neutral changes. */
28
-
29
- /** The package dark values, copied at import so a Neutral pick can be undone. */
30
26
  const DARK = {
31
27
  color: {
32
28
  background: tokens.color.background.dark,
@@ -58,7 +54,6 @@ const NEUTRAL = {
58
54
  surface: NEUTRAL_PALETTE.surface,
59
55
  surfaceSecondary: NEUTRAL_PALETTE.surfaceSecondary,
60
56
  surfaceCard: NEUTRAL_PALETTE.surface,
61
- // The package glass is its dark surface at 88%; Neutral's surface the same.
62
57
  fill: withAlpha(NEUTRAL_PALETTE.surface, 0.88)
63
58
  },
64
59
  palette: {