expo-invoke 2.6.11 → 2.6.12
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/plugin/codegen/generateSwiftWidget.d.ts +10 -0
- package/build/plugin/codegen/generateSwiftWidget.js +10 -10
- package/build/plugin/codegen/generateSwiftWidget.js.map +1 -1
- package/build/plugin/ios/withIOSInvoke.d.ts +10 -0
- package/build/plugin/ios/withIOSInvoke.js +6 -1
- package/build/plugin/ios/withIOSInvoke.js.map +1 -1
- package/build/plugin/src/withInvoke.d.ts +10 -0
- package/build/plugin/src/withInvoke.js +6 -1
- package/build/plugin/src/withInvoke.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,16 @@ export interface WidgetCodegenOptions {
|
|
|
7
7
|
widgetDataKey: string;
|
|
8
8
|
/** Hex accent colour, e.g. "#267AD9" */
|
|
9
9
|
widgetAccentColor: string;
|
|
10
|
+
/** Hex background colour for all widget sizes, e.g. "#E6F4FF" */
|
|
11
|
+
widgetBgColor: string;
|
|
12
|
+
/** SF Symbol name used as the main widget icon, e.g. "square.grid.2x2.fill" */
|
|
13
|
+
widgetIcon: string;
|
|
14
|
+
/** SF Symbol name used on detail rows (carrier, assignee, etc.), e.g. "person.fill" */
|
|
15
|
+
widgetDetailIcon: string;
|
|
16
|
+
/** Text shown in the large widget empty state, e.g. "Nothing here yet" */
|
|
17
|
+
widgetEmptyText: string;
|
|
18
|
+
/** How often (in minutes) the widget timeline refreshes. Defaults to 15. */
|
|
19
|
+
widgetRefreshMinutes: number;
|
|
10
20
|
/** URL scheme deep-link opened when widget is tapped, e.g. "myapp://home" */
|
|
11
21
|
widgetDeepLink: string;
|
|
12
22
|
/** iOS App Group identifier shared between app and widget */
|
|
@@ -42,9 +42,9 @@ function familiesClause(sizes) {
|
|
|
42
42
|
* }
|
|
43
43
|
*/
|
|
44
44
|
function generateSwiftWidget(opts) {
|
|
45
|
-
const { widgetTitle, widgetDescription, widgetDataKey, widgetAccentColor, widgetDeepLink, appGroupId, widgetSizes, } = opts;
|
|
45
|
+
const { widgetTitle, widgetDescription, widgetDataKey, widgetAccentColor, widgetBgColor, widgetIcon, widgetDetailIcon, widgetEmptyText, widgetRefreshMinutes, widgetDeepLink, appGroupId, widgetSizes, } = opts;
|
|
46
46
|
const accentColor = hexToSwiftColor(widgetAccentColor);
|
|
47
|
-
const bgColor =
|
|
47
|
+
const bgColor = hexToSwiftColor(widgetBgColor);
|
|
48
48
|
const families = familiesClause(widgetSizes);
|
|
49
49
|
const hasSmall = widgetSizes.includes('small');
|
|
50
50
|
const hasMedium = widgetSizes.includes('medium');
|
|
@@ -101,7 +101,7 @@ struct InvokeWidgetProvider: TimelineProvider {
|
|
|
101
101
|
|
|
102
102
|
func getTimeline(in context: Context, completion: @escaping (Timeline<InvokeWidgetEntry>) -> Void) {
|
|
103
103
|
let entry = InvokeWidgetEntry(date: Date(), data: load())
|
|
104
|
-
let refresh = Calendar.current.date(byAdding: .minute, value:
|
|
104
|
+
let refresh = Calendar.current.date(byAdding: .minute, value: ${widgetRefreshMinutes}, to: Date()) ?? Date()
|
|
105
105
|
completion(Timeline(entries: [entry], policy: .after(refresh)))
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -152,7 +152,7 @@ ${hasSmall ? `struct SmallInvokeView: View {
|
|
|
152
152
|
invokeBgColor.ignoresSafeArea()
|
|
153
153
|
VStack(alignment: .leading, spacing: 6) {
|
|
154
154
|
HStack {
|
|
155
|
-
Image(systemName: "
|
|
155
|
+
Image(systemName: "${escapeSwift(widgetIcon)}")
|
|
156
156
|
.font(.system(size: 16, weight: .semibold))
|
|
157
157
|
.foregroundStyle(invokeAccentColor)
|
|
158
158
|
Spacer()
|
|
@@ -192,7 +192,7 @@ ${hasMedium ? `struct MediumInvokeView: View {
|
|
|
192
192
|
invokeBgColor.ignoresSafeArea()
|
|
193
193
|
HStack(spacing: 0) {
|
|
194
194
|
VStack(alignment: .leading, spacing: 8) {
|
|
195
|
-
Image(systemName: "
|
|
195
|
+
Image(systemName: "${escapeSwift(widgetIcon)}")
|
|
196
196
|
.font(.system(size: 20, weight: .semibold))
|
|
197
197
|
.foregroundStyle(invokeAccentColor)
|
|
198
198
|
Text("\\(entry.data.count)")
|
|
@@ -231,7 +231,7 @@ ${hasMedium ? `struct MediumInvokeView: View {
|
|
|
231
231
|
}
|
|
232
232
|
if let detail = entry.data.detail {
|
|
233
233
|
HStack(spacing: 4) {
|
|
234
|
-
Image(systemName: "
|
|
234
|
+
Image(systemName: "${escapeSwift(widgetDetailIcon)}")
|
|
235
235
|
.font(.system(size: 9))
|
|
236
236
|
.foregroundStyle(.secondary)
|
|
237
237
|
Text(detail)
|
|
@@ -256,7 +256,7 @@ ${hasLarge ? `struct LargeInvokeView: View {
|
|
|
256
256
|
invokeBgColor.ignoresSafeArea()
|
|
257
257
|
VStack(alignment: .leading, spacing: 14) {
|
|
258
258
|
HStack {
|
|
259
|
-
Image(systemName: "
|
|
259
|
+
Image(systemName: "${escapeSwift(widgetIcon)}")
|
|
260
260
|
.font(.system(size: 18, weight: .semibold))
|
|
261
261
|
.foregroundStyle(invokeAccentColor)
|
|
262
262
|
Text("${escapeSwift(widgetTitle)}")
|
|
@@ -286,7 +286,7 @@ ${hasLarge ? `struct LargeInvokeView: View {
|
|
|
286
286
|
}
|
|
287
287
|
if let detail = entry.data.detail {
|
|
288
288
|
HStack(spacing: 6) {
|
|
289
|
-
Image(systemName: "
|
|
289
|
+
Image(systemName: "${escapeSwift(widgetDetailIcon)}")
|
|
290
290
|
.font(.system(size: 13))
|
|
291
291
|
.foregroundStyle(invokeAccentColor)
|
|
292
292
|
Text(detail)
|
|
@@ -301,10 +301,10 @@ ${hasLarge ? `struct LargeInvokeView: View {
|
|
|
301
301
|
.clipShape(RoundedRectangle(cornerRadius: 12))
|
|
302
302
|
} else {
|
|
303
303
|
VStack(spacing: 10) {
|
|
304
|
-
Image(systemName: "
|
|
304
|
+
Image(systemName: "${escapeSwift(widgetIcon)}")
|
|
305
305
|
.font(.system(size: 34))
|
|
306
306
|
.foregroundStyle(invokeAccentColor.opacity(0.4))
|
|
307
|
-
Text("
|
|
307
|
+
Text("${escapeSwift(widgetEmptyText)}")
|
|
308
308
|
.font(.system(size: 13))
|
|
309
309
|
.foregroundStyle(.secondary)
|
|
310
310
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSwiftWidget.js","sourceRoot":"","sources":["../../../plugin/codegen/generateSwiftWidget.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generateSwiftWidget.js","sourceRoot":"","sources":["../../../plugin/codegen/generateSwiftWidget.ts"],"names":[],"mappings":";;AAoEA,kDAgVC;AAED,0DA8BC;AAED,gEAWC;AAtaD,SAAS,WAAW,CAAC,CAAS;IAC5B,OAAO,CAAC;SACL,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,eAAe,CAAC,GAAW;IAClC,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACnC,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;IACpD,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;IACpD,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC;IACpD,OAAO,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,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+BAA+B,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,+BAA+B;;;;;;;;;;;;;;;;qCAgBxG,WAAW,CAAC,WAAW,CAAC;wBACrC,WAAW,CAAC,iBAAiB,CAAC;8BACxB,QAAQ;;;;;;;;;;;;CAYrC,CAAC;AACF,CAAC;AAED,SAAgB,uBAAuB;IACrC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA4BA,CAAC;AACV,CAAC;AAED,SAAgB,0BAA0B,CAAC,UAAkB;IAC3D,OAAO;;;;;;cAMK,UAAU;;;SAGf,CAAC;AACV,CAAC"}
|
|
@@ -24,6 +24,16 @@ interface IOSInvokeOptions {
|
|
|
24
24
|
widgetDataKey?: string;
|
|
25
25
|
/** Hex accent colour for the widget UI (defaults to "#267AD9") */
|
|
26
26
|
widgetAccentColor?: string;
|
|
27
|
+
/** Hex background colour for all widget sizes (defaults to "#E6F4FF") */
|
|
28
|
+
widgetBgColor?: string;
|
|
29
|
+
/** SF Symbol name used as the main widget icon (defaults to "square.grid.2x2.fill") */
|
|
30
|
+
widgetIcon?: string;
|
|
31
|
+
/** SF Symbol name used on detail rows, e.g. carrier/assignee (defaults to "person.fill") */
|
|
32
|
+
widgetDetailIcon?: string;
|
|
33
|
+
/** Text shown in the large widget empty state (defaults to "Nothing here yet") */
|
|
34
|
+
widgetEmptyText?: string;
|
|
35
|
+
/** How often in minutes the widget timeline refreshes (defaults to 15) */
|
|
36
|
+
widgetRefreshMinutes?: number;
|
|
27
37
|
/** URL scheme deep-link opened when widget is tapped */
|
|
28
38
|
widgetDeepLink?: string;
|
|
29
39
|
/** Widget sizes to support (defaults to ["small","medium"]) */
|
|
@@ -44,7 +44,7 @@ const generateSwiftAppClip_1 = require("../codegen/generateSwiftAppClip");
|
|
|
44
44
|
const withWidgetExtension_1 = require("./withWidgetExtension");
|
|
45
45
|
const withIOSInvoke = (config, options) => {
|
|
46
46
|
var _a, _b, _c;
|
|
47
|
-
const { intents, voiceUsageDescription, appGroupId, entities = [], focusFilters = [], appClips = [], enablePushToTalk = false, pttUsageDescription, enableLiveActivities = false, enableWidget = false, widgetTitle, widgetDescription = 'Quick access from your home screen.', widgetDataKey = 'invokeWidgetData', widgetAccentColor = '#267AD9', widgetDeepLink = '', widgetSizes = ['small', 'medium'], } = options;
|
|
47
|
+
const { intents, voiceUsageDescription, appGroupId, entities = [], focusFilters = [], appClips = [], enablePushToTalk = false, pttUsageDescription, enableLiveActivities = false, enableWidget = false, widgetTitle, widgetDescription = 'Quick access from your home screen.', widgetDataKey = 'invokeWidgetData', widgetAccentColor = '#267AD9', widgetBgColor = '#E6F4FF', widgetIcon = 'square.grid.2x2.fill', widgetDetailIcon = 'person.fill', widgetEmptyText = 'Nothing here yet', widgetRefreshMinutes = 15, widgetDeepLink = '', widgetSizes = ['small', 'medium'], } = options;
|
|
48
48
|
// 1. Info.plist usage descriptions + feature flags
|
|
49
49
|
config = (0, config_plugins_1.withInfoPlist)(config, (cfg) => {
|
|
50
50
|
var _a;
|
|
@@ -145,6 +145,11 @@ const withIOSInvoke = (config, options) => {
|
|
|
145
145
|
widgetDescription,
|
|
146
146
|
widgetDataKey,
|
|
147
147
|
widgetAccentColor,
|
|
148
|
+
widgetBgColor,
|
|
149
|
+
widgetIcon,
|
|
150
|
+
widgetDetailIcon,
|
|
151
|
+
widgetEmptyText,
|
|
152
|
+
widgetRefreshMinutes,
|
|
148
153
|
widgetDeepLink,
|
|
149
154
|
widgetSizes,
|
|
150
155
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withIOSInvoke.js","sourceRoot":"","sources":["../../../plugin/ios/withIOSInvoke.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAK8B;AAC9B,uCAAyB;AACzB,2CAA6B;AAC7B,0EAAuE;AACvE,4EAAyE;AACzE,oFAAiF;AACjF,0EAAuE;AACvE,+DAA4D;
|
|
1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ChB,CAAC,CAAC;AAvJW,QAAA,aAAa,iBAuJxB"}
|
|
@@ -49,6 +49,16 @@ export interface InvokePluginOptions {
|
|
|
49
49
|
widgetDataKey?: string;
|
|
50
50
|
/** Hex accent colour for widget UI (defaults to "#267AD9") */
|
|
51
51
|
widgetAccentColor?: string;
|
|
52
|
+
/** Hex background colour for all widget sizes (defaults to "#E6F4FF") */
|
|
53
|
+
widgetBgColor?: string;
|
|
54
|
+
/** SF Symbol name used as the main widget icon (defaults to "square.grid.2x2.fill") */
|
|
55
|
+
widgetIcon?: string;
|
|
56
|
+
/** SF Symbol name used on detail rows, e.g. carrier/assignee (defaults to "person.fill") */
|
|
57
|
+
widgetDetailIcon?: string;
|
|
58
|
+
/** Text shown in the large widget empty state (defaults to "Nothing here yet") */
|
|
59
|
+
widgetEmptyText?: string;
|
|
60
|
+
/** How often in minutes the widget timeline refreshes (defaults to 15) */
|
|
61
|
+
widgetRefreshMinutes?: number;
|
|
52
62
|
/** URL scheme deep-link opened when the widget is tapped (e.g. "myapp://home") */
|
|
53
63
|
widgetDeepLink?: string;
|
|
54
64
|
/** Widget sizes to generate. Defaults to ["small", "medium"] */
|
|
@@ -5,7 +5,7 @@ const withIOSInvoke_1 = require("../ios/withIOSInvoke");
|
|
|
5
5
|
const withAndroidInvoke_1 = require("../android/withAndroidInvoke");
|
|
6
6
|
const validation_1 = require("../../src/utils/validation");
|
|
7
7
|
const withInvoke = (config, options) => {
|
|
8
|
-
const { intents = [], widgets: _widgets, notificationActions, voiceUsageDescription, appGroupId, entities = [], focusFilters = [], appClips = [], slices = [], enableInteractiveWidgets = false, enablePushToTalk = false, pttUsageDescription, enableLiveActivities = false, liveActivityTypes = [], enableWidget = false, widgetTitle, widgetDescription, widgetDataKey, widgetAccentColor, widgetDeepLink, widgetSizes, } = options;
|
|
8
|
+
const { intents = [], widgets: _widgets, notificationActions, voiceUsageDescription, appGroupId, entities = [], focusFilters = [], appClips = [], slices = [], enableInteractiveWidgets = false, enablePushToTalk = false, pttUsageDescription, enableLiveActivities = false, liveActivityTypes = [], enableWidget = false, widgetTitle, widgetDescription, widgetDataKey, widgetAccentColor, widgetBgColor, widgetIcon, widgetDetailIcon, widgetEmptyText, widgetRefreshMinutes, widgetDeepLink, widgetSizes, } = options;
|
|
9
9
|
// Validate options early — throws with a helpful message if misconfigured
|
|
10
10
|
(0, validation_1.validatePluginOptions)({ enablePushToTalk, pttUsageDescription, enableLiveActivities, liveActivityTypes });
|
|
11
11
|
// Widget-specific validation
|
|
@@ -39,6 +39,11 @@ const withInvoke = (config, options) => {
|
|
|
39
39
|
widgetDescription,
|
|
40
40
|
widgetDataKey,
|
|
41
41
|
widgetAccentColor,
|
|
42
|
+
widgetBgColor,
|
|
43
|
+
widgetIcon,
|
|
44
|
+
widgetDetailIcon,
|
|
45
|
+
widgetEmptyText,
|
|
46
|
+
widgetRefreshMinutes,
|
|
42
47
|
widgetDeepLink,
|
|
43
48
|
widgetSizes,
|
|
44
49
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withInvoke.js","sourceRoot":"","sources":["../../../plugin/src/withInvoke.ts"],"names":[],"mappings":";;AAAA,yDAA8E;AAC9E,wDAAqD;AACrD,oEAAiE;AACjE,2DAAmE;
|
|
1
|
+
{"version":3,"file":"withInvoke.js","sourceRoot":"","sources":["../../../plugin/src/withInvoke.ts"],"names":[],"mappings":";;AAAA,yDAA8E;AAC9E,wDAAqD;AACrD,oEAAiE;AACjE,2DAAmE;AA+EnE,MAAM,UAAU,GAAsC,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;IACxE,MAAM,EACJ,OAAO,GAAG,EAAE,EACZ,OAAO,EAAE,QAAQ,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,UAAU,EACV,QAAQ,GAAG,EAAE,EACb,YAAY,GAAG,EAAE,EACjB,QAAQ,GAAG,EAAE,EACb,MAAM,GAAG,EAAE,EACX,wBAAwB,GAAG,KAAK,EAChC,gBAAgB,GAAG,KAAK,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AG,IAAA,qCAAiB,EAAC,MAAM,EAAE;QACjC,OAAO;QACP,mBAAmB;QACnB,MAAM;QACN,wBAAwB;KACzB,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,kBAAe,IAAA,oCAAmB,EAAC,UAAU,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-invoke",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.12",
|
|
4
4
|
"description": "The complete native-surface-to-JS bridge for Expo. One intent config → Siri, Google Assistant, home screen widgets, Dynamic Island, app icon menus, notification actions, NFC, QR, deep links and more — all through a single useInvoke() hook.",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"module": "build/src/index.js",
|