@vvedantb/native-ui 0.39.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.
@@ -1,13 +1,13 @@
1
1
  import { Platform } from "react-native";
2
2
  /**
3
- * `body` is message text: `text-sm` (14 / 20), as the web `MessageContent`.
3
+ * `body` is message text: `text-base` (16 / 24), the phone body size.
4
4
  * `small` is the secondary text of triggers, trace lines and sources: also
5
5
  * `text-sm` (the web sources trigger is `text-xs`). `caption` is `text-xs`
6
6
  * (12 / 16): step descriptions, file chips and code headers. Larger text
7
7
  * steps each up, as `Textarea` does.
8
8
  */
9
9
  export function chatTextSize(kind, largerText) {
10
- if (kind === "body") return largerText ? "text-xl" : "text-sm";
10
+ if (kind === "body") return largerText ? "text-xl" : "text-base";
11
11
  if (kind === "small") return largerText ? "text-lg" : "text-sm";
12
12
  return largerText ? "text-base" : "text-xs";
13
13
  }
@@ -7,23 +7,23 @@ import { useLargerText } from "../theme";
7
7
  import { tokens } from "../tokens";
8
8
  import { useScheme } from "../useScheme";
9
9
 
10
- /** The web `icon-sm` button: 32 square with a 16 icon. */
11
- export const CHAT_ICON_BUTTON_SIZE = 32;
10
+ /** The phone chat icon button: 40 square with an 18 icon (hit slop reaches 44). */
11
+ export const CHAT_ICON_BUTTON_SIZE = 40;
12
12
  const CHAT_ICON_BUTTON = {
13
13
  xs: {
14
- side: 28,
15
- icon: 14,
16
- className: "h-7 w-7"
14
+ side: 36,
15
+ icon: 16,
16
+ className: "h-9 w-9"
17
17
  },
18
18
  sm: {
19
19
  side: CHAT_ICON_BUTTON_SIZE,
20
- icon: 16,
21
- className: "h-8 w-8"
20
+ icon: 18,
21
+ className: "h-10 w-10"
22
22
  },
23
23
  md: {
24
- side: 36,
25
- icon: 16,
26
- className: "h-9 w-9"
24
+ side: 40,
25
+ icon: 18,
26
+ className: "h-10 w-10"
27
27
  },
28
28
  touch: {
29
29
  side: MIN_TOUCH_TARGET,
@@ -454,8 +454,8 @@ export function PromptInput(t0) {
454
454
  let t13;
455
455
  if ($[13] !== largerText || $[14] !== layout || $[15] !== pill) {
456
456
  t13 = largerText ? sizeStyle("text-xl") : layout === "inline" ? {
457
- fontSize: 14,
458
- lineHeight: pill ? 20 : 24
457
+ fontSize: 16,
458
+ lineHeight: pill ? 22 : 24
459
459
  } : sizeStyle("text-base");
460
460
  $[13] = largerText;
461
461
  $[14] = layout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vvedantb/native-ui",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "license": "MIT",
5
5
  "description": "Shared React Native / Expo UI primitives. Floating surfaces, forms, overlays, toasts, settings chrome, tab bar, AI chat parts, the family app marks, a NativeWind preset, the Expo web root, the app root shell helpers and Clerk + Convex auth screens.",
6
6
  "type": "module",
@@ -4,14 +4,14 @@ import type { TextSize } from "../controlStyles";
4
4
  export type ChatTextKind = "body" | "small" | "caption";
5
5
 
6
6
  /**
7
- * `body` is message text: `text-sm` (14 / 20), as the web `MessageContent`.
7
+ * `body` is message text: `text-base` (16 / 24), the phone body size.
8
8
  * `small` is the secondary text of triggers, trace lines and sources: also
9
9
  * `text-sm` (the web sources trigger is `text-xs`). `caption` is `text-xs`
10
10
  * (12 / 16): step descriptions, file chips and code headers. Larger text
11
11
  * steps each up, as `Textarea` does.
12
12
  */
13
13
  export function chatTextSize(kind: ChatTextKind, largerText: boolean): TextSize {
14
- if (kind === "body") return largerText ? "text-xl" : "text-sm";
14
+ if (kind === "body") return largerText ? "text-xl" : "text-base";
15
15
  if (kind === "small") return largerText ? "text-lg" : "text-sm";
16
16
  return largerText ? "text-base" : "text-xs";
17
17
  }
@@ -7,13 +7,13 @@ import { useLargerText } from "../theme";
7
7
  import { tokens } from "../tokens";
8
8
  import { useScheme } from "../useScheme";
9
9
 
10
- /** The web `icon-sm` button: 32 square with a 16 icon. */
11
- export const CHAT_ICON_BUTTON_SIZE = 32;
10
+ /** The phone chat icon button: 40 square with an 18 icon (hit slop reaches 44). */
11
+ export const CHAT_ICON_BUTTON_SIZE = 40;
12
12
 
13
13
  const CHAT_ICON_BUTTON = {
14
- xs: { side: 28, icon: 14, className: "h-7 w-7" },
15
- sm: { side: CHAT_ICON_BUTTON_SIZE, icon: 16, className: "h-8 w-8" },
16
- md: { side: 36, icon: 16, className: "h-9 w-9" },
14
+ xs: { side: 36, icon: 16, className: "h-9 w-9" },
15
+ sm: { side: CHAT_ICON_BUTTON_SIZE, icon: 18, className: "h-10 w-10" },
16
+ md: { side: 40, icon: 18, className: "h-10 w-10" },
17
17
  touch: { side: MIN_TOUCH_TARGET, icon: 16, className: "h-11 w-11" },
18
18
  } as const;
19
19
 
@@ -280,7 +280,7 @@ export function PromptInput({
280
280
  const fieldText = largerText
281
281
  ? sizeStyle("text-xl")
282
282
  : layout === "inline"
283
- ? { fontSize: 14, lineHeight: pill ? 20 : 24 }
283
+ ? { fontSize: 16, lineHeight: pill ? 22 : 24 }
284
284
  : sizeStyle("text-base");
285
285
 
286
286
  const changeText = (next: string) => {