From 1e71255371702861e23b07d258c1389471a367c8 Mon Sep 17 00:00:00 2001
From: Joshua Seigler <2583159+seigler@users.noreply.github.com>
Date: Wed, 16 Apr 2025 14:12:23 -0700
Subject: [PATCH] WIP
---
package-lock.json | 82 +++++++---------------
package.json | 4 +-
src/App.tsx | 153 +++++-------------------------------------
src/Dashboard.tsx | 36 ++++++++++
src/Puzzle.tsx | 134 ++++++++++++++++++++++++++++++++++++
src/index.tsx | 19 +++++-
src/useAppModel.ts | 148 ++++------------------------------------
src/usePuzzleModel.ts | 145 +++++++++++++++++++++++++++++++++++++++
vite.config.ts | 3 +-
9 files changed, 389 insertions(+), 335 deletions(-)
create mode 100644 src/Dashboard.tsx
create mode 100644 src/Puzzle.tsx
create mode 100644 src/usePuzzleModel.ts
diff --git a/package-lock.json b/package-lock.json
index 6ebb233..6b0ffb4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,10 +10,12 @@
"license": "MIT",
"dependencies": {
"@solid-primitives/storage": "^4.3.1",
+ "@solidjs/router": "^0.15.3",
"@tauri-apps/api": "^2",
"@tauri-apps/plugin-opener": "^2",
"@tauri-apps/plugin-store": "^2.2.0",
- "solid-js": "^1.9.3"
+ "solid-js": "^1.9.3",
+ "vite-plugin-inline-css-modules": "^0.0.8"
},
"devDependencies": {
"@tauri-apps/cli": "^2",
@@ -299,7 +301,6 @@
"cpu": [
"ppc64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -316,7 +317,6 @@
"cpu": [
"arm"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -333,7 +333,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -350,7 +349,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -367,7 +365,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -384,7 +381,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -401,7 +397,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -418,7 +413,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -435,7 +429,6 @@
"cpu": [
"arm"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -452,7 +445,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -469,7 +461,6 @@
"cpu": [
"ia32"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -486,7 +477,6 @@
"cpu": [
"loong64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -503,7 +493,6 @@
"cpu": [
"mips64el"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -520,7 +509,6 @@
"cpu": [
"ppc64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -537,7 +525,6 @@
"cpu": [
"riscv64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -554,7 +541,6 @@
"cpu": [
"s390x"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -571,7 +557,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -588,7 +573,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -605,7 +589,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -622,7 +605,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -639,7 +621,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -656,7 +637,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -673,7 +653,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -690,7 +669,6 @@
"cpu": [
"ia32"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -707,7 +685,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -777,7 +754,6 @@
"cpu": [
"arm"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -791,7 +767,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -805,7 +780,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -819,7 +793,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -833,7 +806,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -847,7 +819,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -861,7 +832,6 @@
"cpu": [
"arm"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -875,7 +845,6 @@
"cpu": [
"arm"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -889,7 +858,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -903,7 +871,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -917,7 +884,6 @@
"cpu": [
"loong64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -931,7 +897,6 @@
"cpu": [
"ppc64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -945,7 +910,6 @@
"cpu": [
"riscv64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -959,7 +923,6 @@
"cpu": [
"riscv64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -973,7 +936,6 @@
"cpu": [
"s390x"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -987,7 +949,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -1001,7 +962,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -1015,7 +975,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -1029,7 +988,6 @@
"cpu": [
"ia32"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -1043,7 +1001,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "MIT",
"optional": true,
"os": [
@@ -1080,6 +1037,15 @@
"solid-js": "^1.6.12"
}
},
+ "node_modules/@solidjs/router": {
+ "version": "0.15.3",
+ "resolved": "https://registry.npmjs.org/@solidjs/router/-/router-0.15.3.tgz",
+ "integrity": "sha512-iEbW8UKok2Oio7o6Y4VTzLj+KFCmQPGEpm1fS3xixwFBdclFVBvaQVeibl1jys4cujfAK5Kn6+uG2uBm3lxOMw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "solid-js": "^1.8.6"
+ }
+ },
"node_modules/@tauri-apps/api": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.4.1.tgz",
@@ -1374,7 +1340,6 @@
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
- "dev": true,
"license": "MIT"
},
"node_modules/babel-plugin-jsx-dom-expressions": {
@@ -1530,7 +1495,6 @@
"version": "0.25.2",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz",
"integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==",
- "dev": true,
"hasInstallScript": true,
"license": "MIT",
"bin": {
@@ -1581,7 +1545,6 @@
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
@@ -1702,7 +1665,6 @@
"version": "3.3.11",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
- "dev": true,
"funding": [
{
"type": "github",
@@ -1741,14 +1703,12 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
- "dev": true,
"license": "ISC"
},
"node_modules/postcss": {
"version": "8.5.3",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz",
"integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
- "dev": true,
"funding": [
{
"type": "opencollective",
@@ -1777,7 +1737,6 @@
"version": "4.38.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.38.0.tgz",
"integrity": "sha512-5SsIRtJy9bf1ErAOiFMFzl64Ex9X5V7bnJ+WlFMb+zmP459OSWCEG7b0ERZ+PEU7xPt4OG3RHbrp1LJlXxYTrw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "1.0.7"
@@ -1874,7 +1833,6 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
- "dev": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
@@ -1933,10 +1891,9 @@
"license": "ISC"
},
"node_modules/vite": {
- "version": "6.2.4",
- "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.4.tgz",
- "integrity": "sha512-veHMSew8CcRzhL5o8ONjy8gkfmFJAd5Ac16oxBUjlwgX3Gq2Wqr+qNC3TjPIpy7TPV/KporLga5GT9HqdrCizw==",
- "dev": true,
+ "version": "6.2.6",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.6.tgz",
+ "integrity": "sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==",
"license": "MIT",
"dependencies": {
"esbuild": "^0.25.0",
@@ -2004,6 +1961,15 @@
}
}
},
+ "node_modules/vite-plugin-inline-css-modules": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/vite-plugin-inline-css-modules/-/vite-plugin-inline-css-modules-0.0.8.tgz",
+ "integrity": "sha512-RXpGZJ0YW69HjkOBw/1xVeVk677wZ/OPmAbvln2eFG+9dFfq9AQapCb/iZZey/oK8psoHiwb5x2HXv5FM2UPcw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "vite": ">2.0.0-0"
+ }
+ },
"node_modules/vite-plugin-solid": {
"version": "2.11.6",
"resolved": "https://registry.npmjs.org/vite-plugin-solid/-/vite-plugin-solid-2.11.6.tgz",
diff --git a/package.json b/package.json
index cabca8c..5dd1a79 100644
--- a/package.json
+++ b/package.json
@@ -13,10 +13,12 @@
"license": "MIT",
"dependencies": {
"@solid-primitives/storage": "^4.3.1",
+ "@solidjs/router": "^0.15.3",
"@tauri-apps/api": "^2",
"@tauri-apps/plugin-opener": "^2",
"@tauri-apps/plugin-store": "^2.2.0",
- "solid-js": "^1.9.3"
+ "solid-js": "^1.9.3",
+ "vite-plugin-inline-css-modules": "^0.0.8"
},
"devDependencies": {
"@tauri-apps/cli": "^2",
diff --git a/src/App.tsx b/src/App.tsx
index abfa750..49cc4a2 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,141 +1,18 @@
-import { For } from "solid-js";
-import "./App.css";
-import useAppModel from "./useAppModel";
-import FitText from "./FitText";
+import { type JSX } from "solid-js"
-// TODO
-// add routing
-// make overview page with calendar list of puzzles
-// show solved / aced / busted
-// make detail page with puzzle id in path
-// add nav links
-
-function App() {
- const {
- connections,
- store,
- setStore,
- handleGuess,
- handlePinUnpin,
- handleSelectGame,
- handleShuffle,
- handleDeselect,
- getFromPuzzle,
- } = useAppModel();
-
- return (
- Slick Connections
- Slick Connections
+