@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.
- package/dist/analysis/descriptor-render.d.ts +18 -11
- package/dist/analysis/descriptor-render.d.ts.map +1 -1
- package/dist/analysis/descriptor-render.js +275 -152
- package/dist/analysis/descriptor-render.js.map +1 -1
- package/dist/analysis/descriptor.d.ts +37 -34
- package/dist/analysis/descriptor.d.ts.map +1 -1
- package/dist/analysis/descriptor.js +34 -30
- package/dist/analysis/descriptor.js.map +1 -1
- package/dist/analysis/inheritance.d.ts +16 -16
- package/dist/analysis/inheritance.d.ts.map +1 -1
- package/dist/analysis/inheritance.js +139 -84
- package/dist/analysis/inheritance.js.map +1 -1
- package/dist/analysis/param-structure.d.ts +14 -13
- package/dist/analysis/param-structure.d.ts.map +1 -1
- package/dist/analysis/param-structure.js +104 -53
- package/dist/analysis/param-structure.js.map +1 -1
- package/dist/analysis/ts-type.d.ts +6 -5
- package/dist/analysis/ts-type.d.ts.map +1 -1
- package/dist/analysis/ts-type.js +69 -23
- package/dist/analysis/ts-type.js.map +1 -1
- package/dist/compile.d.ts +5 -5
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +70 -63
- package/dist/compile.js.map +1 -1
- package/dist/docs/api-reference.d.ts +12 -11
- package/dist/docs/api-reference.d.ts.map +1 -1
- package/dist/docs/api-reference.js +194 -121
- package/dist/docs/api-reference.js.map +1 -1
- package/dist/docs/element-page.d.ts +6 -9
- package/dist/docs/element-page.d.ts.map +1 -1
- package/dist/docs/element-page.js +68 -133
- package/dist/docs/element-page.js.map +1 -1
- package/dist/docs/pipeline.d.ts +8 -7
- package/dist/docs/pipeline.d.ts.map +1 -1
- package/dist/docs/pipeline.js +79 -53
- package/dist/docs/pipeline.js.map +1 -1
- package/dist/docs/render.d.ts +21 -19
- package/dist/docs/render.d.ts.map +1 -1
- package/dist/docs/render.js +80 -71
- package/dist/docs/render.js.map +1 -1
- package/dist/docs/symbol-page.d.ts +6 -6
- package/dist/docs/symbol-page.d.ts.map +1 -1
- package/dist/docs/symbol-page.js +126 -84
- package/dist/docs/symbol-page.js.map +1 -1
- package/dist/fingerprint.d.ts +28 -5
- package/dist/fingerprint.d.ts.map +1 -1
- package/dist/fingerprint.js +66 -13
- package/dist/fingerprint.js.map +1 -1
- package/dist/gi.d.ts +13 -0
- package/dist/gi.d.ts.map +1 -0
- package/dist/gi.js +21 -0
- package/dist/gi.js.map +1 -0
- package/dist/gir/ancestry.d.ts +4 -3
- package/dist/gir/ancestry.d.ts.map +1 -1
- package/dist/gir/ancestry.js +12 -15
- package/dist/gir/ancestry.js.map +1 -1
- package/dist/gir/callback.d.ts +6 -11
- package/dist/gir/callback.d.ts.map +1 -1
- package/dist/gir/callback.js +6 -7
- package/dist/gir/callback.js.map +1 -1
- package/dist/gir/class.d.ts +7 -5
- package/dist/gir/class.d.ts.map +1 -1
- package/dist/gir/class.js +14 -12
- package/dist/gir/class.js.map +1 -1
- package/dist/gir/enum.d.ts +3 -3
- package/dist/gir/enum.d.ts.map +1 -1
- package/dist/gir/enum.js +7 -6
- package/dist/gir/enum.js.map +1 -1
- package/dist/gir/field.d.ts +8 -3
- package/dist/gir/field.d.ts.map +1 -1
- package/dist/gir/field.js +30 -7
- package/dist/gir/field.js.map +1 -1
- package/dist/gir/function.d.ts +6 -3
- package/dist/gir/function.d.ts.map +1 -1
- package/dist/gir/function.js +23 -7
- package/dist/gir/function.js.map +1 -1
- package/dist/gir/gir-path.d.ts +2 -1
- package/dist/gir/gir-path.d.ts.map +1 -1
- package/dist/gir/gir-path.js +26 -10
- package/dist/gir/gir-path.js.map +1 -1
- package/dist/gir/libraries.d.ts +3 -2
- package/dist/gir/libraries.d.ts.map +1 -1
- package/dist/gir/libraries.js +39 -27
- package/dist/gir/libraries.js.map +1 -1
- package/dist/gir/library.d.ts +17 -11
- package/dist/gir/library.d.ts.map +1 -1
- package/dist/gir/library.js +116 -92
- package/dist/gir/library.js.map +1 -1
- package/dist/gir/namespace.d.ts +10 -10
- package/dist/gir/namespace.d.ts.map +1 -1
- package/dist/gir/namespace.js +21 -20
- package/dist/gir/namespace.js.map +1 -1
- package/dist/gir/nullable-overrides.d.ts +3 -0
- package/dist/gir/nullable-overrides.d.ts.map +1 -0
- package/dist/gir/nullable-overrides.js +5 -0
- package/dist/gir/nullable-overrides.js.map +1 -0
- package/dist/gir/parameter.d.ts +14 -12
- package/dist/gir/parameter.d.ts.map +1 -1
- package/dist/gir/parameter.js +27 -18
- package/dist/gir/parameter.js.map +1 -1
- package/dist/gir/parse.d.ts +12 -13
- package/dist/gir/parse.d.ts.map +1 -1
- package/dist/gir/parse.js +50 -40
- package/dist/gir/parse.js.map +1 -1
- package/dist/gir/primitives.d.ts +5 -4
- package/dist/gir/primitives.d.ts.map +1 -1
- package/dist/gir/primitives.js +4 -3
- package/dist/gir/primitives.js.map +1 -1
- package/dist/gir/property.d.ts +5 -4
- package/dist/gir/property.d.ts.map +1 -1
- package/dist/gir/property.js +10 -9
- package/dist/gir/property.js.map +1 -1
- package/dist/gir/record.d.ts +5 -4
- package/dist/gir/record.d.ts.map +1 -1
- package/dist/gir/record.js +13 -12
- package/dist/gir/record.js.map +1 -1
- package/dist/gir/size.d.ts +6 -5
- package/dist/gir/size.d.ts.map +1 -1
- package/dist/gir/size.js +49 -47
- package/dist/gir/size.js.map +1 -1
- package/dist/gir/type-id.d.ts +17 -15
- package/dist/gir/type-id.d.ts.map +1 -1
- package/dist/gir/type-id.js +5 -1
- package/dist/gir/type-id.js.map +1 -1
- package/dist/gir/type-ref.d.ts +3 -2
- package/dist/gir/type-ref.d.ts.map +1 -1
- package/dist/gir/type-ref.js +36 -25
- package/dist/gir/type-ref.js.map +1 -1
- package/dist/gir/type.d.ts +3 -2
- package/dist/gir/type.d.ts.map +1 -1
- package/dist/gir/type.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/jsx.d.ts +26 -0
- package/dist/jsx.d.ts.map +1 -0
- package/dist/jsx.js +40 -0
- package/dist/jsx.js.map +1 -0
- package/dist/khronos/args.d.ts +7 -7
- package/dist/khronos/args.d.ts.map +1 -1
- package/dist/khronos/args.js +88 -67
- package/dist/khronos/args.js.map +1 -1
- package/dist/khronos/jsdoc.d.ts +4 -4
- package/dist/khronos/jsdoc.d.ts.map +1 -1
- package/dist/khronos/jsdoc.js +29 -16
- package/dist/khronos/jsdoc.js.map +1 -1
- package/dist/khronos/model.d.ts +8 -7
- package/dist/khronos/model.d.ts.map +1 -1
- package/dist/khronos/model.js +94 -59
- package/dist/khronos/model.js.map +1 -1
- package/dist/khronos/modules.d.ts +4 -3
- package/dist/khronos/modules.d.ts.map +1 -1
- package/dist/khronos/modules.js +40 -25
- package/dist/khronos/modules.js.map +1 -1
- package/dist/khronos/param-pair.d.ts +11 -0
- package/dist/khronos/param-pair.d.ts.map +1 -0
- package/dist/khronos/param-pair.js +6 -0
- package/dist/khronos/param-pair.js.map +1 -0
- package/dist/khronos/parse.d.ts +7 -8
- package/dist/khronos/parse.d.ts.map +1 -1
- package/dist/khronos/parse.js +17 -16
- package/dist/khronos/parse.js.map +1 -1
- package/dist/khronos/pipeline.d.ts +4 -4
- package/dist/khronos/pipeline.d.ts.map +1 -1
- package/dist/khronos/pipeline.js +97 -56
- package/dist/khronos/pipeline.js.map +1 -1
- package/dist/khronos/plan.d.ts +11 -10
- package/dist/khronos/plan.d.ts.map +1 -1
- package/dist/khronos/plan.js +109 -45
- package/dist/khronos/plan.js.map +1 -1
- package/dist/khronos/render.d.ts +5 -4
- package/dist/khronos/render.d.ts.map +1 -1
- package/dist/khronos/render.js +106 -59
- package/dist/khronos/render.js.map +1 -1
- package/dist/khronos/select.d.ts +4 -4
- package/dist/khronos/select.d.ts.map +1 -1
- package/dist/khronos/select.js +30 -19
- package/dist/khronos/select.js.map +1 -1
- package/dist/react/element-config.d.ts +17 -0
- package/dist/react/element-config.d.ts.map +1 -0
- package/dist/react/element-config.js +61 -0
- package/dist/react/element-config.js.map +1 -0
- package/dist/runner.d.ts +17 -10
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +45 -43
- package/dist/runner.js.map +1 -1
- package/dist/store/compile-store.d.ts +5 -3
- package/dist/store/compile-store.d.ts.map +1 -1
- package/dist/store/compile-store.js +24 -22
- package/dist/store/compile-store.js.map +1 -1
- package/dist/store/gi/async.d.ts +2 -1
- package/dist/store/gi/async.d.ts.map +1 -1
- package/dist/store/gi/async.js +28 -24
- package/dist/store/gi/async.js.map +1 -1
- package/dist/store/gi/callables.d.ts +26 -20
- package/dist/store/gi/callables.d.ts.map +1 -1
- package/dist/store/gi/callables.js +162 -100
- package/dist/store/gi/callables.js.map +1 -1
- package/dist/store/gi/callback.d.ts +3 -2
- package/dist/store/gi/callback.d.ts.map +1 -1
- package/dist/store/gi/callback.js +6 -3
- package/dist/store/gi/callback.js.map +1 -1
- package/dist/store/gi/class-struct-record.d.ts +4 -3
- package/dist/store/gi/class-struct-record.d.ts.map +1 -1
- package/dist/store/gi/class-struct-record.js +33 -15
- package/dist/store/gi/class-struct-record.js.map +1 -1
- package/dist/store/gi/class.d.ts +2 -1
- package/dist/store/gi/class.d.ts.map +1 -1
- package/dist/store/gi/class.js +86 -47
- package/dist/store/gi/class.js.map +1 -1
- package/dist/store/gi/companion.d.ts +2 -1
- package/dist/store/gi/companion.d.ts.map +1 -1
- package/dist/store/gi/companion.js +8 -5
- package/dist/store/gi/companion.js.map +1 -1
- package/dist/store/gi/constant.d.ts +3 -2
- package/dist/store/gi/constant.d.ts.map +1 -1
- package/dist/store/gi/constant.js +25 -8
- package/dist/store/gi/constant.js.map +1 -1
- package/dist/store/gi/constructor-props.d.ts +3 -2
- package/dist/store/gi/constructor-props.d.ts.map +1 -1
- package/dist/store/gi/constructor-props.js +17 -10
- package/dist/store/gi/constructor-props.js.map +1 -1
- package/dist/store/gi/enum.d.ts +3 -2
- package/dist/store/gi/enum.d.ts.map +1 -1
- package/dist/store/gi/enum.js +14 -11
- package/dist/store/gi/enum.js.map +1 -1
- package/dist/store/gi/function.d.ts +5 -4
- package/dist/store/gi/function.d.ts.map +1 -1
- package/dist/store/gi/function.js +50 -23
- package/dist/store/gi/function.js.map +1 -1
- package/dist/store/gi/gtype-binding.d.ts +4 -4
- package/dist/store/gi/gtype-binding.d.ts.map +1 -1
- package/dist/store/gi/gtype-binding.js +15 -11
- package/dist/store/gi/gtype-binding.js.map +1 -1
- package/dist/store/gi/interface.d.ts +2 -1
- package/dist/store/gi/interface.d.ts.map +1 -1
- package/dist/store/gi/interface.js +36 -18
- package/dist/store/gi/interface.js.map +1 -1
- package/dist/store/gi/item-comparators.d.ts +3 -2
- package/dist/store/gi/item-comparators.d.ts.map +1 -1
- package/dist/store/gi/item-comparators.js +33 -21
- package/dist/store/gi/item-comparators.js.map +1 -1
- package/dist/store/gi/method.d.ts +13 -13
- package/dist/store/gi/method.d.ts.map +1 -1
- package/dist/store/gi/method.js +187 -130
- package/dist/store/gi/method.js.map +1 -1
- package/dist/store/gi/param-marshal.d.ts +7 -6
- package/dist/store/gi/param-marshal.d.ts.map +1 -1
- package/dist/store/gi/param-marshal.js +26 -13
- package/dist/store/gi/param-marshal.js.map +1 -1
- package/dist/store/gi/pipeline.d.ts +2 -1
- package/dist/store/gi/pipeline.d.ts.map +1 -1
- package/dist/store/gi/pipeline.js +38 -23
- package/dist/store/gi/pipeline.js.map +1 -1
- package/dist/store/gi/properties.d.ts +2 -1
- package/dist/store/gi/properties.d.ts.map +1 -1
- package/dist/store/gi/properties.js +6 -4
- package/dist/store/gi/properties.js.map +1 -1
- package/dist/store/gi/property-accessor.d.ts +11 -10
- package/dist/store/gi/property-accessor.d.ts.map +1 -1
- package/dist/store/gi/property-accessor.js +86 -60
- package/dist/store/gi/property-accessor.js.map +1 -1
- package/dist/store/gi/record-constructor.d.ts +3 -2
- package/dist/store/gi/record-constructor.d.ts.map +1 -1
- package/dist/store/gi/record-constructor.js +36 -25
- package/dist/store/gi/record-constructor.js.map +1 -1
- package/dist/store/gi/record-field-accessor.d.ts +8 -8
- package/dist/store/gi/record-field-accessor.d.ts.map +1 -1
- package/dist/store/gi/record-field-accessor.js +171 -99
- package/dist/store/gi/record-field-accessor.js.map +1 -1
- package/dist/store/gi/record-layout.d.ts +6 -5
- package/dist/store/gi/record-layout.d.ts.map +1 -1
- package/dist/store/gi/record-layout.js +75 -39
- package/dist/store/gi/record-layout.js.map +1 -1
- package/dist/store/gi/record.d.ts +2 -1
- package/dist/store/gi/record.d.ts.map +1 -1
- package/dist/store/gi/record.js +19 -13
- package/dist/store/gi/record.js.map +1 -1
- package/dist/store/gi/registration.d.ts +3 -3
- package/dist/store/gi/registration.d.ts.map +1 -1
- package/dist/store/gi/registration.js +3 -2
- package/dist/store/gi/registration.js.map +1 -1
- package/dist/store/gi/return-wrap.d.ts +2 -2
- package/dist/store/gi/return-wrap.d.ts.map +1 -1
- package/dist/store/gi/return-wrap.js +43 -22
- package/dist/store/gi/return-wrap.js.map +1 -1
- package/dist/store/gi/runtime-override.d.ts +2 -1
- package/dist/store/gi/runtime-override.d.ts.map +1 -1
- package/dist/store/gi/runtime-override.js +6 -3
- package/dist/store/gi/runtime-override.js.map +1 -1
- package/dist/store/gi/signal.d.ts +3 -2
- package/dist/store/gi/signal.d.ts.map +1 -1
- package/dist/store/gi/signal.js +113 -66
- package/dist/store/gi/signal.js.map +1 -1
- package/dist/store/gi/vtable.d.ts +2 -1
- package/dist/store/gi/vtable.d.ts.map +1 -1
- package/dist/store/gi/vtable.js +60 -30
- package/dist/store/gi/vtable.js.map +1 -1
- package/dist/store/gi-store.d.ts +5 -4
- package/dist/store/gi-store.d.ts.map +1 -1
- package/dist/store/gi-store.js +4 -2
- package/dist/store/gi-store.js.map +1 -1
- package/dist/store/jsx/element-components.d.ts +23 -0
- package/dist/store/jsx/element-components.d.ts.map +1 -0
- package/dist/store/jsx/element-components.js +86 -0
- package/dist/store/jsx/element-components.js.map +1 -0
- package/dist/store/jsx/element-prop-imports.d.ts +17 -0
- package/dist/store/jsx/element-prop-imports.d.ts.map +1 -0
- package/dist/store/jsx/element-prop-imports.js +15 -0
- package/dist/store/jsx/element-prop-imports.js.map +1 -0
- package/dist/store/jsx/element-prop-types.d.ts +10 -0
- package/dist/store/jsx/element-prop-types.d.ts.map +1 -0
- package/dist/store/jsx/element-prop-types.js +41 -0
- package/dist/store/jsx/element-prop-types.js.map +1 -0
- package/dist/store/jsx/gir-index.d.ts +16 -0
- package/dist/store/jsx/gir-index.d.ts.map +1 -0
- package/dist/store/jsx/gir-index.js +33 -0
- package/dist/store/jsx/gir-index.js.map +1 -0
- package/dist/store/jsx/intrinsic-elements.d.ts +27 -0
- package/dist/store/jsx/intrinsic-elements.d.ts.map +1 -0
- package/dist/store/jsx/intrinsic-elements.js +128 -0
- package/dist/store/jsx/intrinsic-elements.js.map +1 -0
- package/dist/store/{react → jsx}/jsx.d.ts +2 -4
- package/dist/store/jsx/jsx.d.ts.map +1 -0
- package/dist/store/{react → jsx}/jsx.js +110 -71
- package/dist/store/jsx/jsx.js.map +1 -0
- package/dist/store/jsx/metadata.d.ts +4 -0
- package/dist/store/jsx/metadata.d.ts.map +1 -0
- package/dist/store/{react → jsx}/metadata.js +148 -69
- package/dist/store/jsx/metadata.js.map +1 -0
- package/dist/store/jsx/pipeline.d.ts +21 -0
- package/dist/store/jsx/pipeline.d.ts.map +1 -0
- package/dist/store/{react → jsx}/pipeline.js +36 -15
- package/dist/store/jsx/pipeline.js.map +1 -0
- package/dist/store/{react → jsx}/props.d.ts +9 -12
- package/dist/store/jsx/props.d.ts.map +1 -0
- package/dist/store/jsx/props.js +158 -0
- package/dist/store/jsx/props.js.map +1 -0
- package/dist/store/jsx-store.d.ts +5 -3
- package/dist/store/jsx-store.d.ts.map +1 -1
- package/dist/store/jsx-store.js +4 -1
- package/dist/store/jsx-store.js.map +1 -1
- package/dist/store/store-fs.d.ts +14 -12
- package/dist/store/store-fs.d.ts.map +1 -1
- package/dist/store/store-fs.js +9 -7
- package/dist/store/store-fs.js.map +1 -1
- package/dist/writer/context.d.ts +2 -1
- package/dist/writer/context.d.ts.map +1 -1
- package/dist/writer/context.js +12 -6
- package/dist/writer/context.js.map +1 -1
- package/dist/writer/doc.d.ts +2 -1
- package/dist/writer/doc.d.ts.map +1 -1
- package/dist/writer/doc.js +13 -7
- package/dist/writer/doc.js.map +1 -1
- package/dist/writer/emit.d.ts +8 -7
- package/dist/writer/emit.d.ts.map +1 -1
- package/dist/writer/emit.js +13 -10
- package/dist/writer/emit.js.map +1 -1
- package/dist/writer/gtk-doc.d.ts +2 -1
- package/dist/writer/gtk-doc.d.ts.map +1 -1
- package/dist/writer/gtk-doc.js +29 -18
- package/dist/writer/gtk-doc.js.map +1 -1
- package/dist/writer/imports.d.ts +4 -2
- package/dist/writer/imports.d.ts.map +1 -1
- package/dist/writer/imports.js +35 -24
- package/dist/writer/imports.js.map +1 -1
- package/dist/writer/module.d.ts +3 -2
- package/dist/writer/module.d.ts.map +1 -1
- package/dist/writer/module.js +16 -9
- package/dist/writer/module.js.map +1 -1
- package/dist/xml.d.ts +4 -0
- package/dist/xml.d.ts.map +1 -0
- package/dist/xml.js +10 -0
- package/dist/xml.js.map +1 -0
- package/overrides/cairo/context.ts.ejs +7 -7
- package/overrides/cairo/matrix.ts.ejs +2 -2
- package/overrides/cairo/recording-surface.ts.ejs +2 -2
- package/overrides/cairo/region.ts.ejs +1 -1
- package/overrides/cairo/scaled-font.ts.ejs +3 -3
- package/package.json +15 -9
- package/src/analysis/descriptor-render.ts +484 -168
- package/src/analysis/descriptor.ts +162 -125
- package/src/analysis/inheritance.ts +286 -98
- package/src/analysis/param-structure.ts +188 -57
- package/src/analysis/ts-type.ts +112 -26
- package/src/compile.ts +103 -76
- package/src/docs/api-reference.ts +340 -144
- package/src/docs/element-page.ts +137 -146
- package/src/docs/pipeline.ts +132 -73
- package/src/docs/render.ts +151 -87
- package/src/docs/symbol-page.ts +268 -123
- package/src/fingerprint.ts +127 -29
- package/src/gi.ts +26 -0
- package/src/gir/ancestry.ts +26 -14
- package/src/gir/callback.ts +10 -15
- package/src/gir/class.ts +20 -16
- package/src/gir/enum.ts +9 -7
- package/src/gir/field.ts +37 -8
- package/src/gir/function.ts +33 -9
- package/src/gir/gir-path.ts +36 -12
- package/src/gir/libraries.ts +56 -31
- package/src/gir/library.ts +200 -97
- package/src/gir/namespace.ts +42 -26
- package/src/gir/nullable-overrides.ts +5 -0
- package/src/gir/parameter.ts +80 -42
- package/src/gir/parse.ts +102 -47
- package/src/gir/primitives.ts +25 -23
- package/src/gir/property.ts +13 -11
- package/src/gir/record.ts +16 -14
- package/src/gir/size.ts +91 -58
- package/src/gir/type-id.ts +33 -18
- package/src/gir/type-ref.ts +62 -26
- package/src/gir/type.ts +10 -8
- package/src/index.ts +7 -0
- package/src/jsx.ts +70 -0
- package/src/khronos/args.ts +158 -89
- package/src/khronos/jsdoc.ts +67 -29
- package/src/khronos/model.ts +154 -53
- package/src/khronos/modules.ts +67 -27
- package/src/khronos/param-pair.ts +14 -0
- package/src/khronos/parse.ts +37 -17
- package/src/khronos/pipeline.ts +193 -90
- package/src/khronos/plan.ts +235 -86
- package/src/khronos/render.ts +208 -71
- package/src/khronos/select.ts +48 -18
- package/src/react/element-config.ts +91 -0
- package/src/runner.ts +93 -57
- package/src/store/compile-store.ts +32 -26
- package/src/store/gi/async.ts +48 -21
- package/src/store/gi/callables.ts +345 -136
- package/src/store/gi/callback.ts +13 -4
- package/src/store/gi/class-struct-record.ts +49 -17
- package/src/store/gi/class.ts +186 -64
- package/src/store/gi/companion.ts +15 -6
- package/src/store/gi/constant.ts +42 -8
- package/src/store/gi/constructor-props.ts +42 -16
- package/src/store/gi/enum.ts +28 -13
- package/src/store/gi/function.ts +90 -24
- package/src/store/gi/gtype-binding.ts +31 -18
- package/src/store/gi/interface.ts +101 -36
- package/src/store/gi/item-comparators.ts +74 -26
- package/src/store/gi/method.ts +376 -159
- package/src/store/gi/param-marshal.ts +38 -15
- package/src/store/gi/pipeline.ts +72 -22
- package/src/store/gi/properties.ts +16 -5
- package/src/store/gi/property-accessor.ts +192 -84
- package/src/store/gi/record-constructor.ts +62 -30
- package/src/store/gi/record-field-accessor.ts +380 -167
- package/src/store/gi/record-layout.ts +130 -43
- package/src/store/gi/record.ts +37 -14
- package/src/store/gi/registration.ts +15 -9
- package/src/store/gi/return-wrap.ts +71 -23
- package/src/store/gi/runtime-override.ts +13 -3
- package/src/store/gi/signal.ts +244 -104
- package/src/store/gi/vtable.ts +117 -41
- package/src/store/gi-store.ts +26 -13
- package/src/store/jsx/element-components.ts +152 -0
- package/src/store/jsx/element-prop-imports.ts +24 -0
- package/src/store/jsx/element-prop-types.ts +59 -0
- package/src/store/jsx/gir-index.ts +62 -0
- package/src/store/jsx/intrinsic-elements.ts +262 -0
- package/src/store/{react → jsx}/jsx.ts +213 -99
- package/src/store/jsx/metadata.ts +385 -0
- package/src/store/jsx/pipeline.ts +145 -0
- package/src/store/jsx/props.ts +274 -0
- package/src/store/jsx-store.ts +15 -3
- package/src/store/store-fs.ts +36 -20
- package/src/writer/context.ts +25 -6
- package/src/writer/doc.ts +19 -5
- package/src/writer/emit.ts +20 -11
- package/src/writer/gtk-doc.ts +48 -21
- package/src/writer/imports.ts +63 -28
- package/src/writer/module.ts +35 -11
- package/src/xml.ts +12 -0
- package/dist/store/react/built-ins.d.ts +0 -9
- package/dist/store/react/built-ins.d.ts.map +0 -1
- package/dist/store/react/built-ins.js +0 -226
- package/dist/store/react/built-ins.js.map +0 -1
- package/dist/store/react/element-components.d.ts +0 -15
- package/dist/store/react/element-components.d.ts.map +0 -1
- package/dist/store/react/element-components.js +0 -92
- package/dist/store/react/element-components.js.map +0 -1
- package/dist/store/react/element-prop-types.d.ts +0 -19
- package/dist/store/react/element-prop-types.d.ts.map +0 -1
- package/dist/store/react/element-prop-types.js +0 -244
- package/dist/store/react/element-prop-types.js.map +0 -1
- package/dist/store/react/element-props.d.ts +0 -4
- package/dist/store/react/element-props.d.ts.map +0 -1
- package/dist/store/react/element-props.js +0 -178
- package/dist/store/react/element-props.js.map +0 -1
- package/dist/store/react/gir-index.d.ts +0 -25
- package/dist/store/react/gir-index.d.ts.map +0 -1
- package/dist/store/react/gir-index.js +0 -55
- package/dist/store/react/gir-index.js.map +0 -1
- package/dist/store/react/intrinsic-elements.d.ts +0 -26
- package/dist/store/react/intrinsic-elements.d.ts.map +0 -1
- package/dist/store/react/intrinsic-elements.js +0 -107
- package/dist/store/react/intrinsic-elements.js.map +0 -1
- package/dist/store/react/jsx.d.ts.map +0 -1
- package/dist/store/react/jsx.js.map +0 -1
- package/dist/store/react/metadata.d.ts +0 -4
- package/dist/store/react/metadata.d.ts.map +0 -1
- package/dist/store/react/metadata.js.map +0 -1
- package/dist/store/react/pipeline.d.ts +0 -14
- package/dist/store/react/pipeline.d.ts.map +0 -1
- package/dist/store/react/pipeline.js.map +0 -1
- package/dist/store/react/props.d.ts.map +0 -1
- package/dist/store/react/props.js +0 -133
- package/dist/store/react/props.js.map +0 -1
- package/overrides/gtk/constants.ts.ejs +0 -3
- package/overrides/gtk/index.ts.ejs +0 -2
- package/src/store/react/built-ins.ts +0 -260
- package/src/store/react/element-components.ts +0 -138
- package/src/store/react/element-prop-types.ts +0 -280
- package/src/store/react/element-props.ts +0 -204
- package/src/store/react/gir-index.ts +0 -85
- package/src/store/react/intrinsic-elements.ts +0 -161
- package/src/store/react/metadata.ts +0 -197
- package/src/store/react/pipeline.ts +0 -90
- package/src/store/react/props.ts +0 -197
|
@@ -1,114 +1,155 @@
|
|
|
1
|
-
import { lowerFirst,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
32
|
+
}
|
|
33
|
+
if (resolved.kind !== "interface" && resolved.kind !== "class") {
|
|
22
34
|
return undefined;
|
|
23
|
-
|
|
35
|
+
}
|
|
36
|
+
return context.qualify(resolved.namespace.name, pascalCase(resolved.value.name));
|
|
24
37
|
};
|
|
25
|
-
|
|
26
|
-
let
|
|
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 (
|
|
29
|
-
|
|
41
|
+
if (isFirst) {
|
|
42
|
+
isFirst = false;
|
|
30
43
|
continue;
|
|
31
44
|
}
|
|
32
|
-
if (
|
|
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
|
-
|
|
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
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
86
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
132
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
166
|
-
|
|
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
|
|
177
|
-
|
|
178
|
-
|
|
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
|
-
|
|
189
|
-
|
|
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=inheritance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inheritance.js","sourceRoot":"","sources":["../../src/analysis/inheritance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAyB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAM5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAO5C,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACvC,OAAwB,EACxB,IAAY,EACZ,gBAAgB,GAAW,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,GAAuB,EAAE,CAAC;IAC1C,KAAK,MAAM,aAAa,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,2BAA2B,CAAC,OAAO,EAAE,aAAa,EAAE,gBAAgB,CAAC,CAAC;QACpF,IAAI,KAAK,KAAK,SA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S;QACrE,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC/D,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3E,IAAI,OAAO,KAAK,SAAS,IAAI,aAAa,KAAK,SAAS,IAAI,OAAO,KAAK,aAAa;YAAE,OAAO,IAAI,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,CAA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B,cAAc,KAAK,SAAS;YAC5B,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,EAClF,CAAC;YACC,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAAsB,EAAE,GAAuB,EAAsB,EAAE;IACzF,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:
|
|
20
|
-
renderType: (ref: TypeId | undefined,
|
|
11
|
+
signal: GirCallable;
|
|
12
|
+
renderType: (ref: TypeId | undefined, isNullable: boolean) => string;
|
|
21
13
|
includeCallerAllocated: boolean;
|
|
22
14
|
optOut: boolean;
|
|
23
15
|
};
|
|
24
|
-
|
|
25
|
-
|
|
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,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"param-structure.d.ts","sourceRoot":"","sources":["../../src/analysis/param-structure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAwC,MAAM,qBAAqB,CAAC;AAGhH,KAAK,cAAc,GAAG;IAClB,SAAS,EAAE,YAAY,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,KAAK,MAA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