voltra 2.1.1 → 2.3.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/build/cjs/apply/index.js +4 -1
- package/build/cjs/apply/index.js.map +1 -1
- package/build/cjs/config/normalize.js +131 -29
- package/build/cjs/config/normalize.js.map +1 -1
- package/build/cjs/config/perConfiguration.js +29 -0
- package/build/cjs/config/perConfiguration.js.map +1 -0
- package/build/cjs/config/serverUpdate.js +119 -0
- package/build/cjs/config/serverUpdate.js.map +1 -0
- package/build/cjs/config/widgetKind.js +25 -0
- package/build/cjs/config/widgetKind.js.map +1 -0
- package/build/cjs/dependencies/platformPackages.js +9 -0
- package/build/cjs/dependencies/platformPackages.js.map +1 -1
- package/build/cjs/discovery/ios.js +50 -31
- package/build/cjs/discovery/ios.js.map +1 -1
- package/build/cjs/index.js +6 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/platforms/android/generated.js +98 -40
- package/build/cjs/platforms/android/generated.js.map +1 -1
- package/build/cjs/platforms/android/widgetSizing.js +89 -0
- package/build/cjs/platforms/android/widgetSizing.js.map +1 -0
- package/build/cjs/platforms/ios/apply.js +21 -11
- package/build/cjs/platforms/ios/apply.js.map +1 -1
- package/build/cjs/platforms/ios/buildConfigurationValues.js +73 -0
- package/build/cjs/platforms/ios/buildConfigurationValues.js.map +1 -0
- package/build/cjs/platforms/ios/entitlements.js +34 -19
- package/build/cjs/platforms/ios/entitlements.js.map +1 -1
- package/build/cjs/platforms/ios/generated.js +79 -32
- package/build/cjs/platforms/ios/generated.js.map +1 -1
- package/build/cjs/platforms/ios/plist.js +22 -4
- package/build/cjs/platforms/ios/plist.js.map +1 -1
- package/build/cjs/platforms/ios/targetName.js.map +1 -1
- package/build/cjs/platforms/ios/xcodeTarget.js +166 -23
- package/build/cjs/platforms/ios/xcodeTarget.js.map +1 -1
- package/build/cjs/platforms/shared/widgetModule.js +18 -145
- package/build/cjs/platforms/shared/widgetModule.js.map +1 -1
- package/build/esm/apply/index.js +4 -1
- package/build/esm/apply/index.js.map +1 -1
- package/build/esm/config/normalize.js +131 -29
- package/build/esm/config/normalize.js.map +1 -1
- package/build/esm/config/perConfiguration.js +25 -0
- package/build/esm/config/perConfiguration.js.map +1 -0
- package/build/esm/config/serverUpdate.js +112 -0
- package/build/esm/config/serverUpdate.js.map +1 -0
- package/build/esm/config/widgetKind.js +20 -0
- package/build/esm/config/widgetKind.js.map +1 -0
- package/build/esm/dependencies/platformPackages.js +8 -0
- package/build/esm/dependencies/platformPackages.js.map +1 -1
- package/build/esm/discovery/ios.js +50 -31
- package/build/esm/discovery/ios.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/platforms/android/generated.js +100 -42
- package/build/esm/platforms/android/generated.js.map +1 -1
- package/build/esm/platforms/android/widgetSizing.js +85 -0
- package/build/esm/platforms/android/widgetSizing.js.map +1 -0
- package/build/esm/platforms/ios/apply.js +21 -11
- package/build/esm/platforms/ios/apply.js.map +1 -1
- package/build/esm/platforms/ios/buildConfigurationValues.js +68 -0
- package/build/esm/platforms/ios/buildConfigurationValues.js.map +1 -0
- package/build/esm/platforms/ios/entitlements.js +34 -19
- package/build/esm/platforms/ios/entitlements.js.map +1 -1
- package/build/esm/platforms/ios/generated.js +80 -33
- package/build/esm/platforms/ios/generated.js.map +1 -1
- package/build/esm/platforms/ios/plist.js +22 -4
- package/build/esm/platforms/ios/plist.js.map +1 -1
- package/build/esm/platforms/ios/targetName.js.map +1 -1
- package/build/esm/platforms/ios/xcodeTarget.js +166 -23
- package/build/esm/platforms/ios/xcodeTarget.js.map +1 -1
- package/build/esm/platforms/shared/widgetModule.js +16 -107
- package/build/esm/platforms/shared/widgetModule.js.map +1 -1
- package/build/types/apply/index.d.ts.map +1 -1
- package/build/types/config/normalize.d.ts.map +1 -1
- package/build/types/config/perConfiguration.d.ts +18 -0
- package/build/types/config/perConfiguration.d.ts.map +1 -0
- package/build/types/config/serverUpdate.d.ts +80 -0
- package/build/types/config/serverUpdate.d.ts.map +1 -0
- package/build/types/config/types.d.ts +91 -30
- package/build/types/config/types.d.ts.map +1 -1
- package/build/types/config/widgetKind.d.ts +11 -0
- package/build/types/config/widgetKind.d.ts.map +1 -0
- package/build/types/dependencies/platformPackages.d.ts +1 -0
- package/build/types/dependencies/platformPackages.d.ts.map +1 -1
- package/build/types/discovery/ios.d.ts +10 -0
- package/build/types/discovery/ios.d.ts.map +1 -1
- package/build/types/index.d.ts +3 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/platforms/android/generated.d.ts.map +1 -1
- package/build/types/platforms/android/widgetSizing.d.ts +50 -0
- package/build/types/platforms/android/widgetSizing.d.ts.map +1 -0
- package/build/types/platforms/ios/apply.d.ts.map +1 -1
- package/build/types/platforms/ios/buildConfigurationValues.d.ts +33 -0
- package/build/types/platforms/ios/buildConfigurationValues.d.ts.map +1 -0
- package/build/types/platforms/ios/entitlements.d.ts +4 -4
- package/build/types/platforms/ios/entitlements.d.ts.map +1 -1
- package/build/types/platforms/ios/generated.d.ts +14 -2
- package/build/types/platforms/ios/generated.d.ts.map +1 -1
- package/build/types/platforms/ios/plist.d.ts +3 -3
- package/build/types/platforms/ios/plist.d.ts.map +1 -1
- package/build/types/platforms/ios/podfile.d.ts +2 -2
- package/build/types/platforms/ios/podfile.d.ts.map +1 -1
- package/build/types/platforms/ios/targetName.d.ts +2 -2
- package/build/types/platforms/ios/targetName.d.ts.map +1 -1
- package/build/types/platforms/ios/xcodeTarget.d.ts +4 -2
- package/build/types/platforms/ios/xcodeTarget.d.ts.map +1 -1
- package/build/types/platforms/shared/widgetModule.d.ts +12 -3
- package/build/types/platforms/shared/widgetModule.d.ts.map +1 -1
- package/package.json +5 -17
- package/src/apply/index.ts +4 -1
- package/src/config/normalize.node.test.ts +61 -0
- package/src/config/normalize.ts +188 -44
- package/src/config/perConfiguration.ts +49 -0
- package/src/config/serverUpdate.ts +160 -0
- package/src/config/types.ts +97 -30
- package/src/config/widgetKind.node.test.ts +27 -0
- package/src/config/widgetKind.ts +27 -0
- package/src/dependencies/platformPackages.ts +11 -0
- package/src/discovery/ios.ts +104 -60
- package/src/index.ts +8 -0
- package/src/platforms/android/generated.ts +144 -47
- package/src/platforms/android/widgetSizing.ts +112 -0
- package/src/platforms/ios/apply.ts +21 -11
- package/src/platforms/ios/buildConfigurationValues.ts +105 -0
- package/src/platforms/ios/entitlements.ts +55 -31
- package/src/platforms/ios/generated.node.test.ts +61 -0
- package/src/platforms/ios/generated.ts +137 -38
- package/src/platforms/ios/plist.ts +36 -7
- package/src/platforms/ios/podfile.ts +2 -2
- package/src/platforms/ios/targetName.ts +2 -2
- package/src/platforms/ios/xcodeTarget.ts +248 -43
- package/src/platforms/shared/widgetModule.ts +22 -140
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config rules for `serverUpdate`, shared by the Expo plugins and the `voltra` CLI.
|
|
3
|
+
*
|
|
4
|
+
* `serverUpdate` marks a widget as server-driven for both render engines. On a widget with
|
|
5
|
+
* `entry` the device fetches a JSON object and hands it to the bundled JS as props; without
|
|
6
|
+
* `entry` the server returns a full Voltra payload. Widgets without `entry` keep exactly the
|
|
7
|
+
* rules they had before ADR 0002, so no existing config breaks.
|
|
8
|
+
*
|
|
9
|
+
* `url` is optional. `serverUpdate: {}` means "server-driven, URL supplied at runtime" through
|
|
10
|
+
* `setWidgetServerUpdate`, which covers per-tenant backends whose URL is only known after login.
|
|
11
|
+
*
|
|
12
|
+
* These helpers report problems instead of throwing so each caller can raise its own error type.
|
|
13
|
+
*
|
|
14
|
+
* The `@use-voltra/expo-plugin` package holds the other copy of this module, shared by the
|
|
15
|
+
* Expo config plugins; keep the two in sync.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Interval floor and default for a widget with `entry`. WorkManager cannot run periodic work
|
|
19
|
+
* more often than every 15 minutes, and WidgetKit stretches timelines requested closer together
|
|
20
|
+
* than five minutes, so a smaller number would only mislead.
|
|
21
|
+
*/
|
|
22
|
+
export declare const DYNAMIC_WIDGET_SERVER_UPDATE_INTERVAL_MINUTES = 15;
|
|
23
|
+
/** Outcome of resolving `serverUpdate.intervalMinutes` against a platform's floor. */
|
|
24
|
+
export type ServerUpdateIntervalResolution = {
|
|
25
|
+
kind: 'ok';
|
|
26
|
+
intervalMinutes: number;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'clamped';
|
|
29
|
+
intervalMinutes: number;
|
|
30
|
+
warning: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: 'invalid';
|
|
33
|
+
error: string;
|
|
34
|
+
};
|
|
35
|
+
export interface ResolveServerUpdateIntervalOptions {
|
|
36
|
+
/** Raw `intervalMinutes` from app.json, if the widget set one. */
|
|
37
|
+
intervalMinutes: unknown;
|
|
38
|
+
/** Config path used in messages, e.g. `android.widgets[portfolio].serverUpdate`. */
|
|
39
|
+
context: string;
|
|
40
|
+
/** True when the widget has an `entry` and therefore renders on device. */
|
|
41
|
+
hasEntry: boolean;
|
|
42
|
+
/** Interval used when the widget does not set one. Ignored for widgets with `entry`. */
|
|
43
|
+
defaultIntervalMinutes: number;
|
|
44
|
+
/** Platform floor for payload widgets. Ignored for widgets with `entry`. */
|
|
45
|
+
minimumIntervalMinutes: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Resolves the interval a widget should be scheduled on.
|
|
49
|
+
*
|
|
50
|
+
* A widget with `entry` is clamped up to {@link DYNAMIC_WIDGET_SERVER_UPDATE_INTERVAL_MINUTES}
|
|
51
|
+
* with a warning, because a shorter interval is not something either platform can honour. A
|
|
52
|
+
* payload widget keeps the platform's existing rule and is rejected below the floor.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveServerUpdateInterval(options: ResolveServerUpdateIntervalOptions): ServerUpdateIntervalResolution;
|
|
55
|
+
/** Outcome of checking `serverUpdate.url`. */
|
|
56
|
+
export type ServerUpdateUrlResolution = {
|
|
57
|
+
kind: 'ok';
|
|
58
|
+
} | {
|
|
59
|
+
kind: 'insecure';
|
|
60
|
+
warning: string;
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'invalid';
|
|
63
|
+
error: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Checks `serverUpdate.url`. An absent URL is fine — the app supplies it at runtime through
|
|
67
|
+
* `setWidgetServerUpdate`.
|
|
68
|
+
*
|
|
69
|
+
* A URL that is not an absolute `http`/`https` URL is rejected: no platform HTTP stack here
|
|
70
|
+
* accepts one, so such a config could only ever have failed to fetch. Plain `http` to a
|
|
71
|
+
* non-local host is reported as insecure rather than rejected — App Transport Security and
|
|
72
|
+
* Android's cleartext policy already block it in a release build, and rejecting it outright
|
|
73
|
+
* would break configs that point at a LAN dev server.
|
|
74
|
+
*/
|
|
75
|
+
export declare function resolveServerUpdateUrl(url: unknown, context: string): ServerUpdateUrlResolution;
|
|
76
|
+
/** True for the hosts Voltra allows over plain `http` — dev servers reachable from a simulator. */
|
|
77
|
+
export declare function isLocalHttpHost(hostname: string): boolean;
|
|
78
|
+
/** Validates `serverUpdate.refresh`. Returns an error message, or `undefined` when it is fine. */
|
|
79
|
+
export declare function validateServerUpdateRefresh(refresh: unknown, context: string): string | undefined;
|
|
80
|
+
//# sourceMappingURL=serverUpdate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverUpdate.d.ts","sourceRoot":"","sources":["../../../src/config/serverUpdate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;GAIG;AACH,eAAO,MAAM,6CAA6C,KAAK,CAAA;AAK/D,sFAAsF;AACtF,MAAM,MAAM,8BAA8B,GACtC;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC7D;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtC,MAAM,WAAW,kCAAkC;IACjD,kEAAkE;IAClE,eAAe,EAAE,OAAO,CAAA;IACxB,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAA;IACf,2EAA2E;IAC3E,QAAQ,EAAE,OAAO,CAAA;IACjB,wFAAwF;IACxF,sBAAsB,EAAE,MAAM,CAAA;IAC9B,4EAA4E;IAC5E,sBAAsB,EAAE,MAAM,CAAA;CAC/B;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,kCAAkC,GAC1C,8BAA8B,CAoChC;AAED,8CAA8C;AAC9C,MAAM,MAAM,yBAAyB,GACjC;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,GACd;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtC;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,yBAAyB,CAoC/F;AAED,mGAAmG;AACnG,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,kGAAkG;AAClG,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMjG"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CLI_DEFAULTS } from './defaults';
|
|
2
|
+
import type { PerConfiguration } from './perConfiguration';
|
|
2
3
|
export type VoltraPlatform = 'android' | 'ios';
|
|
3
4
|
/**
|
|
4
5
|
* Per-locale widget copy or build-time initial state paths.
|
|
@@ -10,8 +11,11 @@ export type WidgetLabel = string | WidgetLocalizedValue;
|
|
|
10
11
|
/** Path to a widget initial state module, either as a single path or localized by locale identifier. */
|
|
11
12
|
export type WidgetInitialStatePath = string | WidgetLocalizedValue;
|
|
12
13
|
export interface AndroidWidgetServerUpdateConfig {
|
|
13
|
-
/**
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Server endpoint that returns widget state updates. Optional — omit it to mark the widget
|
|
16
|
+
* server-driven and supply the URL at runtime with `setWidgetServerUpdate`.
|
|
17
|
+
*/
|
|
18
|
+
url?: string;
|
|
15
19
|
/** Refresh interval, in minutes, for fetching server updates. */
|
|
16
20
|
intervalMinutes?: number;
|
|
17
21
|
/** Whether fetched updates should trigger an immediate widget refresh. */
|
|
@@ -36,14 +40,32 @@ export interface AndroidWidgetConfig {
|
|
|
36
40
|
displayName: WidgetLabel;
|
|
37
41
|
/** User-facing widget description shown by the launcher. */
|
|
38
42
|
description: WidgetLabel;
|
|
39
|
-
/** Minimum widget width in dp. */
|
|
43
|
+
/** Minimum widget width in dp. Only affects Android 11 and older. */
|
|
40
44
|
minWidth?: number;
|
|
41
|
-
/** Minimum widget height in dp. */
|
|
45
|
+
/** Minimum widget height in dp. Only affects Android 11 and older. */
|
|
42
46
|
minHeight?: number;
|
|
43
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Minimum widget width in launcher grid cells.
|
|
49
|
+
*
|
|
50
|
+
* @deprecated Use `minWidth` instead. The value is approximated in dp for Android 11 and
|
|
51
|
+
* older.
|
|
52
|
+
*/
|
|
44
53
|
minCellWidth?: number;
|
|
45
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Minimum widget height in launcher grid cells.
|
|
56
|
+
*
|
|
57
|
+
* @deprecated Use `minHeight` instead. The value is approximated in dp for Android 11 and
|
|
58
|
+
* older.
|
|
59
|
+
*/
|
|
46
60
|
minCellHeight?: number;
|
|
61
|
+
/** Minimum width, in dp, the widget can be resized down to. */
|
|
62
|
+
minResizeWidth?: number;
|
|
63
|
+
/** Minimum height, in dp, the widget can be resized down to. */
|
|
64
|
+
minResizeHeight?: number;
|
|
65
|
+
/** Maximum width, in dp, the widget can be resized up to. Honoured on Android 12 and newer. */
|
|
66
|
+
maxResizeWidth?: number;
|
|
67
|
+
/** Maximum height, in dp, the widget can be resized up to. Honoured on Android 12 and newer. */
|
|
68
|
+
maxResizeHeight?: number;
|
|
47
69
|
/** Default widget width in launcher grid cells. */
|
|
48
70
|
targetCellWidth: number;
|
|
49
71
|
/** Default widget height in launcher grid cells. */
|
|
@@ -67,8 +89,11 @@ export interface AndroidWidgetConfig {
|
|
|
67
89
|
}
|
|
68
90
|
export type IOSWidgetFamily = 'systemSmall' | 'systemMedium' | 'systemLarge' | 'systemExtraLarge' | 'accessoryCircular' | 'accessoryRectangular' | 'accessoryInline';
|
|
69
91
|
export interface IOSWidgetServerUpdateConfig {
|
|
70
|
-
/**
|
|
71
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Server endpoint that returns widget state updates. Optional — omit it to mark the widget
|
|
94
|
+
* server-driven and supply the URL at runtime with `setWidgetServerUpdate`.
|
|
95
|
+
*/
|
|
96
|
+
url?: string;
|
|
72
97
|
/** Refresh interval, in minutes, for fetching server updates. */
|
|
73
98
|
intervalMinutes?: number;
|
|
74
99
|
/** Whether fetched updates should trigger an immediate widget refresh. */
|
|
@@ -89,6 +114,12 @@ export interface IOSWidgetAppIntentConfig {
|
|
|
89
114
|
export interface IOSWidgetConfig {
|
|
90
115
|
/** Stable widget identifier used in generated files and registrations. */
|
|
91
116
|
id: string;
|
|
117
|
+
/**
|
|
118
|
+
* WidgetKit `kind` of the generated widget. Defaults to `Voltra_Widget_<id>`.
|
|
119
|
+
* Pin it to the kind of a pre-Voltra widget so already placed instances survive the migration
|
|
120
|
+
* (WidgetKit identifies a placed widget by extension bundle id + kind).
|
|
121
|
+
*/
|
|
122
|
+
kind?: string;
|
|
92
123
|
/** User-facing widget name shown in iOS widget configuration UI. */
|
|
93
124
|
displayName: WidgetLabel;
|
|
94
125
|
/** User-facing widget description shown in iOS widget configuration UI. */
|
|
@@ -123,8 +154,11 @@ export interface IOSProjectOverrides {
|
|
|
123
154
|
mainTargetName?: string;
|
|
124
155
|
/** Explicit path to the app target Info.plist file. */
|
|
125
156
|
infoPlistPath?: string;
|
|
126
|
-
/**
|
|
127
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Explicit path to the main app entitlements file, or one path per Xcode build configuration
|
|
159
|
+
* name when each environment has its own.
|
|
160
|
+
*/
|
|
161
|
+
entitlementsPath?: PerConfiguration<string>;
|
|
128
162
|
/** Explicit path to the Podfile. */
|
|
129
163
|
podfilePath?: string;
|
|
130
164
|
}
|
|
@@ -151,8 +185,11 @@ export interface VoltraAndroidConfig {
|
|
|
151
185
|
export interface VoltraIOSConfig {
|
|
152
186
|
/** Whether to enable push-notification-related iOS setup for widgets and Live Activities. */
|
|
153
187
|
enablePushNotifications?: boolean;
|
|
154
|
-
/**
|
|
155
|
-
|
|
188
|
+
/**
|
|
189
|
+
* App Group identifier used to share data between the app and widget extension, or one per Xcode
|
|
190
|
+
* build configuration name when each environment has its own.
|
|
191
|
+
*/
|
|
192
|
+
groupIdentifier?: PerConfiguration<string>;
|
|
156
193
|
/** iOS widgets to generate and register. */
|
|
157
194
|
widgets?: IOSWidgetConfig[];
|
|
158
195
|
/** Minimum iOS deployment target for generated widget targets. */
|
|
@@ -163,8 +200,11 @@ export interface VoltraIOSConfig {
|
|
|
163
200
|
fonts?: string[];
|
|
164
201
|
/** Directory containing user-provided images for iOS widgets. */
|
|
165
202
|
userImagesPath?: string;
|
|
166
|
-
/**
|
|
167
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Keychain access group shared by the app and extension, or one per Xcode build configuration
|
|
205
|
+
* name when each environment has its own.
|
|
206
|
+
*/
|
|
207
|
+
keychainGroup?: PerConfiguration<string>;
|
|
168
208
|
/** Native iOS project discovery overrides. */
|
|
169
209
|
project?: IOSProjectOverrides;
|
|
170
210
|
}
|
|
@@ -184,26 +224,24 @@ export interface LoadedVoltraConfig {
|
|
|
184
224
|
/** Directory that contained the loaded config source. */
|
|
185
225
|
configDir: string;
|
|
186
226
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
227
|
+
/**
|
|
228
|
+
* Build-time server-update defaults after normalization. The device treats these as the lowest
|
|
229
|
+
* settings layer; `setWidgetServerUpdate` overrides `url` and `intervalMinutes` at runtime.
|
|
230
|
+
*/
|
|
231
|
+
export interface NormalizedWidgetServerUpdateConfig {
|
|
232
|
+
/** Server endpoint, when app.json set one. Absent means "URL supplied at runtime". */
|
|
233
|
+
url?: string;
|
|
190
234
|
/** Refresh interval, in minutes, for fetching server updates. */
|
|
191
235
|
intervalMinutes: number;
|
|
192
|
-
/** Whether
|
|
236
|
+
/** Whether the widget draws a refresh button. Build-time only: it is generated UI structure. */
|
|
193
237
|
refresh: boolean;
|
|
194
238
|
}
|
|
239
|
+
export type NormalizedAndroidWidgetServerUpdateConfig = NormalizedWidgetServerUpdateConfig;
|
|
195
240
|
export interface NormalizedAndroidWidgetConfig extends Omit<AndroidWidgetConfig, 'serverUpdate'> {
|
|
196
241
|
/** Server-driven update settings after defaults have been applied. */
|
|
197
242
|
serverUpdate?: NormalizedAndroidWidgetServerUpdateConfig;
|
|
198
243
|
}
|
|
199
|
-
export
|
|
200
|
-
/** Server endpoint that returns widget state updates. */
|
|
201
|
-
url: string;
|
|
202
|
-
/** Refresh interval, in minutes, for fetching server updates. */
|
|
203
|
-
intervalMinutes: number;
|
|
204
|
-
/** Whether fetched updates should trigger an immediate widget refresh. */
|
|
205
|
-
refresh: boolean;
|
|
206
|
-
}
|
|
244
|
+
export type NormalizedIOSWidgetServerUpdateConfig = NormalizedWidgetServerUpdateConfig;
|
|
207
245
|
export interface NormalizedIOSWidgetConfig extends Omit<IOSWidgetConfig, 'serverUpdate' | 'supportedFamilies'> {
|
|
208
246
|
/** Supported iOS widget families after defaults have been applied. */
|
|
209
247
|
supportedFamilies: IOSWidgetFamily[];
|
|
@@ -229,8 +267,8 @@ export interface NormalizedIOSProjectConfig {
|
|
|
229
267
|
mainTargetName?: string;
|
|
230
268
|
/** Absolute path to the Info.plist file, if overridden. */
|
|
231
269
|
infoPlistPath?: string;
|
|
232
|
-
/** Absolute path to the entitlements file, if overridden. */
|
|
233
|
-
entitlementsPath?: string
|
|
270
|
+
/** Absolute path to the entitlements file, or one per build configuration name, if overridden. */
|
|
271
|
+
entitlementsPath?: PerConfiguration<string>;
|
|
234
272
|
/** Absolute path to the Podfile, if overridden. */
|
|
235
273
|
podfilePath?: string;
|
|
236
274
|
}
|
|
@@ -250,7 +288,7 @@ export interface NormalizedVoltraIOSConfig {
|
|
|
250
288
|
/** Whether iOS push-notification-related setup should be applied. */
|
|
251
289
|
enablePushNotifications: boolean;
|
|
252
290
|
/** App Group identifier used to share data between the app and extension. */
|
|
253
|
-
groupIdentifier?: string
|
|
291
|
+
groupIdentifier?: PerConfiguration<string>;
|
|
254
292
|
/** iOS widgets after validation and normalization. */
|
|
255
293
|
widgets: NormalizedIOSWidgetConfig[];
|
|
256
294
|
/** Effective iOS deployment target for generated widget targets. */
|
|
@@ -262,10 +300,31 @@ export interface NormalizedVoltraIOSConfig {
|
|
|
262
300
|
/** Absolute path to the iOS user images directory. */
|
|
263
301
|
userImagesPath: string;
|
|
264
302
|
/** Keychain access group shared by the app and extension. */
|
|
265
|
-
keychainGroup?: string
|
|
303
|
+
keychainGroup?: PerConfiguration<string>;
|
|
266
304
|
/** Normalized iOS native project discovery overrides. */
|
|
267
305
|
project: NormalizedIOSProjectConfig;
|
|
268
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* iOS project overrides after per-build-configuration values have been resolved against the Xcode
|
|
309
|
+
* project.
|
|
310
|
+
*/
|
|
311
|
+
export type ResolvedIOSProjectConfig = Omit<NormalizedIOSProjectConfig, 'entitlementsPath'> & {
|
|
312
|
+
/** Absolute path to the entitlements file of the default build configuration, if overridden. */
|
|
313
|
+
entitlementsPath?: string;
|
|
314
|
+
};
|
|
315
|
+
/**
|
|
316
|
+
* iOS config as the platform mutators consume it: every per-build-configuration value has been
|
|
317
|
+
* collapsed to a single string, either the configured value or a reference to a build setting
|
|
318
|
+
* Voltra writes per build configuration.
|
|
319
|
+
*/
|
|
320
|
+
export type ResolvedVoltraIOSConfig = Omit<NormalizedVoltraIOSConfig, 'groupIdentifier' | 'keychainGroup' | 'project'> & {
|
|
321
|
+
/** App Group identifier used to share data between the app and extension. */
|
|
322
|
+
groupIdentifier?: string;
|
|
323
|
+
/** Keychain access group shared by the app and extension. */
|
|
324
|
+
keychainGroup?: string;
|
|
325
|
+
/** Resolved iOS native project discovery overrides. */
|
|
326
|
+
project: ResolvedIOSProjectConfig;
|
|
327
|
+
};
|
|
269
328
|
export interface NormalizedVoltraConfig {
|
|
270
329
|
/** Absolute path to the loaded config file, when the config came from a file. */
|
|
271
330
|
configPath?: string;
|
|
@@ -277,6 +336,8 @@ export interface NormalizedVoltraConfig {
|
|
|
277
336
|
android?: NormalizedVoltraAndroidConfig;
|
|
278
337
|
/** Normalized iOS-specific Voltra configuration. */
|
|
279
338
|
ios?: NormalizedVoltraIOSConfig;
|
|
339
|
+
/** Non-fatal config problems, surfaced in the `voltra apply` summary. */
|
|
340
|
+
warnings?: string[];
|
|
280
341
|
}
|
|
281
342
|
export type CliDefaults = typeof CLI_DEFAULTS;
|
|
282
343
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE1D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,KAAK,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ACpD,GAAG,CAAC,EAAE,yBAAyB,CAAA;IAC/B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IOSWidgetConfig } from './types';
|
|
2
|
+
/** Default prefix of a widget's WidgetKit `kind`: `Voltra_Widget_<id>`. Mirrors `VoltraStorageKeys.widgetKindPrefix`. */
|
|
3
|
+
export declare const IOS_WIDGET_KIND_PREFIX = "Voltra_Widget_";
|
|
4
|
+
/** WidgetKit `kind` of a widget: the `kind` option when set, else `Voltra_Widget_<id>`. */
|
|
5
|
+
export declare function iosWidgetKind(widget: Pick<IOSWidgetConfig, 'id' | 'kind'>): string;
|
|
6
|
+
/**
|
|
7
|
+
* `{ id: kind }` for the widgets that pin a custom `kind`, or undefined when none does.
|
|
8
|
+
* Written to both Info.plists (`Voltra_WidgetKinds`) so native code maps ids to kinds and back.
|
|
9
|
+
*/
|
|
10
|
+
export declare function iosWidgetKindOverrides(widgets: Pick<IOSWidgetConfig, 'id' | 'kind'>[]): Record<string, string> | undefined;
|
|
11
|
+
//# sourceMappingURL=widgetKind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetKind.d.ts","sourceRoot":"","sources":["../../../src/config/widgetKind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,yHAAyH;AACzH,eAAO,MAAM,sBAAsB,mBAAmB,CAAA;AAEtD,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG,MAAM,CAElF;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,MAAM,CAAC,EAAE,GAC9C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAUpC"}
|
|
@@ -4,5 +4,6 @@ export declare function getPlatformClientPackageName(platform: VoltraPlatform):
|
|
|
4
4
|
export declare function isPlatformPackageInstalled(projectRoot: string, platform: VoltraPlatform): boolean;
|
|
5
5
|
export declare function getMissingPlatformPackages(projectRoot: string, platform: VoltraPlatform): string[];
|
|
6
6
|
export declare function requirePlatformPackage<TPackage>(projectRoot: string, platform: VoltraPlatform): TPackage;
|
|
7
|
+
export declare function getPlatformClientPackageVersion(projectRoot: string, platform: VoltraPlatform): string;
|
|
7
8
|
export declare function getMissingPlatformPackageMessage(platform: VoltraPlatform, packageNames?: string[]): string;
|
|
8
9
|
//# sourceMappingURL=platformPackages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platformPackages.d.ts","sourceRoot":"","sources":["../../../src/dependencies/platformPackages.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAYrD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAEvE;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAE7E;AAED,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAEjG;AAED,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,MAAM,EAAE,CAKlG;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,QAAQ,CAExG;AAED,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,cAAc,EACxB,YAAY,WAA4C,GACvD,MAAM,CAQR"}
|
|
1
|
+
{"version":3,"file":"platformPackages.d.ts","sourceRoot":"","sources":["../../../src/dependencies/platformPackages.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAYrD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAEvE;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAE7E;AAED,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAEjG;AAED,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,MAAM,EAAE,CAKlG;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,QAAQ,CAExG;AAED,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,MAAM,CASrG;AAED,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,cAAc,EACxB,YAAY,WAA4C,GACvD,MAAM,CAQR"}
|
|
@@ -7,8 +7,18 @@ export interface IOSProjectDiscovery {
|
|
|
7
7
|
podfilePath: string;
|
|
8
8
|
mainTargetName: string;
|
|
9
9
|
mainTargetCandidates: string[];
|
|
10
|
+
/** Build configuration names of the app target, default build configuration first. */
|
|
11
|
+
buildConfigurationNames: string[];
|
|
12
|
+
/** Info.plist of the default build configuration. Always the first entry of `infoPlistPaths`. */
|
|
10
13
|
infoPlistPath: string;
|
|
14
|
+
/** Every distinct Info.plist the app target references, default build configuration first. */
|
|
15
|
+
infoPlistPaths: string[];
|
|
16
|
+
/** Entitlements file of the default build configuration, when the project references one. */
|
|
11
17
|
entitlementsPath?: string;
|
|
18
|
+
/** Every distinct entitlements file the app target references, default build configuration first. */
|
|
19
|
+
entitlementsPaths: string[];
|
|
20
|
+
/** Entitlements file per build configuration, when the config file names one per configuration. */
|
|
21
|
+
entitlementsPathByConfiguration?: Map<string, string>;
|
|
12
22
|
}
|
|
13
23
|
export declare class IOSProjectDiscoveryError extends VoltraCliError {
|
|
14
24
|
constructor(message: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../src/discovery/ios.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../src/discovery/ios.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAA;AAOjE,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,oBAAoB,EAAE,MAAM,EAAE,CAAA;IAC9B,sFAAsF;IACtF,uBAAuB,EAAE,MAAM,EAAE,CAAA;IACjC,iGAAiG;IACjG,aAAa,EAAE,MAAM,CAAA;IACrB,8FAA8F;IAC9F,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,qGAAqG;IACrG,iBAAiB,EAAE,MAAM,EAAE,CAAA;IAC3B,mGAAmG;IACnG,+BAA+B,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACtD;AA+BD,qBAAa,wBAAyB,SAAQ,cAAc;gBAC9C,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,mBAAmB,CAAC,CAgC9B"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export type { GenerateIOSFilesOptions, GenerateIOSFilesResult } from './platform
|
|
|
25
25
|
export { resolveIOSWidgetTargetName } from './platforms/ios/targetName';
|
|
26
26
|
export { IOSWidgetTargetMutationError, ensureIOSWidgetTarget } from './platforms/ios/xcodeTarget';
|
|
27
27
|
export { applyIOSPlatform, createIOSPreflightRunner } from './platforms/ios/apply';
|
|
28
|
+
export { IOSBuildConfigurationValueError, VOLTRA_BUILD_SETTING_PREFIX, resolveIOSBuildConfigurationValues, } from './platforms/ios/buildConfigurationValues';
|
|
28
29
|
export { IOSEntitlementsMutationError, ensureEntitlements } from './platforms/ios/entitlements';
|
|
29
30
|
export type { EnsureEntitlementsOptions, EnsureEntitlementsResult } from './platforms/ios/entitlements';
|
|
30
31
|
export { IOSInfoPlistMutationError, ensureInfoPlist } from './platforms/ios/plist';
|
|
@@ -42,6 +43,7 @@ export type { VoltraStateDiff } from './state/diff';
|
|
|
42
43
|
export type { SaveVoltraStateInput } from './state/save';
|
|
43
44
|
export type { VoltraState } from './state/load';
|
|
44
45
|
export { formatAmbiguousDiscoveryWarning, formatApplySummary, formatDirtyWorktreeWarning, formatError, formatPreflightFailure, formatWarning, PreflightError, VoltraCliError, } from './reporting/summary';
|
|
45
|
-
export type { AndroidProjectOverrides, AndroidWidgetAppIntentConfig, AndroidWidgetAppIntentParameter, AndroidWidgetConfig, AndroidWidgetServerUpdateConfig, CliDefaults, IOSProjectOverrides, IOSWidgetAppIntentConfig, IOSWidgetAppIntentParameter, IOSWidgetConfig, IOSWidgetFamily, IOSWidgetServerUpdateConfig, LoadedVoltraConfig, NormalizedAndroidProjectConfig, NormalizedAndroidWidgetConfig, NormalizedAndroidWidgetServerUpdateConfig, NormalizedIOSProjectConfig, NormalizedIOSWidgetConfig, NormalizedIOSWidgetServerUpdateConfig, NormalizedVoltraAndroidConfig, NormalizedVoltraConfig, NormalizedVoltraIOSConfig, VoltraAndroidConfig, VoltraConfig, VoltraIOSConfig, VoltraPlatform, WidgetInitialStatePath, WidgetLabel, WidgetLocalizedValue, } from './config/types';
|
|
46
|
+
export type { AndroidProjectOverrides, AndroidWidgetAppIntentConfig, AndroidWidgetAppIntentParameter, AndroidWidgetConfig, AndroidWidgetServerUpdateConfig, CliDefaults, IOSProjectOverrides, IOSWidgetAppIntentConfig, IOSWidgetAppIntentParameter, IOSWidgetConfig, IOSWidgetFamily, IOSWidgetServerUpdateConfig, LoadedVoltraConfig, NormalizedAndroidProjectConfig, NormalizedAndroidWidgetConfig, NormalizedAndroidWidgetServerUpdateConfig, NormalizedIOSProjectConfig, NormalizedIOSWidgetConfig, NormalizedIOSWidgetServerUpdateConfig, NormalizedVoltraAndroidConfig, NormalizedVoltraConfig, NormalizedVoltraIOSConfig, ResolvedIOSProjectConfig, ResolvedVoltraIOSConfig, VoltraAndroidConfig, VoltraConfig, VoltraIOSConfig, VoltraPlatform, WidgetInitialStatePath, WidgetLabel, WidgetLocalizedValue, } from './config/types';
|
|
47
|
+
export type { PerConfiguration } from './config/perConfiguration';
|
|
46
48
|
export type { ApplySummary, PreflightFailureReport, PreflightIssue, ReportedChange, ReportedChangeKind, } from './reporting/summary';
|
|
47
49
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAuCA,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAc5D;AAqBD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AACvD,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC5E,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EAC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-1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../../src/platforms/android/generated.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../../src/platforms/android/generated.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAMxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,KAAK,EAGV,6BAA6B,EAE9B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAY7D,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,6BAA6B,CAAA;IACtC,SAAS,EAAE,uBAAuB,CAAA;CACnC;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAOD,qBAAa,0BAA2B,SAAQ,cAAc;gBAChD,OAAO,EAAE,MAAM;CAI5B;AAwBD,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CA6DpH"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Android widget sizing.
|
|
3
|
+
*
|
|
4
|
+
* Android 12+ (API 31+) places widgets by `targetCellWidth`/`targetCellHeight`, expressed in
|
|
5
|
+
* launcher grid cells. Android 11 and older ignore those attributes entirely and place widgets by
|
|
6
|
+
* `minWidth`/`minHeight`, expressed in dp, so a widget has to declare both sets to be placed
|
|
7
|
+
* correctly everywhere. Voltra widgets build against the host app's `minSdkVersion` — React
|
|
8
|
+
* Native's template sets 24 — so the pre-Android-12 path is not a legacy edge case.
|
|
9
|
+
* https://developer.android.com/develop/ui/compose/glance/create-app-widget
|
|
10
|
+
*
|
|
11
|
+
* Cell size varies by device, launcher and orientation, so converting cells to dp can only ever be
|
|
12
|
+
* an approximation. These are the figures Google publishes for a 5x4 handset grid, following the
|
|
13
|
+
* accompanying guidance to size widths from the portrait table and heights from the landscape
|
|
14
|
+
* table, because those are the smaller cells on each axis.
|
|
15
|
+
* https://developer.android.com/develop/ui/views/appwidgets/layouts
|
|
16
|
+
*
|
|
17
|
+
* The `voltra` CLI and the `@use-voltra/android-client` Expo plugin generate the same
|
|
18
|
+
* `appwidget-provider` XML from their own copy of this module; keep the two in sync.
|
|
19
|
+
*/
|
|
20
|
+
/** Widget fields that determine the generated `appwidget-provider` sizing attributes. */
|
|
21
|
+
export interface AndroidWidgetSizingInput {
|
|
22
|
+
targetCellWidth: number;
|
|
23
|
+
targetCellHeight: number;
|
|
24
|
+
minWidth?: number;
|
|
25
|
+
minHeight?: number;
|
|
26
|
+
minCellWidth?: number;
|
|
27
|
+
minCellHeight?: number;
|
|
28
|
+
minResizeWidth?: number;
|
|
29
|
+
minResizeHeight?: number;
|
|
30
|
+
maxResizeWidth?: number;
|
|
31
|
+
maxResizeHeight?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Sizing attributes for a single widget, ordered as in Android's own reference example.
|
|
35
|
+
*
|
|
36
|
+
* `minWidth` and `minHeight` are always emitted, so a widget is placed at its intended size on
|
|
37
|
+
* Android 11 and older: an explicit dp value wins, then the deprecated cell count, then the
|
|
38
|
+
* target cell count.
|
|
39
|
+
*/
|
|
40
|
+
export declare function androidWidgetSizingAttributes(widget: AndroidWidgetSizingInput): string[];
|
|
41
|
+
/**
|
|
42
|
+
* Resize bounds Android will silently ignore, described for the developer who set them.
|
|
43
|
+
*
|
|
44
|
+
* `minResizeWidth` has no effect when it is greater than `minWidth`, and `maxResizeWidth` has no
|
|
45
|
+
* effect when it is smaller; likewise for the height pair. This reports rather than throws,
|
|
46
|
+
* because `minWidth` is usually the approximation derived from the widget's cell count.
|
|
47
|
+
* https://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo
|
|
48
|
+
*/
|
|
49
|
+
export declare function androidWidgetSizingWarnings(widget: AndroidWidgetSizingInput, widgetId: string): string[];
|
|
50
|
+
//# sourceMappingURL=widgetSizing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetSizing.d.ts","sourceRoot":"","sources":["../../../../src/platforms/android/widgetSizing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,yFAAyF;AACzF,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAoBD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,EAAE,CAkBxF;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAwBxG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../../src/platforms/ios/apply.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../../src/platforms/ios/apply.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAC5E,OAAO,KAAK,EAAkD,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAEpH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,sBAAsB,GAAG,uBAAuB,CAAC,mBAAmB,CAAC,CAyBrH;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAoElG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { VoltraCliError } from '../../reporting/summary';
|
|
2
|
+
import type { NormalizedVoltraIOSConfig, ResolvedVoltraIOSConfig } from '../../config/types';
|
|
3
|
+
import type { IOSProjectDiscovery } from '../../discovery/ios';
|
|
4
|
+
/**
|
|
5
|
+
* Prefix of the user-defined build settings Voltra writes. Settings under it are Voltra's to add
|
|
6
|
+
* and remove, so a value that stops being per build configuration leaves nothing behind.
|
|
7
|
+
*/
|
|
8
|
+
export declare const VOLTRA_BUILD_SETTING_PREFIX = "VOLTRA_";
|
|
9
|
+
/**
|
|
10
|
+
* The settings Voltra writes and is therefore allowed to remove. Anything else a project happens to
|
|
11
|
+
* name `VOLTRA_*` belongs to the user and is left alone.
|
|
12
|
+
*/
|
|
13
|
+
export declare const VOLTRA_OWNED_BUILD_SETTINGS: readonly string[];
|
|
14
|
+
export interface IOSBuildConfigurationValues {
|
|
15
|
+
/** iOS config with every per-build-configuration value collapsed to a single string. */
|
|
16
|
+
ios: ResolvedVoltraIOSConfig;
|
|
17
|
+
/** User-defined build settings to write, keyed by build configuration name. */
|
|
18
|
+
buildSettings: Map<string, Record<string, string>>;
|
|
19
|
+
}
|
|
20
|
+
export declare class IOSBuildConfigurationValueError extends VoltraCliError {
|
|
21
|
+
constructor(message: string);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Collapses per-build-configuration values into the single strings the platform mutators consume.
|
|
25
|
+
*
|
|
26
|
+
* A plain string resolves to itself and writes no build settings. A value given per build
|
|
27
|
+
* configuration becomes a user-defined build setting holding one value per configuration, and
|
|
28
|
+
* resolves to a reference to that setting, which Xcode expands per build into the entitlements and
|
|
29
|
+
* Info.plist files. The app and the generated widget extension both read the value that way, so
|
|
30
|
+
* nothing downstream has to know which environment is being built.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveIOSBuildConfigurationValues(ios: NormalizedVoltraIOSConfig, discovery: IOSProjectDiscovery): IOSBuildConfigurationValues;
|
|
33
|
+
//# sourceMappingURL=buildConfigurationValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildConfigurationValues.d.ts","sourceRoot":"","sources":["../../../../src/platforms/ios/buildConfigurationValues.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAGxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC5F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,2BAA2B,YAAY,CAAA;AAKpD;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAA2D,CAAA;AAEpH,MAAM,WAAW,2BAA2B;IAC1C,wFAAwF;IACxF,GAAG,EAAE,uBAAuB,CAAA;IAC5B,+EAA+E;IAC/E,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CACnD;AAED,qBAAa,+BAAgC,SAAQ,cAAc;gBACrD,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,kCAAkC,CAChD,GAAG,EAAE,yBAAyB,EAC9B,SAAS,EAAE,mBAAmB,GAC7B,2BAA2B,CAwC7B"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { VoltraCliError } from '../../reporting/summary';
|
|
2
2
|
import type { IOSProjectDiscovery } from '../../discovery/ios';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ResolvedVoltraIOSConfig } from '../../config/types';
|
|
4
4
|
import type { ReportedChange } from '../../reporting/summary';
|
|
5
5
|
export interface EnsureEntitlementsOptions {
|
|
6
6
|
projectRoot: string;
|
|
7
|
-
ios:
|
|
7
|
+
ios: ResolvedVoltraIOSConfig;
|
|
8
8
|
discovery: IOSProjectDiscovery;
|
|
9
9
|
}
|
|
10
10
|
export interface EnsureEntitlementsResult {
|
|
11
|
-
|
|
11
|
+
changes: ReportedChange[];
|
|
12
12
|
}
|
|
13
13
|
export declare class IOSEntitlementsMutationError extends VoltraCliError {
|
|
14
14
|
constructor(message: string);
|
|
15
15
|
}
|
|
16
16
|
export declare function ensureEntitlements(options: EnsureEntitlementsOptions): Promise<EnsureEntitlementsResult>;
|
|
17
|
-
export declare function needsEntitlementsMutation(ios:
|
|
17
|
+
export declare function needsEntitlementsMutation(ios: ResolvedVoltraIOSConfig): boolean;
|
|
18
18
|
//# sourceMappingURL=entitlements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entitlements.d.ts","sourceRoot":"","sources":["../../../../src/platforms/ios/entitlements.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAKxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"entitlements.d.ts","sourceRoot":"","sources":["../../../../src/platforms/ios/entitlements.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAKxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAQ7D,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,uBAAuB,CAAA;IAC5B,SAAS,EAAE,mBAAmB,CAAA;CAC/B;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,cAAc,EAAE,CAAA;CAC1B;AAED,qBAAa,4BAA6B,SAAQ,cAAc;gBAClD,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAgD9G;AAeD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,uBAAuB,GAAG,OAAO,CAE/E"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { VoltraCliError } from '../../reporting/summary';
|
|
2
2
|
import type { IOSProjectDiscovery } from '../../discovery/ios';
|
|
3
|
-
import type {
|
|
3
|
+
import type { NormalizedIOSWidgetConfig, ResolvedVoltraIOSConfig } from '../../config/types';
|
|
4
4
|
import type { ReportedChange } from '../../reporting/summary';
|
|
5
5
|
export interface GenerateIOSFilesOptions {
|
|
6
6
|
projectRoot: string;
|
|
7
|
-
ios:
|
|
7
|
+
ios: ResolvedVoltraIOSConfig;
|
|
8
8
|
discovery: IOSProjectDiscovery;
|
|
9
9
|
}
|
|
10
10
|
export interface GenerateIOSFilesResult {
|
|
@@ -14,8 +14,20 @@ export interface GenerateIOSFilesResult {
|
|
|
14
14
|
targetName: string;
|
|
15
15
|
targetPath: string;
|
|
16
16
|
}
|
|
17
|
+
export type DetectedIOSWidget = (NormalizedIOSWidgetConfig & {
|
|
18
|
+
clientRendered: false;
|
|
19
|
+
}) | (NormalizedIOSWidgetConfig & {
|
|
20
|
+
entry: string;
|
|
21
|
+
clientRendered: true;
|
|
22
|
+
clientSourcePath: string;
|
|
23
|
+
});
|
|
17
24
|
export declare class IOSGeneratedFilesError extends VoltraCliError {
|
|
18
25
|
constructor(message: string);
|
|
19
26
|
}
|
|
20
27
|
export declare function generateIOSFiles(options: GenerateIOSFilesOptions): Promise<GenerateIOSFilesResult>;
|
|
28
|
+
declare function generateWidgetBundleSwift(widgets: DetectedIOSWidget[]): string;
|
|
29
|
+
export declare const __test__: {
|
|
30
|
+
generateWidgetBundleSwift: typeof generateWidgetBundleSwift;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
21
33
|
//# sourceMappingURL=generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../../src/platforms/ios/generated.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../../src/platforms/ios/generated.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAQxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAGV,yBAAyB,EACzB,uBAAuB,EAExB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AA8E7D,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,uBAAuB,CAAA;IAC5B,SAAS,EAAE,mBAAmB,CAAA;CAC/B;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB;AA0BD,MAAM,MAAM,iBAAiB,GACzB,CAAC,yBAAyB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