craft-native 0.0.37

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.
Files changed (117) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +424 -0
  3. package/bin/cli.ts +937 -0
  4. package/dist/api/android-advanced.d.ts +737 -0
  5. package/dist/api/android-advanced.d.ts.map +1 -0
  6. package/dist/api/app.d.ts +432 -0
  7. package/dist/api/app.d.ts.map +1 -0
  8. package/dist/api/clipboard.d.ts +85 -0
  9. package/dist/api/clipboard.d.ts.map +1 -0
  10. package/dist/api/crypto.d.ts +79 -0
  11. package/dist/api/crypto.d.ts.map +1 -0
  12. package/dist/api/db.d.ts +427 -0
  13. package/dist/api/db.d.ts.map +1 -0
  14. package/dist/api/dialog.d.ts +141 -0
  15. package/dist/api/dialog.d.ts.map +1 -0
  16. package/dist/api/fs.d.ts +131 -0
  17. package/dist/api/fs.d.ts.map +1 -0
  18. package/dist/api/http.d.ts +196 -0
  19. package/dist/api/http.d.ts.map +1 -0
  20. package/dist/api/index.d.ts +38 -0
  21. package/dist/api/index.d.ts.map +1 -0
  22. package/dist/api/ios-advanced.d.ts +833 -0
  23. package/dist/api/ios-advanced.d.ts.map +1 -0
  24. package/dist/api/macos-advanced.d.ts +721 -0
  25. package/dist/api/macos-advanced.d.ts.map +1 -0
  26. package/dist/api/media.d.ts +233 -0
  27. package/dist/api/media.d.ts.map +1 -0
  28. package/dist/api/mobile.d.ts +658 -0
  29. package/dist/api/mobile.d.ts.map +1 -0
  30. package/dist/api/process.d.ts +168 -0
  31. package/dist/api/process.d.ts.map +1 -0
  32. package/dist/api/sidebar.d.ts +125 -0
  33. package/dist/api/sidebar.d.ts.map +1 -0
  34. package/dist/api/tray.d.ts +410 -0
  35. package/dist/api/tray.d.ts.map +1 -0
  36. package/dist/api/window.d.ts +462 -0
  37. package/dist/api/window.d.ts.map +1 -0
  38. package/dist/api/windows-advanced.d.ts +719 -0
  39. package/dist/api/windows-advanced.d.ts.map +1 -0
  40. package/dist/assets/index.d.ts +69 -0
  41. package/dist/assets/index.d.ts.map +1 -0
  42. package/dist/binary-resolver.d.ts +39 -0
  43. package/dist/binary-resolver.d.ts.map +1 -0
  44. package/dist/bridge/android.d.ts +574 -0
  45. package/dist/bridge/android.d.ts.map +1 -0
  46. package/dist/bridge/core.d.ts +474 -0
  47. package/dist/bridge/core.d.ts.map +1 -0
  48. package/dist/bridge/ids.d.ts +18 -0
  49. package/dist/bridge/ids.d.ts.map +1 -0
  50. package/dist/bridge/ios.d.ts +528 -0
  51. package/dist/bridge/ios.d.ts.map +1 -0
  52. package/dist/bridge/webkit-pending.d.ts +50 -0
  53. package/dist/bridge/webkit-pending.d.ts.map +1 -0
  54. package/dist/build/bundle-optimizer.d.ts +69 -0
  55. package/dist/build/bundle-optimizer.d.ts.map +1 -0
  56. package/dist/components/index.d.ts +719 -0
  57. package/dist/components/index.d.ts.map +1 -0
  58. package/dist/components/native.d.ts +728 -0
  59. package/dist/components/native.d.ts.map +1 -0
  60. package/dist/components/sidebar.d.ts +458 -0
  61. package/dist/components/sidebar.d.ts.map +1 -0
  62. package/dist/dev/devtools.d.ts +118 -0
  63. package/dist/dev/devtools.d.ts.map +1 -0
  64. package/dist/dev/error-overlay.d.ts +73 -0
  65. package/dist/dev/error-overlay.d.ts.map +1 -0
  66. package/dist/dev/hot-reload.d.ts +127 -0
  67. package/dist/dev/hot-reload.d.ts.map +1 -0
  68. package/dist/index.cjs +10253 -0
  69. package/dist/index.d.cts +59 -0
  70. package/dist/index.d.ts +59 -0
  71. package/dist/index.d.ts.map +1 -0
  72. package/dist/index.js +10240 -0
  73. package/dist/logging/index.d.ts +152 -0
  74. package/dist/logging/index.d.ts.map +1 -0
  75. package/dist/optimizations/index.d.ts +232 -0
  76. package/dist/optimizations/index.d.ts.map +1 -0
  77. package/dist/package.d.ts +90 -0
  78. package/dist/package.d.ts.map +1 -0
  79. package/dist/performance/runtime.d.ts +230 -0
  80. package/dist/performance/runtime.d.ts.map +1 -0
  81. package/dist/performance/startup.d.ts +223 -0
  82. package/dist/performance/startup.d.ts.map +1 -0
  83. package/dist/plugins/index.d.ts +114 -0
  84. package/dist/plugins/index.d.ts.map +1 -0
  85. package/dist/security/index.d.ts +268 -0
  86. package/dist/security/index.d.ts.map +1 -0
  87. package/dist/signing/index.d.ts +104 -0
  88. package/dist/signing/index.d.ts.map +1 -0
  89. package/dist/styles/headwind.d.ts +222 -0
  90. package/dist/styles/headwind.d.ts.map +1 -0
  91. package/dist/styles/index.d.ts +31 -0
  92. package/dist/styles/index.d.ts.map +1 -0
  93. package/dist/styles/sidebar-templates.d.ts +77 -0
  94. package/dist/styles/sidebar-templates.d.ts.map +1 -0
  95. package/dist/styles/sidebars.d.ts +194 -0
  96. package/dist/styles/sidebars.d.ts.map +1 -0
  97. package/dist/types.d.ts +1555 -0
  98. package/dist/types.d.ts.map +1 -0
  99. package/dist/updater/index.d.ts +164 -0
  100. package/dist/updater/index.d.ts.map +1 -0
  101. package/dist/utils/audio.d.ts +40 -0
  102. package/dist/utils/audio.d.ts.map +1 -0
  103. package/dist/utils/index.d.ts +9 -0
  104. package/dist/utils/index.d.ts.map +1 -0
  105. package/dist/utils/native.d.ts +27 -0
  106. package/dist/utils/native.d.ts.map +1 -0
  107. package/dist/utils/react.d.ts +157 -0
  108. package/dist/utils/react.d.ts.map +1 -0
  109. package/dist/utils/storage.d.ts +35 -0
  110. package/dist/utils/storage.d.ts.map +1 -0
  111. package/dist/utils/svelte.d.ts +187 -0
  112. package/dist/utils/svelte.d.ts.map +1 -0
  113. package/dist/utils/timer.d.ts +57 -0
  114. package/dist/utils/timer.d.ts.map +1 -0
  115. package/dist/utils/vue.d.ts +157 -0
  116. package/dist/utils/vue.d.ts.map +1 -0
  117. package/package.json +78 -0
