objcjs-types 0.5.0 → 0.5.2
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/dist/AVFAudio/index.js +74 -74
- package/dist/AVFoundation/index.js +269 -269
- package/dist/AVKit/index.js +7 -7
- package/dist/AVRouting/index.js +7 -7
- package/dist/Accessibility/index.js +29 -29
- package/dist/AccessorySetupKit/index.js +12 -12
- package/dist/Accounts/index.js +5 -5
- package/dist/AdServices/index.js +2 -2
- package/dist/AdSupport/index.js +2 -2
- package/dist/AddressBook/index.js +11 -11
- package/dist/AppKit/constants.d.ts +8 -0
- package/dist/AppKit/constants.js +9 -0
- package/dist/AppKit/index.js +317 -317
- package/dist/AppTrackingTransparency/index.js +2 -2
- package/dist/AppleScriptKit/index.js +2 -2
- package/dist/AudioToolbox/index.js +10 -10
- package/dist/AudioVideoBridging/index.js +18 -18
- package/dist/AuthenticationServices/index.js +79 -79
- package/dist/AutomaticAssessmentConfiguration/index.js +5 -5
- package/dist/Automator/index.js +9 -9
- package/dist/BackgroundAssets/index.js +8 -8
- package/dist/BackgroundTasks/index.js +12 -12
- package/dist/BrowserEngineCore/index.js +2 -2
- package/dist/BrowserEngineKit/index.js +19 -19
- package/dist/BusinessChat/index.js +3 -3
- package/dist/CalendarStore/index.js +11 -11
- package/dist/CallKit/index.js +22 -22
- package/dist/Cinematic/index.js +17 -17
- package/dist/ClassKit/index.js +10 -10
- package/dist/CloudKit/index.js +90 -90
- package/dist/Collaboration/index.js +6 -6
- package/dist/Contacts/index.js +36 -36
- package/dist/ContactsUI/index.js +3 -3
- package/dist/CoreAudio/index.js +2 -2
- package/dist/CoreAudioKit/index.js +9 -9
- package/dist/CoreBluetooth/index.js +17 -17
- package/dist/CoreData/index.js +63 -63
- package/dist/CoreHaptics/index.js +8 -8
- package/dist/CoreImage/index.js +31 -31
- package/dist/CoreLocation/index.js +24 -24
- package/dist/CoreMIDI/index.js +20 -20
- package/dist/CoreML/index.js +52 -52
- package/dist/CoreMediaIO/index.js +13 -13
- package/dist/CoreMotion/index.js +38 -38
- package/dist/CoreSpotlight/index.js +14 -14
- package/dist/CoreTelephony/index.js +12 -12
- package/dist/CoreText/index.js +1 -1
- package/dist/CoreWLAN/index.js +9 -9
- package/dist/CryptoTokenKit/index.js +36 -36
- package/dist/DataDetection/index.js +10 -10
- package/dist/DeviceCheck/index.js +3 -3
- package/dist/DeviceDiscoveryExtension/index.js +4 -4
- package/dist/DiscRecording/index.js +12 -12
- package/dist/DiscRecordingUI/index.js +6 -6
- package/dist/EventKit/index.js +18 -18
- package/dist/ExceptionHandling/index.js +2 -2
- package/dist/ExecutionPolicy/index.js +3 -3
- package/dist/ExtensionKit/index.js +3 -3
- package/dist/ExternalAccessory/index.js +6 -6
- package/dist/FSKit/index.js +28 -28
- package/dist/FileProvider/index.js +10 -10
- package/dist/FileProviderUI/index.js +3 -3
- package/dist/FinderSync/index.js +3 -3
- package/dist/Foundation/constants.d.ts +3 -0
- package/dist/Foundation/constants.js +4 -0
- package/dist/Foundation/index.js +275 -275
- package/dist/GLKit/index.js +16 -16
- package/dist/GameController/index.js +39 -39
- package/dist/GameKit/index.js +44 -44
- package/dist/GameSave/index.js +4 -4
- package/dist/GameplayKit/constants.d.ts +2 -0
- package/dist/GameplayKit/constants.js +3 -0
- package/dist/GameplayKit/index.js +59 -59
- package/dist/HealthKit/constants.d.ts +1 -0
- package/dist/HealthKit/constants.js +2 -0
- package/dist/HealthKit/index.js +109 -109
- package/dist/IOSurface/index.js +2 -2
- package/dist/IOUSBHost/index.js +12 -12
- package/dist/IdentityLookup/index.js +15 -15
- package/dist/ImageCaptureCore/index.js +19 -19
- package/dist/InputMethodKit/index.js +4 -4
- package/dist/InstallerPlugins/index.js +4 -4
- package/dist/InstantMessage/index.js +7 -7
- package/dist/Intents/index.js +310 -310
- package/dist/IntentsUI/index.js +4 -4
- package/dist/JavaRuntimeSupport/index.js +6 -6
- package/dist/JavaScriptCore/index.js +5 -5
- package/dist/Kernel/index.js +1 -1
- package/dist/LinkPresentation/index.js +4 -4
- package/dist/LocalAuthentication/index.js +19 -19
- package/dist/LocalAuthenticationEmbeddedUI/index.js +2 -2
- package/dist/MLCompute/index.js +57 -57
- package/dist/MailKit/index.js +17 -17
- package/dist/MapKit/index.js +75 -75
- package/dist/Matter/index.js +1331 -1331
- package/dist/MediaAccessibility/index.js +4 -4
- package/dist/MediaExtension/index.js +19 -19
- package/dist/MediaLibrary/index.js +5 -5
- package/dist/MediaPlayer/index.js +49 -49
- package/dist/Metal/constants.d.ts +2 -0
- package/dist/Metal/constants.js +3 -0
- package/dist/Metal/index.js +150 -150
- package/dist/MetalFX/index.js +5 -5
- package/dist/MetalKit/index.js +7 -7
- package/dist/MetalPerformanceShaders/index.js +1 -1
- package/dist/MetalPerformanceShadersGraph/index.js +29 -29
- package/dist/MetricKit/index.js +38 -38
- package/dist/ModelIO/index.js +67 -67
- package/dist/MultipeerConnectivity/index.js +7 -7
- package/dist/NaturalLanguage/index.js +10 -10
- package/dist/NearbyInteraction/index.js +10 -10
- package/dist/NetworkExtension/index.js +89 -89
- package/dist/NotificationCenter/index.js +4 -4
- package/dist/OSAKit/index.js +6 -6
- package/dist/OSLog/index.js +10 -10
- package/dist/OpenDirectory/index.js +10 -10
- package/dist/PDFKit/index.js +30 -30
- package/dist/PHASE/index.js +60 -60
- package/dist/ParavirtualizedGraphics/index.js +4 -4
- package/dist/PassKit/index.js +74 -74
- package/dist/PencilKit/index.js +14 -14
- package/dist/Photos/index.js +44 -44
- package/dist/PhotosUI/index.js +18 -18
- package/dist/PreferencePanes/index.js +2 -2
- package/dist/PushKit/index.js +4 -4
- package/dist/QuartzCore/index.js +32 -32
- package/dist/QuickLookThumbnailing/index.js +7 -7
- package/dist/QuickLookUI/index.js +7 -7
- package/dist/ReplayKit/index.js +8 -8
- package/dist/SafariServices/index.js +15 -15
- package/dist/SafetyKit/index.js +4 -4
- package/dist/SceneKit/index.js +67 -67
- package/dist/ScreenCaptureKit/index.js +16 -16
- package/dist/ScreenSaver/index.js +3 -3
- package/dist/ScreenTime/index.js +5 -5
- package/dist/ScriptingBridge/index.js +4 -4
- package/dist/SecurityFoundation/index.js +2 -2
- package/dist/SecurityInterface/index.js +10 -10
- package/dist/SecurityUI/index.js +2 -2
- package/dist/SensitiveContentAnalysis/index.js +4 -4
- package/dist/SensorKit/index.js +39 -39
- package/dist/ServiceManagement/index.js +2 -2
- package/dist/SharedWithYou/index.js +11 -11
- package/dist/SharedWithYouCore/index.js +14 -14
- package/dist/ShazamKit/index.js +11 -11
- package/dist/Social/index.js +3 -3
- package/dist/SoundAnalysis/index.js +7 -7
- package/dist/Speech/index.js +14 -14
- package/dist/SpriteKit/index.js +49 -49
- package/dist/StoreKit/index.js +28 -28
- package/dist/Symbols/index.js +19 -19
- package/dist/SyncServices/index.js +9 -9
- package/dist/SystemExtensions/index.js +6 -6
- package/dist/ThreadNetwork/index.js +3 -3
- package/dist/UniformTypeIdentifiers/index.js +2 -2
- package/dist/UserNotifications/index.js +22 -22
- package/dist/UserNotificationsUI/index.js +1 -1
- package/dist/VideoSubscriberAccount/index.js +14 -14
- package/dist/VideoToolbox/index.js +18 -18
- package/dist/Virtualization/index.js +111 -111
- package/dist/Vision/constants.d.ts +54 -0
- package/dist/Vision/constants.js +55 -0
- package/dist/Vision/index.js +92 -92
- package/dist/WebKit/index.js +166 -166
- package/dist/bind.js +4 -0
- package/dist/helpers.d.ts +26 -0
- package/dist/helpers.js +44 -0
- package/dist/iTunesLibrary/index.js +9 -9
- package/generator/ast-parser.ts +132 -0
- package/generator/discover.ts +26 -1
- package/generator/emitter.ts +34 -3
- package/generator/frameworks.ts +4 -0
- package/generator/index.ts +62 -10
- package/generator/parse-worker.ts +9 -2
- package/generator/templates/bind.ts +4 -0
- package/generator/templates/helpers.ts +53 -0
- package/generator/worker-pool.ts +12 -5
- package/package.json +9 -4
package/generator/worker-pool.ts
CHANGED
|
@@ -14,7 +14,8 @@ import type {
|
|
|
14
14
|
ObjCStringEnum,
|
|
15
15
|
ObjCStruct,
|
|
16
16
|
ObjCStructAlias,
|
|
17
|
-
ObjCFunction
|
|
17
|
+
ObjCFunction,
|
|
18
|
+
ObjCNumericConstant
|
|
18
19
|
} from "./ast-parser.ts";
|
|
19
20
|
|
|
20
21
|
/** Result from a unified parse-all task (classes + protocols + enums + structs from one clang invocation) */
|
|
@@ -35,6 +36,8 @@ export interface UnifiedParseResult {
|
|
|
35
36
|
typedefs: Map<string, string>;
|
|
36
37
|
/** Parsed C function declarations (function name → ObjCFunction) */
|
|
37
38
|
functions: Map<string, ObjCFunction>;
|
|
39
|
+
/** Parsed standalone numeric constants (constant name → ObjCNumericConstant) */
|
|
40
|
+
numericConstants: Map<string, ObjCNumericConstant>;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
export interface ClassParseResult {
|
|
@@ -248,7 +251,8 @@ export class WorkerPool {
|
|
|
248
251
|
structs: new Map(result.structs ?? []),
|
|
249
252
|
structAliases: result.structAliases ?? [],
|
|
250
253
|
typedefs: new Map(result.typedefs ?? []),
|
|
251
|
-
functions: new Map(result.functions ?? [])
|
|
254
|
+
functions: new Map(result.functions ?? []),
|
|
255
|
+
numericConstants: new Map(result.numericConstants ?? [])
|
|
252
256
|
};
|
|
253
257
|
}
|
|
254
258
|
|
|
@@ -271,7 +275,8 @@ export class WorkerPool {
|
|
|
271
275
|
integerEnumTargets: string[],
|
|
272
276
|
stringEnumTargets: string[],
|
|
273
277
|
preIncludes: string[],
|
|
274
|
-
frameworkName?: string
|
|
278
|
+
frameworkName?: string,
|
|
279
|
+
numericConstantTargets?: string[]
|
|
275
280
|
): Promise<UnifiedParseResult> {
|
|
276
281
|
const result = await this.dispatch({
|
|
277
282
|
id: this.nextId++,
|
|
@@ -282,7 +287,8 @@ export class WorkerPool {
|
|
|
282
287
|
integerEnumTargets,
|
|
283
288
|
stringEnumTargets,
|
|
284
289
|
preIncludes,
|
|
285
|
-
frameworkName
|
|
290
|
+
frameworkName,
|
|
291
|
+
numericConstantTargets
|
|
286
292
|
});
|
|
287
293
|
return {
|
|
288
294
|
classes: new Map(result.classes),
|
|
@@ -292,7 +298,8 @@ export class WorkerPool {
|
|
|
292
298
|
structs: new Map(result.structs ?? []),
|
|
293
299
|
structAliases: result.structAliases ?? [],
|
|
294
300
|
typedefs: new Map(result.typedefs ?? []),
|
|
295
|
-
functions: new Map(result.functions ?? [])
|
|
301
|
+
functions: new Map(result.functions ?? []),
|
|
302
|
+
numericConstants: new Map(result.numericConstants ?? [])
|
|
296
303
|
};
|
|
297
304
|
}
|
|
298
305
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "objcjs-types",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "Auto-generated TypeScript type declarations for macOS Objective-C frameworks",
|
|
3
|
+
"version": "0.5.2",
|
|
4
|
+
"description": "Auto-generated TypeScript type declarations for macOS Objective-C frameworks that supplement objc-js",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
6
7
|
"main": "./dist/index.js",
|
|
7
8
|
"types": "./dist/index.d.ts",
|
|
8
9
|
"exports": {
|
|
@@ -33,6 +34,10 @@
|
|
|
33
34
|
"./*/functions": {
|
|
34
35
|
"types": "./dist/*/functions.d.ts",
|
|
35
36
|
"default": "./dist/*/functions.js"
|
|
37
|
+
},
|
|
38
|
+
"./*/constants": {
|
|
39
|
+
"types": "./dist/*/constants.d.ts",
|
|
40
|
+
"default": "./dist/*/constants.js"
|
|
36
41
|
}
|
|
37
42
|
},
|
|
38
43
|
"files": [
|
|
@@ -63,13 +68,13 @@
|
|
|
63
68
|
],
|
|
64
69
|
"license": "MIT",
|
|
65
70
|
"peerDependencies": {
|
|
66
|
-
"objc-js": "^1.1
|
|
71
|
+
"objc-js": "^1.3.1",
|
|
67
72
|
"typescript": "^5"
|
|
68
73
|
},
|
|
69
74
|
"devDependencies": {
|
|
70
75
|
"@types/bun": "latest",
|
|
71
76
|
"@typescript/native-preview": "^7.0.0-dev.20260218.1",
|
|
72
|
-
"objc-js": "^1.3.
|
|
77
|
+
"objc-js": "^1.3.1",
|
|
73
78
|
"prettier": "^3.8.1"
|
|
74
79
|
},
|
|
75
80
|
"trustedDependencies": [
|