@gtkx/codegen 1.1.0 → 1.2.1
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.map +1 -1
- package/dist/analysis/descriptor-render.js +14 -10
- package/dist/analysis/descriptor-render.js.map +1 -1
- package/dist/analysis/descriptor.d.ts +11 -5
- package/dist/analysis/descriptor.d.ts.map +1 -1
- package/dist/analysis/descriptor.js +25 -9
- package/dist/analysis/descriptor.js.map +1 -1
- package/dist/analysis/interface-conflicts.d.ts +3 -1
- package/dist/analysis/interface-conflicts.d.ts.map +1 -1
- package/dist/analysis/interface-conflicts.js +3 -8
- package/dist/analysis/interface-conflicts.js.map +1 -1
- package/dist/analysis/ts-type.d.ts +3 -2
- package/dist/analysis/ts-type.d.ts.map +1 -1
- package/dist/analysis/ts-type.js +16 -9
- package/dist/analysis/ts-type.js.map +1 -1
- package/dist/analysis/type-shape.d.ts +3 -2
- package/dist/analysis/type-shape.d.ts.map +1 -1
- package/dist/analysis/type-shape.js +2 -1
- package/dist/analysis/type-shape.js.map +1 -1
- package/dist/compile.d.ts +4 -5
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +56 -4
- package/dist/compile.js.map +1 -1
- package/dist/docs/api-reference.d.ts +2 -0
- package/dist/docs/api-reference.d.ts.map +1 -1
- package/dist/docs/api-reference.js +1 -1
- package/dist/docs/api-reference.js.map +1 -1
- package/dist/docs/pipeline.d.ts +1 -0
- package/dist/docs/pipeline.d.ts.map +1 -1
- package/dist/docs/pipeline.js +10 -3
- package/dist/docs/pipeline.js.map +1 -1
- package/dist/docs/symbol-page.d.ts.map +1 -1
- package/dist/docs/symbol-page.js +2 -4
- package/dist/docs/symbol-page.js.map +1 -1
- package/dist/fingerprint.d.ts +11 -5
- package/dist/fingerprint.d.ts.map +1 -1
- package/dist/fingerprint.js +22 -19
- package/dist/fingerprint.js.map +1 -1
- package/dist/gi.d.ts +1 -0
- package/dist/gi.d.ts.map +1 -1
- package/dist/gi.js +7 -2
- package/dist/gi.js.map +1 -1
- package/dist/gir/class.d.ts +7 -2
- package/dist/gir/class.d.ts.map +1 -1
- package/dist/gir/class.js +4 -1
- package/dist/gir/class.js.map +1 -1
- package/dist/gir/gir-path.d.ts +1 -1
- package/dist/gir/gir-path.js +1 -1
- package/dist/gir/gir-path.js.map +1 -1
- package/dist/gir/library.d.ts +5 -1
- package/dist/gir/library.d.ts.map +1 -1
- package/dist/gir/library.js +8 -1
- package/dist/gir/library.js.map +1 -1
- package/dist/gir/parse.d.ts.map +1 -1
- package/dist/gir/parse.js +4 -1
- package/dist/gir/parse.js.map +1 -1
- package/dist/gir/primitives.js +1 -1
- package/dist/gir/primitives.js.map +1 -1
- package/dist/khronos/args.d.ts.map +1 -1
- package/dist/khronos/args.js +8 -6
- package/dist/khronos/args.js.map +1 -1
- package/dist/khronos/render.d.ts.map +1 -1
- package/dist/khronos/render.js +8 -4
- package/dist/khronos/render.js.map +1 -1
- package/dist/runner.d.ts +2 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +5 -3
- package/dist/runner.js.map +1 -1
- package/dist/staging.d.ts.map +1 -1
- package/dist/staging.js +1 -1
- package/dist/staging.js.map +1 -1
- package/dist/store/compile-store.d.ts +0 -1
- package/dist/store/compile-store.d.ts.map +1 -1
- package/dist/store/compile-store.js +7 -34
- package/dist/store/compile-store.js.map +1 -1
- package/dist/store/gi/callables.d.ts +2 -4
- package/dist/store/gi/callables.d.ts.map +1 -1
- package/dist/store/gi/callables.js +22 -7
- package/dist/store/gi/callables.js.map +1 -1
- package/dist/store/gi/class.d.ts.map +1 -1
- package/dist/store/gi/class.js +63 -17
- package/dist/store/gi/class.js.map +1 -1
- package/dist/store/gi/constant.js +1 -1
- package/dist/store/gi/constant.js.map +1 -1
- package/dist/store/gi/enum.d.ts.map +1 -1
- package/dist/store/gi/enum.js +2 -5
- package/dist/store/gi/enum.js.map +1 -1
- package/dist/store/gi/gtype-binding.d.ts +2 -1
- package/dist/store/gi/gtype-binding.d.ts.map +1 -1
- package/dist/store/gi/gtype-binding.js +13 -1
- package/dist/store/gi/gtype-binding.js.map +1 -1
- package/dist/store/gi/interface.js +4 -4
- package/dist/store/gi/interface.js.map +1 -1
- package/dist/store/gi/method.d.ts.map +1 -1
- package/dist/store/gi/method.js +4 -7
- package/dist/store/gi/method.js.map +1 -1
- package/dist/store/gi/property-accessor.d.ts +0 -3
- package/dist/store/gi/property-accessor.d.ts.map +1 -1
- package/dist/store/gi/property-accessor.js +15 -108
- package/dist/store/gi/property-accessor.js.map +1 -1
- package/dist/store/gi/record-constructor.d.ts.map +1 -1
- package/dist/store/gi/record-constructor.js +7 -5
- package/dist/store/gi/record-constructor.js.map +1 -1
- package/dist/store/gi/record-field-accessor.d.ts +3 -2
- package/dist/store/gi/record-field-accessor.d.ts.map +1 -1
- package/dist/store/gi/record-field-accessor.js +42 -12
- package/dist/store/gi/record-field-accessor.js.map +1 -1
- package/dist/store/gi/record.d.ts.map +1 -1
- package/dist/store/gi/record.js +5 -9
- package/dist/store/gi/record.js.map +1 -1
- package/dist/store/gi/return-wrap.js +1 -1
- package/dist/store/gi/return-wrap.js.map +1 -1
- package/dist/store/gi/signal.d.ts.map +1 -1
- package/dist/store/gi/signal.js +27 -6
- package/dist/store/gi/signal.js.map +1 -1
- package/dist/store/jsx-store.d.ts.map +1 -1
- package/dist/store/jsx-store.js +0 -1
- package/dist/store/jsx-store.js.map +1 -1
- package/dist/store/resolve-store.d.ts.map +1 -1
- package/dist/store/resolve-store.js +1 -0
- package/dist/store/resolve-store.js.map +1 -1
- package/dist/store/store-fs.d.ts +0 -1
- package/dist/store/store-fs.d.ts.map +1 -1
- package/dist/store/store-fs.js +2 -7
- package/dist/store/store-fs.js.map +1 -1
- package/dist/xml.d.ts +1 -0
- package/dist/xml.d.ts.map +1 -1
- package/dist/xml.js +28 -1
- package/dist/xml.js.map +1 -1
- package/overrides/gobject/object.ts.ejs +2 -0
- package/package.json +3 -3
- package/src/analysis/descriptor-render.ts +19 -10
- package/src/analysis/descriptor.ts +43 -9
- package/src/analysis/interface-conflicts.ts +6 -8
- package/src/analysis/ts-type.ts +30 -11
- package/src/analysis/type-shape.ts +5 -2
- package/src/compile.ts +87 -6
- package/src/docs/api-reference.ts +3 -1
- package/src/docs/pipeline.ts +13 -7
- package/src/docs/symbol-page.ts +1 -5
- package/src/fingerprint.ts +31 -38
- package/src/gi.ts +9 -2
- package/src/gir/class.ts +12 -3
- package/src/gir/gir-path.ts +1 -1
- package/src/gir/library.ts +9 -1
- package/src/gir/parse.ts +6 -1
- package/src/gir/primitives.ts +1 -1
- package/src/khronos/args.ts +9 -6
- package/src/khronos/render.ts +8 -6
- package/src/runner.ts +7 -3
- package/src/staging.ts +1 -3
- package/src/store/compile-store.ts +7 -40
- package/src/store/gi/callables.ts +30 -11
- package/src/store/gi/class.ts +96 -21
- package/src/store/gi/constant.ts +1 -1
- package/src/store/gi/enum.ts +2 -6
- package/src/store/gi/gtype-binding.ts +16 -1
- package/src/store/gi/interface.ts +4 -4
- package/src/store/gi/method.ts +4 -9
- package/src/store/gi/property-accessor.ts +22 -193
- package/src/store/gi/record-constructor.ts +7 -5
- package/src/store/gi/record-field-accessor.ts +65 -13
- package/src/store/gi/record.ts +13 -17
- package/src/store/gi/return-wrap.ts +1 -1
- package/src/store/gi/signal.ts +36 -13
- package/src/store/jsx-store.ts +0 -1
- package/src/store/resolve-store.ts +1 -0
- package/src/store/store-fs.ts +3 -9
- package/src/xml.ts +43 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-page.js","sourceRoot":"","sources":["../../src/docs/symbol-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAShF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC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AK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IACjF,MAAM,QAAQ,GAAG,yBAAyB,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC5E,MAAM,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE/D,OAAO,YAAY,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,aAAa,SAAS,UAAU,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrH,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAiE,EAAE,OAAgB,EAAU,EAAE;IACjH,MAAM,WAAW,GAAG,oBAAoB,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnE,MAAM,IAAI,GAAG,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAEjE,OAAO,YAAY,CAAC;QAChB,GAAG,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC;QAChC,mBAAmB,KAAK,CAAC,IAAI,KAAK,IAAI,MAAM,eAAe,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU;KACrG,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAA8C,CAAC","sourcesContent":["import { sanitizeTypeIdentifier, sortStringsBy, upperFirst } from \"@gtkx/utils\";\nimport type { GirAnnotations } from \"../gir/annotations.js\";\nimport type { GirClass } from \"../gir/class.js\";\nimport type { EnumMember, GirEnum } from \"../gir/enum.js\";\nimport type { GirFunction } from \"../gir/function.js\";\nimport type { Library } from \"../gir/library.js\";\nimport type { GirRecord } from \"../gir/record.js\";\nimport type { ModuleContext } from \"../writer/context.js\";\nimport type { JsDocSpec } from \"../writer/doc.js\";\nimport { reservedSignalMemberRename } from \"../analysis/inheritance.js\";\nimport { renderTsType } from \"../analysis/ts-type.js\";\nimport { ancestorChain } from \"../gir/ancestry.js\";\nimport { callbackAsFunction, type GirCallback } from \"../gir/callback.js\";\nimport { type GirAlias, type GirConstant, type GirNamespace, namespaceDirectory } from \"../gir/namespace.js\";\nimport { PRIMITIVE_TS_TYPE, primitiveCategory } from \"../gir/primitives.js\";\nimport { callableSpec } from \"../store/gi/callable-doc.js\";\nimport {\n dedupeCallables,\n indexMethodsByName,\n instanceScope,\n matchStaticFinishFunction,\n renderInstanceMethodSignature,\n renderStaticSignature,\n} from \"../store/gi/callables.js\";\nimport { constantLiteral } from \"../store/gi/constant.js\";\nimport { annotationSpec } from \"../store/gi/doc-spec.js\";\nimport { enumMemberKey } from \"../store/gi/enum.js\";\nimport {\n methodExportName,\n renderMethodReturnType,\n renderMethodSignature,\n renderPromisifiedSignature,\n} from \"../store/gi/method.js\";\nimport { resolveAccessor, type ResolvedAccessor } from \"../store/gi/property-accessor.js\";\nimport { resolveRecordFieldEntry } from \"../store/gi/record-field-accessor.js\";\nimport { computeRecordFieldSlots } from \"../store/gi/record-layout.js\";\nimport { vfuncEntries } from \"../store/gi/vtable.js\";\nimport { implementedInterfaces, newlyImplementedInterfaces } from \"../store/jsx/intrinsic-elements.js\";\nimport {\n annotationNotes,\n classMethodEntries,\n deprecationMeta,\n docMarkdown,\n docsSignatureContext,\n firstSentence,\n implementsLine,\n joinSections,\n type MetaDocEntry,\n methodsSectionBlocks,\n originSignatureBlocks,\n type OriginSignatureEntry,\n plainText,\n propertyMetaLine,\n qualifiedClassName,\n renderDocsSignalHandlerType,\n renderDocsType,\n signalTags,\n signatureBlock,\n type SignatureEntry,\n signatureEntryBlock,\n sortedMetaBlocks,\n tagNotes,\n} from \"./render.js\";\n\n/** What every indexed GIR symbol carries, whatever its kind. */\ntype GiSymbolBase = {\n /** GIR namespace declaring the symbol. */\n namespace: GirNamespace;\n /** Name the bindings export it under: camelCase for functions, PascalCase for classes, the GIR name otherwise. */\n name: string;\n /** Raw gtk-doc text from the GIR, undefined when the symbol is undocumented. */\n doc: string | undefined;\n};\n\n/** A GIR symbol the reference indexes, discriminated by `kind` and carrying the GIR node its page renders from. */\ntype GiSymbolEntry =\n | (GiSymbolBase & {\n /** Renders the class page: hierarchy, constructors, static methods, properties, signals, and methods. */\n kind: \"class\" | \"interface\";\n /** Supplies the ancestry, members, and, on an interface, the vtable slots an implementer fills. */\n klass: GirClass;\n }) |\n (GiSymbolBase & {\n /** Renders the record page, labeled `union` when the record is one. */\n kind: \"record\";\n /** Supplies the constructors, static methods, fields, and instance methods. */\n record: GirRecord;\n }) |\n (GiSymbolBase & {\n /** Renders the page for an enumeration, a flags type, or an error domain, as a table of members. */\n kind: \"enum\";\n /** Supplies the members, their values, and the GError domain when the enum carries one. */\n enumeration: GirEnum;\n }) |\n (GiSymbolBase & {\n /** Renders the callback page as a single function type signature. */\n kind: \"callback\";\n /** Supplies the parameters and return type the signature is rendered from. */\n callback: GirCallback;\n }) |\n (GiSymbolBase & {\n /** Renders the alias page as the type the alias resolves to. */\n kind: \"alias\";\n /** Supplies the target type the page prints. */\n alias: GirAlias;\n }) |\n (GiSymbolBase & {\n /** Renders the page for a namespace-level function, promisified when a finish function matches it. */\n kind: \"function\";\n /** Supplies the parameters and return type the signature is rendered from. */\n fn: GirFunction;\n }) |\n (GiSymbolBase & {\n /** Renders the page for a namespace-level constant, showing its type and literal value. */\n kind: \"constant\";\n /** Supplies the type and the value the literal is emitted from. */\n constant: GirConstant;\n });\n\ntype ClassSymbol = GiSymbolBase & { klass: GirClass };\ntype ClassPageSymbol = ClassSymbol & { kind: \"class\" | \"interface\" };\n\n/** What {@link renderSymbolPage} needs besides the entry itself. */\ntype SymbolPageOptions = {\n /** Parsed GIR the page resolves ancestry, interfaces, and referenced types against. */\n library: Library;\n /** Looks up the JSX element a class is also available as, undefined when it has none. */\n elementNameFor: (namespaceName: string, className: string) => string | undefined;\n};\n\ntype StaticSectionOptions = {\n title: string;\n intro: string;\n context: ModuleContext;\n callables: GirFunction[];\n siblings: GirFunction[];\n returnTypeOverride?: string;\n};\n\ntype MemberOwner = {\n klass: GirClass;\n namespace: GirNamespace;\n origin: string | undefined;\n};\n\ntype PropertyAccessorSetup = {\n context: ModuleContext;\n claimedNames: Set<string>;\n methodByName: Map<string, GirFunction>;\n};\n\ntype ResolvedRecordField = NonNullable<ReturnType<typeof resolveRecordFieldEntry>>;\n\nconst qualifiedName = (entry: GiSymbolBase): string => `${entry.namespace.name}.${entry.name}`;\nconst pageTagNotes = (spec: JsDocSpec): string[] => tagNotes({ ...spec, deprecated: undefined, since: undefined });\n\nconst frontmatter = (entry: GiSymbolBase, kindLabel: string): string => {\n const sentence = firstSentence(entry.doc);\n const description = sentence.length > 0 ? sentence : `API reference for the ${qualifiedName(entry)} ${kindLabel}.`;\n\n return `---\\ndescription: ${JSON.stringify(description)}\\n---`;\n};\n\nconst kindLine = (kindLabel: string, namespace: GirNamespace): string =>\n `\\`${kindLabel}\\` in \\`@gtkx/gi/${namespaceDirectory(namespace)}\\``;\n\nconst importBlock = (entry: GiSymbolBase): string =>\n `\\`\\`\\`ts\\nimport * as ${entry.namespace.name} from \"@gtkx/gi/${namespaceDirectory(entry.namespace)}\";\\n\\`\\`\\``;\n\nconst entryAnnotations = (entry: GiSymbolEntry): GirAnnotations => {\n switch (entry.kind) {\n case \"class\":\n case \"interface\": {\n return entry.klass.annotations;\n }\n case \"record\": {\n return entry.record.annotations;\n }\n case \"enum\": {\n return entry.enumeration.annotations;\n }\n case \"callback\": {\n return entry.callback.annotations;\n }\n case \"alias\": {\n return entry.alias.annotations;\n }\n case \"function\": {\n return entry.fn.annotations;\n }\n case \"constant\": {\n return entry.constant.annotations;\n }\n }\n};\n\nconst pageHeader = (entry: GiSymbolEntry, kindLabel: string): string[] => [\n frontmatter(entry, kindLabel),\n `# ${qualifiedName(entry)}`,\n kindLine(kindLabel, entry.namespace),\n docMarkdown(entry.doc),\n ...annotationNotes(entryAnnotations(entry)),\n importBlock(entry),\n];\n\nconst elementNote = (entry: ClassSymbol, options: SymbolPageOptions): string[] => {\n const glibName = options.elementNameFor(entry.namespace.name, entry.klass.name);\n\n if (glibName === undefined) {\n return [];\n }\n\n return [\n `Also available as the \\`${glibName}\\` JSX element from ` +\n `\\`@gtkx/jsx/${namespaceDirectory(entry.namespace)}\\`; the \\`${glibName}\\` element page ` +\n \"documents the JSX props.\",\n ];\n};\n\nconst hierarchySection = (entry: ClassSymbol, library: Library): string[] => {\n const ancestors = [...ancestorChain(library, entry.klass, entry.namespace.name)].slice(1).toReversed();\n\n const interfaces = implementedInterfaces(entry.klass, entry.namespace, library).map((iface) =>\n qualifiedClassName(iface.namespace.name, iface.klass.name),\n );\n\n if (ancestors.length === 0 && interfaces.length === 0) {\n return [];\n }\n\n const lines = [\"## Hierarchy\"];\n\n if (ancestors.length > 0) {\n const parts = ancestors.map(\n (ancestor) => `\\`${qualifiedClassName(ancestor.namespaceName, ancestor.klass.name)}\\``,\n );\n\n parts.push(`**${qualifiedName(entry)}**`);\n lines.push(parts.join(\" → \"));\n }\n\n lines.push(...implementsLine(interfaces));\n\n return lines;\n};\n\nconst prerequisitesLine = (entry: ClassSymbol, library: Library): string[] => {\n const names = entry.klass.prerequisites.map((name) => {\n const resolved = library.resolveType(entry.namespace.name, name);\n\n if (resolved === undefined || (resolved.kind !== \"class\" && resolved.kind !== \"interface\")) {\n return `\\`${name}\\``;\n }\n\n return `\\`${qualifiedClassName(resolved.namespace.name, resolved.value.name)}\\``;\n });\n\n if (names.length === 0) {\n return [];\n }\n\n return [`Requires ${names.join(\", \")}.`];\n};\n\nconst interfaceImplementingIntro = (entry: ClassSymbol): string => {\n const qualified = qualifiedName(entry);\n\n return (\n `A class fills these vtable slots to adopt the interface: declare \\`implements ${qualified}Impl\\` ` +\n `on it and pass \\`${qualified}\\` in the \\`implements\\` option of \\`registerClass\\`. Every slot is ` +\n \"optional, and one the class leaves out keeps whatever the interface installs by default. The \" +\n \"methods, properties, and signals above come from GLib dispatch.\"\n );\n};\n\nconst classImplementingIntro = (entry: ClassSymbol): string => {\n const qualified = qualifiedName(entry);\n\n return (\n \"A subclass declared with `registerClass` overrides these virtual methods to change what \" +\n `\\`${qualified}\\` does: define the slot as a method on the subclass and call \\`super.<slot>(...)\\` ` +\n \"to chain up to the inherited implementation. A slot the subclass leaves out keeps that \" +\n \"implementation unchanged.\"\n );\n};\n\nconst implementingIntro = (entry: ClassPageSymbol): string =>\n entry.kind === \"interface\" ? interfaceImplementingIntro(entry) : classImplementingIntro(entry);\n\nconst implementingSection = (entry: ClassPageSymbol, library: Library): string[] => {\n const context = docsSignatureContext(entry.namespace, library);\n const entries = vfuncEntries(context, entry.namespace.name, entry.klass);\n\n if (entries.length === 0) {\n return [];\n }\n\n const blocks = sortStringsBy(entries, (item) => item.name).map((item) =>\n signatureBlock(item.name, item.signature, [docMarkdown(item.doc)]));\n\n return [\"## Implementing\", implementingIntro(entry), ...blocks];\n};\n\nconst staticEntry = (options: StaticSectionOptions, callable: GirFunction): SignatureEntry | undefined => {\n const signature = renderStaticSignature(options.context, callable, {\n returnTypeOverride: options.returnTypeOverride,\n siblings: options.siblings,\n });\n\n if (signature === undefined) {\n return undefined;\n }\n\n const finishFn = matchStaticFinishFunction(options.context, callable, options.siblings);\n\n return {\n name: signature.name,\n signature: signature.signature,\n doc: docMarkdown(callable.doc),\n tags: callableSpec(options.context, callable, { finishFn }),\n };\n};\n\nconst staticSection = (options: StaticSectionOptions): string[] => {\n const entries: SignatureEntry[] = [];\n\n for (const callable of dedupeCallables(options.callables)) {\n const entry = staticEntry(options, callable);\n\n if (entry !== undefined) {\n entries.push(entry);\n }\n }\n\n if (entries.length === 0) {\n return [];\n }\n\n const blocks = sortStringsBy(entries, (item) => item.name).map((item) => signatureEntryBlock(item));\n\n return [options.title, options.intro, ...blocks];\n};\n\nconst memberOwners = (entry: ClassSymbol, library: Library): MemberOwner[] => [\n { klass: entry.klass, namespace: entry.namespace, origin: undefined },\n ...newlyImplementedInterfaces(entry.klass, entry.namespace, library).map((iface) => ({\n klass: iface.klass,\n namespace: iface.namespace,\n origin: qualifiedClassName(iface.namespace.name, iface.klass.name),\n })),\n];\n\nconst interfaceMethodNames = (library: Library, owner: MemberOwner): string[] => {\n const context = docsSignatureContext(owner.namespace, library);\n const className = sanitizeTypeIdentifier(owner.klass.name);\n const methods = dedupeCallables(owner.klass.methods);\n\n const scope = instanceScope(className, {\n constructors: dedupeCallables(owner.klass.constructors),\n functions: dedupeCallables(owner.klass.functions),\n methods,\n });\n\n const names: string[] = [];\n\n for (const callable of methods) {\n const rename = reservedSignalMemberRename(className, callable);\n const rendered = renderInstanceMethodSignature(context, { ...callable, doc: undefined }, scope, rename);\n\n if (rendered === undefined) {\n continue;\n }\n\n names.push(rename ?? methodExportName(callable));\n }\n\n return names;\n};\n\nconst propertyAccessorSetup = (\n owner: MemberOwner,\n library: Library,\n isUseClassRenames: boolean,\n): PropertyAccessorSetup => {\n const claimedNames = new Set(\n isUseClassRenames\n ? classMethodEntries(library, owner.namespace, owner.klass).map((item) => item.name)\n : interfaceMethodNames(library, owner),\n );\n\n return {\n context: docsSignatureContext(owner.namespace, library),\n claimedNames,\n methodByName: indexMethodsByName(dedupeCallables(owner.klass.methods)),\n };\n};\n\nconst getAccessNotes = (accessor: ResolvedAccessor): string[] => {\n if (!accessor.isWritable) {\n return [\"read-only\"];\n }\n\n if (!accessor.hasGetter) {\n return [\"write-only\"];\n }\n\n return accessor.readType === accessor.writeType ? [] : [`writes \\`${accessor.writeType}\\``];\n};\n\nconst documentedAccessorType = (accessor: ResolvedAccessor): string =>\n accessor.hasGetter ? accessor.readType : accessor.writeType;\n\nconst ownerPropertyEntries = (owner: MemberOwner, setup: PropertyAccessorSetup, seen: Set<string>): MetaDocEntry[] => {\n const entries: MetaDocEntry[] = [];\n\n for (const property of owner.klass.properties) {\n const accessor = resolveAccessor({\n context: setup.context,\n property,\n claimedNames: setup.claimedNames,\n methodByName: setup.methodByName,\n });\n\n if (accessor === undefined || seen.has(accessor.jsName)) {\n continue;\n }\n\n seen.add(accessor.jsName);\n\n entries.push({\n name: accessor.jsName,\n meta: propertyMetaLine({\n type: documentedAccessorType(accessor),\n property,\n accessNotes: getAccessNotes(accessor),\n origin: owner.origin,\n }),\n doc: docMarkdown(property.doc),\n tags: annotationSpec(property.annotations),\n });\n }\n\n return entries;\n};\n\nconst propertiesSection = (entry: ClassPageSymbol, library: Library): string[] => {\n const seen: Set<string> = new Set();\n const entries: MetaDocEntry[] = [];\n\n for (const [index, owner] of memberOwners(entry, library).entries()) {\n const isUseClassRenames = index === 0 && entry.kind === \"class\";\n const setup = propertyAccessorSetup(owner, library, isUseClassRenames);\n entries.push(...ownerPropertyEntries(owner, setup, seen));\n }\n\n if (entries.length === 0) {\n return [];\n }\n\n const intro =\n \"Properties are read and written as instance fields; changes can be observed with \" +\n \"`connect(\\\"notify::<property-name>\\\", handler)`. Properties inherited from ancestors are \" +\n \"documented on their own pages.\";\n\n return [\"## Properties\", intro, ...sortedMetaBlocks(entries)];\n};\n\nconst ownerSignalEntries = (owner: MemberOwner, library: Library, seen: Set<string>): OriginSignatureEntry[] => {\n const entries: OriginSignatureEntry[] = [];\n\n for (const signal of owner.klass.signals) {\n if (seen.has(signal.name)) {\n continue;\n }\n\n seen.add(signal.name);\n\n entries.push({\n name: signal.name,\n signature: renderDocsSignalHandlerType(library, signal),\n doc: docMarkdown(signal.doc),\n tags: signalTags(signal, false),\n origin: owner.origin,\n });\n }\n\n return entries;\n};\n\nconst signalsSection = (entry: ClassSymbol, library: Library): string[] => {\n const seen: Set<string> = new Set();\n const entries: OriginSignatureEntry[] = [];\n\n for (const owner of memberOwners(entry, library)) {\n entries.push(...ownerSignalEntries(owner, library, seen));\n }\n\n if (entries.length === 0) {\n return [];\n }\n\n const intro =\n \"Connect with `instance.connect(\\\"<signal>\\\", handler)` or `instance.on(\\\"<signal>\\\", handler)`. \" +\n \"Signals inherited from ancestors are documented on their own pages.\";\n\n return [\"## Signals\", intro, ...originSignatureBlocks(entries)];\n};\n\nconst classMethodsSection = (entry: ClassSymbol, library: Library): string[] =>\n methodsSectionBlocks(\n classMethodEntries(library, entry.namespace, entry.klass),\n \"Methods are called on instances. Methods inherited from ancestors are documented on their own pages.\",\n );\n\nconst classPage = (entry: ClassPageSymbol, options: SymbolPageOptions): string => {\n const { library } = options;\n const qualified = qualifiedName(entry);\n const docsContext = docsSignatureContext(entry.namespace, library);\n const constructorsIntro = `Constructors are called on the class: \\`${qualified}.new(...)\\`.`;\n const staticIntro = `Static methods are called on the class: \\`${qualified}.<method>(...)\\`.`;\n const staticSiblings = [...entry.klass.constructors, ...entry.klass.functions];\n\n return joinSections([\n ...pageHeader(entry, entry.kind),\n ...elementNote(entry, options),\n ...(entry.kind === \"interface\" ? prerequisitesLine(entry, library) : hierarchySection(entry, library)),\n ...staticSection({\n title: \"## Constructors\",\n intro: constructorsIntro,\n context: docsContext,\n callables: entry.klass.constructors,\n siblings: staticSiblings,\n returnTypeOverride: qualified,\n }),\n ...staticSection({\n title: \"## Static methods\",\n intro: staticIntro,\n context: docsContext,\n callables: entry.klass.functions,\n siblings: staticSiblings,\n }),\n ...propertiesSection(entry, library),\n ...signalsSection(entry, library),\n ...classMethodsSection(entry, library),\n ...implementingSection(entry, library),\n ]);\n};\n\nconst renderSymbolPage = (entry: GiSymbolEntry, options: SymbolPageOptions): string => {\n switch (entry.kind) {\n case \"class\":\n case \"interface\": {\n return classPage(entry, options);\n }\n case \"record\": {\n return recordPage(entry, options.library);\n }\n case \"enum\": {\n return enumPage(entry);\n }\n case \"callback\": {\n return callbackPage(entry, options.library);\n }\n case \"alias\": {\n return aliasPage(entry, options.library);\n }\n case \"function\": {\n return functionPage(entry, options.library);\n }\n case \"constant\": {\n return constantPage(entry, options.library);\n }\n }\n};\n\nconst recordInstanceEntries = (context: ModuleContext, record: GirRecord): SignatureEntry[] => {\n const entries: SignatureEntry[] = [];\n\n for (const callable of dedupeCallables(record.methods)) {\n const rendered = renderStaticSignature(context, callable);\n\n if (rendered === undefined) {\n continue;\n }\n\n entries.push({\n name: rendered.name,\n signature: rendered.signature,\n doc: docMarkdown(callable.doc),\n tags: callableSpec(context, callable, {}),\n });\n }\n\n return sortStringsBy(entries, (item) => item.name);\n};\n\nconst recordPage = (entry: GiSymbolBase & { kind: \"record\"; record: GirRecord }, library: Library): string => {\n const docsContext = docsSignatureContext(entry.namespace, library);\n const qualified = qualifiedName(entry);\n const constructorsIntro = `Constructors are called on the class: \\`${qualified}.new(...)\\`.`;\n const staticIntro = `Static methods are called on the class: \\`${qualified}.<method>(...)\\`.`;\n const methodEntries = recordInstanceEntries(docsContext, entry.record);\n const claimedNames = new Set(methodEntries.map((item) => item.name));\n const staticSiblings = [...entry.record.constructors, ...entry.record.functions];\n\n return joinSections([\n ...pageHeader(entry, entry.record.isUnion ? \"union\" : \"record\"),\n ...staticSection({\n title: \"## Constructors\",\n intro: constructorsIntro,\n context: docsContext,\n callables: entry.record.constructors,\n siblings: staticSiblings,\n returnTypeOverride: qualified,\n }),\n ...staticSection({\n title: \"## Static methods\",\n intro: staticIntro,\n context: docsContext,\n callables: entry.record.functions,\n siblings: staticSiblings,\n }),\n ...fieldsSection(entry.record, docsContext, claimedNames),\n ...methodsSectionBlocks(methodEntries, \"Methods are called on instances.\"),\n ]);\n};\n\nconst fieldMeta = (field: ResolvedRecordField): string =>\n [\n `\\`${field.tsType}\\``,\n ...(field.isWritable ? [] : [\"read-only\"]),\n ...deprecationMeta(field.annotations),\n ].join(\" · \");\n\nconst fieldsSection = (record: GirRecord, context: ModuleContext, claimedNames: Set<string>): string[] => {\n const { slots } = computeRecordFieldSlots(context, record.fields, record.isUnion);\n const entries: MetaDocEntry[] = [];\n\n for (const slot of slots) {\n const field = resolveRecordFieldEntry(context, slot, claimedNames);\n\n if (field === undefined) {\n continue;\n }\n\n entries.push({\n name: field.jsName,\n meta: fieldMeta(field),\n doc: docMarkdown(field.doc),\n tags: annotationSpec(field.annotations),\n });\n }\n\n if (entries.length === 0) {\n return [];\n }\n\n return [\"## Fields\", ...sortedMetaBlocks(entries)];\n};\n\nconst memberDescription = (member: EnumMember): string => {\n const markers = deprecationMeta(member.annotations).map((note) => `**${upperFirst(note)}.**`);\n\n return [...markers, plainText(member.doc)]\n .filter((part) => part.length > 0)\n .join(\" \")\n .replaceAll(\"|\", String.raw`\\|`);\n};\n\nconst enumPage = (entry: GiSymbolBase & { kind: \"enum\"; enumeration: GirEnum }): string => {\n const { enumeration } = entry;\n const kindLabel = enumeration.errorDomain === undefined ? enumeration.kind : \"error domain\";\n const qualified = qualifiedName(entry);\n\n const rows = enumeration.members.map(\n (member) => `| \\`${enumMemberKey(member.name)}\\` | \\`${member.value}\\` | ${memberDescription(member)} |`,\n );\n\n const usage =\n enumeration.errorDomain === undefined\n ? `Members are accessed as \\`${qualified}.<member>\\`.`\n : `Members are error codes for the \\`${enumeration.errorDomain}\\` GError domain, ` +\n `accessed as \\`${qualified}.<member>\\`.`;\n\n const table = [\"| Member | Value | Description |\", \"| --- | --- | --- |\", ...rows].join(\"\\n\");\n\n return joinSections([...pageHeader(entry, kindLabel), \"## Members\", usage, table]);\n};\n\nconst callbackPage = (entry: GiSymbolBase & { kind: \"callback\"; callback: GirCallback }, library: Library): string => {\n const docsContext = docsSignatureContext(entry.namespace, library);\n const fn = callbackAsFunction(entry.callback);\n const parameters = renderMethodSignature(docsContext, fn);\n const signature = `type ${entry.name} = (${parameters}) => ${renderMethodReturnType(docsContext, fn)}`;\n\n return joinSections([\n ...pageHeader(entry, \"callback\"),\n \"## Signature\",\n `\\`\\`\\`ts\\n${signature}\\n\\`\\`\\``,\n ...pageTagNotes(callableSpec(docsContext, fn, {})),\n ]);\n};\n\nconst aliasPage = (entry: GiSymbolBase & { kind: \"alias\"; alias: GirAlias }, library: Library): string => {\n const docsContext = docsSignatureContext(entry.namespace, library);\n const category = entry.alias.cType === undefined ? undefined : primitiveCategory(entry.alias.cType);\n const target = category === \"gtype\" ? PRIMITIVE_TS_TYPE.gtype : renderTsType(docsContext, entry.alias.target);\n\n return joinSections([...pageHeader(entry, \"alias\"), `\\`\\`\\`ts\\ntype ${entry.name} = ${target}\\n\\`\\`\\``]);\n};\n\nconst functionSignature = (context: ModuleContext, name: string, fn: GirFunction, siblings: GirFunction[]): string => {\n const finishFn = matchStaticFinishFunction(context, fn, siblings);\n\n if (finishFn !== undefined) {\n const { signature, returnType } = renderPromisifiedSignature(context, fn, finishFn);\n\n return `function ${name}(${signature}): ${returnType}`;\n }\n\n return `function ${name}(${renderMethodSignature(context, fn)}): ${renderMethodReturnType(context, fn)}`;\n};\n\nconst functionPage = (entry: GiSymbolBase & { kind: \"function\"; fn: GirFunction }, library: Library): string => {\n const docsContext = docsSignatureContext(entry.namespace, library);\n const siblings = entry.namespace.functions;\n const signature = functionSignature(docsContext, entry.name, entry.fn, siblings);\n const finishFn = matchStaticFinishFunction(docsContext, entry.fn, siblings);\n const spec = callableSpec(docsContext, entry.fn, { finishFn });\n\n return joinSections([...pageHeader(entry, \"function\"), `\\`\\`\\`ts\\n${signature}\\n\\`\\`\\``, ...pageTagNotes(spec)]);\n};\n\nconst constantPage = (entry: GiSymbolBase & { kind: \"constant\"; constant: GirConstant }, library: Library): string => {\n const docsContext = docsSignatureContext(entry.namespace, library);\n const type = renderDocsType(library, entry.constant.type, false);\n\n return joinSections([\n ...pageHeader(entry, \"constant\"),\n `\\`\\`\\`ts\\nconst ${entry.name}: ${type} = ${constantLiteral(docsContext, entry.constant)}\\n\\`\\`\\``,\n ]);\n};\n\nexport { renderSymbolPage, type GiSymbolEntry, type SymbolPageOptions };\n"]}
|
|
1
|
+
{"version":3,"file":"symbol-page.js","sourceRoot":"","sources":["../../src/docs/symbol-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAShF,OAAO,EAAE,0BAA0B,EAAE,MAA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QAAQ,CAAC,CAAC;IACjF,MAAM,QAAQ,GAAG,yBAAyB,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC5E,MAAM,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE/D,OAAO,YAAY,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,aAAa,SAAS,UAAU,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrH,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAiE,EAAE,OAAgB,EAAU,EAAE;IACjH,MAAM,WAAW,GAAG,oBAAoB,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnE,MAAM,IAAI,GAAG,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAEjE,OAAO,YAAY,CAAC;QAChB,GAAG,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC;QAChC,mBAAmB,KAAK,CAAC,IAAI,KAAK,IAAI,MAAM,eAAe,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU;KACrG,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAA8C,CAAC","sourcesContent":["import { sanitizeTypeIdentifier, sortStringsBy, upperFirst } from \"@gtkx/utils\";\nimport type { GirAnnotations } from \"../gir/annotations.js\";\nimport type { GirClass } from \"../gir/class.js\";\nimport type { EnumMember, GirEnum } from \"../gir/enum.js\";\nimport type { GirFunction } from \"../gir/function.js\";\nimport type { Library } from \"../gir/library.js\";\nimport type { GirRecord } from \"../gir/record.js\";\nimport type { ModuleContext } from \"../writer/context.js\";\nimport type { JsDocSpec } from \"../writer/doc.js\";\nimport { reservedSignalMemberRename } from \"../analysis/inheritance.js\";\nimport { renderTsType } from \"../analysis/ts-type.js\";\nimport { ancestorChain } from \"../gir/ancestry.js\";\nimport { callbackAsFunction, type GirCallback } from \"../gir/callback.js\";\nimport { type GirAlias, type GirConstant, type GirNamespace, namespaceDirectory } from \"../gir/namespace.js\";\nimport { PRIMITIVE_TS_TYPE, primitiveCategory } from \"../gir/primitives.js\";\nimport { callableSpec } from \"../store/gi/callable-doc.js\";\nimport {\n dedupeCallables,\n instanceScope,\n matchStaticFinishFunction,\n renderInstanceMethodSignature,\n renderStaticSignature,\n} from \"../store/gi/callables.js\";\nimport { constantLiteral } from \"../store/gi/constant.js\";\nimport { annotationSpec } from \"../store/gi/doc-spec.js\";\nimport { enumMemberKey } from \"../store/gi/enum.js\";\nimport {\n methodExportName,\n renderMethodReturnType,\n renderMethodSignature,\n renderPromisifiedSignature,\n} from \"../store/gi/method.js\";\nimport { resolveAccessor, type ResolvedAccessor } from \"../store/gi/property-accessor.js\";\nimport { resolveRecordFieldEntry } from \"../store/gi/record-field-accessor.js\";\nimport { computeRecordFieldSlots } from \"../store/gi/record-layout.js\";\nimport { vfuncEntries } from \"../store/gi/vtable.js\";\nimport { implementedInterfaces, newlyImplementedInterfaces } from \"../store/jsx/intrinsic-elements.js\";\nimport {\n annotationNotes,\n classMethodEntries,\n deprecationMeta,\n docMarkdown,\n docsSignatureContext,\n firstSentence,\n implementsLine,\n joinSections,\n type MetaDocEntry,\n methodsSectionBlocks,\n originSignatureBlocks,\n type OriginSignatureEntry,\n plainText,\n propertyMetaLine,\n qualifiedClassName,\n renderDocsSignalHandlerType,\n renderDocsType,\n signalTags,\n signatureBlock,\n type SignatureEntry,\n signatureEntryBlock,\n sortedMetaBlocks,\n tagNotes,\n} from \"./render.js\";\n\n/** What every indexed GIR symbol carries, whatever its kind. */\ntype GiSymbolBase = {\n /** GIR namespace declaring the symbol. */\n namespace: GirNamespace;\n /** Name the bindings export it under: camelCase for functions, PascalCase for classes, the GIR name otherwise. */\n name: string;\n /** Raw gtk-doc text from the GIR, undefined when the symbol is undocumented. */\n doc: string | undefined;\n};\n\n/** A GIR symbol the reference indexes, discriminated by `kind` and carrying the GIR node its page renders from. */\ntype GiSymbolEntry =\n | (GiSymbolBase & {\n /** Renders the class page: hierarchy, constructors, static methods, properties, signals, and methods. */\n kind: \"class\" | \"interface\";\n /** Supplies the ancestry, members, and, on an interface, the vtable slots an implementer fills. */\n klass: GirClass;\n }) |\n (GiSymbolBase & {\n /** Renders the record page, labeled `union` when the record is one. */\n kind: \"record\";\n /** Supplies the constructors, static methods, fields, and instance methods. */\n record: GirRecord;\n }) |\n (GiSymbolBase & {\n /** Renders the page for an enumeration, a flags type, or an error domain, as a table of members. */\n kind: \"enum\";\n /** Supplies the members, their values, and the GError domain when the enum carries one. */\n enumeration: GirEnum;\n }) |\n (GiSymbolBase & {\n /** Renders the callback page as a single function type signature. */\n kind: \"callback\";\n /** Supplies the parameters and return type the signature is rendered from. */\n callback: GirCallback;\n }) |\n (GiSymbolBase & {\n /** Renders the alias page as the type the alias resolves to. */\n kind: \"alias\";\n /** Supplies the target type the page prints. */\n alias: GirAlias;\n }) |\n (GiSymbolBase & {\n /** Renders the page for a namespace-level function, promisified when a finish function matches it. */\n kind: \"function\";\n /** Supplies the parameters and return type the signature is rendered from. */\n fn: GirFunction;\n }) |\n (GiSymbolBase & {\n /** Renders the page for a namespace-level constant, showing its type and literal value. */\n kind: \"constant\";\n /** Supplies the type and the value the literal is emitted from. */\n constant: GirConstant;\n });\n\ntype ClassSymbol = GiSymbolBase & { klass: GirClass };\ntype ClassPageSymbol = ClassSymbol & { kind: \"class\" | \"interface\" };\n\n/** What {@link renderSymbolPage} needs besides the entry itself. */\ntype SymbolPageOptions = {\n /** Parsed GIR the page resolves ancestry, interfaces, and referenced types against. */\n library: Library;\n /** Looks up the JSX element a class is also available as, undefined when it has none. */\n elementNameFor: (namespaceName: string, className: string) => string | undefined;\n};\n\ntype StaticSectionOptions = {\n title: string;\n intro: string;\n context: ModuleContext;\n callables: GirFunction[];\n siblings: GirFunction[];\n returnTypeOverride?: string;\n};\n\ntype MemberOwner = {\n klass: GirClass;\n namespace: GirNamespace;\n origin: string | undefined;\n};\n\ntype PropertyAccessorSetup = {\n context: ModuleContext;\n claimedNames: Set<string>;\n};\n\ntype ResolvedRecordField = NonNullable<ReturnType<typeof resolveRecordFieldEntry>>;\n\nconst qualifiedName = (entry: GiSymbolBase): string => `${entry.namespace.name}.${entry.name}`;\nconst pageTagNotes = (spec: JsDocSpec): string[] => tagNotes({ ...spec, deprecated: undefined, since: undefined });\n\nconst frontmatter = (entry: GiSymbolBase, kindLabel: string): string => {\n const sentence = firstSentence(entry.doc);\n const description = sentence.length > 0 ? sentence : `API reference for the ${qualifiedName(entry)} ${kindLabel}.`;\n\n return `---\\ndescription: ${JSON.stringify(description)}\\n---`;\n};\n\nconst kindLine = (kindLabel: string, namespace: GirNamespace): string =>\n `\\`${kindLabel}\\` in \\`@gtkx/gi/${namespaceDirectory(namespace)}\\``;\n\nconst importBlock = (entry: GiSymbolBase): string =>\n `\\`\\`\\`ts\\nimport * as ${entry.namespace.name} from \"@gtkx/gi/${namespaceDirectory(entry.namespace)}\";\\n\\`\\`\\``;\n\nconst entryAnnotations = (entry: GiSymbolEntry): GirAnnotations => {\n switch (entry.kind) {\n case \"class\":\n case \"interface\": {\n return entry.klass.annotations;\n }\n case \"record\": {\n return entry.record.annotations;\n }\n case \"enum\": {\n return entry.enumeration.annotations;\n }\n case \"callback\": {\n return entry.callback.annotations;\n }\n case \"alias\": {\n return entry.alias.annotations;\n }\n case \"function\": {\n return entry.fn.annotations;\n }\n case \"constant\": {\n return entry.constant.annotations;\n }\n }\n};\n\nconst pageHeader = (entry: GiSymbolEntry, kindLabel: string): string[] => [\n frontmatter(entry, kindLabel),\n `# ${qualifiedName(entry)}`,\n kindLine(kindLabel, entry.namespace),\n docMarkdown(entry.doc),\n ...annotationNotes(entryAnnotations(entry)),\n importBlock(entry),\n];\n\nconst elementNote = (entry: ClassSymbol, options: SymbolPageOptions): string[] => {\n const glibName = options.elementNameFor(entry.namespace.name, entry.klass.name);\n\n if (glibName === undefined) {\n return [];\n }\n\n return [\n `Also available as the \\`${glibName}\\` JSX element from ` +\n `\\`@gtkx/jsx/${namespaceDirectory(entry.namespace)}\\`; the \\`${glibName}\\` element page ` +\n \"documents the JSX props.\",\n ];\n};\n\nconst hierarchySection = (entry: ClassSymbol, library: Library): string[] => {\n const ancestors = [...ancestorChain(library, entry.klass, entry.namespace.name)].slice(1).toReversed();\n\n const interfaces = implementedInterfaces(entry.klass, entry.namespace, library).map((iface) =>\n qualifiedClassName(iface.namespace.name, iface.klass.name),\n );\n\n if (ancestors.length === 0 && interfaces.length === 0) {\n return [];\n }\n\n const lines = [\"## Hierarchy\"];\n\n if (ancestors.length > 0) {\n const parts = ancestors.map(\n (ancestor) => `\\`${qualifiedClassName(ancestor.namespaceName, ancestor.klass.name)}\\``,\n );\n\n parts.push(`**${qualifiedName(entry)}**`);\n lines.push(parts.join(\" → \"));\n }\n\n lines.push(...implementsLine(interfaces));\n\n return lines;\n};\n\nconst prerequisitesLine = (entry: ClassSymbol, library: Library): string[] => {\n const names = entry.klass.prerequisites.map((name) => {\n const resolved = library.resolveType(entry.namespace.name, name);\n\n if (resolved === undefined || (resolved.kind !== \"class\" && resolved.kind !== \"interface\")) {\n return `\\`${name}\\``;\n }\n\n return `\\`${qualifiedClassName(resolved.namespace.name, resolved.value.name)}\\``;\n });\n\n if (names.length === 0) {\n return [];\n }\n\n return [`Requires ${names.join(\", \")}.`];\n};\n\nconst interfaceImplementingIntro = (entry: ClassSymbol): string => {\n const qualified = qualifiedName(entry);\n\n return (\n `A class fills these vtable slots to adopt the interface: declare \\`implements ${qualified}Impl\\` ` +\n `on it and pass \\`${qualified}\\` in the \\`implements\\` option of \\`registerClass\\`. Every slot is ` +\n \"optional, and one the class leaves out keeps whatever the interface installs by default. The \" +\n \"methods, properties, and signals above come from GLib dispatch.\"\n );\n};\n\nconst classImplementingIntro = (entry: ClassSymbol): string => {\n const qualified = qualifiedName(entry);\n\n return (\n \"A subclass declared with `registerClass` overrides these virtual methods to change what \" +\n `\\`${qualified}\\` does: define the slot as a method on the subclass and call \\`super.<slot>(...)\\` ` +\n \"to chain up to the inherited implementation. A slot the subclass leaves out keeps that \" +\n \"implementation unchanged.\"\n );\n};\n\nconst implementingIntro = (entry: ClassPageSymbol): string =>\n entry.kind === \"interface\" ? interfaceImplementingIntro(entry) : classImplementingIntro(entry);\n\nconst implementingSection = (entry: ClassPageSymbol, library: Library): string[] => {\n const context = docsSignatureContext(entry.namespace, library);\n const entries = vfuncEntries(context, entry.namespace.name, entry.klass);\n\n if (entries.length === 0) {\n return [];\n }\n\n const blocks = sortStringsBy(entries, (item) => item.name).map((item) =>\n signatureBlock(item.name, item.signature, [docMarkdown(item.doc)]));\n\n return [\"## Implementing\", implementingIntro(entry), ...blocks];\n};\n\nconst staticEntry = (options: StaticSectionOptions, callable: GirFunction): SignatureEntry | undefined => {\n const signature = renderStaticSignature(options.context, callable, {\n returnTypeOverride: options.returnTypeOverride,\n siblings: options.siblings,\n });\n\n if (signature === undefined) {\n return undefined;\n }\n\n const finishFn = matchStaticFinishFunction(options.context, callable, options.siblings);\n\n return {\n name: signature.name,\n signature: signature.signature,\n doc: docMarkdown(callable.doc),\n tags: callableSpec(options.context, callable, { finishFn }),\n };\n};\n\nconst staticSection = (options: StaticSectionOptions): string[] => {\n const entries: SignatureEntry[] = [];\n\n for (const callable of dedupeCallables(options.callables)) {\n const entry = staticEntry(options, callable);\n\n if (entry !== undefined) {\n entries.push(entry);\n }\n }\n\n if (entries.length === 0) {\n return [];\n }\n\n const blocks = sortStringsBy(entries, (item) => item.name).map((item) => signatureEntryBlock(item));\n\n return [options.title, options.intro, ...blocks];\n};\n\nconst memberOwners = (entry: ClassSymbol, library: Library): MemberOwner[] => [\n { klass: entry.klass, namespace: entry.namespace, origin: undefined },\n ...newlyImplementedInterfaces(entry.klass, entry.namespace, library).map((iface) => ({\n klass: iface.klass,\n namespace: iface.namespace,\n origin: qualifiedClassName(iface.namespace.name, iface.klass.name),\n })),\n];\n\nconst interfaceMethodNames = (library: Library, owner: MemberOwner): string[] => {\n const context = docsSignatureContext(owner.namespace, library);\n const className = sanitizeTypeIdentifier(owner.klass.name);\n const methods = dedupeCallables(owner.klass.methods);\n\n const scope = instanceScope(className, {\n constructors: dedupeCallables(owner.klass.constructors),\n functions: dedupeCallables(owner.klass.functions),\n methods,\n });\n\n const names: string[] = [];\n\n for (const callable of methods) {\n const rename = reservedSignalMemberRename(className, callable);\n const rendered = renderInstanceMethodSignature(context, { ...callable, doc: undefined }, scope, rename);\n\n if (rendered === undefined) {\n continue;\n }\n\n names.push(rename ?? methodExportName(callable));\n }\n\n return names;\n};\n\nconst propertyAccessorSetup = (\n owner: MemberOwner,\n library: Library,\n isUseClassRenames: boolean,\n): PropertyAccessorSetup => {\n const claimedNames = new Set(\n isUseClassRenames\n ? classMethodEntries(library, owner.namespace, owner.klass).map((item) => item.name)\n : interfaceMethodNames(library, owner),\n );\n\n return {\n context: docsSignatureContext(owner.namespace, library),\n claimedNames,\n };\n};\n\nconst getAccessNotes = (accessor: ResolvedAccessor): string[] => {\n if (!accessor.isWritable) {\n return [\"read-only\"];\n }\n\n if (!accessor.hasGetter) {\n return [\"write-only\"];\n }\n\n return accessor.readType === accessor.writeType ? [] : [`writes \\`${accessor.writeType}\\``];\n};\n\nconst documentedAccessorType = (accessor: ResolvedAccessor): string =>\n accessor.hasGetter ? accessor.readType : accessor.writeType;\n\nconst ownerPropertyEntries = (owner: MemberOwner, setup: PropertyAccessorSetup, seen: Set<string>): MetaDocEntry[] => {\n const entries: MetaDocEntry[] = [];\n\n for (const property of owner.klass.properties) {\n const accessor = resolveAccessor({\n context: setup.context,\n property,\n claimedNames: setup.claimedNames,\n });\n\n if (accessor === undefined || seen.has(accessor.jsName)) {\n continue;\n }\n\n seen.add(accessor.jsName);\n\n entries.push({\n name: accessor.jsName,\n meta: propertyMetaLine({\n type: documentedAccessorType(accessor),\n property,\n accessNotes: getAccessNotes(accessor),\n origin: owner.origin,\n }),\n doc: docMarkdown(property.doc),\n tags: annotationSpec(property.annotations),\n });\n }\n\n return entries;\n};\n\nconst propertiesSection = (entry: ClassPageSymbol, library: Library): string[] => {\n const seen: Set<string> = new Set();\n const entries: MetaDocEntry[] = [];\n\n for (const [index, owner] of memberOwners(entry, library).entries()) {\n const isUseClassRenames = index === 0 && entry.kind === \"class\";\n const setup = propertyAccessorSetup(owner, library, isUseClassRenames);\n entries.push(...ownerPropertyEntries(owner, setup, seen));\n }\n\n if (entries.length === 0) {\n return [];\n }\n\n const intro =\n \"Properties are read and written as instance fields; changes can be observed with \" +\n \"`connect(\\\"notify::<property-name>\\\", handler)`. Properties inherited from ancestors are \" +\n \"documented on their own pages.\";\n\n return [\"## Properties\", intro, ...sortedMetaBlocks(entries)];\n};\n\nconst ownerSignalEntries = (owner: MemberOwner, library: Library, seen: Set<string>): OriginSignatureEntry[] => {\n const entries: OriginSignatureEntry[] = [];\n\n for (const signal of owner.klass.signals) {\n if (seen.has(signal.name)) {\n continue;\n }\n\n seen.add(signal.name);\n\n entries.push({\n name: signal.name,\n signature: renderDocsSignalHandlerType(library, signal),\n doc: docMarkdown(signal.doc),\n tags: signalTags(signal, false),\n origin: owner.origin,\n });\n }\n\n return entries;\n};\n\nconst signalsSection = (entry: ClassSymbol, library: Library): string[] => {\n const seen: Set<string> = new Set();\n const entries: OriginSignatureEntry[] = [];\n\n for (const owner of memberOwners(entry, library)) {\n entries.push(...ownerSignalEntries(owner, library, seen));\n }\n\n if (entries.length === 0) {\n return [];\n }\n\n const intro =\n \"Connect with `instance.connect(\\\"<signal>\\\", handler)` or `instance.on(\\\"<signal>\\\", handler)`. \" +\n \"Signals inherited from ancestors are documented on their own pages.\";\n\n return [\"## Signals\", intro, ...originSignatureBlocks(entries)];\n};\n\nconst classMethodsSection = (entry: ClassSymbol, library: Library): string[] =>\n methodsSectionBlocks(\n classMethodEntries(library, entry.namespace, entry.klass),\n \"Methods are called on instances. Methods inherited from ancestors are documented on their own pages.\",\n );\n\nconst classPage = (entry: ClassPageSymbol, options: SymbolPageOptions): string => {\n const { library } = options;\n const qualified = qualifiedName(entry);\n const docsContext = docsSignatureContext(entry.namespace, library);\n const constructorsIntro = `Constructors are called on the class: \\`${qualified}.new(...)\\`.`;\n const staticIntro = `Static methods are called on the class: \\`${qualified}.<method>(...)\\`.`;\n const staticSiblings = [...entry.klass.constructors, ...entry.klass.functions];\n\n return joinSections([\n ...pageHeader(entry, entry.kind),\n ...elementNote(entry, options),\n ...(entry.kind === \"interface\" ? prerequisitesLine(entry, library) : hierarchySection(entry, library)),\n ...staticSection({\n title: \"## Constructors\",\n intro: constructorsIntro,\n context: docsContext,\n callables: entry.klass.constructors,\n siblings: staticSiblings,\n returnTypeOverride: qualified,\n }),\n ...staticSection({\n title: \"## Static methods\",\n intro: staticIntro,\n context: docsContext,\n callables: entry.klass.functions,\n siblings: staticSiblings,\n }),\n ...propertiesSection(entry, library),\n ...signalsSection(entry, library),\n ...classMethodsSection(entry, library),\n ...implementingSection(entry, library),\n ]);\n};\n\nconst renderSymbolPage = (entry: GiSymbolEntry, options: SymbolPageOptions): string => {\n switch (entry.kind) {\n case \"class\":\n case \"interface\": {\n return classPage(entry, options);\n }\n case \"record\": {\n return recordPage(entry, options.library);\n }\n case \"enum\": {\n return enumPage(entry);\n }\n case \"callback\": {\n return callbackPage(entry, options.library);\n }\n case \"alias\": {\n return aliasPage(entry, options.library);\n }\n case \"function\": {\n return functionPage(entry, options.library);\n }\n case \"constant\": {\n return constantPage(entry, options.library);\n }\n }\n};\n\nconst recordInstanceEntries = (context: ModuleContext, record: GirRecord): SignatureEntry[] => {\n const entries: SignatureEntry[] = [];\n\n for (const callable of dedupeCallables(record.methods)) {\n const rendered = renderStaticSignature(context, callable);\n\n if (rendered === undefined) {\n continue;\n }\n\n entries.push({\n name: rendered.name,\n signature: rendered.signature,\n doc: docMarkdown(callable.doc),\n tags: callableSpec(context, callable, {}),\n });\n }\n\n return sortStringsBy(entries, (item) => item.name);\n};\n\nconst recordPage = (entry: GiSymbolBase & { kind: \"record\"; record: GirRecord }, library: Library): string => {\n const docsContext = docsSignatureContext(entry.namespace, library);\n const qualified = qualifiedName(entry);\n const constructorsIntro = `Constructors are called on the class: \\`${qualified}.new(...)\\`.`;\n const staticIntro = `Static methods are called on the class: \\`${qualified}.<method>(...)\\`.`;\n const methodEntries = recordInstanceEntries(docsContext, entry.record);\n const claimedNames = new Set(methodEntries.map((item) => item.name));\n const staticSiblings = [...entry.record.constructors, ...entry.record.functions];\n\n return joinSections([\n ...pageHeader(entry, entry.record.isUnion ? \"union\" : \"record\"),\n ...staticSection({\n title: \"## Constructors\",\n intro: constructorsIntro,\n context: docsContext,\n callables: entry.record.constructors,\n siblings: staticSiblings,\n returnTypeOverride: qualified,\n }),\n ...staticSection({\n title: \"## Static methods\",\n intro: staticIntro,\n context: docsContext,\n callables: entry.record.functions,\n siblings: staticSiblings,\n }),\n ...fieldsSection(entry.record, docsContext, claimedNames),\n ...methodsSectionBlocks(methodEntries, \"Methods are called on instances.\"),\n ]);\n};\n\nconst fieldMeta = (field: ResolvedRecordField): string =>\n [\n `\\`${field.tsType}\\``,\n ...(field.isWritable ? [] : [\"read-only\"]),\n ...deprecationMeta(field.annotations),\n ].join(\" · \");\n\nconst fieldsSection = (record: GirRecord, context: ModuleContext, claimedNames: Set<string>): string[] => {\n const { slots } = computeRecordFieldSlots(context, record.fields, record.isUnion);\n const entries: MetaDocEntry[] = [];\n\n for (const slot of slots) {\n const field = resolveRecordFieldEntry(context, slot, claimedNames, record.fields);\n\n if (field === undefined) {\n continue;\n }\n\n entries.push({\n name: field.jsName,\n meta: fieldMeta(field),\n doc: docMarkdown(field.doc),\n tags: annotationSpec(field.annotations),\n });\n }\n\n if (entries.length === 0) {\n return [];\n }\n\n return [\"## Fields\", ...sortedMetaBlocks(entries)];\n};\n\nconst memberDescription = (member: EnumMember): string => {\n const markers = deprecationMeta(member.annotations).map((note) => `**${upperFirst(note)}.**`);\n\n return [...markers, plainText(member.doc)]\n .filter((part) => part.length > 0)\n .join(\" \")\n .replaceAll(\"|\", String.raw`\\|`);\n};\n\nconst enumPage = (entry: GiSymbolBase & { kind: \"enum\"; enumeration: GirEnum }): string => {\n const { enumeration } = entry;\n const kindLabel = enumeration.errorDomain === undefined ? enumeration.kind : \"error domain\";\n const qualified = qualifiedName(entry);\n\n const rows = enumeration.members.map(\n (member) => `| \\`${enumMemberKey(member.name)}\\` | \\`${member.value}\\` | ${memberDescription(member)} |`,\n );\n\n const usage =\n enumeration.errorDomain === undefined\n ? `Members are accessed as \\`${qualified}.<member>\\`.`\n : `Members are error codes for the \\`${enumeration.errorDomain}\\` GError domain, ` +\n `accessed as \\`${qualified}.<member>\\`.`;\n\n const table = [\"| Member | Value | Description |\", \"| --- | --- | --- |\", ...rows].join(\"\\n\");\n\n return joinSections([...pageHeader(entry, kindLabel), \"## Members\", usage, table]);\n};\n\nconst callbackPage = (entry: GiSymbolBase & { kind: \"callback\"; callback: GirCallback }, library: Library): string => {\n const docsContext = docsSignatureContext(entry.namespace, library);\n const fn = callbackAsFunction(entry.callback);\n const parameters = renderMethodSignature(docsContext, fn);\n const signature = `type ${entry.name} = (${parameters}) => ${renderMethodReturnType(docsContext, fn)}`;\n\n return joinSections([\n ...pageHeader(entry, \"callback\"),\n \"## Signature\",\n `\\`\\`\\`ts\\n${signature}\\n\\`\\`\\``,\n ...pageTagNotes(callableSpec(docsContext, fn, {})),\n ]);\n};\n\nconst aliasPage = (entry: GiSymbolBase & { kind: \"alias\"; alias: GirAlias }, library: Library): string => {\n const docsContext = docsSignatureContext(entry.namespace, library);\n const category = entry.alias.cType === undefined ? undefined : primitiveCategory(entry.alias.cType);\n const target = category === \"gtype\" ? PRIMITIVE_TS_TYPE.gtype : renderTsType(docsContext, entry.alias.target);\n\n return joinSections([...pageHeader(entry, \"alias\"), `\\`\\`\\`ts\\ntype ${entry.name} = ${target}\\n\\`\\`\\``]);\n};\n\nconst functionSignature = (context: ModuleContext, name: string, fn: GirFunction, siblings: GirFunction[]): string => {\n const finishFn = matchStaticFinishFunction(context, fn, siblings);\n\n if (finishFn !== undefined) {\n const { signature, returnType } = renderPromisifiedSignature(context, fn, finishFn);\n\n return `function ${name}(${signature}): ${returnType}`;\n }\n\n return `function ${name}(${renderMethodSignature(context, fn)}): ${renderMethodReturnType(context, fn)}`;\n};\n\nconst functionPage = (entry: GiSymbolBase & { kind: \"function\"; fn: GirFunction }, library: Library): string => {\n const docsContext = docsSignatureContext(entry.namespace, library);\n const siblings = entry.namespace.functions;\n const signature = functionSignature(docsContext, entry.name, entry.fn, siblings);\n const finishFn = matchStaticFinishFunction(docsContext, entry.fn, siblings);\n const spec = callableSpec(docsContext, entry.fn, { finishFn });\n\n return joinSections([...pageHeader(entry, \"function\"), `\\`\\`\\`ts\\n${signature}\\n\\`\\`\\``, ...pageTagNotes(spec)]);\n};\n\nconst constantPage = (entry: GiSymbolBase & { kind: \"constant\"; constant: GirConstant }, library: Library): string => {\n const docsContext = docsSignatureContext(entry.namespace, library);\n const type = renderDocsType(library, entry.constant.type, false);\n\n return joinSections([\n ...pageHeader(entry, \"constant\"),\n `\\`\\`\\`ts\\nconst ${entry.name}: ${type} = ${constantLiteral(docsContext, entry.constant)}\\n\\`\\`\\``,\n ]);\n};\n\nexport { renderSymbolPage, type GiSymbolEntry, type SymbolPageOptions };\n"]}
|
package/dist/fingerprint.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
type GiInputs = {
|
|
2
|
+
girFiles: string[];
|
|
3
|
+
libraries: string[];
|
|
4
|
+
girPath: string[];
|
|
5
|
+
isByteArrayTyped: boolean;
|
|
6
|
+
};
|
|
1
7
|
type GiFingerprint = {
|
|
2
8
|
value: string;
|
|
3
9
|
girFiles: string[];
|
|
@@ -29,14 +35,14 @@ type JsxFingerprint = {
|
|
|
29
35
|
intrinsicElementCount: number;
|
|
30
36
|
};
|
|
31
37
|
declare const FINGERPRINT_FILENAME = ".codegen-fingerprint.json";
|
|
32
|
-
declare const computeGiFingerprint: (
|
|
33
|
-
declare const isGiStoreFresh: (giStoreDir: string,
|
|
34
|
-
declare const computeDocsFingerprint: (
|
|
35
|
-
declare const isDocsOutputFresh: (outDir: string,
|
|
38
|
+
declare const computeGiFingerprint: (inputs: GiInputs) => GiFingerprint;
|
|
39
|
+
declare const isGiStoreFresh: (giStoreDir: string, inputs: GiInputs) => boolean;
|
|
40
|
+
declare const computeDocsFingerprint: (inputs: GiInputs, input: DocsFingerprintInput) => DocsFingerprint;
|
|
41
|
+
declare const isDocsOutputFresh: (outDir: string, inputs: GiInputs, input: DocsFingerprintInput) => boolean;
|
|
36
42
|
declare const computeJsxFingerprint: (input: JsxFingerprintInput, intrinsicElementCount: number) => JsxFingerprint;
|
|
37
43
|
declare const jsxStoreFreshness: (jsxStoreDir: string, input: JsxFingerprintInput) => {
|
|
38
44
|
isFresh: boolean;
|
|
39
45
|
intrinsicElementCount: number;
|
|
40
46
|
};
|
|
41
|
-
export { FINGERPRINT_FILENAME, computeGiFingerprint, computeDocsFingerprint, isGiStoreFresh, isDocsOutputFresh, computeJsxFingerprint, jsxStoreFreshness, type DocsFingerprintInput, type GiFingerprint, type JsxFingerprintInput, };
|
|
47
|
+
export { FINGERPRINT_FILENAME, computeGiFingerprint, computeDocsFingerprint, isGiStoreFresh, isDocsOutputFresh, computeJsxFingerprint, jsxStoreFreshness, type DocsFingerprintInput, type GiInputs, type GiFingerprint, type JsxFingerprintInput, };
|
|
42
48
|
//# sourceMappingURL=fingerprint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../src/fingerprint.ts"],"names":[],"mappings":"AASA,KAAK,aAAa,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,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AAoB,KAAG,OAU1F,CAAC;AAsBF,QAAA,MAAM,qBAAqB,GAAI,OAAO,mBAAmB,EAAE,uBAAuB,MAAM,KAAG,cAGzF,CAAC;AAEH,QAAA,MAAM,iBAAiB,GACnB,aAAa,MAAM,EACnB,OAAO,mBAAmB,KAC3B;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,qBAAqB,EAAE,MAAM,CAAA;CAUnD,CAAC;AAEF,OAAO,EACH,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,mBAAmB,GAC3B,CAAC"}
|
package/dist/fingerprint.js
CHANGED
|
@@ -18,15 +18,17 @@ const overrideFiles = () => {
|
|
|
18
18
|
.filter((entry) => entry.isFile())
|
|
19
19
|
.map((entry) => join(entry.parentPath, entry.name));
|
|
20
20
|
};
|
|
21
|
-
const hashGi = (
|
|
21
|
+
const hashGi = (inputs) => {
|
|
22
22
|
const hash = createHash("sha256");
|
|
23
23
|
hash.update(CODEGEN_VERSION);
|
|
24
24
|
hash.update("\n");
|
|
25
|
-
hash.update(sortAlpha(libraries));
|
|
25
|
+
hash.update(sortAlpha(inputs.libraries));
|
|
26
26
|
hash.update("\n");
|
|
27
|
-
hash.update(sortAlpha(girPath));
|
|
27
|
+
hash.update(sortAlpha(inputs.girPath));
|
|
28
28
|
hash.update("\n");
|
|
29
|
-
|
|
29
|
+
hash.update(String(inputs.isByteArrayTyped));
|
|
30
|
+
hash.update("\n");
|
|
31
|
+
const hashedFiles = sortStrings([...inputs.girFiles, ...overrideFiles()]);
|
|
30
32
|
for (const file of hashedFiles) {
|
|
31
33
|
hash.update("\n");
|
|
32
34
|
hash.update(file);
|
|
@@ -35,11 +37,11 @@ const hashGi = (girFiles, libraries, girPath) => {
|
|
|
35
37
|
}
|
|
36
38
|
return hash.digest("hex");
|
|
37
39
|
};
|
|
38
|
-
const computeGiFingerprint = (
|
|
39
|
-
value: hashGi(
|
|
40
|
-
girFiles,
|
|
41
|
-
libraries,
|
|
42
|
-
girPath,
|
|
40
|
+
const computeGiFingerprint = (inputs) => ({
|
|
41
|
+
value: hashGi(inputs),
|
|
42
|
+
girFiles: inputs.girFiles,
|
|
43
|
+
libraries: inputs.libraries,
|
|
44
|
+
girPath: inputs.girPath,
|
|
43
45
|
});
|
|
44
46
|
const readSentinel = (storeDir) => readJsonFile(join(storeDir, FINGERPRINT_FILENAME));
|
|
45
47
|
const isGiFingerprint = (value) => hasFields(value, {
|
|
@@ -50,22 +52,23 @@ const isGiFingerprint = (value) => hasFields(value, {
|
|
|
50
52
|
});
|
|
51
53
|
const isDocsFingerprint = (value) => hasFields(value, { value: isString, gi: isGiFingerprint });
|
|
52
54
|
const isJsxFingerprint = (value) => hasFields(value, { value: isString, intrinsicElementCount: isNumber });
|
|
53
|
-
const recordedGiValue = (sentinel,
|
|
54
|
-
if (!hasMatchingRecordedInputs(sentinel,
|
|
55
|
+
const recordedGiValue = (sentinel, inputs) => {
|
|
56
|
+
if (!hasMatchingRecordedInputs(sentinel, inputs)) {
|
|
55
57
|
return undefined;
|
|
56
58
|
}
|
|
57
59
|
try {
|
|
58
|
-
return hashGi(sentinel.girFiles, sentinel.libraries
|
|
60
|
+
return hashGi({ ...inputs, girFiles: sentinel.girFiles, libraries: sentinel.libraries });
|
|
59
61
|
}
|
|
60
62
|
catch {
|
|
61
63
|
return undefined;
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
|
-
const isGiStoreFresh = (giStoreDir,
|
|
66
|
+
const isGiStoreFresh = (giStoreDir, inputs) => {
|
|
65
67
|
const sentinel = readSentinel(giStoreDir);
|
|
66
|
-
return isGiFingerprint(sentinel) && recordedGiValue(sentinel,
|
|
68
|
+
return isGiFingerprint(sentinel) && recordedGiValue(sentinel, inputs) === sentinel.value;
|
|
67
69
|
};
|
|
68
|
-
const hasMatchingRecordedInputs = (sentinel,
|
|
70
|
+
const hasMatchingRecordedInputs = (sentinel, inputs) => sortAlpha(sentinel.libraries) === sortAlpha(inputs.libraries) &&
|
|
71
|
+
sortAlpha(sentinel.girPath ?? []) === sortAlpha(inputs.girPath);
|
|
69
72
|
const hashDocs = (giValue, input) => createHash("sha256")
|
|
70
73
|
.update(JSON.stringify([
|
|
71
74
|
giValue,
|
|
@@ -74,16 +77,16 @@ const hashDocs = (giValue, input) => createHash("sha256")
|
|
|
74
77
|
serializeOmittedProps(input.omittedProps),
|
|
75
78
|
]))
|
|
76
79
|
.digest("hex");
|
|
77
|
-
const computeDocsFingerprint = (
|
|
78
|
-
const gi = computeGiFingerprint(
|
|
80
|
+
const computeDocsFingerprint = (inputs, input) => {
|
|
81
|
+
const gi = computeGiFingerprint(inputs);
|
|
79
82
|
return { value: hashDocs(gi.value, input), gi };
|
|
80
83
|
};
|
|
81
|
-
const isDocsOutputFresh = (outDir,
|
|
84
|
+
const isDocsOutputFresh = (outDir, inputs, input) => {
|
|
82
85
|
const sentinel = readSentinel(outDir);
|
|
83
86
|
if (!isDocsFingerprint(sentinel)) {
|
|
84
87
|
return false;
|
|
85
88
|
}
|
|
86
|
-
const giValue = recordedGiValue(sentinel.gi,
|
|
89
|
+
const giValue = recordedGiValue(sentinel.gi, inputs);
|
|
87
90
|
return giValue !== undefined && hashDocs(giValue, input) === sentinel.value;
|
|
88
91
|
};
|
|
89
92
|
const serializeModuleExports = (map) => sortStrings(Object.keys(map)).map((type) => [type, map[type]?.module ?? "", map[type]?.export ?? ""]);
|
package/dist/fingerprint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint.js","sourceRoot":"","sources":["../src/fingerprint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,YA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,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,EAAE,CAAC;IACxD,CAAC;IAED,OAAO,QAAQ,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC;QACpC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,QAAQ,CAAC,qBAAqB,EAAE;QAC1E,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,EAAE,CAAC;AACvD,CAAC,CAAC;AAEF,OAAO,EACH,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAIpB,CAAC","sourcesContent":["import { sortStrings } from \"@gtkx/utils\";\nimport { createHash } from \"node:crypto\";\nimport { type Dirent, existsSync, readdirSync, readFileSync } from \"node:fs\";\nimport { dirname, join, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport packageManifest from \"../package.json\" with { type: \"json\" };\nimport { arrayGuard, hasFields, isNumber, isString, optionalGuard } from \"./guards.js\";\nimport { readJsonFile } from \"./json.js\";\n\ntype GiFingerprint = {\n value: string;\n girFiles: string[];\n libraries: string[];\n girPath?: string[];\n};\n\ntype ModuleExport = { module: string; export: string };\n\ntype DocsFingerprintInput = {\n basePath: string;\n props: Record<string, ModuleExport>;\n omittedProps: Record<string, string[]>;\n};\n\ntype DocsFingerprint = {\n value: string;\n gi: GiFingerprint;\n};\n\ntype JsxFingerprintInput = {\n reactVersion: string;\n components: Record<string, ModuleExport>;\n lazyElements: string[];\n props: Record<string, ModuleExport>;\n omittedProps: Record<string, string[]>;\n};\n\ntype JsxFingerprint = {\n value: string;\n intrinsicElementCount: number;\n};\n\nconst FINGERPRINT_FILENAME = \".codegen-fingerprint.json\";\nconst CODEGEN_VERSION: string = packageManifest.version;\nconst OVERRIDES_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), \"..\", \"overrides\");\n\nconst sortAlpha = (values: string[]): string => sortStrings(values).join(\",\");\n\nconst overrideFiles = (): string[] => {\n if (!existsSync(OVERRIDES_ROOT)) {\n return [];\n }\n\n return readdirSync(OVERRIDES_ROOT, { recursive: true, withFileTypes: true })\n .filter((entry: Dirent) => entry.isFile())\n .map((entry: Dirent) => join(entry.parentPath, entry.name));\n};\n\nconst hashGi = (girFiles: string[], libraries: string[], girPath: string[]): string => {\n const hash = createHash(\"sha256\");\n hash.update(CODEGEN_VERSION);\n hash.update(\"\\n\");\n hash.update(sortAlpha(libraries));\n hash.update(\"\\n\");\n hash.update(sortAlpha(girPath));\n hash.update(\"\\n\");\n const hashedFiles = sortStrings([...girFiles, ...overrideFiles()]);\n\n for (const file of hashedFiles) {\n hash.update(\"\\n\");\n hash.update(file);\n hash.update(\"\\0\");\n hash.update(readFileSync(file));\n }\n\n return hash.digest(\"hex\");\n};\n\nconst computeGiFingerprint = (\n girFiles: string[],\n libraries: string[],\n girPath: string[],\n): GiFingerprint => ({\n value: hashGi(girFiles, libraries, girPath),\n girFiles,\n libraries,\n girPath,\n});\n\nconst readSentinel = (storeDir: string): unknown => readJsonFile(join(storeDir, FINGERPRINT_FILENAME));\n\nconst isGiFingerprint = (value: unknown): value is GiFingerprint =>\n hasFields<GiFingerprint>(value, {\n value: isString,\n girFiles: arrayGuard(isString),\n libraries: arrayGuard(isString),\n girPath: optionalGuard(arrayGuard(isString)),\n });\n\nconst isDocsFingerprint = (value: unknown): value is DocsFingerprint =>\n hasFields<DocsFingerprint>(value, { value: isString, gi: isGiFingerprint });\n\nconst isJsxFingerprint = (value: unknown): value is JsxFingerprint =>\n hasFields<JsxFingerprint>(value, { value: isString, intrinsicElementCount: isNumber });\n\nconst recordedGiValue = (sentinel: GiFingerprint, libraries: string[], girPath: string[]): string | undefined => {\n if (!hasMatchingRecordedInputs(sentinel, libraries, girPath)) {\n return undefined;\n }\n\n try {\n return hashGi(sentinel.girFiles, sentinel.libraries, girPath);\n } catch {\n return undefined;\n }\n};\n\nconst isGiStoreFresh = (\n giStoreDir: string,\n libraries: string[],\n girPath: string[],\n): boolean => {\n const sentinel = readSentinel(giStoreDir);\n\n return isGiFingerprint(sentinel) && recordedGiValue(sentinel, libraries, girPath) === sentinel.value;\n};\n\nconst hasMatchingRecordedInputs = (sentinel: GiFingerprint, libraries: string[], girPath: string[]): boolean =>\n sortAlpha(sentinel.libraries) === sortAlpha(libraries) && sortAlpha(sentinel.girPath ?? []) === sortAlpha(girPath);\n\nconst hashDocs = (giValue: string, input: DocsFingerprintInput): string =>\n createHash(\"sha256\")\n .update(\n JSON.stringify([\n giValue,\n input.basePath,\n serializeModuleExports(input.props),\n serializeOmittedProps(input.omittedProps),\n ]),\n )\n .digest(\"hex\");\n\nconst computeDocsFingerprint = (\n girFiles: string[],\n libraries: string[],\n girPath: string[],\n input: DocsFingerprintInput,\n): DocsFingerprint => {\n const gi = computeGiFingerprint(girFiles, libraries, girPath);\n\n return { value: hashDocs(gi.value, input), gi };\n};\n\nconst isDocsOutputFresh = (\n outDir: string,\n libraries: string[],\n girPath: string[],\n input: DocsFingerprintInput,\n): boolean => {\n const sentinel = readSentinel(outDir);\n\n if (!isDocsFingerprint(sentinel)) {\n return false;\n }\n\n const giValue = recordedGiValue(sentinel.gi, libraries, girPath);\n\n return giValue !== undefined && hashDocs(giValue, input) === sentinel.value;\n};\n\nconst serializeModuleExports = (map: Record<string, ModuleExport>): [string, string, string][] =>\n sortStrings(Object.keys(map)).map((type) => [type, map[type]?.module ?? \"\", map[type]?.export ?? \"\"]);\n\nconst serializeOmittedProps = (map: Record<string, string[]>): [string, string][] =>\n sortStrings(Object.keys(map)).map((type) => [type, sortAlpha(map[type] ?? [])]);\n\nconst hashJsx = (input: JsxFingerprintInput): string =>\n createHash(\"sha256\")\n .update(\n JSON.stringify([\n CODEGEN_VERSION,\n input.reactVersion,\n serializeModuleExports(input.components),\n sortStrings(input.lazyElements),\n serializeModuleExports(input.props),\n serializeOmittedProps(input.omittedProps),\n ]),\n )\n .digest(\"hex\");\n\nconst computeJsxFingerprint = (input: JsxFingerprintInput, intrinsicElementCount: number): JsxFingerprint => ({\n value: hashJsx(input),\n intrinsicElementCount,\n});\n\nconst jsxStoreFreshness = (\n jsxStoreDir: string,\n input: JsxFingerprintInput,\n): { isFresh: boolean; intrinsicElementCount: number } => {\n const sentinel = readSentinel(jsxStoreDir);\n\n if (!isJsxFingerprint(sentinel)) {\n return { isFresh: false, intrinsicElementCount: 0 };\n }\n\n return sentinel.value === hashJsx(input)\n ? { isFresh: true, intrinsicElementCount: sentinel.intrinsicElementCount }\n : { isFresh: false, intrinsicElementCount: 0 };\n};\n\nexport {\n FINGERPRINT_FILENAME,\n computeGiFingerprint,\n computeDocsFingerprint,\n isGiStoreFresh,\n isDocsOutputFresh,\n computeJsxFingerprint,\n jsxStoreFreshness,\n type DocsFingerprintInput,\n type GiFingerprint,\n type JsxFingerprintInput,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"fingerprint.js","sourceRoot":"","sources":["../src/fingerprint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,eAAe,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AA0Cz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qBAAqB,EAAE;QAC1E,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,EAAE,CAAC;AACvD,CAAC,CAAC;AAEF,OAAO,EACH,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAKpB,CAAC","sourcesContent":["import { sortStrings } from \"@gtkx/utils\";\nimport { createHash } from \"node:crypto\";\nimport { type Dirent, existsSync, readdirSync, readFileSync } from \"node:fs\";\nimport { dirname, join, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport packageManifest from \"../package.json\" with { type: \"json\" };\nimport { arrayGuard, hasFields, isNumber, isString, optionalGuard } from \"./guards.js\";\nimport { readJsonFile } from \"./json.js\";\n\ntype GiInputs = {\n girFiles: string[];\n libraries: string[];\n girPath: string[];\n isByteArrayTyped: boolean;\n};\n\ntype GiFingerprint = {\n value: string;\n girFiles: string[];\n libraries: string[];\n girPath?: string[];\n};\n\ntype ModuleExport = { module: string; export: string };\n\ntype DocsFingerprintInput = {\n basePath: string;\n props: Record<string, ModuleExport>;\n omittedProps: Record<string, string[]>;\n};\n\ntype DocsFingerprint = {\n value: string;\n gi: GiFingerprint;\n};\n\ntype JsxFingerprintInput = {\n reactVersion: string;\n components: Record<string, ModuleExport>;\n lazyElements: string[];\n props: Record<string, ModuleExport>;\n omittedProps: Record<string, string[]>;\n};\n\ntype JsxFingerprint = {\n value: string;\n intrinsicElementCount: number;\n};\n\nconst FINGERPRINT_FILENAME = \".codegen-fingerprint.json\";\nconst CODEGEN_VERSION: string = packageManifest.version;\nconst OVERRIDES_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), \"..\", \"overrides\");\n\nconst sortAlpha = (values: string[]): string => sortStrings(values).join(\",\");\n\nconst overrideFiles = (): string[] => {\n if (!existsSync(OVERRIDES_ROOT)) {\n return [];\n }\n\n return readdirSync(OVERRIDES_ROOT, { recursive: true, withFileTypes: true })\n .filter((entry: Dirent) => entry.isFile())\n .map((entry: Dirent) => join(entry.parentPath, entry.name));\n};\n\nconst hashGi = (inputs: GiInputs): string => {\n const hash = createHash(\"sha256\");\n hash.update(CODEGEN_VERSION);\n hash.update(\"\\n\");\n hash.update(sortAlpha(inputs.libraries));\n hash.update(\"\\n\");\n hash.update(sortAlpha(inputs.girPath));\n hash.update(\"\\n\");\n hash.update(String(inputs.isByteArrayTyped));\n hash.update(\"\\n\");\n const hashedFiles = sortStrings([...inputs.girFiles, ...overrideFiles()]);\n\n for (const file of hashedFiles) {\n hash.update(\"\\n\");\n hash.update(file);\n hash.update(\"\\0\");\n hash.update(readFileSync(file));\n }\n\n return hash.digest(\"hex\");\n};\n\nconst computeGiFingerprint = (inputs: GiInputs): GiFingerprint => ({\n value: hashGi(inputs),\n girFiles: inputs.girFiles,\n libraries: inputs.libraries,\n girPath: inputs.girPath,\n});\n\nconst readSentinel = (storeDir: string): unknown => readJsonFile(join(storeDir, FINGERPRINT_FILENAME));\n\nconst isGiFingerprint = (value: unknown): value is GiFingerprint =>\n hasFields<GiFingerprint>(value, {\n value: isString,\n girFiles: arrayGuard(isString),\n libraries: arrayGuard(isString),\n girPath: optionalGuard(arrayGuard(isString)),\n });\n\nconst isDocsFingerprint = (value: unknown): value is DocsFingerprint =>\n hasFields<DocsFingerprint>(value, { value: isString, gi: isGiFingerprint });\n\nconst isJsxFingerprint = (value: unknown): value is JsxFingerprint =>\n hasFields<JsxFingerprint>(value, { value: isString, intrinsicElementCount: isNumber });\n\nconst recordedGiValue = (sentinel: GiFingerprint, inputs: GiInputs): string | undefined => {\n if (!hasMatchingRecordedInputs(sentinel, inputs)) {\n return undefined;\n }\n\n try {\n return hashGi({ ...inputs, girFiles: sentinel.girFiles, libraries: sentinel.libraries });\n } catch {\n return undefined;\n }\n};\n\nconst isGiStoreFresh = (giStoreDir: string, inputs: GiInputs): boolean => {\n const sentinel = readSentinel(giStoreDir);\n\n return isGiFingerprint(sentinel) && recordedGiValue(sentinel, inputs) === sentinel.value;\n};\n\nconst hasMatchingRecordedInputs = (sentinel: GiFingerprint, inputs: GiInputs): boolean =>\n sortAlpha(sentinel.libraries) === sortAlpha(inputs.libraries) &&\n sortAlpha(sentinel.girPath ?? []) === sortAlpha(inputs.girPath);\n\nconst hashDocs = (giValue: string, input: DocsFingerprintInput): string =>\n createHash(\"sha256\")\n .update(\n JSON.stringify([\n giValue,\n input.basePath,\n serializeModuleExports(input.props),\n serializeOmittedProps(input.omittedProps),\n ]),\n )\n .digest(\"hex\");\n\nconst computeDocsFingerprint = (inputs: GiInputs, input: DocsFingerprintInput): DocsFingerprint => {\n const gi = computeGiFingerprint(inputs);\n\n return { value: hashDocs(gi.value, input), gi };\n};\n\nconst isDocsOutputFresh = (outDir: string, inputs: GiInputs, input: DocsFingerprintInput): boolean => {\n const sentinel = readSentinel(outDir);\n\n if (!isDocsFingerprint(sentinel)) {\n return false;\n }\n\n const giValue = recordedGiValue(sentinel.gi, inputs);\n\n return giValue !== undefined && hashDocs(giValue, input) === sentinel.value;\n};\n\nconst serializeModuleExports = (map: Record<string, ModuleExport>): [string, string, string][] =>\n sortStrings(Object.keys(map)).map((type) => [type, map[type]?.module ?? \"\", map[type]?.export ?? \"\"]);\n\nconst serializeOmittedProps = (map: Record<string, string[]>): [string, string][] =>\n sortStrings(Object.keys(map)).map((type) => [type, sortAlpha(map[type] ?? [])]);\n\nconst hashJsx = (input: JsxFingerprintInput): string =>\n createHash(\"sha256\")\n .update(\n JSON.stringify([\n CODEGEN_VERSION,\n input.reactVersion,\n serializeModuleExports(input.components),\n sortStrings(input.lazyElements),\n serializeModuleExports(input.props),\n serializeOmittedProps(input.omittedProps),\n ]),\n )\n .digest(\"hex\");\n\nconst computeJsxFingerprint = (input: JsxFingerprintInput, intrinsicElementCount: number): JsxFingerprint => ({\n value: hashJsx(input),\n intrinsicElementCount,\n});\n\nconst jsxStoreFreshness = (\n jsxStoreDir: string,\n input: JsxFingerprintInput,\n): { isFresh: boolean; intrinsicElementCount: number } => {\n const sentinel = readSentinel(jsxStoreDir);\n\n if (!isJsxFingerprint(sentinel)) {\n return { isFresh: false, intrinsicElementCount: 0 };\n }\n\n return sentinel.value === hashJsx(input)\n ? { isFresh: true, intrinsicElementCount: sentinel.intrinsicElementCount }\n : { isFresh: false, intrinsicElementCount: 0 };\n};\n\nexport {\n FINGERPRINT_FILENAME,\n computeGiFingerprint,\n computeDocsFingerprint,\n isGiStoreFresh,\n isDocsOutputFresh,\n computeJsxFingerprint,\n jsxStoreFreshness,\n type DocsFingerprintInput,\n type GiInputs,\n type GiFingerprint,\n type JsxFingerprintInput,\n};\n"]}
|
package/dist/gi.d.ts
CHANGED
package/dist/gi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gi.d.ts","sourceRoot":"","sources":["../src/gi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAMxD,KAAK,gBAAgB,GAAG;IACpB,EAAE,EAAE,YAAY,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"gi.d.ts","sourceRoot":"","sources":["../src/gi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAMxD,KAAK,gBAAgB,GAAG;IACpB,EAAE,EAAE,YAAY,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,YAAY,GAAI,SAAS,OAAO,EAAE,SAAS,gBAAgB,KAAG,MAmBnE,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/gi.js
CHANGED
|
@@ -3,13 +3,18 @@ import { namespaceDirectory } from "./gir/namespace.js";
|
|
|
3
3
|
import { writeGiStore } from "./store/gi-store.js";
|
|
4
4
|
import { generateNamespaceModule } from "./store/gi/pipeline.js";
|
|
5
5
|
const runGiCodegen = (library, options) => {
|
|
6
|
-
const { gi, libraries, girPath } = options;
|
|
6
|
+
const { gi, libraries, girPath, isByteArrayTyped } = options;
|
|
7
7
|
const namespaces = Array.from(library.namespaces.values(), (namespace) => ({
|
|
8
8
|
directory: namespaceDirectory(namespace),
|
|
9
9
|
rawSource: generateNamespaceModule(namespace, library),
|
|
10
10
|
girFile: namespace.girFile,
|
|
11
11
|
}));
|
|
12
|
-
const fingerprint = computeGiFingerprint(
|
|
12
|
+
const fingerprint = computeGiFingerprint({
|
|
13
|
+
girFiles: library.girFiles,
|
|
14
|
+
libraries: [...libraries],
|
|
15
|
+
girPath: [...girPath],
|
|
16
|
+
isByteArrayTyped,
|
|
17
|
+
});
|
|
13
18
|
writeGiStore(gi, namespaces, fingerprint);
|
|
14
19
|
return library.namespaces.size;
|
|
15
20
|
};
|
package/dist/gi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gi.js","sourceRoot":"","sources":["../src/gi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAyB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"gi.js","sourceRoot":"","sources":["../src/gi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAyB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AASjE,MAAM,YAAY,GAAG,CAAC,OAAgB,EAAE,OAAyB,EAAU,EAAE;IACzE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;IAE7D,MAAM,UAAU,GAAuB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC3F,SAAS,EAAE,kBAAkB,CAAC,SAAS,CAAC;QACxC,SAAS,EAAE,uBAAuB,CAAC,SAAS,EAAE,OAAO,CAAC;QACtD,OAAO,EAAE,SAAS,CAAC,OAAO;KAC7B,CAAC,CAAC,CAAC;IAEJ,MAAM,WAAW,GAAG,oBAAoB,CAAC;QACrC,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,SAAS,EAAE,CAAC,GAAG,SAAS,CAAC;QACzB,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;QACrB,gBAAgB;KACnB,CAAC,CAAC;IAEH,YAAY,CAAC,EAAE,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IAE1C,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;AACnC,CAAC,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import type { Library } from \"./gir/library.js\";\nimport type { StoreOptions } from \"./store/store-fs.js\";\nimport { computeGiFingerprint } from \"./fingerprint.js\";\nimport { namespaceDirectory } from \"./gir/namespace.js\";\nimport { type GiNamespaceInput, writeGiStore } from \"./store/gi-store.js\";\nimport { generateNamespaceModule } from \"./store/gi/pipeline.js\";\n\ntype GiCodegenOptions = {\n gi: StoreOptions;\n libraries: string[];\n girPath: string[];\n isByteArrayTyped: boolean;\n};\n\nconst runGiCodegen = (library: Library, options: GiCodegenOptions): number => {\n const { gi, libraries, girPath, isByteArrayTyped } = options;\n\n const namespaces: GiNamespaceInput[] = Array.from(library.namespaces.values(), (namespace) => ({\n directory: namespaceDirectory(namespace),\n rawSource: generateNamespaceModule(namespace, library),\n girFile: namespace.girFile,\n }));\n\n const fingerprint = computeGiFingerprint({\n girFiles: library.girFiles,\n libraries: [...libraries],\n girPath: [...girPath],\n isByteArrayTyped,\n });\n\n writeGiStore(gi, namespaces, fingerprint);\n\n return library.namespaces.size;\n};\n\nexport { runGiCodegen };\n"]}
|
package/dist/gir/class.d.ts
CHANGED
|
@@ -9,6 +9,11 @@ type GirVirtualMethod = GirCallable & {
|
|
|
9
9
|
/** Method GIR names as invoking this slot, absent when the slot has no invoker. */
|
|
10
10
|
invoker: string | undefined;
|
|
11
11
|
};
|
|
12
|
+
/** A `<glib:signal>` on a class or interface. */
|
|
13
|
+
type GirSignal = GirCallable & {
|
|
14
|
+
/** Whether the signal takes a `::detail` suffix, so `changed::key` reaches only that detail. */
|
|
15
|
+
isDetailed: boolean;
|
|
16
|
+
};
|
|
12
17
|
/** A `<class>` or `<interface>` declared by a GIR namespace. */
|
|
13
18
|
type GirClass = {
|
|
14
19
|
/** Name GIR gives the type, without its namespace prefix. */
|
|
@@ -52,10 +57,10 @@ type GirClass = {
|
|
|
52
57
|
/** GObject properties the type declares. */
|
|
53
58
|
properties: GirProperty[];
|
|
54
59
|
/** GObject signals the type declares. */
|
|
55
|
-
signals:
|
|
60
|
+
signals: GirSignal[];
|
|
56
61
|
/** Virtual methods the type declares, carrying the documentation their vtable slots are generated from. */
|
|
57
62
|
vfuncs: GirVirtualMethod[];
|
|
58
63
|
};
|
|
59
64
|
declare const classFromNode: (node: RawNode, isInterface: boolean, context: ParseContext) => GirClass;
|
|
60
|
-
export { classFromNode, type GirClass, type GirVirtualMethod };
|
|
65
|
+
export { classFromNode, type GirClass, type GirSignal, type GirVirtualMethod };
|
|
61
66
|
//# sourceMappingURL=class.d.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AK,SAAS,EAAE,KAAK,gBAAgB,EAAE,CAAC"}
|
package/dist/gir/class.js
CHANGED
|
@@ -30,7 +30,10 @@ const classFromNode = (node, isInterface, context) => ({
|
|
|
30
30
|
constructors: getChildren(node, GIR_CONSTRUCTOR_TAG).map((ctor) => functionFromNode(ctor, context)),
|
|
31
31
|
functions: getChildren(node, "function").map((fn) => functionFromNode(fn, context)),
|
|
32
32
|
properties: getChildren(node, "property").map((property) => propertyFromNode(property, context)),
|
|
33
|
-
signals: getChildren(node, "glib:signal").map((signal) =>
|
|
33
|
+
signals: getChildren(node, "glib:signal").map((signal) => ({
|
|
34
|
+
...parseCallable(signal, context),
|
|
35
|
+
isDetailed: isAttrTrue(signal, "detailed"),
|
|
36
|
+
})),
|
|
34
37
|
vfuncs: virtualMethodsFromNode(node, context),
|
|
35
38
|
});
|
|
36
39
|
export { classFromNode };
|
package/dist/gir/class.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../src/gir/class.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAuB,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAoB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAoB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,mBAAmB,EAAE,UAAU,EAAgB,MAAM,YAAY,CAAC;AAC9F,OAAO,EAAoB,gBAAgB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../src/gir/class.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAuB,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAoB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAoB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE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AwD,CAAC","sourcesContent":["import type { ParseContext } from \"./type-id.js\";\nimport { documentedFromNode, type GirAnnotations } from \"./annotations.js\";\nimport { functionFromNode, type GirFunction } from \"./function.js\";\nimport { type GirCallable, parseCallable } from \"./parameter.js\";\nimport { attr, getChildren, GIR_CONSTRUCTOR_TAG, isAttrTrue, type RawNode } from \"./parse.js\";\nimport { type GirProperty, propertyFromNode } from \"./property.js\";\n\n/** A `<virtual-method>` on a class or interface: the vtable slot's own documentation and signature. */\ntype GirVirtualMethod = GirCallable & {\n /** Method GIR names as invoking this slot, absent when the slot has no invoker. */\n invoker: string | undefined;\n};\n\n/** A `<glib:signal>` on a class or interface. */\ntype GirSignal = GirCallable & {\n /** Whether the signal takes a `::detail` suffix, so `changed::key` reaches only that detail. */\n isDetailed: boolean;\n};\n\n/** A `<class>` or `<interface>` declared by a GIR namespace. */\ntype GirClass = {\n /** Name GIR gives the type, without its namespace prefix. */\n name: string;\n /** Documentation GIR carries for the type. */\n doc: string | undefined;\n /** Release and deprecation annotations GIR carries on the type. */\n annotations: GirAnnotations;\n /** C type of an instance, such as `GtkWidget`. */\n cType: string | undefined;\n /** The class it derives from, qualified when it lives in another namespace. */\n parent: string | undefined;\n /** GType name the type registers under, such as `GtkWidget`. */\n glibTypeName: string | undefined;\n /** C function returning the GType, such as `gtk_widget_get_type`. */\n glibGetType: string | undefined;\n /** Record holding the class or interface vtable, which virtual method bindings are laid out against. */\n glibTypeStruct: string | undefined;\n /** C function that takes a reference, on a type that manages its own refcount. */\n glibRefFunc: string | undefined;\n /** C function that drops a reference, on a type that manages its own refcount. */\n glibUnrefFunc: string | undefined;\n /** Whether the type is its own GType fundamental rather than a GObject descendant. */\n fundamental: boolean;\n /** Whether the class cannot be instantiated on its own. */\n isAbstract: boolean;\n /** Whether the type came from an `<interface>` rather than a `<class>`. */\n isInterface: boolean;\n /** Whether GIR exposes the type to bindings; codegen skips it when false. */\n introspectable: boolean;\n /** Interfaces the class implements. */\n implements: string[];\n /** Types an implementer of this interface must also provide. */\n prerequisites: string[];\n /** Methods taking an instance. */\n methods: GirFunction[];\n /** Functions returning a new instance. */\n constructors: GirFunction[];\n /** Functions namespaced under the type that take no instance. */\n functions: GirFunction[];\n /** GObject properties the type declares. */\n properties: GirProperty[];\n /** GObject signals the type declares. */\n signals: GirSignal[];\n /** Virtual methods the type declares, carrying the documentation their vtable slots are generated from. */\n vfuncs: GirVirtualMethod[];\n};\n\nconst virtualMethodsFromNode = (node: RawNode, context: ParseContext): GirVirtualMethod[] =>\n getChildren(node, \"virtual-method\").map((vfunc) => ({\n ...parseCallable(vfunc, context),\n invoker: attr(vfunc, \"invoker\"),\n }));\n\nconst classFromNode = (node: RawNode, isInterface: boolean, context: ParseContext): GirClass => ({\n ...documentedFromNode(node),\n cType: attr(node, \"c:type\"),\n parent: attr(node, \"parent\"),\n glibTypeName: attr(node, \"glib:type-name\"),\n glibGetType: attr(node, \"glib:get-type\"),\n glibTypeStruct: attr(node, \"glib:type-struct\"),\n glibRefFunc: attr(node, \"glib:ref-func\"),\n glibUnrefFunc: attr(node, \"glib:unref-func\"),\n fundamental: isAttrTrue(node, \"glib:fundamental\"),\n isAbstract: isAttrTrue(node, \"abstract\"),\n isInterface,\n introspectable: isAttrTrue(node, \"introspectable\", true),\n implements: getChildren(node, \"implements\")\n .map((implement) => attr(implement, \"name\"))\n .filter((name): name is string => name !== undefined),\n prerequisites: getChildren(node, \"prerequisite\")\n .map((prerequisite) => attr(prerequisite, \"name\"))\n .filter((name): name is string => name !== undefined),\n methods: getChildren(node, \"method\").map((method) => functionFromNode(method, context)),\n constructors: getChildren(node, GIR_CONSTRUCTOR_TAG).map((ctor) => functionFromNode(ctor, context)),\n functions: getChildren(node, \"function\").map((fn) => functionFromNode(fn, context)),\n properties: getChildren(node, \"property\").map((property) => propertyFromNode(property, context)),\n signals: getChildren(node, \"glib:signal\").map((signal) => ({\n ...parseCallable(signal, context),\n isDetailed: isAttrTrue(signal, \"detailed\"),\n })),\n vfuncs: virtualMethodsFromNode(node, context),\n});\n\nexport { classFromNode, type GirClass, type GirSignal, type GirVirtualMethod };\n"]}
|
package/dist/gir/gir-path.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The directories to search for `.gir` files, in precedence order: the config's own `girPath`, then
|
|
3
3
|
* `GTKX_GIR_PATH`, then `/usr/share/gir-1.0`, then the girdir pkg-config reports for
|
|
4
|
-
* gobject-introspection-1.0. Duplicates are dropped, and the
|
|
4
|
+
* gobject-introspection-1.0. Duplicates are dropped, and the system directories are included only when they exist.
|
|
5
5
|
*
|
|
6
6
|
* @throws If pkg-config is installed but fails while being queried.
|
|
7
7
|
*/
|
package/dist/gir/gir-path.js
CHANGED
|
@@ -5,7 +5,7 @@ const SYSTEM_GIR_PATH = "/usr/share/gir-1.0";
|
|
|
5
5
|
/**
|
|
6
6
|
* The directories to search for `.gir` files, in precedence order: the config's own `girPath`, then
|
|
7
7
|
* `GTKX_GIR_PATH`, then `/usr/share/gir-1.0`, then the girdir pkg-config reports for
|
|
8
|
-
* gobject-introspection-1.0. Duplicates are dropped, and the
|
|
8
|
+
* gobject-introspection-1.0. Duplicates are dropped, and the system directories are included only when they exist.
|
|
9
9
|
*
|
|
10
10
|
* @throws If pkg-config is installed but fails while being queried.
|
|
11
11
|
*/
|