@gtkx/codegen 1.0.0-rc.1 → 1.0.0-rc.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 (521) hide show
  1. package/dist/analysis/descriptor-render.d.ts +18 -11
  2. package/dist/analysis/descriptor-render.d.ts.map +1 -1
  3. package/dist/analysis/descriptor-render.js +275 -152
  4. package/dist/analysis/descriptor-render.js.map +1 -1
  5. package/dist/analysis/descriptor.d.ts +37 -34
  6. package/dist/analysis/descriptor.d.ts.map +1 -1
  7. package/dist/analysis/descriptor.js +34 -30
  8. package/dist/analysis/descriptor.js.map +1 -1
  9. package/dist/analysis/inheritance.d.ts +16 -16
  10. package/dist/analysis/inheritance.d.ts.map +1 -1
  11. package/dist/analysis/inheritance.js +139 -84
  12. package/dist/analysis/inheritance.js.map +1 -1
  13. package/dist/analysis/param-structure.d.ts +14 -13
  14. package/dist/analysis/param-structure.d.ts.map +1 -1
  15. package/dist/analysis/param-structure.js +104 -53
  16. package/dist/analysis/param-structure.js.map +1 -1
  17. package/dist/analysis/ts-type.d.ts +6 -5
  18. package/dist/analysis/ts-type.d.ts.map +1 -1
  19. package/dist/analysis/ts-type.js +69 -23
  20. package/dist/analysis/ts-type.js.map +1 -1
  21. package/dist/compile.d.ts +5 -5
  22. package/dist/compile.d.ts.map +1 -1
  23. package/dist/compile.js +70 -63
  24. package/dist/compile.js.map +1 -1
  25. package/dist/docs/api-reference.d.ts +12 -11
  26. package/dist/docs/api-reference.d.ts.map +1 -1
  27. package/dist/docs/api-reference.js +194 -121
  28. package/dist/docs/api-reference.js.map +1 -1
  29. package/dist/docs/element-page.d.ts +6 -9
  30. package/dist/docs/element-page.d.ts.map +1 -1
  31. package/dist/docs/element-page.js +68 -133
  32. package/dist/docs/element-page.js.map +1 -1
  33. package/dist/docs/pipeline.d.ts +8 -7
  34. package/dist/docs/pipeline.d.ts.map +1 -1
  35. package/dist/docs/pipeline.js +79 -53
  36. package/dist/docs/pipeline.js.map +1 -1
  37. package/dist/docs/render.d.ts +21 -19
  38. package/dist/docs/render.d.ts.map +1 -1
  39. package/dist/docs/render.js +80 -71
  40. package/dist/docs/render.js.map +1 -1
  41. package/dist/docs/symbol-page.d.ts +6 -6
  42. package/dist/docs/symbol-page.d.ts.map +1 -1
  43. package/dist/docs/symbol-page.js +126 -84
  44. package/dist/docs/symbol-page.js.map +1 -1
  45. package/dist/fingerprint.d.ts +28 -5
  46. package/dist/fingerprint.d.ts.map +1 -1
  47. package/dist/fingerprint.js +66 -13
  48. package/dist/fingerprint.js.map +1 -1
  49. package/dist/gi.d.ts +13 -0
  50. package/dist/gi.d.ts.map +1 -0
  51. package/dist/gi.js +21 -0
  52. package/dist/gi.js.map +1 -0
  53. package/dist/gir/ancestry.d.ts +4 -3
  54. package/dist/gir/ancestry.d.ts.map +1 -1
  55. package/dist/gir/ancestry.js +12 -15
  56. package/dist/gir/ancestry.js.map +1 -1
  57. package/dist/gir/callback.d.ts +6 -11
  58. package/dist/gir/callback.d.ts.map +1 -1
  59. package/dist/gir/callback.js +6 -7
  60. package/dist/gir/callback.js.map +1 -1
  61. package/dist/gir/class.d.ts +7 -5
  62. package/dist/gir/class.d.ts.map +1 -1
  63. package/dist/gir/class.js +14 -12
  64. package/dist/gir/class.js.map +1 -1
  65. package/dist/gir/enum.d.ts +3 -3
  66. package/dist/gir/enum.d.ts.map +1 -1
  67. package/dist/gir/enum.js +7 -6
  68. package/dist/gir/enum.js.map +1 -1
  69. package/dist/gir/field.d.ts +8 -3
  70. package/dist/gir/field.d.ts.map +1 -1
  71. package/dist/gir/field.js +30 -7
  72. package/dist/gir/field.js.map +1 -1
  73. package/dist/gir/function.d.ts +6 -3
  74. package/dist/gir/function.d.ts.map +1 -1
  75. package/dist/gir/function.js +23 -7
  76. package/dist/gir/function.js.map +1 -1
  77. package/dist/gir/gir-path.d.ts +2 -1
  78. package/dist/gir/gir-path.d.ts.map +1 -1
  79. package/dist/gir/gir-path.js +26 -10
  80. package/dist/gir/gir-path.js.map +1 -1
  81. package/dist/gir/libraries.d.ts +3 -2
  82. package/dist/gir/libraries.d.ts.map +1 -1
  83. package/dist/gir/libraries.js +39 -27
  84. package/dist/gir/libraries.js.map +1 -1
  85. package/dist/gir/library.d.ts +17 -11
  86. package/dist/gir/library.d.ts.map +1 -1
  87. package/dist/gir/library.js +116 -92
  88. package/dist/gir/library.js.map +1 -1
  89. package/dist/gir/namespace.d.ts +10 -10
  90. package/dist/gir/namespace.d.ts.map +1 -1
  91. package/dist/gir/namespace.js +21 -20
  92. package/dist/gir/namespace.js.map +1 -1
  93. package/dist/gir/nullable-overrides.d.ts +3 -0
  94. package/dist/gir/nullable-overrides.d.ts.map +1 -0
  95. package/dist/gir/nullable-overrides.js +5 -0
  96. package/dist/gir/nullable-overrides.js.map +1 -0
  97. package/dist/gir/parameter.d.ts +14 -12
  98. package/dist/gir/parameter.d.ts.map +1 -1
  99. package/dist/gir/parameter.js +27 -18
  100. package/dist/gir/parameter.js.map +1 -1
  101. package/dist/gir/parse.d.ts +12 -13
  102. package/dist/gir/parse.d.ts.map +1 -1
  103. package/dist/gir/parse.js +50 -40
  104. package/dist/gir/parse.js.map +1 -1
  105. package/dist/gir/primitives.d.ts +5 -4
  106. package/dist/gir/primitives.d.ts.map +1 -1
  107. package/dist/gir/primitives.js +4 -3
  108. package/dist/gir/primitives.js.map +1 -1
  109. package/dist/gir/property.d.ts +5 -4
  110. package/dist/gir/property.d.ts.map +1 -1
  111. package/dist/gir/property.js +10 -9
  112. package/dist/gir/property.js.map +1 -1
  113. package/dist/gir/record.d.ts +5 -4
  114. package/dist/gir/record.d.ts.map +1 -1
  115. package/dist/gir/record.js +13 -12
  116. package/dist/gir/record.js.map +1 -1
  117. package/dist/gir/size.d.ts +6 -5
  118. package/dist/gir/size.d.ts.map +1 -1
  119. package/dist/gir/size.js +49 -47
  120. package/dist/gir/size.js.map +1 -1
  121. package/dist/gir/type-id.d.ts +17 -15
  122. package/dist/gir/type-id.d.ts.map +1 -1
  123. package/dist/gir/type-id.js +5 -1
  124. package/dist/gir/type-id.js.map +1 -1
  125. package/dist/gir/type-ref.d.ts +3 -2
  126. package/dist/gir/type-ref.d.ts.map +1 -1
  127. package/dist/gir/type-ref.js +36 -25
  128. package/dist/gir/type-ref.js.map +1 -1
  129. package/dist/gir/type.d.ts +3 -2
  130. package/dist/gir/type.d.ts.map +1 -1
  131. package/dist/gir/type.js.map +1 -1
  132. package/dist/index.d.ts +2 -0
  133. package/dist/index.d.ts.map +1 -1
  134. package/dist/index.js +1 -0
  135. package/dist/index.js.map +1 -1
  136. package/dist/jsx.d.ts +26 -0
  137. package/dist/jsx.d.ts.map +1 -0
  138. package/dist/jsx.js +40 -0
  139. package/dist/jsx.js.map +1 -0
  140. package/dist/khronos/args.d.ts +7 -7
  141. package/dist/khronos/args.d.ts.map +1 -1
  142. package/dist/khronos/args.js +88 -67
  143. package/dist/khronos/args.js.map +1 -1
  144. package/dist/khronos/jsdoc.d.ts +4 -4
  145. package/dist/khronos/jsdoc.d.ts.map +1 -1
  146. package/dist/khronos/jsdoc.js +29 -16
  147. package/dist/khronos/jsdoc.js.map +1 -1
  148. package/dist/khronos/model.d.ts +8 -7
  149. package/dist/khronos/model.d.ts.map +1 -1
  150. package/dist/khronos/model.js +94 -59
  151. package/dist/khronos/model.js.map +1 -1
  152. package/dist/khronos/modules.d.ts +4 -3
  153. package/dist/khronos/modules.d.ts.map +1 -1
  154. package/dist/khronos/modules.js +40 -25
  155. package/dist/khronos/modules.js.map +1 -1
  156. package/dist/khronos/param-pair.d.ts +11 -0
  157. package/dist/khronos/param-pair.d.ts.map +1 -0
  158. package/dist/khronos/param-pair.js +6 -0
  159. package/dist/khronos/param-pair.js.map +1 -0
  160. package/dist/khronos/parse.d.ts +7 -8
  161. package/dist/khronos/parse.d.ts.map +1 -1
  162. package/dist/khronos/parse.js +17 -16
  163. package/dist/khronos/parse.js.map +1 -1
  164. package/dist/khronos/pipeline.d.ts +4 -4
  165. package/dist/khronos/pipeline.d.ts.map +1 -1
  166. package/dist/khronos/pipeline.js +97 -56
  167. package/dist/khronos/pipeline.js.map +1 -1
  168. package/dist/khronos/plan.d.ts +11 -10
  169. package/dist/khronos/plan.d.ts.map +1 -1
  170. package/dist/khronos/plan.js +109 -45
  171. package/dist/khronos/plan.js.map +1 -1
  172. package/dist/khronos/render.d.ts +5 -4
  173. package/dist/khronos/render.d.ts.map +1 -1
  174. package/dist/khronos/render.js +106 -59
  175. package/dist/khronos/render.js.map +1 -1
  176. package/dist/khronos/select.d.ts +4 -4
  177. package/dist/khronos/select.d.ts.map +1 -1
  178. package/dist/khronos/select.js +30 -19
  179. package/dist/khronos/select.js.map +1 -1
  180. package/dist/react/element-config.d.ts +17 -0
  181. package/dist/react/element-config.d.ts.map +1 -0
  182. package/dist/react/element-config.js +61 -0
  183. package/dist/react/element-config.js.map +1 -0
  184. package/dist/runner.d.ts +17 -10
  185. package/dist/runner.d.ts.map +1 -1
  186. package/dist/runner.js +45 -43
  187. package/dist/runner.js.map +1 -1
  188. package/dist/store/compile-store.d.ts +5 -3
  189. package/dist/store/compile-store.d.ts.map +1 -1
  190. package/dist/store/compile-store.js +24 -22
  191. package/dist/store/compile-store.js.map +1 -1
  192. package/dist/store/gi/async.d.ts +2 -1
  193. package/dist/store/gi/async.d.ts.map +1 -1
  194. package/dist/store/gi/async.js +28 -24
  195. package/dist/store/gi/async.js.map +1 -1
  196. package/dist/store/gi/callables.d.ts +26 -20
  197. package/dist/store/gi/callables.d.ts.map +1 -1
  198. package/dist/store/gi/callables.js +162 -100
  199. package/dist/store/gi/callables.js.map +1 -1
  200. package/dist/store/gi/callback.d.ts +3 -2
  201. package/dist/store/gi/callback.d.ts.map +1 -1
  202. package/dist/store/gi/callback.js +6 -3
  203. package/dist/store/gi/callback.js.map +1 -1
  204. package/dist/store/gi/class-struct-record.d.ts +4 -3
  205. package/dist/store/gi/class-struct-record.d.ts.map +1 -1
  206. package/dist/store/gi/class-struct-record.js +33 -15
  207. package/dist/store/gi/class-struct-record.js.map +1 -1
  208. package/dist/store/gi/class.d.ts +2 -1
  209. package/dist/store/gi/class.d.ts.map +1 -1
  210. package/dist/store/gi/class.js +86 -47
  211. package/dist/store/gi/class.js.map +1 -1
  212. package/dist/store/gi/companion.d.ts +2 -1
  213. package/dist/store/gi/companion.d.ts.map +1 -1
  214. package/dist/store/gi/companion.js +8 -5
  215. package/dist/store/gi/companion.js.map +1 -1
  216. package/dist/store/gi/constant.d.ts +3 -2
  217. package/dist/store/gi/constant.d.ts.map +1 -1
  218. package/dist/store/gi/constant.js +25 -8
  219. package/dist/store/gi/constant.js.map +1 -1
  220. package/dist/store/gi/constructor-props.d.ts +3 -2
  221. package/dist/store/gi/constructor-props.d.ts.map +1 -1
  222. package/dist/store/gi/constructor-props.js +17 -10
  223. package/dist/store/gi/constructor-props.js.map +1 -1
  224. package/dist/store/gi/enum.d.ts +3 -2
  225. package/dist/store/gi/enum.d.ts.map +1 -1
  226. package/dist/store/gi/enum.js +14 -11
  227. package/dist/store/gi/enum.js.map +1 -1
  228. package/dist/store/gi/function.d.ts +5 -4
  229. package/dist/store/gi/function.d.ts.map +1 -1
  230. package/dist/store/gi/function.js +50 -23
  231. package/dist/store/gi/function.js.map +1 -1
  232. package/dist/store/gi/gtype-binding.d.ts +4 -4
  233. package/dist/store/gi/gtype-binding.d.ts.map +1 -1
  234. package/dist/store/gi/gtype-binding.js +15 -11
  235. package/dist/store/gi/gtype-binding.js.map +1 -1
  236. package/dist/store/gi/interface.d.ts +2 -1
  237. package/dist/store/gi/interface.d.ts.map +1 -1
  238. package/dist/store/gi/interface.js +36 -18
  239. package/dist/store/gi/interface.js.map +1 -1
  240. package/dist/store/gi/item-comparators.d.ts +3 -2
  241. package/dist/store/gi/item-comparators.d.ts.map +1 -1
  242. package/dist/store/gi/item-comparators.js +33 -21
  243. package/dist/store/gi/item-comparators.js.map +1 -1
  244. package/dist/store/gi/method.d.ts +13 -13
  245. package/dist/store/gi/method.d.ts.map +1 -1
  246. package/dist/store/gi/method.js +187 -130
  247. package/dist/store/gi/method.js.map +1 -1
  248. package/dist/store/gi/param-marshal.d.ts +7 -6
  249. package/dist/store/gi/param-marshal.d.ts.map +1 -1
  250. package/dist/store/gi/param-marshal.js +26 -13
  251. package/dist/store/gi/param-marshal.js.map +1 -1
  252. package/dist/store/gi/pipeline.d.ts +2 -1
  253. package/dist/store/gi/pipeline.d.ts.map +1 -1
  254. package/dist/store/gi/pipeline.js +38 -23
  255. package/dist/store/gi/pipeline.js.map +1 -1
  256. package/dist/store/gi/properties.d.ts +2 -1
  257. package/dist/store/gi/properties.d.ts.map +1 -1
  258. package/dist/store/gi/properties.js +6 -4
  259. package/dist/store/gi/properties.js.map +1 -1
  260. package/dist/store/gi/property-accessor.d.ts +11 -10
  261. package/dist/store/gi/property-accessor.d.ts.map +1 -1
  262. package/dist/store/gi/property-accessor.js +86 -60
  263. package/dist/store/gi/property-accessor.js.map +1 -1
  264. package/dist/store/gi/record-constructor.d.ts +3 -2
  265. package/dist/store/gi/record-constructor.d.ts.map +1 -1
  266. package/dist/store/gi/record-constructor.js +36 -25
  267. package/dist/store/gi/record-constructor.js.map +1 -1
  268. package/dist/store/gi/record-field-accessor.d.ts +8 -8
  269. package/dist/store/gi/record-field-accessor.d.ts.map +1 -1
  270. package/dist/store/gi/record-field-accessor.js +171 -99
  271. package/dist/store/gi/record-field-accessor.js.map +1 -1
  272. package/dist/store/gi/record-layout.d.ts +6 -5
  273. package/dist/store/gi/record-layout.d.ts.map +1 -1
  274. package/dist/store/gi/record-layout.js +75 -39
  275. package/dist/store/gi/record-layout.js.map +1 -1
  276. package/dist/store/gi/record.d.ts +2 -1
  277. package/dist/store/gi/record.d.ts.map +1 -1
  278. package/dist/store/gi/record.js +19 -13
  279. package/dist/store/gi/record.js.map +1 -1
  280. package/dist/store/gi/registration.d.ts +3 -3
  281. package/dist/store/gi/registration.d.ts.map +1 -1
  282. package/dist/store/gi/registration.js +3 -2
  283. package/dist/store/gi/registration.js.map +1 -1
  284. package/dist/store/gi/return-wrap.d.ts +2 -2
  285. package/dist/store/gi/return-wrap.d.ts.map +1 -1
  286. package/dist/store/gi/return-wrap.js +43 -22
  287. package/dist/store/gi/return-wrap.js.map +1 -1
  288. package/dist/store/gi/runtime-override.d.ts +2 -1
  289. package/dist/store/gi/runtime-override.d.ts.map +1 -1
  290. package/dist/store/gi/runtime-override.js +6 -3
  291. package/dist/store/gi/runtime-override.js.map +1 -1
  292. package/dist/store/gi/signal.d.ts +3 -2
  293. package/dist/store/gi/signal.d.ts.map +1 -1
  294. package/dist/store/gi/signal.js +113 -66
  295. package/dist/store/gi/signal.js.map +1 -1
  296. package/dist/store/gi/vtable.d.ts +2 -1
  297. package/dist/store/gi/vtable.d.ts.map +1 -1
  298. package/dist/store/gi/vtable.js +60 -30
  299. package/dist/store/gi/vtable.js.map +1 -1
  300. package/dist/store/gi-store.d.ts +5 -4
  301. package/dist/store/gi-store.d.ts.map +1 -1
  302. package/dist/store/gi-store.js +4 -2
  303. package/dist/store/gi-store.js.map +1 -1
  304. package/dist/store/jsx/element-components.d.ts +23 -0
  305. package/dist/store/jsx/element-components.d.ts.map +1 -0
  306. package/dist/store/jsx/element-components.js +86 -0
  307. package/dist/store/jsx/element-components.js.map +1 -0
  308. package/dist/store/jsx/element-prop-imports.d.ts +17 -0
  309. package/dist/store/jsx/element-prop-imports.d.ts.map +1 -0
  310. package/dist/store/jsx/element-prop-imports.js +15 -0
  311. package/dist/store/jsx/element-prop-imports.js.map +1 -0
  312. package/dist/store/jsx/element-prop-types.d.ts +10 -0
  313. package/dist/store/jsx/element-prop-types.d.ts.map +1 -0
  314. package/dist/store/jsx/element-prop-types.js +41 -0
  315. package/dist/store/jsx/element-prop-types.js.map +1 -0
  316. package/dist/store/jsx/gir-index.d.ts +16 -0
  317. package/dist/store/jsx/gir-index.d.ts.map +1 -0
  318. package/dist/store/jsx/gir-index.js +33 -0
  319. package/dist/store/jsx/gir-index.js.map +1 -0
  320. package/dist/store/jsx/intrinsic-elements.d.ts +27 -0
  321. package/dist/store/jsx/intrinsic-elements.d.ts.map +1 -0
  322. package/dist/store/jsx/intrinsic-elements.js +128 -0
  323. package/dist/store/jsx/intrinsic-elements.js.map +1 -0
  324. package/dist/store/{react → jsx}/jsx.d.ts +2 -4
  325. package/dist/store/jsx/jsx.d.ts.map +1 -0
  326. package/dist/store/{react → jsx}/jsx.js +110 -71
  327. package/dist/store/jsx/jsx.js.map +1 -0
  328. package/dist/store/jsx/metadata.d.ts +4 -0
  329. package/dist/store/jsx/metadata.d.ts.map +1 -0
  330. package/dist/store/{react → jsx}/metadata.js +148 -69
  331. package/dist/store/jsx/metadata.js.map +1 -0
  332. package/dist/store/jsx/pipeline.d.ts +21 -0
  333. package/dist/store/jsx/pipeline.d.ts.map +1 -0
  334. package/dist/store/{react → jsx}/pipeline.js +36 -15
  335. package/dist/store/jsx/pipeline.js.map +1 -0
  336. package/dist/store/{react → jsx}/props.d.ts +9 -12
  337. package/dist/store/jsx/props.d.ts.map +1 -0
  338. package/dist/store/jsx/props.js +158 -0
  339. package/dist/store/jsx/props.js.map +1 -0
  340. package/dist/store/jsx-store.d.ts +5 -3
  341. package/dist/store/jsx-store.d.ts.map +1 -1
  342. package/dist/store/jsx-store.js +4 -1
  343. package/dist/store/jsx-store.js.map +1 -1
  344. package/dist/store/store-fs.d.ts +14 -12
  345. package/dist/store/store-fs.d.ts.map +1 -1
  346. package/dist/store/store-fs.js +9 -7
  347. package/dist/store/store-fs.js.map +1 -1
  348. package/dist/writer/context.d.ts +2 -1
  349. package/dist/writer/context.d.ts.map +1 -1
  350. package/dist/writer/context.js +12 -6
  351. package/dist/writer/context.js.map +1 -1
  352. package/dist/writer/doc.d.ts +2 -1
  353. package/dist/writer/doc.d.ts.map +1 -1
  354. package/dist/writer/doc.js +13 -7
  355. package/dist/writer/doc.js.map +1 -1
  356. package/dist/writer/emit.d.ts +8 -7
  357. package/dist/writer/emit.d.ts.map +1 -1
  358. package/dist/writer/emit.js +13 -10
  359. package/dist/writer/emit.js.map +1 -1
  360. package/dist/writer/gtk-doc.d.ts +2 -1
  361. package/dist/writer/gtk-doc.d.ts.map +1 -1
  362. package/dist/writer/gtk-doc.js +29 -18
  363. package/dist/writer/gtk-doc.js.map +1 -1
  364. package/dist/writer/imports.d.ts +4 -2
  365. package/dist/writer/imports.d.ts.map +1 -1
  366. package/dist/writer/imports.js +35 -24
  367. package/dist/writer/imports.js.map +1 -1
  368. package/dist/writer/module.d.ts +3 -2
  369. package/dist/writer/module.d.ts.map +1 -1
  370. package/dist/writer/module.js +16 -9
  371. package/dist/writer/module.js.map +1 -1
  372. package/dist/xml.d.ts +4 -0
  373. package/dist/xml.d.ts.map +1 -0
  374. package/dist/xml.js +10 -0
  375. package/dist/xml.js.map +1 -0
  376. package/overrides/cairo/context.ts.ejs +7 -7
  377. package/overrides/cairo/matrix.ts.ejs +2 -2
  378. package/overrides/cairo/recording-surface.ts.ejs +2 -2
  379. package/overrides/cairo/region.ts.ejs +1 -1
  380. package/overrides/cairo/scaled-font.ts.ejs +3 -3
  381. package/package.json +15 -9
  382. package/src/analysis/descriptor-render.ts +484 -168
  383. package/src/analysis/descriptor.ts +162 -125
  384. package/src/analysis/inheritance.ts +286 -98
  385. package/src/analysis/param-structure.ts +188 -57
  386. package/src/analysis/ts-type.ts +112 -26
  387. package/src/compile.ts +103 -76
  388. package/src/docs/api-reference.ts +340 -144
  389. package/src/docs/element-page.ts +137 -146
  390. package/src/docs/pipeline.ts +132 -73
  391. package/src/docs/render.ts +151 -87
  392. package/src/docs/symbol-page.ts +268 -123
  393. package/src/fingerprint.ts +127 -29
  394. package/src/gi.ts +26 -0
  395. package/src/gir/ancestry.ts +26 -14
  396. package/src/gir/callback.ts +10 -15
  397. package/src/gir/class.ts +20 -16
  398. package/src/gir/enum.ts +9 -7
  399. package/src/gir/field.ts +37 -8
  400. package/src/gir/function.ts +33 -9
  401. package/src/gir/gir-path.ts +36 -12
  402. package/src/gir/libraries.ts +56 -31
  403. package/src/gir/library.ts +200 -97
  404. package/src/gir/namespace.ts +42 -26
  405. package/src/gir/nullable-overrides.ts +5 -0
  406. package/src/gir/parameter.ts +80 -42
  407. package/src/gir/parse.ts +102 -47
  408. package/src/gir/primitives.ts +25 -23
  409. package/src/gir/property.ts +13 -11
  410. package/src/gir/record.ts +16 -14
  411. package/src/gir/size.ts +91 -58
  412. package/src/gir/type-id.ts +33 -18
  413. package/src/gir/type-ref.ts +62 -26
  414. package/src/gir/type.ts +10 -8
  415. package/src/index.ts +7 -0
  416. package/src/jsx.ts +70 -0
  417. package/src/khronos/args.ts +158 -89
  418. package/src/khronos/jsdoc.ts +67 -29
  419. package/src/khronos/model.ts +154 -53
  420. package/src/khronos/modules.ts +67 -27
  421. package/src/khronos/param-pair.ts +14 -0
  422. package/src/khronos/parse.ts +37 -17
  423. package/src/khronos/pipeline.ts +193 -90
  424. package/src/khronos/plan.ts +235 -86
  425. package/src/khronos/render.ts +208 -71
  426. package/src/khronos/select.ts +48 -18
  427. package/src/react/element-config.ts +91 -0
  428. package/src/runner.ts +93 -57
  429. package/src/store/compile-store.ts +32 -26
  430. package/src/store/gi/async.ts +48 -21
  431. package/src/store/gi/callables.ts +345 -136
  432. package/src/store/gi/callback.ts +13 -4
  433. package/src/store/gi/class-struct-record.ts +49 -17
  434. package/src/store/gi/class.ts +186 -64
  435. package/src/store/gi/companion.ts +15 -6
  436. package/src/store/gi/constant.ts +42 -8
  437. package/src/store/gi/constructor-props.ts +42 -16
  438. package/src/store/gi/enum.ts +28 -13
  439. package/src/store/gi/function.ts +90 -24
  440. package/src/store/gi/gtype-binding.ts +31 -18
  441. package/src/store/gi/interface.ts +101 -36
  442. package/src/store/gi/item-comparators.ts +74 -26
  443. package/src/store/gi/method.ts +376 -159
  444. package/src/store/gi/param-marshal.ts +38 -15
  445. package/src/store/gi/pipeline.ts +72 -22
  446. package/src/store/gi/properties.ts +16 -5
  447. package/src/store/gi/property-accessor.ts +192 -84
  448. package/src/store/gi/record-constructor.ts +62 -30
  449. package/src/store/gi/record-field-accessor.ts +380 -167
  450. package/src/store/gi/record-layout.ts +130 -43
  451. package/src/store/gi/record.ts +37 -14
  452. package/src/store/gi/registration.ts +15 -9
  453. package/src/store/gi/return-wrap.ts +71 -23
  454. package/src/store/gi/runtime-override.ts +13 -3
  455. package/src/store/gi/signal.ts +244 -104
  456. package/src/store/gi/vtable.ts +117 -41
  457. package/src/store/gi-store.ts +26 -13
  458. package/src/store/jsx/element-components.ts +152 -0
  459. package/src/store/jsx/element-prop-imports.ts +24 -0
  460. package/src/store/jsx/element-prop-types.ts +59 -0
  461. package/src/store/jsx/gir-index.ts +62 -0
  462. package/src/store/jsx/intrinsic-elements.ts +262 -0
  463. package/src/store/{react → jsx}/jsx.ts +213 -99
  464. package/src/store/jsx/metadata.ts +385 -0
  465. package/src/store/jsx/pipeline.ts +145 -0
  466. package/src/store/jsx/props.ts +274 -0
  467. package/src/store/jsx-store.ts +15 -3
  468. package/src/store/store-fs.ts +36 -20
  469. package/src/writer/context.ts +25 -6
  470. package/src/writer/doc.ts +19 -5
  471. package/src/writer/emit.ts +20 -11
  472. package/src/writer/gtk-doc.ts +48 -21
  473. package/src/writer/imports.ts +63 -28
  474. package/src/writer/module.ts +35 -11
  475. package/src/xml.ts +12 -0
  476. package/dist/store/react/built-ins.d.ts +0 -9
  477. package/dist/store/react/built-ins.d.ts.map +0 -1
  478. package/dist/store/react/built-ins.js +0 -226
  479. package/dist/store/react/built-ins.js.map +0 -1
  480. package/dist/store/react/element-components.d.ts +0 -15
  481. package/dist/store/react/element-components.d.ts.map +0 -1
  482. package/dist/store/react/element-components.js +0 -92
  483. package/dist/store/react/element-components.js.map +0 -1
  484. package/dist/store/react/element-prop-types.d.ts +0 -19
  485. package/dist/store/react/element-prop-types.d.ts.map +0 -1
  486. package/dist/store/react/element-prop-types.js +0 -244
  487. package/dist/store/react/element-prop-types.js.map +0 -1
  488. package/dist/store/react/element-props.d.ts +0 -4
  489. package/dist/store/react/element-props.d.ts.map +0 -1
  490. package/dist/store/react/element-props.js +0 -178
  491. package/dist/store/react/element-props.js.map +0 -1
  492. package/dist/store/react/gir-index.d.ts +0 -25
  493. package/dist/store/react/gir-index.d.ts.map +0 -1
  494. package/dist/store/react/gir-index.js +0 -55
  495. package/dist/store/react/gir-index.js.map +0 -1
  496. package/dist/store/react/intrinsic-elements.d.ts +0 -26
  497. package/dist/store/react/intrinsic-elements.d.ts.map +0 -1
  498. package/dist/store/react/intrinsic-elements.js +0 -107
  499. package/dist/store/react/intrinsic-elements.js.map +0 -1
  500. package/dist/store/react/jsx.d.ts.map +0 -1
  501. package/dist/store/react/jsx.js.map +0 -1
  502. package/dist/store/react/metadata.d.ts +0 -4
  503. package/dist/store/react/metadata.d.ts.map +0 -1
  504. package/dist/store/react/metadata.js.map +0 -1
  505. package/dist/store/react/pipeline.d.ts +0 -14
  506. package/dist/store/react/pipeline.d.ts.map +0 -1
  507. package/dist/store/react/pipeline.js.map +0 -1
  508. package/dist/store/react/props.d.ts.map +0 -1
  509. package/dist/store/react/props.js +0 -133
  510. package/dist/store/react/props.js.map +0 -1
  511. package/overrides/gtk/constants.ts.ejs +0 -3
  512. package/overrides/gtk/index.ts.ejs +0 -2
  513. package/src/store/react/built-ins.ts +0 -260
  514. package/src/store/react/element-components.ts +0 -138
  515. package/src/store/react/element-prop-types.ts +0 -280
  516. package/src/store/react/element-props.ts +0 -204
  517. package/src/store/react/gir-index.ts +0 -85
  518. package/src/store/react/intrinsic-elements.ts +0 -161
  519. package/src/store/react/metadata.ts +0 -197
  520. package/src/store/react/pipeline.ts +0 -90
  521. package/src/store/react/props.ts +0 -197
