no message
This commit is contained in:
parent
74cb238e43
commit
f7bdc418c4
15
.vscode/launch.json
vendored
Normal file
15
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
// 使用 IntelliSense 了解相关属性。
|
||||
// 悬停以查看现有属性的描述。
|
||||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"name": "针对 localhost 启动 Chrome",
|
||||
"url": "http://localhost:8080",
|
||||
"webRoot": "${workspaceFolder}"
|
||||
}
|
||||
]
|
||||
}
|
||||
12
web3/apps/web/index.html
Normal file
12
web3/apps/web/index.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Mind Map</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
690
web3/apps/web/package-lock.json
generated
Normal file
690
web3/apps/web/package-lock.json
generated
Normal file
@ -0,0 +1,690 @@
|
||||
{
|
||||
"name": "@mind-map/web",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@mind-map/web",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"pinia": "^2.1.6",
|
||||
"vue": "^3.3.4",
|
||||
"vue-router": "^4.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.15.3",
|
||||
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
||||
"@typescript-eslint/parser": "^6.2.1",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint-plugin-vue": "^9.16.1",
|
||||
"sass": "^1.64.2",
|
||||
"typescript": "^5.1.6",
|
||||
"vite": "^4.4.9",
|
||||
"vue-tsc": "^1.8.8"
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/@typescript-eslint+eslint-plugin@6.21.0_@typescript-eslint+parser@6.21.0_eslint@8.57.1__568544a48dea19c14ce8955143cbe955/node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "6.21.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.5.1",
|
||||
"@typescript-eslint/scope-manager": "6.21.0",
|
||||
"@typescript-eslint/type-utils": "6.21.0",
|
||||
"@typescript-eslint/utils": "6.21.0",
|
||||
"@typescript-eslint/visitor-keys": "6.21.0",
|
||||
"debug": "^4.3.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.4",
|
||||
"natural-compare": "^1.4.0",
|
||||
"semver": "^7.5.4",
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@prettier/sync": "*",
|
||||
"@types/debug": "*",
|
||||
"@types/marked": "*",
|
||||
"@types/natural-compare": "*",
|
||||
"@typescript-eslint/rule-schema-to-typescript-types": "6.21.0",
|
||||
"@typescript-eslint/rule-tester": "6.21.0",
|
||||
"ajv": "^6.12.6",
|
||||
"chalk": "^5.3.0",
|
||||
"cross-fetch": "*",
|
||||
"grapheme-splitter": "^1.0.4",
|
||||
"jest": "29.7.0",
|
||||
"jest-specific-snapshot": "^8.0.0",
|
||||
"json-schema": "*",
|
||||
"markdown-table": "^3.0.3",
|
||||
"marked": "^5.1.1",
|
||||
"prettier": "^3.0.3",
|
||||
"rimraf": "*",
|
||||
"title-case": "^3.0.3",
|
||||
"tsx": "*",
|
||||
"typescript": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/@typescript-eslint+parser@6.21.0_eslint@8.57.1_typescript@5.8.3/node_modules/@typescript-eslint/parser": {
|
||||
"version": "6.21.0",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "6.21.0",
|
||||
"@typescript-eslint/types": "6.21.0",
|
||||
"@typescript-eslint/typescript-estree": "6.21.0",
|
||||
"@typescript-eslint/visitor-keys": "6.21.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/glob": "*",
|
||||
"downlevel-dts": "*",
|
||||
"glob": "*",
|
||||
"jest": "29.7.0",
|
||||
"prettier": "^3.0.3",
|
||||
"rimraf": "*",
|
||||
"typescript": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/@vitejs+plugin-vue@4.6.2_vite@4.5.13_sass@1.87.0__vue@3.5.13_typescript@5.8.3_/node_modules/@vitejs/plugin-vue": {
|
||||
"version": "4.6.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@jridgewell/gen-mapping": "^0.3.3",
|
||||
"@jridgewell/trace-mapping": "^0.3.20",
|
||||
"debug": "^4.3.4",
|
||||
"rollup": "^3.29.4",
|
||||
"slash": "^5.1.0",
|
||||
"source-map-js": "^1.0.2",
|
||||
"vite": "^4.5.0",
|
||||
"vue": "^3.3.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vite": "^4.0.0 || ^5.0.0",
|
||||
"vue": "^3.2.25"
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/eslint-plugin-vue@9.33.0_eslint@8.57.1/node_modules/eslint-plugin-vue": {
|
||||
"version": "9.33.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"globals": "^13.24.0",
|
||||
"natural-compare": "^1.4.0",
|
||||
"nth-check": "^2.1.1",
|
||||
"postcss-selector-parser": "^6.0.15",
|
||||
"semver": "^7.6.3",
|
||||
"vue-eslint-parser": "^9.4.3",
|
||||
"xml-name-validator": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ota-meshi/site-kit-eslint-editor-vue": "^0.2.4",
|
||||
"@stylistic/eslint-plugin": "^2.12.1",
|
||||
"@types/eslint": "^8.56.2",
|
||||
"@types/eslint-visitor-keys": "^3.3.2",
|
||||
"@types/natural-compare": "^1.4.3",
|
||||
"@types/node": "^14.18.63",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/xml-name-validator": "^4.0.3",
|
||||
"@typescript-eslint/parser": "^7.18.0",
|
||||
"@typescript-eslint/types": "^7.18.0",
|
||||
"assert": "^2.1.0",
|
||||
"env-cmd": "^10.1.0",
|
||||
"esbuild": "^0.24.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-eslint-plugin": "~6.4.0",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-jsonc": "^2.16.0",
|
||||
"eslint-plugin-node-dependencies": "^0.12.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-unicorn": "^56.0.0",
|
||||
"eslint-plugin-vue": "file:.",
|
||||
"espree": "^9.6.1",
|
||||
"events": "^3.3.0",
|
||||
"markdownlint-cli": "^0.42.0",
|
||||
"mocha": "^10.7.3",
|
||||
"nyc": "^17.1.0",
|
||||
"pathe": "^1.1.2",
|
||||
"prettier": "^3.3.3",
|
||||
"typescript": "^5.7.2",
|
||||
"vitepress": "^1.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0"
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/eslint@8.57.1/node_modules/eslint": {
|
||||
"version": "8.57.1",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.6.1",
|
||||
"@eslint/eslintrc": "^2.1.4",
|
||||
"@eslint/js": "8.57.1",
|
||||
"@humanwhocodes/config-array": "^0.13.0",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@nodelib/fs.walk": "^1.2.8",
|
||||
"@ungap/structured-clone": "^1.2.0",
|
||||
"ajv": "^6.12.4",
|
||||
"chalk": "^4.0.0",
|
||||
"cross-spawn": "^7.0.2",
|
||||
"debug": "^4.3.2",
|
||||
"doctrine": "^3.0.0",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"eslint-scope": "^7.2.2",
|
||||
"eslint-visitor-keys": "^3.4.3",
|
||||
"espree": "^9.6.1",
|
||||
"esquery": "^1.4.2",
|
||||
"esutils": "^2.0.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"file-entry-cache": "^6.0.1",
|
||||
"find-up": "^5.0.0",
|
||||
"glob-parent": "^6.0.2",
|
||||
"globals": "^13.19.0",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.0",
|
||||
"imurmurhash": "^0.1.4",
|
||||
"is-glob": "^4.0.0",
|
||||
"is-path-inside": "^3.0.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||
"levn": "^0.4.1",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"minimatch": "^3.1.2",
|
||||
"natural-compare": "^1.4.0",
|
||||
"optionator": "^0.9.3",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"text-table": "^0.2.0"
|
||||
},
|
||||
"bin": {
|
||||
"eslint": "bin/eslint.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.4.3",
|
||||
"@babel/preset-env": "^7.4.3",
|
||||
"@sinonjs/fake-timers": "11.2.2",
|
||||
"@wdio/browser-runner": "^8.14.6",
|
||||
"@wdio/cli": "^8.14.6",
|
||||
"@wdio/concise-reporter": "^8.14.0",
|
||||
"@wdio/globals": "^8.14.6",
|
||||
"@wdio/mocha-framework": "^8.14.0",
|
||||
"babel-loader": "^8.0.5",
|
||||
"c8": "^7.12.0",
|
||||
"chai": "^4.0.1",
|
||||
"cheerio": "^0.22.0",
|
||||
"common-tags": "^1.8.0",
|
||||
"core-js": "^3.1.3",
|
||||
"ejs": "^3.0.2",
|
||||
"eslint": "file:.",
|
||||
"eslint-config-eslint": "file:packages/eslint-config-eslint",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-eslint-plugin": "^5.2.1",
|
||||
"eslint-plugin-internal-rules": "file:tools/internal-rules",
|
||||
"eslint-plugin-jsdoc": "^46.2.5",
|
||||
"eslint-plugin-n": "^16.6.0",
|
||||
"eslint-plugin-unicorn": "^49.0.0",
|
||||
"eslint-release": "^3.3.0",
|
||||
"eslump": "^3.0.0",
|
||||
"esprima": "^4.0.1",
|
||||
"fast-glob": "^3.2.11",
|
||||
"fs-teardown": "^0.1.3",
|
||||
"glob": "^7.1.6",
|
||||
"got": "^11.8.3",
|
||||
"gray-matter": "^4.0.3",
|
||||
"lint-staged": "^11.0.0",
|
||||
"load-perf": "^0.2.0",
|
||||
"markdown-it": "^12.2.0",
|
||||
"markdown-it-container": "^3.0.0",
|
||||
"markdownlint": "^0.32.0",
|
||||
"markdownlint-cli": "^0.37.0",
|
||||
"marked": "^4.0.8",
|
||||
"memfs": "^3.0.1",
|
||||
"metascraper": "^5.25.7",
|
||||
"metascraper-description": "^5.25.7",
|
||||
"metascraper-image": "^5.29.3",
|
||||
"metascraper-logo": "^5.25.7",
|
||||
"metascraper-logo-favicon": "^5.25.7",
|
||||
"metascraper-title": "^5.25.7",
|
||||
"mocha": "^8.3.2",
|
||||
"mocha-junit-reporter": "^2.0.0",
|
||||
"node-polyfill-webpack-plugin": "^1.0.3",
|
||||
"npm-license": "^0.3.3",
|
||||
"pirates": "^4.0.5",
|
||||
"progress": "^2.0.3",
|
||||
"proxyquire": "^2.0.1",
|
||||
"recast": "^0.23.0",
|
||||
"regenerator-runtime": "^0.14.0",
|
||||
"rollup-plugin-node-polyfills": "^0.2.1",
|
||||
"semver": "^7.5.3",
|
||||
"shelljs": "^0.8.2",
|
||||
"sinon": "^11.0.0",
|
||||
"vite-plugin-commonjs": "0.10.1",
|
||||
"webdriverio": "^8.14.6",
|
||||
"webpack": "^5.23.0",
|
||||
"webpack-cli": "^4.5.0",
|
||||
"yorkie": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/pinia@2.3.1_typescript@5.8.3_vue@3.5.13_typescript@5.8.3_/node_modules/pinia": {
|
||||
"version": "2.3.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vue/devtools-api": "^6.6.3",
|
||||
"vue-demi": "^0.14.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "7.48.0",
|
||||
"@vue/test-utils": "^2.4.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/posva"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.4.4",
|
||||
"vue": "^2.7.0 || ^3.5.11"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/sass@1.87.0/node_modules/sass": {
|
||||
"version": "1.87.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chokidar": "^4.0.0",
|
||||
"immutable": "^5.0.2",
|
||||
"source-map-js": ">=0.6.2 <2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"sass": "sass.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@parcel/watcher": "^2.4.1"
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript": {
|
||||
"version": "5.8.3",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dprint/formatter": "^0.4.1",
|
||||
"@dprint/typescript": "0.93.3",
|
||||
"@esfx/canceltoken": "^1.0.0",
|
||||
"@eslint/js": "^9.17.0",
|
||||
"@octokit/rest": "^21.0.2",
|
||||
"@types/chai": "^4.3.20",
|
||||
"@types/diff": "^5.2.3",
|
||||
"@types/minimist": "^1.2.5",
|
||||
"@types/mocha": "^10.0.10",
|
||||
"@types/ms": "^0.7.34",
|
||||
"@types/node": "latest",
|
||||
"@types/source-map-support": "^0.5.10",
|
||||
"@types/which": "^3.0.4",
|
||||
"@typescript-eslint/rule-tester": "^8.18.1",
|
||||
"@typescript-eslint/type-utils": "^8.18.1",
|
||||
"@typescript-eslint/utils": "^8.18.1",
|
||||
"azure-devops-node-api": "^14.1.0",
|
||||
"c8": "^10.1.3",
|
||||
"chai": "^4.5.0",
|
||||
"chalk": "^4.1.2",
|
||||
"chokidar": "^3.6.0",
|
||||
"diff": "^5.2.0",
|
||||
"dprint": "^0.47.6",
|
||||
"esbuild": "^0.24.0",
|
||||
"eslint": "^9.17.0",
|
||||
"eslint-formatter-autolinkable-stylish": "^1.4.0",
|
||||
"eslint-plugin-regexp": "^2.7.0",
|
||||
"fast-xml-parser": "^4.5.1",
|
||||
"glob": "^10.4.5",
|
||||
"globals": "^15.13.0",
|
||||
"hereby": "^1.10.0",
|
||||
"jsonc-parser": "^3.3.1",
|
||||
"knip": "^5.41.0",
|
||||
"minimist": "^1.2.8",
|
||||
"mocha": "^10.8.2",
|
||||
"mocha-fivemat-progress-reporter": "^0.1.0",
|
||||
"monocart-coverage-reports": "^2.11.4",
|
||||
"ms": "^2.1.3",
|
||||
"playwright": "^1.49.1",
|
||||
"source-map-support": "^0.5.21",
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.7.2",
|
||||
"typescript-eslint": "^8.18.1",
|
||||
"which": "^3.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/vite@4.5.13_sass@1.87.0/node_modules/vite": {
|
||||
"version": "4.5.13",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.18.10",
|
||||
"postcss": "^8.4.27",
|
||||
"rollup": "^3.27.1"
|
||||
},
|
||||
"bin": {
|
||||
"vite": "bin/vite.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ampproject/remapping": "^2.2.1",
|
||||
"@babel/parser": "^7.22.7",
|
||||
"@babel/types": "^7.22.5",
|
||||
"@jridgewell/trace-mapping": "^0.3.18",
|
||||
"@rollup/plugin-alias": "^4.0.4",
|
||||
"@rollup/plugin-commonjs": "^25.0.3",
|
||||
"@rollup/plugin-dynamic-import-vars": "^2.0.4",
|
||||
"@rollup/plugin-json": "^6.0.0",
|
||||
"@rollup/plugin-node-resolve": "15.1.0",
|
||||
"@rollup/plugin-typescript": "^11.1.2",
|
||||
"@rollup/pluginutils": "^5.0.2",
|
||||
"@types/escape-html": "^1.0.2",
|
||||
"@types/pnpapi": "^0.0.2",
|
||||
"acorn": "^8.10.0",
|
||||
"acorn-walk": "^8.2.0",
|
||||
"cac": "^6.7.14",
|
||||
"chokidar": "^3.5.3",
|
||||
"connect": "^3.7.0",
|
||||
"connect-history-api-fallback": "^2.0.0",
|
||||
"convert-source-map": "^2.0.0",
|
||||
"cors": "^2.8.5",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"debug": "^4.3.4",
|
||||
"dep-types": "link:./src/types",
|
||||
"dotenv": "^16.3.1",
|
||||
"dotenv-expand": "^9.0.0",
|
||||
"es-module-lexer": "^1.3.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"estree-walker": "^3.0.3",
|
||||
"etag": "^1.8.1",
|
||||
"fast-glob": "^3.3.1",
|
||||
"http-proxy": "^1.18.1",
|
||||
"json-stable-stringify": "^1.0.2",
|
||||
"launch-editor-middleware": "^2.6.0",
|
||||
"lightningcss": "^1.21.5",
|
||||
"magic-string": "^0.30.2",
|
||||
"micromatch": "^4.0.5",
|
||||
"mlly": "^1.4.0",
|
||||
"mrmime": "^1.0.1",
|
||||
"okie": "^1.0.1",
|
||||
"open": "^8.4.2",
|
||||
"parse5": "^7.1.2",
|
||||
"periscopic": "^3.1.0",
|
||||
"picocolors": "^1.0.0",
|
||||
"picomatch": "^2.3.1",
|
||||
"postcss-import": "^15.1.0",
|
||||
"postcss-load-config": "^4.0.1",
|
||||
"postcss-modules": "^6.0.0",
|
||||
"resolve.exports": "^2.0.2",
|
||||
"rollup-plugin-license": "^3.0.1",
|
||||
"sirv": "^2.0.3",
|
||||
"source-map-support": "^0.5.21",
|
||||
"strip-ansi": "^7.1.0",
|
||||
"strip-literal": "^1.3.0",
|
||||
"tsconfck": "^2.1.2",
|
||||
"tslib": "^2.6.1",
|
||||
"types": "link:./types",
|
||||
"ufo": "^1.2.0",
|
||||
"ws": "^8.13.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/vitejs/vite?sponsor=1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/node": ">= 14",
|
||||
"less": "*",
|
||||
"lightningcss": "^1.21.0",
|
||||
"sass": "*",
|
||||
"stylus": "*",
|
||||
"sugarss": "*",
|
||||
"terser": "^5.4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/node": {
|
||||
"optional": true
|
||||
},
|
||||
"less": {
|
||||
"optional": true
|
||||
},
|
||||
"lightningcss": {
|
||||
"optional": true
|
||||
},
|
||||
"sass": {
|
||||
"optional": true
|
||||
},
|
||||
"stylus": {
|
||||
"optional": true
|
||||
},
|
||||
"sugarss": {
|
||||
"optional": true
|
||||
},
|
||||
"terser": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/vue-router@4.5.1_vue@3.5.13_typescript@5.8.3_/node_modules/vue-router": {
|
||||
"version": "4.5.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vue/devtools-api": "^6.6.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "^7.48.0",
|
||||
"@rollup/plugin-alias": "^5.1.1",
|
||||
"@rollup/plugin-commonjs": "^25.0.8",
|
||||
"@rollup/plugin-node-resolve": "^15.3.0",
|
||||
"@rollup/plugin-replace": "^5.0.7",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/nightwatch": "^2.3.32",
|
||||
"@vitejs/plugin-vue": "^5.2.0",
|
||||
"@vue/compiler-sfc": "~3.5.13",
|
||||
"@vue/server-renderer": "~3.5.13",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"browserstack-local": "^1.5.5",
|
||||
"chromedriver": "^131.0.1",
|
||||
"connect-history-api-fallback": "^1.6.0",
|
||||
"conventional-changelog-cli": "^2.2.2",
|
||||
"dotenv": "^16.4.5",
|
||||
"faked-promise": "^2.2.2",
|
||||
"geckodriver": "^4.5.1",
|
||||
"happy-dom": "^15.11.6",
|
||||
"nightwatch": "^2.6.25",
|
||||
"nightwatch-helpers": "^1.2.0",
|
||||
"rimraf": "^6.0.1",
|
||||
"rollup": "^3.29.5",
|
||||
"rollup-plugin-analyzer": "^4.0.0",
|
||||
"rollup-plugin-typescript2": "^0.36.0",
|
||||
"vite": "^5.4.11",
|
||||
"vue": "~3.5.13"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/posva"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.2.0"
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/vue-tsc@1.8.27_typescript@5.8.3/node_modules/vue-tsc": {
|
||||
"version": "1.8.27",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@volar/typescript": "~1.11.1",
|
||||
"@vue/language-core": "1.8.27",
|
||||
"semver": "^7.5.4"
|
||||
},
|
||||
"bin": {
|
||||
"vue-tsc": "bin/vue-tsc.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "latest"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "*"
|
||||
}
|
||||
},
|
||||
"../../node_modules/.pnpm/vue@3.5.13_typescript@5.8.3/node_modules/vue": {
|
||||
"version": "3.5.13",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.5.13",
|
||||
"@vue/compiler-sfc": "3.5.13",
|
||||
"@vue/runtime-dom": "3.5.13",
|
||||
"@vue/server-renderer": "3.5.13",
|
||||
"@vue/shared": "3.5.13"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"../../packages/shared": {
|
||||
"name": "@mind-map/shared",
|
||||
"version": "1.0.0",
|
||||
"extraneous": true,
|
||||
"dependencies": {
|
||||
"vue": "^3.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
||||
"@typescript-eslint/parser": "^6.2.1",
|
||||
"eslint": "^8.46.0",
|
||||
"typescript": "^5.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.15.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz",
|
||||
"integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"resolved": "../../node_modules/.pnpm/@typescript-eslint+eslint-plugin@6.21.0_@typescript-eslint+parser@6.21.0_eslint@8.57.1__568544a48dea19c14ce8955143cbe955/node_modules/@typescript-eslint/eslint-plugin",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"resolved": "../../node_modules/.pnpm/@typescript-eslint+parser@6.21.0_eslint@8.57.1_typescript@5.8.3/node_modules/@typescript-eslint/parser",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@vitejs/plugin-vue": {
|
||||
"resolved": "../../node_modules/.pnpm/@vitejs+plugin-vue@4.6.2_vite@4.5.13_sass@1.87.0__vue@3.5.13_typescript@5.8.3_/node_modules/@vitejs/plugin-vue",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"resolved": "../../node_modules/.pnpm/eslint@8.57.1/node_modules/eslint",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/eslint-plugin-vue": {
|
||||
"resolved": "../../node_modules/.pnpm/eslint-plugin-vue@9.33.0_eslint@8.57.1/node_modules/eslint-plugin-vue",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/pinia": {
|
||||
"resolved": "../../node_modules/.pnpm/pinia@2.3.1_typescript@5.8.3_vue@3.5.13_typescript@5.8.3_/node_modules/pinia",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"resolved": "../../node_modules/.pnpm/sass@1.87.0/node_modules/sass",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"resolved": "../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"resolved": "../../node_modules/.pnpm/vite@4.5.13_sass@1.87.0/node_modules/vite",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/vue": {
|
||||
"resolved": "../../node_modules/.pnpm/vue@3.5.13_typescript@5.8.3/node_modules/vue",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/vue-router": {
|
||||
"resolved": "../../node_modules/.pnpm/vue-router@4.5.1_vue@3.5.13_typescript@5.8.3_/node_modules/vue-router",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/vue-tsc": {
|
||||
"resolved": "../../node_modules/.pnpm/vue-tsc@1.8.27_typescript@5.8.3/node_modules/vue-tsc",
|
||||
"link": true
|
||||
}
|
||||
}
|
||||
}
|
||||
28
web3/apps/web/package.json
Normal file
28
web3/apps/web/package.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@mind-map/web",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc --noEmit && vite build",
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint src --ext .ts,.vue"
|
||||
},
|
||||
"dependencies": {
|
||||
"pinia": "^2.1.6",
|
||||
"vue": "^3.3.4",
|
||||
"vue-router": "^4.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.15.3",
|
||||
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
||||
"@typescript-eslint/parser": "^6.2.1",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint-plugin-vue": "^9.16.1",
|
||||
"sass": "^1.64.2",
|
||||
"typescript": "^5.1.6",
|
||||
"vite": "^4.4.9",
|
||||
"vue-tsc": "^1.8.8"
|
||||
}
|
||||
}
|
||||
20
web3/apps/web/src/App.vue
Normal file
20
web3/apps/web/src/App.vue
Normal file
@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// App 组件
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: 'Avenir', Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #2c3e50;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
}
|
||||
</style>
|
||||
5
web3/apps/web/src/assets/logo.svg
Normal file
5
web3/apps/web/src/assets/logo.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 196.32 170.02">
|
||||
<path fill="#42b883" d="M120.83 0L98.16 39.26 75.49 0H0l98.16 170.02L196.32 0h-75.49z" />
|
||||
<path fill="#35495e" d="M120.83 0L98.16 39.26 75.49 0H39.26l58.9 102.01L157.06 0h-36.23z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 317 B |
96
web3/apps/web/src/components/BaseButton.vue
Normal file
96
web3/apps/web/src/components/BaseButton.vue
Normal file
@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<button
|
||||
:class="[
|
||||
'base-button',
|
||||
`base-button--${type}`,
|
||||
{ 'base-button--disabled': disabled }
|
||||
]"
|
||||
:disabled="disabled"
|
||||
@click="handleClick"
|
||||
>
|
||||
<slot></slot>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defineProps, defineEmits } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
default: 'primary',
|
||||
validator: (value: string) => {
|
||||
return ['primary', 'secondary', 'danger', 'success'].includes(value);
|
||||
}
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
const emit = defineEmits(['click']);
|
||||
|
||||
const handleClick = (event: MouseEvent) => {
|
||||
if (!props.disabled) {
|
||||
emit('click', event);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.base-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s, border-color 0.2s, color 0.2s;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.base-button--primary {
|
||||
background-color: #4f46e5;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.base-button--primary:hover:not(:disabled) {
|
||||
background-color: #4338ca;
|
||||
}
|
||||
|
||||
.base-button--secondary {
|
||||
background-color: #e5e7eb;
|
||||
color: #374151;
|
||||
}
|
||||
|
||||
.base-button--secondary:hover:not(:disabled) {
|
||||
background-color: #d1d5db;
|
||||
}
|
||||
|
||||
.base-button--danger {
|
||||
background-color: #ef4444;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.base-button--danger:hover:not(:disabled) {
|
||||
background-color: #dc2626;
|
||||
}
|
||||
|
||||
.base-button--success {
|
||||
background-color: #10b981;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.base-button--success:hover:not(:disabled) {
|
||||
background-color: #059669;
|
||||
}
|
||||
|
||||
.base-button--disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
11
web3/apps/web/src/env.d.ts
vendored
Normal file
11
web3/apps/web/src/env.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly BASE_URL: string;
|
||||
// 可以添加更多自定义环境变量
|
||||
// readonly VITE_API_URL: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
14
web3/apps/web/src/main.ts
Normal file
14
web3/apps/web/src/main.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
|
||||
// 创建应用实例
|
||||
const app = createApp(App)
|
||||
|
||||
// 使用插件
|
||||
app.use(createPinia())
|
||||
app.use(router)
|
||||
|
||||
// 挂载应用
|
||||
app.mount('#app')
|
||||
19
web3/apps/web/src/router/index.ts
Normal file
19
web3/apps/web/src/router/index.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
// 路由配置
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: () => import('../views/Home.vue')
|
||||
},
|
||||
]
|
||||
|
||||
// 创建路由实例
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes
|
||||
})
|
||||
|
||||
export default router
|
||||
32
web3/apps/web/src/store/index.ts
Normal file
32
web3/apps/web/src/store/index.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
// 定义主要状态
|
||||
interface RootState {
|
||||
counter: number
|
||||
theme: string
|
||||
}
|
||||
|
||||
// 创建 store
|
||||
export const useMainStore = defineStore('main', {
|
||||
// 状态
|
||||
state: (): RootState => ({
|
||||
counter: 0,
|
||||
theme: 'light'
|
||||
}),
|
||||
|
||||
// getters
|
||||
getters: {
|
||||
doubleCount: (state) => state.counter * 2,
|
||||
isDarkTheme: (state) => state.theme === 'dark'
|
||||
},
|
||||
|
||||
// actions
|
||||
actions: {
|
||||
increment() {
|
||||
this.counter++
|
||||
},
|
||||
toggleTheme() {
|
||||
this.theme = this.theme === 'light' ? 'dark' : 'light'
|
||||
}
|
||||
}
|
||||
})
|
||||
19
web3/apps/web/src/views/Home.vue
Normal file
19
web3/apps/web/src/views/Home.vue
Normal file
@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import MindMapPlugin from '@mind-map/component';
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
console.log('Home view mounted');
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
24
web3/apps/web/tsconfig.json
Normal file
24
web3/apps/web/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "ESNext",
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"skipLibCheck": true,
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "preserve",
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
10
web3/apps/web/tsconfig.node.json
Normal file
10
web3/apps/web/tsconfig.node.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"skipLibCheck": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
20
web3/apps/web/vite.config.ts
Normal file
20
web3/apps/web/vite.config.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { resolve } from 'path'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, './src')
|
||||
}
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: resolve(__dirname, 'index.html')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
11
web3/package.json
Normal file
11
web3/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "mind-map-web3",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "pnpm --filter @mind-map/web dev",
|
||||
"build": "pnpm --filter @mind-map/web build",
|
||||
"preview": "pnpm --filter @mind-map/web preview",
|
||||
"lint": "pnpm -r lint"
|
||||
}
|
||||
}
|
||||
23
web3/packages/mind-map/package.json
Normal file
23
web3/packages/mind-map/package.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "@mind-map/component",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "^3.3.3",
|
||||
"typescript": "^5.0.2",
|
||||
"vite": "^4.4.5",
|
||||
"vue-tsc": "^1.8.5"
|
||||
}
|
||||
}
|
||||
6
web3/packages/mind-map/postcss.config.js
Normal file
6
web3/packages/mind-map/postcss.config.js
Normal file
@ -0,0 +1,6 @@
|
||||
export default {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
12
web3/packages/mind-map/src/components/MindMap.vue
Normal file
12
web3/packages/mind-map/src/components/MindMap.vue
Normal file
@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<div class="mind-map bg-white rounded-lg shadow-md p-4 w-full h-64">
|
||||
<!-- 这是一个最小化的思维导图实现,只包含一个简单的div -->
|
||||
<div class="flex items-center justify-center h-full text-gray-500">
|
||||
Mind Map Component
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// 组件逻辑可以在这里添加
|
||||
</script>
|
||||
11
web3/packages/mind-map/src/index.ts
Normal file
11
web3/packages/mind-map/src/index.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { App } from 'vue';
|
||||
import MindMap from './components/MindMap.vue';
|
||||
import './styles/index.css';
|
||||
|
||||
export { MindMap };
|
||||
|
||||
export default {
|
||||
install: (app: App) => {
|
||||
app.component('MindMap', MindMap);
|
||||
}
|
||||
};
|
||||
3
web3/packages/mind-map/src/styles/index.css
Normal file
3
web3/packages/mind-map/src/styles/index.css
Normal file
@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
11
web3/packages/mind-map/tailwind.config.js
Normal file
11
web3/packages/mind-map/tailwind.config.js
Normal file
@ -0,0 +1,11 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
content: [
|
||||
"./index.html",
|
||||
"./src/**/*.{vue,js,ts,jsx,tsx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
25
web3/packages/mind-map/tsconfig.json
Normal file
25
web3/packages/mind-map/tsconfig.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "ESNext",
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "node",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "preserve",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
10
web3/packages/mind-map/tsconfig.node.json
Normal file
10
web3/packages/mind-map/tsconfig.node.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"skipLibCheck": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
28
web3/packages/mind-map/vite.config.ts
Normal file
28
web3/packages/mind-map/vite.config.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { resolve } from 'path'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src'),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/index.ts'),
|
||||
name: 'MindMap',
|
||||
fileName: 'mind-map',
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['vue'],
|
||||
output: {
|
||||
globals: {
|
||||
vue: 'Vue',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
20
web3/packages/shared/package.json
Normal file
20
web3/packages/shared/package.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "@mind-map/shared",
|
||||
"version": "1.0.0",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"dev": "tsc --watch",
|
||||
"lint": "eslint src --ext .ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.1.6",
|
||||
"eslint": "^8.46.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
||||
"@typescript-eslint/parser": "^6.2.1"
|
||||
}
|
||||
}
|
||||
13
web3/packages/shared/src/index.ts
Normal file
13
web3/packages/shared/src/index.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import * as utils from './utils';
|
||||
|
||||
/**
|
||||
* 导出共享工具函数
|
||||
*/
|
||||
export function useSharedUtils() {
|
||||
return {
|
||||
...utils
|
||||
};
|
||||
}
|
||||
|
||||
// 直接导出所有工具函数
|
||||
export * from './utils';
|
||||
47
web3/packages/shared/src/utils.ts
Normal file
47
web3/packages/shared/src/utils.ts
Normal file
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* 日期格式化工具函数
|
||||
* @param date 日期对象
|
||||
* @param format 格式化字符串,默认为 'YYYY-MM-DD'
|
||||
* @returns 格式化后的日期字符串
|
||||
*/
|
||||
export function formatDate(date: Date, format: string = 'YYYY-MM-DD'): string {
|
||||
const year = date.getFullYear().toString();
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = date.getDate().toString().padStart(2, '0');
|
||||
|
||||
let result = format;
|
||||
result = result.replace('YYYY', year);
|
||||
result = result.replace('MM', month);
|
||||
result = result.replace('DD', day);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 深拷贝函数
|
||||
* @param obj 要拷贝的对象
|
||||
* @returns 拷贝后的新对象
|
||||
*/
|
||||
export function deepClone<T>(obj: T): T {
|
||||
if (obj === null || typeof obj !== 'object') {
|
||||
return obj;
|
||||
}
|
||||
|
||||
if (obj instanceof Date) {
|
||||
return new Date(obj.getTime()) as any;
|
||||
}
|
||||
|
||||
if (obj instanceof Array) {
|
||||
return obj.map(item => deepClone(item)) as any;
|
||||
}
|
||||
|
||||
if (obj instanceof Object) {
|
||||
const copy: Record<string, any> = {};
|
||||
Object.keys(obj).forEach(key => {
|
||||
copy[key] = deepClone((obj as any)[key]);
|
||||
});
|
||||
return copy as T;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
19
web3/packages/shared/tsconfig.json
Normal file
19
web3/packages/shared/tsconfig.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "ESNext",
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"skipLibCheck": true,
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
2032
web3/pnpm-lock.yaml
generated
Normal file
2032
web3/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
3
web3/pnpm-workspace.yaml
Normal file
3
web3/pnpm-workspace.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
packages:
|
||||
- 'packages/*'
|
||||
- 'apps/*'
|
||||
Loading…
x
Reference in New Issue
Block a user