There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
docs: initial api reference docs (#5352)
EYHN4aae3cbba315
diff --git a/docs/reference/package.json b/docs/reference/package.jsonnew file mode 100644index 0000000000..0b83a40942--- /dev/null+++ b/docs/reference/package.json@@ -0,0 +1,23 @@+{+ "name": "@affine/docs",+ "type": "module",+ "private": true,+ "scripts": {+ "build": "typedoc --options ../../typedoc.json",+ "dev": "nodemon --exec 'typedoc --options ../../typedoc.json' & serve dist/"+ },+ "devDependencies": {+ "nodemon": "^3.0.1",+ "serve": "^14.2.1",+ "typedoc": "^0.25.4"+ },+ "nodemonConfig": {+ "watch": [+ "./readme.md",+ "../../packages/*/*/src/*.ts",+ "../../**/typedoc{.base,}.json"+ ],+ "ext": "ts,md,json"+ },+ "version": "0.10.3-canary.2"+}diff --git a/docs/reference/readme.md b/docs/reference/readme.mdnew file mode 100644index 0000000000..e0333b9cbd--- /dev/null+++ b/docs/reference/readme.md@@ -0,0 +1,7 @@+Welcome to AFFiNE development reference.++This document is intended for developers who want to contribute to AFFiNE. It contains information about the architecture of AFFiNE, how to build it, and how to contribute to it.++### The Infrastructure of AFFiNE++see {@link @toeverything/infra!}diff --git a/package.json b/package.jsonindex d27456a431..e3fc38d315 100644--- a/package.json+++ b/package.json@@ -8,6 +8,7 @@".","packages/*/*","tools/*",+ "docs/reference","!tools/@types","tools/@types/*","tests/*",diff --git a/packages/common/infra/package.json b/packages/common/infra/package.jsonindex d573825985..3d0947145b 100644--- a/packages/common/infra/package.json+++ b/packages/common/infra/package.json@@ -7,7 +7,7 @@"./command": "./src/command/index.ts","./atom": "./src/atom/index.ts","./app-config-storage": "./src/app-config-storage.ts",- "./__internal__/*": "./src/__internal__/*.ts"+ ".": "./src/index.ts"},"dependencies": {"@affine/debug": "workspace:*",diff --git a/packages/common/infra/src/index.ts b/packages/common/infra/src/index.tsnew file mode 100644index 0000000000..6e94b1bdc7--- /dev/null+++ b/packages/common/infra/src/index.ts@@ -0,0 +1,4 @@+export * from './app-config-storage';+export * from './atom';+export * from './blocksuite';+export * from './command';diff --git a/packages/common/infra/typedoc.json b/packages/common/infra/typedoc.jsonnew file mode 100644index 0000000000..101e923dba--- /dev/null+++ b/packages/common/infra/typedoc.json@@ -0,0 +1,4 @@+{+ "extends": ["../../../typedoc.base.json"],+ "entryPoints": ["src/index.ts"]+}diff --git a/packages/common/workspace/typedoc.json b/packages/common/workspace/typedoc.jsonnew file mode 100644index 0000000000..101e923dba--- /dev/null+++ b/packages/common/workspace/typedoc.json@@ -0,0 +1,4 @@+{+ "extends": ["../../../typedoc.base.json"],+ "entryPoints": ["src/index.ts"]+}diff --git a/typedoc.base.json b/typedoc.base.jsonnew file mode 100644index 0000000000..e5d202eb0b--- /dev/null+++ b/typedoc.base.json@@ -0,0 +1,5 @@+{+ "$schema": "https://typedoc.org/schema.json",+ "includeVersion": true,+ "readme": "none"+}diff --git a/typedoc.json b/typedoc.jsonnew file mode 100644index 0000000000..6b679b5680--- /dev/null+++ b/typedoc.json@@ -0,0 +1,9 @@+{+ "entryPoints": ["packages/common/infra", "packages/common/workspace"],+ "out": "docs/reference/dist",+ "entryPointStrategy": "packages",+ "includeVersion": false,+ "logLevel": "Error",+ "readme": "./docs/reference/readme.md",+ "name": "AFFiNE Development Reference"+}diff --git a/yarn.lock b/yarn.lockindex e60d8e9b15..18fea59b78 100644--- a/yarn.lock+++ b/yarn.lock@@ -420,6 +420,16 @@ __metadata:languageName: unknownlinkType: soft+"@affine/docs@workspace:docs/reference":+ version: 0.0.0-use.local+ resolution: "@affine/docs@workspace:docs/reference"+ dependencies:+ nodemon: "npm:^3.0.1"+ serve: "npm:^14.2.1"+ typedoc: "npm:^0.25.4"+ languageName: unknown+ linkType: soft+"@affine/electron-api@workspace:*, @affine/electron-api@workspace:packages/frontend/electron-api":version: 0.0.0-use.localresolution: "@affine/electron-api@workspace:packages/frontend/electron-api"@@ -25788,6 +25798,13 @@ __metadata:languageName: nodelinkType: hard+"lunr@npm:^2.3.9":+ version: 2.3.9+ resolution: "lunr@npm:2.3.9"+ checksum: f2f6db34c046f5a767782fe2454e6dd69c75ba3c5cf5c1cb9cacca2313a99c2ba78ff8fa67dac866fb7c4ffd5f22e06684793f5f15ba14bddb598b94513d54bf+ languageName: node+ linkType: hard+"luxon@npm:~3.4.0":version: 3.4.4resolution: "luxon@npm:3.4.4"@@ -32046,6 +32063,18 @@ __metadata:languageName: nodelinkType: hard+"shiki@npm:^0.14.1":+ version: 0.14.7+ resolution: "shiki@npm:0.14.7"+ dependencies:+ ansi-sequence-parser: "npm:^1.1.0"+ jsonc-parser: "npm:^3.2.0"+ vscode-oniguruma: "npm:^1.7.0"+ vscode-textmate: "npm:^8.0.0"+ checksum: be3f2444c65bd0c57802026f171cb42ad571d361ee885be0c292b60785f68c70f19b69310f5ffe7f7a93db4c5ef50211e0a0248794bc6bb48d242bc43fe72a62+ languageName: node+ linkType: hard+"shiki@npm:^0.14.5":version: 0.14.5resolution: "shiki@npm:0.14.5"@@ -33970,7 +33999,23 @@ __metadata:languageName: nodelinkType: hard-"typescript@npm:5.3.3, typescript@npm:^5.2.2, typescript@npm:^5.3.2":+"typedoc@npm:^0.25.4":+ version: 0.25.4+ resolution: "typedoc@npm:0.25.4"+ dependencies:+ lunr: "npm:^2.3.9"+ marked: "npm:^4.3.0"+ minimatch: "npm:^9.0.3"+ shiki: "npm:^0.14.1"+ peerDependencies:+ typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x+ bin:+ typedoc: bin/typedoc+ checksum: 638f63d751ba86f1b0e04a303501b88b6e97ba093f82c3fa72a555c207e16fd316ec76c13f7d628e9ee26296f80fddc45b87d4b13714925c5e726047adb76d22+ languageName: node+ linkType: hard++"typescript@npm:5.3.3":version: 5.3.3resolution: "typescript@npm:5.3.3"bin:@@ -33980,7 +34025,17 @@ __metadata:languageName: nodelinkType: hard-"typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.2.2#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.3.2#optional!builtin<compat/typescript>":+"typescript@npm:^5.2.2, typescript@npm:^5.3.2":+ version: 5.3.2+ resolution: "typescript@npm:5.3.2"+ bin:+ tsc: bin/tsc+ tsserver: bin/tsserver+ checksum: 415e5fb6611f5713e460bad48039f00bcfdbde53a2f911727862d5aa9c5d5edd250059a419df382d8f031709e15a169c41eb62b6a401da5eec7ac0f4e359d6ac+ languageName: node+ linkType: hard++"typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>":version: 5.3.3resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"bin:@@ -33990,6 +34045,16 @@ __metadata:languageName: nodelinkType: hard+"typescript@patch:typescript@npm%3A^5.2.2#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.3.2#optional!builtin<compat/typescript>":+ version: 5.3.2+ resolution: "typescript@patch:typescript@npm%3A5.3.2#optional!builtin<compat/typescript>::version=5.3.2&hash=e012d7"+ bin:+ tsc: bin/tsc+ tsserver: bin/tsserver+ checksum: 1b45cdfb577a78ae7a9a9d0b77a7b772142cb98ba05e4e5aefba7044a028ded885bcecef63166407a5986645cea816fe4986894336aacd5e791796ea79a6a7ed+ languageName: node+ linkType: hard+"ua-parser-js@npm:^1.0.35":version: 1.0.37resolution: "ua-parser-js@npm:1.0.37"