@vvedantb/native-ui 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vvedantb/native-ui",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
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 and the family app marks.",
6
6
  "type": "module",
@@ -101,3 +101,5 @@ export const IconVmem = APP_ICONS.vmem;
101
101
  export const IconVerve = APP_ICONS.verve;
102
102
  export const IconVelth = APP_ICONS.velth;
103
103
  export const IconProjectV = APP_ICONS.projectv;
104
+ export const IconEva = APP_ICONS.eva;
105
+ export const IconBee = APP_ICONS.bee;
@@ -6,8 +6,8 @@ import { useScheme } from "../useScheme";
6
6
  import { APP_ICONS } from "./AppIcons";
7
7
  import type { AppName } from "./svg";
8
8
 
9
- /** The five product apps. `projectv` keeps its Michroma wordmark and never uses `AppWordmark`. */
10
- export type ProductAppName = Exclude<AppName, "projectv">;
9
+ /** The five product apps. `projectv` keeps its Michroma wordmark and never uses `AppWordmark`. `eva` and `bee` are icons only. */
10
+ export type ProductAppName = Exclude<AppName, "projectv" | "eva" | "bee">;
11
11
 
12
12
  export type AppWordmarkProps = {
13
13
  /** Which product app's name to show. The label is always the lowercase app id. */
@@ -1,7 +1,10 @@
1
1
  import type { AppName } from "./svg";
2
2
 
3
+ /** Apps in the Project V family. `eva` and `bee` have marks and icons but are not family apps. */
4
+ export type FamilyAppName = Exclude<AppName, "eva" | "bee">;
5
+
3
6
  export type FamilyApp = {
4
- app: AppName;
7
+ app: FamilyAppName;
5
8
  /** Display name. */
6
9
  name: string;
7
10
  /** Home page of the app. */
@@ -19,6 +22,6 @@ export const FAMILY_APPS: readonly FamilyApp[] = [
19
22
  ];
20
23
 
21
24
  /** Entry of `FAMILY_APPS` for an app. */
22
- export function familyApp(app: AppName): FamilyApp {
25
+ export function familyApp(app: FamilyAppName): FamilyApp {
23
26
  return FAMILY_APPS.find((entry) => entry.app === app)!;
24
27
  }
@@ -1,7 +1,7 @@
1
1
  // `svg.ts`, `familyApps.ts` and `vProAppBenefits.ts` are byte-identical copies of
2
2
  // `@vvedantb/ui` `src/brand/` (pure data, no imports beyond each other). A test
3
3
  // in this package fails when they differ: change both together.
4
- export { APP_ICONS, IconProjectV, IconVelth, IconVerve, IconVhub, IconVibot, IconVmem } from "./AppIcons";
4
+ export { APP_ICONS, IconBee, IconEva, IconProjectV, IconVelth, IconVerve, IconVhub, IconVibot, IconVmem } from "./AppIcons";
5
5
  export type { AppIconComponent, AppIconProps } from "./AppIcons";
6
6
  export { AppMark } from "./AppMark";
7
7
  export type { AppMarkProps } from "./AppMark";
@@ -31,6 +31,6 @@ export {
31
31
  } from "./svg";
32
32
  export type { AppMarkVariant, AppName, MarkShape } from "./svg";
33
33
  export { FAMILY_APPS, familyApp } from "./familyApps";
34
- export type { FamilyApp } from "./familyApps";
34
+ export type { FamilyApp, FamilyAppName } from "./familyApps";
35
35
  export { V_PRO_APP_BENEFITS } from "./vProAppBenefits";
36
36
  export type { PricingPlanAppBenefit } from "./vProAppBenefits";
package/src/brand/svg.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  // Geometry and raw SVG strings for the family app marks. No imports, so the
2
2
  // asset script can load this file directly with Node.
3
3
 
4
- export const APP_NAMES = ["projectv", "vibot", "vhub", "vmem", "verve", "velth"] as const;
4
+ /** Every mark. `eva` and `bee` are marks and icons only: they are not family apps, so `FAMILY_APPS` leaves them out. */
5
+ export const APP_NAMES = ["projectv", "vibot", "vhub", "vmem", "verve", "velth", "eva", "bee"] as const;
5
6
 
6
7
  export type AppName = (typeof APP_NAMES)[number];
7
8
 
@@ -36,7 +37,9 @@ export function markLinecap(app: AppName): "butt" | "round" {
36
37
  /**
37
38
  * Glyphs sized by one rule: longest side = 512 * min(1.2, aspect^0.25), centred halfway between
38
39
  * the bounding-box centre and the centre of mass. `verve` and `velth` are the final vectors.
39
- * The others are traced from the approved 1024px renders.
40
+ * `vibot`, `vhub`, `vmem` and `projectv` are traced from the approved 1024px renders. `eva` (option A,
41
+ * a filled four-point star) and `bee` (option D, an orb with eyes, stripes and antennae) are the final
42
+ * vectors from their design sheet, as drawn there.
40
43
  */
41
44
  export const APP_MARKS: Record<AppName, MarkShape> = {
42
45
  projectv: {
@@ -77,6 +80,22 @@ export const APP_MARKS: Record<AppName, MarkShape> = {
77
80
  "M512 732.3C644.2 652.1 734.3 471.9 724.3 301.6C604.1 371.7 524 552 512 732.3Z",
78
81
  ],
79
82
  },
83
+ eva: {
84
+ kind: "fill",
85
+ paths: ["M242.9 512Q485.1 485.1 512 278.8Q538.9 485.1 781 512Q538.9 538.9 512 745.1Q485.1 538.9 242.9 512Z"],
86
+ },
87
+ bee: {
88
+ kind: "stroke",
89
+ paths: [
90
+ "M304 530.7A208.1 208.1 0 1 1 720.1 530.7A208.1 208.1 0 1 1 304 530.7",
91
+ "M447.5 414.2L447.5 445.4",
92
+ "M576.5 414.2L576.5 445.4",
93
+ "M306.3 561.9L717.7 561.9",
94
+ "M344 653.4L680 653.4",
95
+ "M468.3 341.4Q455.8 291.4 420.5 260.2",
96
+ "M555.7 341.4Q568.2 291.4 603.5 260.2",
97
+ ],
98
+ },
80
99
  };
81
100
 
82
101
  type Point = [number, number];
@@ -180,6 +199,7 @@ export function markBBox(app: AppName): Box {
180
199
  * (x 186 to 789, y 259.96 to 761.7) at side max(width, height) x 1.04 (about 4% padding), rounded outward.
181
200
  * All five use this side, so glyph scale stays equal. Only the size is shared: each app has its own origin in
182
201
  * `APP_MARK_VIEWBOX`. `projectv` is left out so its wide brand mark does not shrink the app glyphs.
202
+ * Historical: this union covers those five only. `eva` and `bee` reuse the 629 side but are not part of it.
183
203
  */
184
204
  export const APP_MARK_CROP_VIEWBOX = "173 197 629 629";
185
205
 
@@ -190,9 +210,9 @@ export const APP_MARK_CROP_VIEWBOX = "173 197 629 629";
190
210
  export const PROJECTV_MARK_VIEWBOX = "171.5 181 687 687";
191
211
 
192
212
  /**
193
- * Plain-mark viewBox per app. Always square. The five apps keep one 629 side (equal scale), and each origin is
194
- * `markBBox(app)` centre minus 314.5 on both axes, so every glyph sits centred in its own frame. `projectv` uses
195
- * its 687 frame, centre minus 343.5. Hardcoded; checked against `markBBox` in tests.
213
+ * Plain-mark viewBox per app. Always square. Every mark except `projectv` keeps one 629 side (equal scale), and each
214
+ * origin is `markBBox(app)` centre minus 314.5 on both axes, so every glyph sits centred in its own frame. `projectv`
215
+ * uses its 687 frame, centre minus 343.5. Hardcoded; checked against `markBBox` in tests.
196
216
  */
197
217
  export const APP_MARK_VIEWBOX: Record<AppName, string> = {
198
218
  projectv: PROJECTV_MARK_VIEWBOX,
@@ -201,6 +221,8 @@ export const APP_MARK_VIEWBOX: Record<AppName, string> = {
201
221
  vmem: "197.24772201231343 196.33100022273135 629 629",
202
222
  verve: "197.5 210.9 629 629",
203
223
  velth: "197.5 202.45 629 629",
224
+ eva: "197.45 197.45 629 629",
225
+ bee: "197.55 187.2807619340906 629 629",
204
226
  };
205
227
 
206
228
  /**
@@ -215,6 +237,8 @@ export const APP_MARK_VIEWBOX_START: Record<AppName, string> = {
215
237
  vmem: "255.5301217210191 196.33100022273135 629 629",
216
238
  verve: "260.4 210.9 629 629",
217
239
  velth: "273.9433593555699 202.45 629 629",
240
+ eva: "242.9 197.45 629 629",
241
+ bee: "278.94999999999993 187.2807619340906 629 629",
218
242
  };
219
243
 
220
244
  /** Width over height of a mark's viewBox. Always about 1, because the viewBoxes are square. Kept for API stability; do not use it for sizing. */
@@ -2,7 +2,7 @@ import type { AppName } from "./svg";
2
2
 
3
3
  /** Benefits for one app, shown under that app's icon and name. */
4
4
  export type PricingPlanAppBenefit = {
5
- app: Exclude<AppName, "projectv">;
5
+ app: Exclude<AppName, "projectv" | "eva" | "bee">;
6
6
  items: readonly string[];
7
7
  };
8
8
 
@@ -11,7 +11,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
11
11
  import { IconCheck, IconX } from "@tabler/icons-react-native";
12
12
  import { APP_ICONS, IconProjectV } from "../brand/AppIcons";
13
13
  import type { ProductAppName } from "../brand/AppWordmark";
14
- import { familyApp } from "../brand/familyApps";
14
+ import { familyApp, type FamilyAppName } from "../brand/familyApps";
15
15
  import type { AppName } from "../brand/svg";
16
16
  import { Button } from "../Button";
17
17
  import { cn } from "../cn";
@@ -41,8 +41,8 @@ export type PricingModalProps = {
41
41
  description?: string;
42
42
  /** Cards, top to bottom. */
43
43
  plans: readonly PricingPlan[];
44
- /** App marks at the top left. */
45
- apps?: readonly AppName[];
44
+ /** App marks at the top left. Family apps only: each links to its `FAMILY_APPS` site. */
45
+ apps?: readonly FamilyAppName[];
46
46
  /** App the modal is shown in. Its `appBenefits` group comes first. */
47
47
  currentApp?: ProductAppName;
48
48
  /** Centred headline, for example "One plan. Every V app." */