@openpkg-ts/doc-generator 0.3.4 → 0.5.0

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/react.js CHANGED
@@ -123,11 +123,6 @@ function buildSignatureString(exp, sigIndex = 0) {
123
123
  // src/components/headless/CollapsibleMethod.tsx
124
124
  import { jsx, jsxs } from "react/jsx-runtime";
125
125
 
126
- function formatReturnType2(returns) {
127
- if (!returns)
128
- return "void";
129
- return formatSchema(returns.schema);
130
- }
131
126
  function formatParamPreview(params) {
132
127
  if (!params || params.length === 0)
133
128
  return "";
@@ -149,7 +144,7 @@ function CollapsibleMethod({
149
144
  const flags = member.flags;
150
145
  const isStatic = flags?.static;
151
146
  const isAsync = flags?.async;
152
- const returnType = formatReturnType2(sig?.returns);
147
+ const returnType = formatReturnType(sig);
153
148
  const paramPreview = formatParamPreview(sig?.parameters);
154
149
  const toggle = () => setExpanded(!expanded);
155
150
  useEffect(() => {
@@ -147,26 +147,6 @@ function groupByVisibility(members) {
147
147
  function sortByName(items) {
148
148
  return [...items].sort((a, b) => a.name.localeCompare(b.name));
149
149
  }
150
- function sortByKindThenName(exports) {
151
- const kindOrder = {
152
- function: 0,
153
- class: 1,
154
- interface: 2,
155
- type: 3,
156
- enum: 4,
157
- variable: 5,
158
- namespace: 6,
159
- module: 7,
160
- reference: 8,
161
- external: 9
162
- };
163
- return [...exports].sort((a, b) => {
164
- const kindDiff = kindOrder[a.kind] - kindOrder[b.kind];
165
- if (kindDiff !== 0)
166
- return kindDiff;
167
- return a.name.localeCompare(b.name);
168
- });
169
- }
170
150
 
171
151
  // src/render/html.ts
172
152
  var defaultCSS = `
@@ -1317,4 +1297,4 @@ function extractModuleName(exp) {
1317
1297
  return;
1318
1298
  }
1319
1299
 
1320
- export { __toESM, __require, formatSchema, formatTypeParameters, formatParameters, formatReturnType, buildSignatureString, resolveTypeRef, isMethod, isProperty, getMethods, getProperties, groupByVisibility, sortByName, sortByKindThenName, toHTML, toJSON, toJSONString, exportToMarkdown, toMarkdown, toNavigation, toFumadocsMetaJSON, toDocusaurusSidebarJS, toSearchIndex, toPagefindRecords, toAlgoliaRecords, toSearchIndexJSON, loadSpec, createDocs };
1300
+ export { __toESM, __require, formatSchema, formatTypeParameters, formatParameters, formatReturnType, buildSignatureString, resolveTypeRef, isMethod, isProperty, getMethods, getProperties, groupByVisibility, sortByName, toHTML, toJSON, toJSONString, exportToMarkdown, toMarkdown, toNavigation, toFumadocsMetaJSON, toDocusaurusSidebarJS, toSearchIndex, toPagefindRecords, toAlgoliaRecords, toSearchIndexJSON, loadSpec, createDocs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpkg-ts/doc-generator",
3
- "version": "0.3.4",
3
+ "version": "0.5.0",
4
4
  "description": "API doc generator consuming OpenPkg specs. TypeDoc alternative for modern doc frameworks.",
5
5
  "keywords": [
6
6
  "openpkg",
@@ -55,7 +55,7 @@
55
55
  "test:watch": "bun test --watch"
56
56
  },
57
57
  "dependencies": {
58
- "@doccov/ui": "^0.2.3",
58
+ "@doccov/ui": "^0.3.0",
59
59
  "@openpkg-ts/spec": "^0.11.1",
60
60
  "commander": "^14.0.0"
61
61
  },