@@ -1,114 +1,155 @@
1
- import { lowerFirst, toCamelCase, toCamelIdentifier, toPascalCase } from "@gtkx/utils";
1
+ import { camelCase, lowerFirst, pascalCase, toCamelIdentifier } from "@gtkx/utils";
2
2
  import { ancestorChain, resolveInterface } from "../gir/ancestry.js";
3
3
  import { methodExportName } from "../store/gi/method.js";
4
4
  import { resolveAccessorType } from "../store/gi/property-accessor.js";
5
5
  import { inputParameters } from "./param-structure.js";
6
6
  import { renderTsType } from "./ts-type.js";
7
- export const resolveImplementedInterface = (context, name, defaultNamespace = context.namespace.name) => resolveInterface(context.library, defaultNamespace, name);
7
+ const RESERVED_SIGNAL_MEMBERS = new Set([
8
+ "connect",
9
+ "disconnect",
10
+ "emit",
11
+ "on",
12
+ "once",
13
+ "off",
14
+ "addEventListener",
15
+ "removeEventListener",
16
+ ]);
17
+ const resolveImplementedInterface = (context, name, defaultNamespace = context.namespace.name) => resolveInterface(context.library, defaultNamespace, name);
8
18
  const resolveDirectInterfaces = (context, klass, defaultNamespace) => {
9
19
  const interfaces = [];
10
20
  for (const implementName of klass.implements) {
11
21
  const iface = resolveImplementedInterface(context, implementName, defaultNamespace);
12
- if (iface !== undefined)
22
+ if (iface !== undefined) {
13
23
  interfaces.push(iface);
24
+ }
14
25
  }
15
26
  return interfaces;
16
27
  };
