create upload ui, integrate unocss
This commit is contained in:
parent
ef87fa39c3
commit
6a23f2fe7c
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
/target
|
/target
|
||||||
dist
|
dist
|
||||||
|
node_modules
|
||||||
|
static/uno.css
|
||||||
|
11
Cargo.lock
generated
11
Cargo.lock
generated
@ -35,6 +35,12 @@ version = "1.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "base64"
|
||||||
|
version = "0.13.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bincode"
|
name = "bincode"
|
||||||
version = "1.3.3"
|
version = "1.3.3"
|
||||||
@ -449,8 +455,13 @@ name = "magic-sql-gen"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
"base64",
|
||||||
|
"gloo",
|
||||||
|
"js-sys",
|
||||||
"lazy-regex",
|
"lazy-regex",
|
||||||
|
"serde",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
"web-sys",
|
||||||
"xml-rs",
|
"xml-rs",
|
||||||
"yew",
|
"yew",
|
||||||
"zip",
|
"zip",
|
||||||
|
16
Cargo.toml
16
Cargo.toml
@ -10,8 +10,24 @@ yew = { version="0.20", features=["csr"] }
|
|||||||
anyhow = "1.0.69"
|
anyhow = "1.0.69"
|
||||||
thiserror = "1.0.38"
|
thiserror = "1.0.38"
|
||||||
lazy-regex = "2.4.1"
|
lazy-regex = "2.4.1"
|
||||||
|
js-sys = "0.3"
|
||||||
|
base64 = "0.13.0"
|
||||||
|
gloo = "0.8"
|
||||||
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
|
||||||
[dependencies.zip]
|
[dependencies.zip]
|
||||||
version = "0.6.4"
|
version = "0.6.4"
|
||||||
default-features = false
|
default-features = false
|
||||||
features=["deflate"]
|
features=["deflate"]
|
||||||
|
|
||||||
|
[dependencies.web-sys]
|
||||||
|
version = "0.3"
|
||||||
|
features = ["File", "DragEvent", "DataTransfer"]
|
||||||
|
|
||||||
|
# More info: https://doc.rust-lang.org/cargo/reference/profiles.html
|
||||||
|
[profile.release]
|
||||||
|
panic = 'abort'
|
||||||
|
codegen-units = 1
|
||||||
|
lto = true
|
||||||
|
# Experiment with levels: '1', '2', '3', 's', 'z' for best results
|
||||||
|
opt-level = 'z' # or 's', for less aggresive size optimization
|
||||||
|
17
index.html
17
index.html
@ -1,8 +1,19 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>Trunk Template</title>
|
<title>🪄 MagicDraw SQL Data Generator</title>
|
||||||
<link data-trunk rel="sass" href="index.scss" />
|
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.1/normalize.css" rel="stylesheet" />
|
||||||
|
<link href="https://cdn.skypack.dev/sanitize.css" rel="stylesheet" />
|
||||||
|
|
||||||
|
<link data-trunk rel="rust" />
|
||||||
|
<link data-trunk rel="css" href="./styles.css" />
|
||||||
|
<link data-trunk rel="css" href="./static/uno.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
<body
|
||||||
|
class="bg-dark500 text-light100 fw-400 m-auto max-w-2xl"
|
||||||
|
>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
35
index.scss
35
index.scss
@ -1,35 +0,0 @@
|
|||||||
html,
|
|
||||||
body {
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
background: linear-gradient(to bottom right, #444444, #009a5b);
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
color: #fff6d5;
|
|
||||||
font-family: sans-serif;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
height: 20em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heart:after {
|
|
||||||
content: "❤️";
|
|
||||||
|
|
||||||
font-size: 1.75em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 + .subtitle {
|
|
||||||
display: block;
|
|
||||||
margin-top: -1em;
|
|
||||||
}
|
|
16
package.json
Normal file
16
package.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "magic-sql-gen",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"preinstall": "npx only-allow pnpm",
|
||||||
|
"uno": "unocss src/*.rs src/components/*.rs index.html --out-file static/uno.css"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@unocss/cli": "^0.50.1",
|
||||||
|
"@unocss/preset-attributify": "^0.50.1",
|
||||||
|
"@unocss/preset-icons": "^0.50.1",
|
||||||
|
"unocss": "^0.50.1"
|
||||||
|
}
|
||||||
|
}
|
749
pnpm-lock.yaml
generated
Normal file
749
pnpm-lock.yaml
generated
Normal file
@ -0,0 +1,749 @@
|
|||||||
|
lockfileVersion: 5.4
|
||||||
|
|
||||||
|
specifiers:
|
||||||
|
'@unocss/cli': ^0.50.1
|
||||||
|
'@unocss/preset-attributify': ^0.50.1
|
||||||
|
'@unocss/preset-icons': ^0.50.1
|
||||||
|
unocss: ^0.50.1
|
||||||
|
|
||||||
|
devDependencies:
|
||||||
|
'@unocss/cli': 0.50.1
|
||||||
|
'@unocss/preset-attributify': 0.50.1
|
||||||
|
'@unocss/preset-icons': 0.50.1
|
||||||
|
unocss: 0.50.1
|
||||||
|
|
||||||
|
packages:
|
||||||
|
|
||||||
|
/@ampproject/remapping/2.2.0:
|
||||||
|
resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==}
|
||||||
|
engines: {node: '>=6.0.0'}
|
||||||
|
dependencies:
|
||||||
|
'@jridgewell/gen-mapping': 0.1.1
|
||||||
|
'@jridgewell/trace-mapping': 0.3.17
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@antfu/install-pkg/0.1.1:
|
||||||
|
resolution: {integrity: sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ==}
|
||||||
|
dependencies:
|
||||||
|
execa: 5.1.1
|
||||||
|
find-up: 5.0.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@antfu/utils/0.5.2:
|
||||||
|
resolution: {integrity: sha512-CQkeV+oJxUazwjlHD0/3ZD08QWKuGQkhnrKo3e6ly5pd48VUpXbb77q0xMU4+vc2CkJnDS02Eq/M9ugyX20XZA==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@antfu/utils/0.7.2:
|
||||||
|
resolution: {integrity: sha512-vy9fM3pIxZmX07dL+VX1aZe7ynZ+YyB0jY+jE6r3hOK6GNY2t6W8rzpFC4tgpbXUYABkFQwgJq2XYXlxbXAI0g==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@iconify/types/2.0.0:
|
||||||
|
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@iconify/utils/2.1.4:
|
||||||
|
resolution: {integrity: sha512-7vzsYIvxv5Hng0MNEtSSnyMBD/+zqnORqmKiYsSgpMBGSz1r93URgBZHPYCZ1/gpoaVstYW4/SVLGCMJBNMCLQ==}
|
||||||
|
dependencies:
|
||||||
|
'@antfu/install-pkg': 0.1.1
|
||||||
|
'@antfu/utils': 0.7.2
|
||||||
|
'@iconify/types': 2.0.0
|
||||||
|
debug: 4.3.4
|
||||||
|
kolorist: 1.7.0
|
||||||
|
local-pkg: 0.4.3
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@jridgewell/gen-mapping/0.1.1:
|
||||||
|
resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==}
|
||||||
|
engines: {node: '>=6.0.0'}
|
||||||
|
dependencies:
|
||||||
|
'@jridgewell/set-array': 1.1.2
|
||||||
|
'@jridgewell/sourcemap-codec': 1.4.14
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@jridgewell/resolve-uri/3.1.0:
|
||||||
|
resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==}
|
||||||
|
engines: {node: '>=6.0.0'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@jridgewell/set-array/1.1.2:
|
||||||
|
resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==}
|
||||||
|
engines: {node: '>=6.0.0'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@jridgewell/sourcemap-codec/1.4.14:
|
||||||
|
resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@jridgewell/trace-mapping/0.3.17:
|
||||||
|
resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==}
|
||||||
|
dependencies:
|
||||||
|
'@jridgewell/resolve-uri': 3.1.0
|
||||||
|
'@jridgewell/sourcemap-codec': 1.4.14
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@nodelib/fs.scandir/2.1.5:
|
||||||
|
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
||||||
|
engines: {node: '>= 8'}
|
||||||
|
dependencies:
|
||||||
|
'@nodelib/fs.stat': 2.0.5
|
||||||
|
run-parallel: 1.2.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@nodelib/fs.stat/2.0.5:
|
||||||
|
resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==}
|
||||||
|
engines: {node: '>= 8'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@nodelib/fs.walk/1.2.8:
|
||||||
|
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
|
||||||
|
engines: {node: '>= 8'}
|
||||||
|
dependencies:
|
||||||
|
'@nodelib/fs.scandir': 2.1.5
|
||||||
|
fastq: 1.15.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@polka/url/1.0.0-next.21:
|
||||||
|
resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@rollup/pluginutils/5.0.2:
|
||||||
|
resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==}
|
||||||
|
engines: {node: '>=14.0.0'}
|
||||||
|
peerDependencies:
|
||||||
|
rollup: ^1.20.0||^2.0.0||^3.0.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
rollup:
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
'@types/estree': 1.0.0
|
||||||
|
estree-walker: 2.0.2
|
||||||
|
picomatch: 2.3.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@types/estree/1.0.0:
|
||||||
|
resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/astro/0.50.1:
|
||||||
|
resolution: {integrity: sha512-TlGIK21OTbVUgrwZXfU4x0VwpNB7i/MKGcpv3HKadxdqhXReimt9gD+iRWSRAvRBgDIcH6Uqvr3Qq1aNCVEdTg==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
'@unocss/reset': 0.50.1
|
||||||
|
'@unocss/vite': 0.50.1
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- rollup
|
||||||
|
- vite
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/cli/0.50.1:
|
||||||
|
resolution: {integrity: sha512-Qu1s8sJh4XFRN62qeHAQ+NkxylPi7Gf4Gz0NmTvn4C9BjpiCwO4QKJoyy0fjY4TcdPOIkibfSg/MjTD/4ceyyA==}
|
||||||
|
engines: {node: '>=14'}
|
||||||
|
hasBin: true
|
||||||
|
dependencies:
|
||||||
|
'@ampproject/remapping': 2.2.0
|
||||||
|
'@rollup/pluginutils': 5.0.2
|
||||||
|
'@unocss/config': 0.50.1
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
'@unocss/preset-uno': 0.50.1
|
||||||
|
cac: 6.7.14
|
||||||
|
chokidar: 3.5.3
|
||||||
|
colorette: 2.0.19
|
||||||
|
consola: 2.15.3
|
||||||
|
fast-glob: 3.2.12
|
||||||
|
magic-string: 0.30.0
|
||||||
|
pathe: 1.1.0
|
||||||
|
perfect-debounce: 0.1.3
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- rollup
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/config/0.50.1:
|
||||||
|
resolution: {integrity: sha512-pZmT5gDIp0n/HMSD2kcSw/LW4QJ5azjBzGciuLN6p/kOjgj1SnYjElOgbedUEMeyZTZXveMoB50OuUzb9S+a2g==}
|
||||||
|
engines: {node: '>=14'}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
unconfig: 0.3.7
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/core/0.50.1:
|
||||||
|
resolution: {integrity: sha512-jnWClMMGybzyXcRX4DY+g/DJ4JrH9w8YN/H6OTHt0WyrNfR1V3ebJtEc6gbqCkZCh2XmqSA5F49QPhTbErYePg==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/inspector/0.50.1:
|
||||||
|
resolution: {integrity: sha512-pKjhO8hlkcYVksnQn/ly1HLnh49ZYu/MDnexaQaPtS3/1KLibiinTNqzZpZJZ71T0dVUadW9fMfV2t283GhJzA==}
|
||||||
|
dependencies:
|
||||||
|
gzip-size: 6.0.0
|
||||||
|
sirv: 2.0.2
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/preset-attributify/0.50.1:
|
||||||
|
resolution: {integrity: sha512-hFvxX406r8jXYkHTSq5GVg5ZXNtGNlTmvrjvpirH3PxK/YOkcS7D3ZsnOmxTvblsIzXx45w+V7hplNAg9t46eQ==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/preset-icons/0.50.1:
|
||||||
|
resolution: {integrity: sha512-uqPzQ2U2ih3wb1sjjnEI3OMzf2jcpoflIY9+jIXb0CgIh2SQtvri2uK4mYBWTLyZXWp9bHfBEaM9Dzfr9eSU3w==}
|
||||||
|
dependencies:
|
||||||
|
'@iconify/utils': 2.1.4
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
ofetch: 1.0.1
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/preset-mini/0.50.1:
|
||||||
|
resolution: {integrity: sha512-asAJHsgNKbfH5aANuaA/1Q0efWPWalGSlLa9V73JXyXO4fbFT86m3o65NPHbm2N9t5IRxTfL3hcuUE/cOGEVLg==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/preset-tagify/0.50.1:
|
||||||
|
resolution: {integrity: sha512-3pAJDKxa+RFMpZL8bQpR/76htF22mpb72dV5UBj0l4HZk/9HK2hlLL2GurZ87HOZbh4cWfgHj9G+CK+ubTHY0w==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/preset-typography/0.50.1:
|
||||||
|
resolution: {integrity: sha512-sk2LGA47558BLTvIlZlYExnV84C+8wYSh8jYhizW7IJjrvudfOSuO21qPulhcUjCwcMo8pEDRx7YddZy8sJOuQ==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/preset-uno/0.50.1:
|
||||||
|
resolution: {integrity: sha512-d4A7lqldhA1AeD0T/uwPHc+6pz44FYOnsSf34C0KVBmt1kDR2kZUOk8tcNWSXMpDWBkGAhrOMl/EuZ5ShCRzeQ==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
'@unocss/preset-mini': 0.50.1
|
||||||
|
'@unocss/preset-wind': 0.50.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/preset-web-fonts/0.50.1:
|
||||||
|
resolution: {integrity: sha512-V9i5t57gPbpuuP7rKIS9wj2PUuLojG8/nkMIutivIOXNK+O+7klp3YDrs+0cwUjCRPgXCbnbBTAs/eXOjTitUQ==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
ofetch: 1.0.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/preset-wind/0.50.1:
|
||||||
|
resolution: {integrity: sha512-+gDGdundQTgyEiK9Y0DbVCxjT5Miu7vBGtcsp0AyLojz/cHkdDBL/1X34fWTA7mejnFgs/e2m0BlFVwAj9ZZiQ==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
'@unocss/preset-mini': 0.50.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/reset/0.50.1:
|
||||||
|
resolution: {integrity: sha512-BcANWHHrKgHML5TLaPuSl148L2WLA938r0pLi4PrRTmZtkgP4OhBLs8U8BaDNVVGR/nli7VDxNRZFb9es3Tq9Q==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/scope/0.50.1:
|
||||||
|
resolution: {integrity: sha512-C59tSuuiNh/c7X+DcuaNKVsmFvqSyWu5tAa/sTMDYa6qLRof2W/ot7NEEH9QEC7s0fklAiRt7Iazehrjz4mf+w==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/transformer-attributify-jsx/0.50.1:
|
||||||
|
resolution: {integrity: sha512-gyvPRcQVgg3yDcj+KCqkrm/kYNTPKhynNzY0UTLQ7eBH3C786zs+8miyONyL/K0bkoBaWnw3Jzr07JIRQfguUA==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/transformer-compile-class/0.50.1:
|
||||||
|
resolution: {integrity: sha512-HuAL914R1hXaDO/KkbWX8q8GffAPhvdZIMy+VpdGXNSWAGpYpHWQu/LGrTuzk56p8sGGy6jwza1iMIP/9l7CWQ==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/transformer-directives/0.50.1:
|
||||||
|
resolution: {integrity: sha512-rdkznrK6JeEp9m2StLhP0VViuBWDgzYUqA3JxOKMoMQ0+x/TfBbXWkw2WnoGGkj3Vms6NPoKGa5Yhbdxp4w8yg==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
css-tree: 2.3.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/transformer-variant-group/0.50.1:
|
||||||
|
resolution: {integrity: sha512-1+OBSsyHfW9mXAnzaELXWqLjcoi+B4G5R5h+9TT2RZfHqkSIu+5xu2OGsDJ2QFhNGFerv7R2k7ajVCnbQWq7TQ==}
|
||||||
|
dependencies:
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@unocss/vite/0.50.1:
|
||||||
|
resolution: {integrity: sha512-CDy9ZcwSCpz/ED9zglunmrCVDbczbtkC/ZzgcRehDUX9xeVRA397uakb7fe4Rm+KGOGmr7HsUTQR7s0C9EOYww==}
|
||||||
|
peerDependencies:
|
||||||
|
vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0
|
||||||
|
dependencies:
|
||||||
|
'@ampproject/remapping': 2.2.0
|
||||||
|
'@rollup/pluginutils': 5.0.2
|
||||||
|
'@unocss/config': 0.50.1
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
'@unocss/inspector': 0.50.1
|
||||||
|
'@unocss/scope': 0.50.1
|
||||||
|
'@unocss/transformer-directives': 0.50.1
|
||||||
|
chokidar: 3.5.3
|
||||||
|
fast-glob: 3.2.12
|
||||||
|
magic-string: 0.30.0
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- rollup
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/anymatch/3.1.3:
|
||||||
|
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
|
||||||
|
engines: {node: '>= 8'}
|
||||||
|
dependencies:
|
||||||
|
normalize-path: 3.0.0
|
||||||
|
picomatch: 2.3.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/binary-extensions/2.2.0:
|
||||||
|
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/braces/3.0.2:
|
||||||
|
resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dependencies:
|
||||||
|
fill-range: 7.0.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/cac/6.7.14:
|
||||||
|
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/chokidar/3.5.3:
|
||||||
|
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
|
||||||
|
engines: {node: '>= 8.10.0'}
|
||||||
|
dependencies:
|
||||||
|
anymatch: 3.1.3
|
||||||
|
braces: 3.0.2
|
||||||
|
glob-parent: 5.1.2
|
||||||
|
is-binary-path: 2.1.0
|
||||||
|
is-glob: 4.0.3
|
||||||
|
normalize-path: 3.0.0
|
||||||
|
readdirp: 3.6.0
|
||||||
|
optionalDependencies:
|
||||||
|
fsevents: 2.3.2
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/colorette/2.0.19:
|
||||||
|
resolution: {integrity: sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/consola/2.15.3:
|
||||||
|
resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/cross-spawn/7.0.3:
|
||||||
|
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
|
||||||
|
engines: {node: '>= 8'}
|
||||||
|
dependencies:
|
||||||
|
path-key: 3.1.1
|
||||||
|
shebang-command: 2.0.0
|
||||||
|
which: 2.0.2
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/css-tree/2.3.1:
|
||||||
|
resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==}
|
||||||
|
engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0}
|
||||||
|
dependencies:
|
||||||
|
mdn-data: 2.0.30
|
||||||
|
source-map-js: 1.0.2
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/debug/4.3.4:
|
||||||
|
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
|
||||||
|
engines: {node: '>=6.0'}
|
||||||
|
peerDependencies:
|
||||||
|
supports-color: '*'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
supports-color:
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
ms: 2.1.2
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/defu/6.1.2:
|
||||||
|
resolution: {integrity: sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/destr/1.2.2:
|
||||||
|
resolution: {integrity: sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/duplexer/0.1.2:
|
||||||
|
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/estree-walker/2.0.2:
|
||||||
|
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/execa/5.1.1:
|
||||||
|
resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dependencies:
|
||||||
|
cross-spawn: 7.0.3
|
||||||
|
get-stream: 6.0.1
|
||||||
|
human-signals: 2.1.0
|
||||||
|
is-stream: 2.0.1
|
||||||
|
merge-stream: 2.0.0
|
||||||
|
npm-run-path: 4.0.1
|
||||||
|
onetime: 5.1.2
|
||||||
|
signal-exit: 3.0.7
|
||||||
|
strip-final-newline: 2.0.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/fast-glob/3.2.12:
|
||||||
|
resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==}
|
||||||
|
engines: {node: '>=8.6.0'}
|
||||||
|
dependencies:
|
||||||
|
'@nodelib/fs.stat': 2.0.5
|
||||||
|
'@nodelib/fs.walk': 1.2.8
|
||||||
|
glob-parent: 5.1.2
|
||||||
|
merge2: 1.4.1
|
||||||
|
micromatch: 4.0.5
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/fastq/1.15.0:
|
||||||
|
resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==}
|
||||||
|
dependencies:
|
||||||
|
reusify: 1.0.4
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/fill-range/7.0.1:
|
||||||
|
resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dependencies:
|
||||||
|
to-regex-range: 5.0.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/find-up/5.0.0:
|
||||||
|
resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dependencies:
|
||||||
|
locate-path: 6.0.0
|
||||||
|
path-exists: 4.0.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/fsevents/2.3.2:
|
||||||
|
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
|
||||||
|
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
||||||
|
os: [darwin]
|
||||||
|
requiresBuild: true
|
||||||
|
dev: true
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/get-stream/6.0.1:
|
||||||
|
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/glob-parent/5.1.2:
|
||||||
|
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
|
||||||
|
engines: {node: '>= 6'}
|
||||||
|
dependencies:
|
||||||
|
is-glob: 4.0.3
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/gzip-size/6.0.0:
|
||||||
|
resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dependencies:
|
||||||
|
duplexer: 0.1.2
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/human-signals/2.1.0:
|
||||||
|
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
|
||||||
|
engines: {node: '>=10.17.0'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/is-binary-path/2.1.0:
|
||||||
|
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dependencies:
|
||||||
|
binary-extensions: 2.2.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/is-extglob/2.1.1:
|
||||||
|
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/is-glob/4.0.3:
|
||||||
|
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dependencies:
|
||||||
|
is-extglob: 2.1.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/is-number/7.0.0:
|
||||||
|
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
|
||||||
|
engines: {node: '>=0.12.0'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/is-stream/2.0.1:
|
||||||
|
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/isexe/2.0.0:
|
||||||
|
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/jiti/1.17.1:
|
||||||
|
resolution: {integrity: sha512-NZIITw8uZQFuzQimqjUxIrIcEdxYDFIe/0xYfIlVXTkiBjjyBEvgasj5bb0/cHtPRD/NziPbT312sFrkI5ALpw==}
|
||||||
|
hasBin: true
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/kolorist/1.7.0:
|
||||||
|
resolution: {integrity: sha512-ymToLHqL02udwVdbkowNpzjFd6UzozMtshPQKVi5k1EjKRqKqBrOnE9QbLEb0/pV76SAiIT13hdL8R6suc+f3g==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/local-pkg/0.4.3:
|
||||||
|
resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==}
|
||||||
|
engines: {node: '>=14'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/locate-path/6.0.0:
|
||||||
|
resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dependencies:
|
||||||
|
p-locate: 5.0.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/magic-string/0.30.0:
|
||||||
|
resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==}
|
||||||
|
engines: {node: '>=12'}
|
||||||
|
dependencies:
|
||||||
|
'@jridgewell/sourcemap-codec': 1.4.14
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/mdn-data/2.0.30:
|
||||||
|
resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/merge-stream/2.0.0:
|
||||||
|
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/merge2/1.4.1:
|
||||||
|
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
|
||||||
|
engines: {node: '>= 8'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/micromatch/4.0.5:
|
||||||
|
resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==}
|
||||||
|
engines: {node: '>=8.6'}
|
||||||
|
dependencies:
|
||||||
|
braces: 3.0.2
|
||||||
|
picomatch: 2.3.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/mimic-fn/2.1.0:
|
||||||
|
resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}
|
||||||
|
engines: {node: '>=6'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/mrmime/1.0.1:
|
||||||
|
resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/ms/2.1.2:
|
||||||
|
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/node-fetch-native/1.0.2:
|
||||||
|
resolution: {integrity: sha512-KIkvH1jl6b3O7es/0ShyCgWLcfXxlBrLBbP3rOr23WArC66IMcU4DeZEeYEOwnopYhawLTn7/y+YtmASe8DFVQ==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/normalize-path/3.0.0:
|
||||||
|
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/npm-run-path/4.0.1:
|
||||||
|
resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dependencies:
|
||||||
|
path-key: 3.1.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/ofetch/1.0.1:
|
||||||
|
resolution: {integrity: sha512-icBz2JYfEpt+wZz1FRoGcrMigjNKjzvufE26m9+yUiacRQRHwnNlGRPiDnW4op7WX/MR6aniwS8xw8jyVelF2g==}
|
||||||
|
dependencies:
|
||||||
|
destr: 1.2.2
|
||||||
|
node-fetch-native: 1.0.2
|
||||||
|
ufo: 1.1.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/onetime/5.1.2:
|
||||||
|
resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
|
||||||
|
engines: {node: '>=6'}
|
||||||
|
dependencies:
|
||||||
|
mimic-fn: 2.1.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/p-limit/3.1.0:
|
||||||
|
resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dependencies:
|
||||||
|
yocto-queue: 0.1.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/p-locate/5.0.0:
|
||||||
|
resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dependencies:
|
||||||
|
p-limit: 3.1.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/path-exists/4.0.0:
|
||||||
|
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/path-key/3.1.1:
|
||||||
|
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/pathe/1.1.0:
|
||||||
|
resolution: {integrity: sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/perfect-debounce/0.1.3:
|
||||||
|
resolution: {integrity: sha512-NOT9AcKiDGpnV/HBhI22Str++XWcErO/bALvHCuhv33owZW/CjH8KAFLZDCmu3727sihe0wTxpDhyGc6M8qacQ==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/picomatch/2.3.1:
|
||||||
|
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
|
||||||
|
engines: {node: '>=8.6'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/queue-microtask/1.2.3:
|
||||||
|
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/readdirp/3.6.0:
|
||||||
|
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
|
||||||
|
engines: {node: '>=8.10.0'}
|
||||||
|
dependencies:
|
||||||
|
picomatch: 2.3.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/reusify/1.0.4:
|
||||||
|
resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}
|
||||||
|
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/run-parallel/1.2.0:
|
||||||
|
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
|
||||||
|
dependencies:
|
||||||
|
queue-microtask: 1.2.3
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/shebang-command/2.0.0:
|
||||||
|
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dependencies:
|
||||||
|
shebang-regex: 3.0.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/shebang-regex/3.0.0:
|
||||||
|
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/signal-exit/3.0.7:
|
||||||
|
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/sirv/2.0.2:
|
||||||
|
resolution: {integrity: sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==}
|
||||||
|
engines: {node: '>= 10'}
|
||||||
|
dependencies:
|
||||||
|
'@polka/url': 1.0.0-next.21
|
||||||
|
mrmime: 1.0.1
|
||||||
|
totalist: 3.0.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/source-map-js/1.0.2:
|
||||||
|
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
||||||
|
engines: {node: '>=0.10.0'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/strip-final-newline/2.0.0:
|
||||||
|
resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
|
||||||
|
engines: {node: '>=6'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/to-regex-range/5.0.1:
|
||||||
|
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
|
||||||
|
engines: {node: '>=8.0'}
|
||||||
|
dependencies:
|
||||||
|
is-number: 7.0.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/totalist/3.0.0:
|
||||||
|
resolution: {integrity: sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==}
|
||||||
|
engines: {node: '>=6'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/ufo/1.1.0:
|
||||||
|
resolution: {integrity: sha512-LQc2s/ZDMaCN3QLpa+uzHUOQ7SdV0qgv3VBXOolQGXTaaZpIur6PwUclF5nN2hNkiTRcUugXd1zFOW3FLJ135Q==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/unconfig/0.3.7:
|
||||||
|
resolution: {integrity: sha512-1589b7oGa8ILBYpta7TndM5mLHLzHUqBfhszeZxuUBrjO/RoQ52VGVWsS3w0C0GLNxO9RPmqkf6BmIvBApaRdA==}
|
||||||
|
dependencies:
|
||||||
|
'@antfu/utils': 0.5.2
|
||||||
|
defu: 6.1.2
|
||||||
|
jiti: 1.17.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/unocss/0.50.1:
|
||||||
|
resolution: {integrity: sha512-D21InhvOwWb2quWVTqVUDl1shDU87KEWc8OzpLztaLmRpOV0S6SFxCZmxA5sAUGaVNdTgHAbBU9o43ipete1Mw==}
|
||||||
|
engines: {node: '>=14'}
|
||||||
|
peerDependencies:
|
||||||
|
'@unocss/webpack': 0.50.1
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@unocss/webpack':
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
'@unocss/astro': 0.50.1
|
||||||
|
'@unocss/cli': 0.50.1
|
||||||
|
'@unocss/core': 0.50.1
|
||||||
|
'@unocss/preset-attributify': 0.50.1
|
||||||
|
'@unocss/preset-icons': 0.50.1
|
||||||
|
'@unocss/preset-mini': 0.50.1
|
||||||
|
'@unocss/preset-tagify': 0.50.1
|
||||||
|
'@unocss/preset-typography': 0.50.1
|
||||||
|
'@unocss/preset-uno': 0.50.1
|
||||||
|
'@unocss/preset-web-fonts': 0.50.1
|
||||||
|
'@unocss/preset-wind': 0.50.1
|
||||||
|
'@unocss/reset': 0.50.1
|
||||||
|
'@unocss/transformer-attributify-jsx': 0.50.1
|
||||||
|
'@unocss/transformer-compile-class': 0.50.1
|
||||||
|
'@unocss/transformer-directives': 0.50.1
|
||||||
|
'@unocss/transformer-variant-group': 0.50.1
|
||||||
|
'@unocss/vite': 0.50.1
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- rollup
|
||||||
|
- supports-color
|
||||||
|
- vite
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/which/2.0.2:
|
||||||
|
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
|
||||||
|
engines: {node: '>= 8'}
|
||||||
|
hasBin: true
|
||||||
|
dependencies:
|
||||||
|
isexe: 2.0.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/yocto-queue/0.1.0:
|
||||||
|
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dev: true
|
3
run-serve.sh
Executable file
3
run-serve.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
npm run uno -- --watch &
|
||||||
|
trunk serve
|
186
src/app.rs
Normal file
186
src/app.rs
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
use std::io::Cursor;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
use std::rc::Rc;
|
||||||
|
use gloo::console::console_dbg;
|
||||||
|
use base64::encode;
|
||||||
|
use gloo::file::callbacks::FileReader;
|
||||||
|
use gloo::file::File;
|
||||||
|
use gloo::storage::{LocalStorage, Storage};
|
||||||
|
use web_sys::{DragEvent, Event, FileList, HtmlInputElement};
|
||||||
|
use yew::html::TargetCast;
|
||||||
|
use yew::{html, Callback, Component, Context, Html};
|
||||||
|
|
||||||
|
use crate::magicdraw_parser::{parse_project, SQLTableCollection, SQLTable};
|
||||||
|
use crate::components::sql_column_info::SQLTableColumnInfo;
|
||||||
|
|
||||||
|
const COLLECTION_STORE_KEY: &str = "current_collection";
|
||||||
|
|
||||||
|
pub enum Msg {
|
||||||
|
Noop,
|
||||||
|
Loaded(String, Vec<u8>),
|
||||||
|
UploadProject(File),
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct App {
|
||||||
|
active_readers: HashMap<String, FileReader>,
|
||||||
|
current_collection: Option<Vec<Rc<SQLTable>>>
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Component for App {
|
||||||
|
type Message = Msg;
|
||||||
|
type Properties = ();
|
||||||
|
|
||||||
|
fn create(_ctx: &Context<Self>) -> Self {
|
||||||
|
let mut current_collection = None;
|
||||||
|
if let Ok(collection) = LocalStorage::get::<SQLTableCollection>("current_collection") {
|
||||||
|
current_collection = Some(collection.tables.into_iter().map(Rc::new).collect());
|
||||||
|
}
|
||||||
|
|
||||||
|
Self {
|
||||||
|
active_readers: HashMap::default(),
|
||||||
|
current_collection
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn update(&mut self, ctx: &Context<Self>, msg: Self::Message) -> bool {
|
||||||
|
match msg {
|
||||||
|
Msg::Loaded(file_name, data) => {
|
||||||
|
if file_name.ends_with(".mdzip") {
|
||||||
|
let cursor = Cursor::new(&data);
|
||||||
|
|
||||||
|
let mut collections = parse_project(cursor).expect("oops");
|
||||||
|
if collections.len() >= 1 {
|
||||||
|
self.set_current_collection(Some(collections.remove(0)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.active_readers.remove(&file_name);
|
||||||
|
true
|
||||||
|
}
|
||||||
|
Msg::UploadProject(file) => {
|
||||||
|
let file_name = file.name();
|
||||||
|
|
||||||
|
let task = {
|
||||||
|
let link = ctx.link().clone();
|
||||||
|
let file_name = file_name.clone();
|
||||||
|
|
||||||
|
gloo::file::callbacks::read_as_bytes(&file, move |res| {
|
||||||
|
link.send_message(Msg::Loaded(
|
||||||
|
file_name,
|
||||||
|
res.expect("failed to read file"),
|
||||||
|
))
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
self.active_readers.insert(file_name, task);
|
||||||
|
true
|
||||||
|
},
|
||||||
|
Msg::Noop => false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn view(&self, ctx: &Context<Self>) -> Html {
|
||||||
|
let prevent_default_cb = Callback::from(|event: DragEvent| {
|
||||||
|
event.prevent_default();
|
||||||
|
});
|
||||||
|
|
||||||
|
html! {
|
||||||
|
<main class="flex-col 4rem center">
|
||||||
|
<p class="text-3xl text-center">{ "🪄 MagicDraw SQL Data Generator" }</p>
|
||||||
|
<div>
|
||||||
|
<p class="text-2xl mt-2rem pb-1rem">
|
||||||
|
<span>{ "1. Upload " }</span>
|
||||||
|
<code class="bg-dark900 p-0.2rem rounded">{".mdzip"}</code>
|
||||||
|
<span>{ " project" }</span>
|
||||||
|
</p>
|
||||||
|
<label for="file-upload">
|
||||||
|
<div
|
||||||
|
class="flex flex-col rounded items-center p-3rem bg-dark800"
|
||||||
|
border="dotted dark100 0.2rem"
|
||||||
|
cursor="pointer"
|
||||||
|
ondrop={ctx.link().callback(|event: DragEvent| {
|
||||||
|
event.prevent_default();
|
||||||
|
let files = event.data_transfer().unwrap().files();
|
||||||
|
Self::upload_project(files)
|
||||||
|
})}
|
||||||
|
ondragover={&prevent_default_cb}
|
||||||
|
ondragenter={&prevent_default_cb}
|
||||||
|
>
|
||||||
|
<div class="i-mdi-file-upload-outline text-4rem"></div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
id="file-upload"
|
||||||
|
type="file"
|
||||||
|
class = "hidden"
|
||||||
|
accept=".mdzip"
|
||||||
|
onchange={ctx.link().callback(move |e: Event| {
|
||||||
|
let input: HtmlInputElement = e.target_unchecked_into();
|
||||||
|
Self::upload_project(input.files())
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
<p class="text-amber300">{ "NOTE: This relies on the fact, that you have a .dll script configured" }</p>
|
||||||
|
</div>
|
||||||
|
if let Some(collection) = &self.current_collection {
|
||||||
|
<div>
|
||||||
|
<p class="text-2xl mt-2rem">{ "2. Make sure everything looks 👌" }</p>
|
||||||
|
// { Self::show_collection(collection) }
|
||||||
|
{ Self::show_table(collection[0].clone()) }
|
||||||
|
<div class="mt-0.5rem gap-3 flex flex-row items-center">
|
||||||
|
<button class="p-0.5rem btn-white">{ "< Previous" }</button>
|
||||||
|
<div> { 0 } { " / " } { collection.len() } </div>
|
||||||
|
<button class="p-0.5rem btn-white">{ "Next >" }</button>
|
||||||
|
</div>
|
||||||
|
<button class="display-block p-1rem mt-1rem btn-emerald">{ "All good?" }</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="text-2xl mt-2rem">{ "3. Copy & Paste" }</p>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</main>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl App {
|
||||||
|
fn show_collection(collection: &SQLTableCollection) -> Html {
|
||||||
|
collection.tables.iter().map(|table| {
|
||||||
|
html! {
|
||||||
|
<div>
|
||||||
|
{ &table.name }
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}).collect()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn show_table(table: Rc<SQLTable>) -> Html {
|
||||||
|
html!{
|
||||||
|
<SQLTableColumnInfo table={table} />
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn upload_project(files: Option<FileList>) -> Msg {
|
||||||
|
if let Some(files) = files {
|
||||||
|
let file = js_sys::try_iter(&files)
|
||||||
|
.unwrap()
|
||||||
|
.unwrap()
|
||||||
|
.next()
|
||||||
|
.map(|v| web_sys::File::from(v.unwrap()))
|
||||||
|
.map(File::from)
|
||||||
|
.unwrap();
|
||||||
|
Msg::UploadProject(file)
|
||||||
|
} else {
|
||||||
|
Msg::Noop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_current_collection(&mut self, current_collection: Option<SQLTableCollection>) {
|
||||||
|
if let Some(collection) = current_collection {
|
||||||
|
LocalStorage::set(COLLECTION_STORE_KEY, &collection).unwrap();
|
||||||
|
self.current_collection = Some(collection.tables.into_iter().map(Rc::new).collect());
|
||||||
|
} else {
|
||||||
|
LocalStorage::delete(COLLECTION_STORE_KEY);
|
||||||
|
self.current_collection = None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
src/components/mod.rs
Normal file
1
src/components/mod.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
pub mod sql_column_info;
|
64
src/components/sql_column_info.rs
Normal file
64
src/components/sql_column_info.rs
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
use std::rc::Rc;
|
||||||
|
|
||||||
|
use yew::{Properties, html, function_component, Html};
|
||||||
|
|
||||||
|
use crate::magicdraw_parser::SQLTable;
|
||||||
|
|
||||||
|
#[derive(Properties, PartialEq)]
|
||||||
|
pub struct SQLTableColumnInfoProps {
|
||||||
|
pub table: Rc<SQLTable>
|
||||||
|
}
|
||||||
|
|
||||||
|
const CHECK_MARK: &str = "✔️";
|
||||||
|
const CROSS_MARK: &str = "❌";
|
||||||
|
|
||||||
|
fn bool_to_mark(value: bool) -> &'static str {
|
||||||
|
if value { CHECK_MARK } else { CROSS_MARK }
|
||||||
|
}
|
||||||
|
|
||||||
|
#[function_component]
|
||||||
|
pub fn SQLTableColumnInfo(props: &SQLTableColumnInfoProps) -> Html {
|
||||||
|
let table = &props.table;
|
||||||
|
|
||||||
|
let rows = table.columns.iter()
|
||||||
|
.map(|col| {
|
||||||
|
let foreign_key;
|
||||||
|
if let Some((table_name, prop_name)) = &col.foreign_key {
|
||||||
|
foreign_key = format!("{} {}", table_name, prop_name);
|
||||||
|
} else {
|
||||||
|
foreign_key = CROSS_MARK.into();
|
||||||
|
}
|
||||||
|
|
||||||
|
html! {
|
||||||
|
<tr>
|
||||||
|
<td> { &col.name } </td>
|
||||||
|
<td> { &col.sql_type } </td>
|
||||||
|
<td> { bool_to_mark(col.primary_key) } </td>
|
||||||
|
<td> { bool_to_mark(col.nullable) } </td>
|
||||||
|
<td> { foreign_key } </td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
html!{
|
||||||
|
<div
|
||||||
|
class="table-column-info flex-column inline-block"
|
||||||
|
border="solid dark100 0.2rem collapse"
|
||||||
|
>
|
||||||
|
<p class="text-center"> { &table.name } </p>
|
||||||
|
<table
|
||||||
|
border="solid dark100 t-0.2rem collapse"
|
||||||
|
>
|
||||||
|
<tr>
|
||||||
|
<th> { "Column" } </th>
|
||||||
|
<th> { "Type" } </th>
|
||||||
|
<th> { "Primary?" } </th>
|
||||||
|
<th> { "Nullable?" } </th>
|
||||||
|
<th> { "Foreign key?" } </th>
|
||||||
|
</tr>
|
||||||
|
{ for rows }
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
@ -1,12 +1,10 @@
|
|||||||
#![allow(dead_code)]
|
|
||||||
#![allow(unused_variables)]
|
|
||||||
|
|
||||||
mod utils;
|
mod utils;
|
||||||
mod uml_model_parser;
|
mod uml_model_parser;
|
||||||
mod ddl_parser;
|
mod ddl_parser;
|
||||||
mod sql_types_parser;
|
mod sql_types_parser;
|
||||||
|
use serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
use std::{io::{Read, Seek}, collections::HashSet};
|
use std::{io::{Read, Seek}, collections::HashSet, fmt::Display};
|
||||||
use anyhow::{Result, Context};
|
use anyhow::{Result, Context};
|
||||||
use lazy_regex::regex_captures;
|
use lazy_regex::regex_captures;
|
||||||
use zip::ZipArchive;
|
use zip::ZipArchive;
|
||||||
@ -15,7 +13,7 @@ use crate::unwrap_opt_continue;
|
|||||||
|
|
||||||
use self::{uml_model_parser::{parse_uml_model, UMLModel, UMLClass, UMLModifier, UMLNullableModifier, UMLPrimaryKeyModifier, UMLTypeModifier, UMLForeignKeyModifier}, ddl_parser::parse_ddl_scripts, sql_types_parser::{parse_sql_types, SQLTypeName}};
|
use self::{uml_model_parser::{parse_uml_model, UMLModel, UMLClass, UMLModifier, UMLNullableModifier, UMLPrimaryKeyModifier, UMLTypeModifier, UMLForeignKeyModifier}, ddl_parser::parse_ddl_scripts, sql_types_parser::{parse_sql_types, SQLTypeName}};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Deserialize, Serialize)]
|
||||||
pub enum SQLType {
|
pub enum SQLType {
|
||||||
Int,
|
Int,
|
||||||
Decimal,
|
Decimal,
|
||||||
@ -26,31 +24,45 @@ pub enum SQLType {
|
|||||||
Varchar(u16),
|
Varchar(u16),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
impl Display for SQLType {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
match self {
|
||||||
|
SQLType::Int => write!(f, "INT"),
|
||||||
|
SQLType::Decimal => write!(f, "DECIMAL"),
|
||||||
|
SQLType::Date => write!(f, "DATE"),
|
||||||
|
SQLType::Float => write!(f, "FLOAT"),
|
||||||
|
SQLType::Bool => write!(f, "BOOL"),
|
||||||
|
SQLType::Char(size) => write!(f, "CHAR({})", size),
|
||||||
|
SQLType::Varchar(size) => write!(f, "VARCHAR({})", size),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, PartialEq, Deserialize, Serialize)]
|
||||||
pub enum SQLCheckConstraint {
|
pub enum SQLCheckConstraint {
|
||||||
OneOf(Vec<String>),
|
OneOf(Vec<String>),
|
||||||
Freeform(String)
|
Freeform(String)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Deserialize, Serialize)]
|
||||||
pub struct SQLColumn {
|
pub struct SQLColumn {
|
||||||
name: String,
|
pub name: String,
|
||||||
sql_type: SQLType,
|
pub sql_type: SQLType,
|
||||||
primary_key: bool,
|
pub primary_key: bool,
|
||||||
nullable: bool,
|
pub nullable: bool,
|
||||||
foreign_key: Option<(String, String)>,
|
pub foreign_key: Option<(String, String)>,
|
||||||
check_constraint: Option<SQLCheckConstraint>
|
pub check_constraint: Option<SQLCheckConstraint>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Deserialize, Serialize)]
|
||||||
pub struct SQLTable {
|
pub struct SQLTable {
|
||||||
name: String,
|
pub name: String,
|
||||||
columns: Vec<SQLColumn>,
|
pub columns: Vec<SQLColumn>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Deserialize, Serialize)]
|
||||||
pub struct SQLTableCollection {
|
pub struct SQLTableCollection {
|
||||||
tables: Vec<SQLTable>
|
pub tables: Vec<SQLTable>
|
||||||
}
|
}
|
||||||
|
|
||||||
fn find_class_by_id<'a>(models: &'a [UMLModel], id: &str) -> Option<&'a UMLClass> {
|
fn find_class_by_id<'a>(models: &'a [UMLModel], id: &str) -> Option<&'a UMLClass> {
|
||||||
|
35
src/main.rs
35
src/main.rs
@ -1,29 +1,18 @@
|
|||||||
use magicdraw_parser::parse_project;
|
use app::App;
|
||||||
use yew::prelude::*;
|
|
||||||
use std::fs::File;
|
|
||||||
use anyhow::Result;
|
|
||||||
|
|
||||||
mod magicdraw_parser;
|
mod magicdraw_parser;
|
||||||
|
mod app;
|
||||||
|
mod components;
|
||||||
|
|
||||||
// TODO: Make this work with enumation lookup tables
|
// TODO: Make this work with enumation lookup tables
|
||||||
|
// TODO: Dark theme switch button
|
||||||
|
// TODO: Fix double rebuilding when on "trunk server". uno css triggers second build.
|
||||||
|
// TODO: Add simple versioning in frontend for data
|
||||||
|
|
||||||
#[function_component]
|
fn main() {
|
||||||
fn App() -> Html {
|
// let f = File::open("example.mdzip").unwrap();
|
||||||
html! {
|
// let collections = parse_project(f)?;
|
||||||
<main>
|
// dbg!(collections);
|
||||||
<img class="logo" src="https://yew.rs/img/logo.png" alt="Yew logo" />
|
|
||||||
<h1>{ "Hello World!" }</h1>
|
yew::Renderer::<App>::new().render();
|
||||||
<span class="subtitle">{ "from Yew with " }<i class="heart" /></span>
|
|
||||||
</main>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
|
||||||
let f = File::open("example.mdzip").unwrap();
|
|
||||||
|
|
||||||
let collections = parse_project(f)?;
|
|
||||||
dbg!(collections);
|
|
||||||
|
|
||||||
// yew::Renderer::<App>::new().render();
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
0
static/.gitkeep
Normal file
0
static/.gitkeep
Normal file
9
styles.css
Normal file
9
styles.css
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
.table-column-info td,
|
||||||
|
.table-column-info th {
|
||||||
|
padding: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border: 0
|
||||||
|
}
|
19
unocss.config.js
Normal file
19
unocss.config.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { defineConfig, presetUno, presetIcons, presetAttributify } from 'unocss'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
presets: [
|
||||||
|
presetAttributify({
|
||||||
|
}),
|
||||||
|
presetUno(),
|
||||||
|
presetIcons({
|
||||||
|
cdn: 'https://esm.sh/'
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
"btn-base": "rounded-0.5rem b-0.2rem pointer",
|
||||||
|
"btn-white": "btn-base text-dark100 bg-light500 hover-bg-light300 active-bg-light900",
|
||||||
|
"btn-emerald": "btn-base text-light100 bg-emerald600 hover-bg-emerald500 active-bg-emerald700"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user