@startsimpli/integrations 0.2.112 → 0.2.113

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": "@startsimpli/integrations",
3
- "version": "0.2.112",
3
+ "version": "0.2.113",
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",
@@ -51,8 +51,8 @@
51
51
  "@startsimpli/ui-native": ">=0.1.12",
52
52
  "react-native-safe-area-context": ">=4.0.0",
53
53
  "@startsimpli/auth": "^0.4.49",
54
- "@startsimpli/ui": "^0.4.170",
55
- "@startsimpli/utils": "^0.4.17"
54
+ "@startsimpli/utils": "^0.4.17",
55
+ "@startsimpli/ui": "^0.4.170"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "react": {
@@ -12,6 +12,7 @@ vi.mock('react-native', async () => {
12
12
  };
13
13
  });
14
14
 
15
+ import { __setColorScheme } from '../../../../../ui-native/test/rn-stub';
15
16
  import { act, allText, hostById, maybeById, press, render } from '../../../../../ui-native/test/render';
16
17
  import { FoundryApp } from '../FoundryApp';
17
18
  import type { FoundryDevice } from '../device';
@@ -58,4 +59,39 @@ describe('FoundryApp over fakes (no sign-in, no network)', () => {
58
59
  delete launchArgs.tgFakeTabs;
59
60
  expect(() => render(<FoundryApp config={{ ...config, features: { recording: true }, tabs: undefined }} device={device()} />)).toThrow(/recording/);
60
61
  });
62
+
63
+ describe('theme.mode', () => {
64
+ const bar = (r: ReturnType<typeof render>) => r.root.findAllByType('StatusBar' as never)[0].props.barStyle;
65
+ const themed = (mode?: string) => {
66
+ launchArgs.tgFakeTabs = '1';
67
+ const r = render(<FoundryApp config={{ ...config, ...(mode ? { theme: { mode } } : {}) }} device={device()} />);
68
+ return r;
69
+ };
70
+
71
+ it('defaults to dark whatever the system says', async () => {
72
+ __setColorScheme('light');
73
+ const r = themed();
74
+ await tick();
75
+ expect(bar(r)).toBe('light-content');
76
+ });
77
+
78
+ it('light stays light under a dark system', async () => {
79
+ __setColorScheme('dark');
80
+ const r = themed('light');
81
+ await tick();
82
+ expect(bar(r)).toBe('dark-content');
83
+ });
84
+
85
+ it('system follows the system appearance', async () => {
86
+ __setColorScheme('light');
87
+ const light = themed('system');
88
+ await tick();
89
+ expect(bar(light)).toBe('dark-content');
90
+ __setColorScheme('dark');
91
+ const dark = themed('system');
92
+ await tick();
93
+ expect(bar(dark)).toBe('light-content');
94
+ __setColorScheme('light');
95
+ });
96
+ });
61
97
  });