Compare commits
8 Commits
main
...
invitation
Author | SHA1 | Date |
---|---|---|
Savanni D'Gerinel | 8133ebc8bf | |
Savanni D'Gerinel | deb3415c30 | |
Savanni D'Gerinel | 064b754786 | |
Savanni D'Gerinel | 95a597c8ea | |
Savanni D'Gerinel | 45df1233e5 | |
Savanni D'Gerinel | 2c1c19690f | |
Savanni D'Gerinel | 5d33f62be5 | |
Savanni D'Gerinel | 772d2c01f4 |
|
@ -1,3 +0,0 @@
|
||||||
|
|
||||||
dev:
|
|
||||||
find index.html src/ | entr sh -c 'npm run build'
|
|
|
@ -1,9 +0,0 @@
|
||||||
export function setupCounter(element) {
|
|
||||||
let counter = 0;
|
|
||||||
const setCounter = (count) => {
|
|
||||||
counter = count;
|
|
||||||
element.innerHTML = `count is ${counter}`;
|
|
||||||
};
|
|
||||||
element.addEventListener('click', () => setCounter(counter + 1));
|
|
||||||
setCounter(0);
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
import "./style.css";
|
|
||||||
import * as glimmer from "glimmer";
|
|
||||||
glimmer.init();
|
|
||||||
const content = document.querySelector("#app");
|
|
||||||
if (content) {
|
|
||||||
const card = document.createElement("data-card");
|
|
||||||
content.appendChild(card);
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="app"></div>
|
|
||||||
<script type="module" src="/visions.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,633 +0,0 @@
|
||||||
{
|
|
||||||
"name": "visions",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"lockfileVersion": 2,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"": {
|
|
||||||
"name": "visions",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"dependencies": {
|
|
||||||
"glimmer": "file:../../tools/glimmer/web"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"esbuild": "^0.17.11",
|
|
||||||
"typescript": "^4.9.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"../../tools/glimmer": {},
|
|
||||||
"../../tools/glimmer/web": {
|
|
||||||
"name": "glimmer",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"devDependencies": {
|
|
||||||
"esbuild": "^0.17.11",
|
|
||||||
"typescript": "^4.9.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/android-arm": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-CdyX6sRVh1NzFCsf5vw3kULwlAhfy9wVt8SZlrhQ7eL2qBjGbFhRBWkkAzuZm9IIEOCKJw4DXA6R85g+qc8RDw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"android"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/android-arm64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-QnK4d/zhVTuV4/pRM4HUjcsbl43POALU2zvBynmrrqZt9LPcLA3x1fTZPBg2RRguBQnJcnU059yKr+bydkntjg==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"android"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/android-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-3PL3HKtsDIXGQcSCKtWD/dy+mgc4p2Tvo2qKgKHj9Yf+eniwFnuoQ0OUhlSfAEpKAFzF9N21Nwgnap6zy3L3MQ==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"android"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/darwin-arm64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-pJ950bNKgzhkGNO3Z9TeHzIFtEyC2GDQL3wxkMApDEghYx5Qers84UTNc1bAxWbRkuJOgmOha5V0WUeh8G+YGw==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"darwin"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/darwin-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-iB0dQkIHXyczK3BZtzw1tqegf0F0Ab5texX2TvMQjiJIWXAfM4FQl7D909YfXWnB92OQz4ivBYQ2RlxBJrMJOw==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"darwin"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/freebsd-arm64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-7EFzUADmI1jCHeDRGKgbnF5sDIceZsQGapoO6dmw7r/ZBEKX7CCDnIz8m9yEclzr7mFsd+DyasHzpjfJnmBB1Q==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"freebsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/freebsd-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-iPgenptC8i8pdvkHQvXJFzc1eVMR7W2lBPrTE6GbhR54sLcF42mk3zBOjKPOodezzuAz/KSu8CPyFSjcBMkE9g==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"freebsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-arm": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-M9iK/d4lgZH0U5M1R2p2gqhPV/7JPJcRz+8O8GBKVgqndTzydQ7B2XGDbxtbvFkvIs53uXTobOhv+RyaqhUiMg==",
|
|
||||||
"cpu": [
|
|
||||||
"arm"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-arm64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-Qxth3gsWWGKz2/qG2d5DsW/57SeA2AmpSMhdg9TSB5Svn2KDob3qxfQSkdnWjSd42kqoxIPy3EJFs+6w1+6Qjg==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-ia32": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-dB1nGaVWtUlb/rRDHmuDQhfqazWE0LMro/AIbT2lWM3CDMHJNpLckH+gCddQyhhcLac2OYw69ikUMO34JLt3wA==",
|
|
||||||
"cpu": [
|
|
||||||
"ia32"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-loong64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-aCWlq70Q7Nc9WDnormntGS1ar6ZFvUpqr8gXtO+HRejRYPweAFQN615PcgaSJkZjhHp61+MNLhzyVALSF2/Q0g==",
|
|
||||||
"cpu": [
|
|
||||||
"loong64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-mips64el": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-cGeGNdQxqY8qJwlYH1BP6rjIIiEcrM05H7k3tR7WxOLmD1ZxRMd6/QIOWMb8mD2s2YJFNRuNQ+wjMhgEL2oCEw==",
|
|
||||||
"cpu": [
|
|
||||||
"mips64el"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-ppc64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-BdlziJQPW/bNe0E8eYsHB40mYOluS+jULPCjlWiHzDgr+ZBRXPtgMV1nkLEGdpjrwgmtkZHEGEPaKdS/8faLDA==",
|
|
||||||
"cpu": [
|
|
||||||
"ppc64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-riscv64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-MDLwQbtF+83oJCI1Cixn68Et/ME6gelmhssPebC40RdJaect+IM+l7o/CuG0ZlDs6tZTEIoxUe53H3GmMn8oMA==",
|
|
||||||
"cpu": [
|
|
||||||
"riscv64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-s390x": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-4N5EMESvws0Ozr2J94VoUD8HIRi7X0uvUv4c0wpTHZyZY9qpaaN7THjosdiW56irQ4qnJ6Lsc+i+5zGWnyqWqQ==",
|
|
||||||
"cpu": [
|
|
||||||
"s390x"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/linux-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-rM/v8UlluxpytFSmVdbCe1yyKQd/e+FmIJE2oPJvbBo+D0XVWi1y/NQ4iTNx+436WmDHQBjVLrbnAQLQ6U7wlw==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"linux"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/netbsd-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-4WaAhuz5f91h3/g43VBGdto1Q+X7VEZfpcWGtOFXnggEuLvjV+cP6DyLRU15IjiU9fKLLk41OoJfBFN5DhPvag==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"netbsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/openbsd-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-UBj135Nx4FpnvtE+C8TWGp98oUgBcmNmdYgl5ToKc0mBHxVVqVE7FUS5/ELMImOp205qDAittL6Ezhasc2Ev/w==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"openbsd"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/sunos-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-1/gxTifDC9aXbV2xOfCbOceh5AlIidUrPsMpivgzo8P8zUtczlq1ncFpeN1ZyQJ9lVs2hILy1PG5KPp+w8QPPg==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"sunos"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/win32-arm64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-vtSfyx5yRdpiOW9yp6Ax0zyNOv9HjOAw8WaZg3dF5djEHKKm3UnoohftVvIJtRh0Ec7Hso0RIdTqZvPXJ7FdvQ==",
|
|
||||||
"cpu": [
|
|
||||||
"arm64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/win32-ia32": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-GFPSLEGQr4wHFTiIUJQrnJKZhZjjq4Sphf+mM76nQR6WkQn73vm7IsacmBRPkALfpOCHsopSvLgqdd4iUW2mYw==",
|
|
||||||
"cpu": [
|
|
||||||
"ia32"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@esbuild/win32-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-N9vXqLP3eRL8BqSy8yn4Y98cZI2pZ8fyuHx6lKjiG2WABpT2l01TXdzq5Ma2ZUBzfB7tx5dXVhge8X9u0S70ZQ==",
|
|
||||||
"cpu": [
|
|
||||||
"x64"
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"os": [
|
|
||||||
"win32"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/esbuild": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-pAMImyokbWDtnA/ufPxjQg0fYo2DDuzAlqwnDvbXqHLphe+m80eF++perYKVm8LeTuj2zUuFXC+xgSVxyoHUdg==",
|
|
||||||
"dev": true,
|
|
||||||
"hasInstallScript": true,
|
|
||||||
"bin": {
|
|
||||||
"esbuild": "bin/esbuild"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"@esbuild/android-arm": "0.17.11",
|
|
||||||
"@esbuild/android-arm64": "0.17.11",
|
|
||||||
"@esbuild/android-x64": "0.17.11",
|
|
||||||
"@esbuild/darwin-arm64": "0.17.11",
|
|
||||||
"@esbuild/darwin-x64": "0.17.11",
|
|
||||||
"@esbuild/freebsd-arm64": "0.17.11",
|
|
||||||
"@esbuild/freebsd-x64": "0.17.11",
|
|
||||||
"@esbuild/linux-arm": "0.17.11",
|
|
||||||
"@esbuild/linux-arm64": "0.17.11",
|
|
||||||
"@esbuild/linux-ia32": "0.17.11",
|
|
||||||
"@esbuild/linux-loong64": "0.17.11",
|
|
||||||
"@esbuild/linux-mips64el": "0.17.11",
|
|
||||||
"@esbuild/linux-ppc64": "0.17.11",
|
|
||||||
"@esbuild/linux-riscv64": "0.17.11",
|
|
||||||
"@esbuild/linux-s390x": "0.17.11",
|
|
||||||
"@esbuild/linux-x64": "0.17.11",
|
|
||||||
"@esbuild/netbsd-x64": "0.17.11",
|
|
||||||
"@esbuild/openbsd-x64": "0.17.11",
|
|
||||||
"@esbuild/sunos-x64": "0.17.11",
|
|
||||||
"@esbuild/win32-arm64": "0.17.11",
|
|
||||||
"@esbuild/win32-ia32": "0.17.11",
|
|
||||||
"@esbuild/win32-x64": "0.17.11"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/glimmer": {
|
|
||||||
"resolved": "../../tools/glimmer/web",
|
|
||||||
"link": true
|
|
||||||
},
|
|
||||||
"node_modules/typescript": {
|
|
||||||
"version": "4.9.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
|
||||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
|
||||||
"dev": true,
|
|
||||||
"bin": {
|
|
||||||
"tsc": "bin/tsc",
|
|
||||||
"tsserver": "bin/tsserver"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4.2.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@esbuild/android-arm": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-CdyX6sRVh1NzFCsf5vw3kULwlAhfy9wVt8SZlrhQ7eL2qBjGbFhRBWkkAzuZm9IIEOCKJw4DXA6R85g+qc8RDw==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/android-arm64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-QnK4d/zhVTuV4/pRM4HUjcsbl43POALU2zvBynmrrqZt9LPcLA3x1fTZPBg2RRguBQnJcnU059yKr+bydkntjg==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/android-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-3PL3HKtsDIXGQcSCKtWD/dy+mgc4p2Tvo2qKgKHj9Yf+eniwFnuoQ0OUhlSfAEpKAFzF9N21Nwgnap6zy3L3MQ==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/darwin-arm64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-pJ950bNKgzhkGNO3Z9TeHzIFtEyC2GDQL3wxkMApDEghYx5Qers84UTNc1bAxWbRkuJOgmOha5V0WUeh8G+YGw==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/darwin-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-iB0dQkIHXyczK3BZtzw1tqegf0F0Ab5texX2TvMQjiJIWXAfM4FQl7D909YfXWnB92OQz4ivBYQ2RlxBJrMJOw==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/freebsd-arm64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-7EFzUADmI1jCHeDRGKgbnF5sDIceZsQGapoO6dmw7r/ZBEKX7CCDnIz8m9yEclzr7mFsd+DyasHzpjfJnmBB1Q==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/freebsd-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-iPgenptC8i8pdvkHQvXJFzc1eVMR7W2lBPrTE6GbhR54sLcF42mk3zBOjKPOodezzuAz/KSu8CPyFSjcBMkE9g==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/linux-arm": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-M9iK/d4lgZH0U5M1R2p2gqhPV/7JPJcRz+8O8GBKVgqndTzydQ7B2XGDbxtbvFkvIs53uXTobOhv+RyaqhUiMg==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/linux-arm64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-Qxth3gsWWGKz2/qG2d5DsW/57SeA2AmpSMhdg9TSB5Svn2KDob3qxfQSkdnWjSd42kqoxIPy3EJFs+6w1+6Qjg==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/linux-ia32": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-dB1nGaVWtUlb/rRDHmuDQhfqazWE0LMro/AIbT2lWM3CDMHJNpLckH+gCddQyhhcLac2OYw69ikUMO34JLt3wA==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/linux-loong64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-aCWlq70Q7Nc9WDnormntGS1ar6ZFvUpqr8gXtO+HRejRYPweAFQN615PcgaSJkZjhHp61+MNLhzyVALSF2/Q0g==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/linux-mips64el": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-cGeGNdQxqY8qJwlYH1BP6rjIIiEcrM05H7k3tR7WxOLmD1ZxRMd6/QIOWMb8mD2s2YJFNRuNQ+wjMhgEL2oCEw==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/linux-ppc64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-BdlziJQPW/bNe0E8eYsHB40mYOluS+jULPCjlWiHzDgr+ZBRXPtgMV1nkLEGdpjrwgmtkZHEGEPaKdS/8faLDA==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/linux-riscv64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-MDLwQbtF+83oJCI1Cixn68Et/ME6gelmhssPebC40RdJaect+IM+l7o/CuG0ZlDs6tZTEIoxUe53H3GmMn8oMA==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/linux-s390x": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-4N5EMESvws0Ozr2J94VoUD8HIRi7X0uvUv4c0wpTHZyZY9qpaaN7THjosdiW56irQ4qnJ6Lsc+i+5zGWnyqWqQ==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/linux-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-rM/v8UlluxpytFSmVdbCe1yyKQd/e+FmIJE2oPJvbBo+D0XVWi1y/NQ4iTNx+436WmDHQBjVLrbnAQLQ6U7wlw==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/netbsd-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-4WaAhuz5f91h3/g43VBGdto1Q+X7VEZfpcWGtOFXnggEuLvjV+cP6DyLRU15IjiU9fKLLk41OoJfBFN5DhPvag==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/openbsd-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-UBj135Nx4FpnvtE+C8TWGp98oUgBcmNmdYgl5ToKc0mBHxVVqVE7FUS5/ELMImOp205qDAittL6Ezhasc2Ev/w==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/sunos-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-1/gxTifDC9aXbV2xOfCbOceh5AlIidUrPsMpivgzo8P8zUtczlq1ncFpeN1ZyQJ9lVs2hILy1PG5KPp+w8QPPg==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/win32-arm64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-vtSfyx5yRdpiOW9yp6Ax0zyNOv9HjOAw8WaZg3dF5djEHKKm3UnoohftVvIJtRh0Ec7Hso0RIdTqZvPXJ7FdvQ==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/win32-ia32": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-GFPSLEGQr4wHFTiIUJQrnJKZhZjjq4Sphf+mM76nQR6WkQn73vm7IsacmBRPkALfpOCHsopSvLgqdd4iUW2mYw==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@esbuild/win32-x64": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-N9vXqLP3eRL8BqSy8yn4Y98cZI2pZ8fyuHx6lKjiG2WABpT2l01TXdzq5Ma2ZUBzfB7tx5dXVhge8X9u0S70ZQ==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"esbuild": {
|
|
||||||
"version": "0.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.11.tgz",
|
|
||||||
"integrity": "sha512-pAMImyokbWDtnA/ufPxjQg0fYo2DDuzAlqwnDvbXqHLphe+m80eF++perYKVm8LeTuj2zUuFXC+xgSVxyoHUdg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@esbuild/android-arm": "0.17.11",
|
|
||||||
"@esbuild/android-arm64": "0.17.11",
|
|
||||||
"@esbuild/android-x64": "0.17.11",
|
|
||||||
"@esbuild/darwin-arm64": "0.17.11",
|
|
||||||
"@esbuild/darwin-x64": "0.17.11",
|
|
||||||
"@esbuild/freebsd-arm64": "0.17.11",
|
|
||||||
"@esbuild/freebsd-x64": "0.17.11",
|
|
||||||
"@esbuild/linux-arm": "0.17.11",
|
|
||||||
"@esbuild/linux-arm64": "0.17.11",
|
|
||||||
"@esbuild/linux-ia32": "0.17.11",
|
|
||||||
"@esbuild/linux-loong64": "0.17.11",
|
|
||||||
"@esbuild/linux-mips64el": "0.17.11",
|
|
||||||
"@esbuild/linux-ppc64": "0.17.11",
|
|
||||||
"@esbuild/linux-riscv64": "0.17.11",
|
|
||||||
"@esbuild/linux-s390x": "0.17.11",
|
|
||||||
"@esbuild/linux-x64": "0.17.11",
|
|
||||||
"@esbuild/netbsd-x64": "0.17.11",
|
|
||||||
"@esbuild/openbsd-x64": "0.17.11",
|
|
||||||
"@esbuild/sunos-x64": "0.17.11",
|
|
||||||
"@esbuild/win32-arm64": "0.17.11",
|
|
||||||
"@esbuild/win32-ia32": "0.17.11",
|
|
||||||
"@esbuild/win32-x64": "0.17.11"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"glimmer": {
|
|
||||||
"version": "file:../../tools/glimmer/web",
|
|
||||||
"requires": {
|
|
||||||
"esbuild": "^0.17.11",
|
|
||||||
"typescript": "^4.9.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"typescript": {
|
|
||||||
"version": "4.9.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
|
||||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
"name": "visions",
|
|
||||||
"private": true,
|
|
||||||
"version": "0.0.0",
|
|
||||||
"main": "dist/visions",
|
|
||||||
"scripts": {
|
|
||||||
"build": "tsc && esbuild --bundle src/main.ts --outfile=dist/visions.js && cp index.html dist/index.html"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"glimmer": "file:../../tools/glimmer/web"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"esbuild": "^0.17.11",
|
|
||||||
"typescript": "^4.9.3"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
export function setupCounter(element: HTMLButtonElement) {
|
|
||||||
let counter = 0
|
|
||||||
const setCounter = (count: number) => {
|
|
||||||
counter = count
|
|
||||||
element.innerHTML = `count is ${counter}`
|
|
||||||
}
|
|
||||||
element.addEventListener('click', () => setCounter(counter + 1))
|
|
||||||
setCounter(0)
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
import "./style.css";
|
|
||||||
import * as glimmer from "glimmer";
|
|
||||||
|
|
||||||
glimmer.init();
|
|
||||||
const content = document.querySelector("#app");
|
|
||||||
if (content) {
|
|
||||||
const card: glimmer.DataCard = document.createElement("data-card");
|
|
||||||
content.appendChild(card);
|
|
||||||
}
|
|
|
@ -1,97 +0,0 @@
|
||||||
:root {
|
|
||||||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
||||||
line-height: 1.5;
|
|
||||||
font-weight: 400;
|
|
||||||
|
|
||||||
color-scheme: light dark;
|
|
||||||
color: rgba(255, 255, 255, 0.87);
|
|
||||||
background-color: #242424;
|
|
||||||
|
|
||||||
font-synthesis: none;
|
|
||||||
text-rendering: optimizeLegibility;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
-webkit-text-size-adjust: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
font-weight: 500;
|
|
||||||
color: #646cff;
|
|
||||||
text-decoration: inherit;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #535bf2;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
display: flex;
|
|
||||||
place-items: center;
|
|
||||||
min-width: 320px;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 3.2em;
|
|
||||||
line-height: 1.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#app {
|
|
||||||
max-width: 1280px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 2rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
height: 6em;
|
|
||||||
padding: 1.5em;
|
|
||||||
will-change: filter;
|
|
||||||
transition: filter 300ms;
|
|
||||||
}
|
|
||||||
.logo:hover {
|
|
||||||
filter: drop-shadow(0 0 2em #646cffaa);
|
|
||||||
}
|
|
||||||
.logo.vanilla:hover {
|
|
||||||
filter: drop-shadow(0 0 2em #3178c6aa);
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
padding: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.read-the-docs {
|
|
||||||
color: #888;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
padding: 0.6em 1.2em;
|
|
||||||
font-size: 1em;
|
|
||||||
font-weight: 500;
|
|
||||||
font-family: inherit;
|
|
||||||
background-color: #1a1a1a;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: border-color 0.25s;
|
|
||||||
}
|
|
||||||
button:hover {
|
|
||||||
border-color: #646cff;
|
|
||||||
}
|
|
||||||
button:focus,
|
|
||||||
button:focus-visible {
|
|
||||||
outline: 4px auto -webkit-focus-ring-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
|
||||||
:root {
|
|
||||||
color: #213547;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #747bff;
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="#007ACC" d="M0 128v128h256V0H0z"></path><path fill="#FFF" d="m56.612 128.85l-.081 10.483h33.32v94.68h23.568v-94.68h33.321v-10.28c0-5.69-.122-10.444-.284-10.566c-.122-.162-20.4-.244-44.983-.203l-44.74.122l-.121 10.443Zm149.955-10.742c6.501 1.625 11.459 4.51 16.01 9.224c2.357 2.52 5.851 7.111 6.136 8.208c.08.325-11.053 7.802-17.798 11.988c-.244.162-1.22-.894-2.317-2.52c-3.291-4.795-6.745-6.867-12.028-7.233c-7.76-.528-12.759 3.535-12.718 10.321c0 1.992.284 3.17 1.097 4.795c1.707 3.536 4.876 5.649 14.832 9.956c18.326 7.883 26.168 13.084 31.045 20.48c5.445 8.249 6.664 21.415 2.966 31.208c-4.063 10.646-14.14 17.879-28.323 20.276c-4.388.772-14.79.65-19.504-.203c-10.28-1.828-20.033-6.908-26.047-13.572c-2.357-2.6-6.949-9.387-6.664-9.874c.122-.163 1.178-.813 2.356-1.504c1.138-.65 5.446-3.129 9.509-5.485l7.355-4.267l1.544 2.276c2.154 3.29 6.867 7.801 9.712 9.305c8.167 4.307 19.383 3.698 24.909-1.26c2.357-2.153 3.332-4.388 3.332-7.68c0-2.966-.366-4.266-1.91-6.501c-1.99-2.845-6.054-5.242-17.595-10.24c-13.206-5.69-18.895-9.224-24.096-14.832c-3.007-3.25-5.852-8.452-7.03-12.8c-.975-3.617-1.22-12.678-.447-16.335c2.723-12.76 12.353-21.659 26.25-24.3c4.51-.853 14.994-.528 19.424.569Z"></path></svg>
|
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "ESNext",
|
|
||||||
"useDefineForClassFields": true,
|
|
||||||
"module": "ESNext",
|
|
||||||
"lib": ["ESNext", "DOM"],
|
|
||||||
"moduleResolution": "Node",
|
|
||||||
"strict": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"noUnusedLocals": true,
|
|
||||||
"noUnusedParameters": true,
|
|
||||||
"noImplicitReturns": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"outDir": "build/"
|
|
||||||
},
|
|
||||||
"include": ["src"]
|
|
||||||
}
|
|
|
@ -6,6 +6,7 @@ edition = "2018"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
rusqlite = { version = "0.26" }
|
||||||
serde = { version = "1" }
|
serde = { version = "1" }
|
||||||
serde_derive = { version = "1" }
|
serde_derive = { version = "1" }
|
||||||
thiserror = { version = "1" }
|
thiserror = { version = "1" }
|
||||||
|
|
|
@ -5,6 +5,8 @@ use thiserror::Error;
|
||||||
/// down and that the administrator fix a problem.
|
/// down and that the administrator fix a problem.
|
||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Error)]
|
||||||
pub enum FatalError {
|
pub enum FatalError {
|
||||||
|
#[error("database is inconsistent")]
|
||||||
|
DatabaseInconsistency,
|
||||||
#[error("disk is full")]
|
#[error("disk is full")]
|
||||||
DiskFull,
|
DiskFull,
|
||||||
#[error("io error: {0}")]
|
#[error("io error: {0}")]
|
||||||
|
@ -24,8 +26,3 @@ pub fn error<A, E>(err: E) -> AppResult<A, E> {
|
||||||
pub fn fatal<A, E>(err: FatalError) -> AppResult<A, E> {
|
pub fn fatal<A, E>(err: FatalError) -> AppResult<A, E> {
|
||||||
Err(err)
|
Err(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
pub fn maybe_fail<E>(possible_errors: Vec<E>) -> AppResult<(), E> {
|
|
||||||
ok(())
|
|
||||||
}
|
|
|
@ -1,4 +1,5 @@
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate serde_derive;
|
extern crate serde_derive;
|
||||||
|
|
||||||
|
pub mod errors;
|
||||||
pub mod types;
|
pub mod types;
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
mod character;
|
use rusqlite::types::{FromSql, FromSqlError, FromSqlResult, ValueRef};
|
||||||
|
use std::{convert::Infallible, str::FromStr};
|
||||||
|
use thiserror::Error;
|
||||||
|
|
||||||
|
mod character;
|
||||||
pub use character::CharacterSheet;
|
pub use character::CharacterSheet;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
|
@ -12,3 +15,145 @@ pub struct Roll {
|
||||||
dice: Vec<Die>,
|
dice: Vec<Die>,
|
||||||
modifier: i8,
|
modifier: i8,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Error, PartialEq)]
|
||||||
|
pub enum AuthenticationError {
|
||||||
|
#[error("username already exists")]
|
||||||
|
DuplicateUsername,
|
||||||
|
#[error("invitation is not valid")]
|
||||||
|
InvalidInvitation,
|
||||||
|
#[error("session token not found")]
|
||||||
|
InvalidSession,
|
||||||
|
#[error("user not found")]
|
||||||
|
UserNotFound,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
|
pub struct SessionToken(String);
|
||||||
|
|
||||||
|
impl From<&str> for SessionToken {
|
||||||
|
fn from(s: &str) -> Self {
|
||||||
|
SessionToken(s.to_owned())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromStr for SessionToken {
|
||||||
|
type Err = Infallible;
|
||||||
|
|
||||||
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
|
Ok(SessionToken(s.to_owned()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<SessionToken> for String {
|
||||||
|
fn from(s: SessionToken) -> Self {
|
||||||
|
s.0.clone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
|
pub struct Invitation(String);
|
||||||
|
|
||||||
|
impl From<&str> for Invitation {
|
||||||
|
fn from(s: &str) -> Self {
|
||||||
|
Invitation(s.to_owned())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromStr for Invitation {
|
||||||
|
type Err = Infallible;
|
||||||
|
|
||||||
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
|
Ok(Invitation(s.to_owned()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<Invitation> for String {
|
||||||
|
fn from(s: Invitation) -> Self {
|
||||||
|
s.0.clone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
|
pub struct UserId(String);
|
||||||
|
|
||||||
|
impl From<&str> for UserId {
|
||||||
|
fn from(s: &str) -> Self {
|
||||||
|
UserId(s.to_owned())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromStr for UserId {
|
||||||
|
type Err = Infallible;
|
||||||
|
|
||||||
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
|
Ok(UserId(s.to_owned()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<UserId> for String {
|
||||||
|
fn from(s: UserId) -> Self {
|
||||||
|
s.0.clone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromSql for UserId {
|
||||||
|
fn column_result(val: ValueRef<'_>) -> FromSqlResult<Self> {
|
||||||
|
match val {
|
||||||
|
ValueRef::Text(t) => Ok(UserId::from(
|
||||||
|
String::from_utf8(Vec::from(t)).unwrap().as_ref(),
|
||||||
|
)),
|
||||||
|
_ => Err(FromSqlError::InvalidType),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||||
|
pub struct Username(String);
|
||||||
|
|
||||||
|
impl From<&str> for Username {
|
||||||
|
fn from(s: &str) -> Self {
|
||||||
|
Username(s.to_owned())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromStr for Username {
|
||||||
|
type Err = Infallible;
|
||||||
|
|
||||||
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
|
Ok(Username(s.to_owned()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<&Username> for String {
|
||||||
|
fn from(s: &Username) -> Self {
|
||||||
|
s.0.clone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<Username> for String {
|
||||||
|
fn from(s: Username) -> Self {
|
||||||
|
s.0.clone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromSql for Username {
|
||||||
|
fn column_result(val: ValueRef<'_>) -> FromSqlResult<Self> {
|
||||||
|
match val {
|
||||||
|
ValueRef::Text(t) => Ok(Username::from(
|
||||||
|
String::from_utf8(Vec::from(t)).unwrap().as_ref(),
|
||||||
|
)),
|
||||||
|
_ => Err(FromSqlError::InvalidType),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize, Serialize)]
|
||||||
|
pub struct AuthenticateParams {
|
||||||
|
pub invitation: Invitation,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize, Serialize)]
|
||||||
|
pub struct AuthenticateResponse {
|
||||||
|
pub session_token: SessionToken,
|
||||||
|
}
|
||||||
|
|
14
flake.lock
|
@ -33,11 +33,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_22_05": {
|
"nixpkgs_22_05": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672580127,
|
"lastModified": 1668766498,
|
||||||
"narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=",
|
"narHash": "sha256-UjZlIrbHGlL3H3HZNPTxPSwJfr49jIfbPWCYxk0EQm4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0874168639713f547c05947c76124f78441ea46c",
|
"rev": "f42a45c015f28ac3beeb0df360e50cdbf495d44b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -48,11 +48,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_unstable": {
|
"nixpkgs_unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678470307,
|
"lastModified": 1668765800,
|
||||||
"narHash": "sha256-OEeMUr3ueLIXyW/OaFUX5jUdimyQwMg/7e+/Q0gC/QE=",
|
"narHash": "sha256-rC40+/W6Hio7b/RsY8SvQPKNx4WqNcTgfYv8cUMAvJk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0c4800d579af4ed98ecc47d464a5e7b0870c4b1f",
|
"rev": "52b2ac8ae18bbad4374ff0dd5aeee0fdf1aea739",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-MnFqHP7AwvjK3VLRmDnzbJWSL8lbDrmYESjQDaRmAVo=",
|
"narHash": "sha256-F2ro05D6tGMwSaOYeIediJq6X0ATD7JgWEG2TgOs9Wo=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
|
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,13 +25,16 @@
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
name = "visions-vtt-shell";
|
name = "visions-vtt-shell";
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
pkgs.gtk3
|
||||||
|
pkgs.libappindicator
|
||||||
pkgs.nodejs
|
pkgs.nodejs
|
||||||
pkgs.openssl
|
pkgs.openssl
|
||||||
pkgs.pkg-config
|
pkgs.pkg-config
|
||||||
pkgs.sqlite
|
pkgs.sqlite
|
||||||
|
pkgs.webkitgtk
|
||||||
pkgs.vite
|
pkgs.vite
|
||||||
pkgs_unstable.typeshare
|
pkgs.dbus
|
||||||
pkgs.entr
|
pkgs_unstable.cargo-tauri
|
||||||
rust
|
rust
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
[package]
|
||||||
|
name = "datasphere-gtk"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
gdk = "*"
|
||||||
|
gio = { version = "0.14", features = ["v2_62"] }
|
||||||
|
glib = "0.14"
|
||||||
|
gtk-sys = "*"
|
||||||
|
gtk = { version = "0.14", features = ["v3_24"] }
|
||||||
|
gtk-clib = { path = "../../gtk-clib/" }
|
||||||
|
thiserror = "1.0.20"
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
use crate::elementoj::RolulPaĝo;
|
||||||
|
use glib::{Receiver, Sender};
|
||||||
|
use gtk::prelude::*;
|
||||||
|
use gtk_clib::Elemento;
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
pub enum Ago {}
|
||||||
|
|
||||||
|
pub struct Aplikaĵo {
|
||||||
|
sendilo: Sender<Ago>,
|
||||||
|
recivilo: Receiver<Ago>,
|
||||||
|
evoluiga: bool,
|
||||||
|
|
||||||
|
vintro: gtk::ApplicationWindow,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Aplikaĵo {
|
||||||
|
pub fn kreu(
|
||||||
|
app: >k::Application,
|
||||||
|
sendilo: Sender<Ago>,
|
||||||
|
recivilo: Receiver<Ago>,
|
||||||
|
evoluiga: bool,
|
||||||
|
) -> Self {
|
||||||
|
let vintro = gtk::ApplicationWindow::builder()
|
||||||
|
.application(app)
|
||||||
|
.title("Datasphere Kliento")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let paĝo = RolulPaĝo::kreu();
|
||||||
|
paĝo.show();
|
||||||
|
|
||||||
|
vintro.add(&paĝo.fenestraĵo());
|
||||||
|
vintro.show();
|
||||||
|
paĝo.show();
|
||||||
|
|
||||||
|
Self {
|
||||||
|
sendilo,
|
||||||
|
recivilo,
|
||||||
|
evoluiga,
|
||||||
|
vintro,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
use gtk::{self, prelude::*};
|
||||||
|
use gtk_clib::{Elemento, TekstEnigo};
|
||||||
|
|
||||||
|
pub struct RolulPaĝo {
|
||||||
|
fenestraĵo: gtk::Box,
|
||||||
|
tekst_enigo: TekstEnigo,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RolulPaĝo {
|
||||||
|
pub fn kreu() -> Self {
|
||||||
|
let fenestraĵo = gtk::Box::new(gtk::Orientation::Vertical, 0);
|
||||||
|
|
||||||
|
let tekst_enigo = TekstEnigo::kreu::<String>(
|
||||||
|
None,
|
||||||
|
Box::new(|_| String::from("")),
|
||||||
|
Box::new(|v| Ok(Some(v.to_string()))),
|
||||||
|
Box::new(|_| {}),
|
||||||
|
);
|
||||||
|
fenestraĵo.pack_start(&tekst_enigo.fenestraĵo(), false, false, 0);
|
||||||
|
|
||||||
|
Self {
|
||||||
|
fenestraĵo,
|
||||||
|
tekst_enigo,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn show(&self) {
|
||||||
|
self.fenestraĵo.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Elemento for RolulPaĝo {
|
||||||
|
fn fenestraĵo(&self) -> gtk::Widget {
|
||||||
|
self.fenestraĵo.clone().upcast::<gtk::Widget>()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn montru(&self) {}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
// use gtk_clib::TekstEntro;
|
||||||
|
mod aplikajxo;
|
||||||
|
mod elementoj;
|
||||||
|
|
||||||
|
use aplikajxo::Aplikaĵo;
|
||||||
|
use gtk::{self, prelude::*};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let evoluiga = std::env::var("EVO").map_or_else(|_| false, |_| true);
|
||||||
|
let aplikaĵo = gtk::Application::new(
|
||||||
|
Some("com.luminescent-dreams.datasphere"),
|
||||||
|
Default::default(),
|
||||||
|
);
|
||||||
|
aplikaĵo.connect_activate(move |gtk_app| {
|
||||||
|
let (tx, rx) = glib::MainContext::channel(glib::PRIORITY_DEFAULT);
|
||||||
|
|
||||||
|
Aplikaĵo::kreu(gtk_app, tx, rx, evoluiga);
|
||||||
|
});
|
||||||
|
|
||||||
|
aplikaĵo.run();
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/node_modules
|
||||||
|
/.pnp
|
||||||
|
.pnp.js
|
||||||
|
|
||||||
|
# testing
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
|
@ -0,0 +1,16 @@
|
||||||
|
module.exports = {
|
||||||
|
"stories": [
|
||||||
|
"../src/**/*.stories.mdx",
|
||||||
|
"../src/**/*.stories.@(js|jsx|ts|tsx)"
|
||||||
|
],
|
||||||
|
"addons": [
|
||||||
|
"@storybook/addon-links",
|
||||||
|
"@storybook/addon-essentials",
|
||||||
|
"@storybook/addon-interactions",
|
||||||
|
"@storybook/preset-create-react-app"
|
||||||
|
],
|
||||||
|
"framework": "@storybook/react",
|
||||||
|
"core": {
|
||||||
|
"builder": "@storybook/builder-webpack5"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
export const parameters = {
|
||||||
|
actions: { argTypesRegex: "^on[A-Z].*" },
|
||||||
|
controls: {
|
||||||
|
matchers: {
|
||||||
|
color: /(background|color)$/i,
|
||||||
|
date: /Date$/,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
# Getting Started with Create React App
|
||||||
|
|
||||||
|
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||||
|
|
||||||
|
## Available Scripts
|
||||||
|
|
||||||
|
In the project directory, you can run:
|
||||||
|
|
||||||
|
### `npm start`
|
||||||
|
|
||||||
|
Runs the app in the development mode.\
|
||||||
|
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||||
|
|
||||||
|
The page will reload if you make edits.\
|
||||||
|
You will also see any lint errors in the console.
|
||||||
|
|
||||||
|
### `npm test`
|
||||||
|
|
||||||
|
Launches the test runner in the interactive watch mode.\
|
||||||
|
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||||
|
|
||||||
|
### `npm run build`
|
||||||
|
|
||||||
|
Builds the app for production to the `build` folder.\
|
||||||
|
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||||
|
|
||||||
|
The build is minified and the filenames include the hashes.\
|
||||||
|
Your app is ready to be deployed!
|
||||||
|
|
||||||
|
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||||
|
|
||||||
|
### `npm run eject`
|
||||||
|
|
||||||
|
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||||
|
|
||||||
|
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||||
|
|
||||||
|
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||||
|
|
||||||
|
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||||
|
|
||||||
|
## Learn More
|
||||||
|
|
||||||
|
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||||
|
|
||||||
|
To learn React, check out the [React documentation](https://reactjs.org/).
|
|
@ -0,0 +1,74 @@
|
||||||
|
{
|
||||||
|
"name": "kampanja-kontrolado",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@tauri-apps/api": "^1.0.0-rc.3",
|
||||||
|
"@testing-library/jest-dom": "^5.16.3",
|
||||||
|
"@testing-library/react": "^12.1.4",
|
||||||
|
"@testing-library/user-event": "^13.5.0",
|
||||||
|
"@types/jest": "^27.4.1",
|
||||||
|
"@types/node": "^16.11.26",
|
||||||
|
"@types/react": "^17.0.43",
|
||||||
|
"@types/react-dom": "^17.0.14",
|
||||||
|
"react": "^18.0.0",
|
||||||
|
"react-dom": "^18.0.0",
|
||||||
|
"react-scripts": "5.0.0",
|
||||||
|
"styled-components": "^5.3.5",
|
||||||
|
"typescript": "^4.6.3",
|
||||||
|
"web-vitals": "^2.1.4"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "cross-env BROWSER=none react-scripts start",
|
||||||
|
"build": "react-scripts build",
|
||||||
|
"test": "react-scripts test",
|
||||||
|
"eject": "react-scripts eject",
|
||||||
|
"tauri": "tauri",
|
||||||
|
"storybook": "start-storybook -p 6006 -s public",
|
||||||
|
"build-storybook": "build-storybook -s public"
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"extends": [
|
||||||
|
"react-app",
|
||||||
|
"react-app/jest"
|
||||||
|
],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"**/*.stories.*"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"import/no-anonymous-default-export": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"browserslist": {
|
||||||
|
"production": [
|
||||||
|
">0.2%",
|
||||||
|
"not dead",
|
||||||
|
"not op_mini all"
|
||||||
|
],
|
||||||
|
"development": [
|
||||||
|
"last 1 chrome version",
|
||||||
|
"last 1 firefox version",
|
||||||
|
"last 1 safari version"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@storybook/addon-actions": "^6.4.20",
|
||||||
|
"@storybook/addon-essentials": "^6.4.20",
|
||||||
|
"@storybook/addon-interactions": "^6.4.20",
|
||||||
|
"@storybook/addon-links": "^6.4.20",
|
||||||
|
"@storybook/builder-webpack5": "^6.4.20",
|
||||||
|
"@storybook/manager-webpack5": "^6.4.20",
|
||||||
|
"@storybook/node-logger": "^6.4.20",
|
||||||
|
"@storybook/preset-create-react-app": "^4.1.0",
|
||||||
|
"@storybook/react": "^6.4.20",
|
||||||
|
"@storybook/testing-library": "0.0.9",
|
||||||
|
"@tauri-apps/cli": "^1.0.0-rc.8",
|
||||||
|
"@types/styled-components": "^5.1.24",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
|
"webpack": "^5.71.0"
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 3.8 KiB |
|
@ -0,0 +1,43 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="theme-color" content="#000000" />
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="Web site created using create-react-app"
|
||||||
|
/>
|
||||||
|
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||||
|
<!--
|
||||||
|
manifest.json provides metadata used when your web app is installed on a
|
||||||
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
|
-->
|
||||||
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||||
|
<!--
|
||||||
|
Notice the use of %PUBLIC_URL% in the tags above.
|
||||||
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
|
Only files inside the `public` folder can be referenced from the HTML.
|
||||||
|
|
||||||
|
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||||
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
|
-->
|
||||||
|
<title>React App</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
<!--
|
||||||
|
This HTML file is a template.
|
||||||
|
If you open it directly in the browser, you will see an empty page.
|
||||||
|
|
||||||
|
You can add webfonts, meta tags, or analytics to this file.
|
||||||
|
The build step will place the bundled scripts into the <body> tag.
|
||||||
|
|
||||||
|
To begin the development, run `npm start` or `yarn start`.
|
||||||
|
To create a production bundle, use `npm run build` or `yarn build`.
|
||||||
|
-->
|
||||||
|
</body>
|
||||||
|
</html>
|
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 9.4 KiB |
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"short_name": "React App",
|
||||||
|
"name": "Create React App Sample",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "favicon.ico",
|
||||||
|
"sizes": "64x64 32x32 24x24 16x16",
|
||||||
|
"type": "image/x-icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo192.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "192x192"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo512.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "512x512"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": ".",
|
||||||
|
"display": "standalone",
|
||||||
|
"theme_color": "#000000",
|
||||||
|
"background_color": "#ffffff"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
# https://www.robotstxt.org/robotstxt.html
|
||||||
|
User-agent: *
|
||||||
|
Disallow:
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Generated by Cargo
|
||||||
|
# will have compiled files and executables
|
||||||
|
/target/
|
||||||
|
WixTools
|
|
@ -12,12 +12,12 @@ rust-version = "1.57"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { version = "1.0.4", features = [] }
|
tauri-build = { version = "1.0.0-rc.5", features = [] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { version = "1.0.5", features = ["api-all"] }
|
tauri = { version = "1.0.0-rc.5", features = ["api-all"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# by default Tauri runs in production mode
|
# by default Tauri runs in production mode
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 974 B After Width: | Height: | Size: 974 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 903 B After Width: | Height: | Size: 903 B |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
"package": {
|
||||||
|
"productName": "kampanja-kontrolado",
|
||||||
|
"version": "0.1.0"
|
||||||
|
},
|
||||||
|
"build": {
|
||||||
|
"distDir": "../build",
|
||||||
|
"devPath": "http://localhost:3000",
|
||||||
|
"beforeDevCommand": "npm run start",
|
||||||
|
"beforeBuildCommand": "npm run build"
|
||||||
|
},
|
||||||
|
"tauri": {
|
||||||
|
"bundle": {
|
||||||
|
"active": true,
|
||||||
|
"targets": "all",
|
||||||
|
"identifier": "com.tauri.dev",
|
||||||
|
"icon": [
|
||||||
|
"icons/32x32.png",
|
||||||
|
"icons/128x128.png",
|
||||||
|
"icons/128x128@2x.png",
|
||||||
|
"icons/icon.icns",
|
||||||
|
"icons/icon.ico"
|
||||||
|
],
|
||||||
|
"resources": [],
|
||||||
|
"externalBin": [],
|
||||||
|
"copyright": "",
|
||||||
|
"category": "DeveloperTool",
|
||||||
|
"shortDescription": "",
|
||||||
|
"longDescription": "",
|
||||||
|
"deb": {
|
||||||
|
"depends": [],
|
||||||
|
"useBootstrapper": false
|
||||||
|
},
|
||||||
|
"macOS": {
|
||||||
|
"frameworks": [],
|
||||||
|
"useBootstrapper": false,
|
||||||
|
"exceptionDomain": "",
|
||||||
|
"signingIdentity": null,
|
||||||
|
"providerShortName": null,
|
||||||
|
"entitlements": null
|
||||||
|
},
|
||||||
|
"windows": {
|
||||||
|
"certificateThumbprint": null,
|
||||||
|
"digestAlgorithm": "sha256",
|
||||||
|
"timestampUrl": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"active": false
|
||||||
|
},
|
||||||
|
"allowlist": {
|
||||||
|
"all": true
|
||||||
|
},
|
||||||
|
"windows": [
|
||||||
|
{
|
||||||
|
"title": "Kampanja Kontrolado",
|
||||||
|
"width": 800,
|
||||||
|
"height": 600,
|
||||||
|
"resizable": true,
|
||||||
|
"fullscreen": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"security": {
|
||||||
|
"csp": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
import React, { createContext, useState } from "react"
|
||||||
|
import ReactDOM from "react-dom"
|
||||||
|
import { BrowserRouter, Route, Routes, useParams } from "react-router-dom"
|
||||||
|
import styled from "styled-components"
|
||||||
|
|
||||||
|
import AppProvider from "./appContext"
|
||||||
|
import Menu from "./components/Menu"
|
||||||
|
import PlayerListView from "./views/PlayerListView"
|
||||||
|
|
||||||
|
const Columns = styled.div`
|
||||||
|
display: flex;
|
||||||
|
padding: 1em;
|
||||||
|
`
|
||||||
|
|
||||||
|
const Column = styled.div`
|
||||||
|
width: 50%;
|
||||||
|
`
|
||||||
|
|
||||||
|
const render = () => (<AppProvider>
|
||||||
|
<h1>Numenera Datasphere</h1>
|
||||||
|
<Columns>
|
||||||
|
<Column>
|
||||||
|
<Menu />
|
||||||
|
</Column>
|
||||||
|
<Column>
|
||||||
|
<Routes>
|
||||||
|
<Route path="/" element={<div>root</div>} />
|
||||||
|
<Route path="campaign" element={<div>campaign</div>} />
|
||||||
|
<Route path="players" element={<PlayerListView />}>
|
||||||
|
<Route path=":name" element={<PlayerListView />} />
|
||||||
|
</Route>
|
||||||
|
<Route path="cyphers" element={<div>cyphers</div>} />
|
||||||
|
<Route path="battles" element={<div>battles</div>} />
|
||||||
|
</Routes>
|
||||||
|
</Column>
|
||||||
|
</Columns>
|
||||||
|
</AppProvider>
|
||||||
|
)
|
||||||
|
|
||||||
|
export default render
|
|
@ -0,0 +1,28 @@
|
||||||
|
import React, { ReactNode } from "react";
|
||||||
|
|
||||||
|
import { PlayerCharacter } from "./types"
|
||||||
|
|
||||||
|
export type AppState = {
|
||||||
|
playerCharacters: { [name: string]: PlayerCharacter };
|
||||||
|
}
|
||||||
|
|
||||||
|
export const AppContext = React.createContext<{ state: AppState }>({state: {
|
||||||
|
playerCharacters: {}
|
||||||
|
}})
|
||||||
|
|
||||||
|
const AppProvider = ({ children }: { children: ReactNode }) => {
|
||||||
|
const [state, setState] = React.useState<AppState>({playerCharacters: {
|
||||||
|
"priat": {
|
||||||
|
name: "Priat",
|
||||||
|
concept: "An Intuitive Jack who Explores Yesterday",
|
||||||
|
effort: 1,
|
||||||
|
cypherLimit: 2,
|
||||||
|
might: { value: 12, max: 12, edge: 0 },
|
||||||
|
speed: { value: 14, max: 14, edge: 0 },
|
||||||
|
intellect: { value: 12, max: 12, edge: 1 },
|
||||||
|
}}})
|
||||||
|
|
||||||
|
return (<AppContext.Provider value={{state}}>{children}</AppContext.Provider>)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AppProvider
|
|
@ -0,0 +1,14 @@
|
||||||
|
import React from "react"
|
||||||
|
import { Link } from "react-router-dom"
|
||||||
|
|
||||||
|
const MainMenu = () => (<nav>
|
||||||
|
<ul className="menu">
|
||||||
|
<li> <Link to="/campaign">Campaign Settings</Link> </li>
|
||||||
|
<li> <Link to="/players">Player Characters</Link> </li>
|
||||||
|
<li> <Link to="/cyphers">Cyphers and Artifacts</Link> </li>
|
||||||
|
<li> <Link to="/battles">Battles</Link> </li>
|
||||||
|
</ul>
|
||||||
|
</nav>)
|
||||||
|
|
||||||
|
export default MainMenu
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
.menu {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import React from "react"
|
||||||
|
import ReactDOM from "react-dom"
|
||||||
|
import styled from "styled-components"
|
||||||
|
|
||||||
|
interface StatPoolProps {
|
||||||
|
name: string;
|
||||||
|
value: number;
|
||||||
|
max: number;
|
||||||
|
edge: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
const StatPool = styled.div`
|
||||||
|
border: 1px solid black;
|
||||||
|
`
|
||||||
|
|
||||||
|
const render = ({ name, value, max, edge }: StatPoolProps) => (<StatPool>
|
||||||
|
<div>{value} / {max}</div> <div>{edge}</div>
|
||||||
|
</StatPool>)
|
||||||
|
|
||||||
|
export default render
|
|
@ -0,0 +1,17 @@
|
||||||
|
import React, { createContext, useState } from "react"
|
||||||
|
import ReactDOM from "react-dom"
|
||||||
|
import { BrowserRouter, Route, Routes, useParams } from "react-router-dom"
|
||||||
|
import styled from "styled-components"
|
||||||
|
|
||||||
|
import AppPage from "./AppPage"
|
||||||
|
|
||||||
|
const main = () => {
|
||||||
|
ReactDOM.render(
|
||||||
|
<BrowserRouter>
|
||||||
|
<AppPage />
|
||||||
|
</BrowserRouter>
|
||||||
|
, document.getElementById('root')
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
|
@ -0,0 +1,28 @@
|
||||||
|
body {
|
||||||
|
background-color: rgb(200, 190, 180);
|
||||||
|
}
|
||||||
|
|
||||||
|
.columns {
|
||||||
|
display: flex;
|
||||||
|
// border: 1px solid red;
|
||||||
|
margin: auto;
|
||||||
|
padding: 1em;
|
||||||
|
|
||||||
|
> * {
|
||||||
|
margin: 0 1em 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > :first-child {
|
||||||
|
margin: 0 1em 0 0;
|
||||||
|
}
|
||||||
|
& > :last-child {
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.c-2 {
|
||||||
|
> div {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
type StatPool = {
|
||||||
|
value: number;
|
||||||
|
max: number;
|
||||||
|
edge: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PlayerCharacter = {
|
||||||
|
name: string;
|
||||||
|
concept: string;
|
||||||
|
effort: number;
|
||||||
|
cypherLimit: number;
|
||||||
|
might: StatPool;
|
||||||
|
speed: StatPool;
|
||||||
|
intellect: StatPool;
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
import React from "react"
|
||||||
|
import ReactDOM from "react-dom"
|
||||||
|
|
||||||
|
import StatPool from "../components/StatPool"
|
||||||
|
import { PlayerCharacter } from "../types"
|
||||||
|
|
||||||
|
interface PlayerCharacterProps extends PlayerCharacter { }
|
||||||
|
|
||||||
|
const PlayerCharacter = ({ name, concept, might, speed, intellect }: PlayerCharacterProps) => {
|
||||||
|
return (<div>
|
||||||
|
<h2>{name}</h2>
|
||||||
|
<div className="columns c-2">
|
||||||
|
<div>
|
||||||
|
<div>{concept}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<StatPool name="Might" {...might} />
|
||||||
|
<StatPool name="Speed" {...speed} />
|
||||||
|
<StatPool name="Intellect" {...intellect} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PlayerCharacter
|
|
@ -0,0 +1,24 @@
|
||||||
|
import React, { useContext } from "react"
|
||||||
|
import ReactDOM from "react-dom"
|
||||||
|
import { Link, Route, Routes, useParams } from "react-router-dom"
|
||||||
|
|
||||||
|
import { AppContext } from "../appContext"
|
||||||
|
import PlayerCharacter from "./PlayerCharacter"
|
||||||
|
|
||||||
|
const PlayerListView = () => {
|
||||||
|
const params = useParams()
|
||||||
|
const { state } = useContext(AppContext)
|
||||||
|
const character = params.name ? state.playerCharacters[params.name] : null
|
||||||
|
|
||||||
|
return (<div>
|
||||||
|
<nav>
|
||||||
|
<Link to="priat">Priat</Link> |
|
||||||
|
<Link to="dorian">Dorian </Link> |
|
||||||
|
<Link to="ember">Ember</Link> |
|
||||||
|
<Link to="lise">Lise</Link>
|
||||||
|
</nav>
|
||||||
|
{character ? <PlayerCharacter {...character} /> : null }
|
||||||
|
</div>);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PlayerListView
|
|
@ -0,0 +1,38 @@
|
||||||
|
.App {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.App-logo {
|
||||||
|
height: 40vmin;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: no-preference) {
|
||||||
|
.App-logo {
|
||||||
|
animation: App-logo-spin infinite 20s linear;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.App-header {
|
||||||
|
background-color: #282c34;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: calc(10px + 2vmin);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.App-link {
|
||||||
|
color: #61dafb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes App-logo-spin {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { render, screen } from '@testing-library/react';
|
||||||
|
import App from './App';
|
||||||
|
|
||||||
|
test('renders learn react link', () => {
|
||||||
|
render(<App />);
|
||||||
|
const linkElement = screen.getByText(/learn react/i);
|
||||||
|
expect(linkElement).toBeInTheDocument();
|
||||||
|
});
|
|
@ -0,0 +1,26 @@
|
||||||
|
import React from 'react';
|
||||||
|
import logo from './logo.svg';
|
||||||
|
import './App.css';
|
||||||
|
|
||||||
|
function App() {
|
||||||
|
return (
|
||||||
|
<div className="App">
|
||||||
|
<header className="App-header">
|
||||||
|
<img src={logo} className="App-logo" alt="logo" />
|
||||||
|
<p>
|
||||||
|
Edit <code>src/App.tsx</code> and save to reload.
|
||||||
|
</p>
|
||||||
|
<a
|
||||||
|
className="App-link"
|
||||||
|
href="https://reactjs.org"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
Learn React
|
||||||
|
</a>
|
||||||
|
</header>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default App;
|
|
@ -0,0 +1,22 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
||||||
|
|
||||||
|
import Elektilo from "./Elektilo";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: "Elementoj/Elektilo",
|
||||||
|
component: Elektilo,
|
||||||
|
argTypes: {
|
||||||
|
aktuala: {
|
||||||
|
options: [ '', 'Adaptable', 'Articulate', 'Rugged', 'Genteel' ],
|
||||||
|
control: { type: 'radio' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as ComponentMeta<typeof Elektilo>;
|
||||||
|
|
||||||
|
export const ElektilRakonto: ComponentStory<typeof Elektilo> = ({ aktuala }) => <Elektilo elektoj={[
|
||||||
|
"Adaptable",
|
||||||
|
"Articulate",
|
||||||
|
"Rugged",
|
||||||
|
"Genteel",
|
||||||
|
]} aktuala={aktuala} />;
|
|
@ -0,0 +1,14 @@
|
||||||
|
interface Ecoj {
|
||||||
|
elektoj: string[];
|
||||||
|
aktuala?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const Elektilo = ({ elektoj, aktuala }: Ecoj) => <select>
|
||||||
|
<option selected={!aktuala}></option>
|
||||||
|
{elektoj.map((elekto) => <option selected={aktuala === elekto} value={elekto}>{elekto}</option>)}
|
||||||
|
</select>;
|
||||||
|
|
||||||
|
|
||||||
|
const bildigu = ( ecoj: Ecoj ) => <Elektilo {...ecoj} />;
|
||||||
|
|
||||||
|
export default bildigu;
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { ComponentMeta } from '@storybook/react';
|
||||||
|
|
||||||
|
import { Ligilo, Subtitolo, Teksto, Titolo } from "./Tipografio";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'Elementoj/Tipografioj',
|
||||||
|
}
|
||||||
|
|
||||||
|
export const TipogafiaRakontoj = () =>
|
||||||
|
<div>
|
||||||
|
<Titolo>Opal Harris</Titolo>
|
||||||
|
<Subtitolo>An Adaptable Jack who Speaks with a Silver Tongue</Subtitolo>
|
||||||
|
<div>
|
||||||
|
<Teksto>This is the descriptor of a focus or some such</Teksto>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Ligilo destino="localhost">A link</Ligilo>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
import { ReactNode } from 'react';
|
||||||
|
import styles from 'styled-components';
|
||||||
|
|
||||||
|
interface TitolaEcoj { children: ReactNode };
|
||||||
|
const TitolaStilo = styles.h1`
|
||||||
|
font-family: Avantgarde, TeX Gyre Adventor, sans-serif;
|
||||||
|
font-size: 24px;
|
||||||
|
`;
|
||||||
|
export const Titolo = ({ children }: TitolaEcoj) => <TitolaStilo>{children}</TitolaStilo>;
|
||||||
|
|
||||||
|
interface SubtitolaEcoj { children: ReactNode };
|
||||||
|
const SubtitolaStilo = styles.h2`
|
||||||
|
font-family: Avantgarde, TeX Gyre Adventor, sans-serif;
|
||||||
|
`;
|
||||||
|
export const Subtitolo = ({ children }: SubtitolaEcoj) => <SubtitolaStilo>{children}</SubtitolaStilo>;
|
||||||
|
|
||||||
|
interface TekstaEcoj { children: ReactNode };
|
||||||
|
const TekstaStilo = styles.span`
|
||||||
|
font-family: Avantgarde, TeX Gyre Adventor, sans-serif;
|
||||||
|
`;
|
||||||
|
export const Teksto = ({ children }: TekstaEcoj) => <TekstaStilo>{children}</TekstaStilo>;
|
||||||
|
|
||||||
|
interface LigilaEcoj { destino: string, children: ReactNode };
|
||||||
|
const LigilaStilo = styles.span`
|
||||||
|
font-family: Avantgarde, TeX Gyre Adventor, sans-serif;
|
||||||
|
`;
|
||||||
|
export const Ligilo = ({ destino, children }: LigilaEcoj) => (
|
||||||
|
<a href={destino}><LigilaStilo>{children}</LigilaStilo></a>
|
||||||
|
);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||||
|
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||||
|
sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||||
|
monospace;
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import React from 'react';
|
||||||
|
import ReactDOM from 'react-dom';
|
||||||
|
import './index.css';
|
||||||
|
import App from './App';
|
||||||
|
import reportWebVitals from './reportWebVitals';
|
||||||
|
|
||||||
|
ReactDOM.render(
|
||||||
|
<React.StrictMode>
|
||||||
|
<App />
|
||||||
|
</React.StrictMode>,
|
||||||
|
document.getElementById('root')
|
||||||
|
);
|
||||||
|
|
||||||
|
// If you want to start measuring performance in your app, pass a function
|
||||||
|
// to log results (for example: reportWebVitals(console.log))
|
||||||
|
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
||||||
|
reportWebVitals();
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
|
After Width: | Height: | Size: 2.6 KiB |
|
@ -0,0 +1,99 @@
|
||||||
|
import { ComponentMeta } from '@storybook/react';
|
||||||
|
|
||||||
|
import RolulKreilo from "../RolulKreilo/RolulKreilo";
|
||||||
|
import RolulPaĝo from "../Rolulo/Rolulo";
|
||||||
|
import Paĝo from './Paĝo';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'Paĝoj/Paĝo',
|
||||||
|
component: Paĝo,
|
||||||
|
} as ComponentMeta<typeof Paĝo>;
|
||||||
|
|
||||||
|
const priaĵoj = [
|
||||||
|
"Adaptable",
|
||||||
|
"Articulate",
|
||||||
|
"Genteel",
|
||||||
|
];
|
||||||
|
|
||||||
|
const tipoj = [
|
||||||
|
"Glaive",
|
||||||
|
"Jack",
|
||||||
|
"Nano",
|
||||||
|
];
|
||||||
|
|
||||||
|
const fokusoj = [
|
||||||
|
"Commands a Starship",
|
||||||
|
"Builds Machines",
|
||||||
|
"Guards the Gate",
|
||||||
|
"Is Always Watching",
|
||||||
|
"Speaks with a Silver Tongue",
|
||||||
|
];
|
||||||
|
|
||||||
|
const opal = {
|
||||||
|
nomo: "Opal",
|
||||||
|
nivelo: "Tier 1",
|
||||||
|
frazo: "An Adaptable Jack who Speaks with a Silver Tongue",
|
||||||
|
priaĵo: "Adaptable",
|
||||||
|
tipo: "Jack",
|
||||||
|
fokuso: "Speaks with a Silver Tongue",
|
||||||
|
ecGrupoj: [
|
||||||
|
{
|
||||||
|
eco: "Forto",
|
||||||
|
aktuala: 11,
|
||||||
|
maksimuma: 11,
|
||||||
|
avantaĝo: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
eco: "Rapideco",
|
||||||
|
aktuala: 12,
|
||||||
|
maksimuma: 12,
|
||||||
|
avantaĝo: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
eco: "Intelekto",
|
||||||
|
aktuala: 13,
|
||||||
|
maksimuma: 13,
|
||||||
|
avantaĝo: 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
kapabloj: [
|
||||||
|
{ nomo: "Versatile" },
|
||||||
|
{ nomo: "Flex Skill" },
|
||||||
|
{ nomo: "Face Morph", kosto: "2+" },
|
||||||
|
{ nomo: "Link Senses", kosto: "2" },
|
||||||
|
],
|
||||||
|
lertecoj: [
|
||||||
|
{ nomo: "Perception", nivelo: "Trained", },
|
||||||
|
{ nomo: "Resilient", nivelo: "Trained", },
|
||||||
|
{ nomo: "Social Interactions", nivelo: "Trained", },
|
||||||
|
{ nomo: "Pleasant social interactions", nivelo: "Specialized", },
|
||||||
|
{ nomo: "Crafting, Understanding Numenera", nivelo: "Inability", },
|
||||||
|
],
|
||||||
|
sekvaResaniĝo: "unu ago",
|
||||||
|
};
|
||||||
|
|
||||||
|
const flankMenuo = [
|
||||||
|
"Opal",
|
||||||
|
"Dorian",
|
||||||
|
"Devan",
|
||||||
|
"Jacine",
|
||||||
|
"Janys",
|
||||||
|
];
|
||||||
|
|
||||||
|
const topMenuo = [
|
||||||
|
"Elsalutu",
|
||||||
|
"Agordoj",
|
||||||
|
];
|
||||||
|
|
||||||
|
export const RolulKreilPaĝRakonto = () => (
|
||||||
|
<Paĝo flankMenuo={flankMenuo} topMenuo={topMenuo}>
|
||||||
|
<RolulKreilo rolulo={opal} priaĵoj={priaĵoj} tipoj={tipoj} fokusoj={fokusoj} />
|
||||||
|
</Paĝo>);
|
||||||
|
|
||||||
|
export const RulolPaĝRakonto = () => (
|
||||||
|
<Paĝo flankMenuo={flankMenuo} topMenuo={topMenuo}>
|
||||||
|
<RolulPaĝo rolulo={opal} />
|
||||||
|
</Paĝo>
|
||||||
|
);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
import { ReactNode } from "react";
|
||||||
|
import styled from "styled-components";
|
||||||
|
import { Teksto } from "../../elementoj/Tipografio/Tipografio";
|
||||||
|
|
||||||
|
interface Ecoj {
|
||||||
|
flankMenuo: string[];
|
||||||
|
topMenuo: string[];
|
||||||
|
children: ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
const FlankPanelo = styled.div`
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 2;
|
||||||
|
`
|
||||||
|
|
||||||
|
const TopListo = styled.div`
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 10px;
|
||||||
|
`
|
||||||
|
|
||||||
|
const TopPanelo = styled.div`
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
border-bottom: 2px solid #c0a0b7;
|
||||||
|
grid-column: 1 / span 2;
|
||||||
|
padding: 10px;
|
||||||
|
`
|
||||||
|
|
||||||
|
const PrecipaPanelo = styled.div`
|
||||||
|
grid-row-start: 2;
|
||||||
|
grid-column-start: 2;
|
||||||
|
`
|
||||||
|
|
||||||
|
const Ujo = styled.div`
|
||||||
|
height: 100%;
|
||||||
|
background-color: #fcd7b7;
|
||||||
|
color: #552511;
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 150px auto;
|
||||||
|
grid-template-rows: 40px auto;
|
||||||
|
font-family: sans-serif;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const bildigu = ({ flankMenuo, topMenuo, children }: Ecoj) => <Ujo>
|
||||||
|
<FlankPanelo>
|
||||||
|
{flankMenuo.map((ejo) => <div><Teksto>{ejo}</Teksto></div>)}
|
||||||
|
</FlankPanelo>
|
||||||
|
<TopPanelo>
|
||||||
|
<TopListo>
|
||||||
|
{topMenuo.map((ejo) => <Teksto>{ejo}</Teksto>)}
|
||||||
|
</TopListo>
|
||||||
|
</TopPanelo>
|
||||||
|
<PrecipaPanelo>
|
||||||
|
{children}
|
||||||
|
</PrecipaPanelo>
|
||||||
|
</Ujo>;
|
||||||
|
|
||||||
|
export default bildigu;
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { ComponentMeta } from "@storybook/react";
|
||||||
|
|
||||||
|
import RolulKreilo from "./RolulKreilo";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: "Paĝoj/RolulKreilo",
|
||||||
|
component: RolulKreilo,
|
||||||
|
} as ComponentMeta<typeof RolulKreilo>;
|
||||||
|
|
||||||
|
const priaĵoj = [
|
||||||
|
"Adaptable",
|
||||||
|
"Articulate",
|
||||||
|
"Genteel",
|
||||||
|
];
|
||||||
|
|
||||||
|
const tipoj = [
|
||||||
|
"Glaive",
|
||||||
|
"Jack",
|
||||||
|
"Nano",
|
||||||
|
];
|
||||||
|
|
||||||
|
const fokusoj = [
|
||||||
|
"Commands a Starship",
|
||||||
|
"Builds Machines",
|
||||||
|
"Guards the Gate",
|
||||||
|
"Is Always Watching",
|
||||||
|
];
|
||||||
|
|
||||||
|
export const RolulKreilaRakonto = () => <RolulKreilo rolulo={{
|
||||||
|
nomo: "Opal",
|
||||||
|
priaĵo: "Adaptable",
|
||||||
|
tipo: "Jack",
|
||||||
|
fokuso: "Commands a Starship",
|
||||||
|
}} priaĵoj={priaĵoj} tipoj={tipoj} fokusoj={fokusoj} />
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
import styled from "styled-components";
|
||||||
|
import Elektilo from "../../elementoj/Elektilo/Elektilo";
|
||||||
|
|
||||||
|
interface RolulaŜablono {
|
||||||
|
nomo?: string;
|
||||||
|
priaĵo?: string;
|
||||||
|
tipo?: string;
|
||||||
|
fokuso?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FrazaKreilaEcoj {
|
||||||
|
priaĵo?: string;
|
||||||
|
tipo?: string;
|
||||||
|
fokuso?: string;
|
||||||
|
|
||||||
|
priaĵoj: string[];
|
||||||
|
tipoj: string[];
|
||||||
|
fokusoj: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const FrazaKreilo = ( { priaĵo, priaĵoj, tipo, tipoj, fokuso, fokusoj }: FrazaKreilaEcoj) => <div>
|
||||||
|
<Elektilo elektoj={priaĵoj} aktuala={priaĵo} />
|
||||||
|
<Elektilo elektoj={tipoj} aktuala={tipo} />
|
||||||
|
who
|
||||||
|
<Elektilo elektoj={fokusoj} aktuala={fokuso} />
|
||||||
|
</div>;
|
||||||
|
|
||||||
|
interface RolulKreilaEcoj {
|
||||||
|
rolulo: RolulaŜablono;
|
||||||
|
priaĵoj: string[];
|
||||||
|
tipoj: string[];
|
||||||
|
fokusoj: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const RolulKreilo = ( { rolulo, priaĵoj, tipoj, fokusoj }: RolulKreilaEcoj ) => <>
|
||||||
|
<input type="text" value={rolulo.nomo}></input>
|
||||||
|
<FrazaKreilo
|
||||||
|
priaĵo={rolulo.priaĵo}
|
||||||
|
tipo={rolulo.tipo}
|
||||||
|
fokuso={rolulo.fokuso}
|
||||||
|
priaĵoj={priaĵoj}
|
||||||
|
tipoj={tipoj}
|
||||||
|
fokusoj={fokusoj}
|
||||||
|
/>
|
||||||
|
</>;
|
||||||
|
|
||||||
|
const Ujo = styled.div`
|
||||||
|
`;
|
||||||
|
|
||||||
|
const bildigu = ( ecoj: RolulKreilaEcoj ) => <Ujo><RolulKreilo {...ecoj} /></Ujo>;
|
||||||
|
|
||||||
|
export default bildigu;
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { ComponentMeta } from '@storybook/react';
|
||||||
|
|
||||||
|
import RolulPaĝo from "./Rolulo";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'Paĝoj/RolulPaĝo',
|
||||||
|
component: RolulPaĝo,
|
||||||
|
} as ComponentMeta<typeof RolulPaĝo>;
|
||||||
|
|
||||||
|
const opal = {
|
||||||
|
nomo: "Opal",
|
||||||
|
nivelo: "(Tier 1)",
|
||||||
|
frazo: "An Adaptable Jack who Speaks with a Silver Tongue",
|
||||||
|
ecGrupoj: [
|
||||||
|
{
|
||||||
|
eco: "Forto",
|
||||||
|
aktuala: 11,
|
||||||
|
maksimuma: 11,
|
||||||
|
avantaĝo: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
eco: "Rapideco",
|
||||||
|
aktuala: 12,
|
||||||
|
maksimuma: 12,
|
||||||
|
avantaĝo: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
eco: "Intelekto",
|
||||||
|
aktuala: 13,
|
||||||
|
maksimuma: 13,
|
||||||
|
avantaĝo: 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
kapabloj: [
|
||||||
|
{ nomo: "Versatile" },
|
||||||
|
{ nomo: "Flex Skill" },
|
||||||
|
{ nomo: "Face Morph", kosto: "2+" },
|
||||||
|
{ nomo: "Link Senses", kosto: "2" },
|
||||||
|
],
|
||||||
|
lertecoj: [
|
||||||
|
{ nomo: "Perception", nivelo: "Trained", },
|
||||||
|
{ nomo: "Resilient", nivelo: "Trained", },
|
||||||
|
{ nomo: "Social Interactions", nivelo: "Trained", },
|
||||||
|
{ nomo: "Pleasant social interactions", nivelo: "Specialized", },
|
||||||
|
{ nomo: "Crafting, Understanding Numenera", nivelo: "Inability", },
|
||||||
|
],
|
||||||
|
sekvaResaniĝo: "unu ago",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export const RolulPaĝRakonto = () => <RolulPaĝo rolulo={opal} />
|
|
@ -0,0 +1,58 @@
|
||||||
|
import styled from "styled-components"
|
||||||
|
import { EcGrupo, Lerteco, Kapablo, Rolulo } from "../../tipoj";
|
||||||
|
import { Titolo, Subtitolo, Teksto } from "../../elementoj/Tipografio/Tipografio";
|
||||||
|
|
||||||
|
const EcGrupElemento = ( { eco, aktuala, maksimuma, avantaĝo }: EcGrupo ) => <tr>
|
||||||
|
<th key={eco}> <Teksto>{eco}</Teksto> </th>
|
||||||
|
<td> <Teksto>{aktuala}</Teksto> <button>+</button> <button>-</button> </td>
|
||||||
|
<td> <Teksto>{maksimuma}</Teksto> </td>
|
||||||
|
<td> <Teksto>{avantaĝo}</Teksto> </td>
|
||||||
|
</tr>;
|
||||||
|
|
||||||
|
const KapablaElemento = ( { nomo, kosto }: Kapablo ) => <>
|
||||||
|
<dt key={nomo}> <Teksto>{nomo} {kosto && <span>({kosto})</span>}</Teksto> </dt>
|
||||||
|
</>;
|
||||||
|
|
||||||
|
const LertecaElemento = ( { nomo, nivelo }: Lerteco ) => <tr>
|
||||||
|
<th key={nomo}> <Teksto>{nomo}</Teksto> </th>
|
||||||
|
<td> <Teksto>{nivelo}</Teksto> </td>
|
||||||
|
</tr>;
|
||||||
|
|
||||||
|
interface RolulEcoj {
|
||||||
|
rolulo: Rolulo;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Vico = styled.div`
|
||||||
|
display: flex;
|
||||||
|
gap: 15px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const RolulPaĝo = ({ rolulo: { nomo, nivelo, frazo, ecGrupoj, kapabloj, lertecoj, sekvaResaniĝo } }: RolulEcoj) =>
|
||||||
|
<>
|
||||||
|
<Titolo>{nomo} ({nivelo})</Titolo>
|
||||||
|
<Subtitolo>{frazo}</Subtitolo>
|
||||||
|
<Vico>
|
||||||
|
<table>
|
||||||
|
{ecGrupoj.map((eco) => <EcGrupElemento {...eco} />)}
|
||||||
|
</table>
|
||||||
|
<div>
|
||||||
|
<div> Sekva Resaniĝo: {sekvaResaniĝo} </div>
|
||||||
|
<div> <button> Resaniĝu </button> </div>
|
||||||
|
</div>
|
||||||
|
</Vico>
|
||||||
|
<dl>
|
||||||
|
{kapabloj.map((kapablo) => <KapablaElemento {...kapablo} />)}
|
||||||
|
</dl>
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
{lertecoj.map((lerteco) => <LertecaElemento {...lerteco} />)}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</>;
|
||||||
|
|
||||||
|
const Ujo = styled.div`
|
||||||
|
`;
|
||||||
|
|
||||||
|
const bildigu = ( ecoj: RolulEcoj ) => <Ujo><RolulPaĝo {...ecoj} /></Ujo>;
|
||||||
|
|
||||||
|
export default bildigu;
|
|
@ -0,0 +1 @@
|
||||||
|
/// <reference types="react-scripts" />
|
|
@ -0,0 +1,15 @@
|
||||||
|
import { ReportHandler } from 'web-vitals';
|
||||||
|
|
||||||
|
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
|
||||||
|
if (onPerfEntry && onPerfEntry instanceof Function) {
|
||||||
|
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
||||||
|
getCLS(onPerfEntry);
|
||||||
|
getFID(onPerfEntry);
|
||||||
|
getFCP(onPerfEntry);
|
||||||
|
getLCP(onPerfEntry);
|
||||||
|
getTTFB(onPerfEntry);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default reportWebVitals;
|
|
@ -0,0 +1,5 @@
|
||||||
|
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
||||||
|
// allows you to do things like:
|
||||||
|
// expect(element).toHaveTextContent(/react/i)
|
||||||
|
// learn more: https://github.com/testing-library/jest-dom
|
||||||
|
import '@testing-library/jest-dom';
|
|
@ -0,0 +1,41 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
||||||
|
|
||||||
|
import { Button } from './Button';
|
||||||
|
|
||||||
|
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
||||||
|
export default {
|
||||||
|
title: 'Example/Button',
|
||||||
|
component: Button,
|
||||||
|
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
||||||
|
argTypes: {
|
||||||
|
backgroundColor: { control: 'color' },
|
||||||
|
},
|
||||||
|
} as ComponentMeta<typeof Button>;
|
||||||
|
|
||||||
|
// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
|
||||||
|
const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;
|
||||||
|
|
||||||
|
export const Primary = Template.bind({});
|
||||||
|
// More on args: https://storybook.js.org/docs/react/writing-stories/args
|
||||||
|
Primary.args = {
|
||||||
|
primary: true,
|
||||||
|
label: 'Button',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const Secondary = Template.bind({});
|
||||||
|
Secondary.args = {
|
||||||
|
label: 'Button',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const Large = Template.bind({});
|
||||||
|
Large.args = {
|
||||||
|
size: 'large',
|
||||||
|
label: 'Button',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const Small = Template.bind({});
|
||||||
|
Small.args = {
|
||||||
|
size: 'small',
|
||||||
|
label: 'Button',
|
||||||
|
};
|