diff --git a/bun.lockb b/bun.lockb index 09b303c..10b56da 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/index.html b/index.html index b708ebe..30df7c4 100644 --- a/index.html +++ b/index.html @@ -3,11 +3,12 @@ - KlectrTemplate + KlectrBan
+
diff --git a/package.json b/package.json index 6d49bd3..6646eaa 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "klectr-template", + "name": "klectrban", "private": true, "version": "0.0.0", "type": "module", @@ -11,7 +11,8 @@ }, "dependencies": { "@tauri-apps/api": "^1", - "kaioken": "^0.10.0" + "async-idb-orm": "^1.0.3", + "kaioken": "^0.12.1" }, "devDependencies": { "@tauri-apps/cli": "^1", @@ -20,6 +21,6 @@ "tailwindcss": "^3.4.1", "typescript": "^5.0.2", "vite": "^5.0.0", - "vite-plugin-kaioken": "^0.0.7" + "vite-plugin-kaioken": "^0.1.1" } } diff --git a/src/HomePage.tsx b/src/HomePage.tsx index 8555ae0..b686238 100644 --- a/src/HomePage.tsx +++ b/src/HomePage.tsx @@ -1,6 +1,5 @@ import "./HomePage.css" import { ActionMenu } from "./components/ActionMenu" -import { Button } from "./components/atoms/Button" import { LogoIcon } from "./components/icons/LogoIcon" import { MoreIcon } from "./components/icons/MoreIcon" import { JsonUtils } from "./idb" diff --git a/src/components/Board.tsx b/src/components/Board.tsx index 5c72724..6af7b47 100644 --- a/src/components/Board.tsx +++ b/src/components/Board.tsx @@ -3,7 +3,6 @@ import { Link, Portal, useEffect, useRef, useState } from "kaioken" import { ItemList } from "./ItemList" import type { Board as BoardType, Vector2 } from "../types" import { useGlobal } from "../state/global" -import { Button } from "./atoms/Button" import { ItemEditorModal } from "./ItemEditor" import { ListEditorModal } from "./ListEditor" import { ListItemClone } from "./ListItemClone" diff --git a/src/components/BoardEditor.tsx b/src/components/BoardEditor.tsx index 463366d..b68b3ae 100644 --- a/src/components/BoardEditor.tsx +++ b/src/components/BoardEditor.tsx @@ -181,6 +181,7 @@ function BoardTagEditor({ tag }: { tag: Tag }) { diff --git a/src/components/ItemList.tsx b/src/components/ItemList.tsx index 407306d..e24a376 100644 --- a/src/components/ItemList.tsx +++ b/src/components/ItemList.tsx @@ -225,6 +225,7 @@ function Item({ item, idx, listId }: ItemProps) { const { clickedItem, setClickedItem, itemDragTarget, setItemDragTarget } = useGlobal() const { + // @ts-ignore value: { tags, itemTags }, removeItemTag } = useBoardTagsStore((state) => [ @@ -233,8 +234,11 @@ function Item({ item, idx, listId }: ItemProps) { ]) const itemItemTags: Array = useMemo(() => { + // @ts-ignore const tagsForThisItem = itemTags.filter((it) => it.itemId === item.id) + // @ts-ignore const mappedTags = tagsForThisItem.map((it) => { + // @ts-ignore const foundTag = tags.find((t) => t.id === it.tagId) if (!foundTag) { void removeItemTag(it) diff --git a/src/state/global.ts b/src/state/global.ts index 0c9eb09..fed550e 100644 --- a/src/state/global.ts +++ b/src/state/global.ts @@ -10,8 +10,10 @@ import { } from "../types" import { addBoard as addBoardDb } from "../idb" +// @ts-ignore export const GlobalCtx = createContext(null) export const GlobalDispatchCtx = + // @ts-ignore createContext<(action: GlobalDispatchAction) => void>(null) export function useGlobal() { diff --git a/src/state/mouse.ts b/src/state/mouse.ts index 9a5692a..0bf821c 100644 --- a/src/state/mouse.ts +++ b/src/state/mouse.ts @@ -6,5 +6,6 @@ type MouseContext = { setValue: (payload: Vector2) => void } +// @ts-ignore export const MouseCtx = createContext(null) export const useMouse = () => useContext(MouseCtx) diff --git a/tsconfig.json b/tsconfig.json index 618eae5..499d307 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ES2022", "useDefineForClassFields": true, "module": "ESNext", - "lib": ["ES2020", "DOM", "DOM.Iterable"], + "lib": ["ES2022", "DOM", "DOM.Iterable"], "skipLibCheck": true, /* Bundler mode */ diff --git a/vite.config.ts b/vite.config.ts index 455ed70..5f26a48 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from "vite"; -import kaioken from "vite-plugin-kaioken"; +import { defineConfig } from "vite" +import kaioken from "vite-plugin-kaioken" // https://vitejs.dev/config/ export default defineConfig({ @@ -11,6 +11,7 @@ export default defineConfig({ jsxFragment: "kaioken.fragment", loader: "tsx", include: ["**/*.tsx", "**/*.ts", "**/*.jsx", "**/*.js"], + sourcemap: false, }, // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` // @@ -25,4 +26,4 @@ export default defineConfig({ ignored: ["**/src-tauri/**"], }, }, -}); +})