@hanzo/docs-content-collections 1.2.4
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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/configuration.d.ts +92 -0
- package/dist/configuration.js +12797 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +26 -0
- package/package.json +55 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PageData, MetaData, Source } from '@hanzo/docs-core/source';
|
|
2
|
+
import { Meta } from '@content-collections/core';
|
|
3
|
+
|
|
4
|
+
interface BaseMetaData extends MetaData {
|
|
5
|
+
_meta: Meta;
|
|
6
|
+
}
|
|
7
|
+
interface BaseDocsData extends PageData {
|
|
8
|
+
_meta: Meta;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare function createMDXSource<Docs extends BaseDocsData, Meta extends BaseMetaData>(allDocs: Docs[], allMetas: Meta[]): Source<{
|
|
12
|
+
metaData: Meta;
|
|
13
|
+
pageData: Docs;
|
|
14
|
+
}>;
|
|
15
|
+
|
|
16
|
+
export { createMDXSource };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "./chunk-MLKGABMK.js";
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
function createMDXSource(allDocs, allMetas) {
|
|
5
|
+
return {
|
|
6
|
+
files: [
|
|
7
|
+
...allDocs.map(
|
|
8
|
+
(v) => ({
|
|
9
|
+
type: "page",
|
|
10
|
+
data: v,
|
|
11
|
+
path: v._meta.filePath
|
|
12
|
+
})
|
|
13
|
+
),
|
|
14
|
+
...allMetas.map(
|
|
15
|
+
(v) => ({
|
|
16
|
+
type: "meta",
|
|
17
|
+
data: v,
|
|
18
|
+
path: v._meta.filePath
|
|
19
|
+
})
|
|
20
|
+
)
|
|
21
|
+
]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
createMDXSource
|
|
26
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hanzo/docs-content-collections",
|
|
3
|
+
"version": "1.2.4",
|
|
4
|
+
"description": "The Content Collections adapter for Hanzo Docs",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Hanzo",
|
|
7
|
+
"Docs",
|
|
8
|
+
"Content Collections"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://hanzo.ai/docs",
|
|
11
|
+
"repository": "github:hanzoai/docs",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": "Fuma Nama",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
19
|
+
},
|
|
20
|
+
"./configuration": {
|
|
21
|
+
"import": "./dist/configuration.js",
|
|
22
|
+
"types": "./dist/configuration.d.ts"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"main": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist/*"
|
|
29
|
+
],
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@content-collections/core": "^0.12.0",
|
|
32
|
+
"@content-collections/mdx": "^0.2.2",
|
|
33
|
+
"@types/node": "24.10.2",
|
|
34
|
+
"unified": "^11.0.5",
|
|
35
|
+
"zod": "^4.1.13",
|
|
36
|
+
"@hanzo/docs-core": "16.2.6",
|
|
37
|
+
"tsconfig": "0.0.0",
|
|
38
|
+
"eslint-config-custom": "0.0.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@content-collections/core": "0.x.x",
|
|
42
|
+
"@content-collections/mdx": "0.x.x",
|
|
43
|
+
"@hanzo/docs-core": "15.x.x || 16.x.x"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsup",
|
|
50
|
+
"clean": "rimraf dist",
|
|
51
|
+
"dev": "tsup --watch",
|
|
52
|
+
"lint": "eslint .",
|
|
53
|
+
"types:check": "tsc --noEmit"
|
|
54
|
+
}
|
|
55
|
+
}
|