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.
Files changed (178) hide show
  1. package/dist/AVFAudio/index.js +74 -74
  2. package/dist/AVFoundation/index.js +269 -269
  3. package/dist/AVKit/index.js +7 -7
  4. package/dist/AVRouting/index.js +7 -7
  5. package/dist/Accessibility/index.js +29 -29
  6. package/dist/AccessorySetupKit/index.js +12 -12
  7. package/dist/Accounts/index.js +5 -5
  8. package/dist/AdServices/index.js +2 -2
  9. package/dist/AdSupport/index.js +2 -2
  10. package/dist/AddressBook/index.js +11 -11
  11. package/dist/AppKit/constants.d.ts +8 -0
  12. package/dist/AppKit/constants.js +9 -0
  13. package/dist/AppKit/index.js +317 -317
  14. package/dist/AppTrackingTransparency/index.js +2 -2
  15. package/dist/AppleScriptKit/index.js +2 -2
  16. package/dist/AudioToolbox/index.js +10 -10
  17. package/dist/AudioVideoBridging/index.js +18 -18
  18. package/dist/AuthenticationServices/index.js +79 -79
  19. package/dist/AutomaticAssessmentConfiguration/index.js +5 -5
  20. package/dist/Automator/index.js +9 -9
  21. package/dist/BackgroundAssets/index.js +8 -8
  22. package/dist/BackgroundTasks/index.js +12 -12
  23. package/dist/BrowserEngineCore/index.js +2 -2
  24. package/dist/BrowserEngineKit/index.js +19 -19
  25. package/dist/BusinessChat/index.js +3 -3
  26. package/dist/CalendarStore/index.js +11 -11
  27. package/dist/CallKit/index.js +22 -22
  28. package/dist/Cinematic/index.js +17 -17
  29. package/dist/ClassKit/index.js +10 -10
  30. package/dist/CloudKit/index.js +90 -90
  31. package/dist/Collaboration/index.js +6 -6
  32. package/dist/Contacts/index.js +36 -36
  33. package/dist/ContactsUI/index.js +3 -3
  34. package/dist/CoreAudio/index.js +2 -2
  35. package/dist/CoreAudioKit/index.js +9 -9
  36. package/dist/CoreBluetooth/index.js +17 -17
  37. package/dist/CoreData/index.js +63 -63
  38. package/dist/CoreHaptics/index.js +8 -8
  39. package/dist/CoreImage/index.js +31 -31
  40. package/dist/CoreLocation/index.js +24 -24
  41. package/dist/CoreMIDI/index.js +20 -20
  42. package/dist/CoreML/index.js +52 -52
  43. package/dist/CoreMediaIO/index.js +13 -13
  44. package/dist/CoreMotion/index.js +38 -38
  45. package/dist/CoreSpotlight/index.js +14 -14
  46. package/dist/CoreTelephony/index.js +12 -12
  47. package/dist/CoreText/index.js +1 -1
  48. package/dist/CoreWLAN/index.js +9 -9
  49. package/dist/CryptoTokenKit/index.js +36 -36
  50. package/dist/DataDetection/index.js +10 -10
  51. package/dist/DeviceCheck/index.js +3 -3
  52. package/dist/DeviceDiscoveryExtension/index.js +4 -4
  53. package/dist/DiscRecording/index.js +12 -12
  54. package/dist/DiscRecordingUI/index.js +6 -6
  55. package/dist/EventKit/index.js +18 -18
  56. package/dist/ExceptionHandling/index.js +2 -2
  57. package/dist/ExecutionPolicy/index.js +3 -3
  58. package/dist/ExtensionKit/index.js +3 -3
  59. package/dist/ExternalAccessory/index.js +6 -6
  60. package/dist/FSKit/index.js +28 -28
  61. package/dist/FileProvider/index.js +10 -10
  62. package/dist/FileProviderUI/index.js +3 -3
  63. package/dist/FinderSync/index.js +3 -3
  64. package/dist/Foundation/constants.d.ts +3 -0
  65. package/dist/Foundation/constants.js +4 -0
  66. package/dist/Foundation/index.js +275 -275
  67. package/dist/GLKit/index.js +16 -16
  68. package/dist/GameController/index.js +39 -39
  69. package/dist/GameKit/index.js +44 -44
  70. package/dist/GameSave/index.js +4 -4
  71. package/dist/GameplayKit/constants.d.ts +2 -0
  72. package/dist/GameplayKit/constants.js +3 -0
  73. package/dist/GameplayKit/index.js +59 -59
  74. package/dist/HealthKit/constants.d.ts +1 -0
  75. package/dist/HealthKit/constants.js +2 -0
  76. package/dist/HealthKit/index.js +109 -109
  77. package/dist/IOSurface/index.js +2 -2
  78. package/dist/IOUSBHost/index.js +12 -12
  79. package/dist/IdentityLookup/index.js +15 -15
  80. package/dist/ImageCaptureCore/index.js +19 -19
  81. package/dist/InputMethodKit/index.js +4 -4
  82. package/dist/InstallerPlugins/index.js +4 -4
  83. package/dist/InstantMessage/index.js +7 -7
  84. package/dist/Intents/index.js +310 -310
  85. package/dist/IntentsUI/index.js +4 -4
  86. package/dist/JavaRuntimeSupport/index.js +6 -6
  87. package/dist/JavaScriptCore/index.js +5 -5
  88. package/dist/Kernel/index.js +1 -1
  89. package/dist/LinkPresentation/index.js +4 -4
  90. package/dist/LocalAuthentication/index.js +19 -19
  91. package/dist/LocalAuthenticationEmbeddedUI/index.js +2 -2
  92. package/dist/MLCompute/index.js +57 -57
  93. package/dist/MailKit/index.js +17 -17
  94. package/dist/MapKit/index.js +75 -75
  95. package/dist/Matter/index.js +1331 -1331
  96. package/dist/MediaAccessibility/index.js +4 -4
  97. package/dist/MediaExtension/index.js +19 -19
  98. package/dist/MediaLibrary/index.js +5 -5
  99. package/dist/MediaPlayer/index.js +49 -49
  100. package/dist/Metal/constants.d.ts +2 -0
  101. package/dist/Metal/constants.js +3 -0
  102. package/dist/Metal/index.js +150 -150
  103. package/dist/MetalFX/index.js +5 -5
  104. package/dist/MetalKit/index.js +7 -7
  105. package/dist/MetalPerformanceShaders/index.js +1 -1
  106. package/dist/MetalPerformanceShadersGraph/index.js +29 -29
  107. package/dist/MetricKit/index.js +38 -38
  108. package/dist/ModelIO/index.js +67 -67
  109. package/dist/MultipeerConnectivity/index.js +7 -7
  110. package/dist/NaturalLanguage/index.js +10 -10
  111. package/dist/NearbyInteraction/index.js +10 -10
  112. package/dist/NetworkExtension/index.js +89 -89
  113. package/dist/NotificationCenter/index.js +4 -4
  114. package/dist/OSAKit/index.js +6 -6
  115. package/dist/OSLog/index.js +10 -10
  116. package/dist/OpenDirectory/index.js +10 -10
  117. package/dist/PDFKit/index.js +30 -30
  118. package/dist/PHASE/index.js +60 -60
  119. package/dist/ParavirtualizedGraphics/index.js +4 -4
  120. package/dist/PassKit/index.js +74 -74
  121. package/dist/PencilKit/index.js +14 -14
  122. package/dist/Photos/index.js +44 -44
  123. package/dist/PhotosUI/index.js +18 -18
  124. package/dist/PreferencePanes/index.js +2 -2
  125. package/dist/PushKit/index.js +4 -4
  126. package/dist/QuartzCore/index.js +32 -32
  127. package/dist/QuickLookThumbnailing/index.js +7 -7
  128. package/dist/QuickLookUI/index.js +7 -7
  129. package/dist/ReplayKit/index.js +8 -8
  130. package/dist/SafariServices/index.js +15 -15
  131. package/dist/SafetyKit/index.js +4 -4
  132. package/dist/SceneKit/index.js +67 -67
  133. package/dist/ScreenCaptureKit/index.js +16 -16
  134. package/dist/ScreenSaver/index.js +3 -3
  135. package/dist/ScreenTime/index.js +5 -5
  136. package/dist/ScriptingBridge/index.js +4 -4
  137. package/dist/SecurityFoundation/index.js +2 -2
  138. package/dist/SecurityInterface/index.js +10 -10
  139. package/dist/SecurityUI/index.js +2 -2
  140. package/dist/SensitiveContentAnalysis/index.js +4 -4
  141. package/dist/SensorKit/index.js +39 -39
  142. package/dist/ServiceManagement/index.js +2 -2
  143. package/dist/SharedWithYou/index.js +11 -11
  144. package/dist/SharedWithYouCore/index.js +14 -14
  145. package/dist/ShazamKit/index.js +11 -11
  146. package/dist/Social/index.js +3 -3
  147. package/dist/SoundAnalysis/index.js +7 -7
  148. package/dist/Speech/index.js +14 -14
  149. package/dist/SpriteKit/index.js +49 -49
  150. package/dist/StoreKit/index.js +28 -28
  151. package/dist/Symbols/index.js +19 -19
  152. package/dist/SyncServices/index.js +9 -9
  153. package/dist/SystemExtensions/index.js +6 -6
  154. package/dist/ThreadNetwork/index.js +3 -3
  155. package/dist/UniformTypeIdentifiers/index.js +2 -2
  156. package/dist/UserNotifications/index.js +22 -22
  157. package/dist/UserNotificationsUI/index.js +1 -1
  158. package/dist/VideoSubscriberAccount/index.js +14 -14
  159. package/dist/VideoToolbox/index.js +18 -18
  160. package/dist/Virtualization/index.js +111 -111
  161. package/dist/Vision/constants.d.ts +54 -0
  162. package/dist/Vision/constants.js +55 -0
  163. package/dist/Vision/index.js +92 -92
  164. package/dist/WebKit/index.js +166 -166
  165. package/dist/bind.js +4 -0
  166. package/dist/helpers.d.ts +26 -0
  167. package/dist/helpers.js +44 -0
  168. package/dist/iTunesLibrary/index.js +9 -9
  169. package/generator/ast-parser.ts +132 -0
  170. package/generator/discover.ts +26 -1
  171. package/generator/emitter.ts +34 -3
  172. package/generator/frameworks.ts +4 -0
  173. package/generator/index.ts +62 -10
  174. package/generator/parse-worker.ts +9 -2
  175. package/generator/templates/bind.ts +4 -0
  176. package/generator/templates/helpers.ts +53 -0
  177. package/generator/worker-pool.ts +12 -5
  178. package/package.json +9 -4
@@ -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.0",
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.0",
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.0",
77
+ "objc-js": "^1.3.1",
73
78
  "prettier": "^3.8.1"
74
79
  },
75
80
  "trustedDependencies": [