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,728 @@
1
+ /**
2
+ * Craft Native UI Components
3
+ * Type-safe bindings for native platform UI components
4
+ * @module @craft-native/components/native
5
+ */
6
+ /**
7
+ * Base component props
8
+ */
9
+ export interface ComponentProps {
10
+ /** Unique component ID */
11
+ id?: string;
12
+ /** CSS class names */
13
+ className?: string;
14
+ /** Inline styles */
15
+ style?: Record<string, any>;
16
+ /** Hidden state */
17
+ hidden?: boolean;
18
+ /** Disabled state */
19
+ disabled?: boolean;
20
+ /** Tooltip text */
21
+ tooltip?: string;
22
+ }
23
+ /**
24
+ * Component instance
25
+ */
26
+ export interface ComponentInstance {
27
+ /** Component ID */
28
+ id: string;
29
+ /** Component type */
30
+ type: string;
31
+ /** Update component properties */
32
+ update(props: Record<string, any>): Promise<void>;
33
+ /** Destroy component */
34
+ destroy(): Promise<void>;
35
+ /** Show component */
36
+ show(): Promise<void>;
37
+ /** Hide component */
38
+ hide(): Promise<void>;
39
+ /** Focus component */
40
+ focus(): Promise<void>;
41
+ /** Register event handler */
42
+ on(event: string, handler: Function): () => void;
43
+ }
44
+ /**
45
+ * Split view orientation
46
+ */
47
+ export type SplitViewOrientation = 'horizontal' | 'vertical';
48
+ /**
49
+ * Split view divider style
50
+ */
51
+ export type SplitViewDividerStyle = 'thin' | 'thick' | 'paneSplitter';
52
+ /**
53
+ * Split view configuration
54
+ */
55
+ export interface SplitViewConfig extends ComponentProps {
56
+ /** Split orientation */
57
+ orientation?: SplitViewOrientation;
58
+ /** Divider style */
59
+ dividerStyle?: SplitViewDividerStyle;
60
+ /** Initial divider position (percentage or pixels) */
61
+ position?: number;
62
+ /** Minimum position for each pane */
63
+ minPositions?: [number, number];
64
+ /** Maximum position for each pane */
65
+ maxPositions?: [number, number];
66
+ /** Autosave position with key */
67
+ autosaveName?: string;
68
+ }
69
+ /**
70
+ * Create a native split view
71
+ */
72
+ export declare function createSplitView(config?: SplitViewConfig): Promise<SplitViewInstance>;
73
+ /**
74
+ * Split view instance
75
+ */
76
+ export declare class SplitViewInstance implements ComponentInstance {
77
+ id: string;
78
+ type: string;
79
+ private _config;
80
+ private _listeners;
81
+ constructor(id: string, config: SplitViewConfig);
82
+ private _setupListeners;
83
+ private _emit;
84
+ on(event: string, handler: Function): () => void;
85
+ update(props: Partial<SplitViewConfig>): Promise<void>;
86
+ destroy(): Promise<void>;
87
+ show(): Promise<void>;
88
+ hide(): Promise<void>;
89
+ focus(): Promise<void>;
90
+ /**
91
+ * Set divider position
92
+ */
93
+ setPosition(position: number, animated?: boolean): Promise<void>;
94
+ /**
95
+ * Get current divider position
96
+ */
97
+ getPosition(): Promise<number>;
98
+ /**
99
+ * Collapse a pane
100
+ */
101
+ collapsePane(index: 0 | 1): Promise<void>;
102
+ /**
103
+ * Expand a pane
104
+ */
105
+ expandPane(index: 0 | 1): Promise<void>;
106
+ }
107
+ /**
108
+ * File browser configuration
109
+ */
110
+ export interface FileBrowserConfig extends ComponentProps {
111
+ /** Root path to browse */
112
+ rootPath?: string;
113
+ /** Show hidden files */
114
+ showHidden?: boolean;
115
+ /** Selection mode */
116
+ selectionMode?: 'single' | 'multiple' | 'none';
117
+ /** File filter */
118
+ fileFilter?: Array<{
119
+ name: string;
120
+ extensions: string[];
121
+ }>;
122
+ /** Show path bar */
123
+ showPathBar?: boolean;
124
+ /** Show toolbar */
125
+ showToolbar?: boolean;
126
+ /** Show sidebar */
127
+ showSidebar?: boolean;
128
+ /** Show preview */
129
+ showPreview?: boolean;
130
+ /** View mode */
131
+ viewMode?: 'list' | 'icon' | 'column' | 'gallery';
132
+ /** Sort by */
133
+ sortBy?: 'name' | 'date' | 'size' | 'kind';
134
+ /** Sort order */
135
+ sortOrder?: 'ascending' | 'descending';
136
+ /** Allow directory selection */
137
+ allowDirectorySelection?: boolean;
138
+ /** Allow file creation */
139
+ allowFileCreation?: boolean;
140
+ }
141
+ /**
142
+ * File browser selection
143
+ */
144
+ export interface FileBrowserSelection {
145
+ /** Selected file paths */
146
+ paths: string[];
147
+ /** Selected file info */
148
+ files: Array<{
149
+ path: string;
150
+ name: string;
151
+ isDirectory: boolean;
152
+ size: number;
153
+ modified: Date;
154
+ }>;
155
+ }
156
+ /**
157
+ * Create a native file browser
158
+ */
159
+ export declare function createFileBrowser(config?: FileBrowserConfig): Promise<FileBrowserInstance>;
160
+ /**
161
+ * File browser instance
162
+ */
163
+ export declare class FileBrowserInstance implements ComponentInstance {
164
+ id: string;
165
+ type: string;
166
+ private _config;
167
+ private _listeners;
168
+ constructor(id: string, config: FileBrowserConfig);
169
+ private _setupListeners;
170
+ private _emit;
171
+ on(event: string, handler: Function): () => void;
172
+ update(props: Partial<FileBrowserConfig>): Promise<void>;
173
+ destroy(): Promise<void>;
174
+ show(): Promise<void>;
175
+ hide(): Promise<void>;
176
+ focus(): Promise<void>;
177
+ /**
178
+ * Get current selection
179
+ */
180
+ getSelection(): Promise<FileBrowserSelection>;
181
+ /**
182
+ * Set selection
183
+ */
184
+ setSelection(paths: string[]): Promise<void>;
185
+ /**
186
+ * Navigate to path
187
+ */
188
+ navigateTo(path: string): Promise<void>;
189
+ /**
190
+ * Go back in history
191
+ */
192
+ goBack(): Promise<void>;
193
+ /**
194
+ * Go forward in history
195
+ */
196
+ goForward(): Promise<void>;
197
+ /**
198
+ * Go to parent directory
199
+ */
200
+ goUp(): Promise<void>;
201
+ /**
202
+ * Refresh content
203
+ */
204
+ refresh(): Promise<void>;
205
+ /**
206
+ * Create new folder
207
+ */
208
+ createFolder(name: string): Promise<string>;
209
+ /**
210
+ * Delete selected files
211
+ */
212
+ deleteSelection(moveToTrash?: boolean): Promise<void>;
213
+ /**
214
+ * Get current path
215
+ */
216
+ getCurrentPath(): Promise<string>;
217
+ }
218
+ /**
219
+ * Outline item
220
+ */
221
+ export interface OutlineItem {
222
+ /** Item ID */
223
+ id: string;
224
+ /** Display label */
225
+ label: string;
226
+ /** Icon */
227
+ icon?: string;
228
+ /** Children */
229
+ children?: OutlineItem[];
230
+ /** Expanded state */
231
+ expanded?: boolean;
232
+ /** Selectable */
233
+ selectable?: boolean;
234
+ /** Editable */
235
+ editable?: boolean;
236
+ /** Draggable */
237
+ draggable?: boolean;
238
+ /** Custom data */
239
+ data?: Record<string, any>;
240
+ }
241
+ /**
242
+ * Outline view configuration
243
+ */
244
+ export interface OutlineViewConfig extends ComponentProps {
245
+ /** Items */
246
+ items?: OutlineItem[];
247
+ /** Allow multiple selection */
248
+ multiSelect?: boolean;
249
+ /** Allow reordering */
250
+ allowReorder?: boolean;
251
+ /** Show expand buttons */
252
+ showExpandButtons?: boolean;
253
+ /** Row height */
254
+ rowHeight?: number;
255
+ /** Indent per level */
256
+ indentation?: number;
257
+ }
258
+ /**
259
+ * Create a native outline view (tree view)
260
+ */
261
+ export declare function createOutlineView(config?: OutlineViewConfig): Promise<OutlineViewInstance>;
262
+ /**
263
+ * Outline view instance
264
+ */
265
+ export declare class OutlineViewInstance implements ComponentInstance {
266
+ id: string;
267
+ type: string;
268
+ private _config;
269
+ private _listeners;
270
+ constructor(id: string, config: OutlineViewConfig);
271
+ private _setupListeners;
272
+ private _emit;
273
+ on(event: string, handler: Function): () => void;
274
+ update(props: Partial<OutlineViewConfig>): Promise<void>;
275
+ destroy(): Promise<void>;
276
+ show(): Promise<void>;
277
+ hide(): Promise<void>;
278
+ focus(): Promise<void>;
279
+ /**
280
+ * Set items
281
+ */
282
+ setItems(items: OutlineItem[]): Promise<void>;
283
+ /**
284
+ * Add item
285
+ */
286
+ addItem(item: OutlineItem, parentId?: string, index?: number): Promise<void>;
287
+ /**
288
+ * Update item
289
+ */
290
+ updateItem(itemId: string, updates: Partial<OutlineItem>): Promise<void>;
291
+ /**
292
+ * Remove item
293
+ */
294
+ removeItem(itemId: string): Promise<void>;
295
+ /**
296
+ * Expand item
297
+ */
298
+ expandItem(itemId: string): Promise<void>;
299
+ /**
300
+ * Collapse item
301
+ */
302
+ collapseItem(itemId: string): Promise<void>;
303
+ /**
304
+ * Select item
305
+ */
306
+ selectItem(itemId: string): Promise<void>;
307
+ /**
308
+ * Get selection
309
+ */
310
+ getSelection(): Promise<string[]>;
311
+ /**
312
+ * Scroll to item
313
+ */
314
+ scrollToItem(itemId: string): Promise<void>;
315
+ }
316
+ /**
317
+ * Table column configuration
318
+ */
319
+ export interface TableColumn {
320
+ /** Column ID */
321
+ id: string;
322
+ /** Column header title */
323
+ title: string;
324
+ /** Column width */
325
+ width?: number;
326
+ /** Minimum width */
327
+ minWidth?: number;
328
+ /** Maximum width */
329
+ maxWidth?: number;
330
+ /** Resizable */
331
+ resizable?: boolean;
332
+ /** Sortable */
333
+ sortable?: boolean;
334
+ /** Sort direction */
335
+ sortDirection?: 'ascending' | 'descending' | null;
336
+ /** Hidden */
337
+ hidden?: boolean;
338
+ /** Alignment */
339
+ alignment?: 'left' | 'center' | 'right';
340
+ /** Editable */
341
+ editable?: boolean;
342
+ }
343
+ /**
344
+ * Table row
345
+ */
346
+ export interface TableRow {
347
+ /** Row ID */
348
+ id: string;
349
+ /** Column values (column ID -> value) */
350
+ values: Record<string, any>;
351
+ /** Row selected */
352
+ selected?: boolean;
353
+ /** Row disabled */
354
+ disabled?: boolean;
355
+ /** Custom data */
356
+ data?: Record<string, any>;
357
+ }
358
+ /**
359
+ * Table view configuration
360
+ */
361
+ export interface TableViewConfig extends ComponentProps {
362
+ /** Columns */
363
+ columns?: TableColumn[];
364
+ /** Rows */
365
+ rows?: TableRow[];
366
+ /** Allow column reordering */
367
+ allowColumnReorder?: boolean;
368
+ /** Allow row selection */
369
+ allowSelection?: boolean;
370
+ /** Allow multiple selection */
371
+ multiSelect?: boolean;
372
+ /** Alternating row colors */
373
+ alternatingRows?: boolean;
374
+ /** Show column headers */
375
+ showHeaders?: boolean;
376
+ /** Row height */
377
+ rowHeight?: number;
378
+ /** Grid lines */
379
+ gridLines?: 'none' | 'horizontal' | 'vertical' | 'both';
380
+ }
381
+ /**
382
+ * Create a native table view
383
+ */
384
+ export declare function createTableView(config?: TableViewConfig): Promise<TableViewInstance>;
385
+ /**
386
+ * Table view instance
387
+ */
388
+ export declare class TableViewInstance implements ComponentInstance {
389
+ id: string;
390
+ type: string;
391
+ private _config;
392
+ private _listeners;
393
+ constructor(id: string, config: TableViewConfig);
394
+ private _setupListeners;
395
+ private _emit;
396
+ on(event: string, handler: Function): () => void;
397
+ update(props: Partial<TableViewConfig>): Promise<void>;
398
+ destroy(): Promise<void>;
399
+ show(): Promise<void>;
400
+ hide(): Promise<void>;
401
+ focus(): Promise<void>;
402
+ /**
403
+ * Set columns
404
+ */
405
+ setColumns(columns: TableColumn[]): Promise<void>;
406
+ /**
407
+ * Set rows
408
+ */
409
+ setRows(rows: TableRow[]): Promise<void>;
410
+ /**
411
+ * Add row
412
+ */
413
+ addRow(row: TableRow, index?: number): Promise<void>;
414
+ /**
415
+ * Update row
416
+ */
417
+ updateRow(rowId: string, values: Record<string, any>): Promise<void>;
418
+ /**
419
+ * Remove row
420
+ */
421
+ removeRow(rowId: string): Promise<void>;
422
+ /**
423
+ * Get selection
424
+ */
425
+ getSelection(): Promise<string[]>;
426
+ /**
427
+ * Select rows
428
+ */
429
+ selectRows(rowIds: string[]): Promise<void>;
430
+ /**
431
+ * Sort by column
432
+ */
433
+ sortBy(columnId: string, direction: 'ascending' | 'descending'): Promise<void>;
434
+ /**
435
+ * Scroll to row
436
+ */
437
+ scrollToRow(rowId: string): Promise<void>;
438
+ }
439
+ /**
440
+ * Quick Look configuration
441
+ */
442
+ export interface QuickLookConfig {
443
+ /** File path to preview */
444
+ path: string;
445
+ /** Panel position */
446
+ position?: {
447
+ x: number;
448
+ y: number;
449
+ };
450
+ /** Panel size */
451
+ size?: {
452
+ width: number;
453
+ height: number;
454
+ };
455
+ }
456
+ /**
457
+ * Show Quick Look preview for a file
458
+ */
459
+ export declare function showQuickLook(config: QuickLookConfig): Promise<void>;
460
+ /**
461
+ * Hide Quick Look preview
462
+ */
463
+ export declare function hideQuickLook(): Promise<void>;
464
+ /**
465
+ * Check if Quick Look is available for a file
466
+ */
467
+ export declare function canQuickLook(path: string): Promise<boolean>;
468
+ /**
469
+ * Color picker configuration
470
+ */
471
+ export interface ColorPickerConfig {
472
+ /** Initial color (hex, rgb, or named) */
473
+ color?: string;
474
+ /** Show alpha slider */
475
+ showAlpha?: boolean;
476
+ /** Mode */
477
+ mode?: 'wheel' | 'sliders' | 'palette' | 'list';
478
+ /** Title */
479
+ title?: string;
480
+ }
481
+ /**
482
+ * Show native color picker
483
+ */
484
+ export declare function showColorPicker(config?: ColorPickerConfig): Promise<string | null>;
485
+ /**
486
+ * Font picker configuration
487
+ */
488
+ export interface FontPickerConfig {
489
+ /** Initial font */
490
+ font?: {
491
+ family: string;
492
+ size: number;
493
+ weight?: string;
494
+ style?: string;
495
+ };
496
+ /** Title */
497
+ title?: string;
498
+ /** Show size picker */
499
+ showSize?: boolean;
500
+ /** Show weight picker */
501
+ showWeight?: boolean;
502
+ /** Show style picker */
503
+ showStyle?: boolean;
504
+ }
505
+ /**
506
+ * Font result
507
+ */
508
+ export interface FontResult {
509
+ family: string;
510
+ size: number;
511
+ weight?: string;
512
+ style?: string;
513
+ }
514
+ /**
515
+ * Show native font picker
516
+ */
517
+ export declare function showFontPicker(config?: FontPickerConfig): Promise<FontResult | null>;
518
+ /**
519
+ * Date picker configuration
520
+ */
521
+ export interface DatePickerConfig {
522
+ /** Initial date */
523
+ date?: Date | string;
524
+ /** Minimum date */
525
+ minDate?: Date | string;
526
+ /** Maximum date */
527
+ maxDate?: Date | string;
528
+ /** Date format */
529
+ format?: string;
530
+ /** Show time picker */
531
+ showTime?: boolean;
532
+ /** Calendar style */
533
+ style?: 'default' | 'graphical';
534
+ }
535
+ /**
536
+ * Show native date picker
537
+ */
538
+ export declare function showDatePicker(config?: DatePickerConfig): Promise<Date | null>;
539
+ /**
540
+ * Progress indicator configuration
541
+ */
542
+ export interface ProgressConfig extends ComponentProps {
543
+ /** Progress value (0-1 for determinate, undefined for indeterminate) */
544
+ value?: number;
545
+ /** Minimum value */
546
+ min?: number;
547
+ /** Maximum value */
548
+ max?: number;
549
+ /** Show as percentage text */
550
+ showText?: boolean;
551
+ /** Inline styles */
552
+ style?: Record<string, any>;
553
+ /** Size */
554
+ size?: 'small' | 'regular' | 'large';
555
+ /** Progress style variant */
556
+ progressStyle?: 'bar' | 'spinning' | 'circular';
557
+ }
558
+ /**
559
+ * Create a progress indicator
560
+ */
561
+ export declare function createProgress(config?: ProgressConfig): Promise<ProgressInstance>;
562
+ /**
563
+ * Progress instance
564
+ */
565
+ export declare class ProgressInstance implements ComponentInstance {
566
+ id: string;
567
+ type: string;
568
+ private _config;
569
+ private _listeners;
570
+ constructor(id: string, config: ProgressConfig);
571
+ on(event: string, handler: Function): () => void;
572
+ update(props: Partial<ProgressConfig>): Promise<void>;
573
+ destroy(): Promise<void>;
574
+ show(): Promise<void>;
575
+ hide(): Promise<void>;
576
+ focus(): Promise<void>;
577
+ /**
578
+ * Set progress value
579
+ */
580
+ setValue(value: number): Promise<void>;
581
+ /**
582
+ * Start indeterminate animation
583
+ */
584
+ startAnimation(): Promise<void>;
585
+ /**
586
+ * Stop animation
587
+ */
588
+ stopAnimation(): Promise<void>;
589
+ }
590
+ /**
591
+ * Toolbar item
592
+ */
593
+ export interface ToolbarItem {
594
+ /** Item ID */
595
+ id: string;
596
+ /** Item type */
597
+ type?: 'button' | 'toggle' | 'segment' | 'search' | 'space' | 'flexibleSpace' | 'separator' | 'group';
598
+ /** Label */
599
+ label?: string;
600
+ /** Icon (SF Symbol or path) */
601
+ icon?: string;
602
+ /** Tooltip */
603
+ tooltip?: string;
604
+ /** Enabled */
605
+ enabled?: boolean;
606
+ /** Selected (for toggle) */
607
+ selected?: boolean;
608
+ /** Min width (for search) */
609
+ minWidth?: number;
610
+ /** Max width (for search) */
611
+ maxWidth?: number;
612
+ /** Segments (for segment control) */
613
+ segments?: Array<{
614
+ id: string;
615
+ label?: string;
616
+ icon?: string;
617
+ }>;
618
+ /** Items (for group) */
619
+ items?: ToolbarItem[];
620
+ }
621
+ /**
622
+ * Toolbar configuration
623
+ */
624
+ export interface ToolbarConfig {
625
+ /** Toolbar items */
626
+ items?: ToolbarItem[];
627
+ /** Default item identifiers */
628
+ defaultItems?: string[];
629
+ /** Allow customization */
630
+ allowsCustomization?: boolean;
631
+ /** Display mode */
632
+ displayMode?: 'default' | 'iconOnly' | 'labelOnly' | 'iconAndLabel';
633
+ /** Size mode */
634
+ sizeMode?: 'default' | 'small' | 'regular';
635
+ /** Show separator below toolbar */
636
+ showBottomBorder?: boolean;
637
+ }
638
+ /**
639
+ * Set window toolbar
640
+ */
641
+ export declare function setToolbar(config: ToolbarConfig): Promise<void>;
642
+ /**
643
+ * Update toolbar item
644
+ */
645
+ export declare function updateToolbarItem(itemId: string, updates: Partial<ToolbarItem>): Promise<void>;
646
+ /**
647
+ * Show/hide toolbar
648
+ */
649
+ export declare function setToolbarVisible(visible: boolean): Promise<void>;
650
+ /**
651
+ * Touch Bar item
652
+ */
653
+ export interface TouchBarItem {
654
+ /** Item ID */
655
+ id: string;
656
+ /** Item type */
657
+ type: 'button' | 'label' | 'slider' | 'colorPicker' | 'popover' | 'group' | 'segmentedControl' | 'scrubber' | 'spacer';
658
+ /** Label text */
659
+ label?: string;
660
+ /** Icon */
661
+ icon?: string;
662
+ /** Background color */
663
+ backgroundColor?: string;
664
+ /** Text color */
665
+ textColor?: string;
666
+ /** Enabled */
667
+ enabled?: boolean;
668
+ /** Width */
669
+ width?: number;
670
+ /** Items (for group/popover) */
671
+ items?: TouchBarItem[];
672
+ /** Segments (for segmented control) */
673
+ segments?: Array<{
674
+ id: string;
675
+ label?: string;
676
+ icon?: string;
677
+ }>;
678
+ /** Min value (for slider) */
679
+ min?: number;
680
+ /** Max value (for slider) */
681
+ max?: number;
682
+ /** Value (for slider) */
683
+ value?: number;
684
+ /** Spacer size */
685
+ size?: 'small' | 'large' | 'flexible';
686
+ }
687
+ /**
688
+ * Touch Bar configuration
689
+ */
690
+ export interface TouchBarConfig {
691
+ /** Touch Bar items */
692
+ items?: TouchBarItem[];
693
+ /** Escape item */
694
+ escapeItem?: TouchBarItem;
695
+ }
696
+ /**
697
+ * Set Touch Bar
698
+ */
699
+ export declare function setTouchBar(config: TouchBarConfig): Promise<void>;
700
+ /**
701
+ * Update Touch Bar item
702
+ */
703
+ export declare function updateTouchBarItem(itemId: string, updates: Partial<TouchBarItem>): Promise<void>;
704
+ declare const nativeComponents: {
705
+ createSplitView: typeof createSplitView;
706
+ SplitViewInstance: typeof SplitViewInstance;
707
+ createFileBrowser: typeof createFileBrowser;
708
+ FileBrowserInstance: typeof FileBrowserInstance;
709
+ createOutlineView: typeof createOutlineView;
710
+ OutlineViewInstance: typeof OutlineViewInstance;
711
+ createTableView: typeof createTableView;
712
+ TableViewInstance: typeof TableViewInstance;
713
+ showQuickLook: typeof showQuickLook;
714
+ hideQuickLook: typeof hideQuickLook;
715
+ canQuickLook: typeof canQuickLook;
716
+ showColorPicker: typeof showColorPicker;
717
+ showFontPicker: typeof showFontPicker;
718
+ showDatePicker: typeof showDatePicker;
719
+ createProgress: typeof createProgress;
720
+ ProgressInstance: typeof ProgressInstance;
721
+ setToolbar: typeof setToolbar;
722
+ updateToolbarItem: typeof updateToolbarItem;
723
+ setToolbarVisible: typeof setToolbarVisible;
724
+ setTouchBar: typeof setTouchBar;
725
+ updateTouchBarItem: typeof updateTouchBarItem;
726
+ };
727
+ export default nativeComponents;
728
+ //# sourceMappingURL=native.d.ts.map