@geastack/apple 0.2.8

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 (113) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +54 -0
  3. package/dist/index.d.ts +127 -0
  4. package/dist/index.js +3076 -0
  5. package/generated/AVFoundation.d.ts +112 -0
  6. package/generated/ActivityKit.d.ts +7 -0
  7. package/generated/AppKit.d.ts +268 -0
  8. package/generated/CoreGraphics.d.ts +18 -0
  9. package/generated/CoreLocation.d.ts +28 -0
  10. package/generated/CoreMedia.d.ts +8 -0
  11. package/generated/Dispatch.d.ts +2 -0
  12. package/generated/Foundation.d.ts +13 -0
  13. package/generated/MapKit.d.ts +28 -0
  14. package/generated/Metal.d.ts +91 -0
  15. package/generated/MetalKit.d.ts +22 -0
  16. package/generated/Photos.d.ts +5 -0
  17. package/generated/QuartzCore.d.ts +12 -0
  18. package/generated/SwiftData.d.ts +11 -0
  19. package/generated/UIKit.d.ts +187 -0
  20. package/package.json +123 -0
  21. package/runtime/AVFoundation.js +136 -0
  22. package/runtime/ActivityKit.js +18 -0
  23. package/runtime/AppKit.js +313 -0
  24. package/runtime/CoreGraphics.js +15 -0
  25. package/runtime/CoreLocation.js +30 -0
  26. package/runtime/CoreMedia.js +7 -0
  27. package/runtime/Dispatch.js +11 -0
  28. package/runtime/Foundation.js +21 -0
  29. package/runtime/MapKit.js +22 -0
  30. package/runtime/Metal.js +126 -0
  31. package/runtime/MetalKit.js +15 -0
  32. package/runtime/Photos.js +9 -0
  33. package/runtime/QuartzCore.js +9 -0
  34. package/runtime/SwiftData.js +29 -0
  35. package/runtime/UIKit.js +242 -0
  36. package/runtime/empty.js +1 -0
  37. package/targets/ios/Info.plist.in +25 -0
  38. package/targets/ios/README.md +46 -0
  39. package/targets/ios/build-ios.sh +395 -0
  40. package/targets/ios/detect-development-team.mjs +109 -0
  41. package/targets/ios/generate-resident-entry.mjs +67 -0
  42. package/targets/ios/generate-resident-registry.mjs +162 -0
  43. package/targets/ios/generate-xcode-project.mjs +520 -0
  44. package/targets/ios/main/canvas_view.h +7 -0
  45. package/targets/ios/main/canvas_view.mm +94 -0
  46. package/targets/ios/main/font_registry.h +17 -0
  47. package/targets/ios/main/font_registry.mm +129 -0
  48. package/targets/ios/main/image_bridge.h +13 -0
  49. package/targets/ios/main/image_bridge.mm +53 -0
  50. package/targets/ios/main/ios_apps.c +28 -0
  51. package/targets/ios/main/ios_camera.mm +446 -0
  52. package/targets/ios/main/ios_display.mm +344 -0
  53. package/targets/ios/main/ios_main.mm +811 -0
  54. package/targets/ios/main/ios_memory.cpp +55 -0
  55. package/targets/ios/main/ios_renderer.h +20 -0
  56. package/targets/ios/main/ios_renderer.mm +27 -0
  57. package/targets/ios/main/ios_root_background.cpp +20 -0
  58. package/targets/ios/main/ios_root_background.h +11 -0
  59. package/targets/ios/main/ios_sensors.mm +244 -0
  60. package/targets/ios/main/ios_timers.mm +53 -0
  61. package/targets/ios/main/renderer/ios_renderer_internal.h +65 -0
  62. package/targets/ios/main/renderer/ios_renderer_support.mm +111 -0
  63. package/targets/ios/main/renderer/native_button.mm +179 -0
  64. package/targets/ios/main/renderer/native_label.mm +161 -0
  65. package/targets/ios/main/renderer/native_scroll_container.mm +279 -0
  66. package/targets/ios/main/renderer/view_reconciler.mm +274 -0
  67. package/targets/macos/Info.plist.in +26 -0
  68. package/targets/macos/README.md +131 -0
  69. package/targets/macos/build-child-lifecycle.sh +119 -0
  70. package/targets/macos/build-macos.sh +2156 -0
  71. package/targets/macos/check-module-graph-freshness.mjs +82 -0
  72. package/targets/macos/compiler-input-fingerprint.mjs +32 -0
  73. package/targets/macos/finalize-apple-native-output.mjs +77 -0
  74. package/targets/macos/generate-resident-entry.mjs +80 -0
  75. package/targets/macos/generate-resident-registry.mjs +141 -0
  76. package/targets/macos/heavy-build-lock.sh +176 -0
  77. package/targets/macos/main/canvas_view.h +9 -0
  78. package/targets/macos/main/canvas_view.mm +176 -0
  79. package/targets/macos/main/color_convert.h +18 -0
  80. package/targets/macos/main/color_convert.mm +39 -0
  81. package/targets/macos/main/font_registry.h +35 -0
  82. package/targets/macos/main/font_registry.mm +350 -0
  83. package/targets/macos/main/image_bridge.h +16 -0
  84. package/targets/macos/main/image_bridge.mm +52 -0
  85. package/targets/macos/main/macos_app_platform.mm +95 -0
  86. package/targets/macos/main/macos_apps.c +31 -0
  87. package/targets/macos/main/macos_device_control.mm +56 -0
  88. package/targets/macos/main/macos_display.mm +484 -0
  89. package/targets/macos/main/macos_host_device_control.mm +95 -0
  90. package/targets/macos/main/macos_main.mm +839 -0
  91. package/targets/macos/main/macos_memory.cpp +31 -0
  92. package/targets/macos/main/macos_native_shell.h +31 -0
  93. package/targets/macos/main/macos_native_shell.mm +396 -0
  94. package/targets/macos/main/macos_network.mm +253 -0
  95. package/targets/macos/main/macos_renderer.h +39 -0
  96. package/targets/macos/main/macos_renderer.mm +1969 -0
  97. package/targets/macos/main/macos_sensors.cpp +148 -0
  98. package/targets/macos/main/macos_smoke_app.cpp +65 -0
  99. package/targets/macos/main/macos_timers.mm +52 -0
  100. package/targets/macos/main/press_bridge.h +21 -0
  101. package/targets/macos/main/press_bridge.mm +72 -0
  102. package/targets/macos/main/thermalright_hid_display.h +14 -0
  103. package/targets/macos/main/thermalright_hid_display.mm +995 -0
  104. package/targets/macos/native-artifact-provenance.mjs +421 -0
  105. package/targets/macos/order-compile-edges.mjs +64 -0
  106. package/targets/macos/preflight-hard-muted-artifact.mjs +93 -0
  107. package/targets/macos/prune-generated-modules.mjs +147 -0
  108. package/targets/macos/sync-resources.mjs +153 -0
  109. package/targets/shared/analyze-audio-capture.mjs +131 -0
  110. package/targets/shared/apple_audio.mm +1194 -0
  111. package/targets/shared/apple_audio_selftest.mm +602 -0
  112. package/targets/shared/apple_audio_testing.h +34 -0
  113. package/targets/shared/build-audio-selftest.sh +50 -0
