diff --git a/README.md b/README.md
index f12ce52..1663ae0 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
+
tsky
@@ -82,4 +82,4 @@ If you want to contribute to this project, please read the [CONTRIBUTING.md](CON
## License
-This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
+This project is licensed under the MIT License - see the [LICENSE](https://github.com/tsky-dev/tsky/blob/main/LICENSE) file for details.
diff --git a/biome.json b/biome.json
index 122ed63..49257bb 100644
--- a/biome.json
+++ b/biome.json
@@ -17,7 +17,8 @@
"node_modules",
"package.json",
"tsconfig.json",
- "packages/lexicons/src/lib/lexicons.ts"
+ "packages/lexicons/src/lib/lexicons.ts",
+ "docs/api/"
]
},
"linter": {
diff --git a/docs/.gitignore b/docs/.gitignore
index be703ae..1354dac 100644
--- a/docs/.gitignore
+++ b/docs/.gitignore
@@ -1,2 +1,3 @@
.vitepress/cache/
.vitepress/dist/
+api/
diff --git a/docs/.nvmrc b/docs/.nvmrc
new file mode 100644
index 0000000..2bd5a0a
--- /dev/null
+++ b/docs/.nvmrc
@@ -0,0 +1 @@
+22
diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts
index 6606822..2b757ed 100644
--- a/docs/.vitepress/config.mts
+++ b/docs/.vitepress/config.mts
@@ -1,4 +1,5 @@
import { defineConfig } from 'vitepress';
+import typedocSidebar from '../api/typedoc-sidebar.json';
// https://vitepress.dev/reference/site-config
export default defineConfig({
@@ -12,15 +13,7 @@ export default defineConfig({
sidebar: [
{ text: 'Getting Started', link: '/getting-started' },
- {
- text: 'API Reference',
- link: '/api',
- items: [
- { text: 'new Tsky', link: '/api#tsky' },
- { text: 'tsky.profile', link: '/api#profile' },
- { text: 'tsky.typeahead', link: '/api#typeahead' },
- ],
- },
+ { text: 'API', items: typedocSidebar },
{
text: 'Examples',
link: '/examples',
diff --git a/docs/api.md b/docs/api.md
deleted file mode 100644
index 0262c15..0000000
--- a/docs/api.md
+++ /dev/null
@@ -1,28 +0,0 @@
----
-outline: deep
----
-
-# API Reference
-
-## Tsky
-
-### `new Tsky(app: AppBskyNS): Tsky`
-
-Create a new Tsky instance.
-
-```ts
-import { Tsky } from 'tsky'
-
-const app = new AppBskyNS() // TODO
-const tsky = new Tsky(app)
-```
-
-### `tsky.profile(did: string): Promise`
-
-Get a profile by DID.
-
-```ts
-const profile = await tsky.profile('did:plc:giohuovwawlijq7jkuysq5dd')
-
-console.log(profile.handle)
-```
diff --git a/docs/index.md b/docs/index.md
index 8d11a40..b8e6319 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -4,6 +4,7 @@ layout: home
hero:
name: "tsky"
+ image: https://raw.githubusercontent.com/tsky-dev/tsky/refs/heads/main/.github/assets/tsky-logo.png
text: "A Bluesky API client for nimble apps and tools"
tagline: A Bluesky API client for nimble apps and tools
actions:
diff --git a/docs/package.json b/docs/package.json
index 4f56f44..a23d3bf 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -1,15 +1,20 @@
-{
- "name": "@tsky/docs",
- "version": "1.0.0",
- "private": true,
- "main": "index.js",
- "scripts": {
- "dev": "vitepress dev",
- "build": "vitepress build",
- "preview": "vitepress preview",
- "test": "echo \"Error: no test specified\""
- },
- "devDependencies": {
- "vitepress": "^1.5.0"
- }
-}
+{
+ "name": "@tsky/docs",
+ "version": "1.0.0",
+ "private": true,
+ "main": "index.js",
+ "scripts": {
+ "predev": "typedoc",
+ "dev": "vitepress dev",
+ "prebuild": "typedoc",
+ "build": "vitepress build",
+ "preview": "vitepress preview",
+ "test": "echo \"Error: no test specified\""
+ },
+ "devDependencies": {
+ "typedoc": "^0.27.1",
+ "typedoc-plugin-markdown": "^4.3.0",
+ "typedoc-vitepress-theme": "^1.1.0",
+ "vitepress": "^1.5.0"
+ }
+}
diff --git a/docs/typedoc.json b/docs/typedoc.json
new file mode 100644
index 0000000..47a2a96
--- /dev/null
+++ b/docs/typedoc.json
@@ -0,0 +1,29 @@
+{
+ "$schema": "https://typedoc-plugin-markdown.org/schema.json",
+ "entryPoints": ["../packages/client"],
+ "plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme"],
+ "name": "Packages Example",
+ "entryPointStrategy": "packages",
+ "packageOptions": {
+ "includeVersion": true,
+ "entryPoints": ["src/*.ts"]
+ },
+ "basePath": "../packages/client/src",
+ "readme": "none",
+ "entryFileName": "index.md",
+ "mergeReadme": true,
+ "indexFormat": "table",
+ "useCodeBlocks": true,
+ "textContentMappings": {
+ "title.indexPage": "API Reference",
+ "title.memberPage": "{name}"
+ },
+ "outputs": [
+ {
+ "name": "markdown",
+ "path": "./api"
+ }
+ ],
+ "hidePageHeader": false,
+ "logLevel": "Verbose"
+}
diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json
index 1191e37..a56dec8 100644
--- a/packages/client/tsconfig.json
+++ b/packages/client/tsconfig.json
@@ -37,6 +37,6 @@
"theme": "default",
"exclude": "**/+(__tests__|__mocks__)/*",
"excludePrivate": true,
- "excludeProtected": true
- }
+ "excludeProtected": true,
+ },
}
diff --git a/packages/lex-cli/package.json b/packages/lex-cli/package.json
index bf44557..cba076f 100644
--- a/packages/lex-cli/package.json
+++ b/packages/lex-cli/package.json
@@ -13,7 +13,7 @@
"scripts": {
"build": "tsc",
"clean": "rm -rf dist",
- "prepublish": "pnpm run clean && pnpm run build"
+ "prepare": "pnpm run clean && pnpm run build"
},
"dependencies": {
"clipanion": "4.0.0-rc.4",
diff --git a/packages/lexicons/package.json b/packages/lexicons/package.json
index 877a9bb..fbdb0e1 100644
--- a/packages/lexicons/package.json
+++ b/packages/lexicons/package.json
@@ -20,7 +20,7 @@
"build": "tsx ./scripts/generate-types.ts && tsc",
"check-version-change": "tsx ./scripts/check-version-change.ts && tsc",
"clean": "rm -rf dist && rm -rf lexicons",
- "prepublish": "pnpm run clean && pnpm run build"
+ "prepare": "pnpm run clean && pnpm run build"
},
"devDependencies": {
"@tsky/lex-cli": "workspace:*",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ba63b0e..e50b35a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -17,6 +17,15 @@ importers:
docs:
devDependencies:
+ typedoc:
+ specifier: ^0.27.1
+ version: 0.27.6(typescript@5.7.2)
+ typedoc-plugin-markdown:
+ specifier: ^4.3.0
+ version: 4.4.1(typedoc@0.27.6(typescript@5.7.2))
+ typedoc-vitepress-theme:
+ specifier: ^1.1.0
+ version: 1.1.2(typedoc-plugin-markdown@4.4.1(typedoc@0.27.6(typescript@5.7.2)))
vitepress:
specifier: ^1.5.0
version: 1.5.0(@algolia/client-search@5.15.0)(@types/node@22.10.1)(postcss@8.4.49)(search-insights@2.17.3)(typescript@5.7.2)
@@ -603,6 +612,9 @@ packages:
cpu: [x64]
os: [win32]
+ '@gerrit0/mini-shiki@1.27.2':
+ resolution: {integrity: sha512-GeWyHz8ao2gBiUW4OJnQDxXQnFgZQwwQk05t/CVVgNBN7/rK8XZ7xY6YhLVv9tH3VppWWmr9DCl3MwemB/i+Og==}
+
'@iconify-json/simple-icons@1.2.13':
resolution: {integrity: sha512-rRQjMoIt/kPfaD+fnBC9YZQpso3hkn8xPeadl+YWhscJ5SVUCdB9oTeR9VIpt+/5Yi8vEkh2UOWFPq4lz3ee2A==}
@@ -817,12 +829,21 @@ packages:
'@shikijs/engine-oniguruma@1.24.0':
resolution: {integrity: sha512-Eua0qNOL73Y82lGA4GF5P+G2+VXX9XnuUxkiUuwcxQPH4wom+tE39kZpBFXfUuwNYxHSkrSxpB1p4kyRW0moSg==}
+ '@shikijs/engine-oniguruma@1.29.1':
+ resolution: {integrity: sha512-gSt2WhLNgEeLstcweQOSp+C+MhOpTsgdNXRqr3zP6M+BUBZ8Md9OU2BYwUYsALBxHza7hwaIWtFHjQ/aOOychw==}
+
'@shikijs/transformers@1.24.0':
resolution: {integrity: sha512-Qf/hby+PRPkoHncjYnJf5svK1aCsOUtQhuLzKPnmeXJtuUZCmbH0pTpdNtXe9tgln/RHlyRJnv7q46HHS1sO0Q==}
'@shikijs/types@1.24.0':
resolution: {integrity: sha512-aptbEuq1Pk88DMlCe+FzXNnBZ17LCiLIGWAeCWhoFDzia5Q5Krx3DgnULLiouSdd6+LUM39XwXGppqYE0Ghtug==}
+ '@shikijs/types@1.29.1':
+ resolution: {integrity: sha512-aBqAuhYRp5vSir3Pc9+QPu9WESBOjUo03ao0IHLC4TyTioSsp/SkbAZSrIH4ghYYC1T1KTEpRSBa83bas4RnPA==}
+
+ '@shikijs/vscode-textmate@10.0.1':
+ resolution: {integrity: sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==}
+
'@shikijs/vscode-textmate@9.3.0':
resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==}
@@ -1008,6 +1029,9 @@ packages:
resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}
engines: {node: '>=12'}
+ argparse@2.0.1:
+ resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
+
assertion-error@2.0.1:
resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}
engines: {node: '>=12'}
@@ -1301,6 +1325,9 @@ packages:
engines: {node: '>=6'}
hasBin: true
+ linkify-it@5.0.0:
+ resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
+
loupe@3.1.2:
resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==}
@@ -1310,6 +1337,9 @@ packages:
lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
+ lunr@2.3.9:
+ resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==}
+
magic-string@0.30.14:
resolution: {integrity: sha512-5c99P1WKTed11ZC0HMJOj6CDIue6F8ySu+bJL+85q1zBEIY8IklrJ1eiKC2NDRh3Ct3FcvmJPyQHb9erXMTJNw==}
@@ -1323,9 +1353,16 @@ packages:
mark.js@8.11.1:
resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==}
+ markdown-it@14.1.0:
+ resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
+ hasBin: true
+
mdast-util-to-hast@13.2.0:
resolution: {integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==}
+ mdurl@2.0.0:
+ resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
+
merge2@1.4.1:
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
engines: {node: '>= 8'}
@@ -1451,6 +1488,10 @@ packages:
property-information@6.5.0:
resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==}
+ punycode.js@2.3.1:
+ resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==}
+ engines: {node: '>=6'}
+
queue-microtask@1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
@@ -1611,11 +1652,32 @@ packages:
typanion@3.14.0:
resolution: {integrity: sha512-ZW/lVMRabETuYCd9O9ZvMhAh8GslSqaUjxmK/JLPCh6l73CvLBiuXswj/+7LdnWOgYsQ130FqLzFz5aGT4I3Ug==}
+ typedoc-plugin-markdown@4.4.1:
+ resolution: {integrity: sha512-fx23nSCvewI9IR8lzIYtzDphETcgTDuxKcmHKGD4lo36oexC+B1k4NaCOY58Snqb4OlE8OXDAGVcQXYYuLRCNw==}
+ engines: {node: '>= 18'}
+ peerDependencies:
+ typedoc: 0.27.x
+
+ typedoc-vitepress-theme@1.1.2:
+ resolution: {integrity: sha512-hQvCZRr5uKDqY1bRuY1+eNTNn6d4TE4OP5pnw65Y7WGgajkJW9X1/lVJK2UJpcwCmwkdjw1QIO49H9JQlxWhhw==}
+ peerDependencies:
+ typedoc-plugin-markdown: '>=4.4.0'
+
+ typedoc@0.27.6:
+ resolution: {integrity: sha512-oBFRoh2Px6jFx366db0lLlihcalq/JzyCVp7Vaq1yphL/tbgx2e+bkpkCgJPunaPvPwoTOXSwasfklWHm7GfAw==}
+ engines: {node: '>= 18'}
+ hasBin: true
+ peerDependencies:
+ typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x
+
typescript@5.7.2:
resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==}
engines: {node: '>=14.17'}
hasBin: true
+ uc.micro@2.1.0:
+ resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
+
undici-types@6.20.0:
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
@@ -1763,6 +1825,11 @@ packages:
resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==}
engines: {node: '>=18'}
+ yaml@2.7.0:
+ resolution: {integrity: sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==}
+ engines: {node: '>= 14'}
+ hasBin: true
+
zwitch@2.0.4:
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
@@ -2187,6 +2254,12 @@ snapshots:
'@esbuild/win32-x64@0.23.1':
optional: true
+ '@gerrit0/mini-shiki@1.27.2':
+ dependencies:
+ '@shikijs/engine-oniguruma': 1.29.1
+ '@shikijs/types': 1.29.1
+ '@shikijs/vscode-textmate': 10.0.1
+
'@iconify-json/simple-icons@1.2.13':
dependencies:
'@iconify/types': 2.0.0
@@ -2368,6 +2441,11 @@ snapshots:
'@shikijs/types': 1.24.0
'@shikijs/vscode-textmate': 9.3.0
+ '@shikijs/engine-oniguruma@1.29.1':
+ dependencies:
+ '@shikijs/types': 1.29.1
+ '@shikijs/vscode-textmate': 10.0.1
+
'@shikijs/transformers@1.24.0':
dependencies:
shiki: 1.24.0
@@ -2377,6 +2455,13 @@ snapshots:
'@shikijs/vscode-textmate': 9.3.0
'@types/hast': 3.0.4
+ '@shikijs/types@1.29.1':
+ dependencies:
+ '@shikijs/vscode-textmate': 10.0.1
+ '@types/hast': 3.0.4
+
+ '@shikijs/vscode-textmate@10.0.1': {}
+
'@shikijs/vscode-textmate@9.3.0': {}
'@types/estree@1.0.6': {}
@@ -2599,6 +2684,8 @@ snapshots:
ansi-styles@6.2.1: {}
+ argparse@2.0.1: {}
+
assertion-error@2.0.1: {}
balanced-match@1.0.2: {}
@@ -2911,6 +2998,10 @@ snapshots:
json5@2.2.3: {}
+ linkify-it@5.0.0:
+ dependencies:
+ uc.micro: 2.1.0
+
loupe@3.1.2: {}
lru-cache@10.4.3: {}
@@ -2919,6 +3010,8 @@ snapshots:
dependencies:
yallist: 3.1.1
+ lunr@2.3.9: {}
+
magic-string@0.30.14:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
@@ -2935,6 +3028,15 @@ snapshots:
mark.js@8.11.1: {}
+ markdown-it@14.1.0:
+ dependencies:
+ argparse: 2.0.1
+ entities: 4.5.0
+ linkify-it: 5.0.0
+ mdurl: 2.0.0
+ punycode.js: 2.3.1
+ uc.micro: 2.1.0
+
mdast-util-to-hast@13.2.0:
dependencies:
'@types/hast': 3.0.4
@@ -2947,6 +3049,8 @@ snapshots:
unist-util-visit: 5.0.0
vfile: 6.0.3
+ mdurl@2.0.0: {}
+
merge2@1.4.1: {}
micromark-util-character@2.1.1:
@@ -3054,6 +3158,8 @@ snapshots:
property-information@6.5.0: {}
+ punycode.js@2.3.1: {}
+
queue-microtask@1.2.3: {}
regex-recursion@4.3.0:
@@ -3222,8 +3328,27 @@ snapshots:
typanion@3.14.0: {}
+ typedoc-plugin-markdown@4.4.1(typedoc@0.27.6(typescript@5.7.2)):
+ dependencies:
+ typedoc: 0.27.6(typescript@5.7.2)
+
+ typedoc-vitepress-theme@1.1.2(typedoc-plugin-markdown@4.4.1(typedoc@0.27.6(typescript@5.7.2))):
+ dependencies:
+ typedoc-plugin-markdown: 4.4.1(typedoc@0.27.6(typescript@5.7.2))
+
+ typedoc@0.27.6(typescript@5.7.2):
+ dependencies:
+ '@gerrit0/mini-shiki': 1.27.2
+ lunr: 2.3.9
+ markdown-it: 14.1.0
+ minimatch: 9.0.5
+ typescript: 5.7.2
+ yaml: 2.7.0
+
typescript@5.7.2: {}
+ uc.micro@2.1.0: {}
+
undici-types@6.20.0: {}
unist-util-is@6.0.0:
@@ -3416,4 +3541,6 @@ snapshots:
yallist@5.0.0: {}
+ yaml@2.7.0: {}
+
zwitch@2.0.4: {}