@@ -0,0 +1,719 @@
1
+ /**
2
+ * @fileoverview Windows Advanced Features API
3
+ * @description Advanced Windows-specific features including Jump Lists, Taskbar Progress,
4
+ * Toast Notifications, Windows Hello, Widgets, and Windows App SDK integration.
5
+ * @module @craft-native/api/windows-advanced
6
+ */
7
+ /**
8
+ * Jump list task.
9
+ */
10
+ export interface JumpListTask {
11
+ /** Task identifier */
12
+ id: string;
13
+ /** Display title */
14
+ title: string;
15
+ /** Description */
16
+ description?: string;
17
+ /** Icon path or index */
18
+ icon?: string;
19
+ /** Icon index (for exe icons) */
20
+ iconIndex?: number;
21
+ /** Arguments to pass when launched */
22
+ arguments?: string;
23
+ /** Working directory */
24
+ workingDirectory?: string;
25
+ }
26
+ /**
27
+ * Jump list category.
28
+ */
29
+ export interface JumpListCategory {
30
+ /** Category type */
31
+ type: 'tasks' | 'frequent' | 'recent' | 'custom';
32
+ /** Custom category title (for 'custom' type) */
33
+ title?: string;
34
+ /** Items in this category */
35
+ items: JumpListTask[];
36
+ }
37
+ /**
38
+ * Jump Lists API for Windows taskbar integration.
39
+ *
40
+ * @example
41
+ * // Set up jump list
42
+ * await jumpList.set([
43
+ * {
44
+ * type: 'tasks',
45
+ * items: [
46
+ * { id: 'new', title: 'New Window', icon: '%SystemRoot%\\system32\\shell32.dll', iconIndex: 1 },
47
+ * { id: 'settings', title: 'Settings', arguments: '--settings' }
48
+ * ]
49
+ * },
50
+ * {
51
+ * type: 'custom',
52
+ * title: 'Recent Projects',
53
+ * items: recentProjects.map(p => ({ id: p.id, title: p.name, arguments: `--project ${p.id}` }))
54
+ * }
55
+ * ])
56
+ *
57
+ * // Handle jump list item click
58
+ * jumpList.onItemClick((id, _args) => {
59
+ * if (id === 'settings') openSettings()
60
+ * })
61
+ */
62
+ export declare const jumpList: {
63
+ /**
64
+ * Check if Jump Lists are supported.
65
+ */
66
+ isSupported(): Promise<boolean>;
67
+ /**
68
+ * Set the jump list categories.
69
+ */
70
+ set(categories: JumpListCategory[]): Promise<void>;
71
+ /**
72
+ * Clear the jump list.
73
+ */
74
+ clear(): Promise<void>;
75
+ /**
76
+ * Add item to recent list.
77
+ */
78
+ addToRecent(filePath: string): Promise<void>;
79
+ /**
80
+ * Clear recent list.
81
+ */
82
+ clearRecent(): Promise<void>;
83
+ /**
84
+ * Add item to frequent list.
85
+ */
86
+ addToFrequent(filePath: string): Promise<void>;
87
+ /**
88
+ * Clear frequent list.
89
+ */
90
+ clearFrequent(): Promise<void>;
91
+ /**
92
+ * Handle jump list item click.
93
+ */
94
+ onItemClick(handler: (itemId: string, arguments_: string | null) => void): void;
95
+ };
96
+ /**
97
+ * Taskbar progress state.
98
+ */
99
+ export type TaskbarProgressState = 'none' | 'indeterminate' | 'normal' | 'error' | 'paused';
100
+ /**
101
+ * Taskbar Progress API for Windows taskbar.
102
+ *
103
+ * @example
104
+ * // Show download progress
105
+ * await taskbarProgress.setState('normal')
106
+ * await taskbarProgress.setProgress(0.5) // 50%
107
+ *
108
+ * // Show indeterminate progress
109
+ * await taskbarProgress.setState('indeterminate')
110
+ *
111
+ * // Show error state
112
+ * await taskbarProgress.setState('error')
113
+ *
114
+ * // Clear progress
115
+ * await taskbarProgress.setState('none')
116
+ */
117
+ export declare const taskbarProgress: {
118
+ /**
119
+ * Set progress state.
120
+ */
121
+ setState(state: TaskbarProgressState): Promise<void>;
122
+ /**
123
+ * Set progress value (0-1).
124
+ */
125
+ setProgress(value: number): Promise<void>;
126
+ /**
127
+ * Clear progress.
128
+ */
129
+ clear(): Promise<void>;
130
+ /**
131
+ * Flash taskbar button.
132
+ */
133
+ flash(options?: {
134
+ count?: number;
135
+ interval?: number;
136
+ flags?: "all" | "caption" | "tray";
137
+ }): Promise<void>;
138
+ /**
139
+ * Stop flashing.
140
+ */
141
+ stopFlash(): Promise<void>;
142
+ /**
143
+ * Set overlay icon.
144
+ */
145
+ setOverlayIcon(iconPath: string | null, description?: string): Promise<void>;
146
+ };
147
+ /**
148
+ * Toast notification action.
149
+ */
150
+ export interface ToastAction {
151
+ /** Action identifier */
152
+ id: string;
153
+ /** Button text */
154
+ content: string;
155
+ /** Action type */
156
+ type?: 'foreground' | 'background' | 'protocol';
157
+ /** Arguments to pass */
158
+ arguments?: string;
159
+ /** Image for button */
160
+ imageUri?: string;
161
+ /** Input ID to reference */
162
+ inputId?: string;
163
+ }
164
+ /**
165
+ * Toast notification input.
166
+ */
167
+ export interface ToastInput {
168
+ /** Input identifier */
169
+ id: string;
170
+ /** Input type */
171
+ type: 'text' | 'selection';
172
+ /** Placeholder text (for text input) */
173
+ placeHolderContent?: string;
174
+ /** Default value */
175
+ defaultInput?: string;
176
+ /** Selection options (for selection input) */
177
+ selections?: Array<{
178
+ id: string;
179
+ content: string;
180
+ }>;
181
+ }
182
+ /**
183
+ * Toast notification content.
184
+ */
185
+ export interface ToastContent {
186
+ /** Title text (first line) */
187
+ title: string;
188
+ /** Body text (second line) */
189
+ body?: string;
190
+ /** Additional body text (third line) */
191
+ body2?: string;
192
+ /** App logo override */
193
+ appLogoOverride?: {
194
+ uri: string;
195
+ hint?: 'circle' | 'none';
196
+ };
197
+ /** Hero image (full width) */
198
+ heroImage?: {
199
+ uri: string;
200
+ };
201
+ /** Inline image */
202
+ inlineImage?: {
203
+ uri: string;
204
+ };
205
+ /** Attribution text */
206
+ attribution?: string;
207
+ /** Audio */
208
+ audio?: {
209
+ src?: 'default' | 'im' | 'mail' | 'reminder' | 'sms' | 'alarm' | string;
210
+ loop?: boolean;
211
+ silent?: boolean;
212
+ };
213
+ /** Scenario type */
214
+ scenario?: 'default' | 'alarm' | 'reminder' | 'incomingCall' | 'urgent';
215
+ /** Expiration time */
216
+ expirationTime?: Date;
217
+ /** Actions */
218
+ actions?: ToastAction[];
219
+ /** Inputs */
220
+ inputs?: ToastInput[];
221
+ /** Progress bar */
222
+ progress?: {
223
+ value: number | 'indeterminate';
224
+ title?: string;
225
+ status?: string;
226
+ valueStringOverride?: string;
227
+ };
228
+ }
229
+ /**
230
+ * Toast Notifications API for Windows notifications.
231
+ *
232
+ * @example
233
+ * // Show simple notification
234
+ * await toastNotifications.show({
235
+ * title: 'Download Complete',
236
+ * body: 'Your file has been downloaded successfully.',
237
+ * actions: [
238
+ * { id: 'open', content: 'Open File' },
239
+ * { id: 'folder', content: 'Open Folder' }
240
+ * ]
241
+ * })
242
+ *
243
+ * // Show progress notification
244
+ * const tag = 'download-1'
245
+ * await toastNotifications.show({
246
+ * title: 'Downloading...',
247
+ * body: 'file.zip',
248
+ * progress: { value: 0.5, status: '50% complete' }
249
+ * }, { tag })
250
+ *
251
+ * // Update progress
252
+ * await toastNotifications.update(tag, {
253
+ * progress: { value: 1, status: 'Complete!' }
254
+ * })
255
+ *
256
+ * // Handle action
257
+ * toastNotifications.onActivated((args) => {
258
+ * if (args.actionId === 'open') openFile()
259
+ * })
260
+ */
261
+ export declare const toastNotifications: {
262
+ /**
263
+ * Check if toast notifications are supported.
264
+ */
265
+ isSupported(): Promise<boolean>;
266
+ /**
267
+ * Show a toast notification.
268
+ */
269
+ show(content: ToastContent, options?: {
270
+ tag?: string;
271
+ group?: string;
272
+ suppressPopup?: boolean;
273
+ }): Promise<void>;
274
+ /**
275
+ * Update an existing notification by tag.
276
+ */
277
+ update(tag: string, updates: Partial<ToastContent>): Promise<void>;
278
+ /**
279
+ * Hide a notification by tag.
280
+ */
281
+ hide(tag: string): Promise<void>;
282
+ /**
283
+ * Hide a notification group.
284
+ */
285
+ hideGroup(group: string): Promise<void>;
286
+ /**
287
+ * Clear all notifications.
288
+ */
289
+ clearAll(): Promise<void>;
290
+ /**
291
+ * Get notification history.
292
+ */
293
+ getHistory(): Promise<Array<{
294
+ tag: string;
295
+ group: string;
296
+ deliveredTime: Date;
297
+ }>>;
298
+ /**
299
+ * Handle notification activation (click or action).
300
+ */
301
+ onActivated(handler: (args: {
302
+ tag?: string;
303
+ group?: string;
304
+ actionId?: string;
305
+ arguments?: string;
306
+ userInput?: Record<string, string>;
307
+ }) => void): void;
308
+ /**
309
+ * Handle notification dismissed.
310
+ */
311
+ onDismissed(handler: (args: {
312
+ tag?: string;
313
+ reason: "user" | "application" | "timeout";
314
+ }) => void): void;
315
+ };
316
+ /**
317
+ * Windows Hello availability.
318
+ */
319
+ export interface WindowsHelloAvailability {
320
+ /** Whether Windows Hello is available */
321
+ isAvailable: boolean;
322
+ /** Available biometric types */
323
+ biometricTypes: Array<'face' | 'fingerprint' | 'iris'>;
324
+ /** Whether device supports companion devices */
325
+ supportsCompanionDevice: boolean;
326
+ }
327
+ /**
328
+ * Windows Hello API for biometric authentication.
329
+ *
330
+ * @example
331
+ * // Check availability
332
+ * const hello = await windowsHello.getAvailability()
333
+ * if (hello.isAvailable) {
334
+ * // Authenticate
335
+ * const result = await windowsHello.authenticate('Confirm your identity')
336
+ * if (result.success) {
337
+ * // User authenticated
338
+ * }
339
+ * }
340
+ *
341
+ * // Create a credential
342
+ * const credential = await windowsHello.createCredential('user@example.com', 'Sign in to MyApp')
343
+ *
344
+ * // Verify credential
345
+ * const verified = await windowsHello.verifyCredential(credential.keyId, 'Sign in to MyApp')
346
+ */
347
+ export declare const windowsHello: {
348
+ /**
349
+ * Check Windows Hello availability.
350
+ */
351
+ getAvailability(): Promise<WindowsHelloAvailability>;
352
+ /**
353
+ * Prompt for Windows Hello authentication.
354
+ */
355
+ authenticate(message: string): Promise<{
356
+ success: boolean;
357
+ error?: "canceled" | "notConfigured" | "notAllowed" | "unknown";
358
+ }>;
359
+ /**
360
+ * Create a Windows Hello credential.
361
+ */
362
+ createCredential(userId: string, message: string): Promise<{
363
+ success: boolean;
364
+ keyId?: string;
365
+ publicKey?: string;
366
+ attestation?: string;
367
+ error?: string;
368
+ }>;
369
+ /**
370
+ * Sign data with Windows Hello credential.
371
+ */
372
+ signWithCredential(keyId: string, challenge: string, message: string): Promise<{
373
+ success: boolean;
374
+ signature?: string;
375
+ error?: string;
376
+ }>;
377
+ /**
378
+ * Delete a Windows Hello credential.
379
+ */
380
+ deleteCredential(keyId: string): Promise<boolean>;
381
+ /**
382
+ * Check if a credential exists.
383
+ */
384
+ hasCredential(keyId: string): Promise<boolean>;
385
+ };
386
+ /**
387
+ * Widget template type.
388
+ */
389
+ export type WidgetTemplateType = 'small' | 'medium' | 'large' | 'adaptive';
390
+ /**
391
+ * Widget content.
392
+ */
393
+ export interface WindowsWidgetContent {
394
+ /** Template JSON */
395
+ template: Record<string, any>;
396
+ /** Data to bind to template */
397
+ data: Record<string, any>;
398
+ }
399
+ /**
400
+ * Windows Widgets API (Windows 11).
401
+ *
402
+ * @example
403
+ * // Register widget provider
404
+ * windowsWidgets.register({
405
+ * id: 'weather-widget',
406
+ * name: 'Weather',
407
+ * description: 'Shows current weather',
408
+ * defaultTemplate: 'medium'
409
+ * })
410
+ *
411
+ * // Provide content
412
+ * windowsWidgets.onContentRequested('weather-widget', async (_context) => {
413
+ * const weather = await fetchWeather()
414
+ * return {
415
+ * template: weatherTemplate,
416
+ * data: { temp: weather.temp, condition: weather.condition }
417
+ * }
418
+ * })
419
+ *
420
+ * // Handle customization
421
+ * windowsWidgets.onCustomize('weather-widget', async (settings) => {
422
+ * // Save user settings
423
+ * })
424
+ */
425
+ export declare const windowsWidgets: {
426
+ /**
427
+ * Check if Windows Widgets are supported.
428
+ */
429
+ isSupported(): Promise<boolean>;
430
+ /**
431
+ * Register a widget provider.
432
+ */
433
+ register(config: {
434
+ id: string;
435
+ name: string;
436
+ description: string;
437
+ defaultTemplate: WidgetTemplateType;
438
+ supportedTemplates?: WidgetTemplateType[];
439
+ hasCustomization?: boolean;
440
+ }): void;
441
+ /**
442
+ * Unregister a widget provider.
443
+ */
444
+ unregister(widgetId: string): void;
445
+ /**
446
+ * Handle content request.
447
+ */
448
+ onContentRequested(widgetId: string, handler: (context: {
449
+ templateType: WidgetTemplateType;
450
+ customData?: Record<string, any>;
451
+ }) => Promise<WindowsWidgetContent>): void;
452
+ /**
453
+ * Update widget content.
454
+ */
455
+ updateContent(widgetId: string, content: WindowsWidgetContent): Promise<void>;
456
+ /**
457
+ * Handle widget action.
458
+ */
459
+ onAction(widgetId: string, handler: (action: string, data?: Record<string, any>) => void): void;
460
+ /**
461
+ * Handle customization.
462
+ */
463
+ onCustomize(widgetId: string, handler: (settings: Record<string, any>) => Promise<void>): void;
464
+ };
465
+ /**
466
+ * Package version info.
467
+ */
468
+ export interface PackageVersion {
469
+ /** Major version */
470
+ major: number;
471
+ /** Minor version */
472
+ minor: number;
473
+ /** Build version */
474
+ build: number;
475
+ /** Revision version */
476
+ revision: number;
477
+ /** Full version string */
478
+ full: string;
479
+ }
480
+ /**
481
+ * Update info.
482
+ */
483
+ export interface UpdateInfo {
484
+ /** Whether update is available */
485
+ isAvailable: boolean;
486
+ /** Whether update is mandatory */
487
+ isMandatory: boolean;
488
+ /** New version */
489
+ version?: PackageVersion;
490
+ /** Update size in bytes */
491
+ updateSize?: number;
492
+ }
493
+ /**
494
+ * MSIX/Auto-Update API for Windows Store apps.
495
+ *
496
+ * @example
497
+ * // Check for updates
498
+ * const update = await msixUpdate.checkForUpdates()
499
+ * if (update.isAvailable) {
500
+ * // Download and install
501
+ * await msixUpdate.downloadAndInstall({
502
+ * showProgress: true,
503
+ * restartOnComplete: true
504
+ * })
505
+ * }
506
+ */
507
+ export declare const msixUpdate: {
508
+ /**
509
+ * Get current package version.
510
+ */
511
+ getCurrentVersion(): Promise<PackageVersion | null>;
512
+ /**
513
+ * Check for updates.
514
+ */
515
+ checkForUpdates(): Promise<UpdateInfo>;
516
+ /**
517
+ * Download and install update.
518
+ */
519
+ downloadAndInstall(options?: {
520
+ showProgress?: boolean;
521
+ restartOnComplete?: boolean;
522
+ }): Promise<{
523
+ success: boolean;
524
+ error?: string;
525
+ }>;
526
+ /**
527
+ * Get download progress.
528
+ */
529
+ onDownloadProgress(handler: (progress: {
530
+ bytesDownloaded: number;
531
+ totalBytes: number;
532
+ percentage: number;
533
+ }) => void): void;
534
+ /**
535
+ * Check if running as MSIX package.
536
+ */
537
+ isPackaged(): Promise<boolean>;
538
+ /**
539
+ * Get package install location.
540
+ */
541
+ getInstallLocation(): Promise<string | null>;
542
+ };
543
+ /**
544
+ * Shared data item.
545
+ */
546
+ export interface SharedDataItem {
547
+ /** Data type */
548
+ type: 'text' | 'uri' | 'html' | 'bitmap' | 'file';
549
+ /** Text content */
550
+ text?: string;
551
+ /** URI */
552
+ uri?: string;
553
+ /** HTML content */
554
+ html?: string;
555
+ /** File path */
556
+ filePath?: string;
557
+ /** File name */
558
+ fileName?: string;
559
+ /** Content type */
560
+ contentType?: string;
561
+ }
562
+ /**
563
+ * Share Target API for Windows share integration.
564
+ *
565
+ * @example
566
+ * // Handle incoming share
567
+ * shareTarget.onShare(async (items, operation) => {
568
+ * for (const item of items) {
569
+ * if (item.type === 'uri') {
570
+ * await saveBookmark(item.uri)
571
+ * }
572
+ else if (item.type === 'file') {
573
+ * await importFile(item.filePath)
574
+ * }
575
+ * }
576
+ * operation.complete()
577
+ * })
578
+ */
579
+ export declare const shareTarget: {
580
+ /**
581
+ * Handle incoming share.
582
+ */
583
+ onShare(handler: (items: SharedDataItem[], operation: {
584
+ complete: () => void;
585
+ fail: (error: string) => void;
586
+ }) => Promise<void>): void;
587
+ /**
588
+ * Check if app was launched as share target.
589
+ */
590
+ wasLaunchedAsShareTarget(): Promise<boolean>;
591
+ /**
592
+ * Get shared data if launched as share target.
593
+ */
594
+ getSharedData(): Promise<SharedDataItem[]>;
595
+ };
596
+ /**
597
+ * Startup Task API for Windows launch at startup.
598
+ *
599
+ * @example
600
+ * // Check if startup is enabled
601
+ * const state = await startupTask.getState()
602
+ *
603
+ * // Request startup
604
+ * await startupTask.request()
605
+ *
606
+ * // Disable startup
607
+ * await startupTask.disable()
608
+ */
609
+ export declare const startupTask: {
610
+ /**
611
+ * Get current startup state.
612
+ */
613
+ getState(): Promise<"disabled" | "disabledByUser" | "enabled" | "disabledByPolicy" | "enabledByPolicy">;
614
+ /**
615
+ * Request enabling startup.
616
+ */
617
+ request(): Promise<"disabled" | "disabledByUser" | "enabled" | "disabledByPolicy" | "enabledByPolicy">;
618
+ /**
619
+ * Disable startup.
620
+ */
621
+ disable(): Promise<void>;
622
+ };
623
+ /**
624
+ * Secondary tile configuration.
625
+ */
626
+ export interface SecondaryTile {
627
+ /** Tile ID */
628
+ tileId: string;
629
+ /** Display name */
630
+ displayName: string;
631
+ /** Arguments when launched */
632
+ arguments: string;
633
+ /** Square 150x150 logo */
634
+ square150x150Logo: string;
635
+ /** Wide 310x150 logo */
636
+ wide310x150Logo?: string;
637
+ /** Square 310x310 logo */
638
+ square310x310Logo?: string;
639
+ /** Background color */
640
+ backgroundColor?: string;
641
+ /** Show name on tile */
642
+ showNameOnSquare150x150Logo?: boolean;
643
+ /** Show name on wide tile */
644
+ showNameOnWide310x150Logo?: boolean;
645
+ }
646
+ /**
647
+ * Secondary Tiles API for Windows Start menu tiles.
648
+ *
649
+ * @example
650
+ * // Pin a tile
651
+ * await secondaryTiles.pin({
652
+ * tileId: 'project-123',
653
+ * displayName: 'My Project',
654
+ * arguments: '--project 123',
655
+ * square150x150Logo: 'ms-appx:///Assets/ProjectTile.png'
656
+ * })
657
+ *
658
+ * // Check if pinned
659
+ * const isPinned = await secondaryTiles.exists('project-123')
660
+ *
661
+ * // Update tile
662
+ * await secondaryTiles.updateBadge('project-123', 5)
663
+ */
664
+ export declare const secondaryTiles: {
665
+ /**
666
+ * Check if secondary tiles are supported.
667
+ */
668
+ isSupported(): Promise<boolean>;
669
+ /**
670
+ * Pin a secondary tile.
671
+ */
672
+ pin(tile: SecondaryTile): Promise<boolean>;
673
+ /**
674
+ * Unpin a secondary tile.
675
+ */
676
+ unpin(tileId: string): Promise<boolean>;
677
+ /**
678
+ * Check if a tile exists.
679
+ */
680
+ exists(tileId: string): Promise<boolean>;
681
+ /**
682
+ * Get all pinned tiles.
683
+ */
684
+ getAll(): Promise<string[]>;
685
+ /**
686
+ * Update tile content.
687
+ */
688
+ updateTile(tileId: string, content: {
689
+ text1?: string;
690
+ text2?: string;
691
+ text3?: string;
692
+ image?: string;
693
+ }): Promise<void>;
694
+ /**
695
+ * Update tile badge.
696
+ */
697
+ updateBadge(tileId: string, value: number | "none" | "activity" | "alert" | "attention" | "available" | "away" | "busy" | "newMessage" | "paused" | "playing" | "unavailable" | "error"): Promise<void>;
698
+ /**
699
+ * Clear tile notification.
700
+ */
701
+ clearTile(tileId: string): Promise<void>;
702
+ /**
703
+ * Handle tile launch.
704
+ */
705
+ onLaunch(handler: (tileId: string, arguments_: string) => void): void;
706
+ };
707
+ declare const windowsAdvanced: {
708
+ jumpList: typeof jumpList;
709
+ taskbarProgress: typeof taskbarProgress;
710
+ toastNotifications: typeof toastNotifications;
711
+ windowsHello: typeof windowsHello;
712
+ windowsWidgets: typeof windowsWidgets;
713
+ msixUpdate: typeof msixUpdate;
714
+ shareTarget: typeof shareTarget;
715
+ startupTask: typeof startupTask;
716
+ secondaryTiles: typeof secondaryTiles;
717
+ };
718
+ export default windowsAdvanced;
719
+ //# sourceMappingURL=windows-advanced.d.ts.map