@startsimpli/integrations 0.2.115 → 0.2.116

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/README.md CHANGED
@@ -191,6 +191,8 @@ One command does step 1: `simpli ios new "Acme Go" --tenant-url https://acme.ai.
191
191
  5. Check without a login: launch with `-tgFakeNotes list` (or a note id such as `n1`) to see the screens over `createFakeVoiceApi`.
192
192
  6. `npx expo prebuild --platform ios`, then `npx expo run:ios --configuration Release` (Hermes). Signing and device install are per-Apple-team, see the template README.
193
193
 
194
+ App icon: `app.icon` in `foundry.config.json` is a path to a 1024x1024 opaque PNG (`<name>-dark.png` / `<name>-tinted.png` beside it become the iOS dark and tinted icons); `app.iconBackground` is a hex colour. With no `app.icon`, the build generates a colour field with a microphone, never a white square.
195
+
194
196
  ### Tabs: `FoundryTabsShell` and the shared corpus data layer (bd startsim-23np6.1)
195
197
 
196
198
  Every Tandem web tab becomes an iOS tab from config. `NotesShell` is just the first preset.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startsimpli/integrations",
3
- "version": "0.2.115",
3
+ "version": "0.2.116",
4
4
  "description": "Provider-agnostic types, API clients, hooks, and UI primitives for email + calendar integrations across StartSimpli apps, plus foundry customer email (subpath ./comms).",
5
5
  "license": "MIT",
6
6
  "homepage": "https://startsimpli.com",
@@ -50,9 +50,9 @@
50
50
  "react-native": ">=0.74.0",
51
51
  "@startsimpli/ui-native": ">=0.1.12",
52
52
  "react-native-safe-area-context": ">=4.0.0",
53
- "@startsimpli/utils": "^0.4.17",
53
+ "@startsimpli/auth": "^0.4.49",
54
54
  "@startsimpli/ui": "^0.4.170",
55
- "@startsimpli/auth": "^0.4.49"
55
+ "@startsimpli/utils": "^0.4.17"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "react": {
@@ -13,6 +13,14 @@ describe('validateFoundryApp', () => {
13
13
  expect(c.maxVisibleTabs).toBe(5);
14
14
  });
15
15
 
16
+ it('accepts an optional app icon path and background colour, and rejects bad ones by field', () => {
17
+ const c = resolveFoundryApp({ ...minimal, app: { name: 'Acme Go', icon: './assets/icon/icon.png', iconBackground: '#FF8A3D' } });
18
+ expect(c.app).toMatchObject({ icon: './assets/icon/icon.png', iconBackground: '#FF8A3D' });
19
+ expect(resolveFoundryApp(minimal).app).not.toHaveProperty('icon');
20
+ const r = validateFoundryApp({ ...minimal, app: { name: 'Acme Go', icon: 'icon.jpg', iconBackground: 'orange' } });
21
+ expect(r.ok ? [] : r.issues.map((i) => i.path)).toEqual(['app.icon', 'app.iconBackground']);
22
+ });
23
+
16
24
  it('the auth app is the tenant slug: explicit, else the *.ai.startsimpli.com host, else the scheme', () => {
17
25
  const auth = (input: object) => resolveFoundryApp(input).brand.authApp;
18
26
  expect(auth({ app: { name: 'A Go' }, tenant: { url: 'http://localhost:4300', slug: 'hours' } })).toBe('hours');
@@ -73,6 +73,10 @@ export interface FoundryAppConfig {
73
73
  /** URL scheme, `<scheme>://`. */
74
74
  scheme: string;
75
75
  bundleId: string;
76
+ /** Path to the app icon, a 1024x1024 opaque PNG, relative to the app directory. Optional `<name>-dark.png` and `<name>-tinted.png` beside it are the iOS dark / tinted icons. Unset: the build generates a colour field with a microphone. */
77
+ icon?: string;
78
+ /** Hex colour (`#RRGGBB`) of the generated default icon's field and the app's launch background. Unset: derived from the app name. */
79
+ iconBackground?: string;
76
80
  };
77
81
  brand: {
78
82
  /** The Foundry's product name: Home title, sign-in title. */
@@ -63,7 +63,7 @@ export function validateFoundryApp(input: unknown, options: ValidateOptions = {}
63
63
 
64
64
  // app
65
65
  const app = section('app', true);
66
- allowed(app, ['name', 'slug', 'scheme', 'bundleId'], 'app');
66
+ allowed(app, ['name', 'slug', 'scheme', 'bundleId', 'icon', 'iconBackground'], 'app');
67
67
  let derived = { slug: '', scheme: '', bundleId: '' };
68
68
  if (!str(app.name)) bad('app.name', 'is required (a display name, e.g. "Acme Go")');
69
69
  else { try { derived = deriveAppNames(app.name); } catch (e) { bad('app.name', (e as Error).message); } }
@@ -74,6 +74,9 @@ export function validateFoundryApp(input: unknown, options: ValidateOptions = {}
74
74
  if (scheme && !SCHEME.test(scheme)) bad('app.scheme', `"${scheme}" must be a URL scheme (lowercase letters, digits, + . -)`);
75
75
  if (bundleId && !BUNDLE.test(bundleId)) bad('app.bundleId', `"${bundleId}" must look like com.example.app`);
76
76
 
77
+ if (app.icon !== undefined && (!str(app.icon) || !/\.png$/i.test(app.icon as string))) bad('app.icon', 'must be a path to a 1024x1024 PNG, e.g. "./assets/icon/icon.png"');
78
+ if (app.iconBackground !== undefined && !(typeof app.iconBackground === 'string' && /^#[0-9a-fA-F]{6}$/.test(app.iconBackground))) bad('app.iconBackground', 'must be a hex colour like "#FF8A3D"');
79
+
77
80
  // brand
78
81
  const brand = section('brand');
79
82
  allowed(brand, ['name', 'tagline', 'authApp', 'logTag'], 'brand');
@@ -186,7 +189,7 @@ export function validateFoundryApp(input: unknown, options: ValidateOptions = {}
186
189
  const resolvedBrandName = (brand.name as string | undefined) ?? (app.name as string);
187
190
  const config: FoundryAppConfig = {
188
191
  version: 1,
189
- app: { name: app.name as string, slug, scheme, bundleId },
192
+ app: { name: app.name as string, slug, scheme, bundleId, ...(app.icon ? { icon: app.icon as string } : {}), ...(app.iconBackground ? { iconBackground: app.iconBackground as string } : {}) },
190
193
  brand: {
191
194
  name: resolvedBrandName,
192
195
  tagline: (brand.tagline as string | undefined) ?? defaultBrandTagline(),