@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.
- package/dist/ai/chat-text.js +2 -2
- package/dist/ai/icon-button.jsx +10 -10
- package/dist/ai/prompt-input.jsx +2 -2
- package/package.json +1 -1
- package/src/ai/chat-text.ts +2 -2
- package/src/ai/icon-button.tsx +5 -5
- package/src/ai/prompt-input.tsx +1 -1
package/dist/ai/chat-text.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Platform } from "react-native";
|
|
2
2
|
/**
|
|
3
|
-
* `body` is message text: `text-
|
|
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-
|
|
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
|
}
|
package/dist/ai/icon-button.jsx
CHANGED
|
@@ -7,23 +7,23 @@ import { useLargerText } from "../theme";
|
|
|
7
7
|
import { tokens } from "../tokens";
|
|
8
8
|
import { useScheme } from "../useScheme";
|
|
9
9
|
|
|
10
|
-
/** The
|
|
11
|
-
export const CHAT_ICON_BUTTON_SIZE =
|
|
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:
|
|
15
|
-
icon:
|
|
16
|
-
className: "h-
|
|
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:
|
|
21
|
-
className: "h-
|
|
20
|
+
icon: 18,
|
|
21
|
+
className: "h-10 w-10"
|
|
22
22
|
},
|
|
23
23
|
md: {
|
|
24
|
-
side:
|
|
25
|
-
icon:
|
|
26
|
-
className: "h-
|
|
24
|
+
side: 40,
|
|
25
|
+
icon: 18,
|
|
26
|
+
className: "h-10 w-10"
|
|
27
27
|
},
|
|
28
28
|
touch: {
|
|
29
29
|
side: MIN_TOUCH_TARGET,
|
package/dist/ai/prompt-input.jsx
CHANGED
|
@@ -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:
|
|
458
|
-
lineHeight: pill ?
|
|
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.
|
|
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",
|
package/src/ai/chat-text.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
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
|
}
|
package/src/ai/icon-button.tsx
CHANGED
|
@@ -7,13 +7,13 @@ import { useLargerText } from "../theme";
|
|
|
7
7
|
import { tokens } from "../tokens";
|
|
8
8
|
import { useScheme } from "../useScheme";
|
|
9
9
|
|
|
10
|
-
/** The
|
|
11
|
-
export const CHAT_ICON_BUTTON_SIZE =
|
|
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:
|
|
15
|
-
sm: { side: CHAT_ICON_BUTTON_SIZE, icon:
|
|
16
|
-
md: { side:
|
|
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
|
|
package/src/ai/prompt-input.tsx
CHANGED
|
@@ -280,7 +280,7 @@ export function PromptInput({
|
|
|
280
280
|
const fieldText = largerText
|
|
281
281
|
? sizeStyle("text-xl")
|
|
282
282
|
: layout === "inline"
|
|
283
|
-
? { fontSize:
|
|
283
|
+
? { fontSize: 16, lineHeight: pill ? 22 : 24 }
|
|
284
284
|
: sizeStyle("text-base");
|
|
285
285
|
|
|
286
286
|
const changeText = (next: string) => {
|