From bb5407fecfb239494230722d2f8ef024145fcf9c Mon Sep 17 00:00:00 2001 From: Shiba <44804845+DeepDoge@users.noreply.github.com> Date: Thu, 14 Nov 2024 21:29:56 +0000 Subject: [PATCH] idk im lost gonna worryabout this later --- eslint.config.mjs | 25 +- package-lock.json | 311 +++++++++++++++++- package.json | 1 + project/app/src/app/app.ts | 12 +- project/app/src/app/feed/FeedPage.ts | 8 +- project/app/src/app/feed/FeedScroller.ts | 12 +- project/app/src/app/feed/PostThread.ts | 10 +- project/app/src/app/feed/PostView.ts | 13 +- .../feed/components/FeedForm.ts | 23 +- .../feed/components/FeedGroupAddForm.ts | 12 +- .../FeedGroupAddFormPopoverButton.ts | 6 +- .../feed/components/FeedGroupForm.ts | 4 +- .../feed/components/FeedGroupIconSvg.ts | 6 +- .../feed/components/SelectSenderButton.ts | 7 +- .../feed/components/SelectSenderPopover.ts | 2 +- .../{features => app}/feed/database/client.ts | 6 +- .../app/src/app/feed/feedGroupFormDialog.ts | 8 +- .../src/{features => app}/feed/lib/Feed.ts | 6 +- .../src/{features => app}/feed/lib/Post.ts | 10 +- .../{features => app}/feed/lib/PostContent.ts | 2 +- project/app/src/app/feed/routes.ts | 6 +- project/app/src/app/{ => layout}/Layout.ts | 14 +- project/app/src/app/{ => layout}/Main.ts | 20 +- .../{ => layout}/header/FeedGroupTabList.ts | 14 +- .../{ => layout}/header/FeedGroupTabPanel.ts | 19 +- .../app/src/app/{ => layout}/header/Header.ts | 26 +- project/app/src/app/layout/routes.ts | 3 + project/app/src/app/profile/ProfileView.ts | 16 +- project/app/src/app/profile/routes.ts | 6 +- project/app/src/app/router.ts | 10 +- project/app/src/app/routes.ts | 9 - project/app/src/app/styles.ts | 2 +- project/app/src/assets/svgs/ArrowDownSvg.ts | 2 +- project/app/src/assets/svgs/BackSvg.ts | 2 +- project/app/src/assets/svgs/CloseSvg.ts | 2 +- .../app/src/assets/svgs/CreateFolderSvg.ts | 2 +- project/app/src/assets/svgs/ErrorSvg.ts | 2 +- project/app/src/assets/svgs/HomeSvg.ts | 2 +- project/app/src/assets/svgs/LoadingSvg.ts | 2 +- project/app/src/assets/svgs/ReloadSvg.ts | 2 +- project/app/src/assets/svgs/RssSvg.ts | 2 +- .../app/src/assets/svgs/SingleLetterSvg.ts | 2 +- project/app/src/assets/svgs/SuccessSvg.ts | 2 +- project/app/src/assets/svgs/TrashcanSvg.ts | 2 +- project/app/src/assets/svgs/UserSvg.ts | 2 +- project/app/src/assets/svgs/WalletSvg.ts | 2 +- .../app/src/assets/svgs/chains/BitcoinSvg.ts | 2 +- .../app/src/assets/svgs/chains/EthereumSvg.ts | 2 +- .../app/src/assets/svgs/chains/PolygonSvg.ts | 2 +- project/app/src/{shared => domains}/db/mod.ts | 0 .../src/{shared => domains}/progress/mod.ts | 8 +- .../app/src/{shared => domains}/router/mod.ts | 2 +- .../wallet/assets/eip1193.svg | 0 .../wallet/components/ConnectWalletDialog.ts | 10 +- .../wallet/components/WalletAddress.ts | 4 +- .../wallet/components/WalletAvatarSvg.ts | 2 +- .../wallet/components/WalletList.ts | 8 +- .../wallet/connectDialog.ts | 8 +- project/app/src/domains/wallet/mod.ts | 6 + .../src/{shared => domains}/wallet/utils.ts | 2 +- project/app/src/shared/config.ts | 4 +- .../effects/{userPart.ts => usePart.ts} | 0 project/app/src/shared/language.ts | 2 +- project/app/src/shared/time.ts | 2 +- project/contracts/connect.ts | 8 +- tsconfig.base.json | 3 + 66 files changed, 536 insertions(+), 196 deletions(-) rename project/app/src/{features => app}/feed/components/FeedForm.ts (85%) rename project/app/src/{features => app}/feed/components/FeedGroupAddForm.ts (87%) rename project/app/src/{features => app}/feed/components/FeedGroupAddFormPopoverButton.ts (87%) rename project/app/src/{features => app}/feed/components/FeedGroupForm.ts (92%) rename project/app/src/{features => app}/feed/components/FeedGroupIconSvg.ts (88%) rename project/app/src/{features => app}/feed/components/SelectSenderButton.ts (88%) rename project/app/src/{features => app}/feed/components/SelectSenderPopover.ts (94%) rename project/app/src/{features => app}/feed/database/client.ts (93%) rename project/app/src/{features => app}/feed/lib/Feed.ts (96%) rename project/app/src/{features => app}/feed/lib/Post.ts (93%) rename project/app/src/{features => app}/feed/lib/PostContent.ts (97%) rename project/app/src/app/{ => layout}/Layout.ts (90%) rename project/app/src/app/{ => layout}/Main.ts (83%) rename project/app/src/app/{ => layout}/header/FeedGroupTabList.ts (85%) rename project/app/src/app/{ => layout}/header/FeedGroupTabPanel.ts (83%) rename project/app/src/app/{ => layout}/header/Header.ts (79%) create mode 100644 project/app/src/app/layout/routes.ts delete mode 100644 project/app/src/app/routes.ts rename project/app/src/{shared => domains}/db/mod.ts (100%) rename project/app/src/{shared => domains}/progress/mod.ts (92%) rename project/app/src/{shared => domains}/router/mod.ts (99%) rename project/app/src/{shared => domains}/wallet/assets/eip1193.svg (100%) rename project/app/src/{shared => domains}/wallet/components/ConnectWalletDialog.ts (82%) rename project/app/src/{shared => domains}/wallet/components/WalletAddress.ts (85%) rename project/app/src/{shared => domains}/wallet/components/WalletAvatarSvg.ts (87%) rename project/app/src/{shared => domains}/wallet/components/WalletList.ts (92%) rename project/app/src/{shared => domains}/wallet/connectDialog.ts (73%) create mode 100644 project/app/src/domains/wallet/mod.ts rename project/app/src/{shared => domains}/wallet/utils.ts (99%) rename project/app/src/shared/effects/{userPart.ts => usePart.ts} (100%) diff --git a/eslint.config.mjs b/eslint.config.mjs index 5f5cde8..d33395b 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,10 +1,13 @@ import eslint from "@eslint/js"; import typescriptPlugin from "@typescript-eslint/eslint-plugin"; +import importPlugin from "eslint-plugin-import"; import projectStructurePlugin, { createIndependentModules } from "eslint-plugin-project-structure"; import tseslint from "typescript-eslint"; const patterns = { features: ["src/features/*/**"], + domains_export: ["src/domains/*/mod.ts"], + domains: ["src/domains/*/**"], shared: ["src/assets/**", "src/shared/**"], app: ["src/app/**", "src/app.ts"], }; @@ -18,6 +21,12 @@ export default tseslint.config( "no-undefined": "error", }, }, + { + plugins: { import: importPlugin }, + rules: { + "import/extensions": ["error", "always", { ignorePackages: true }], + }, + }, { plugins: { "@typescript-eslint": typescriptPlugin }, rules: { @@ -39,10 +48,23 @@ export default tseslint.config( }, }, modules: [ + { + name: "domains", + pattern: patterns.domains, + allowImportsFrom: [ + ...patterns.shared, + ...patterns.domains_export, + "{family_3}/**", + ], + }, { name: "features", pattern: patterns.features, - allowImportsFrom: [...patterns.shared, "{family_3}/**"], + allowImportsFrom: [ + ...patterns.shared, + ...patterns.domains_export, + "{family_3}/**", + ], }, { name: "shared", @@ -56,6 +78,7 @@ export default tseslint.config( ...patterns.shared, ...patterns.app, ...patterns.features, + ...patterns.domains_export, ], }, { diff --git a/package-lock.json b/package-lock.json index b8f59d6..0332727 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "@openzeppelin/contracts": "^5.0.2", "@total-typescript/ts-reset": "^0.5.1", "console-log-colors": "^0.4.0", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-project-structure": "^3.7.2", "npm-run-all": "^4.1.5", "prettier": "^3.1.0", @@ -332,6 +333,13 @@ "resolved": "project/contracts", "link": true }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true, + "license": "MIT" + }, "node_modules/@scure/base": { "version": "1.1.9", "dev": true, @@ -416,6 +424,13 @@ "license": "MIT", "peer": true }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "18.15.13", "license": "MIT" @@ -743,6 +758,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-timsort": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", @@ -750,6 +786,65 @@ "dev": true, "license": "MIT" }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.3", "dev": true, @@ -1083,6 +1178,19 @@ "node": ">=0.10.0" } }, + "node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/error-ex": { "version": "1.3.2", "dev": true, @@ -1193,6 +1301,16 @@ "node": ">= 0.4" } }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + } + }, "node_modules/es-to-primitive": { "version": "1.2.1", "dev": true, @@ -1317,6 +1435,110 @@ } } }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-plugin-project-structure": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/eslint-plugin-project-structure/-/eslint-plugin-project-structure-3.7.2.tgz", @@ -1639,7 +1861,6 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -2592,6 +2813,19 @@ "license": "MIT", "peer": true }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/jsonfile": { "version": "6.1.0", "dev": true, @@ -2737,6 +2971,16 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2844,6 +3088,58 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -3642,6 +3938,19 @@ "typescript": ">=4.2.0" } }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, "node_modules/tslib": { "version": "2.4.0", "license": "0BSD" diff --git a/package.json b/package.json index 9c2ce37..d2bf906 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@openzeppelin/contracts": "^5.0.2", "@total-typescript/ts-reset": "^0.5.1", "console-log-colors": "^0.4.0", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-project-structure": "^3.7.2", "npm-run-all": "^4.1.5", "prettier": "^3.1.0", diff --git a/project/app/src/app/app.ts b/project/app/src/app/app.ts index 9f04044..45d36c2 100644 --- a/project/app/src/app/app.ts +++ b/project/app/src/app/app.ts @@ -1,11 +1,11 @@ -import "~/features/feed/database/client"; +import "~/app/feed/database/client.ts"; import { fragment, tags } from "@purifyjs/core"; -import { feedGroupFormDialog } from "~/app/feed/feedGroupFormDialog"; -import { Layout } from "~/app/Layout"; -import { manifest } from "~/app/manifest"; -import { progressListElement } from "~/shared/progress/mod"; -import { connectWallet } from "~/shared/wallet/connectDialog"; +import { feedGroupFormDialog } from "~/app/feed/feedGroupFormDialog.ts"; +import { Layout } from "~/app/layout/Layout.ts"; +import { manifest } from "~/app/manifest.ts"; +import { progressListElement } from "~/domains/progress/mod.ts"; +import { connectWallet } from "~/domains/wallet/mod.ts"; const { link } = tags; diff --git a/project/app/src/app/feed/FeedPage.ts b/project/app/src/app/feed/FeedPage.ts index 159cda9..e55c569 100644 --- a/project/app/src/app/feed/FeedPage.ts +++ b/project/app/src/app/feed/FeedPage.ts @@ -1,8 +1,8 @@ import { tags } from "@purifyjs/core"; -import { FeedScroller } from "~/app/feed/FeedScroller"; -import { Feed } from "~/features/feed/lib/Feed"; -import { Config, config } from "~/shared/config"; -import { Address } from "~/shared/solidity/primatives"; +import { FeedScroller } from "~/app/feed/FeedScroller.ts"; +import { Feed } from "~/app/feed/lib/Feed.ts"; +import { Config, config } from "~/shared/config.ts"; +import { Address } from "~/shared/solidity/primatives.ts"; const { div } = tags; diff --git a/project/app/src/app/feed/FeedScroller.ts b/project/app/src/app/feed/FeedScroller.ts index 751b781..0ecec87 100644 --- a/project/app/src/app/feed/FeedScroller.ts +++ b/project/app/src/app/feed/FeedScroller.ts @@ -1,10 +1,10 @@ import { computed, fragment, ref, tags } from "@purifyjs/core"; -import { PostView } from "~/app/feed/PostView"; -import { ArrowDownSvg } from "~/assets/svgs/ArrowDownSvg"; -import { ReloadSvg } from "~/assets/svgs/ReloadSvg"; -import { css, useScope } from "~/shared/css"; -import { useOnVisible } from "~/shared/effects/useOnVisible"; -import { Feed } from "../../features/feed/lib/Feed"; +import { PostView } from "~/app/feed/PostView.ts"; +import { Feed } from "~/app/feed/lib/Feed.ts"; +import { ArrowDownSvg } from "~/assets/svgs/ArrowDownSvg.ts"; +import { ReloadSvg } from "~/assets/svgs/ReloadSvg.ts"; +import { css, useScope } from "~/shared/css.ts"; +import { useOnVisible } from "~/shared/effects/useOnVisible.ts"; const { div, section, button } = tags; diff --git a/project/app/src/app/feed/PostThread.ts b/project/app/src/app/feed/PostThread.ts index b513282..0711638 100644 --- a/project/app/src/app/feed/PostThread.ts +++ b/project/app/src/app/feed/PostThread.ts @@ -1,9 +1,9 @@ import { tags } from "@purifyjs/core"; -import { FeedScroller } from "~/app/feed/FeedScroller"; -import { PostView } from "~/app/feed/PostView"; -import { FeedForm } from "~/features/feed/components/FeedForm"; -import { Post } from "~/features/feed/lib/Post"; -import { config } from "~/shared/config"; +import { FeedForm } from "~/app/feed/components/FeedForm.ts"; +import { FeedScroller } from "~/app/feed/FeedScroller.ts"; +import { Post } from "~/app/feed/lib/Post.ts"; +import { PostView } from "~/app/feed/PostView.ts"; +import { config } from "~/shared/config.ts"; const { div, strong } = tags; diff --git a/project/app/src/app/feed/PostView.ts b/project/app/src/app/feed/PostView.ts index edf0c87..c89e489 100644 --- a/project/app/src/app/feed/PostView.ts +++ b/project/app/src/app/feed/PostView.ts @@ -1,11 +1,10 @@ import { tags } from "@purifyjs/core"; -import { postSearchParam } from "~/app/feed/routes"; -import { Post } from "~/features/feed/lib/Post"; -import { PostContent } from "~/features/feed/lib/PostContent"; -import { css, useScope } from "~/shared/css"; -import { getRelativeTimeSignal } from "~/shared/time"; -import { WalletAddress } from "~/shared/wallet/components/WalletAddress"; -import { WalletAvatarSvg } from "~/shared/wallet/components/WalletAvatarSvg"; +import { Post } from "~/app/feed/lib/Post.ts"; +import { PostContent } from "~/app/feed/lib/PostContent.ts"; +import { postSearchParam } from "~/app/feed/routes.ts"; +import { WalletAddress, WalletAvatarSvg } from "~/domains/wallet/mod.ts"; +import { css, useScope } from "~/shared/css.ts"; +import { getRelativeTimeSignal } from "~/shared/time.ts"; const { article, footer, address, time, div, a } = tags; diff --git a/project/app/src/features/feed/components/FeedForm.ts b/project/app/src/app/feed/components/FeedForm.ts similarity index 85% rename from project/app/src/features/feed/components/FeedForm.ts rename to project/app/src/app/feed/components/FeedForm.ts index ad9cfae..005264e 100644 --- a/project/app/src/features/feed/components/FeedForm.ts +++ b/project/app/src/app/feed/components/FeedForm.ts @@ -1,15 +1,18 @@ import { awaited, computed, ref, tags } from "@purifyjs/core"; import { PostIndexer, PostStore_Plain } from "@root/contracts/connect"; -import { SelectSenderButton } from "~/features/feed/components/SelectSenderButton"; -import { SelectedSender } from "~/features/feed/components/SelectSenderPopover"; -import { Feed } from "~/features/feed/lib/Feed"; -import { PostContent } from "~/features/feed/lib/PostContent"; -import { css, useScope } from "~/shared/css"; -import { useBind } from "~/shared/effects/useBind"; -import { trackPromise } from "~/shared/progress/mod"; -import { WalletAddress } from "~/shared/wallet/components/WalletAddress"; -import { connectWallet } from "~/shared/wallet/connectDialog"; -import { currentWalletDetail, getOrRequestSigner } from "~/shared/wallet/utils"; +import { SelectSenderButton } from "~/app/feed/components/SelectSenderButton.ts"; +import { SelectedSender } from "~/app/feed/components/SelectSenderPopover.ts"; +import { Feed } from "~/app/feed/lib/Feed.ts"; +import { PostContent } from "~/app/feed/lib/PostContent.ts"; +import { trackPromise } from "~/domains/progress/mod.ts"; +import { + connectWallet, + currentWalletDetail, + getOrRequestSigner, + WalletAddress, +} from "~/domains/wallet/mod.ts"; +import { css, useScope } from "~/shared/css.ts"; +import { useBind } from "~/shared/effects/useBind.ts"; const { form, div, textarea, button, small, hr, a } = tags; diff --git a/project/app/src/features/feed/components/FeedGroupAddForm.ts b/project/app/src/app/feed/components/FeedGroupAddForm.ts similarity index 87% rename from project/app/src/features/feed/components/FeedGroupAddForm.ts rename to project/app/src/app/feed/components/FeedGroupAddForm.ts index 938e508..eb38889 100644 --- a/project/app/src/features/feed/components/FeedGroupAddForm.ts +++ b/project/app/src/app/feed/components/FeedGroupAddForm.ts @@ -1,10 +1,10 @@ import { awaited, ref, tags } from "@purifyjs/core"; -import { FeedGroupIconSvg } from "~/features/feed/components/FeedGroupIconSvg"; -import { postDb } from "~/features/feed/database/client"; -import { css, useScope } from "~/shared/css"; -import { useBind } from "~/shared/effects/useBind"; -import { PromiseOrValue } from "~/shared/types/promise"; -import { Utils } from "~/shared/types/utils"; +import { FeedGroupIconSvg } from "~/app/feed/components/FeedGroupIconSvg.ts"; +import { postDb } from "~/app/feed/database/client.ts"; +import { css, useScope } from "~/shared/css.ts"; +import { useBind } from "~/shared/effects/useBind.ts"; +import { PromiseOrValue } from "~/shared/types/promise.ts"; +import { Utils } from "~/shared/types/utils.ts"; const { form, button, strong, label, div, input } = tags; diff --git a/project/app/src/features/feed/components/FeedGroupAddFormPopoverButton.ts b/project/app/src/app/feed/components/FeedGroupAddFormPopoverButton.ts similarity index 87% rename from project/app/src/features/feed/components/FeedGroupAddFormPopoverButton.ts rename to project/app/src/app/feed/components/FeedGroupAddFormPopoverButton.ts index 86feaab..7ea6a92 100644 --- a/project/app/src/features/feed/components/FeedGroupAddFormPopoverButton.ts +++ b/project/app/src/app/feed/components/FeedGroupAddFormPopoverButton.ts @@ -1,7 +1,7 @@ import { ref, tags } from "@purifyjs/core"; -import { FeedGroupAddForm } from "~/features/feed/components/FeedGroupAddForm"; -import { postDb } from "~/features/feed/database/client"; -import { css, useScope } from "~/shared/css"; +import { FeedGroupAddForm } from "~/app/feed/components/FeedGroupAddForm.ts"; +import { postDb } from "~/app/feed/database/client.ts"; +import { css, useScope } from "~/shared/css.ts"; const { div, button, strong } = tags; diff --git a/project/app/src/features/feed/components/FeedGroupForm.ts b/project/app/src/app/feed/components/FeedGroupForm.ts similarity index 92% rename from project/app/src/features/feed/components/FeedGroupForm.ts rename to project/app/src/app/feed/components/FeedGroupForm.ts index 6d51a94..427f186 100644 --- a/project/app/src/features/feed/components/FeedGroupForm.ts +++ b/project/app/src/app/feed/components/FeedGroupForm.ts @@ -1,6 +1,6 @@ import { ref, tags } from "@purifyjs/core"; -import { postDb } from "~/features/feed/database/client"; -import { useBind } from "~/shared/effects/useBind"; +import { postDb } from "~/app/feed/database/client.ts"; +import { useBind } from "~/shared/effects/useBind.ts"; const { div, form, label, strong, input, button } = tags; diff --git a/project/app/src/features/feed/components/FeedGroupIconSvg.ts b/project/app/src/app/feed/components/FeedGroupIconSvg.ts similarity index 88% rename from project/app/src/features/feed/components/FeedGroupIconSvg.ts rename to project/app/src/app/feed/components/FeedGroupIconSvg.ts index b40b710..38ba439 100644 --- a/project/app/src/features/feed/components/FeedGroupIconSvg.ts +++ b/project/app/src/app/feed/components/FeedGroupIconSvg.ts @@ -1,8 +1,8 @@ import { sha256, toUtf8Bytes } from "ethers"; import jazzicon from "jazzicon-ts"; -import { RssSvg } from "~/assets/svgs/RssSvg"; -import { postDb } from "~/features/feed/database/client"; -import { html } from "~/shared/html"; +import { postDb } from "~/app/feed/database/client.ts"; +import { RssSvg } from "~/assets/svgs/RssSvg.ts"; +import { html } from "~/shared/html.ts"; export function FeedGroupIconSvg( group: ReturnType<(typeof postDb.lastVersion.models.FeedGroup)["parser"]>, diff --git a/project/app/src/features/feed/components/SelectSenderButton.ts b/project/app/src/app/feed/components/SelectSenderButton.ts similarity index 88% rename from project/app/src/features/feed/components/SelectSenderButton.ts rename to project/app/src/app/feed/components/SelectSenderButton.ts index 63bb25e..925f6dc 100644 --- a/project/app/src/features/feed/components/SelectSenderButton.ts +++ b/project/app/src/app/feed/components/SelectSenderButton.ts @@ -1,9 +1,6 @@ import { fragment, ref, Signal, tags } from "@purifyjs/core"; -import { - SelectedSender, - SelectSenderPopover, -} from "~/features/feed/components/SelectSenderPopover"; -import { css, useScope } from "~/shared/css"; +import { SelectedSender, SelectSenderPopover } from "~/app/feed/components/SelectSenderPopover.ts"; +import { css, useScope } from "~/shared/css.ts"; const { button, img } = tags; diff --git a/project/app/src/features/feed/components/SelectSenderPopover.ts b/project/app/src/app/feed/components/SelectSenderPopover.ts similarity index 94% rename from project/app/src/features/feed/components/SelectSenderPopover.ts rename to project/app/src/app/feed/components/SelectSenderPopover.ts index 7be0930..fe40328 100644 --- a/project/app/src/features/feed/components/SelectSenderPopover.ts +++ b/project/app/src/app/feed/components/SelectSenderPopover.ts @@ -1,5 +1,5 @@ import { tags } from "@purifyjs/core"; -import { Config, config } from "~/shared/config"; +import { Config, config } from "~/shared/config.ts"; const { div, button, ul, li } = tags; diff --git a/project/app/src/features/feed/database/client.ts b/project/app/src/app/feed/database/client.ts similarity index 93% rename from project/app/src/features/feed/database/client.ts rename to project/app/src/app/feed/database/client.ts index 7c58efa..60dc595 100644 --- a/project/app/src/features/feed/database/client.ts +++ b/project/app/src/app/feed/database/client.ts @@ -1,7 +1,7 @@ import { bigint, literal, number, object, string, union } from "zod"; -import { Feed } from "~/features/feed/lib/Feed"; -import { DB } from "~/shared/db/mod"; -import { Address, Hex } from "~/shared/solidity/primatives"; +import { Feed } from "~/app/feed/lib/Feed.ts"; +import { DB } from "~/domains/db/mod.ts"; +import { Address, Hex } from "~/shared/solidity/primatives.ts"; const indexedDbVersionKey = "indexed-db-version:knochi.posts"; const version = "2"; diff --git a/project/app/src/app/feed/feedGroupFormDialog.ts b/project/app/src/app/feed/feedGroupFormDialog.ts index a4c799b..4c94cf6 100644 --- a/project/app/src/app/feed/feedGroupFormDialog.ts +++ b/project/app/src/app/feed/feedGroupFormDialog.ts @@ -1,8 +1,8 @@ import { tags } from "@purifyjs/core"; -import { FeedGroupForm } from "~/features/feed/components/FeedGroupForm"; -import { useClickClose } from "~/shared/effects/useClickClose"; -import { useCloseOnDisconnect } from "~/shared/effects/useCloseOnDisconnect"; -import { Router } from "~/shared/router/mod"; +import { FeedGroupForm } from "~/app/feed/components/FeedGroupForm.ts"; +import { Router } from "~/domains/router/mod.ts"; +import { useClickClose } from "~/shared/effects/useClickClose.ts"; +import { useCloseOnDisconnect } from "~/shared/effects/useCloseOnDisconnect.ts"; const { dialog } = tags; diff --git a/project/app/src/features/feed/lib/Feed.ts b/project/app/src/app/feed/lib/Feed.ts similarity index 96% rename from project/app/src/features/feed/lib/Feed.ts rename to project/app/src/app/feed/lib/Feed.ts index 0d254dc..71a1bd9 100644 --- a/project/app/src/features/feed/lib/Feed.ts +++ b/project/app/src/app/feed/lib/Feed.ts @@ -1,8 +1,8 @@ import { PostIndexer } from "@root/contracts/connect"; import { JsonRpcProvider } from "ethers"; -import { config } from "~/shared/config"; -import { Address, Hex } from "~/shared/solidity/primatives"; -import { Post } from "./Post"; +import { config } from "~/shared/config.ts"; +import { Address, Hex } from "~/shared/solidity/primatives.ts"; +import { Post } from "./Post.ts"; export namespace Feed { export type Init = { diff --git a/project/app/src/features/feed/lib/Post.ts b/project/app/src/app/feed/lib/Post.ts similarity index 93% rename from project/app/src/features/feed/lib/Post.ts rename to project/app/src/app/feed/lib/Post.ts index 8d57bf2..0a406c5 100644 --- a/project/app/src/features/feed/lib/Post.ts +++ b/project/app/src/app/feed/lib/Post.ts @@ -1,10 +1,10 @@ import { PostIndexer, PostStore } from "@root/contracts/connect"; import { BytesLike, JsonRpcProvider, solidityPackedKeccak256, toBeHex, toBigInt } from "ethers"; -import { postDb } from "~/features/feed/database/client"; -import { Feed } from "~/features/feed/lib/Feed"; -import { PostContent } from "~/features/feed/lib/PostContent"; -import { Config } from "~/shared/config"; -import { Address, Hex } from "~/shared/solidity/primatives"; +import { postDb } from "~/app/feed/database/client.ts"; +import { Feed } from "~/app/feed/lib/Feed.ts"; +import { PostContent } from "~/app/feed/lib/PostContent.ts"; +import { Config } from "~/shared/config.ts"; +import { Address, Hex } from "~/shared/solidity/primatives.ts"; export type PostLoadParams = { network: Config.Network; diff --git a/project/app/src/features/feed/lib/PostContent.ts b/project/app/src/app/feed/lib/PostContent.ts similarity index 97% rename from project/app/src/features/feed/lib/PostContent.ts rename to project/app/src/app/feed/lib/PostContent.ts index cdff0a2..d2fe635 100644 --- a/project/app/src/features/feed/lib/PostContent.ts +++ b/project/app/src/app/feed/lib/PostContent.ts @@ -1,5 +1,5 @@ import { BytesLike, toBeArray, toUtf8Bytes } from "ethers"; -import { Utils } from "~/shared/types/utils"; +import { Utils } from "~/shared/types/utils.ts"; export type PostContent = PostContent.Part[]; export namespace PostContent { diff --git a/project/app/src/app/feed/routes.ts b/project/app/src/app/feed/routes.ts index c4a35f8..280bd5c 100644 --- a/project/app/src/app/feed/routes.ts +++ b/project/app/src/app/feed/routes.ts @@ -1,6 +1,6 @@ -import { FeedPage } from "~/app/feed/FeedPage"; -import { Feed } from "~/features/feed/lib/Feed"; -import { Router } from "~/shared/router/mod"; +import { FeedPage } from "~/app/feed/FeedPage.ts"; +import { Feed } from "~/app/feed/lib/Feed.ts"; +import { Router } from "~/domains/router/mod.ts"; export const feedRoutes = { feed: new Router.Route({ diff --git a/project/app/src/app/Layout.ts b/project/app/src/app/layout/Layout.ts similarity index 90% rename from project/app/src/app/Layout.ts rename to project/app/src/app/layout/Layout.ts index 8ed429d..38a4ebb 100644 --- a/project/app/src/app/Layout.ts +++ b/project/app/src/app/layout/Layout.ts @@ -1,12 +1,12 @@ -import "./styles"; +import "~/app/styles.ts"; import { tags } from "@purifyjs/core"; -import { Header } from "~/app/header/Header"; -import { Main } from "~/app/Main"; -import { menuSearchParam } from "~/app/routes"; -import { usePart } from "~/shared/effects/userPart"; -import { css, useScope } from "../shared/css"; -import { layoutBrakpoint } from "./styles"; +import { Header } from "~/app/layout/header/Header.ts"; +import { Main } from "~/app/layout/Main.ts"; +import { menuSearchParam } from "~/app/layout/routes"; +import { layoutBrakpoint } from "~/app/styles.ts"; +import { css, useScope } from "~/shared/css.ts"; +import { usePart } from "~/shared/effects/usePart.ts"; const { div } = tags; diff --git a/project/app/src/app/Main.ts b/project/app/src/app/layout/Main.ts similarity index 83% rename from project/app/src/app/Main.ts rename to project/app/src/app/layout/Main.ts index 3e5e132..4651e10 100644 --- a/project/app/src/app/Main.ts +++ b/project/app/src/app/layout/Main.ts @@ -1,14 +1,14 @@ import { awaited, computed, tags } from "@purifyjs/core"; -import { PostThread } from "~/app/feed/PostThread"; -import { postSearchParam } from "~/app/feed/routes"; -import { router } from "~/app/router"; -import { menuSearchParam } from "~/app/routes"; -import { layoutBrakpoint } from "~/app/styles"; -import { BackSvg } from "~/assets/svgs/BackSvg"; -import { CloseSvg } from "~/assets/svgs/CloseSvg"; -import { Post } from "~/features/feed/lib/Post"; -import { config } from "~/shared/config"; -import { css, useScope } from "~/shared/css"; +import { Post } from "~/app/feed/lib/Post.ts"; +import { PostThread } from "~/app/feed/PostThread.ts"; +import { postSearchParam } from "~/app/feed/routes.ts"; +import { menuSearchParam } from "~/app/layout/routes"; +import { router } from "~/app/router.ts"; +import { layoutBrakpoint } from "~/app/styles.ts"; +import { BackSvg } from "~/assets/svgs/BackSvg.ts"; +import { CloseSvg } from "~/assets/svgs/CloseSvg.ts"; +import { config } from "~/shared/config.ts"; +import { css, useScope } from "~/shared/css.ts"; const { section, main, header, a, strong } = tags; diff --git a/project/app/src/app/header/FeedGroupTabList.ts b/project/app/src/app/layout/header/FeedGroupTabList.ts similarity index 85% rename from project/app/src/app/header/FeedGroupTabList.ts rename to project/app/src/app/layout/header/FeedGroupTabList.ts index cfb4b47..5acb956 100644 --- a/project/app/src/app/header/FeedGroupTabList.ts +++ b/project/app/src/app/layout/header/FeedGroupTabList.ts @@ -1,11 +1,11 @@ import { tags } from "@purifyjs/core"; -import { feedGroupFormDialogSearchParam } from "~/app/feed/feedGroupFormDialog"; -import { feedGroupSearchParam } from "~/app/feed/routes"; -import { CreateFolderSvg } from "~/assets/svgs/CreateFolderSvg"; -import { RssSvg } from "~/assets/svgs/RssSvg"; -import { FeedGroupIconSvg } from "~/features/feed/components/FeedGroupIconSvg"; -import { postDb } from "~/features/feed/database/client"; -import { css, useScope } from "~/shared/css"; +import { FeedGroupIconSvg } from "~/app/feed/components/FeedGroupIconSvg.ts"; +import { postDb } from "~/app/feed/database/client.ts"; +import { feedGroupFormDialogSearchParam } from "~/app/feed/feedGroupFormDialog.ts"; +import { feedGroupSearchParam } from "~/app/feed/routes.ts"; +import { CreateFolderSvg } from "~/assets/svgs/CreateFolderSvg.ts"; +import { RssSvg } from "~/assets/svgs/RssSvg.ts"; +import { css, useScope } from "~/shared/css.ts"; const { div, hr, a } = tags; diff --git a/project/app/src/app/header/FeedGroupTabPanel.ts b/project/app/src/app/layout/header/FeedGroupTabPanel.ts similarity index 83% rename from project/app/src/app/header/FeedGroupTabPanel.ts rename to project/app/src/app/layout/header/FeedGroupTabPanel.ts index 2d98f5f..03f9d5c 100644 --- a/project/app/src/app/header/FeedGroupTabPanel.ts +++ b/project/app/src/app/layout/header/FeedGroupTabPanel.ts @@ -1,14 +1,13 @@ import { awaited, tags } from "@purifyjs/core"; -import { feedGroupSearchParam } from "~/app/feed/routes"; -import { router } from "~/app/router"; -import { TrashcanSvg } from "~/assets/svgs/TrashcanSvg"; -import { FeedGroupIconSvg } from "~/features/feed/components/FeedGroupIconSvg"; -import { postDb } from "~/features/feed/database/client"; -import { css, useScope } from "~/shared/css"; -import { useClass } from "~/shared/effects/useClass"; -import { Router } from "~/shared/router/mod"; -import { WalletAddress } from "~/shared/wallet/components/WalletAddress"; -import { WalletAvatarSvg } from "~/shared/wallet/components/WalletAvatarSvg"; +import { FeedGroupIconSvg } from "~/app/feed/components/FeedGroupIconSvg.ts"; +import { postDb } from "~/app/feed/database/client.ts"; +import { feedGroupSearchParam } from "~/app/feed/routes.ts"; +import { router } from "~/app/router.ts"; +import { TrashcanSvg } from "~/assets/svgs/TrashcanSvg.ts"; +import { Router } from "~/domains/router/mod.ts"; +import { WalletAddress, WalletAvatarSvg } from "~/domains/wallet/mod.ts"; +import { css, useScope } from "~/shared/css.ts"; +import { useClass } from "~/shared/effects/useClass.ts"; const { div, strong, small, button, a, header } = tags; diff --git a/project/app/src/app/header/Header.ts b/project/app/src/app/layout/header/Header.ts similarity index 79% rename from project/app/src/app/header/Header.ts rename to project/app/src/app/layout/header/Header.ts index df8a065..20a9bc4 100644 --- a/project/app/src/app/header/Header.ts +++ b/project/app/src/app/layout/header/Header.ts @@ -1,16 +1,18 @@ import { awaited, computed, tags } from "@purifyjs/core"; -import { feedGroupFormDialogSearchParam } from "~/app/feed/feedGroupFormDialog"; -import { feedGroupSearchParam } from "~/app/feed/routes"; -import { FeedGroupTabList } from "~/app/header/FeedGroupTabList"; -import { FeedGroupTabPanel } from "~/app/header/FeedGroupTabPanel"; -import { router } from "~/app/router"; -import { postDb } from "~/features/feed/database/client"; -import { css, useScope } from "~/shared/css"; -import { Address } from "~/shared/solidity/primatives"; -import { WalletAddress } from "~/shared/wallet/components/WalletAddress"; -import { WalletAvatarSvg } from "~/shared/wallet/components/WalletAvatarSvg"; -import { connectWallet } from "~/shared/wallet/connectDialog"; -import { currentWalletDetail } from "~/shared/wallet/utils"; +import { postDb } from "~/app/feed/database/client.ts"; +import { feedGroupFormDialogSearchParam } from "~/app/feed/feedGroupFormDialog.ts"; +import { feedGroupSearchParam } from "~/app/feed/routes.ts"; +import { FeedGroupTabList } from "~/app/layout/header/FeedGroupTabList.ts"; +import { FeedGroupTabPanel } from "~/app/layout/header/FeedGroupTabPanel.ts"; +import { router } from "~/app/router.ts"; +import { + connectWallet, + currentWalletDetail, + WalletAddress, + WalletAvatarSvg, +} from "~/domains/wallet/mod.ts"; +import { css, useScope } from "~/shared/css.ts"; +import { Address } from "~/shared/solidity/primatives.ts"; const { div, header, a, section } = tags; diff --git a/project/app/src/app/layout/routes.ts b/project/app/src/app/layout/routes.ts new file mode 100644 index 0000000..925d37c --- /dev/null +++ b/project/app/src/app/layout/routes.ts @@ -0,0 +1,3 @@ +import { Router } from "~/domains/router/mod.ts"; + +export const menuSearchParam = new Router.SearchParam<"open">("menu"); diff --git a/project/app/src/app/profile/ProfileView.ts b/project/app/src/app/profile/ProfileView.ts index b7de4a2..4de0442 100644 --- a/project/app/src/app/profile/ProfileView.ts +++ b/project/app/src/app/profile/ProfileView.ts @@ -1,12 +1,12 @@ import { tags } from "@purifyjs/core"; -import { FeedScroller } from "~/app/feed/FeedScroller"; -import { FeedForm } from "~/features/feed/components/FeedForm"; -import { FeedGroupAddFormPopoverButton } from "~/features/feed/components/FeedGroupAddFormPopoverButton"; -import { Feed } from "~/features/feed/lib/Feed"; -import { config } from "~/shared/config"; -import { css, useScope } from "~/shared/css"; -import { usePart } from "~/shared/effects/userPart"; -import { Address } from "~/shared/solidity/primatives"; +import { FeedScroller } from "~/app/feed/FeedScroller.ts"; +import { FeedForm } from "~/app/feed/components/FeedForm.ts"; +import { FeedGroupAddFormPopoverButton } from "~/app/feed/components/FeedGroupAddFormPopoverButton.ts"; +import { Feed } from "~/app/feed/lib/Feed.ts"; +import { config } from "~/shared/config.ts"; +import { css, useScope } from "~/shared/css.ts"; +import { usePart } from "~/shared/effects/usePart.ts"; +import { Address } from "~/shared/solidity/primatives.ts"; const { div } = tags; diff --git a/project/app/src/app/profile/routes.ts b/project/app/src/app/profile/routes.ts index 336d857..d4e5229 100644 --- a/project/app/src/app/profile/routes.ts +++ b/project/app/src/app/profile/routes.ts @@ -1,6 +1,6 @@ -import { ProfileView } from "~/app/profile/ProfileView"; -import { Router } from "~/shared/router/mod"; -import { Address } from "~/shared/solidity/primatives"; +import { ProfileView } from "~/app/profile/ProfileView.ts"; +import { Router } from "~/domains/router/mod.ts"; +import { Address } from "~/shared/solidity/primatives.ts"; export const profileRoutes = { profile: new Router.Route({ diff --git a/project/app/src/app/router.ts b/project/app/src/app/router.ts index 51560db..47b2c1f 100644 --- a/project/app/src/app/router.ts +++ b/project/app/src/app/router.ts @@ -1,4 +1,8 @@ -import { appRoutes } from "~/app/routes"; -import { Router } from "~/shared/router/mod"; +import { feedRoutes } from "~/app/feed/routes.ts"; +import { profileRoutes } from "~/app/profile/routes.ts"; +import { Router } from "~/domains/router/mod.ts"; -export const router = new Router.Client(appRoutes); +export const router = new Router.Client({ + ...profileRoutes, + ...feedRoutes, +}); diff --git a/project/app/src/app/routes.ts b/project/app/src/app/routes.ts deleted file mode 100644 index ae21441..0000000 --- a/project/app/src/app/routes.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { feedRoutes } from "~/app/feed/routes"; -import { profileRoutes } from "~/app/profile/routes"; -import { Router } from "~/shared/router/mod"; - -export const appRoutes = { - ...profileRoutes, - ...feedRoutes, -}; -export const menuSearchParam = new Router.SearchParam<"open">("menu"); diff --git a/project/app/src/app/styles.ts b/project/app/src/app/styles.ts index 5a9548e..43d0c5c 100644 --- a/project/app/src/app/styles.ts +++ b/project/app/src/app/styles.ts @@ -1,4 +1,4 @@ -import { css, sheet } from "~/shared/css"; +import { css, sheet } from "~/shared/css.ts"; export const layoutBrakpoint = "45em"; diff --git a/project/app/src/assets/svgs/ArrowDownSvg.ts b/project/app/src/assets/svgs/ArrowDownSvg.ts index 8699f12..278850e 100644 --- a/project/app/src/assets/svgs/ArrowDownSvg.ts +++ b/project/app/src/assets/svgs/ArrowDownSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function ArrowDownSvg() { return html` diff --git a/project/app/src/assets/svgs/BackSvg.ts b/project/app/src/assets/svgs/BackSvg.ts index 6eb4e12..6ddf7c2 100644 --- a/project/app/src/assets/svgs/BackSvg.ts +++ b/project/app/src/assets/svgs/BackSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function BackSvg() { return html` diff --git a/project/app/src/assets/svgs/CloseSvg.ts b/project/app/src/assets/svgs/CloseSvg.ts index fc8ae25..6e8ffa8 100644 --- a/project/app/src/assets/svgs/CloseSvg.ts +++ b/project/app/src/assets/svgs/CloseSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function CloseSvg() { return html` diff --git a/project/app/src/assets/svgs/CreateFolderSvg.ts b/project/app/src/assets/svgs/CreateFolderSvg.ts index fae5564..1998e84 100644 --- a/project/app/src/assets/svgs/CreateFolderSvg.ts +++ b/project/app/src/assets/svgs/CreateFolderSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function CreateFolderSvg() { return html` diff --git a/project/app/src/assets/svgs/ErrorSvg.ts b/project/app/src/assets/svgs/ErrorSvg.ts index 2157315..f2c157d 100644 --- a/project/app/src/assets/svgs/ErrorSvg.ts +++ b/project/app/src/assets/svgs/ErrorSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function ErrorSvg() { return html` diff --git a/project/app/src/assets/svgs/HomeSvg.ts b/project/app/src/assets/svgs/HomeSvg.ts index 2c9966a..d89f473 100644 --- a/project/app/src/assets/svgs/HomeSvg.ts +++ b/project/app/src/assets/svgs/HomeSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function HomeSvg(options: { filled: boolean }) { return html` diff --git a/project/app/src/assets/svgs/LoadingSvg.ts b/project/app/src/assets/svgs/LoadingSvg.ts index 58b2722..2a32db5 100644 --- a/project/app/src/assets/svgs/LoadingSvg.ts +++ b/project/app/src/assets/svgs/LoadingSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function LoadingSvg() { return html` diff --git a/project/app/src/assets/svgs/ReloadSvg.ts b/project/app/src/assets/svgs/ReloadSvg.ts index 6a68830..c4a8d16 100644 --- a/project/app/src/assets/svgs/ReloadSvg.ts +++ b/project/app/src/assets/svgs/ReloadSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function ReloadSvg() { return html` diff --git a/project/app/src/assets/svgs/RssSvg.ts b/project/app/src/assets/svgs/RssSvg.ts index affe68e..07878f8 100644 --- a/project/app/src/assets/svgs/RssSvg.ts +++ b/project/app/src/assets/svgs/RssSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function RssSvg() { return html` diff --git a/project/app/src/assets/svgs/SingleLetterSvg.ts b/project/app/src/assets/svgs/SingleLetterSvg.ts index 6fa462c..38d34f6 100644 --- a/project/app/src/assets/svgs/SingleLetterSvg.ts +++ b/project/app/src/assets/svgs/SingleLetterSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function SingleLetterSvg( letter: T extends `${infer L}${string}` ? L : T, diff --git a/project/app/src/assets/svgs/SuccessSvg.ts b/project/app/src/assets/svgs/SuccessSvg.ts index a410c7f..18f4fef 100644 --- a/project/app/src/assets/svgs/SuccessSvg.ts +++ b/project/app/src/assets/svgs/SuccessSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function SuccessSvg() { return html` diff --git a/project/app/src/assets/svgs/TrashcanSvg.ts b/project/app/src/assets/svgs/TrashcanSvg.ts index 3031bee..1ed158c 100644 --- a/project/app/src/assets/svgs/TrashcanSvg.ts +++ b/project/app/src/assets/svgs/TrashcanSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function TrashcanSvg() { return html` diff --git a/project/app/src/assets/svgs/UserSvg.ts b/project/app/src/assets/svgs/UserSvg.ts index 39ba82c..d40079e 100644 --- a/project/app/src/assets/svgs/UserSvg.ts +++ b/project/app/src/assets/svgs/UserSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function UserSvg(options: { filled: boolean }) { return html` diff --git a/project/app/src/assets/svgs/WalletSvg.ts b/project/app/src/assets/svgs/WalletSvg.ts index 538264f..36528ef 100644 --- a/project/app/src/assets/svgs/WalletSvg.ts +++ b/project/app/src/assets/svgs/WalletSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function WalletSvg() { return html` diff --git a/project/app/src/assets/svgs/chains/BitcoinSvg.ts b/project/app/src/assets/svgs/chains/BitcoinSvg.ts index faa2f82..c3f8408 100644 --- a/project/app/src/assets/svgs/chains/BitcoinSvg.ts +++ b/project/app/src/assets/svgs/chains/BitcoinSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function BitcoinSvg(size = "100%") { return html` diff --git a/project/app/src/assets/svgs/chains/EthereumSvg.ts b/project/app/src/assets/svgs/chains/EthereumSvg.ts index 8364726..4c56d75 100644 --- a/project/app/src/assets/svgs/chains/EthereumSvg.ts +++ b/project/app/src/assets/svgs/chains/EthereumSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function EthereumSvg(size = "100%") { return html` diff --git a/project/app/src/assets/svgs/chains/PolygonSvg.ts b/project/app/src/assets/svgs/chains/PolygonSvg.ts index 470b880..fab8212 100644 --- a/project/app/src/assets/svgs/chains/PolygonSvg.ts +++ b/project/app/src/assets/svgs/chains/PolygonSvg.ts @@ -1,4 +1,4 @@ -import { html } from "~/shared/html"; +import { html } from "~/shared/html.ts"; export function PolygonSvg(size = "100%") { return html` diff --git a/project/app/src/shared/db/mod.ts b/project/app/src/domains/db/mod.ts similarity index 100% rename from project/app/src/shared/db/mod.ts rename to project/app/src/domains/db/mod.ts diff --git a/project/app/src/shared/progress/mod.ts b/project/app/src/domains/progress/mod.ts similarity index 92% rename from project/app/src/shared/progress/mod.ts rename to project/app/src/domains/progress/mod.ts index cd06c13..6ae7a9a 100644 --- a/project/app/src/shared/progress/mod.ts +++ b/project/app/src/domains/progress/mod.ts @@ -1,8 +1,8 @@ import { fragment, MemberOf, ref, tags } from "@purifyjs/core"; -import { ErrorSvg } from "~/assets/svgs/ErrorSvg"; -import { LoadingSvg } from "~/assets/svgs/LoadingSvg"; -import { SuccessSvg } from "~/assets/svgs/SuccessSvg"; -import { css, useScope } from "~/shared/css"; +import { ErrorSvg } from "~/assets/svgs/ErrorSvg.ts"; +import { LoadingSvg } from "~/assets/svgs/LoadingSvg.ts"; +import { SuccessSvg } from "~/assets/svgs/SuccessSvg.ts"; +import { css, useScope } from "~/shared/css.ts"; const DELETE_TIMEOUT_MS = 5 * 1000; diff --git a/project/app/src/shared/router/mod.ts b/project/app/src/domains/router/mod.ts similarity index 99% rename from project/app/src/shared/router/mod.ts rename to project/app/src/domains/router/mod.ts index 450c7ae..a28ecf1 100644 --- a/project/app/src/shared/router/mod.ts +++ b/project/app/src/domains/router/mod.ts @@ -1,5 +1,5 @@ import { MemberOf, ref, Signal } from "@purifyjs/core"; -import { catchError } from "~/shared/catch"; +import { catchError } from "~/shared/catch.ts"; const hashSignal = ref(getHash()); setInterval(() => (hashSignal.val = getHash()), 100); diff --git a/project/app/src/shared/wallet/assets/eip1193.svg b/project/app/src/domains/wallet/assets/eip1193.svg similarity index 100% rename from project/app/src/shared/wallet/assets/eip1193.svg rename to project/app/src/domains/wallet/assets/eip1193.svg diff --git a/project/app/src/shared/wallet/components/ConnectWalletDialog.ts b/project/app/src/domains/wallet/components/ConnectWalletDialog.ts similarity index 82% rename from project/app/src/shared/wallet/components/ConnectWalletDialog.ts rename to project/app/src/domains/wallet/components/ConnectWalletDialog.ts index 6789672..072aa01 100644 --- a/project/app/src/shared/wallet/components/ConnectWalletDialog.ts +++ b/project/app/src/domains/wallet/components/ConnectWalletDialog.ts @@ -1,9 +1,9 @@ import { Signal, tags } from "@purifyjs/core"; -import { Config } from "~/shared/config"; -import { css, useScope } from "~/shared/css"; -import { useClickClose } from "~/shared/effects/useClickClose"; -import { useCloseOnDisconnect } from "~/shared/effects/useCloseOnDisconnect"; -import { WalletList } from "~/shared/wallet/components/WalletList"; +import { WalletList } from "~/domains/wallet/components/WalletList.ts"; +import { Config } from "~/shared/config.ts"; +import { css, useScope } from "~/shared/css.ts"; +import { useClickClose } from "~/shared/effects/useClickClose.ts"; +import { useCloseOnDisconnect } from "~/shared/effects/useCloseOnDisconnect.ts"; const { dialog, form, strong } = tags; diff --git a/project/app/src/shared/wallet/components/WalletAddress.ts b/project/app/src/domains/wallet/components/WalletAddress.ts similarity index 85% rename from project/app/src/shared/wallet/components/WalletAddress.ts rename to project/app/src/domains/wallet/components/WalletAddress.ts index 892fc81..45722c4 100644 --- a/project/app/src/shared/wallet/components/WalletAddress.ts +++ b/project/app/src/domains/wallet/components/WalletAddress.ts @@ -1,6 +1,6 @@ import { tags } from "@purifyjs/core"; -import { css, useScope } from "~/shared/css"; -import { Address } from "~/shared/solidity/primatives"; +import { css, useScope } from "~/shared/css.ts"; +import { Address } from "~/shared/solidity/primatives.ts"; const { span } = tags; diff --git a/project/app/src/shared/wallet/components/WalletAvatarSvg.ts b/project/app/src/domains/wallet/components/WalletAvatarSvg.ts similarity index 87% rename from project/app/src/shared/wallet/components/WalletAvatarSvg.ts rename to project/app/src/domains/wallet/components/WalletAvatarSvg.ts index 1708f26..7164c57 100644 --- a/project/app/src/shared/wallet/components/WalletAvatarSvg.ts +++ b/project/app/src/domains/wallet/components/WalletAvatarSvg.ts @@ -1,5 +1,5 @@ import jazzicon from "jazzicon-ts"; -import { Address } from "~/shared/solidity/primatives"; +import { Address } from "~/shared/solidity/primatives.ts"; export function WalletAvatarSvg(address: Address) { const iconWrapper = jazzicon(64, parseInt(address.slice(2, 10), 16)); diff --git a/project/app/src/shared/wallet/components/WalletList.ts b/project/app/src/domains/wallet/components/WalletList.ts similarity index 92% rename from project/app/src/shared/wallet/components/WalletList.ts rename to project/app/src/domains/wallet/components/WalletList.ts index 6ee711e..54e333f 100644 --- a/project/app/src/shared/wallet/components/WalletList.ts +++ b/project/app/src/domains/wallet/components/WalletList.ts @@ -1,9 +1,9 @@ import { tags } from "@purifyjs/core"; import { JsonRpcSigner } from "ethers"; -import { Config } from "~/shared/config"; -import { css, useScope } from "~/shared/css"; -import { trackPromise } from "~/shared/progress/mod"; -import { getOrRequestSigner, walletDetails } from "../utils"; +import { trackPromise } from "~/domains/progress/mod.ts"; +import { Config } from "~/shared/config.ts"; +import { css, useScope } from "~/shared/css.ts"; +import { getOrRequestSigner, walletDetails } from "../utils.ts"; const { div, span, button, img, picture, ul, li } = tags; diff --git a/project/app/src/shared/wallet/connectDialog.ts b/project/app/src/domains/wallet/connectDialog.ts similarity index 73% rename from project/app/src/shared/wallet/connectDialog.ts rename to project/app/src/domains/wallet/connectDialog.ts index 991823c..9fcbdb3 100644 --- a/project/app/src/shared/wallet/connectDialog.ts +++ b/project/app/src/domains/wallet/connectDialog.ts @@ -1,8 +1,8 @@ import { computed } from "@purifyjs/core"; -import { catchError } from "~/shared/catch"; -import { config, Config } from "~/shared/config"; -import { Router } from "~/shared/router/mod"; -import { ConnectWalletDialog } from "~/shared/wallet/components/ConnectWalletDialog"; +import { Router } from "~/domains/router/mod.ts"; +import { ConnectWalletDialog } from "~/domains/wallet/components/ConnectWalletDialog.ts"; +import { catchError } from "~/shared/catch.ts"; +import { config, Config } from "~/shared/config.ts"; const searchParam = new Router.SearchParam<`${Config.Network.ChainId}` | "open">("connect"); const network = computed(() => { diff --git a/project/app/src/domains/wallet/mod.ts b/project/app/src/domains/wallet/mod.ts new file mode 100644 index 0000000..e0cfa13 --- /dev/null +++ b/project/app/src/domains/wallet/mod.ts @@ -0,0 +1,6 @@ +export * from "./components/ConnectWalletDialog.ts"; +export * from "./components/WalletAddress.ts"; +export * from "./components/WalletAvatarSvg.ts"; +export * from "./components/WalletList.ts"; +export * from "./connectDialog.ts"; +export * from "./utils.ts"; diff --git a/project/app/src/shared/wallet/utils.ts b/project/app/src/domains/wallet/utils.ts similarity index 99% rename from project/app/src/shared/wallet/utils.ts rename to project/app/src/domains/wallet/utils.ts index db2ac71..2ff4c17 100644 --- a/project/app/src/shared/wallet/utils.ts +++ b/project/app/src/domains/wallet/utils.ts @@ -1,6 +1,6 @@ import { ref, Signal } from "@purifyjs/core"; import { BrowserProvider, JsonRpcSigner, Network } from "ethers"; -import { Config } from "~/shared/config"; +import { Config } from "~/shared/config.ts"; import eip1193IconSrc from "./assets/eip1193.svg?url"; interface Eip1193Provider { isStatus?: boolean; // Optional: Indicates the status of the provider diff --git a/project/app/src/shared/config.ts b/project/app/src/shared/config.ts index 40d547e..53ce569 100644 --- a/project/app/src/shared/config.ts +++ b/project/app/src/shared/config.ts @@ -1,8 +1,8 @@ import { ref } from "@purifyjs/core"; import { bigint, number, object, record, string, tuple } from "zod"; import logoSrc from "~/assets/svgs/chains/bitcoin.svg?url"; -import { catchError } from "~/shared/catch"; -import { Address } from "~/shared/solidity/primatives"; +import { catchError } from "~/shared/catch.ts"; +import { Address } from "~/shared/solidity/primatives.ts"; export type Config = { readonly networks: { diff --git a/project/app/src/shared/effects/userPart.ts b/project/app/src/shared/effects/usePart.ts similarity index 100% rename from project/app/src/shared/effects/userPart.ts rename to project/app/src/shared/effects/usePart.ts diff --git a/project/app/src/shared/language.ts b/project/app/src/shared/language.ts index 7100586..673109d 100644 --- a/project/app/src/shared/language.ts +++ b/project/app/src/shared/language.ts @@ -1,4 +1,4 @@ -import { config } from "~/shared/config"; +import { config } from "~/shared/config.ts"; type AcceptedLanguage = (typeof ACCEPTED_LANGUAGES)[number]; const ACCEPTED_LANGUAGES = ["en-US"] as const; diff --git a/project/app/src/shared/time.ts b/project/app/src/shared/time.ts index 230977e..7f000e0 100644 --- a/project/app/src/shared/time.ts +++ b/project/app/src/shared/time.ts @@ -1,4 +1,4 @@ -import { language } from "~/shared/language"; +import { language } from "~/shared/language.ts"; const intervals = [ [60, "second"], // seconds to minutes diff --git a/project/contracts/connect.ts b/project/contracts/connect.ts index 9a2ca3e..a042552 100644 --- a/project/contracts/connect.ts +++ b/project/contracts/connect.ts @@ -1,9 +1,9 @@ import type { TypedContract } from "@nomadshiba/typed-contracts/ethers6"; import { BytesLike, Contract, ContractRunner } from "ethers"; -import { Address, Hex } from "~/shared/solidity/primatives"; -import { PostIndexer_ABI } from "./artifacts/PostIndexer"; -import { PostStore_ABI } from "./artifacts/PostStore"; -import { PostStore_Plain_ABI } from "./artifacts/PostStore_Plain"; +import { Address, Hex } from "~/shared/solidity/primatives.ts"; +import { PostIndexer_ABI } from "./artifacts/PostIndexer.ts"; +import { PostStore_ABI } from "./artifacts/PostStore.ts"; +import { PostStore_Plain_ABI } from "./artifacts/PostStore_Plain.ts"; type PrimativeTypeMap = TypedContract.PrimativeTypeMap & { [K in `bytes${bigint | ""}`]: { diff --git a/tsconfig.base.json b/tsconfig.base.json index 0b00d3b..902f479 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,5 +1,8 @@ { "compilerOptions": { + "allowImportingTsExtensions": true, + "allowJs": true, + "allowArbitraryExtensions": true, "skipLibCheck": true, "strict": true, "noUncheckedIndexedAccess": true,