17
- export const resolvePrerequisiteReference = (context, name) => {
28
+ const resolvePrerequisiteReference = (context, name) => {
18
29
  const resolved = context.library.resolveType(context.namespace.name, name);
19
- if (resolved === undefined)
30
+ if (resolved === undefined) {
20
31
  return undefined;
21
- if (resolved.kind !== "interface" && resolved.kind !== "class")
32
+ }
33
+ if (resolved.kind !== "interface" && resolved.kind !== "class") {
22
34
  return undefined;
23
- return context.qualify(resolved.namespace.name, toPascalCase(resolved.value.name));
35
+ }
36
+ return context.qualify(resolved.namespace.name, pascalCase(resolved.value.name));
24
37
  };
25
- export const forEachAncestor = (context, klass, visit, stop = () => false) => {
26
- let first = true;
38
+ const forEachAncestor = (context, klass, visit, shouldStop = () => false) => {
39
+ let isFirst = true;
27
40
  for (const ancestor of ancestorChain(context.library, klass, context.namespace.name)) {
28
- if (first) {
29
- first = false;
41
+ if (isFirst) {
42
+ isFirst = false;
30
43
  continue;
31
44
  }
32
- if (stop(ancestor.klass))
45
+ if (shouldStop(ancestor.klass)) {
33
46
  break;
47
+ }
34
48
  visit(ancestor, resolveDirectInterfaces(context, ancestor.klass, ancestor.namespaceName));
35
49
  }
36
50
  };
51
+ const visitInterfaceProperties = (interfaces, visit) => {
52
+ for (const iface of interfaces) {
53
+ for (const property of iface.klass.properties) {
54
+ visit(iface.klass, property);
55
+ }
56
+ }
57
+ };
37
58
  const forEachInheritedProperty = (context, klass, visit) => {
38
59
  forEachAncestor(context, klass, (ancestor, interfaces) => {
39
- for (const property of ancestor.klass.properties)
60
+ for (const property of ancestor.klass.properties) {
40
61
  visit(ancestor.klass, property);
41
- for (const iface of interfaces) {
42
- for (const property of iface.klass.properties)
43
- visit(iface.klass, property);
44
62
  }
63
+ visitInterfaceProperties(interfaces, visit);
45
64
  });
46
65
  };
47
- export const collectInterfaceProperties = (context, klass) => {
66
+ const collectSeenPropertyNames = (context, klass) => {
48
67
  const seen = new Set();
49
- for (const property of klass.properties)
68
+ for (const property of klass.properties) {
50
69
  seen.add(toCamelIdentifier(property.name));
70
+ }
51
71
  forEachInheritedProperty(context, klass, (_owner, property) => seen.add(toCamelIdentifier(property.name)));
72
+ return seen;
73
+ };
74
+ const collectNewInterfaceProperties = (iface, seen) => {
52
75
  const result = [];
53
- for (const iface of resolveDirectInterfaces(context, klass, context.namespace.name)) {
54
- for (const property of iface.klass.properties) {
55
- const name = toCamelIdentifier(property.name);
56
- if (seen.has(name))
57
- continue;
58
- seen.add(name);
59
- result.push({ owner: iface.klass, property });
76
+ for (const property of iface.klass.properties) {
77
+ const name = toCamelIdentifier(property.name);
78
+ if (seen.has(name)) {
79
+ continue;
60
80
  }
81
+ seen.add(name);
82
+ result.push({ owner: iface.klass, property });
83
+ }
84
+ return result;
85
+ };
86
+ const collectInterfaceProperties = (context, klass) => {
87
+ const seen = collectSeenPropertyNames(context, klass);
88
+ const result = [];
89
+ for (const iface of resolveDirectInterfaces(context, klass, context.namespace.name)) {
90
+ result.push(...collectNewInterfaceProperties(iface, seen));
61
91
  }
62
92
  return result;
63
93
  };
94
+ const recordAncestorSignatures = (context, klass, signatures) => {
95
+ for (const method of klass.methods) {
96
+ const name = camelCase(method.name);
97
+ if (!method.introspectable || signatures.has(name)) {
98
+ continue;
99
+ }
100
+ signatures.set(name, {
101
+ returnType: renderTsType(context, method.returnValue.type, method.returnValue.nullable),
102
+ arity: inputParameters(context.library, method).length,
103
+ });
104
+ }
105
+ };
64
106
  const ancestorClassMethodSignatures = (context, klass) => {
65
107
  const signatures = new Map();
66
108
  forEachAncestor(context, klass, (ancestor) => {
67
- for (const method of ancestor.klass.methods) {
68
- if (!method.introspectable)
69
- continue;
70
- const name = toCamelCase(method.name);
71
- if (signatures.has(name))
72
- continue;
73
- signatures.set(name, {
74
- returnType: renderTsType(context, method.returnValue.type, method.returnValue.nullable),
75
- arity: inputParameters(context.library, method).length,
76
- });
77
- }
109
+ recordAncestorSignatures(context, ancestor.klass, signatures);
78
110
  });
79
111
  return signatures;
80
112
  };
81
- export const collectInterfaceMergeOmissions = (context, klass, iface) => {
113
+ const mergeOmissionName = (context, method, ancestors) => {
114
+ if (!method.introspectable) {
115
+ return undefined;
116
+ }
117
+ const name = camelCase(method.name);
118
+ const ancestor = ancestors.get(name);
119
+ if (ancestor === undefined) {
120
+ return undefined;
121
+ }
122
+ const returnType = renderTsType(context, method.returnValue.type, method.returnValue.nullable);
123
+ const arity = inputParameters(context.library, method).length;
124
+ return ancestor.returnType !== returnType || ancestor.arity !== arity ? name : undefined;
125
+ };
126
+ const collectInterfaceMergeOmissions = (context, klass, iface) => {
82
127
  const ancestors = ancestorClassMethodSignatures(context, klass);
83
128
  const omissions = [];
84
129
  for (const method of iface.klass.methods) {
85
- if (!method.introspectable)
86
- continue;
87
- const name = toCamelCase(method.name);
88
- const ancestor = ancestors.get(name);
89
- if (ancestor === undefined)
90
- continue;
91
- const returnType = renderTsType(context, method.returnValue.type, method.returnValue.nullable);
92
- const arity = inputParameters(context.library, method).length;
93
- if (ancestor.returnType !== returnType || ancestor.arity !== arity)
130
+ const name = mergeOmissionName(context, method, ancestors);
131
+ if (name !== undefined) {
94
132
  omissions.push(name);
133
+ }
95
134
  }
96
135
  return omissions;
97
136
  };
98
- export const collectInheritedPropertyTypes = (context, klass) => {
137
+ const collectInheritedPropertyTypes = (context, klass) => {
99
138
  const types = new Map();
100
139
  const record = (owner, property) => {
101
140
  const jsName = toCamelIdentifier(property.name);
102
- if (types.has(jsName))
141
+ if (types.has(jsName)) {
103
142
  return;
143
+ }
104
144
  const tsType = resolveAccessorType(context, property, owner.methods);
105
- if (tsType !== undefined)
145
+ if (tsType !== undefined) {
106
146
  types.set(jsName, tsType);
147
+ }
107
148
  };
108
149
  forEachInheritedProperty(context, klass, record);
109
150
  return types;
110
151
  };
111
- export const collectInheritedMethods = (context, klass) => {
152
+ const collectInheritedMethods = (context, klass) => {
112
153
  const accumulator = {
113
154
  returnTypes: new Map(),
114
155
  definitions: new Map(),
@@ -118,54 +159,66 @@ export const collectInheritedMethods = (context, klass) => {
118
159
  }
119
160
  forEachAncestor(context, klass, (ancestor, interfaces) => {
120
161
  absorbInheritedMethods(context, ancestor, accumulator);
121
- for (const iface of interfaces)
162
+ for (const iface of interfaces) {
122
163
  absorbInheritedMethods(context, iface, accumulator);
164
+ }
123
165
  });
124
166
  return accumulator;
125
167
  };
126
168
  const absorbInheritedMethods = (context, resolved, accumulator) => {
127
169
  const { returnTypes, definitions } = accumulator;
128
170
  for (const method of resolved.klass.methods) {
129
- if (!method.introspectable)
171
+ if (!method.introspectable) {
130
172
  continue;
131
- const name = toCamelCase(method.name);
132
- if (returnTypes.has(name))
173
+ }
174
+ const name = camelCase(method.name);
175
+ if (returnTypes.has(name)) {
133
176
  continue;
177
+ }
134
178
  definitions.set(name, { method, namespaceName: resolved.namespaceName });
135
179
  returnTypes.set(name, renderTsType(context, method.returnValue.type, method.returnValue.nullable));
136
180
  }
137
181
  };
138
- const RESERVED_SIGNAL_MEMBERS = new Set([
139
- "connect",
140
- "disconnect",
141
- "emit",
142
- "on",
143
- "once",
144
- "off",
145
- "addEventListener",
146
- "removeEventListener",
147
- ]);
148
- export const conflictRename = (context, callable, inherited, className) => {
149
- if (!callable.introspectable)
150
- return undefined;
151
- const name = methodExportName(callable);
152
- if (RESERVED_SIGNAL_MEMBERS.has(name))
153
- return conflictingMethodName(className, callable.name);
182
+ const inheritedMatch = (inherited, name) => {
154
183
  const inheritedReturn = inherited.returnTypes.get(name);
155
184
  const inheritedMethod = inherited.definitions.get(name);
156
- if (inheritedReturn === undefined || inheritedMethod === undefined)
185
+ if (inheritedReturn === undefined || inheritedMethod === undefined) {
157
186
  return undefined;
187
+ }
188
+ return { inheritedReturn, inheritedMethod };
189
+ };
190
+ const hasMethodConflict = (options) => {
191
+ const { context, callable, inheritedReturn, inheritedMethod } = options;
158
192
  const ownReturn = renderTsType(context, callable.returnValue.type, callable.returnValue.nullable);
159
- const conflicts = inheritedReturn !== ownReturn ||
193
+ return (inheritedReturn !== ownReturn ||
160
194
  hasParameterEnumConflict(context, callable, inheritedMethod) ||
161
195
  inputParameters(context.library, callable).length !==
162
- inputParameters(context.library, inheritedMethod.method).length;
163
- return conflicts ? conflictingMethodName(className, callable.name) : undefined;
196
+ inputParameters(context.library, inheritedMethod.method).length);
164
197
  };
165
- const conflictingMethodName = (className, methodName) => `${lowerFirst(className)}${toPascalCase(methodName)}`;
166
- export const reservedSignalMemberRename = (className, callable) => RESERVED_SIGNAL_MEMBERS.has(methodExportName(callable))
198
+ const conflictRename = (context, callable, inherited, className) => {
199
+ if (!callable.introspectable) {
200
+ return undefined;
201
+ }
202
+ const name = methodExportName(callable);
203
+ if (RESERVED_SIGNAL_MEMBERS.has(name)) {
204
+ return conflictingMethodName(className, callable.name);
205
+ }
206
+ const match = inheritedMatch(inherited, name);
207
+ if (match === undefined) {
208
+ return undefined;
209
+ }
210
+ const hasConflict = hasMethodConflict({ context, callable, ...match });
211
+ return hasConflict ? conflictingMethodName(className, callable.name) : undefined;
212
+ };
213
+ const conflictingMethodName = (className, methodName) => `${lowerFirst(className)}${pascalCase(methodName)}`;
214
+ const reservedSignalMemberRename = (className, callable) => RESERVED_SIGNAL_MEMBERS.has(methodExportName(callable))
167
215
  ? conflictingMethodName(className, callable.name)
168
216
  : undefined;
217
+ const hasEnumConflict = (context, ownRef, inheritedRef) => {
218
+ const ownEnum = enumIdentity(context, ownRef);
219
+ const inheritedEnum = enumIdentity(context, inheritedRef);
220
+ return ownEnum !== undefined && inheritedEnum !== undefined && ownEnum !== inheritedEnum;
221
+ };
169
222
  const hasParameterEnumConflict = (context, own, inherited) => {
170
223
  const ownParams = inputParameters(context.library, own);
171
224
  const inheritedParams = inputParameters(context.library, inherited.method);
@@ -173,21 +226,23 @@ const hasParameterEnumConflict = (context, own, inherited) => {
173
226
  for (let index = 0; index < count; index += 1) {
174
227
  const ownParam = ownParams[index];
175
228
  const inheritedParam = inheritedParams[index];
176
- if (ownParam === undefined || inheritedParam === undefined)
177
- continue;
178
- const ownEnum = enumIdentity(context, ownParam.parameter.type);
179
- const inheritedEnum = enumIdentity(context, inheritedParam.parameter.type);
180
- if (ownEnum !== undefined && inheritedEnum !== undefined && ownEnum !== inheritedEnum)
229
+ if (ownParam !== undefined &&
230
+ inheritedParam !== undefined &&
231
+ hasEnumConflict(context, ownParam.parameter.type, inheritedParam.parameter.type)) {
181
232
  return true;
233
+ }
182
234
  }
183
235
  return false;
184
236
  };
185
237
  const enumIdentity = (context, ref) => {
186
- if (ref === undefined)
238
+ if (ref === undefined) {
187
239
  return undefined;
188
- const resolved = context.library.typeOf(ref);
189
- if (resolved?.kind !== "enum")
240
+ }
241
+ const resolved = context.library.typeFor(ref);
242
+ if (resolved?.kind !== "enum") {
190
243
  return undefined;
244
+ }
191
245
  return `${resolved.namespace.name}.${resolved.value.name}`;
192
246
  };
247
+ export { resolveImplementedInterface, resolvePrerequisiteReference, forEachAncestor, collectInterfaceProperties, collectInterfaceMergeOmissions, collectInheritedPropertyTypes, collectInheritedMethods, conflictRename, reservedSignalMemberRename, };
193
248
  //# sourceMappingURL=in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CAAC;IACvG,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAAsB,EAAE,GAAuB,EAAsB,EAAE;IACzF,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACxC,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,QAAQ,EAAE,IAAI,KAAK,MAAM;QAAE,OAAO,SAAS,CAAC;IAChD,OAAO,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;AAC/D,CAAC,CAAC","sourcesContent":["import { lowerFirst, toCamelCase, toCamelIdentifier, toPascalCase } from \"@gtkx/utils\";\nimport { ancestorChain, type ResolvedAncestor, resolveInterface } from \"../gir/ancestry.js\";\nimport type { GirClass } from \"../gir/class.js\";\nimport type { GirFunction } from \"../gir/function.js\";\nimport type { Library } from \"../gir/library.js\";\nimport type { GirProperty } from \"../gir/property.js\";\nimport type { TypeId } from \"../gir/type-id.js\";\nimport { methodExportName } from \"../store/gi/method.js\";\nimport { resolveAccessorType } from \"../store/gi/property-accessor.js\";\nimport type { ModuleContext } from \"../writer/context.js\";\nimport { inputParameters } from \"./param-structure.js\";\nimport { renderTsType } from \"./ts-type.js\";\n\ntype AncestryContext = {\n library: Library;\n namespace: { name: string };\n};\n\nexport const resolveImplementedInterface = (\n context: AncestryContext,\n name: string,\n defaultNamespace: string = context.namespace.name,\n): ResolvedAncestor | undefined => resolveInterface(context.library, defaultNamespace, name);\n\nconst resolveDirectInterfaces = (\n context: AncestryContext,\n klass: GirClass,\n defaultNamespace: string,\n): ResolvedAncestor[] => {\n const interfaces: ResolvedAncestor[] = [];\n for (const implementName of klass.implements) {\n const iface = resolveImplementedInterface(context, implementName, defaultNamespace);\n if (iface !== undefined) interfaces.push(iface);\n }\n return interfaces;\n};\n\nexport const resolvePrerequisiteReference = (context: ModuleContext, name: string): string | undefined => {\n const resolved = context.library.resolveType(context.namespace.name, name);\n if (resolved === undefined) return undefined;\n if (resolved.kind !== \"interface\" && resolved.kind !== \"class\") return undefined;\n return context.qualify(resolved.namespace.name, toPascalCase(resolved.value.name));\n};\n\nexport const forEachAncestor = (\n context: AncestryContext,\n klass: GirClass,\n visit: (ancestor: ResolvedAncestor, interfaces: ResolvedAncestor[]) => void,\n stop: (ancestor: GirClass) => boolean = () => false,\n): void => {\n let first = true;\n for (const ancestor of ancestorChain(context.library, klass, context.namespace.name)) {\n if (first) {\n first = false;\n continue;\n }\n if (stop(ancestor.klass)) break;\n visit(ancestor, resolveDirectInterfaces(context, ancestor.klass, ancestor.namespaceName));\n }\n};\n\nconst forEachInheritedProperty = (\n context: ModuleContext,\n klass: GirClass,\n visit: (owner: GirClass, property: GirProperty) => void,\n): void => {\n forEachAncestor(context, klass, (ancestor, interfaces) => {\n for (const property of ancestor.klass.properties) visit(ancestor.klass, property);\n for (const iface of interfaces) {\n for (const property of iface.klass.properties) visit(iface.klass, property);\n }\n });\n};\n\nexport type OwnedProperty = { owner: GirClass; property: GirProperty };\n\nexport const collectInterfaceProperties = (context: ModuleContext, klass: GirClass): OwnedProperty[] => {\n const seen = new Set<string>();\n for (const property of klass.properties) seen.add(toCamelIdentifier(property.name));\n forEachInheritedProperty(context, klass, (_owner, property) => seen.add(toCamelIdentifier(property.name)));\n const result: OwnedProperty[] = [];\n for (const iface of resolveDirectInterfaces(context, klass, context.namespace.name)) {\n for (const property of iface.klass.properties) {\n const name = toCamelIdentifier(property.name);\n if (seen.has(name)) continue;\n seen.add(name);\n result.push({ owner: iface.klass, property });\n }\n }\n return result;\n};\n\ntype MethodSignature = { returnType: string; arity: number };\n\nconst ancestorClassMethodSignatures = (context: ModuleContext, klass: GirClass): Map<string, MethodSignature> => {\n const signatures = new Map<string, MethodSignature>();\n forEachAncestor(context, klass, (ancestor) => {\n for (const method of ancestor.klass.methods) {\n if (!method.introspectable) continue;\n const name = toCamelCase(method.name);\n if (signatures.has(name)) continue;\n signatures.set(name, {\n returnType: renderTsType(context, method.returnValue.type, method.returnValue.nullable),\n arity: inputParameters(context.library, method).length,\n });\n }\n });\n return signatures;\n};\n\nexport const collectInterfaceMergeOmissions = (\n context: ModuleContext,\n klass: GirClass,\n iface: { klass: GirClass; namespaceName: string },\n): string[] => {\n const ancestors = ancestorClassMethodSignatures(context, klass);\n const omissions: string[] = [];\n for (const method of iface.klass.methods) {\n if (!method.introspectable) continue;\n const name = toCamelCase(method.name);\n const ancestor = ancestors.get(name);\n if (ancestor === undefined) continue;\n const returnType = renderTsType(context, method.returnValue.type, method.returnValue.nullable);\n const arity = inputParameters(context.library, method).length;\n if (ancestor.returnType !== returnType || ancestor.arity !== arity) omissions.push(name);\n }\n return omissions;\n};\n\nexport const collectInheritedPropertyTypes = (context: ModuleContext, klass: GirClass): Map<string, string> => {\n const types = new Map<string, string>();\n const record = (owner: GirClass, property: GirProperty): void => {\n const jsName = toCamelIdentifier(property.name);\n if (types.has(jsName)) return;\n const tsType = resolveAccessorType(context, property, owner.methods);\n if (tsType !== undefined) types.set(jsName, tsType);\n };\n forEachInheritedProperty(context, klass, record);\n return types;\n};\n\ntype InheritedMethod = {\n method: GirFunction;\n namespaceName: string;\n};\n\nexport type InheritedMethods = {\n returnTypes: Map<string, string>;\n definitions: Map<string, InheritedMethod>;\n};\n\nexport const collectInheritedMethods = (context: ModuleContext, klass: GirClass): InheritedMethods => {\n const accumulator: InheritedMethods = {\n returnTypes: new Map<string, string>(),\n definitions: new Map<string, InheritedMethod>(),\n };\n for (const iface of resolveDirectInterfaces(context, klass, context.namespace.name)) {\n absorbInheritedMethods(context, iface, accumulator);\n }\n forEachAncestor(context, klass, (ancestor, interfaces) => {\n absorbInheritedMethods(context, ancestor, accumulator);\n for (const iface of interfaces) absorbInheritedMethods(context, iface, accumulator);\n });\n return accumulator;\n};\n\nconst absorbInheritedMethods = (\n context: ModuleContext,\n resolved: { klass: GirClass; namespaceName: string },\n accumulator: InheritedMethods,\n): void => {\n const { returnTypes, definitions } = accumulator;\n for (const method of resolved.klass.methods) {\n if (!method.introspectable) continue;\n const name = toCamelCase(method.name);\n if (returnTypes.has(name)) continue;\n definitions.set(name, { method, namespaceName: resolved.namespaceName });\n returnTypes.set(name, renderTsType(context, method.returnValue.type, method.returnValue.nullable));\n }\n};\n\nconst RESERVED_SIGNAL_MEMBERS = new Set([\n \"connect\",\n \"disconnect\",\n \"emit\",\n \"on\",\n \"once\",\n \"off\",\n \"addEventListener\",\n \"removeEventListener\",\n]);\n\nexport const conflictRename = (\n context: ModuleContext,\n callable: GirFunction,\n inherited: InheritedMethods,\n className: string,\n): string | undefined => {\n if (!callable.introspectable) return undefined;\n const name = methodExportName(callable);\n if (RESERVED_SIGNAL_MEMBERS.has(name)) return conflictingMethodName(className, callable.name);\n const inheritedReturn = inherited.returnTypes.get(name);\n const inheritedMethod = inherited.definitions.get(name);\n if (inheritedReturn === undefined || inheritedMethod === undefined) return undefined;\n const ownReturn = renderTsType(context, callable.returnValue.type, callable.returnValue.nullable);\n const conflicts =\n inheritedReturn !== ownReturn ||\n hasParameterEnumConflict(context, callable, inheritedMethod) ||\n inputParameters(context.library, callable).length !==\n inputParameters(context.library, inheritedMethod.method).length;\n return conflicts ? conflictingMethodName(className, callable.name) : undefined;\n};\n\nconst conflictingMethodName = (className: string, methodName: string): string =>\n `${lowerFirst(className)}${toPascalCase(methodName)}`;\n\nexport const reservedSignalMemberRename = (className: string, callable: GirFunction): string | undefined =>\n RESERVED_SIGNAL_MEMBERS.has(methodExportName(callable))\n ? conflictingMethodName(className, callable.name)\n : undefined;\n\nconst hasParameterEnumConflict = (context: ModuleContext, own: GirFunction, inherited: InheritedMethod): boolean => {\n const ownParams = inputParameters(context.library, own);\n const inheritedParams = inputParameters(context.library, inherited.method);\n const count = Math.min(ownParams.length, inheritedParams.length);\n for (let index = 0; index < count; index += 1) {\n const ownParam = ownParams[index];\n const inheritedParam = inheritedParams[index];\n if (ownParam === undefined || inheritedParam === undefined) continue;\n const ownEnum = enumIdentity(context, ownParam.parameter.type);\n const inheritedEnum = enumIdentity(context, inheritedParam.parameter.type);\n if (ownEnum !== undefined && inheritedEnum !== undefined && ownEnum !== inheritedEnum) return true;\n }\n return false;\n};\n\nconst enumIdentity = (context: ModuleContext, ref: TypeId | undefined): string | undefined => {\n if (ref === undefined) return undefined;\n const resolved = context.library.typeOf(ref);\n if (resolved?.kind !== \"enum\") return undefined;\n return `${resolved.namespace.name}.${resolved.value.name}`;\n};\n"]}
1
+ {"version":3,"file":"inheritance.js","sourceRoot":"","sources":["../../src/analysis/inheritance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOnF,OAAO,EAAE,aAAa,EAAyB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAyB5C,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IACpC,SAAS;IACT,YAAY;IACZ,MAAM;IACN,IAAI;IACJ,MAAM;IACN,KAAK;IACL,kBAAkB;IAClB,qBAAqB;CACxB,CAAC,CAAC;AAEH,MAAM,2BAA2B,GAAG,CAChC,OAAwB,EACxB,IAAY,EACZ,mBAA2B,OAAO,CAAC,SAAS,CAAC,IAAI,EACrB,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC;AAE7F,MAAM,uBAAuB,GAAG,CAC5B,OAAwB,EACxB,KAAe,EACf,gBAAwB,EACN,EAAE;IACpB,MAAM,UAAU,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zF,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAE9C,IAAI,QAAQ,EAAE,IAAI,KAAK,MAAM,EAAE,CAAC;QAC5B,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,OAAO,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;AAC/D,CAAC,CAAC;AAEF,OAAO,EACH,2BAA2B,EAC3B,4BAA4B,EAC5B,eAAe,EACf,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,EAC7B,uBAAuB,EACvB,cAAc,EACd,0BAA0B,GAG7B,CAAC","sourcesContent":["import { camelCase, lowerFirst, pascalCase, toCamelIdentifier } from \"@gtkx/utils\";\nimport type { GirClass } from \"../gir/class.js\";\nimport type { GirFunction } from \"../gir/function.js\";\nimport type { Library } from \"../gir/library.js\";\nimport type { GirProperty } from \"../gir/property.js\";\nimport type { TypeId } from \"../gir/type-id.js\";\nimport type { ModuleContext } from \"../writer/context.js\";\nimport { ancestorChain, type ResolvedAncestor, resolveInterface } from \"../gir/ancestry.js\";\nimport { methodExportName } from \"../store/gi/method.js\";\nimport { resolveAccessorType } from \"../store/gi/property-accessor.js\";\nimport { inputParameters } from \"./param-structure.js\";\nimport { renderTsType } from \"./ts-type.js\";\n\ntype AncestryContext = {\n library: Library;\n namespace: { name: string };\n};\n\ntype OwnedProperty = { owner: GirClass; property: GirProperty };\ntype MethodSignature = { returnType: string; arity: number };\n\ntype InheritedMethod = {\n method: GirFunction;\n namespaceName: string;\n};\n\ntype InheritedMethods = {\n returnTypes: Map<string, string>;\n definitions: Map<string, InheritedMethod>;\n};\n\ntype InheritedMatch = {\n inheritedReturn: string;\n inheritedMethod: InheritedMethod;\n};\n\nconst RESERVED_SIGNAL_MEMBERS = new Set([\n \"connect\",\n \"disconnect\",\n \"emit\",\n \"on\",\n \"once\",\n \"off\",\n \"addEventListener\",\n \"removeEventListener\",\n]);\n\nconst resolveImplementedInterface = (\n context: AncestryContext,\n name: string,\n defaultNamespace: string = context.namespace.name,\n): ResolvedAncestor | undefined => resolveInterface(context.library, defaultNamespace, name);\n\nconst resolveDirectInterfaces = (\n context: AncestryContext,\n klass: GirClass,\n defaultNamespace: string,\n): ResolvedAncestor[] => {\n const interfaces: ResolvedAncestor[] = [];\n\n for (const implementName of klass.implements) {\n const iface = resolveImplementedInterface(context, implementName, defaultNamespace);\n\n if (iface !== undefined) {\n interfaces.push(iface);\n }\n }\n\n return interfaces;\n};\n\nconst resolvePrerequisiteReference = (context: ModuleContext, name: string): string | undefined => {\n const resolved = context.library.resolveType(context.namespace.name, name);\n\n if (resolved === undefined) {\n return undefined;\n }\n\n if (resolved.kind !== \"interface\" && resolved.kind !== \"class\") {\n return undefined;\n }\n\n return context.qualify(resolved.namespace.name, pascalCase(resolved.value.name));\n};\n\nconst forEachAncestor = (\n context: AncestryContext,\n klass: GirClass,\n visit: (ancestor: ResolvedAncestor, interfaces: ResolvedAncestor[]) => void,\n shouldStop: (ancestor: GirClass) => boolean = () => false,\n): void => {\n let isFirst = true;\n\n for (const ancestor of ancestorChain(context.library, klass, context.namespace.name)) {\n if (isFirst) {\n isFirst = false;\n continue;\n }\n\n if (shouldStop(ancestor.klass)) {\n break;\n }\n\n visit(ancestor, resolveDirectInterfaces(context, ancestor.klass, ancestor.namespaceName));\n }\n};\n\nconst visitInterfaceProperties = (\n interfaces: ResolvedAncestor[],\n visit: (owner: GirClass, property: GirProperty) => void,\n): void => {\n for (const iface of interfaces) {\n for (const property of iface.klass.properties) {\n visit(iface.klass, property);\n }\n }\n};\n\nconst forEachInheritedProperty = (\n context: ModuleContext,\n klass: GirClass,\n visit: (owner: GirClass, property: GirProperty) => void,\n): void => {\n forEachAncestor(context, klass, (ancestor, interfaces) => {\n for (const property of ancestor.klass.properties) {\n visit(ancestor.klass, property);\n }\n\n visitInterfaceProperties(interfaces, visit);\n });\n};\n\nconst collectSeenPropertyNames = (context: ModuleContext, klass: GirClass): Set<string> => {\n const seen: Set<string> = new Set();\n\n for (const property of klass.properties) {\n seen.add(toCamelIdentifier(property.name));\n }\n\n forEachInheritedProperty(context, klass, (_owner, property) => seen.add(toCamelIdentifier(property.name)));\n\n return seen;\n};\n\nconst collectNewInterfaceProperties = (iface: ResolvedAncestor, seen: Set<string>): OwnedProperty[] => {\n const result: OwnedProperty[] = [];\n\n for (const property of iface.klass.properties) {\n const name = toCamelIdentifier(property.name);\n\n if (seen.has(name)) {\n continue;\n }\n\n seen.add(name);\n result.push({ owner: iface.klass, property });\n }\n\n return result;\n};\n\nconst collectInterfaceProperties = (context: ModuleContext, klass: GirClass): OwnedProperty[] => {\n const seen = collectSeenPropertyNames(context, klass);\n const result: OwnedProperty[] = [];\n\n for (const iface of resolveDirectInterfaces(context, klass, context.namespace.name)) {\n result.push(...collectNewInterfaceProperties(iface, seen));\n }\n\n return result;\n};\n\nconst recordAncestorSignatures = (\n context: ModuleContext,\n klass: GirClass,\n signatures: Map<string, MethodSignature>,\n): void => {\n for (const method of klass.methods) {\n const name = camelCase(method.name);\n\n if (!method.introspectable || signatures.has(name)) {\n continue;\n }\n\n signatures.set(name, {\n returnType: renderTsType(context, method.returnValue.type, method.returnValue.nullable),\n arity: inputParameters(context.library, method).length,\n });\n }\n};\n\nconst ancestorClassMethodSignatures = (context: ModuleContext, klass: GirClass): Map<string, MethodSignature> => {\n const signatures: Map<string, MethodSignature> = new Map();\n\n forEachAncestor(context, klass, (ancestor) => {\n recordAncestorSignatures(context, ancestor.klass, signatures);\n });\n\n return signatures;\n};\n\nconst mergeOmissionName = (\n context: ModuleContext,\n method: GirFunction,\n ancestors: Map<string, MethodSignature>,\n): string | undefined => {\n if (!method.introspectable) {\n return undefined;\n }\n\n const name = camelCase(method.name);\n const ancestor = ancestors.get(name);\n\n if (ancestor === undefined) {\n return undefined;\n }\n\n const returnType = renderTsType(context, method.returnValue.type, method.returnValue.nullable);\n const arity = inputParameters(context.library, method).length;\n\n return ancestor.returnType !== returnType || ancestor.arity !== arity ? name : undefined;\n};\n\nconst collectInterfaceMergeOmissions = (\n context: ModuleContext,\n klass: GirClass,\n iface: { klass: GirClass; namespaceName: string },\n): string[] => {\n const ancestors = ancestorClassMethodSignatures(context, klass);\n const omissions: string[] = [];\n\n for (const method of iface.klass.methods) {\n const name = mergeOmissionName(context, method, ancestors);\n\n if (name !== undefined) {\n omissions.push(name);\n }\n }\n\n return omissions;\n};\n\nconst collectInheritedPropertyTypes = (context: ModuleContext, klass: GirClass): Map<string, string> => {\n const types: Map<string, string> = new Map();\n\n const record = (owner: GirClass, property: GirProperty): void => {\n const jsName = toCamelIdentifier(property.name);\n\n if (types.has(jsName)) {\n return;\n }\n\n const tsType = resolveAccessorType(context, property, owner.methods);\n\n if (tsType !== undefined) {\n types.set(jsName, tsType);\n }\n };\n\n forEachInheritedProperty(context, klass, record);\n\n return types;\n};\n\nconst collectInheritedMethods = (context: ModuleContext, klass: GirClass): InheritedMethods => {\n const accumulator: InheritedMethods = {\n returnTypes: new Map<string, string>(),\n definitions: new Map<string, InheritedMethod>(),\n };\n\n for (const iface of resolveDirectInterfaces(context, klass, context.namespace.name)) {\n absorbInheritedMethods(context, iface, accumulator);\n }\n\n forEachAncestor(context, klass, (ancestor, interfaces) => {\n absorbInheritedMethods(context, ancestor, accumulator);\n\n for (const iface of interfaces) {\n absorbInheritedMethods(context, iface, accumulator);\n }\n });\n\n return accumulator;\n};\n\nconst absorbInheritedMethods = (\n context: ModuleContext,\n resolved: { klass: GirClass; namespaceName: string },\n accumulator: InheritedMethods,\n): void => {\n const { returnTypes, definitions } = accumulator;\n\n for (const method of resolved.klass.methods) {\n if (!method.introspectable) {\n continue;\n }\n\n const name = camelCase(method.name);\n\n if (returnTypes.has(name)) {\n continue;\n }\n\n definitions.set(name, { method, namespaceName: resolved.namespaceName });\n returnTypes.set(name, renderTsType(context, method.returnValue.type, method.returnValue.nullable));\n }\n};\n\nconst inheritedMatch = (inherited: InheritedMethods, name: string): InheritedMatch | undefined => {\n const inheritedReturn = inherited.returnTypes.get(name);\n const inheritedMethod = inherited.definitions.get(name);\n\n if (inheritedReturn === undefined || inheritedMethod === undefined) {\n return undefined;\n }\n\n return { inheritedReturn, inheritedMethod };\n};\n\nconst hasMethodConflict = (options: {\n context: ModuleContext;\n callable: GirFunction;\n inheritedReturn: string;\n inheritedMethod: InheritedMethod;\n}): boolean => {\n const { context, callable, inheritedReturn, inheritedMethod } = options;\n const ownReturn = renderTsType(context, callable.returnValue.type, callable.returnValue.nullable);\n\n return (\n inheritedReturn !== ownReturn ||\n hasParameterEnumConflict(context, callable, inheritedMethod) ||\n inputParameters(context.library, callable).length !==\n inputParameters(context.library, inheritedMethod.method).length\n );\n};\n\nconst conflictRename = (\n context: ModuleContext,\n callable: GirFunction,\n inherited: InheritedMethods,\n className: string,\n): string | undefined => {\n if (!callable.introspectable) {\n return undefined;\n }\n\n const name = methodExportName(callable);\n\n if (RESERVED_SIGNAL_MEMBERS.has(name)) {\n return conflictingMethodName(className, callable.name);\n }\n\n const match = inheritedMatch(inherited, name);\n\n if (match === undefined) {\n return undefined;\n }\n\n const hasConflict = hasMethodConflict({ context, callable, ...match });\n\n return hasConflict ? conflictingMethodName(className, callable.name) : undefined;\n};\n\nconst conflictingMethodName = (className: string, methodName: string): string =>\n `${lowerFirst(className)}${pascalCase(methodName)}`;\n\nconst reservedSignalMemberRename = (className: string, callable: GirFunction): string | undefined =>\n RESERVED_SIGNAL_MEMBERS.has(methodExportName(callable))\n ? conflictingMethodName(className, callable.name)\n : undefined;\n\nconst hasEnumConflict = (\n context: ModuleContext,\n ownRef: TypeId | undefined,\n inheritedRef: TypeId | undefined,\n): boolean => {\n const ownEnum = enumIdentity(context, ownRef);\n const inheritedEnum = enumIdentity(context, inheritedRef);\n\n return ownEnum !== undefined && inheritedEnum !== undefined && ownEnum !== inheritedEnum;\n};\n\nconst hasParameterEnumConflict = (context: ModuleContext, own: GirFunction, inherited: InheritedMethod): boolean => {\n const ownParams = inputParameters(context.library, own);\n const inheritedParams = inputParameters(context.library, inherited.method);\n const count = Math.min(ownParams.length, inheritedParams.length);\n\n for (let index = 0; index < count; index += 1) {\n const ownParam = ownParams[index];\n const inheritedParam = inheritedParams[index];\n\n if (\n ownParam !== undefined &&\n inheritedParam !== undefined &&\n hasEnumConflict(context, ownParam.parameter.type, inheritedParam.parameter.type)\n ) {\n return true;\n }\n }\n\n return false;\n};\n\nconst enumIdentity = (context: ModuleContext, ref: TypeId | undefined): string | undefined => {\n if (ref === undefined) {\n return undefined;\n }\n\n const resolved = context.library.typeFor(ref);\n\n if (resolved?.kind !== \"enum\") {\n return undefined;\n }\n\n return `${resolved.namespace.name}.${resolved.value.name}`;\n};\n\nexport {\n resolveImplementedInterface,\n resolvePrerequisiteReference,\n forEachAncestor,\n collectInterfaceProperties,\n collectInterfaceMergeOmissions,\n collectInheritedPropertyTypes,\n collectInheritedMethods,\n conflictRename,\n reservedSignalMemberRename,\n type OwnedProperty,\n type InheritedMethods,\n};\n"]}
@@ -1,26 +1,27 @@
1
1
  import type { GirFunction } from "../gir/function.js";
2
2
  import type { Library } from "../gir/library.js";
3
- import { type GirParameter, type GirSignal } from "../gir/parameter.js";
4
3
  import type { TypeId } from "../gir/type-id.js";
4
+ import { type GirCallable, type GirParameter } from "../gir/parameter.js";
5
5
  type InputParameter = {
6
6
  parameter: GirParameter;
7
7
  index: number;
8
8
  };
9
- export declare const inputParameters: (library: Library, fn: GirFunction) => InputParameter[];
10
- export declare const closureAndDestroyIndices: (fn: GirFunction) => Set<number>;
11
- export declare const arrayLengthSources: (library: Library, fn: GirFunction) => Map<number, number>;
12
- export declare const hasCallerAllocatedArrayLength: (library: Library, fn: GirFunction) => boolean;
13
- export declare const foldedLengthIndices: (library: Library, fn: GirFunction) => Set<number>;
14
- export declare const parameterIdentifier: (parameter: GirParameter, index: number) => string;
15
- export declare const renderHandlerParameters: (parameters: GirParameter[], renderType: (ref: TypeId | undefined, nullable: boolean) => string, additionalExclude?: (parameter: GirParameter) => boolean) => string[];
16
- export declare const foldOutParamShape: (primary: string | undefined, outTypes: string[]) => string;
17
9
  type HandlerResultOptions = {
18
10
  library: Library;
19
- signal: GirSignal;
20
- renderType: (ref: TypeId | undefined, nullable: boolean) => string;
11
+ signal: GirCallable;
12
+ renderType: (ref: TypeId | undefined, isNullable: boolean) => string;
21
13
  includeCallerAllocated: boolean;
22
14
  optOut: boolean;
23
15
  };
24
- export declare const renderHandlerResultType: (options: HandlerResultOptions) => string;
25
- export {};
16
+ declare const inputParameters: (library: Library, fn: GirFunction) => InputParameter[];
17
+ declare const closureAndDestroyIndices: (fn: GirFunction) => Set<number>;
18
+ declare const emittedArgIndices: (fn: GirFunction, instanceOffset: number) => Map<number, number>;
19
+ declare const arrayLengthSources: (library: Library, fn: GirFunction) => Map<number, number>;
20
+ declare const hasCallerAllocatedArrayLength: (library: Library, fn: GirFunction) => boolean;
21
+ declare const foldedLengthIndices: (library: Library, fn: GirFunction) => Set<number>;
22
+ declare const parameterIdentifier: (parameter: GirParameter, index: number) => string;
23
+ declare const renderHandlerParameters: (parameters: GirParameter[], renderType: (ref: TypeId | undefined, isNullable: boolean) => string, shouldExclude?: (parameter: GirParameter) => boolean) => string[];
24
+ declare const foldOutParamShape: (primary: string | undefined, outTypes: string[]) => string;
25
+ declare const renderHandlerResultType: (options: HandlerResultOptions) => string;
26
+ export { emittedArgIndices, inputParameters, closureAndDestroyIndices, arrayLengthSources, hasCallerAllocatedArrayLength, foldedLengthIndices, parameterIdentifier, renderHandlerParameters, foldOutParamShape, renderHandlerResultType, };
26
27
  //# sourceMappingURL=param-structure.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"param-structure.d.ts","sourceRoot":"","sources":["../../src/analysis/param-structure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE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