@@ -0,0 +1,112 @@
1
+ import type { CGRect, CGPoint } from '@geastack/apple/CoreGraphics'
2
+ import type { CMTime } from '@geastack/apple/CoreMedia'
3
+ import type { NSData, NSObject } from '@geastack/apple/Foundation'
4
+ import type { CALayer } from '@geastack/apple/QuartzCore'
5
+
6
+ export declare const AVMediaTypeVideo: string
7
+ export declare const AVLayerVideoGravityResizeAspectFill: string
8
+ export declare const AVCaptureSessionPresetPhoto: string
9
+ export declare const AVCaptureSessionPresetHigh: string
10
+ export declare const AVCaptureSessionPresetMedium: string
11
+ export declare const AVCaptureFocusModeLocked: number
12
+ export declare const AVCaptureFocusModeAutoFocus: number
13
+ export declare const AVCaptureFocusModeContinuousAutoFocus: number
14
+ export declare const AVCaptureExposureModeLocked: number
15
+ export declare const AVCaptureExposureModeAutoExpose: number
16
+ export declare const AVCaptureExposureModeContinuousAutoExposure: number
17
+ export declare const AVCaptureExposureModeCustom: number
18
+ export declare const AVCaptureWhiteBalanceModeLocked: number
19
+ export declare const AVCaptureWhiteBalanceModeAutoWhiteBalance: number
20
+ export declare const AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance: number
21
+ export declare const AVCaptureFlashModeOff: number
22
+ export declare const AVCaptureFlashModeOn: number
23
+ export declare const AVCaptureFlashModeAuto: number
24
+ export declare const AVCapturePhotoQualityPrioritizationSpeed: number
25
+ export declare const AVCapturePhotoQualityPrioritizationBalanced: number
26
+ export declare const AVCapturePhotoQualityPrioritizationQuality: number
27
+ export declare const AVCaptureDevicePositionUnspecified: number
28
+ export declare const AVCaptureDevicePositionBack: number
29
+ export declare const AVCaptureDevicePositionFront: number
30
+ export declare const AVCaptureDeviceTypeBuiltInWideAngleCamera: string
31
+ export declare const AVCaptureDeviceTypeBuiltInUltraWideCamera: string
32
+ export declare const AVCaptureDeviceTypeBuiltInTelephotoCamera: string
33
+ export declare const AVCaptureDeviceTypeBuiltInDualCamera: string
34
+ export declare const AVCaptureDeviceTypeBuiltInDualWideCamera: string
35
+ export declare const AVCaptureDeviceTypeBuiltInTripleCamera: string
36
+
37
+ export declare class AVCaptureInput extends NSObject {
38
+ }
39
+
40
+ export declare class AVCaptureOutput extends NSObject {
41
+ }
42
+
43
+ export declare class AVCaptureDeviceFormat extends NSObject {
44
+ readonly minISO: number
45
+ readonly maxISO: number
46
+ readonly videoMaxZoomFactor: number
47
+ }
48
+
49
+ export declare class AVCaptureDevice extends NSObject {
50
+ readonly activeFormat: AVCaptureDeviceFormat
51
+ videoZoomFactor: number
52
+ readonly minAvailableVideoZoomFactor: number
53
+ readonly maxAvailableVideoZoomFactor: number
54
+ focusPointOfInterest: CGPoint
55
+ focusMode: number
56
+ readonly isFocusPointOfInterestSupported: boolean
57
+ exposurePointOfInterest: CGPoint
58
+ exposureMode: number
59
+ readonly isExposurePointOfInterestSupported: boolean
60
+ readonly exposureTargetBias: number
61
+ readonly minExposureTargetBias: number
62
+ readonly maxExposureTargetBias: number
63
+ readonly ISO: number
64
+ whiteBalanceMode: number
65
+ readonly hasFlash: boolean
66
+ readonly virtualDeviceSwitchOverVideoZoomFactors: number[]
67
+ static defaultDeviceWithMediaType(mediaType: string): AVCaptureDevice | null
68
+ static defaultDeviceWithDeviceTypeMediaTypePosition(deviceType: string, mediaType: string, position: number): AVCaptureDevice | null
69
+ lockForConfiguration(): boolean
70
+ unlockForConfiguration(): void
71
+ isFocusModeSupported(focusMode: number): boolean
72
+ isExposureModeSupported(exposureMode: number): boolean
73
+ isWhiteBalanceModeSupported(whiteBalanceMode: number): boolean
74
+ isFlashModeSupported(flashMode: number): boolean
75
+ setExposureTargetBiasCompletionHandler(bias: number, handler: (syncTime: CMTime) => void): void
76
+ setExposureModeCustomWithDurationISOCompletionHandler(duration: CMTime, ISO: number, handler: (syncTime: CMTime) => void): void
77
+ }
78
+
79
+ export declare class AVCaptureDeviceInput extends AVCaptureInput {
80
+ static deviceInputWithDevice(device: AVCaptureDevice): AVCaptureDeviceInput | null
81
+ }
82
+
83
+ export declare class AVCaptureSession extends NSObject {
84
+ constructor()
85
+ sessionPreset: string
86
+ beginConfiguration(): void
87
+ commitConfiguration(): void
88
+ canAddInput(input: AVCaptureInput): boolean
89
+ canSetSessionPreset(preset: string): boolean
90
+ addInput(input: AVCaptureInput): void
91
+ canAddOutput(output: AVCaptureOutput): boolean
92
+ addOutput(output: AVCaptureOutput): void
93
+ startRunning(): void
94
+ stopRunning(): void
95
+ }
96
+
97
+ export declare class AVCapturePhotoSettings extends NSObject {
98
+ flashMode: number
99
+ photoQualityPrioritization: number
100
+ static photoSettings(): AVCapturePhotoSettings
101
+ }
102
+
103
+ export declare class AVCapturePhotoOutput extends AVCaptureOutput {
104
+ constructor()
105
+ maxPhotoQualityPrioritization: number
106
+ capturePhotoWithSettingsHandler(settings: AVCapturePhotoSettings, handler: (data: NSData, error: string) => void): void
107
+ }
108
+
109
+ export declare class AVCaptureVideoPreviewLayer extends CALayer {
110
+ videoGravity: string
111
+ static layerWithSession(session: AVCaptureSession): AVCaptureVideoPreviewLayer
112
+ }
@@ -0,0 +1,7 @@
1
+ export declare function requestLiveActivity(attributesJSON: string, contentStateJSON: string): LiveActivityHandle
2
+ export declare function updateLiveActivity(activity: LiveActivityHandle, contentStateJSON: string): void
3
+ export declare function endLiveActivity(activity: LiveActivityHandle): void
4
+
5
+ export declare class LiveActivityHandle {
6
+ readonly id: string
7
+ }
@@ -0,0 +1,268 @@
1
+ import type { NSObject } from '@geastack/apple/Foundation'
2
+ import type { CGRect } from '@geastack/apple/CoreGraphics'
3
+ import type { CALayer } from '@geastack/apple/QuartzCore'
4
+
5
+ export type Selector = string
6
+
7
+ export declare const NSViewNotSizable: number
8
+ export declare const NSViewWidthSizable: number
9
+ export declare const NSViewHeightSizable: number
10
+ export declare const NSViewMinXMargin: number
11
+ export declare const NSViewMaxXMargin: number
12
+ export declare const NSViewMinYMargin: number
13
+ export declare const NSViewMaxYMargin: number
14
+ export declare const NSVisualEffectMaterialSidebar: number
15
+ export declare const NSVisualEffectMaterialHeaderView: number
16
+ export declare const NSVisualEffectMaterialContentBackground: number
17
+ export declare const NSVisualEffectMaterialUnderWindowBackground: number
18
+ export declare const NSVisualEffectBlendingModeBehindWindow: number
19
+ export declare const NSVisualEffectBlendingModeWithinWindow: number
20
+ export declare const NSVisualEffectStateFollowsWindowActiveState: number
21
+ export declare const NSVisualEffectStateActive: number
22
+ export declare const NSVisualEffectStateInactive: number
23
+ export declare const NSSplitViewDividerStyleThick: number
24
+ export declare const NSSplitViewDividerStyleThin: number
25
+ export declare const NSSplitViewDividerStylePaneSplitter: number
26
+ export declare const NSTextAlignmentLeft: number
27
+ export declare const NSTextAlignmentRight: number
28
+ export declare const NSTextAlignmentCenter: number
29
+ export declare const NSLineBreakByWordWrapping: number
30
+ export declare const NSLineBreakByTruncatingTail: number
31
+ export declare const NSUserInterfaceLayoutOrientationHorizontal: number
32
+ export declare const NSUserInterfaceLayoutOrientationVertical: number
33
+ export declare const NSStackViewDistributionFill: number
34
+ export declare const NSStackViewDistributionFillEqually: number
35
+ export declare const NSStackViewDistributionFillProportionally: number
36
+ export declare const NSStackViewDistributionEqualSpacing: number
37
+ export declare const NSStackViewDistributionEqualCentering: number
38
+ export declare const NSStackViewDistributionGravityAreas: number
39
+ export declare const NSLayoutAttributeLeft: number
40
+ export declare const NSLayoutAttributeRight: number
41
+ export declare const NSLayoutAttributeTop: number
42
+ export declare const NSLayoutAttributeBottom: number
43
+ export declare const NSLayoutAttributeLeading: number
44
+ export declare const NSLayoutAttributeTrailing: number
45
+ export declare const NSLayoutAttributeWidth: number
46
+ export declare const NSLayoutAttributeHeight: number
47
+ export declare const NSLayoutAttributeCenterX: number
48
+ export declare const NSLayoutAttributeCenterY: number
49
+ export declare const NSLayoutConstraintOrientationHorizontal: number
50
+ export declare const NSLayoutConstraintOrientationVertical: number
51
+ export declare const NSLayoutPriorityRequired: number
52
+ export declare const NSLayoutPriorityDefaultHigh: number
53
+ export declare const NSLayoutPriorityDefaultLow: number
54
+ export declare const NSBoxCustom: number
55
+ export declare const ObjCTargetAction: Selector
56
+
57
+ export declare function installRootView(view: NSView): void
58
+ export declare function installRootViewController(viewController: NSViewController): void
59
+ export declare function installToolbar(spec: string, newNoteTarget: NSObject | null): void
60
+ export declare function setScrollDocumentTopAligned(scrollView: NSScrollView, content: NSView): void
61
+ export declare function runDeviceCommand(command: string): string
62
+
63
+ export declare class NSColor extends NSObject {
64
+ static whiteColor(): NSColor
65
+ static blackColor(): NSColor
66
+ static clearColor(): NSColor
67
+ static labelColor(): NSColor
68
+ static secondaryLabelColor(): NSColor
69
+ static tertiaryLabelColor(): NSColor
70
+ static textColor(): NSColor
71
+ static controlBackgroundColor(): NSColor
72
+ static windowBackgroundColor(): NSColor
73
+ static separatorColor(): NSColor
74
+ static controlAccentColor(): NSColor
75
+ static systemBlueColor(): NSColor
76
+ static systemYellowColor(): NSColor
77
+ static colorWithSRGBRedGreenBlueAlpha(red: number, green: number, blue: number, alpha: number): NSColor
78
+ static colorWithWhiteAlpha(white: number, alpha: number): NSColor
79
+ }
80
+
81
+ export declare class NSLayoutConstraint extends NSObject {
82
+ active: boolean
83
+ }
84
+
85
+ export declare class NSLayoutXAxisAnchor extends NSObject {
86
+ constraintEqualToAnchor(anchor: NSLayoutXAxisAnchor): NSLayoutConstraint
87
+ constraintEqualToAnchorConstant(anchor: NSLayoutXAxisAnchor, constant: number): NSLayoutConstraint
88
+ }
89
+
90
+ export declare class NSLayoutYAxisAnchor extends NSObject {
91
+ constraintEqualToAnchor(anchor: NSLayoutYAxisAnchor): NSLayoutConstraint
92
+ constraintEqualToAnchorConstant(anchor: NSLayoutYAxisAnchor, constant: number): NSLayoutConstraint
93
+ }
94
+
95
+ export declare class NSLayoutDimension extends NSObject {
96
+ constraintEqualToAnchor(anchor: NSLayoutDimension): NSLayoutConstraint
97
+ constraintEqualToConstant(constant: number): NSLayoutConstraint
98
+ constraintEqualToAnchorMultiplier(anchor: NSLayoutDimension, multiplier: number): NSLayoutConstraint
99
+ }
100
+
101
+ export declare class NSLayoutGuide extends NSObject {
102
+ readonly leadingAnchor: NSLayoutXAxisAnchor
103
+ readonly trailingAnchor: NSLayoutXAxisAnchor
104
+ readonly topAnchor: NSLayoutYAxisAnchor
105
+ readonly bottomAnchor: NSLayoutYAxisAnchor
106
+ }
107
+
108
+ export declare class ObjCTarget {
109
+ static create(callback: () => void): NSObject
110
+ }
111
+
112
+ export declare class NSClickGestureRecognizer extends NSObject {
113
+ constructor(target: NSObject | null, action: Selector)
114
+ numberOfClicksRequired: number
115
+ }
116
+
117
+ export declare class NSView extends NSObject {
118
+ constructor()
119
+ frame: CGRect
120
+ readonly bounds: CGRect
121
+ wantsLayer: boolean
122
+ readonly layer: CALayer
123
+ hidden: boolean
124
+ alphaValue: number
125
+ autoresizingMask: number
126
+ translatesAutoresizingMaskIntoConstraints: boolean
127
+ readonly leadingAnchor: NSLayoutXAxisAnchor
128
+ readonly trailingAnchor: NSLayoutXAxisAnchor
129
+ readonly centerXAnchor: NSLayoutXAxisAnchor
130
+ readonly topAnchor: NSLayoutYAxisAnchor
131
+ readonly bottomAnchor: NSLayoutYAxisAnchor
132
+ readonly centerYAnchor: NSLayoutYAxisAnchor
133
+ readonly widthAnchor: NSLayoutDimension
134
+ readonly heightAnchor: NSLayoutDimension
135
+ readonly safeAreaLayoutGuide: NSLayoutGuide
136
+ addSubview(view: NSView): void
137
+ addGestureRecognizer(recognizer: NSObject): void
138
+ setContentHuggingPriorityForOrientation(priority: number, orientation: number): void
139
+ setContentCompressionResistancePriorityForOrientation(priority: number, orientation: number): void
140
+ }
141
+
142
+ export declare class NSControl extends NSView {
143
+ target: NSObject | null
144
+ action: Selector
145
+ enabled: boolean
146
+ }
147
+
148
+ export declare class NSBox extends NSView {
149
+ constructor()
150
+ boxType: number
151
+ borderWidth: number
152
+ cornerRadius: number
153
+ fillColor: NSColor | null
154
+ borderColor: NSColor | null
155
+ titlePosition: number
156
+ contentView: NSView | null
157
+ }
158
+
159
+ export declare class NSStackView extends NSView {
160
+ constructor()
161
+ orientation: number
162
+ spacing: number
163
+ alignment: number
164
+ distribution: number
165
+ detachesHiddenViews: boolean
166
+ addArrangedSubview(view: NSView): void
167
+ insertArrangedSubviewAtIndex(view: NSView, index: number): void
168
+ setHuggingPriorityForOrientation(priority: number, orientation: number): void
169
+ }
170
+
171
+ export declare class NSTextField extends NSView {
172
+ constructor()
173
+ stringValue: string
174
+ placeholderString: string
175
+ editable: boolean
176
+ selectable: boolean
177
+ bezeled: boolean
178
+ bordered: boolean
179
+ drawsBackground: boolean
180
+ backgroundColor: NSColor | null
181
+ textColor: NSColor | null
182
+ font: NSFont | null
183
+ alignment: number
184
+ lineBreakMode: number
185
+ maximumNumberOfLines: number
186
+ attachTextDelegate(delegate: NSObject | null): void
187
+ }
188
+
189
+ export declare class NSFont extends NSObject {
190
+ static systemFontOfSize(fontSize: number): NSFont
191
+ static boldSystemFontOfSize(fontSize: number): NSFont
192
+ static systemFontOfSizeWeight(fontSize: number, weight: number): NSFont
193
+ }
194
+
195
+ export declare class NSVisualEffectView extends NSView {
196
+ constructor()
197
+ material: number
198
+ blendingMode: number
199
+ state: number
200
+ emphasized: boolean
201
+ }
202
+
203
+ export declare class NSScrollView extends NSView {
204
+ constructor()
205
+ documentView: NSView | null
206
+ hasVerticalScroller: boolean
207
+ hasHorizontalScroller: boolean
208
+ drawsBackground: boolean
209
+ automaticallyAdjustsContentInsets: boolean
210
+ }
211
+
212
+ export declare class NSSplitView extends NSView {
213
+ constructor()
214
+ vertical: boolean
215
+ dividerStyle: number
216
+ addArrangedSubview(view: NSView): void
217
+ adjustSubviews(): void
218
+ setPositionOfDividerAtIndex(position: number, dividerIndex: number): void
219
+ }
220
+
221
+ export declare class NSTextView extends NSView {
222
+ constructor()
223
+ string: string
224
+ editable: boolean
225
+ selectable: boolean
226
+ drawsBackground: boolean
227
+ backgroundColor: NSColor | null
228
+ textColor: NSColor | null
229
+ font: NSFont | null
230
+ attachTextDelegate(delegate: NSObject | null): void
231
+ }
232
+
233
+ export declare class NSImage extends NSObject {
234
+ static imageWithSystemSymbolNameAccessibilityDescription(symbolName: string, accessibilityDescription: string): NSImage | null
235
+ }
236
+
237
+ export declare class NSImageView extends NSView {
238
+ constructor()
239
+ image: NSImage | null
240
+ contentTintColor: NSColor | null
241
+ }
242
+
243
+ export declare class NSButton extends NSControl {
244
+ constructor()
245
+ title: string
246
+ bordered: boolean
247
+ }
248
+
249
+ export declare class NSViewController extends NSObject {
250
+ constructor()
251
+ view: NSView
252
+ title: string
253
+ }
254
+
255
+ export declare class NSSplitViewController extends NSViewController {
256
+ constructor()
257
+ addSplitViewItem(item: NSSplitViewItem): void
258
+ }
259
+
260
+ export declare class NSSplitViewItem extends NSObject {
261
+ minimumThickness: number
262
+ maximumThickness: number
263
+ canCollapse: boolean
264
+ preferredThicknessFraction: number
265
+ static sidebarWithViewController(viewController: NSViewController): NSSplitViewItem
266
+ static contentListWithViewController(viewController: NSViewController): NSSplitViewItem
267
+ static splitViewItemWithViewController(viewController: NSViewController): NSSplitViewItem
268
+ }
@@ -0,0 +1,18 @@
1
+ export declare function CGRectMake(x: number, y: number, width: number, height: number): CGRect
2
+ export declare function CGPointMake(x: number, y: number): CGPoint
3
+ export declare function CGSizeMake(width: number, height: number): CGSize
4
+
5
+ export interface CGPoint {
6
+ x: number
7
+ y: number
8
+ }
9
+
10
+ export interface CGSize {
11
+ width: number
12
+ height: number
13
+ }
14
+
15
+ export interface CGRect {
16
+ origin: CGPoint
17
+ size: CGSize
18
+ }
@@ -0,0 +1,28 @@
1
+ import type { NSObject } from '@geastack/apple/Foundation'
2
+
3
+ export declare const kCLLocationAccuracyBest: number
4
+ export declare const CLDistanceFilterNone: number
5
+ export declare const CLAuthorizationStatusNotDetermined: number
6
+ export declare const CLAuthorizationStatusAuthorizedWhenInUse: number
7
+
8
+ export declare function CLLocationCoordinate2DMake(latitude: number, longitude: number): CLLocationCoordinate2D
9
+
10
+ export interface CLLocationCoordinate2D {
11
+ latitude: number
12
+ longitude: number
13
+ }
14
+
15
+ export declare class CLLocation extends NSObject {
16
+ readonly coordinate: CLLocationCoordinate2D
17
+ readonly horizontalAccuracy: number
18
+ }
19
+
20
+ export declare class CLLocationManager extends NSObject {
21
+ constructor()
22
+ desiredAccuracy: number
23
+ distanceFilter: number
24
+ readonly location: CLLocation | null
25
+ requestWhenInUseAuthorization(): void
26
+ startUpdatingLocation(): void
27
+ stopUpdatingLocation(): void
28
+ }
@@ -0,0 +1,8 @@
1
+ export declare function CMTimeMakeWithSeconds(seconds: number, preferredTimescale: number): CMTime
2
+
3
+ export interface CMTime {
4
+ value: number
5
+ timescale: number
6
+ flags: number
7
+ epoch: number
8
+ }
@@ -0,0 +1,2 @@
1
+ export declare function dispatchAsyncGlobal(execute: () => void): void
2
+ export declare function dispatchAsyncMain(execute: () => void): void
@@ -0,0 +1,13 @@
1
+ export declare class NSObject {
2
+ }
3
+
4
+ export declare class NSData extends NSObject {
5
+ }
6
+
7
+ export declare class NSDictionary extends NSObject {
8
+ static dictionary(): NSDictionary
9
+ }
10
+
11
+ export declare class NSURL extends NSObject {
12
+ static URLWithString(URLString: string): NSURL | null
13
+ }
@@ -0,0 +1,28 @@
1
+ import type { CLLocationCoordinate2D } from '@geastack/apple/CoreLocation'
2
+ import type { UIView } from '@geastack/apple/UIKit'
3
+
4
+ export declare const MKMapTypeStandard: number
5
+ export declare const MKMapTypeMutedStandard: number
6
+ export declare const MKMapTypeSatellite: number
7
+ export declare const MKUserTrackingModeNone: number
8
+ export declare const MKUserTrackingModeFollow: number
9
+
10
+ export declare function MKCoordinateRegionMakeWithDistance(centerCoordinate: CLLocationCoordinate2D, latitudinalMeters: number, longitudinalMeters: number): MKCoordinateRegion
11
+
12
+ export interface MKCoordinateSpan {
13
+ latitudeDelta: number
14
+ longitudeDelta: number
15
+ }
16
+
17
+ export interface MKCoordinateRegion {
18
+ center: CLLocationCoordinate2D
19
+ span: MKCoordinateSpan
20
+ }
21
+
22
+ export declare class MKMapView extends UIView {
23
+ constructor()
24
+ mapType: number
25
+ showsUserLocation: boolean
26
+ userTrackingMode: number
27
+ setRegionAnimated(region: MKCoordinateRegion, animated: boolean): void
28
+ }
@@ -0,0 +1,91 @@
1
+ export declare const MTLPixelFormatInvalid: number
2
+ export declare const MTLPixelFormatBGRA8Unorm_sRGB: number
3
+ export declare const MTLPixelFormatDepth32Float: number
4
+ export declare const MTLPrimitiveTypeTriangle: number
5
+ export declare const MTLResourceStorageModeShared: number
6
+ export declare const MTLCompareFunctionLess: number
7
+
8
+ export declare function MTLCreateSystemDefaultDevice(): MTLDevice | null
9
+ export declare function MTLClearColorMake(red: number, green: number, blue: number, alpha: number): MTLClearColor
10
+
11
+ export interface MTLClearColor {
12
+ red: number
13
+ green: number
14
+ blue: number
15
+ alpha: number
16
+ }
17
+
18
+ export declare class MTLCompileOptions {
19
+ constructor()
20
+ }
21
+
22
+ export declare class MTLDevice {
23
+ newCommandQueue(): MTLCommandQueue | null
24
+ newLibraryWithSourceOptionsError(source: string, options: MTLCompileOptions): MTLLibrary | null
25
+ newBufferWithBytesLengthOptions(bytes: number[], length: number, options: number): MTLBuffer | null
26
+ newRenderPipelineStateWithDescriptorError(descriptor: MTLRenderPipelineDescriptor): MTLRenderPipelineState | null
27
+ newDepthStencilStateWithDescriptor(descriptor: MTLDepthStencilDescriptor): MTLDepthStencilState | null
28
+ }
29
+
30
+ export declare class MTLCommandQueue {
31
+ commandBuffer(): MTLCommandBuffer | null
32
+ }
33
+
34
+ export declare class MTLCommandBuffer {
35
+ renderCommandEncoderWithDescriptor(descriptor: MTLRenderPassDescriptor): MTLRenderCommandEncoder | null
36
+ presentDrawable(drawable: MTLDrawable): void
37
+ commit(): void
38
+ }
39
+
40
+ export declare class MTLLibrary {
41
+ newFunctionWithName(name: string): MTLFunction | null
42
+ }
43
+
44
+ export declare class MTLFunction {
45
+ }
46
+
47
+ export declare class MTLRenderPipelineDescriptor {
48
+ constructor()
49
+ vertexFunction: MTLFunction | null
50
+ fragmentFunction: MTLFunction | null
51
+ readonly colorAttachments: MTLRenderPipelineColorAttachmentDescriptorArray
52
+ depthAttachmentPixelFormat: number
53
+ }
54
+
55
+ export declare class MTLRenderPipelineColorAttachmentDescriptorArray {
56
+ objectAtIndexedSubscript(index: number): MTLRenderPipelineColorAttachmentDescriptor
57
+ }
58
+
59
+ export declare class MTLRenderPipelineColorAttachmentDescriptor {
60
+ pixelFormat: number
61
+ }
62
+
63
+ export declare class MTLRenderPipelineState {
64
+ }
65
+
66
+ export declare class MTLBuffer {
67
+ }
68
+
69
+ export declare class MTLDepthStencilDescriptor {
70
+ constructor()
71
+ depthCompareFunction: number
72
+ depthWriteEnabled: boolean
73
+ }
74
+
75
+ export declare class MTLDepthStencilState {
76
+ }
77
+
78
+ export declare class MTLRenderCommandEncoder {
79
+ setRenderPipelineState(pipelineState: MTLRenderPipelineState): void
80
+ setDepthStencilState(depthStencilState: MTLDepthStencilState): void
81
+ setVertexBufferOffsetAtIndex(buffer: MTLBuffer, offset: number, index: number): void
82
+ setVertexBytesLengthAtIndex(bytes: number[], length: number, index: number): void
83
+ drawPrimitivesVertexStartVertexCount(primitiveType: number, vertexStart: number, vertexCount: number): void
84
+ endEncoding(): void
85
+ }
86
+
87
+ export declare class MTLRenderPassDescriptor {
88
+ }
89
+
90
+ export declare class MTLDrawable {
91
+ }
@@ -0,0 +1,22 @@
1
+ import type { CGSize } from '@geastack/apple/CoreGraphics'
2
+ import type { MTLDevice, MTLDrawable, MTLClearColor, MTLRenderPassDescriptor } from '@geastack/apple/Metal'
3
+ import type { UIView } from '@geastack/apple/UIKit'
4
+
5
+ export declare class MTKView extends UIView {
6
+ constructor()
7
+ device: MTLDevice | null
8
+ delegate: MTKViewDelegate | null
9
+ colorPixelFormat: number
10
+ depthStencilPixelFormat: number
11
+ clearColor: MTLClearColor
12
+ preferredFramesPerSecond: number
13
+ enableSetNeedsDisplay: boolean
14
+ paused: boolean
15
+ readonly drawableSize: CGSize
16
+ readonly currentRenderPassDescriptor: MTLRenderPassDescriptor | null
17
+ readonly currentDrawable: MTLDrawable | null
18
+ }
19
+
20
+ export declare class MTKViewDelegate {
21
+ static create(drawInMTKView: () => void): MTKViewDelegate
22
+ }
@@ -0,0 +1,5 @@
1
+ import type { NSData, NSObject } from '@geastack/apple/Foundation'
2
+
3
+ export declare class PHPhotoLibrary extends NSObject {
4
+ static saveImageData(data: NSData, handler: (success: boolean, error: string) => void): void
5
+ }
@@ -0,0 +1,12 @@
1
+ import type { NSObject } from '@geastack/apple/Foundation'
2
+ import type { CGSize } from '@geastack/apple/CoreGraphics'
3
+
4
+ export declare class CALayer extends NSObject {
5
+ frame: CGRect
6
+ cornerRadius: number
7
+ shadowOpacity: number
8
+ shadowRadius: number
9
+ shadowOffset: CGSize
10
+ masksToBounds: boolean
11
+ addSublayer(layer: CALayer): void
12
+ }
@@ -0,0 +1,11 @@
1
+ export declare function openModelContainer(schemaJSON: string): ModelContainer
2
+ export declare function mainModelContext(container: ModelContainer): ModelContext
3
+ export declare function insertModelJSON(context: ModelContext, modelJSON: string): void
4
+ export declare function saveModelContext(context: ModelContext): void
5
+ export declare function fetchModelsJSON(context: ModelContext, descriptorJSON: string): string
6
+
7
+ export declare class ModelContainer {
8
+ }
9
+
10
+ export declare class ModelContext {
11
+ }