Merge pull request #500 from Jones8683/main

Switch to Lucide icons, remove some default SEQTA styling from BetterSEQTA+ elements, rename files, and rewrite profile picture system
This commit is contained in:
Aden Lindsay authored and GitHub committed 2026-11-04 12:37:20 +10:30
commit d4c01209fd
240 files changed
+2968 -3672

No files matched your search

+9 -9
View File
@@ -9,7 +9,7 @@ Exhaustive reference for every value that **is** or **would be** included in a B
- Auto-sync (debounce, poll, triggers): `src/background/cloudSettingsAutoSync.ts` - Auto-sync (debounce, poll, triggers): `src/background/cloudSettingsAutoSync.ts`
- Core defaults: `src/seqta/utils/defaultSettings.ts` - Core defaults: `src/seqta/utils/defaultSettings.ts`
- Full-schema initializer: `src/seqta/utils/ensureSyncableStorageDefaults.ts` - Full-schema initializer: `src/seqta/utils/ensureSyncableStorageDefaults.ts`
- In-memory settings + persistence: `src/seqta/utils/listeners/SettingsState.ts` - In-memory settings + persistence: `src/seqta/utils/listeners/settingsState.ts`
- Type definitions: `src/types/storage.ts` - Type definitions: `src/types/storage.ts`
--- ---
@@ -488,13 +488,13 @@ Keys (from `SettingsState`):
#### `shortcuts` #### `shortcuts`
| | | | | |
| -------------- | ------------------------------------------------------------------------------------- | | -------------- | ------------------------------------------------------------------------------------ |
| **Type** | `array` | | **Type** | `array` |
| **Default** | Outlook, Office, Google — each `enabled: true` | | **Default** | Outlook, Office, Google — each `enabled: true` |
| **UI** | Settings → Shortcuts | | **UI** | Settings → Shortcuts |
| **Item shape** | `{ "name": string, "enabled": boolean }` | | **Item shape** | `{ "name": string, "enabled": boolean }` |
| **Notes** | `name` matches keys in `src/seqta/content/links.json` (e.g. `"Outlook"`, `"YouTube"`) | | **Notes** | `name` matches keys in `src/seqta/content/links.json` (e.g. `"Outlook"`, `"Google"`) |
**Example:** **Example:**
@@ -1195,7 +1195,7 @@ Implementation: `ensureSyncableStorageDefaults()` + `getSyncableStorageDefaults(
### Settings persistence and live UI ### Settings persistence and live UI
`SettingsState` (`src/seqta/utils/listeners/SettingsState.ts`): `SettingsState` (`src/seqta/utils/listeners/settingsState.ts`):
- Assignments (`settingsState.foo = …`) and `setKey()` persist to `chrome.storage.local` and **notify registered listeners** in the same context (required for embedded SEQTA settings). - Assignments (`settingsState.foo = …`) and `setKey()` persist to `chrome.storage.local` and **notify registered listeners** in the same context (required for embedded SEQTA settings).
- `saveToStorage()` omits `undefined` values so optional keys are not accidentally stripped. - `saveToStorage()` omits `undefined` values so optional keys are not accidentally stripped.
+1 -1
View File
@@ -3,7 +3,7 @@ import { build } from "esbuild";
import { resolve } from "node:path"; import { resolve } from "node:path";
/** Bundle worker entry points imported with `?inlineWorker` as Blob-backed Workers in dev. */ /** Bundle worker entry points imported with `?inlineWorker` as Blob-backed Workers in dev. */
export default function InlineWorkerDevPlugin(): Plugin { export default function inlineWorkerDevPlugin(): Plugin {
return { return {
name: "vite:inline-worker-dev", name: "vite:inline-worker-dev",
async load(id) { async load(id) {
+158 -157
View File
@@ -3101,9 +3101,9 @@
} }
}, },
"node_modules/@oxlint/binding-android-arm-eabi": { "node_modules/@oxlint/binding-android-arm-eabi": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.91.0.tgz",
"integrity": "sha512-sgfalb1HuxYjiAa4wESZ626z1FGusqNcXYHyB5oIOEprS2sbPg0UYEfo83uF1GNG70DIfZxHkXuE6KFrlSdn8Q==", "integrity": "sha512-eOqJUUS1MCqIoUUxMIkuwaqIdKaHr1SXYA0CQI95UUrF8jwQylQH33bBmnqhZfvWXKlRB2Ylx/+Sbk/ctEqzZQ==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -3118,9 +3118,9 @@
} }
}, },
"node_modules/@oxlint/binding-android-arm64": { "node_modules/@oxlint/binding-android-arm64": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.91.0.tgz",
"integrity": "sha512-RcKhz1ETMq+fazE9TKS2+5NIRGwigm/nW8egqF0LI+A8Yw2iW5r0E/C3XAPRiwIm/vcPiutIRIa6IQCIKhZsTQ==", "integrity": "sha512-vIJU4lRxK0EhbBt+iR3rkq3pio4I+V5Gshwjei3plNjN+CIq0WxWHzYVI06J9KN8Ar3hyNSFtzJAjVRLZOYpjg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3135,9 +3135,9 @@
} }
}, },
"node_modules/@oxlint/binding-darwin-arm64": { "node_modules/@oxlint/binding-darwin-arm64": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.91.0.tgz",
"integrity": "sha512-PSrxMvP6mx+p1karZcUxLdy9lpaP+JWQPti4al9FgTaPhxE+pT/BjhGExloVVSWgZgIfOlLOjVyyq8BXlodhLQ==", "integrity": "sha512-tLy76MurwAOpQt5QVMkJUgexBSWhB7qdvAYb14bc0xntZS6f55aKicbZoxZ/QlmAbnrdlXeD5+IjwY8EZ9RWTg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3152,9 +3152,9 @@
} }
}, },
"node_modules/@oxlint/binding-darwin-x64": { "node_modules/@oxlint/binding-darwin-x64": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.91.0.tgz",
"integrity": "sha512-OLbU9qsrV2Q8QxT2OEzOPdO8zCCpyI8qB+hDI8yr6RsYELtkf0FAZhJdfjM/RnLHKzt44HWwAPnk92vBtKofvw==", "integrity": "sha512-zPeMmjAqm5vXxbTp/JqYuc9gGSbUuEaeCAkFHB4TCRLTlfJGD//Fkx03YvZHCHZJ7ideLiiLcae+3f2I27qnaA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -3169,9 +3169,9 @@
} }
}, },
"node_modules/@oxlint/binding-freebsd-x64": { "node_modules/@oxlint/binding-freebsd-x64": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.91.0.tgz",
"integrity": "sha512-fBA4pWyVDARmNucQqpyFuPC49xYf1r+sX7dxPL5fNPQrSMLum39Sn56tZ9JPleWC7FzLPwSQ7plYYfirYBHF8A==", "integrity": "sha512-psOR9+xGMXn0hj4KY5M2kjSQ1n0TCMdYbPOraoV0iQyl7mw2oBBYGUM2+ma40m1YLVrktTBOta4FjrmcOHDhrg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -3186,9 +3186,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-arm-gnueabihf": { "node_modules/@oxlint/binding-linux-arm-gnueabihf": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.91.0.tgz",
"integrity": "sha512-zhxH78eP2nR6/pGdhBc7MIfjhhcgATeu8fkmkFJbuzfk6Cj0FzBxyEhL85yDqrCybjx+G2YDzZGsxIO9kvO4Iw==", "integrity": "sha512-1PNA1j4ETxawvxfz6ueDxWgQgWkXPbv44DWZmC7LR07GqojGFDOwWbosOT6/AYiJr7zMXEhn2dPWMkyFFOFpUQ==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -3203,9 +3203,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-arm-musleabihf": { "node_modules/@oxlint/binding-linux-arm-musleabihf": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.91.0.tgz",
"integrity": "sha512-MvYmpHyJqUJjEvkZbJHdwfdL45cGn8EVBkYmoXFiaYFW9suoD3dbJl5mBdpy0DVgdjlyddmldbRtk3cCgETadQ==", "integrity": "sha512-jcNePVpca37lTbHmiPMnVbPAAW0rH9kAoDjsDv6vESEX9pzazIR1q5SyYuc1rQzdjHtc2VVCDN9jDh6tHcOHyA==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -3220,9 +3220,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-arm64-gnu": { "node_modules/@oxlint/binding-linux-arm64-gnu": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.91.0.tgz",
"integrity": "sha512-L13Sy+Kg0nZhwTsToniqjUFPA2TuM6962qCZ5Wp5KeB517Tw7ApdLTTtlb+bF86fcZZa2EtvCVvAJxk4Dya/MQ==", "integrity": "sha512-TJi78UX6R+9qZ23ZKtzN6adfW83bjY0NXsCRMBRH6H7IizaMXmZbdRAtjedMkx77bT46YQH0csawsY9lwha8MA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3240,9 +3240,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-arm64-musl": { "node_modules/@oxlint/binding-linux-arm64-musl": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.91.0.tgz",
"integrity": "sha512-wFDdZWGpzIPFdJFjSLWnKB0TGzFriTKUIrl04iMqMyM9BBIJTuerfCHYa0WpDSjr5x3lcW/CHLyacSt886WpGg==", "integrity": "sha512-OowlLroUTzKq5OBvbu6iegch8SJ2DivXFCukzPWURwvcJhMj7/P0CUGH5qrDlxT1Kh48dcxqYqrvE8qK6xTLKQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3260,9 +3260,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-ppc64-gnu": { "node_modules/@oxlint/binding-linux-ppc64-gnu": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.91.0.tgz",
"integrity": "sha512-FRywfn+MoKn8xpBSzgNwNVliSKRI2QXkxi/iF7o6FEQs8Bh8z2RpVTaFAcO3pchXjvB2eGNFIoLLQABIQ+u7VA==", "integrity": "sha512-QF/5Ge8yGpWg5s4awMNHfVKh1WOmk591Qg082i6CHenXYBa+W1E5RwWZXaKUOw4Ko7CCjqg3TfBc0AzhnqblYg==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@@ -3280,9 +3280,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-riscv64-gnu": { "node_modules/@oxlint/binding-linux-riscv64-gnu": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.91.0.tgz",
"integrity": "sha512-IS2PaUgpc/qeLADTyhUNmdx3x4ijs9pjJdPKBYHaT+mAE7k3FsjnHPTjhpsak1b++h6CIPhv6WX9Z+y7Pw0voQ==", "integrity": "sha512-dXlsKlNhzJQX1nageGKnvWe1D7uTng249hQM80CG/YPZ8F/VZHbxVLhImgurdWBOmu86XOemValLjrW6QIOM/Q==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@@ -3300,9 +3300,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-riscv64-musl": { "node_modules/@oxlint/binding-linux-riscv64-musl": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.91.0.tgz",
"integrity": "sha512-s7JFKRkGS8O7i2ZVODfuO++NC7sH6HDqpMn8lYxw91w0SXJOxnAVjQ8utvmDwLMMT0jaSkuOKuUYJDGDtu4sHQ==", "integrity": "sha512-tznkj5VrWNRUfymkaLcJetgMLbP9suL5ob/m7j0Fdbnm5u3Li/Ezo/YcBixiuwdL1sg0oGpyTe86It0J6T+Lxg==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@@ -3320,9 +3320,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-s390x-gnu": { "node_modules/@oxlint/binding-linux-s390x-gnu": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.91.0.tgz",
"integrity": "sha512-b0GxrOQr5VONCkd7KLSqmP6b6nqZuTpuS8QPQHzltmqdXP5bY0Jl0CZ0QmlCTrS3ExaLYbioFYOARzNbYvcApQ==", "integrity": "sha512-sNvfLiUYQkVsLNUgIW24AEYTHSd2zZ1vAxXssPdjuQHTtCpRvQihYri6d5z5FY7w/QrcnB5+g9E+/sqmZq8tfA==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@@ -3340,9 +3340,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-x64-gnu": { "node_modules/@oxlint/binding-linux-x64-gnu": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.91.0.tgz",
"integrity": "sha512-iaJeShJtgUp8rZbt9YUdTAGOpmX5KogCLba17Jp1tWdJ3F4M3D2g2TKUyI1FMTHxKH9NNHuQcuC2kZRg6IV7yQ==", "integrity": "sha512-eA25ETvimhUZ89y5BcunNY7yv7qwG2I7V7dFQAU+mIEqZ57gBCXdIERl0yXOEt43zjsw0yK2gRKTc+twF706wQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -3360,9 +3360,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-x64-musl": { "node_modules/@oxlint/binding-linux-x64-musl": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.91.0.tgz",
"integrity": "sha512-/aZoXnL5WBLCXuzfHqvEFXcm4iwYmr/cYByHDTXzLFzJdE5DC7bm6phpWqHv6BeqpVgY9IpBAxGDv2WEkl5JCg==", "integrity": "sha512-4hZ4Z9K+OkcTpAHDoUTMg/8MModbM0aocrl9KnGzp9h5iKqjrXraEUZorYoVCT7xoK93CAHXgTndxRBrOjH/fA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -3380,9 +3380,9 @@
} }
}, },
"node_modules/@oxlint/binding-openharmony-arm64": { "node_modules/@oxlint/binding-openharmony-arm64": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.91.0.tgz",
"integrity": "sha512-SMhk7ozwoxYDKfYqGZCQEfULOKDneF9uhaoIf2neoDLWvNtjY9yVeL7YHmE5L9WdKvMpWNwwZxhenxBu6AgfOg==", "integrity": "sha512-gtqn4b0kLpGe46Qh7NHiR86wZpd+TLaesO106s7V3RG33r63VB94LW5qPKEDJX64osh3xfjnPFn1M0484bC7wQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3397,9 +3397,9 @@
} }
}, },
"node_modules/@oxlint/binding-win32-arm64-msvc": { "node_modules/@oxlint/binding-win32-arm64-msvc": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.91.0.tgz",
"integrity": "sha512-KBvR3A9fO7fCi2vCP8ifWvlia7tGEQV9NaYh+IGwa/7Groy48Mt/UaYqMK9/zOtAWl20BUCf6RPqzJ32fRw33Q==", "integrity": "sha512-KQItBdsyHN28U3z/bEek6h9pvG3Uqv564QYO8K1bE/V7YRZgpHlRnfNKVPHkk4sfYKyPzEjCgW80QkImOLvJog==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3414,9 +3414,9 @@
} }
}, },
"node_modules/@oxlint/binding-win32-ia32-msvc": { "node_modules/@oxlint/binding-win32-ia32-msvc": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.91.0.tgz",
"integrity": "sha512-+x42rDHQGbTCuT3EzpWAzhP3NoVPE/cJsG4gnrakOSg0olV+GCdMpPU23Nvrl3zZMnXxFZdTtDv4D3SuaA5ZeQ==", "integrity": "sha512-XFKqbbsQVmTgw+CyBKuzSZtAa45viom1naFfulKmkTFdDyDaBQaBqEz5J61TI8iwBynU+F8q7qPD+9mplZRhEg==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -3431,9 +3431,9 @@
} }
}, },
"node_modules/@oxlint/binding-win32-x64-msvc": { "node_modules/@oxlint/binding-win32-x64-msvc": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.91.0.tgz",
"integrity": "sha512-30JiaFEBUB9peEOcvVM8ggo88SoN/IdSr9DW505JdBji/R6dM66gKEiG65hw6qcaF2f4mO0cEJ+RwRZprmun9g==", "integrity": "sha512-DmpK0PthG66Bcz5Y4JqNbzXltzyLQtg3ofYpd25+ejm7kQYUM78VL1uIP/ZFct2781mwUyBX37LatFPCTVp35A==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -5939,9 +5939,9 @@
} }
}, },
"node_modules/d3-array": { "node_modules/d3-array": {
"version": "3.2.4", "version": "3.2.5",
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.5.tgz",
"integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", "integrity": "sha512-Th8qGXoBalmWsstpkuhmBuTsBQIFqYOJtjlBvNVvBfJ8E3uYusBUwUR8HU20U0qKKQkgCvKyR1YjiozWadk5QA==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"internmap": "1 - 2" "internmap": "1 - 2"
@@ -5951,9 +5951,9 @@
} }
}, },
"node_modules/d3-chord": { "node_modules/d3-chord": {
"version": "3.0.1", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.2.tgz",
"integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", "integrity": "sha512-cGmADo5M2PTi3ewJZ2lcE32eURd4JmHtQ5JwRIUcas5L1SXqufG9yPyjWp8fW0gRi7aZi9bgbZPFZO1eyZ+1CQ==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3-path": "1 - 3" "d3-path": "1 - 3"
@@ -5963,30 +5963,30 @@
} }
}, },
"node_modules/d3-color": { "node_modules/d3-color": {
"version": "3.1.0", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.1.tgz",
"integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", "integrity": "sha512-lfab8x0Bj0UO7SNsY8dZSbNIA6ipbkE3X0NG9nqjCu6CfCHZseuDnOSJY7hidKrjpP++i1M2qT+FlAdPKYRilA==",
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/d3-contour": { "node_modules/d3-contour": {
"version": "4.0.2", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.3.tgz",
"integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", "integrity": "sha512-5DYURc8KwXPOhSUBblU0P9rVcArsSPxPOxsfO0Eud0s28oU0sB2e80aRHRL9AZW3usT8ikFKyIHpHHLNWLdRVA==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3-array": "^3.2.0" "d3-array": "^3.2.4"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/d3-delaunay": { "node_modules/d3-delaunay": {
"version": "6.0.4", "version": "6.0.6",
"resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.6.tgz",
"integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", "integrity": "sha512-DMQIEvSJhZCB6pwedcXaAlQ+MeKU5LlM2XakKtc73b/VM+RBiI1SRXycOEOKg2jsKj4zZ9F0KGYG6nCGwwWu/g==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"delaunator": "5" "delaunator": "5"
@@ -5996,18 +5996,18 @@
} }
}, },
"node_modules/d3-dispatch": { "node_modules/d3-dispatch": {
"version": "3.0.1", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.2.tgz",
"integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", "integrity": "sha512-sAzH4Y4nsLo8eSqw5jKiZt+LU2wZmL/qS+OkxQGjhwazB/D7TY34R/QK1eshfGr7cZEKymKZ/Haem7m+lu98Sg==",
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/d3-dsv": { "node_modules/d3-dsv": {
"version": "3.0.1", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.2.tgz",
"integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", "integrity": "sha512-FUnXhX7I4/AXyRCZzwfZTDGSq8PGZ4oR0tiCBqNGOZMsDrQ+6sIWNQnBzcCGhzJKZ6uCvCezTwflUqI209RRiQ==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"commander": "7", "commander": "7",
@@ -6030,9 +6030,9 @@
} }
}, },
"node_modules/d3-force": { "node_modules/d3-force": {
"version": "3.0.0", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.1.tgz",
"integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", "integrity": "sha512-kAaaHLFebBYwgi5cYBXAI8vKrQFMCD2MEswj2QuPKKbdU1wYLc8WXtS7O8F/b6POCIe3gJjY6hkDstHi1yMETQ==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3-dispatch": "1 - 3", "d3-dispatch": "1 - 3",
@@ -6044,18 +6044,18 @@
} }
}, },
"node_modules/d3-format": { "node_modules/d3-format": {
"version": "3.1.2", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.3.tgz",
"integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", "integrity": "sha512-+F+/49swqmGuQJmSKnVMIDH/QkEFV5li9QRj0xm/KhyAUBv099O5PrvpQFxBp24PYph17Mnvt9mjKQV0ii0nMA==",
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/d3-geo": { "node_modules/d3-geo": {
"version": "3.1.1", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz", "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.2.tgz",
"integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==", "integrity": "sha512-5R8ZgDQorIxmauv7R6gpE/ndz+Z0qAZssigq0aXFdvPHdY41RqtW02jrRUQAL724NdPABYXo1+gQEGBBr7uKNg==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3-array": "2.5.0 - 3" "d3-array": "2.5.0 - 3"
@@ -6115,18 +6115,18 @@
} }
}, },
"node_modules/d3-hierarchy": { "node_modules/d3-hierarchy": {
"version": "3.1.2", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.3.tgz",
"integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", "integrity": "sha512-GRajN5ZcnEwYFWqqdzhG1qJ3+fDg6WWzk47TJg7ePY7yvYAgRfD2r1mUx+wviBOWuCwamCUzjwMSdato43jbGA==",
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/d3-interpolate": { "node_modules/d3-interpolate": {
"version": "3.0.1", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.2.tgz",
"integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", "integrity": "sha512-IRzGU62DtxhvsnSTWMQIdnoZ6gA+BCWwBon1EJI6SjoN595799b6z/QRBzXfFhE8iupUPp3042yBNo0STPqnzQ==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3-color": "1 - 3" "d3-color": "1 - 3"
@@ -6142,36 +6142,36 @@
"license": "BSD-3-Clause" "license": "BSD-3-Clause"
}, },
"node_modules/d3-path": { "node_modules/d3-path": {
"version": "3.1.0", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.1.tgz",
"integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", "integrity": "sha512-jsbgV8zIT38ReB9O7X7gcLndTQRONSqNNd+oGIaTBdUug4r5jFmp0N6RY9R5GWbdUDucn0qoTGyfjapT4tDhcg==",
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/d3-polygon": { "node_modules/d3-polygon": {
"version": "3.0.1", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.2.tgz",
"integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", "integrity": "sha512-WAUvPudGU1Dn4mDPfb6+JnnbeVEV53hG/BoT+bxts6AkZsOpTEiV1jHYX+2vtwCICNFG9Wxv8QS+eW1zE/Dwfg==",
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/d3-quadtree": { "node_modules/d3-quadtree": {
"version": "3.0.1", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.2.tgz",
"integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", "integrity": "sha512-9Lu9mqJKRbIk0d6mKDjpvPURaPdwHVK5CYbcdd0/4vBgz4ldz/7TIOse3kNERsByGNfld58KEco507AztJWyTQ==",
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/d3-random": { "node_modules/d3-random": {
"version": "3.0.1", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.2.tgz",
"integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", "integrity": "sha512-PxJi9LNV+7mulaYO77nd+oGurXGL1fhedXjHnB3pWLUcqDnQtF4VASoqnQGHgoXLByVdv5QJ/2kfwkGn5HTS8g==",
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
@@ -6218,9 +6218,9 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/d3-scale": { "node_modules/d3-scale": {
"version": "4.0.2", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.3.tgz",
"integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", "integrity": "sha512-66cWobCNzcMvlfoaDHCxuIv9TBUWG1BLOWdv9kHHFuCr1JdqAWPvTmsaEYDD5NRMyWZ5+7u0GqiCDfMXMqh3hg==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3-array": "2.10.0 - 3", "d3-array": "2.10.0 - 3",
@@ -6234,25 +6234,26 @@
} }
}, },
"node_modules/d3-scale-chromatic": { "node_modules/d3-scale-chromatic": {
"version": "3.1.0", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.1.tgz",
"integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==", "integrity": "sha512-lA5gfN2yMvmChubmptnDiBfeGpHD7Yb1EbvCz0TZE0WHXhyR6W2allPuhKtzV5ILQRqeOdefF0qYtERReLUBDg==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3-color": "1 - 3", "d3-color": "1 - 3",
"d3-interpolate": "1 - 3" "d3-interpolate": "1 - 3",
"d3-scale": "1 - 4"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/d3-shape": { "node_modules/d3-shape": {
"version": "3.2.0", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.1.tgz",
"integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", "integrity": "sha512-dm2o+lbKdzg9tY7GEag/dB9hcbodLfwkE/DkvqbELJXaMz0yKzWWhZqhbI7CKubukA7HnRyz0avdtvi7EPxPvw==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3-path": "^3.1.0" "d3-path": "^3.1.1"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=12"
@@ -6265,9 +6266,9 @@
"license": "BSD-3-Clause" "license": "BSD-3-Clause"
}, },
"node_modules/d3-time": { "node_modules/d3-time": {
"version": "3.1.0", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.1.tgz",
"integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", "integrity": "sha512-Ze7rjrhMzdeulh0/hjcfFj7XLAHOfowtEMfsoG6DU866HPynQNW7Wfen6hzXcqKTv8XzxvF6Hzr5XD6bMHr2ug==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3-array": "2 - 3" "d3-array": "2 - 3"
@@ -6277,9 +6278,9 @@
} }
}, },
"node_modules/d3-time-format": { "node_modules/d3-time-format": {
"version": "4.1.0", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.1.tgz",
"integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", "integrity": "sha512-22XaqjyCjpqgda20erhsOjGmC3vvYwTNYniKAd45W5UWLDF43moeOuV9qYpRqobIlsnK0UhnKZjUUJm3VgORUA==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"d3-time": "1 - 3" "d3-time": "1 - 3"
@@ -6289,9 +6290,9 @@
} }
}, },
"node_modules/d3-timer": { "node_modules/d3-timer": {
"version": "3.0.1", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.2.tgz",
"integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", "integrity": "sha512-1Il1aliroVSErrv5aulRBxAY+7+DnaoLIWGd1C6SsBTWDeobWiP/V69vwb8vT6abR1kKwaNe1196pmaQ1fK90A==",
"license": "ISC", "license": "ISC",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
@@ -6540,9 +6541,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.473", "version": "1.5.475",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.473.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.475.tgz",
"integrity": "sha512-9njcRQK+6FOXNAWw5g+h2RPiyazqo5RFMVJ39ZMHjDHUNnnFlhnOGV7O0WmJetODDx19ES5p+FLi+KCVFQGugw==", "integrity": "sha512-S9tceHJbIsHH8VRwh9x+8lJO50SYwTdwVGdEjdz2FERyP59j1N6rdXOSklIusrhxt9GG/WN4V/kRgmDHl9MM5w==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
@@ -6615,9 +6616,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/enhanced-resolve": { "node_modules/enhanced-resolve": {
"version": "5.26.0", "version": "5.26.1",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.0.tgz", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.1.tgz",
"integrity": "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw==", "integrity": "sha512-PPnnSJq3azKOIewXR/uppBV/6h98dprBJ/WaQ9Qgj10xX1lJLNfg+XShpbsrSqcDSy2yYYyhfXM1wWhftqgyzw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -8838,9 +8839,9 @@
} }
}, },
"node_modules/napi-postinstall": { "node_modules/napi-postinstall": {
"version": "0.3.7", "version": "0.3.8",
"resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.7.tgz", "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.8.tgz",
"integrity": "sha512-jyU4cU4kVAmy/3qjP+DcoQTNXfINHc+dFw54gGqWC8nu0mpV0kOnk7kff+J+Q18SbX0k3Np8Rm7yFjd3phatNQ==", "integrity": "sha512-dHbDC5V1g/EI8OLEtL4Iuwbu0fgzmyykxenn2KnlsX9XdhTXL3gWnfbbP+ab+oUcgV6CFpb8QGyQt/ZXA0UXig==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@@ -9085,9 +9086,9 @@
} }
}, },
"node_modules/oxlint": { "node_modules/oxlint": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.90.0.tgz", "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.91.0.tgz",
"integrity": "sha512-RkTN9EmgIUpLuhNoLhO3OliMGJlvb3Dk7XVjBZnfoMCHrVpuz5ESd97klfiyYeV7XfA2lNLnDCPMkUI+Qw5How==", "integrity": "sha512-vjy/cBZcEFcYh3dbxUoQK+bjc+QaY3ZWo86aJkZ5YAwp/HyiqP7dTdNgbvcIVJafhAH5sZbTqBp4sZcicEZngA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@@ -9100,25 +9101,25 @@
"url": "https://github.com/sponsors/oxc-project" "url": "https://github.com/sponsors/oxc-project"
}, },
"optionalDependencies": { "optionalDependencies": {
"@oxlint/binding-android-arm-eabi": "1.90.0", "@oxlint/binding-android-arm-eabi": "1.91.0",
"@oxlint/binding-android-arm64": "1.90.0", "@oxlint/binding-android-arm64": "1.91.0",
"@oxlint/binding-darwin-arm64": "1.90.0", "@oxlint/binding-darwin-arm64": "1.91.0",
"@oxlint/binding-darwin-x64": "1.90.0", "@oxlint/binding-darwin-x64": "1.91.0",
"@oxlint/binding-freebsd-x64": "1.90.0", "@oxlint/binding-freebsd-x64": "1.91.0",
"@oxlint/binding-linux-arm-gnueabihf": "1.90.0", "@oxlint/binding-linux-arm-gnueabihf": "1.91.0",
"@oxlint/binding-linux-arm-musleabihf": "1.90.0", "@oxlint/binding-linux-arm-musleabihf": "1.91.0",
"@oxlint/binding-linux-arm64-gnu": "1.90.0", "@oxlint/binding-linux-arm64-gnu": "1.91.0",
"@oxlint/binding-linux-arm64-musl": "1.90.0", "@oxlint/binding-linux-arm64-musl": "1.91.0",
"@oxlint/binding-linux-ppc64-gnu": "1.90.0", "@oxlint/binding-linux-ppc64-gnu": "1.91.0",
"@oxlint/binding-linux-riscv64-gnu": "1.90.0", "@oxlint/binding-linux-riscv64-gnu": "1.91.0",
"@oxlint/binding-linux-riscv64-musl": "1.90.0", "@oxlint/binding-linux-riscv64-musl": "1.91.0",
"@oxlint/binding-linux-s390x-gnu": "1.90.0", "@oxlint/binding-linux-s390x-gnu": "1.91.0",
"@oxlint/binding-linux-x64-gnu": "1.90.0", "@oxlint/binding-linux-x64-gnu": "1.91.0",
"@oxlint/binding-linux-x64-musl": "1.90.0", "@oxlint/binding-linux-x64-musl": "1.91.0",
"@oxlint/binding-openharmony-arm64": "1.90.0", "@oxlint/binding-openharmony-arm64": "1.91.0",
"@oxlint/binding-win32-arm64-msvc": "1.90.0", "@oxlint/binding-win32-arm64-msvc": "1.91.0",
"@oxlint/binding-win32-ia32-msvc": "1.90.0", "@oxlint/binding-win32-ia32-msvc": "1.91.0",
"@oxlint/binding-win32-x64-msvc": "1.90.0" "@oxlint/binding-win32-x64-msvc": "1.91.0"
}, },
"peerDependencies": { "peerDependencies": {
"oxlint-tsgolint": ">=7.0.2005", "oxlint-tsgolint": ">=7.0.2005",
+24 -15
View File
@@ -111,7 +111,10 @@ function handleFetchThemes(_request: unknown, sendResponse: MessageSender): bool
}) })
.then(sendResponse) .then(sendResponse)
.catch((err) => { .catch((err) => {
console.warn("[Background] fetchThemes API failed, trying GitHub fallback:", err?.message); console.warn(
"[BetterSEQTA+] Background: fetchThemes API failed, trying GitHub fallback:",
err?.message,
);
fetch(githubUrl, { cache: "no-store" }) fetch(githubUrl, { cache: "no-store" })
.then(async (r) => { .then(async (r) => {
if (!r.ok) throw new Error(`GitHub fallback HTTP ${r.status}`); if (!r.ok) throw new Error(`GitHub fallback HTTP ${r.status}`);
@@ -121,7 +124,10 @@ function handleFetchThemes(_request: unknown, sendResponse: MessageSender): bool
}) })
.then(sendResponse) .then(sendResponse)
.catch((fallbackErr) => { .catch((fallbackErr) => {
console.error("[Background] fetchThemes GitHub fallback error:", fallbackErr); console.error(
"[BetterSEQTA+] Background: fetchThemes GitHub fallback error:",
fallbackErr,
);
sendResponse({ success: false, error: fallbackErr?.message }); sendResponse({ success: false, error: fallbackErr?.message });
}); });
}); });
@@ -143,7 +149,7 @@ function handleFetchThemeDetails(request: BackgroundRequest, sendResponse: Messa
.then((r) => r.json()) .then((r) => r.json())
.then(sendResponse) .then(sendResponse)
.catch((err) => { .catch((err) => {
console.error("[Background] fetchThemeDetails error:", err); console.error("[BetterSEQTA+] Background: fetchThemeDetails error:", err);
sendResponse({ success: false, error: err?.message }); sendResponse({ success: false, error: err?.message });
}); });
})(); })();
@@ -216,7 +222,7 @@ function handleFetchFromUrl(
sendResponse({ error: "Invalid JSON response" }); sendResponse({ error: "Invalid JSON response" });
} }
} catch (err) { } catch (err) {
console.error("[Background] fetchFromUrl error:", err); console.error("[BetterSEQTA+] Background: fetchFromUrl error:", err);
sendResponse({ error: (err as Error)?.message }); sendResponse({ error: (err as Error)?.message });
} }
})(); })();
@@ -253,7 +259,7 @@ function handleCloudReserveClient(
else sendResponse(data); else sendResponse(data);
}) })
.catch((err) => { .catch((err) => {
console.error("[Background] cloudReserveClient error:", err); console.error("[BetterSEQTA+] Background: cloudReserveClient error:", err);
sendResponse({ error: err?.message ?? "Network error" }); sendResponse({ error: err?.message ?? "Network error" });
}); });
return true; return true;
@@ -299,7 +305,7 @@ function handleCloudLogin(
if (!r.ok) sendResponse({ error: errorText ?? "Login failed" }); if (!r.ok) sendResponse({ error: errorText ?? "Login failed" });
else sendResponse(data); else sendResponse(data);
} catch (err) { } catch (err) {
console.error("[Background] cloudLogin error:", err); console.error("[BetterSEQTA+] Background: cloudLogin error:", err);
sendResponse({ error: (err as Error)?.message ?? "Network error" }); sendResponse({ error: (err as Error)?.message ?? "Network error" });
} }
})(); })();
@@ -320,7 +326,7 @@ function handleCloudStartLogin(request: BackgroundRequest, sendResponse: Message
sendResponse({ success: true }); sendResponse({ success: true });
}) })
.catch((err) => { .catch((err) => {
console.error("[Background] cloudStartLogin error:", err); console.error("[BetterSEQTA+] Background: cloudStartLogin error:", err);
sendResponse({ error: err?.message ?? "Failed to open login page" }); sendResponse({ error: err?.message ?? "Failed to open login page" });
}); });
return true; return true;
@@ -356,17 +362,20 @@ function initCloudLoginCallbackListener() {
} }
void performCloudSettingsDownloadWithRetry(token).catch((err) => { void performCloudSettingsDownloadWithRetry(token).catch((err) => {
console.warn("[Background] Cloud settings download after login:", err); console.warn(
"[BetterSEQTA+] Background: Cloud settings download after login:",
err,
);
}); });
} catch (err) { } catch (err) {
console.error("[Background] Failed to process login callback:", err); console.error("[BetterSEQTA+] Background: Failed to process login callback:", err);
} }
})(); })();
void browser.tabs.remove(tabId); void browser.tabs.remove(tabId);
} }
} catch (err) { } catch (err) {
console.error("[Background] Error parsing callback URL:", err); console.error("[BetterSEQTA+] Background: Error parsing callback URL:", err);
} }
} }
}); });
@@ -395,7 +404,7 @@ function handleCloudRefresh(request: BackgroundRequest, sendResponse: MessageSen
else sendResponse(data); else sendResponse(data);
}) })
.catch((err) => { .catch((err) => {
console.error("[Background] cloudRefresh error:", err); console.error("[BetterSEQTA+] Background: cloudRefresh error:", err);
sendResponse({ error: err?.message ?? "Network error" }); sendResponse({ error: err?.message ?? "Network error" });
}); });
return true; return true;
@@ -424,7 +433,7 @@ function handleCloudSettingsUpload(
updated_at: res.updated_at, updated_at: res.updated_at,
}); });
} catch (err) { } catch (err) {
console.error("[Background] cloudSettingsUpload error:", err); console.error("[BetterSEQTA+] Background: cloudSettingsUpload error:", err);
sendResponse({ sendResponse({
success: false, success: false,
error: err instanceof Error ? err.message : "Upload failed", error: err instanceof Error ? err.message : "Upload failed",
@@ -458,7 +467,7 @@ function handleCloudSettingsDownload(
updated_at: res.updated_at, updated_at: res.updated_at,
}); });
} catch (err) { } catch (err) {
console.error("[Background] cloudSettingsDownload error:", err); console.error("[BetterSEQTA+] Background: cloudSettingsDownload error:", err);
sendResponse({ sendResponse({
success: false, success: false,
error: err instanceof Error ? err.message : "Download failed", error: err instanceof Error ? err.message : "Download failed",
@@ -488,7 +497,7 @@ function handleCloudFavorite(request: BackgroundRequest, sendResponse: MessageSe
.then((r) => r.json()) .then((r) => r.json())
.then(sendResponse) .then(sendResponse)
.catch((err) => { .catch((err) => {
console.error("[Background] cloudFavorite error:", err); console.error("[BetterSEQTA+] Background: cloudFavorite error:", err);
sendResponse({ success: false, error: err?.message }); sendResponse({ success: false, error: err?.message });
}); });
})(); })();
@@ -607,7 +616,7 @@ const MESSAGE_HANDLERS: Record<string, MessageHandler> = {
typeof reply?.appLink === "string" && reply.appLink.length > 0 ? reply.appLink : null; typeof reply?.appLink === "string" && reply.appLink.length > 0 ? reply.appLink : null;
sendResponse({ appLink }); sendResponse({ appLink });
} catch (err) { } catch (err) {
console.error("[Background] getSeqtaSession error:", err); console.error("[BetterSEQTA+] Background: getSeqtaSession error:", err);
sendResponse({ appLink: null }); sendResponse({ appLink: null });
} }
})(); })();
+8 -6
View File
@@ -158,7 +158,7 @@ async function fetchCloudSummaryWithAuthRetry(token: string): Promise<CloudSumma
t = next; t = next;
continue; continue;
} }
if (res.error) console.warn("[BS+ cloud sync] cloud-summary:", res.error); if (res.error) console.warn("[BetterSEQTA+] Cloud sync: cloud-summary:", res.error);
break; break;
} }
return null; return null;
@@ -337,14 +337,14 @@ export async function performCloudSettingsDownloadWithRetry(
async function maybeUploadBaseline(token: string): Promise<void> { async function maybeUploadBaseline(token: string): Promise<void> {
const res = await performCloudSettingsUploadWithRetry(token); const res = await performCloudSettingsUploadWithRetry(token);
if (!res.success) { if (!res.success) {
console.warn("[BS+ cloud sync] Baseline upload failed:", res.error); console.warn("[BetterSEQTA+] Cloud sync: Baseline upload failed:", res.error);
} }
} }
async function downloadIfNeeded(token: string): Promise<void> { async function downloadIfNeeded(token: string): Promise<void> {
const res = await performCloudSettingsDownloadWithRetry(token); const res = await performCloudSettingsDownloadWithRetry(token);
if (!res.success && !res.notFound) { if (!res.success && !res.notFound) {
console.warn("[BS+ cloud sync] Auto-download failed:", res.error); console.warn("[BetterSEQTA+] Cloud sync: Auto-download failed:", res.error);
} }
} }
@@ -368,7 +368,9 @@ async function runCloudSettingsPollInner(): Promise<void> {
typeof bsplus.schemaVersion === "number" && typeof bsplus.schemaVersion === "number" &&
bsplus.schemaVersion > CLOUD_SETTINGS_SYNC_SCHEMA_VERSION bsplus.schemaVersion > CLOUD_SETTINGS_SYNC_SCHEMA_VERSION
) { ) {
console.warn("[BS+ cloud sync] Server schemaVersion newer than client; skip auto-download"); console.warn(
"[BetterSEQTA+] Cloud sync: Server schemaVersion newer than client; skip auto-download",
);
return; return;
} }
@@ -399,7 +401,7 @@ export function runCloudSettingsPoll(): Promise<void> {
await runCloudSettingsPollInner(); await runCloudSettingsPollInner();
await browser.storage.local.set({ [POLL_THROTTLE_KEY]: Date.now() }); await browser.storage.local.set({ [POLL_THROTTLE_KEY]: Date.now() });
} catch (e) { } catch (e) {
console.error("[BS+ cloud sync] Poll error:", e); console.error("[BetterSEQTA+] Cloud sync: Poll error:", e);
} finally { } finally {
pollInFlight = null; pollInFlight = null;
} }
@@ -443,7 +445,7 @@ async function runDebouncedUploadJob(): Promise<void> {
if (!token) return; if (!token) return;
const res = await performCloudSettingsUploadWithRetry(token); const res = await performCloudSettingsUploadWithRetry(token);
if (!res.success) { if (!res.success) {
console.warn("[BS+ cloud sync] Auto-upload failed:", res.error); console.warn("[BetterSEQTA+] Cloud sync: Auto-upload failed:", res.error);
} }
} }
+8 -8
View File
@@ -45,7 +45,7 @@ export function createCustomThemesHandlers(deps: {
} }
const normalized = normalizeCustomThemeApiResponse(body, r.status, text); const normalized = normalizeCustomThemeApiResponse(body, r.status, text);
if (!r.ok || normalized.success === false) { if (!r.ok || normalized.success === false) {
console.error("[BetterSEQTA+ CustomThemes]", r.status, r.url, normalized); console.error("[BetterSEQTA+] CustomThemes:", r.status, r.url, normalized);
} }
return normalized; return normalized;
} }
@@ -112,7 +112,7 @@ export function createCustomThemesHandlers(deps: {
: `/api/custom-themes?${params}`; : `/api/custom-themes?${params}`;
sendResponse(await customThemesJsonFetch(path)); sendResponse(await customThemesJsonFetch(path));
} catch (err) { } catch (err) {
console.error("[Background] fetchCustomThemes error:", err); console.error("[BetterSEQTA+] Background: fetchCustomThemes error:", err);
sendResponse({ sendResponse({
success: false, success: false,
error: err instanceof Error ? err.message : "Fetch failed", error: err instanceof Error ? err.message : "Fetch failed",
@@ -135,7 +135,7 @@ export function createCustomThemesHandlers(deps: {
if (request.status) params.set("status", String(request.status)); if (request.status) params.set("status", String(request.status));
sendResponse(await customThemesJsonFetch(`/api/custom-themes/mine?${params}`, {}, true)); sendResponse(await customThemesJsonFetch(`/api/custom-themes/mine?${params}`, {}, true));
} catch (err) { } catch (err) {
console.error("[Background] fetchMyCustomThemes error:", err); console.error("[BetterSEQTA+] Background: fetchMyCustomThemes error:", err);
sendResponse({ sendResponse({
success: false, success: false,
error: err instanceof Error ? err.message : "Fetch failed", error: err instanceof Error ? err.message : "Fetch failed",
@@ -164,7 +164,7 @@ export function createCustomThemesHandlers(deps: {
), ),
); );
} catch (err) { } catch (err) {
console.error("[Background] fetchMyCustomThemeDetail error:", err); console.error("[BetterSEQTA+] Background: fetchMyCustomThemeDetail error:", err);
sendResponse({ sendResponse({
success: false, success: false,
error: err instanceof Error ? err.message : "Fetch failed", error: err instanceof Error ? err.message : "Fetch failed",
@@ -187,7 +187,7 @@ export function createCustomThemesHandlers(deps: {
try { try {
sendResponse(await customThemesMultipartPost("/api/custom-themes/mine", payload!)); sendResponse(await customThemesMultipartPost("/api/custom-themes/mine", payload!));
} catch (err) { } catch (err) {
console.error("[Background] submitCustomTheme error:", err); console.error("[BetterSEQTA+] Background: submitCustomTheme error:", err);
sendResponse({ sendResponse({
success: false, success: false,
error: { message: err instanceof Error ? err.message : "Upload failed" }, error: { message: err instanceof Error ? err.message : "Upload failed" },
@@ -222,7 +222,7 @@ export function createCustomThemesHandlers(deps: {
), ),
); );
} catch (err) { } catch (err) {
console.error("[Background] replaceCustomThemeFiles error:", err); console.error("[BetterSEQTA+] Background: replaceCustomThemeFiles error:", err);
sendResponse({ sendResponse({
success: false, success: false,
error: err instanceof Error ? err.message : "Upload failed", error: err instanceof Error ? err.message : "Upload failed",
@@ -255,7 +255,7 @@ export function createCustomThemesHandlers(deps: {
), ),
); );
} catch (err) { } catch (err) {
console.error("[Background] updateCustomThemeMetadata error:", err); console.error("[BetterSEQTA+] Background: updateCustomThemeMetadata error:", err);
sendResponse({ sendResponse({
success: false, success: false,
error: err instanceof Error ? err.message : "Update failed", error: err instanceof Error ? err.message : "Update failed",
@@ -284,7 +284,7 @@ export function createCustomThemesHandlers(deps: {
), ),
); );
} catch (err) { } catch (err) {
console.error("[Background] deleteCustomTheme error:", err); console.error("[BetterSEQTA+] Background: deleteCustomTheme error:", err);
sendResponse({ sendResponse({
success: false, success: false,
error: err instanceof Error ? err.message : "Delete failed", error: err instanceof Error ? err.message : "Delete failed",
+1 -20
View File
@@ -7,27 +7,8 @@ function crossedUpgrade(previousVersion: string, boundary: string): boolean {
return prev != null && curr != null && !semver.lt(curr, boundary) && semver.lt(prev, boundary); return prev != null && curr != null && !semver.lt(curr, boundary) && semver.lt(prev, boundary);
} }
/** One-time storage patches when crossing 3.6.5 / 3.6.6 / 3.7.0 / 3.7.7 (see git history on main). */ /** One-time storage patches when crossing 3.6.6 / 3.7.0 / 3.7.7 (see git history on main). */
export async function runStorageMigrations(previousVersion: string): Promise<void> { export async function runStorageMigrations(previousVersion: string): Promise<void> {
if (crossedUpgrade(previousVersion, "3.6.5")) {
try {
const key = "plugin.global-search.settings";
const got = await browser.storage.local.get(key);
const existing = (got[key] ?? {}) as Record<string, unknown>;
await browser.storage.local.set({
[key]: {
...existing,
enabled: true,
transparencyEffects: true,
runIndexingOnLoad: true,
passiveIndexing: true,
},
});
} catch (e) {
console.warn("[BetterSEQTA+] Global Search 3.6.5 settings migration failed:", e);
}
}
if (crossedUpgrade(previousVersion, "3.6.6")) { if (crossedUpgrade(previousVersion, "3.6.6")) {
try { try {
await browser.storage.local.set({ themeOfTheMonthDisabled: false }); await browser.storage.local.set({ themeOfTheMonthDisabled: false });
+70 -121
View File
@@ -38,16 +38,13 @@
@layer override { @layer override {
.legacy-root, .legacy-root,
.legacy-root *:not(.iconFamily) { .legacy-root * {
font-family: var(--betterseqta-font-family, Rubik), sans-serif !important; font-family: var(--betterseqta-font-family, Rubik), sans-serif !important;
} }
}
.iconFamily, :root {
.iconFamily *, --bsplus-focus-ring: 2px solid var(--text-primary, currentColor);
[class~="iconFamily"],
[class~="iconFamily"] * {
font-family: "IconFamily" !important;
}
} }
html { html {
@@ -56,126 +53,78 @@ html {
font-family: Roboto, system-ui, -apple-system, sans-serif !important; font-family: Roboto, system-ui, -apple-system, sans-serif !important;
} }
.tooltip svg { .bsplus-tooltip-bubble {
fill: var(--theme-primary); position: fixed;
} inset: auto;
.tooltip { margin: 0;
display: inline-block; min-width: 50px;
z-index: 5 !important; max-width: 220px;
width: 28px; padding: 4px;
background: none; border: 0;
box-shadow: none; border-radius: 8px;
padding: 2px; overflow: visible;
position: absolute; background: var(--text-primary);
} color: var(--background-primary);
.tooltip .tooltiptext {
width: 120px;
transform: scale(0);
transition: transform 0.2s;
transform-origin: top;
background: var(--background-primary);
color: var(--text-primary);
text-align: center; text-align: center;
border-radius: 6px;
padding: 2px;
position: absolute;
z-index: 1;
top: 105%;
left: 50%;
margin-left: -62px;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
bottom: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: transparent transparent var(--text-primary) transparent;
}
.tooltiptext p:hover {
cursor: pointer;
background: rgba(0, 0, 0, 0.3) !important;
transition: 200ms;
}
.tooltiptext p {
border-radius: 8px !important;
padding-top: 2px;
padding-bottom: 2px;
margin: 2px;
}
.tooltip:hover .tooltiptext {
transform: scale(1);
transform-origin: top;
transition: transform 0.2s;
}
body:has(.outside-container:not(.hide)) #AddedSettings.tooltip:hover > .tooltiptext {
transform: scale(0); transform: scale(0);
transform-origin: top center;
transition:
transform 0.15s,
overlay 0.15s allow-discrete,
display 0.15s allow-discrete;
&:popover-open {
transform: scale(1);
}
&::before {
content: "";
position: absolute;
bottom: 100%;
left: 0;
width: 100%;
height: 8px;
}
&::after {
content: "";
position: absolute;
bottom: calc(100% - 1px);
left: 50%;
margin-left: -5px;
border: 5px solid transparent;
border-bottom-color: var(--text-primary);
}
a,
button {
display: block;
width: 100%;
border-radius: 6px;
padding: 2px 8px;
color: inherit;
text-decoration: none;
transition: background 200ms;
&:hover {
background: color-mix(in srgb, var(--background-primary) 20%, transparent);
}
}
} }
.assessmenttooltip svg { .bsplus-tooltip:focus-visible {
fill: var(--text-primary); outline: var(--bsplus-focus-ring) !important;
outline-offset: 2px;
border-radius: 50%;
}
@starting-style {
.bsplus-tooltip-bubble:popover-open {
transform: scale(0);
}
} }
.assessmenttooltip { .assessmenttooltip {
bottom: 0px; position: absolute;
bottom: 0;
left: 5px; left: 5px;
}
.topmenutooltip {
top: 115% !important;
background: var(--text-primary) !important;
color: var(--theme-primary) !important;
}
.fixed-tooltip {
display: inline-block;
z-index: 5 !important;
width: 28px; width: 28px;
background: none;
box-shadow: none;
padding: 2px; padding: 2px;
position: absolute;
}
.fixed-tooltip svg {
fill: var(--theme-primary);
}
.tooltiptext-fixed {
width: 120px;
transform: scale(0);
transition: transform 0.2s;
transform-origin: top;
background: var(--background-primary);
color: var(--text-primary);
text-align: center;
border-radius: 6px;
padding: 2px;
position: fixed;
z-index: 1000;
top: 0;
left: 0;
margin-left: -62px;
}
.tooltiptext-fixed::after {
content: "";
position: absolute;
bottom: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: transparent transparent var(--text-primary) transparent;
}
.tooltiptext-fixed.show {
transform: scale(1);
transform-origin: top;
transition: transform 0.2s;
}
.tooltiptext-fixed p:hover {
cursor: pointer;
background: rgba(0, 0, 0, 0.3) !important;
transition: 200ms;
}
.tooltiptext-fixed p {
border-radius: 8px !important;
padding-top: 2px;
padding-bottom: 2px;
margin: 2px;
} }
+2 -18
View File
@@ -44,12 +44,9 @@ body {
} }
> .date > .value, > .date > .value,
blockquote.forward > .preamble > .sender > .value {
color: rgba(255, 255, 255, 0.7) !important;
}
> .date > .label, > .date > .label,
blockquote.forward > .preamble > .sender > .label { > .sender > .value,
> .sender > .label {
color: rgba(255, 255, 255, 0.7) !important; color: rgba(255, 255, 255, 0.7) !important;
} }
} }
@@ -90,19 +87,6 @@ body {
border-top-right-radius: 1rem; border-top-right-radius: 1rem;
} }
blockquote.forward > .preamble {
color: rgba(255, 255, 255, 0.7) !important;
}
blockquote.forward > .preamble > .date > .value,
blockquote.forward > .preamble > .sender > .value {
color: rgba(255, 255, 255, 0.7) !important;
}
blockquote.forward > .preamble > .date > .label,
blockquote.forward > .preamble > .sender > .label {
color: rgba(255, 255, 255, 0.7) !important;
}
#backgroundTable > * { #backgroundTable > * {
background-color: #161616; background-color: #161616;
border: none; border: none;
+185 -384
View File
@@ -31,20 +31,20 @@
pointer-events: none; pointer-events: none;
} }
.hidden {
display: none;
}
button.timetable-zoom.iconFamily, button.timetable-zoom.iconFamily,
button.bsplus-timetable-control.iconFamily, button.bsplus-timetable-control.iconFamily,
.iconFamily { .iconFamily {
font-family: "IconFamily" !important; font-family: "IconFamily" !important;
} }
.hidden {
display: none;
}
body, body,
.legacy-root input, .legacy-root input,
.legacy-root textarea, .legacy-root textarea,
.legacy-root button:not(.iconFamily), .legacy-root button,
.legacy-root select, .legacy-root select,
.legacy-root option, .legacy-root option,
.legacy-root .input, .legacy-root .input,
@@ -61,6 +61,8 @@ html {
body { body {
font-family: Rubik, sans-serif !important; font-family: Rubik, sans-serif !important;
background: var(--theme-primary);
overflow: hidden;
} }
select { select {
@@ -87,14 +89,16 @@ select:hover {
} }
select:focus { select:focus {
outline: none !important;
background: var(--theme-secondary, var(--background-secondary)) !important; background: var(--theme-secondary, var(--background-secondary)) !important;
border-color: color-mix( border-color: color-mix(
in srgb, in srgb,
var(--text-primary) 18%, var(--text-primary) 18%,
var(--theme-offset-bg, var(--theme-secondary, var(--background-secondary))) 82% var(--theme-offset-bg, var(--theme-secondary, var(--background-secondary))) 82%
) !important; ) !important;
box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-primary) 12%, transparent) !important; }
select:focus-visible {
outline: var(--bsplus-focus-ring) !important;
outline-offset: 2px;
} }
select:not([multiple]):not([size]), select:not([multiple]):not([size]),
@@ -133,7 +137,7 @@ select option {
background: var(--auto-background) !important; background: var(--auto-background) !important;
} }
.legacy-root, .legacy-root,
.legacy-root *:not(.iconFamily) { .legacy-root * {
font-family: var(--betterseqta-font-family, Rubik), sans-serif !important; font-family: var(--betterseqta-font-family, Rubik), sans-serif !important;
} }
@@ -210,9 +214,6 @@ html:not(.dark) .legacy-root {
pointer-events: none !important; pointer-events: none !important;
} }
.connectedNotificationsWrapper > div > button > svg > g {
fill: var(--theme-primary) !important;
}
#main { #main {
color: var(--text-primary); color: var(--text-primary);
position: relative; position: relative;
@@ -258,7 +259,20 @@ html:not(.dark) .legacy-root {
height: 35px; height: 35px;
width: 35px !important; width: 35px !important;
padding: 0; padding: 0;
box-shadow: none; }
.addedButton,
.connectedNotificationsWrapper > div > button {
border: none !important;
box-shadow: none !important;
&::after {
content: none !important;
}
&:focus-visible {
outline: var(--bsplus-focus-ring) !important;
outline-offset: 2px;
}
} }
/* Engage toolbar: keep settings/theme buttons above React chrome */ /* Engage toolbar: keep settings/theme buttons above React chrome */
@@ -350,6 +364,10 @@ html:not(.dark) .legacy-root {
cursor: pointer; cursor: pointer;
padding: 4px 8px; padding: 4px 8px;
} }
.legacy-root .bsplus-timetable-control > svg {
width: 16px;
height: 16px;
}
#main > .dashboard { #main > .dashboard {
grid-template-columns: repeat(autofit, minmax(200px, 400px)) !important; grid-template-columns: repeat(autofit, minmax(200px, 400px)) !important;
@@ -434,7 +452,6 @@ ul.magicDelete > li.deleting {
display: block; display: block;
margin: 0; margin: 0;
flex-shrink: 0; flex-shrink: 0;
fill: var(--theme-primary);
color: var(--theme-primary); color: var(--theme-primary);
} }
#menu, #menu,
@@ -466,10 +483,12 @@ ul.magicDelete > li.deleting {
display: flex; display: flex;
white-space: nowrap; white-space: nowrap;
place-items: center; place-items: center;
cursor: pointer;
} }
#menu .sub { #menu .sub {
top: 71px; top: 71px;
margin-top: -2px; margin-top: -2px;
pointer-events: none;
} }
/* Drill-in stack: only the current list + folder header stay clickable. /* Drill-in stack: only the current list + folder header stay clickable.
@@ -504,10 +523,6 @@ ul.magicDelete > li.deleting {
} }
/* Only the frontmost open .sub panel receives pointer events */ /* Only the frontmost open .sub panel receives pointer events */
#menu .sub {
pointer-events: none;
}
#menu li.hasChildren:is(.active, .bsplus-active) > .sub { #menu li.hasChildren:is(.active, .bsplus-active) > .sub {
pointer-events: auto; pointer-events: auto;
} }
@@ -639,6 +654,7 @@ ul.magicDelete > li.deleting {
color: var(--text-color); color: var(--text-color);
border-right: none; border-right: none;
transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
--menuHidden: none;
} }
/* Custom title bar: keep native `#title` children for sync, hide them visually. /* Custom title bar: keep native `#title` children for sync, hide them visually.
@@ -959,37 +975,35 @@ body > .sortable-fallback.bsplus-sortable-drag,
list-style: none !important; list-style: none !important;
} }
#menu { #menu li:is(.active, .hasChildren.bsplus-active) > .sub > ul > .item:not(.hasChildren) {
li:is(.active, .hasChildren.bsplus-active) > .sub > ul > .item:not(.hasChildren) { position: relative;
position: relative;
&::before { &::before {
content: ""; content: "";
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 3px; width: 3px;
background: var(--item-colour, transparent); background: var(--item-colour, transparent);
transition: transition:
width 100ms, width 100ms,
transform 0.3s ease; transform 0.3s ease;
border-radius: 8px 0 0 8px; border-radius: 8px 0 0 8px;
pointer-events: none; pointer-events: none;
}
&:hover::before,
&:is(.active, .bsplus-active)::before {
width: 6px;
background: var(--item-colour, transparent);
}
} }
li.active > .sub > ul > .active { &:hover::before,
background: rgba(0, 0, 0, 0.3) !important; &:is(.active, .bsplus-active)::before {
width: 6px;
background: var(--item-colour, transparent);
} }
} }
#menu li.active > .sub > ul > .active {
background: rgba(0, 0, 0, 0.3) !important;
}
#userActions { #userActions {
display: none; display: none;
} }
@@ -1364,8 +1378,8 @@ html.transparencyEffects [class*="BasicPanel__BasicPanel___q92_U"] > ol > li + l
#menu li:focus-visible, #menu li:focus-visible,
#menu section:focus-visible { #menu section:focus-visible {
outline: 1px solid rgb(from currentColor r g b / 0.55); outline: var(--bsplus-focus-ring) !important;
outline-offset: -1px; outline-offset: -2px;
background: rgba(0, 0, 0, 0.2) !important; background: rgba(0, 0, 0, 0.2) !important;
} }
@@ -1863,12 +1877,16 @@ html.transparencyEffects [class*="BasicPanel__BasicPanel___q92_U"] > ol > li + l
border-radius: 50px; border-radius: 50px;
} }
.shortcut { .shortcut {
box-sizing: border-box;
height: 4em; height: 4em;
width: 15em; width: 15em;
max-width: 15em; max-width: 15em;
padding: 0 20px 0 12px;
gap: 10px;
background: var(--background-primary); background: var(--background-primary);
color: var(--text-primary); color: var(--text-primary);
display: flex; display: flex;
align-items: center;
border-radius: 80px; border-radius: 80px;
position: relative; position: relative;
transition: 200ms; transition: 200ms;
@@ -1877,9 +1895,10 @@ html.transparencyEffects [class*="BasicPanel__BasicPanel___q92_U"] > ol > li + l
background: var(--auto-background); background: var(--auto-background);
} }
.shortcut p { .shortcut p {
margin: auto 0px auto 5px; flex: 1;
min-width: 0;
margin: 0;
font-size: 20px; font-size: 20px;
width: 150px;
word-wrap: break-word; word-wrap: break-word;
line-height: 20px; line-height: 20px;
} }
@@ -2022,14 +2041,9 @@ html.transparencyEffects [class*="BasicPanel__BasicPanel___q92_U"] > ol > li + l
} }
[class*="notifications__notifications___"] > button > [class*="notifications__bubble___"] { [class*="notifications__notifications___"] > button > [class*="notifications__bubble___"] {
background: var(--better-alert-highlight); background: var(--better-alert-highlight);
width: 25px; width: 22px;
height: 25px; height: 22px;
} font-size: 12px;
.dark .legacy-root button.iconFamily::after {
background: white;
}
.legacy-root button.iconFamily::after {
background: currentColor;
} }
.legacy-root button:not([disabled]):focus { .legacy-root button:not([disabled]):focus {
border-color: var(--better-sub); border-color: var(--better-sub);
@@ -2044,8 +2058,6 @@ html.transparencyEffects [class*="BasicPanel__BasicPanel___q92_U"] > ol > li + l
margin-bottom: 4px !important; margin-bottom: 4px !important;
> [class*="notifications__dismiss___"] { > [class*="notifications__dismiss___"] {
background: rgba(0, 0, 0, 0.1) !important;
color: var(--text-primary);
margin: auto 0; margin: auto 0;
} }
@@ -2086,11 +2098,37 @@ html.transparencyEffects [class*="BasicPanel__BasicPanel___q92_U"] > ol > li + l
margin-top: 5px; margin-top: 5px;
} }
[class*="notifications__actions___"] { [class*="notifications__actions___"] {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 8px 4px 4px !important;
background: var(--auto-background); background: var(--auto-background);
button { button {
background: none !important; margin: 0 !important;
border: 1px solid white; }
}
[class*="notifications__actions___"] button,
[class*="notifications__dismiss___"] {
border: none !important;
border-radius: 8px !important;
box-shadow: none !important;
background: color-mix(in srgb, var(--text-primary) 10%, transparent) !important;
color: var(--text-primary) !important;
transition: background 200ms;
&::after {
content: none !important;
}
&:hover {
background: color-mix(in srgb, var(--text-primary) 18%, transparent) !important;
}
&:focus-visible {
outline: var(--bsplus-focus-ring) !important;
outline-offset: 2px;
} }
} }
[class*="notifications__details___"] { [class*="notifications__details___"] {
@@ -2127,7 +2165,6 @@ html.transparencyEffects [class*="BasicPanel__BasicPanel___q92_U"] > ol > li + l
content: ""; content: "";
font-size: 12px; font-size: 12px;
margin-right: 4px; margin-right: 4px;
font-family: "IconFamily";
pointer-events: none; pointer-events: none;
} }
@@ -2163,7 +2200,6 @@ html.transparencyEffects [class*="BasicPanel__BasicPanel___q92_U"] > ol > li + l
font-size: 16px; font-size: 16px;
margin-left: 8px; margin-left: 8px;
margin-top: auto; margin-top: auto;
font-family: "IconFamily";
pointer-events: none; pointer-events: none;
} }
[class*="Input__Input___"] { [class*="Input__Input___"] {
@@ -2918,14 +2954,12 @@ div.bar.flat {
border-radius: 12px; border-radius: 12px;
} }
.dark { .dark .cke_toolbox > .cke_toolbar .cke_combo_on > .cke_combo_button,
.cke_toolbox > .cke_toolbar .cke_combo_on > .cke_combo_button, .dark .cke_toolbox > .cke_toolbar .cke_button_on {
.cke_toolbox > .cke_toolbar .cke_button_on { background-color: #3d3d3e !important;
background-color: #3d3d3e !important;
&::after { &::after {
background: rgb(207, 207, 207) !important; background: rgb(207, 207, 207) !important;
}
} }
} }
@@ -2967,18 +3001,14 @@ ul.uiSplitButtonList,
background: transparent; background: transparent;
color: var(--text-primary); color: var(--text-primary);
} }
body {
background: var(--theme-primary);
overflow: hidden;
}
.shortcuticondiv { .shortcuticondiv {
height: 39px; flex-shrink: 0;
width: 39px; height: 39px !important;
width: 39px !important;
border-radius: 50%; border-radius: 50%;
padding: 0; padding: 0;
margin: auto 0px auto 10px; margin: 0;
background-repeat: no-repeat; object-fit: contain;
background-size: contain;
} }
.forumView > .messages > .thread, .forumView > .messages > .thread,
.forumView > .messages > .deletedPlaceholder, .forumView > .messages > .deletedPlaceholder,
@@ -3219,9 +3249,6 @@ body:not(.clr-open) .clr-picker,
z-index: 10; z-index: 10;
opacity: 0.4; opacity: 0.4;
} }
#menu {
--menuHidden: none;
}
.editmenuoption { .editmenuoption {
background: var(--background-primary); background: var(--background-primary);
color: var(--text-primary); color: var(--text-primary);
@@ -3239,18 +3266,48 @@ body:not(.clr-open) .clr-picker,
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.logout { .bsplus-tooltip-bubble:has(> .bsplus-logout) {
background: none !important; min-width: 0;
padding: 5px 10px;
} }
.bsplus-tooltip-bubble .bsplus-logout {
display: flex !important;
align-items: center;
justify-content: center;
width: 40px !important;
height: 32px !important;
margin: 0 !important;
padding: 0 !important;
border: none !important;
border-radius: 6px;
box-shadow: none !important;
background: none !important;
color: #fff !important;
opacity: 1 !important;
cursor: pointer;
transition: background 150ms;
#logouttooltip { html.dark & {
width: 50px !important; color: #000 !important;
margin-left: -28px !important; }
top: 105% !important;
.uiButton svg g { &::after {
color: var(--background-primary) !important; content: none !important;
}
svg {
width: 20px;
height: 20px;
fill: none !important;
stroke: currentColor !important;
}
&:hover {
background: color-mix(in srgb, currentColor 12%, transparent) !important;
}
&:focus-visible {
outline: 2px solid currentColor !important;
outline-offset: -2px;
} }
} }
.svg { .svg {
@@ -3352,6 +3409,7 @@ body:not(.clr-open) .clr-picker,
width: 25px; width: 25px;
position: absolute; position: absolute;
bottom: 20px; bottom: 20px;
color: inherit;
} }
#userActions > .details > .code { #userActions > .details > .code {
text-transform: initial; text-transform: initial;
@@ -3493,50 +3551,9 @@ div.day-empty {
cursor: pointer; cursor: pointer;
text-decoration: underline; text-decoration: underline;
} }
.upcoming-blank {
display: flex;
border-bottom: 2px solid #bebebe;
margin: 5px 50px;
height: 2em;
padding: 0px;
}
.upcoming-tick {
align-self: center;
}
.upcoming-title h2 { .upcoming-title h2 {
width: 100%; width: 100%;
} }
.upcoming-filters {
display: flex;
height: 26px;
width: 65%;
align-self: center;
align-items: center;
color: var(--text-color);
padding: 5px;
overflow-x: scroll;
overflow-y: hidden;
}
.upcoming-checkbox-container {
position: relative;
padding: none !important;
padding-left: 25px !important;
padding-right: 10px !important;
cursor: pointer;
font-size: 12px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
height: 20px;
align-items: center;
display: flex;
}
.upcoming-hiddenassessment {
color: #797979;
}
.calendarEventEditor > .tabset > .item { .calendarEventEditor > .tabset > .item {
border-radius: 0 !important; border-radius: 0 !important;
} }
@@ -3659,64 +3676,10 @@ div.day-empty {
.upcoming-special-day { .upcoming-special-day {
font-size: 20px; font-size: 20px;
} }
.upcoming-blank {
display: flex;
border-bottom: 2px solid #bebebe;
margin: 5px 50px;
height: 2em;
padding: 0px;
}
.upcoming-blank p {
padding: 0;
margin: 0;
}
.upcoming-title { .upcoming-title {
display: flex; display: flex;
align-content: space-between; align-content: space-between;
} }
.upcoming-checkbox-container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
padding: 0;
}
.upcoming-checkmark {
position: absolute;
top: 0;
left: 0;
height: 15px;
width: 15px;
border: 3px solid var(--item-colour);
border-radius: 5px;
color: var(--text-color);
}
.upcoming-checkbox-container:hover input ~ .upcoming-checkmark {
filter: brightness(0.8);
}
.upcoming-checkbox-container input:checked ~ .upcoming-checkmark {
background: var(--item-colour);
}
.upcoming-checkmark:after {
content: "";
position: absolute;
display: none;
}
.upcoming-checkbox-container input:checked ~ .upcoming-checkmark:after {
display: block;
}
.upcoming-checkbox-container .upcoming-checkmark:after {
left: 3.5px;
top: 0px;
width: 5px;
height: 10px;
border: solid white;
border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.titlebar { .titlebar {
align-items: center; align-items: center;
transition: 200ms; transition: 200ms;
@@ -3772,11 +3735,9 @@ div.day-empty {
color 0.2s ease-in-out; color 0.2s ease-in-out;
} }
.engage-child-select:focus { .engage-child-select:focus-visible {
outline: none; outline: var(--bsplus-focus-ring) !important;
box-shadow: outline-offset: 2px;
0 0 0 2px var(--background-primary),
0 0 0 4px rgba(59, 130, 246, 0.45);
} }
#engage-day-container:has(> .day-empty) { #engage-day-container:has(> .day-empty) {
@@ -3793,27 +3754,6 @@ div.day-empty {
text-align: center; text-align: center;
} }
#engage-logouttooltip {
width: 50px !important;
margin-left: -28px !important;
top: 105% !important;
.engage-logout {
background: none !important;
border: none;
cursor: pointer;
color: var(--background-primary) !important;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 5px;
svg {
fill: var(--background-primary) !important;
}
}
}
.pagename { .pagename {
align-items: center; align-items: center;
display: flex; display: flex;
@@ -3911,7 +3851,7 @@ div.day-empty {
visibility 0s linear 0.45s; visibility 0s linear 0.45s;
} }
.titlebar .bsplus-titlebar-badge:focus-visible { .titlebar .bsplus-titlebar-badge:focus-visible {
outline: 2px solid var(--theme-primary); outline: var(--bsplus-focus-ring) !important;
outline-offset: 2px; outline-offset: 2px;
} }
.bsplus-founder-badge-slot--static .bsplus-titlebar-badge { .bsplus-founder-badge-slot--static .bsplus-titlebar-badge {
@@ -3960,17 +3900,9 @@ div.day-empty {
.bsplus-founder-badge:hover { .bsplus-founder-badge:hover {
transform: scale(1.02); transform: scale(1.02);
} }
.bsplus-founder-badge:focus { .bsplus-founder-badge:focus-visible {
outline: none; outline: var(--bsplus-focus-ring) !important;
} outline-offset: 2px;
.bsplus-founder-badge:focus-visible .bsplus-founder-badge__glass {
box-shadow:
inset 0 0 0 1px rgba(255, 255, 255, 0.78),
inset 0 1px 0 rgba(255, 255, 255, 0.52),
inset 0 2px 8px rgba(255, 255, 255, 0.14),
inset 0 -1px 0 rgba(0, 0, 0, 0.08),
0 0 0 2px var(--theme-primary, #f97316),
0 0 0 4px rgba(249, 115, 22, 0.35);
} }
.bsplus-founder-badge__glass { .bsplus-founder-badge__glass {
position: relative; position: relative;
@@ -4125,10 +4057,8 @@ div.day-empty {
transition: all 0.2s ease; transition: all 0.2s ease;
} }
.bsplus-founder-badge-actions .bsplus-cal-btn:focus-visible { .bsplus-founder-badge-actions .bsplus-cal-btn:focus-visible {
outline: none; outline: var(--bsplus-focus-ring) !important;
box-shadow: outline-offset: 2px;
0 0 0 2px var(--background-primary, #fff),
0 0 0 4px var(--better-main, #3b82f6);
} }
.bsplus-founder-badge-actions .bsplus-cal-btn--ghost { .bsplus-founder-badge-actions .bsplus-cal-btn--ghost {
background: color-mix(in srgb, var(--text-primary, #111) 8%, transparent); background: color-mix(in srgb, var(--text-primary, #111) 8%, transparent);
@@ -4156,6 +4086,9 @@ div.day-empty {
z-index: 3; z-index: 3;
position: absolute; position: absolute;
} }
.userInfosvg path {
transition: fill 200ms;
}
.userInfosvgdiv { .userInfosvgdiv {
width: 50px !important; width: 50px !important;
height: 50px !important; height: 50px !important;
@@ -4177,9 +4110,7 @@ div.day-empty {
left: 15%; left: 15%;
transition: background 200ms; transition: background 200ms;
} }
.userInfosvg path {
transition: fill 200ms;
}
.userInfohouse { .userInfohouse {
padding: 2px 8px; padding: 2px 8px;
font-size: 14px; font-size: 14px;
@@ -4454,14 +4385,9 @@ div.day-empty {
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
} }
.bsplus-tos-btn:focus {
outline: none;
}
.bsplus-tos-btn:focus-visible { .bsplus-tos-btn:focus-visible {
box-shadow: outline: var(--bsplus-focus-ring) !important;
0 0 0 2px var(--background-primary), outline-offset: 2px;
0 0 0 4px color-mix(in srgb, var(--text-primary) 45%, transparent);
} }
.bsplus-tos-btn--primary { .bsplus-tos-btn--primary {
@@ -4569,6 +4495,13 @@ div.day-empty {
.whatsnewFooter a { .whatsnewFooter a {
border: none; border: none;
} }
.whatsnewFooter .socials {
display: flex;
align-items: center;
margin: 0 5px;
padding: 0;
background: none !important;
}
.whatsnewFooter div { .whatsnewFooter div {
margin: 0 15px; margin: 0 15px;
display: flex; display: flex;
@@ -4842,6 +4775,7 @@ div.day-empty {
overflow: hidden; overflow: hidden;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
line-clamp: 3;
text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
} }
.themeOfTheMonthCardExpanded .themeOfTheMonthCardHeroEmbossVariants { .themeOfTheMonthCardExpanded .themeOfTheMonthCardHeroEmbossVariants {
@@ -4939,6 +4873,7 @@ div.day-empty {
overflow: hidden; overflow: hidden;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: unset; -webkit-line-clamp: unset;
line-clamp: unset;
} }
.themeOfTheMonthCard::before { .themeOfTheMonthCard::before {
content: ""; content: "";
@@ -5074,10 +5009,12 @@ div.day-empty {
overflow: hidden; overflow: hidden;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
line-clamp: 3;
} }
.themeOfTheMonthCardDescriptionExpanded { .themeOfTheMonthCardDescriptionExpanded {
display: block; display: block;
-webkit-line-clamp: unset; -webkit-line-clamp: unset;
line-clamp: unset;
} }
.themeOfTheMonthCardExpanding:not(.themeOfTheMonthCardExpandedShell) .themeOfTheMonthCardExpanding:not(.themeOfTheMonthCardExpandedShell)
.themeOfTheMonthCardDescriptionExpanded { .themeOfTheMonthCardDescriptionExpanded {
@@ -5213,12 +5150,19 @@ div.day-empty {
.popup-media-fullscreenable:hover { .popup-media-fullscreenable:hover {
opacity: 0.95; opacity: 0.95;
} }
.popup-media-fullscreenable:focus { [class*="Input__Input___"]:has(> input:focus-visible) {
outline: none; outline: var(--bsplus-focus-ring) !important;
outline-offset: 2px;
}
.betterseqta-weight-input:focus-visible,
#betterseqta-weight-override:focus-visible,
#theme-of-the-month-card button:focus-visible {
outline: var(--bsplus-focus-ring) !important;
outline-offset: 2px;
} }
.popup-media-fullscreenable:focus-visible { .popup-media-fullscreenable:focus-visible {
outline: 2px solid color-mix(in srgb, var(--text-primary) 70%, transparent); outline: var(--bsplus-focus-ring) !important;
outline-offset: 4px; outline-offset: 2px;
} }
.bsplus-popup-media-overlay-backdrop { .bsplus-popup-media-overlay-backdrop {
@@ -5486,18 +5430,6 @@ div.day-empty {
opacity: 0.7; opacity: 0.7;
} }
.notice-preview {
font-size: 14px;
color: var(--text-secondary);
line-height: 1.4;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.notice-modal-overlay { .notice-modal-overlay {
position: fixed; position: fixed;
top: 0; top: 0;
@@ -5699,122 +5631,8 @@ button.notice-close-btn {
} }
} }
.notice-modal-badge-row { .dark .notice-modal-content {
display: flex; border-color: rgba(255, 255, 255, 0.05);
align-items: center;
gap: 12px;
flex: 1;
}
.notice-modal-badge {
padding: 6px 12px;
border-radius: 20px;
font-size: 13px;
font-weight: 700;
white-space: nowrap;
}
.notice-modal-staff {
font-size: 14px;
color: var(--text-secondary);
opacity: 0.8;
}
.notice-modal-close {
background: var(--background-secondary);
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 18px;
color: var(--text-primary);
transition: all 0.2s ease;
flex-shrink: 0;
&:hover {
background: var(--background-tertiary);
transform: scale(1.1);
}
}
.notice-modal-title {
font-size: 24px;
font-weight: 600;
color: var(--text-primary);
margin: 16px 20px 20px;
line-height: 1.3;
flex-shrink: 0;
}
.notice-modal-body {
padding: 0 20px 20px;
font-size: 15px;
line-height: 1.6;
color: var(--text-secondary);
flex: 1;
overflow-y: auto;
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
border-radius: 3px;
}
&::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.3);
}
p {
margin-bottom: 12px;
&:last-child {
margin-bottom: 0;
}
}
a {
color: var(--theme-primary);
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
ul,
ol {
margin: 12px 0;
padding-left: 20px;
}
li {
margin-bottom: 4px;
}
}
.dark {
.notice-card {
border-color: rgba(255, 255, 255, 0.05);
&:hover {
border-color: rgba(255, 255, 255, 0.1);
}
}
.notice-modal-content {
border-color: rgba(255, 255, 255, 0.05);
}
} }
@media (max-width: 768px) { @media (max-width: 768px) {
@@ -5825,23 +5643,6 @@ button.notice-close-btn {
.notice-modal-content { .notice-modal-content {
max-height: 90vh; max-height: 90vh;
} }
.notice-modal-title {
font-size: 20px;
margin: 12px 16px 16px;
}
.notice-modal-body {
padding: 0 16px 16px;
}
.notice-card {
padding: 12px;
}
.notice-preview {
font-size: 13px;
}
} }
h2.home-subtitle { h2.home-subtitle {
+26 -2
View File
@@ -26,11 +26,11 @@
--text-13xl: 16rem; --text-13xl: 16rem;
--text-14xl: 18rem; --text-14xl: 18rem;
--font-IconFamily: IconFamily;
--animate-spin-fast: spin 0.4s linear infinite; --animate-spin-fast: spin 0.4s linear infinite;
--aspect-theme: 5 / 1; --aspect-theme: 5 / 1;
--font-IconFamily: IconFamily;
} }
@layer base { @layer base {
@@ -45,4 +45,28 @@
button { button {
cursor: pointer; cursor: pointer;
} }
:root,
:host {
--bsplus-focus-ring: 2px solid var(--color-zinc-900);
}
.dark {
--bsplus-focus-ring: 2px solid var(--color-white);
}
input:focus,
textarea:focus,
select:focus {
box-shadow: none !important;
}
:focus-visible,
input:focus-visible,
[type]:focus-visible,
textarea:focus-visible,
select:focus-visible {
outline: var(--bsplus-focus-ring);
outline-offset: 2px;
}
} }
-1
View File
@@ -1,6 +1,5 @@
declare module "*.mp4"; declare module "*.mp4";
declare module "*.webm"; declare module "*.webm";
declare module "*.woff";
declare module "*.scss"; declare module "*.scss";
declare module "*.png"; declare module "*.png";
declare module "*.webp"; declare module "*.webp";
+8 -4
View File
@@ -17,16 +17,20 @@
const variants = { const variants = {
primary: "bg-zinc-100 text-zinc-900 border-transparent enabled:hover:bg-white", primary: "bg-zinc-100 text-zinc-900 border-transparent enabled:hover:bg-white",
secondary: "dark:bg-[#38373D]/50 bg-[#DDDDDD]/50 border-[#DDDDDD]/30 dark:border-[#38373D]/30 dark:text-white enabled:hover:brightness-125", secondary:
ghost: "bg-transparent border-transparent dark:text-white enabled:hover:bg-zinc-200/60 dark:enabled:hover:bg-zinc-700/50", "dark:bg-[#38373D]/50 bg-[#DDDDDD]/50 border-[#DDDDDD]/30 dark:border-[#38373D]/30 dark:text-white enabled:hover:brightness-125",
ghost:
"bg-transparent border-transparent dark:text-white enabled:hover:bg-zinc-200/60 dark:enabled:hover:bg-zinc-700/50",
}; };
</script> </script>
<button <button
type="button" type="button"
onclick={onClick} onclick={onClick}
disabled={disabled} {disabled}
class="inline-flex items-center justify-center gap-1.5 px-5 py-1.5 text-[0.75rem] shadow-2xl border rounded-lg transition enabled:active:scale-[0.96] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-zinc-400 disabled:cursor-not-allowed disabled:opacity-50 {variants[variant]} {className}" class="inline-flex items-center justify-center gap-1.5 px-5 py-1.5 text-[0.75rem] shadow-2xl border rounded-lg transition enabled:active:scale-[0.96] disabled:cursor-not-allowed disabled:opacity-50 {variants[
variant
]} {className}"
> >
{#if icon}<span class="font-IconFamily text-base" aria-hidden="true">{icon}</span>{/if} {#if icon}<span class="font-IconFamily text-base" aria-hidden="true">{icon}</span>{/if}
{text} {text}
+26 -21
View File
@@ -2,12 +2,14 @@
import { onMount } from "svelte"; import { onMount } from "svelte";
import { animate } from "motion"; import { animate } from "motion";
import { delay } from "@/seqta/utils/delay.ts"; import { delay } from "@/seqta/utils/delay.ts";
import { cloudAuth } from "@/seqta/utils/CloudAuth"; import { cloudAuth } from "@/seqta/utils/cloudAuth";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import CloudPfpAvatar from "@/interface/components/CloudPfpAvatar.svelte"; import CloudPfpAvatar from "@/interface/components/CloudPfpAvatar.svelte";
import Button from "./Button.svelte"; import Button from "./Button.svelte";
const { hidePanel }: { const {
hidePanel,
}: {
hidePanel: () => void; hidePanel: () => void;
} = $props(); } = $props();
@@ -22,15 +24,11 @@
}); });
if (background && content) { if (background && content) {
animate( animate(background, { opacity: [0, 1] }, { duration: 0.3, ease: [0.4, 0, 0.2, 1] });
background,
{ opacity: [0, 1] },
{ duration: 0.3, ease: [0.4, 0, 0.2, 1] }
);
animate( animate(
content, content,
{ scale: [0.4, 1], opacity: [0, 1] }, { scale: [0.4, 1], opacity: [0, 1] },
{ type: "spring", stiffness: 400, damping: 30 } { type: "spring", stiffness: 400, damping: 30 },
); );
} }
@@ -50,13 +48,9 @@
animate( animate(
content, content,
{ scale: [1, 0.4], opacity: [1, 0] }, { scale: [1, 0.4], opacity: [1, 0] },
{ type: "spring", stiffness: 400, damping: 30 } { type: "spring", stiffness: 400, damping: 30 },
);
animate(
background,
{ opacity: [1, 0] },
{ ease: [0.4, 0, 0.2, 1] }
); );
animate(background, { opacity: [1, 0] }, { ease: [0.4, 0, 0.2, 1] });
await delay(400); await delay(400);
hidePanel(); hidePanel();
} }
@@ -92,9 +86,13 @@
<!-- svelte-ignore a11y_no_static_element_interactions --> <!-- svelte-ignore a11y_no_static_element_interactions -->
<div <div
bind:this={background} bind:this={background}
class="flex absolute top-0 left-0 z-50 justify-center items-center w-full h-full cursor-pointer bg-black/50 {$settingsState.DarkMode ? 'dark' : ''}" class="flex absolute top-0 left-0 z-50 justify-center items-center w-full h-full cursor-pointer bg-black/50 {$settingsState.DarkMode
? 'dark'
: ''}"
onclick={handleBackgroundClick} onclick={handleBackgroundClick}
onkeydown={(e) => { if (e.key === "Enter") handleBackgroundClick(e as unknown as MouseEvent) }} onkeydown={(e) => {
if (e.key === "Enter") handleBackgroundClick(e as unknown as MouseEvent);
}}
> >
<div <div
bind:this={content} bind:this={content}
@@ -114,16 +112,23 @@
/> />
{/if} {/if}
{#if !cloudState.user?.pfpUrl} {#if !cloudState.user?.pfpUrl}
<div class="flex items-center justify-center w-12 h-12 rounded-full bg-zinc-300 dark:bg-zinc-600 text-zinc-700 dark:text-zinc-200 font-semibold text-base"> <div
class="flex items-center justify-center w-12 h-12 rounded-full bg-zinc-300 dark:bg-zinc-600 text-zinc-700 dark:text-zinc-200 font-semibold text-base"
>
{getInitials()} {getInitials()}
</div> </div>
{/if} {/if}
<div class="min-w-0 flex-1"> <div class="min-w-0 flex-1">
<p class="text-sm font-medium text-zinc-900 dark:text-white truncate"> <p class="text-sm font-medium text-zinc-900 dark:text-white truncate">
{cloudState.user?.displayName || cloudState.user?.username || cloudState.user?.email || "User"} {cloudState.user?.displayName ||
cloudState.user?.username ||
cloudState.user?.email ||
"User"}
</p> </p>
{#if cloudState.user?.email && cloudState.user?.email !== (cloudState.user?.displayName || cloudState.user?.username)} {#if cloudState.user?.email && cloudState.user?.email !== (cloudState.user?.displayName || cloudState.user?.username)}
<p class="text-xs text-zinc-500 dark:text-zinc-400 truncate">{cloudState.user.email}</p> <p class="text-xs text-zinc-500 dark:text-zinc-400 truncate">
{cloudState.user.email}
</p>
{/if} {/if}
</div> </div>
</div> </div>
@@ -140,7 +145,7 @@
<p class="text-sm text-zinc-600 dark:text-zinc-400"> <p class="text-sm text-zinc-600 dark:text-zinc-400">
Sign in to sync settings across devices, use your cloud profile picture, and more. Sign in to sync settings across devices, use your cloud profile picture, and more.
</p> </p>
<Button class="w-full" icon={""} text="Sign in with BetterSEQTA Cloud" onClick={handleSignIn} /> <Button class="w-full" text="Sign in with BetterSEQTA Cloud" onClick={handleSignIn} />
{#if loginError} {#if loginError}
<p class="text-xs text-red-600 dark:text-red-400">{loginError}</p> <p class="text-xs text-red-600 dark:text-red-400">{loginError}</p>
{/if} {/if}
+18 -23
View File
@@ -1,42 +1,37 @@
<script lang="ts"> <script lang="ts">
import { resolveCloudPfp, defaultAccountsPfpUrl } from "@/seqta/utils/cloudPfpCache"; import {
import type { CloudUser } from "@/seqta/utils/CloudAuth"; resolveCloudPfp,
defaultAccountsPfpUrl,
revokePfpUrl,
} from "@/seqta/utils/cloudPfpCache";
import type { CloudUser } from "@/seqta/utils/cloudAuth";
const { user, class: className = "" }: { const {
user,
class: className = "",
}: {
user: CloudUser | null | undefined; user: CloudUser | null | undefined;
class?: string; class?: string;
} = $props(); } = $props();
let avatarSrc = $state<string | undefined>(undefined); let avatarSrc = $state<string | null>(null);
let revokeUrl: string | undefined;
$effect(() => { $effect(() => {
const u = user; const u = user;
if (revokeUrl) { avatarSrc = null;
URL.revokeObjectURL(revokeUrl);
revokeUrl = undefined;
}
avatarSrc = undefined;
if (!u?.id) return; if (!u?.id) return;
const pfpUrl = u.pfpUrl ?? defaultAccountsPfpUrl(u.id);
let cancelled = false; let cancelled = false;
void resolveCloudPfp(u.id, pfpUrl).then((resolved) => { let resolved: string | null = null;
if (cancelled || !resolved) return; void resolveCloudPfp(u.id, u.pfpUrl ?? defaultAccountsPfpUrl(u.id)).then((src) => {
if (resolved.fromCache) { resolved = src;
revokeUrl = resolved.src; if (cancelled) return revokePfpUrl(src);
} avatarSrc = src;
avatarSrc = resolved.src;
}); });
return () => { return () => {
cancelled = true; cancelled = true;
if (revokeUrl) { revokePfpUrl(resolved);
URL.revokeObjectURL(revokeUrl);
revokeUrl = undefined;
}
}; };
}); });
</script> </script>
@@ -1,11 +1,13 @@
<script lang="ts"> <script lang="ts">
import browser from "@/lib/browser"; import browser from "@/lib/browser";
import { cloudAuth } from "@/seqta/utils/CloudAuth"; import { cloudAuth } from "@/seqta/utils/cloudAuth";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import Button from "./Button.svelte"; import Button from "./Button.svelte";
import Switch from "./Switch.svelte"; import Switch from "./Switch.svelte";
let { showDisclaimer }: { let {
showDisclaimer,
}: {
showDisclaimer: (onConfirm: () => void, onCancel: () => void) => void; showDisclaimer: (onConfirm: () => void, onCancel: () => void) => void;
} = $props(); } = $props();
@@ -73,7 +75,9 @@
<div class="flex items-center justify-between gap-3"> <div class="flex items-center justify-between gap-3">
<div> <div>
<p class="text-[11px] font-semibold text-zinc-800 dark:text-zinc-100">Automatic sync</p> <p class="text-[11px] font-semibold text-zinc-800 dark:text-zinc-100">Automatic sync</p>
<p class="text-[10px] text-zinc-500 dark:text-zinc-400">Syncs settings when SEQTA loads and when you make changes</p> <p class="text-[10px] text-zinc-500 dark:text-zinc-400">
Syncs settings when SEQTA loads and when you make changes
</p>
</div> </div>
<div class="shrink-0"> <div class="shrink-0">
<Switch <Switch
@@ -84,11 +88,7 @@
</div> </div>
<div class="flex flex-wrap gap-2"> <div class="flex flex-wrap gap-2">
<Button <Button text={busy ? "Please wait\u2026" : "Upload"} onClick={upload} disabled={busy} />
text={busy ? "Please wait\u2026" : "Upload"}
onClick={upload}
disabled={busy}
/>
<Button <Button
text={busy ? "Please wait\u2026" : "Download"} text={busy ? "Please wait\u2026" : "Download"}
onClick={promptDownload} onClick={promptDownload}
@@ -110,7 +110,8 @@
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
class="font-medium text-emerald-600 underline decoration-emerald-600/50 underline-offset-2 hover:text-emerald-700 dark:text-emerald-400 dark:hover:text-emerald-300 rounded-xs" class="font-medium text-emerald-600 underline decoration-emerald-600/50 underline-offset-2 hover:text-emerald-700 dark:text-emerald-400 dark:hover:text-emerald-300 rounded-xs"
>Privacy policy</a> >Privacy policy</a
>
</p> </p>
</div> </div>
{/if} {/if}
+84 -57
View File
@@ -1,69 +1,95 @@
<script lang="ts"> <script lang="ts">
import { settingsState } from '@/seqta/utils/listeners/SettingsState' import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { onDestroy, onMount } from 'svelte' import { onDestroy, onMount } from "svelte";
import { EditorState } from '@codemirror/state'; import { EditorState } from "@codemirror/state";
import { highlightSelectionMatches } from '@codemirror/search'; import { highlightSelectionMatches } from "@codemirror/search";
import { indentWithTab, history, defaultKeymap, historyKeymap } from '@codemirror/commands'; import { indentWithTab, history, defaultKeymap, historyKeymap } from "@codemirror/commands";
import { indentOnInput, indentUnit, bracketMatching, foldKeymap, syntaxHighlighting, defaultHighlightStyle } from '@codemirror/language'; import {
import { closeBrackets, autocompletion, closeBracketsKeymap, completionKeymap } from '@codemirror/autocomplete'; indentOnInput,
import { highlightSpecialChars, drawSelection, rectangularSelection, crosshairCursor, highlightActiveLine, keymap, EditorView, dropCursor, type KeyBinding } from '@codemirror/view'; indentUnit,
import { color } from '@uiw/codemirror-extensions-color' bracketMatching,
import { Compartment } from '@codemirror/state'; foldKeymap,
syntaxHighlighting,
defaultHighlightStyle,
} from "@codemirror/language";
import {
closeBrackets,
autocompletion,
closeBracketsKeymap,
completionKeymap,
} from "@codemirror/autocomplete";
import {
highlightSpecialChars,
drawSelection,
rectangularSelection,
crosshairCursor,
highlightActiveLine,
keymap,
EditorView,
dropCursor,
type KeyBinding,
} from "@codemirror/view";
import { color } from "@uiw/codemirror-extensions-color";
import { Compartment } from "@codemirror/state";
import { githubLight, githubDark } from '@uiw/codemirror-theme-github'; import { githubLight, githubDark } from "@uiw/codemirror-theme-github";
import { css } from "@codemirror/lang-css"; import { css } from "@codemirror/lang-css";
let editor = $state<HTMLDivElement | null>(null) let editor = $state<HTMLDivElement | null>(null);
let view: EditorView | null = null; let view: EditorView | null = null;
let unsubSettings: (() => void) | undefined; let unsubSettings: (() => void) | undefined;
let editorTheme = new Compartment(); let editorTheme = new Compartment();
let { value, onChange, className }: {value: string, onChange: (value: string) => void, className?: string} = $props() let {
value,
onChange,
className,
}: { value: string; onChange: (value: string) => void; className?: string } = $props();
function createEditorState(initialContents: string) { function createEditorState(initialContents: string) {
let extensions = [ let extensions = [
highlightSpecialChars(), highlightSpecialChars(),
history(), history(),
drawSelection(), drawSelection(),
indentUnit.of(" "), indentUnit.of(" "),
EditorState.allowMultipleSelections.of(true), EditorState.allowMultipleSelections.of(true),
indentOnInput(), indentOnInput(),
bracketMatching(), bracketMatching(),
closeBrackets(), closeBrackets(),
autocompletion(), autocompletion(),
rectangularSelection(), rectangularSelection(),
crosshairCursor(), crosshairCursor(),
dropCursor(), dropCursor(),
highlightActiveLine(), highlightActiveLine(),
highlightSelectionMatches(), highlightSelectionMatches(),
editorTheme.of(githubLight), editorTheme.of(githubLight),
keymap.of([ keymap.of([
indentWithTab, indentWithTab,
...closeBracketsKeymap, ...closeBracketsKeymap,
...defaultKeymap, ...defaultKeymap,
...historyKeymap, ...historyKeymap,
...foldKeymap, ...foldKeymap,
...completionKeymap, ...completionKeymap,
] as KeyBinding[]), ] as KeyBinding[]),
EditorView.updateListener.of((update) => { EditorView.updateListener.of((update) => {
if (update.docChanged) { if (update.docChanged) {
onChange(update.state.doc.toString()) onChange(update.state.doc.toString());
} }
}), }),
css(), css(),
color, color,
syntaxHighlighting(defaultHighlightStyle, { fallback: true }), syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
]; ];
return EditorState.create({ return EditorState.create({
doc: initialContents, doc: initialContents,
extensions extensions,
}); });
} }
function createEditorView(state: EditorState, parent: HTMLElement) { function createEditorView(state: EditorState, parent: HTMLElement) {
return new EditorView({ state, parent }); return new EditorView({ state, parent });
} }
onMount(() => { onMount(() => {
@@ -75,10 +101,8 @@
unsubSettings = settingsState.subscribe((settings) => { unsubSettings = settingsState.subscribe((settings) => {
if (view) { if (view) {
view.dispatch({ view.dispatch({
effects: editorTheme.reconfigure( effects: editorTheme.reconfigure(settings.DarkMode ? githubDark : githubLight),
settings.DarkMode ? githubDark : githubLight });
)
})
} }
}); });
}); });
@@ -88,7 +112,10 @@
if (view) { if (view) {
view.destroy(); view.destroy();
} }
}) });
</script> </script>
<div class={`rounded-lg text-[13px] overflow-clip w-full bg-white dark:bg-zinc-900 ${className}`} bind:this={editor}></div> <div
class={`rounded-lg text-[13px] overflow-clip w-full bg-white dark:bg-zinc-900 ${className}`}
bind:this={editor}
></div>
+32 -17
View File
@@ -1,11 +1,11 @@
<script lang="ts"> <script lang="ts">
import { onMount } from 'svelte' import { onMount } from "svelte";
import { animate } from 'motion'; import { animate } from "motion";
import { delay } from '@/seqta/utils/delay' import { delay } from "@/seqta/utils/delay";
import { settingsState } from '@/seqta/utils/listeners/SettingsState' import { settingsState } from "@/seqta/utils/listeners/settingsState";
import GradientPicker from './colourPicker/GradientPicker.svelte' import GradientPicker from "./colourPicker/GradientPicker.svelte";
const PRESETS_KEY = 'colorPickerPresets'; const PRESETS_KEY = "colorPickerPresets";
const MAX_PRESETS = 18; const MAX_PRESETS = 18;
const DEFAULT_PRESETS = [ const DEFAULT_PRESETS = [
"linear-gradient(30deg, rgba(229,209,218,1) 0%, RGBA(235,169,202,1) 46%, rgba(214,155,162,1) 100%)", "linear-gradient(30deg, rgba(229,209,218,1) 0%, RGBA(235,169,202,1) 46%, rgba(214,155,162,1) 100%)",
@@ -49,12 +49,12 @@
let current = $state(initialColour()); let current = $state(initialColour());
function initialColour(): string { function initialColour(): string {
return customState ?? settingsState.selectedColor ?? ''; return customState ?? settingsState.selectedColor ?? "";
} }
function loadPresets(): string[] { function loadPresets(): string[] {
try { try {
const saved = JSON.parse(localStorage.getItem(PRESETS_KEY) ?? 'null'); const saved = JSON.parse(localStorage.getItem(PRESETS_KEY) ?? "null");
return Array.isArray(saved) ? saved : DEFAULT_PRESETS; return Array.isArray(saved) ? saved : DEFAULT_PRESETS;
} catch { } catch {
return DEFAULT_PRESETS; return DEFAULT_PRESETS;
@@ -63,7 +63,10 @@
function rememberPreset(colour: string) { function rememberPreset(colour: string) {
if (!colour || presets[0] === colour) return; if (!colour || presets[0] === colour) return;
const updated = [colour, ...presets.filter((preset) => preset !== colour)].slice(0, MAX_PRESETS); const updated = [colour, ...presets.filter((preset) => preset !== colour)].slice(
0,
MAX_PRESETS,
);
localStorage.setItem(PRESETS_KEY, JSON.stringify(updated)); localStorage.setItem(PRESETS_KEY, JSON.stringify(updated));
} }
@@ -76,26 +79,34 @@
const closePicker = async () => { const closePicker = async () => {
if (standalone || !background || !content) return; if (standalone || !background || !content) return;
animate(content, { scale: [1, 0.4], opacity: [1, 0] }, { type: 'spring', stiffness: 400, damping: 30 }); animate(
content,
{ scale: [1, 0.4], opacity: [1, 0] },
{ type: "spring", stiffness: 400, damping: 30 },
);
animate(background, { opacity: [1, 0] }, { ease: [0.4, 0, 0.2, 1] }); animate(background, { opacity: [1, 0] }, { ease: [0.4, 0, 0.2, 1] });
await delay(400); await delay(400);
hidePicker?.(); hidePicker?.();
} };
onMount(() => { onMount(() => {
if (!standalone && background && content) { if (!standalone && background && content) {
animate(background, { opacity: [0, 1] }, { duration: 0.3, ease: [0.4, 0, 0.2, 1] }); animate(background, { opacity: [0, 1] }, { duration: 0.3, ease: [0.4, 0, 0.2, 1] });
animate(content, { scale: [0.4, 1], opacity: [0, 1] }, { type: 'spring', stiffness: 400, damping: 30 }); animate(
content,
{ scale: [0.4, 1], opacity: [0, 1] },
{ type: "spring", stiffness: 400, damping: 30 },
);
} }
const handleEscapeKey = (event: KeyboardEvent) => { const handleEscapeKey = (event: KeyboardEvent) => {
if (event.key === 'Escape') closePicker(); if (event.key === "Escape") closePicker();
}; };
document.addEventListener('keydown', handleEscapeKey); document.addEventListener("keydown", handleEscapeKey);
return () => { return () => {
document.removeEventListener('keydown', handleEscapeKey); document.removeEventListener("keydown", handleEscapeKey);
if (savePresets && !customOnChange) rememberPreset(current); if (savePresets && !customOnChange) rememberPreset(current);
}; };
}); });
@@ -113,9 +124,13 @@
<!-- svelte-ignore a11y_no_static_element_interactions --> <!-- svelte-ignore a11y_no_static_element_interactions -->
<div <div
bind:this={background} bind:this={background}
class="flex absolute top-0 left-0 z-50 justify-center items-center w-full h-full shadow-2xl cursor-pointer bg-black/20 border border-[#DDDDDD]/30 dark:border-[#38373D]/30 {$settingsState.DarkMode ? 'dark' : ''}" class="flex absolute top-0 left-0 z-50 justify-center items-center w-full h-full shadow-2xl cursor-pointer bg-black/20 border border-[#DDDDDD]/30 dark:border-[#38373D]/30 {$settingsState.DarkMode
? 'dark'
: ''}"
onclick={handleBackgroundClick} onclick={handleBackgroundClick}
onkeydown={(event) => { if (event.key === 'Enter') handleBackgroundClick(event as unknown as MouseEvent) }} onkeydown={(event) => {
if (event.key === "Enter") handleBackgroundClick(event as unknown as MouseEvent);
}}
> >
<div <div
bind:this={content} bind:this={content}
@@ -4,7 +4,7 @@
import QRCode from "qrcode"; import QRCode from "qrcode";
import Button from "./Button.svelte"; import Button from "./Button.svelte";
import { portal } from "../utils/portal"; import { portal } from "../utils/portal";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
let showQrModal = $state(false); let showQrModal = $state(false);
let qrDataUrl = $state<string | null>(null); let qrDataUrl = $state<string | null>(null);
+23 -17
View File
@@ -1,9 +1,14 @@
<script lang="ts"> <script lang="ts">
import { fade } from 'svelte/transition'; import { fade } from "svelte/transition";
import { animate } from 'motion'; import { animate } from "motion";
import { settingsState } from '@/seqta/utils/listeners/SettingsState'; import { settingsState } from "@/seqta/utils/listeners/settingsState";
let { onConfirm, onCancel, title, message }: { let {
onConfirm,
onCancel,
title,
message,
}: {
onConfirm: () => void; onConfirm: () => void;
onCancel: () => void; onCancel: () => void;
title: string; title: string;
@@ -18,39 +23,41 @@
modalElement, modalElement,
{ scale: [0.9, 1], opacity: [0, 1] }, { scale: [0.9, 1], opacity: [0, 1] },
{ {
type: 'spring', type: "spring",
stiffness: 300, stiffness: 300,
damping: 25 damping: 25,
} },
); );
} }
}); });
</script> </script>
<div <div
class="flex fixed inset-0 z-10000 justify-center items-center bg-black/50 {$settingsState.DarkMode ? 'dark' : ''}" class="flex fixed inset-0 z-10000 justify-center items-center bg-black/50 {$settingsState.DarkMode
? 'dark'
: ''}"
style="position: fixed; top: 0; left: 0; right: 0; bottom: 0;" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0;"
onclick={(e) => { onclick={(e) => {
if (e.target === e.currentTarget) onCancel(); if (e.target === e.currentTarget) onCancel();
}} }}
onkeydown={(e) => { onkeydown={(e) => {
if (e.key === 'Escape') onCancel(); if (e.key === "Escape") onCancel();
}} }}
role="button" role="button"
tabindex="-1" tabindex="-1"
transition:fade={{ duration: 150 }} transition:fade={{ duration: 150 }}
> >
<!-- svelte-ignore a11y_no_static_element_interactions --> <!-- svelte-ignore a11y_no_static_element_interactions -->
<div <div
bind:this={modalElement} bind:this={modalElement}
class="p-4 mx-4 w-full max-w-md bg-white rounded-2xl shadow-2xl dark:bg-zinc-800" class="p-4 mx-4 w-full max-w-md bg-white rounded-2xl shadow-2xl dark:bg-zinc-800"
onclick={(e) => e.stopPropagation()} onclick={(e) => e.stopPropagation()}
onkeydown={(e) => e.stopPropagation()} onkeydown={(e) => e.stopPropagation()}
> >
<h2 class="mb-3 text-xl font-bold text-gray-900 dark:text-white"> <h2 class="mb-3 text-xl font-bold text-gray-900 dark:text-white">
{title} {title}
</h2> </h2>
<div class="mb-6 text-lg text-gray-700 whitespace-pre-line dark:text-gray-300"> <div class="mb-6 text-lg text-gray-700 whitespace-pre-line dark:text-gray-300">
{message} {message}
</div> </div>
@@ -71,4 +78,3 @@
</div> </div>
</div> </div>
</div> </div>
+16 -13
View File
@@ -22,10 +22,13 @@
validateFeedbackForm, validateFeedbackForm,
type FeedbackStatusItem, type FeedbackStatusItem,
} from "@/seqta/utils/feedback/client"; } from "@/seqta/utils/feedback/client";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import Spinner from "./Spinner.svelte"; import Spinner from "./Spinner.svelte";
let { onClose, initialFeedbackId = null }: { let {
onClose,
initialFeedbackId = null,
}: {
onClose: () => void; onClose: () => void;
initialFeedbackId?: string | null; initialFeedbackId?: string | null;
} = $props(); } = $props();
@@ -56,10 +59,9 @@
? "background-color:#18181b;color:#fafafa;border-color:#52525b;color-scheme:dark" ? "background-color:#18181b;color:#fafafa;border-color:#52525b;color-scheme:dark"
: "background-color:#fff;color:#18181b;border-color:#e4e4e7;color-scheme:light", : "background-color:#fff;color:#18181b;border-color:#e4e4e7;color-scheme:light",
); );
const field = const field = "feedback-field w-full px-3 py-2.5 text-[18px] rounded-lg border ";
"feedback-field w-full px-3 py-2.5 text-[18px] rounded-lg border focus:outline-hidden focus:ring-2 focus:ring-zinc-400";
const btn = const btn =
"px-4 py-2 text-[18px] font-medium rounded-lg transition-all duration-200 hover:scale-105 active:scale-95 focus:outline-hidden focus:ring-2 focus:ring-zinc-400 disabled:opacity-50"; "px-4 py-2 text-[18px] font-medium rounded-lg transition-all duration-200 hover:scale-105 active:scale-95 disabled:opacity-50";
const btnMuted = $derived( const btnMuted = $derived(
`${btn} ${isDark ? "bg-zinc-700 text-zinc-200" : "bg-zinc-200 text-zinc-700"}`, `${btn} ${isDark ? "bg-zinc-700 text-zinc-200" : "bg-zinc-200 text-zinc-700"}`,
); );
@@ -412,8 +414,9 @@
{:else} {:else}
<p class="mb-4 text-zinc-500">No response yet.</p> <p class="mb-4 text-zinc-500">No response yet.</p>
{/if} {/if}
{#if statusError}<p class="mb-3 text-red-600 dark:text-red-400" role="alert">{statusError}</p {#if statusError}<p class="mb-3 text-red-600 dark:text-red-400" role="alert">
>{/if} {statusError}
</p>{/if}
<div class="flex gap-3 justify-end"> <div class="flex gap-3 justify-end">
<button <button
type="button" type="button"
@@ -437,8 +440,9 @@
{statusLoading ? "…" : "Refresh"} {statusLoading ? "…" : "Refresh"}
</button> </button>
</div> </div>
{#if statusError}<p class="mb-3 text-red-600 dark:text-red-400" role="alert">{statusError}</p {#if statusError}<p class="mb-3 text-red-600 dark:text-red-400" role="alert">
>{/if} {statusError}
</p>{/if}
{#if statusLoading && !statusItems.length} {#if statusLoading && !statusItems.length}
<div class="feedback-loading" aria-busy="true" aria-live="polite"> <div class="feedback-loading" aria-busy="true" aria-live="polite">
<Spinner size="md" /> <Spinner size="md" />
@@ -461,14 +465,13 @@
<button <button
type="button" type="button"
onclick={() => openStatusItem(item.id)} onclick={() => openStatusItem(item.id)}
class="w-full p-3 text-left rounded-lg border transition-all duration-200 hover:scale-[1.01] focus:outline-hidden focus:ring-2 focus:ring-zinc-400 {isDark class="w-full p-3 text-left rounded-lg border transition-all duration-200 hover:scale-[1.01] {isDark
? 'border-zinc-700 bg-zinc-900/40' ? 'border-zinc-700 bg-zinc-900/40'
: 'border-zinc-200 bg-white'}" : 'border-zinc-200 bg-white'}"
> >
<p class="text-base text-zinc-500 mb-0.5"> <p class="text-base text-zinc-500 mb-0.5">
{formatStatus(item.status)}{#if hasReply(item)} · Reply{/if} · {categoryLabel( {formatStatus(item.status)}{#if hasReply(item)}
item.category, · Reply{/if} · {categoryLabel(item.category)}
)}
</p> </p>
<p class="font-medium truncate">{item.subject || "Untitled"}</p> <p class="font-medium truncate">{item.subject || "Untitled"}</p>
</button> </button>
+13 -15
View File
@@ -1,15 +1,15 @@
<script lang="ts"> <script lang="ts">
import { fade } from "svelte/transition"; import { fade } from "svelte/transition";
import { onMount } from "svelte"; import { onMount } from "svelte";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { FONT_PRESETS, DEFAULT_FONT_ID, getFontPreset } from "@/seqta/ui/fonts/presets"; import { FONT_PRESETS, DEFAULT_FONT_ID, getFontPreset } from "@/seqta/ui/fonts/presets";
import { import {
applySelectedFont, applySelectedFont,
buildFontPreviewCss, buildFontPreviewCss,
ensureFontPickerFontsLoaded, ensureFontPickerFontsLoaded,
} from "@/seqta/ui/fonts/Manager"; } from "@/seqta/ui/fonts/fontManager";
import { portal } from "@/interface/utils/portal"; import { portal } from "@/interface/utils/portal";
import { syncPageThemeToElement } from "@/interface/utils/syncPageTheme"; import { copyPageTheme, resolvePageAccentColor } from "@/seqta/ui/colors/pageTheme";
import fontPickerStyles from "./fontPickerModal.css?inline"; import fontPickerStyles from "./fontPickerModal.css?inline";
let { hidePicker }: { hidePicker: () => void } = $props(); let { hidePicker }: { hidePicker: () => void } = $props();
@@ -33,15 +33,16 @@
} }
function syncTheme() { function syncTheme() {
if (rootEl) syncPageThemeToElement(rootEl); if (rootEl) {
copyPageTheme(rootEl);
rootEl.style.setProperty("--better-main", resolvePageAccentColor());
}
} }
onMount(() => { onMount(() => {
void ensureFontPickerFontsLoaded(); void ensureFontPickerFontsLoaded();
styleEl = document.getElementById( styleEl = document.getElementById("betterseqta-font-picker-styles") as HTMLStyleElement | null;
"betterseqta-font-picker-styles",
) as HTMLStyleElement | null;
if (!styleEl) { if (!styleEl) {
styleEl = document.createElement("style"); styleEl = document.createElement("style");
styleEl.id = "betterseqta-font-picker-styles"; styleEl.id = "betterseqta-font-picker-styles";
@@ -77,7 +78,8 @@
class="bsplus-font-picker-overlay bsplus-font-picker-root" class="bsplus-font-picker-overlay bsplus-font-picker-root"
onclick={handleBackdropClick} onclick={handleBackdropClick}
onkeydown={(event) => { onkeydown={(event) => {
if (event.key === "Enter" || event.key === " ") handleBackdropClick(event as unknown as MouseEvent); if (event.key === "Enter" || event.key === " ")
handleBackdropClick(event as unknown as MouseEvent);
}} }}
role="presentation" role="presentation"
transition:fade={{ duration: 200 }} transition:fade={{ duration: 200 }}
@@ -112,12 +114,8 @@
</button> </button>
</div> </div>
<div class="bsplus-font-picker-header-text"> <div class="bsplus-font-picker-header-text">
<h2 id="font-picker-title" class="bsplus-font-picker-title"> <h2 id="font-picker-title" class="bsplus-font-picker-title">Choose a font</h2>
Choose a font <p class="bsplus-font-picker-desc">Choose a typeface for SEQTA Learn.</p>
</h2>
<p class="bsplus-font-picker-desc">
Choose a typeface for SEQTA Learn.
</p>
</div> </div>
</header> </header>
@@ -130,7 +128,7 @@
data-font-id={preset.id} data-font-id={preset.id}
> >
<div class="bsplus-font-picker-option-head"> <div class="bsplus-font-picker-option-head">
<span <span
class="bsplus-font-picker-option-name" class="bsplus-font-picker-option-name"
style="font-family: {preset.stack} !important;" style="font-family: {preset.stack} !important;"
> >
+74 -64
View File
@@ -1,9 +1,15 @@
<script lang="ts"> <script lang="ts">
import { isValidHotkey, parseHotkey } from '@/plugins/built-in/globalSearch/src/utils/hotkeyUtils'; import {
isValidHotkey,
parseHotkey,
} from "@/plugins/built-in/globalSearch/src/utils/hotkeyUtils";
let { value, onChange }: { let {
value: string, value,
onChange: (newValue: string) => void onChange,
}: {
value: string;
onChange: (newValue: string) => void;
} = $props(); } = $props();
let isRecording = $state(false); let isRecording = $state(false);
@@ -13,43 +19,43 @@
const formatKeyForHotkey = (key: string): string => { const formatKeyForHotkey = (key: string): string => {
// Map special keys to their hotkey format // Map special keys to their hotkey format
const keyMap: Record<string, string> = { const keyMap: Record<string, string> = {
'Control': 'ctrl', Control: "ctrl",
'Meta': 'cmd', Meta: "cmd",
'Alt': 'alt', Alt: "alt",
'Shift': 'shift', Shift: "shift",
' ': 'space', " ": "space",
'ArrowUp': 'up', ArrowUp: "up",
'ArrowDown': 'down', ArrowDown: "down",
'ArrowLeft': 'left', ArrowLeft: "left",
'ArrowRight': 'right', ArrowRight: "right",
'Escape': 'esc', Escape: "esc",
'Enter': 'enter', Enter: "enter",
'Tab': 'tab', Tab: "tab",
'Backspace': 'backspace', Backspace: "backspace",
'Delete': 'delete', Delete: "delete",
}; };
return keyMap[key] || key.toLowerCase(); return keyMap[key] || key.toLowerCase();
}; };
const formatKeyForDisplay = (key: string): string => { const formatKeyForDisplay = (key: string): string => {
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0; const isMac = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
const keyMap: Record<string, string> = { const keyMap: Record<string, string> = {
'ctrl': isMac ? '⌃' : 'Ctrl', ctrl: isMac ? "⌃" : "Ctrl",
'cmd': '⌘', cmd: "⌘",
'meta': '⌘', meta: "⌘",
'alt': isMac ? '⌥' : 'Alt', alt: isMac ? "⌥" : "Alt",
'shift': isMac ? '⇧' : 'Shift', shift: isMac ? "⇧" : "Shift",
'space': 'Space', space: "Space",
'up': '↑', up: "↑",
'down': '↓', down: "↓",
'left': '←', left: "←",
'right': '→', right: "→",
'esc': 'Esc', esc: "Esc",
'enter': 'Enter', enter: "Enter",
'tab': 'Tab', tab: "Tab",
'backspace': 'Backspace', backspace: "Backspace",
'delete': 'Delete', delete: "Delete",
}; };
return keyMap[key.toLowerCase()] || key.toUpperCase(); return keyMap[key.toLowerCase()] || key.toUpperCase();
@@ -62,15 +68,15 @@
const parsed = parseHotkey(hotkeyString); const parsed = parseHotkey(hotkeyString);
const parts: string[] = []; const parts: string[] = [];
// Add modifiers in a consistent order // Add modifiers in a consistent order
if (parsed.ctrl) parts.push('ctrl'); if (parsed.ctrl) parts.push("ctrl");
if (parsed.meta) parts.push('cmd'); if (parsed.meta) parts.push("cmd");
if (parsed.alt) parts.push('alt'); if (parsed.alt) parts.push("alt");
if (parsed.shift) parts.push('shift'); if (parsed.shift) parts.push("shift");
if (parsed.key) parts.push(parsed.key); if (parsed.key) parts.push(parsed.key);
return parts; return parts;
}; };
@@ -82,8 +88,8 @@
const stopRecording = () => { const stopRecording = () => {
if (recordedKeys.size > 0) { if (recordedKeys.size > 0) {
if (recordedKeys.has('esc')) { if (recordedKeys.has("esc")) {
onChange(''); onChange("");
isRecording = false; isRecording = false;
recordedKeys = new Set(); recordedKeys = new Set();
inputElement?.blur(); inputElement?.blur();
@@ -91,10 +97,10 @@
} }
const modifiers: string[] = []; const modifiers: string[] = [];
let mainKey = ''; let mainKey = "";
for (const key of recordedKeys) { for (const key of recordedKeys) {
if (['ctrl', 'cmd', 'alt', 'shift'].includes(key)) { if (["ctrl", "cmd", "alt", "shift"].includes(key)) {
modifiers.push(key); modifiers.push(key);
} else { } else {
mainKey = key; mainKey = key;
@@ -102,13 +108,13 @@
} }
if (mainKey) { if (mainKey) {
const hotkeyString = [...modifiers, mainKey].join('+'); const hotkeyString = [...modifiers, mainKey].join("+");
if (isValidHotkey(hotkeyString)) { if (isValidHotkey(hotkeyString)) {
onChange(hotkeyString); onChange(hotkeyString);
} }
} }
} }
isRecording = false; isRecording = false;
recordedKeys = new Set(); recordedKeys = new Set();
inputElement?.blur(); inputElement?.blur();
@@ -122,24 +128,24 @@
const handleKeyDown = (e: KeyboardEvent) => { const handleKeyDown = (e: KeyboardEvent) => {
if (!isRecording) return; if (!isRecording) return;
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
const key = formatKeyForHotkey(e.key); const key = formatKeyForHotkey(e.key);
if (e.ctrlKey) addRecordedKey('ctrl'); if (e.ctrlKey) addRecordedKey("ctrl");
if (e.metaKey) addRecordedKey('cmd'); if (e.metaKey) addRecordedKey("cmd");
if (e.altKey) addRecordedKey('alt'); if (e.altKey) addRecordedKey("alt");
if (e.shiftKey) addRecordedKey('shift'); if (e.shiftKey) addRecordedKey("shift");
// Add the main key (ignore modifier keys themselves) // Add the main key (ignore modifier keys themselves)
if (!['ctrl', 'cmd', 'alt', 'shift'].includes(key)) { if (!["ctrl", "cmd", "alt", "shift"].includes(key)) {
addRecordedKey(key); addRecordedKey(key);
} }
// Auto-stop recording if we have a main key // Auto-stop recording if we have a main key
if (!['ctrl', 'cmd', 'alt', 'shift'].includes(key)) { if (!["ctrl", "cmd", "alt", "shift"].includes(key)) {
setTimeout(stopRecording, 100); setTimeout(stopRecording, 100);
} }
}; };
@@ -162,16 +168,18 @@
} }
}); });
const hotkeyParts = $derived(isRecording const hotkeyParts = $derived(
? Array.from(recordedKeys).map(formatKeyForDisplay) isRecording
: getHotkeyParts(value).map(formatKeyForDisplay)); ? Array.from(recordedKeys).map(formatKeyForDisplay)
: getHotkeyParts(value).map(formatKeyForDisplay),
);
</script> </script>
<div class="flex gap-2 items-center"> <div class="flex gap-2 items-center">
<div class="relative"> <div class="relative">
{#if isRecording} {#if isRecording}
<!-- Recording state --> <!-- Recording state -->
<div <div
class="flex items-center justify-center px-3 py-1.5 text-sm rounded-md dark:bg-[#38373D]/50 bg-[#DDDDDD]/50 border-[#DDDDDD]/30 dark:border-[#38373D]/30 dark:text-white border cursor-pointer text-nowrap" class="flex items-center justify-center px-3 py-1.5 text-sm rounded-md dark:bg-[#38373D]/50 bg-[#DDDDDD]/50 border-[#DDDDDD]/30 dark:border-[#38373D]/30 dark:text-white border cursor-pointer text-nowrap"
onclick={startRecording} onclick={startRecording}
onkeydown={startRecording} onkeydown={startRecording}
@@ -182,7 +190,7 @@
</div> </div>
{:else if hotkeyParts.length > 0} {:else if hotkeyParts.length > 0}
<!-- Display current hotkey --> <!-- Display current hotkey -->
<div <div
class="flex gap-1 items-center text-sm rounded-md border-none cursor-pointer dark:text-white" class="flex gap-1 items-center text-sm rounded-md border-none cursor-pointer dark:text-white"
onclick={startRecording} onclick={startRecording}
onkeydown={startRecording} onkeydown={startRecording}
@@ -190,14 +198,16 @@
tabindex="0" tabindex="0"
> >
{#each hotkeyParts as part} {#each hotkeyParts as part}
<div class="size-8 text-sm flex items-center justify-center rounded-md border dark:bg-[#38373D]/50 bg-[#DDDDDD]/50 border-[#DDDDDD]/30 dark:border-[#38373D]/30"> <div
class="size-8 text-sm flex items-center justify-center rounded-md border dark:bg-[#38373D]/50 bg-[#DDDDDD]/50 border-[#DDDDDD]/30 dark:border-[#38373D]/30"
>
{part} {part}
</div> </div>
{/each} {/each}
</div> </div>
{:else} {:else}
<!-- Empty state --> <!-- Empty state -->
<div <div
class="flex items-center justify-center px-3 py-2 text-sm rounded-md dark:bg-[#38373D]/50 bg-[#DDDDDD] dark:text-white border-none cursor-pointer text-nowrap" class="flex items-center justify-center px-3 py-2 text-sm rounded-md dark:bg-[#38373D]/50 bg-[#DDDDDD] dark:text-white border-none cursor-pointer text-nowrap"
onclick={startRecording} onclick={startRecording}
onkeydown={startRecording} onkeydown={startRecording}
@@ -225,4 +235,4 @@
input:focus { input:focus {
outline: none; outline: none;
} }
</style> </style>
+40 -33
View File
@@ -1,15 +1,22 @@
<script lang="ts"> <script lang="ts">
import { onMount, onDestroy } from 'svelte'; import { onMount, onDestroy } from "svelte";
import { animate as motionAnimate } from 'motion'; import { animate as motionAnimate } from "motion";
import { fullMotionEffectsEnabled } from '@/seqta/utils/performanceMode'; import { fullMotionEffectsEnabled } from "@/seqta/utils/performanceMode";
let { initial, animate, exit, transition, children, class: className }: { let {
initial?: any, initial,
animate?: any, animate,
exit?: any, exit,
transition?: any, transition,
children?: any, children,
class?: string class: className,
}: {
initial?: any;
animate?: any;
exit?: any;
transition?: any;
children?: any;
class?: string;
} = $props(); } = $props();
let divElement: HTMLElement; let divElement: HTMLElement;
@@ -18,12 +25,12 @@
if (!divElement || !keyframe) return; if (!divElement || !keyframe) return;
if (keyframe.x != null) { if (keyframe.x != null) {
divElement.style.transition = divElement.style.transition =
'transform var(--bs-motion-duration, 0.2s) var(--bs-motion-ease, cubic-bezier(0.22, 1, 0.36, 1))'; "transform var(--bs-motion-duration, 0.2s) var(--bs-motion-ease, cubic-bezier(0.22, 1, 0.36, 1))";
const x = keyframe.x; const x = keyframe.x;
divElement.style.transform = divElement.style.transform =
typeof x === 'number' ? `translateX(${x}px)` : `translateX(${String(x)})`; typeof x === "number" ? `translateX(${x}px)` : `translateX(${String(x)})`;
} }
if (typeof keyframe.opacity === 'number') { if (typeof keyframe.opacity === "number") {
divElement.style.opacity = String(keyframe.opacity); divElement.style.opacity = String(keyframe.opacity);
} }
}; };
@@ -37,34 +44,30 @@
let finalKeyframe = { ...keyframe }; let finalKeyframe = { ...keyframe };
if (finalKeyframe.height === 'auto') { if (finalKeyframe.height === "auto") {
const prevHeight = divElement.style.height; const prevHeight = divElement.style.height;
const prevVisibility = divElement.style.visibility; const prevVisibility = divElement.style.visibility;
divElement.style.height = 'auto'; divElement.style.height = "auto";
divElement.style.visibility = 'hidden'; divElement.style.visibility = "hidden";
divElement.style.position = 'absolute'; divElement.style.position = "absolute";
const autoHeight = divElement.offsetHeight; const autoHeight = divElement.offsetHeight;
divElement.style.height = prevHeight; divElement.style.height = prevHeight;
divElement.style.visibility = prevVisibility; divElement.style.visibility = prevVisibility;
divElement.style.position = ''; divElement.style.position = "";
finalKeyframe.height = `${autoHeight}px`; finalKeyframe.height = `${autoHeight}px`;
} }
const defaultSpringConfig = { stiffness: 250, damping: 25 }; const defaultSpringConfig = { stiffness: 250, damping: 25 };
const animation = motionAnimate( const animation = motionAnimate([divElement], finalKeyframe, {
[divElement], type: "spring",
finalKeyframe, stiffness: transition?.stiffness || defaultSpringConfig.stiffness,
{ damping: transition?.damping || defaultSpringConfig.damping,
type: 'spring', });
stiffness: transition?.stiffness || defaultSpringConfig.stiffness,
damping: transition?.damping || defaultSpringConfig.damping
}
);
return animation; return animation;
} }
return Promise.resolve(); return Promise.resolve();
@@ -78,7 +81,7 @@
await playAnimation(animate); await playAnimation(animate);
} }
}); });
$effect(() => { $effect(() => {
if (animate) { if (animate) {
playAnimation(animate); playAnimation(animate);
@@ -92,7 +95,11 @@
}); });
</script> </script>
<div class={className} bind:this={divElement} style={fullMotionEffectsEnabled() ? 'will-change: transform, opacity;' : undefined}> <div
class={className}
bind:this={divElement}
style={fullMotionEffectsEnabled() ? "will-change: transform, opacity;" : undefined}
>
{#if children} {#if children}
{@render children()} {@render children()}
{/if} {/if}
+2 -2
View File
@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import { settingsState } from '@/seqta/utils/listeners/SettingsState' import { settingsState } from "@/seqta/utils/listeners/settingsState";
let { onClick }: { onClick: () => void } = $props(); let { onClick }: { onClick: () => void } = $props();
</script> </script>
@@ -9,4 +9,4 @@
onclick={onClick} onclick={onClick}
style="background: {$settingsState.selectedColor}" style="background: {$settingsState.selectedColor}"
class="w-16 h-8 rounded-md shadow-2xl ring-[1px] ring-[#DDDDDD]/30 dark:ring-[#38373D]/30" class="w-16 h-8 rounded-md shadow-2xl ring-[1px] ring-[#DDDDDD]/30 dark:ring-[#38373D]/30"
></button> ></button>
@@ -4,9 +4,9 @@
import Select from "@/interface/components/Select.svelte"; import Select from "@/interface/components/Select.svelte";
import Slider from "@/interface/components/Slider.svelte"; import Slider from "@/interface/components/Slider.svelte";
import Switch from "@/interface/components/Switch.svelte"; import Switch from "@/interface/components/Switch.svelte";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { matchesSearch } from "@/interface/pages/settings/shared"; import { matchesSearch } from "@/interface/pages/settings/shared";
import type { SettingsList } from "@/interface/types/SettingsProps"; import type { SettingsList } from "@/interface/types/settingsProps";
import { import {
DEFAULT_SIDEBAR_BLUR, DEFAULT_SIDEBAR_BLUR,
DEFAULT_SIDEBAR_RADIUS, DEFAULT_SIDEBAR_RADIUS,
+8 -2
View File
@@ -14,7 +14,11 @@
}[]; }[];
}; };
let { groups, selectedId, onselect }: { let {
groups,
selectedId,
onselect,
}: {
groups: NavGroup[]; groups: NavGroup[];
selectedId: string; selectedId: string;
onselect: (id: string) => void; onselect: (id: string) => void;
@@ -74,7 +78,9 @@
{/if} {/if}
{#each group.items as item (item.id)} {#each group.items as item (item.id)}
{#if item.divided} {#if item.divided}
<div class="my-2 border-t border-zinc-200 dark:border-zinc-700 {item.nested ? 'ml-4' : ''}"></div> <div
class="my-2 border-t border-zinc-200 dark:border-zinc-700 {item.nested ? 'ml-4' : ''}"
></div>
{/if} {/if}
<SidebarNavItem <SidebarNavItem
label={item.label} label={item.label}
@@ -21,9 +21,7 @@
data-nav-section={trackId} data-nav-section={trackId}
{onclick} {onclick}
class="relative z-10 rounded-lg text-left transition-[color,background-color] duration-200 class="relative z-10 rounded-lg text-left transition-[color,background-color] duration-200
{nested {nested ? 'ml-4 w-[calc(100%-1rem)] px-3 py-2 text-base' : 'w-full px-3 py-2.5 text-lg'}
? 'ml-4 w-[calc(100%-1rem)] px-3 py-2 text-base'
: 'w-full px-3 py-2.5 text-lg'}
{active || emphasized {active || emphasized
? 'font-medium text-zinc-900 dark:text-white' ? 'font-medium text-zinc-900 dark:text-white'
: 'text-zinc-600 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white'}" : 'text-zinc-600 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white'}"
@@ -2,7 +2,7 @@
import { fade } from "svelte/transition"; import { fade } from "svelte/transition";
import { animate } from "motion"; import { animate } from "motion";
import { onMount } from "svelte"; import { onMount } from "svelte";
import { cloudAuth } from "@/seqta/utils/CloudAuth"; import { cloudAuth } from "@/seqta/utils/cloudAuth";
let { onClose }: { onClose: () => void } = $props(); let { onClose }: { onClose: () => void } = $props();
let modalElement: HTMLElement; let modalElement: HTMLElement;
@@ -47,12 +47,11 @@
onclick={(e) => e.stopPropagation()} onclick={(e) => e.stopPropagation()}
onkeydown={(e) => e.stopPropagation()} onkeydown={(e) => e.stopPropagation()}
> >
<h2 class="mb-3 text-xl font-bold text-zinc-900 dark:text-white"> <h2 class="mb-3 text-xl font-bold text-zinc-900 dark:text-white">Sign in to favorite themes</h2>
Sign in to favorite themes
</h2>
<p class="mb-4 text-sm text-zinc-600 dark:text-zinc-400"> <p class="mb-4 text-sm text-zinc-600 dark:text-zinc-400">
Sign in to the Theme Store to save favorites across devices, or create an account to get started. Sign in to the Theme Store to save favorites across devices, or create an account to get
started.
</p> </p>
<button <button
+16 -10
View File
@@ -1,10 +1,16 @@
<script lang="ts"> <script lang="ts">
let { state = $bindable(), onChange, min = 0, max = 100, step = 1 }: { let {
state: number, state = $bindable(),
onChange: (value: number) => void, onChange,
min?: number, min = 0,
max?: number, max = 100,
step?: number step = 1,
}: {
state: number;
onChange: (value: number) => void;
min?: number;
max?: number;
step?: number;
} = $props(); } = $props();
let percentage = $derived(((state - min) / (max - min)) * 100); let percentage = $derived(((state - min) / (max - min)) * 100);
</script> </script>
@@ -12,9 +18,9 @@
<div class="relative w-full min-w-0"> <div class="relative w-full min-w-0">
<input <input
type="range" type="range"
min={min} {min}
max={max} {max}
step={step} {step}
bind:value={state} bind:value={state}
style={`background: linear-gradient(to right, #30d259ad 0%, #30D259 ${percentage}%, #dddddd ${percentage}%)`} style={`background: linear-gradient(to right, #30d259ad 0%, #30D259 ${percentage}%, #dddddd ${percentage}%)`}
oninput={(e) => onChange(Number(e.currentTarget.value))} oninput={(e) => onChange(Number(e.currentTarget.value))}
@@ -43,4 +49,4 @@
cursor: pointer; cursor: pointer;
border-radius: 50%; border-radius: 50%;
} }
</style> </style>
+6 -13
View File
@@ -1,10 +1,10 @@
<script lang="ts"> <script lang="ts">
let { size = 'md', color = 'currentColor' } = $props(); let { size = "md", color = "currentColor" } = $props();
const sizeMap = { const sizeMap = {
sm: '1rem', sm: "1rem",
md: '2rem', md: "2rem",
lg: '3rem', lg: "3rem",
}; };
let dimensions = $derived(sizeMap[size as keyof typeof sizeMap] || size); let dimensions = $derived(sizeMap[size as keyof typeof sizeMap] || size);
@@ -18,17 +18,10 @@
width={dimensions} width={dimensions}
height={dimensions} height={dimensions}
> >
<circle <circle class="opacity-25" cx="12" cy="12" r="10" stroke={color} stroke-width="4"></circle>
class="opacity-25"
cx="12"
cy="12"
r="10"
stroke={color}
stroke-width="4"
></circle>
<path <path
class="opacity-75" class="opacity-75"
fill={color} fill={color}
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
></path> ></path>
</svg> </svg>
+13 -6
View File
@@ -1,15 +1,18 @@
<script lang="ts"> <script lang="ts">
import { onMount } from "svelte"; import { onMount } from "svelte";
import { standalone } from '../utils/standalone.svelte'; import { standalone } from "../utils/standalone.svelte";
import { fullMotionEffectsEnabled } from '@/seqta/utils/performanceMode'; import { fullMotionEffectsEnabled } from "@/seqta/utils/performanceMode";
let { state: checked, onChange }: { state: boolean, onChange: (newState: boolean) => void } = $props(); let { state: checked, onChange }: { state: boolean; onChange: (newState: boolean) => void } =
$props();
let motionReady = $state(false); let motionReady = $state(false);
onMount(() => { onMount(() => {
// Paint the hydrated position before enabling transitions for later toggles. // Paint the hydrated position before enabling transitions for later toggles.
let frame = requestAnimationFrame(() => { let frame = requestAnimationFrame(() => {
frame = requestAnimationFrame(() => { motionReady = true; }); frame = requestAnimationFrame(() => {
motionReady = true;
});
}); });
return () => cancelAnimationFrame(frame); return () => cancelAnimationFrame(frame);
}); });
@@ -18,7 +21,9 @@
</script> </script>
<div <div
class="flex w-14 p-1 cursor-pointer transition-all duration-150 rounded-full bg-linear-to-tr select-none shadow-2xl ring-[1px] ring-[#DDDDDD]/30 dark:ring-[#38373D]/30 {checked ? 'to-[#30D259]/80 from-[#30D259] dark:from-[#30D259]/40 dark:to-[#30D259]' : 'dark:from-[#38373D]/50 dark:to-[#38373D] to-[#DDDDDD]/50 from-[#DDDDDD]'}" class="flex w-14 p-1 cursor-pointer transition-all duration-150 rounded-full bg-linear-to-tr select-none shadow-2xl ring-[1px] ring-[#DDDDDD]/30 dark:ring-[#38373D]/30 {checked
? 'to-[#30D259]/80 from-[#30D259] dark:from-[#30D259]/40 dark:to-[#30D259]'
: 'dark:from-[#38373D]/50 dark:to-[#38373D] to-[#DDDDDD]/50 from-[#DDDDDD]'}"
onclick={() => onChange(!checked)} onclick={() => onChange(!checked)}
onkeydown={(e) => e.key === "Enter" && onChange(!checked)} onkeydown={(e) => e.key === "Enter" && onChange(!checked)}
role="switch" role="switch"
@@ -33,6 +38,8 @@
<style> <style>
@media (prefers-reduced-motion: reduce) { @media (prefers-reduced-motion: reduce) {
[role="switch"] > div { transition: none !important; } [role="switch"] > div {
transition: none !important;
}
} }
</style> </style>
@@ -11,7 +11,10 @@
props?: Record<string, unknown>; props?: Record<string, unknown>;
}; };
let { tabs, activeTab = $bindable(0) }: { let {
tabs,
activeTab = $bindable(0),
}: {
tabs: TabDef[]; tabs: TabDef[];
activeTab?: number; activeTab?: number;
} = $props(); } = $props();
@@ -28,7 +31,10 @@
</script> </script>
<div class="flex flex-col h-full min-h-0"> <div class="flex flex-col h-full min-h-0">
<div class="top-0 z-10 shrink-0 text-[0.875rem] pb-0.5 mx-4 px-2 tab-width-container" role="tablist"> <div
class="top-0 z-10 shrink-0 text-[0.875rem] pb-0.5 mx-4 px-2 tab-width-container"
role="tablist"
>
<div class="flex relative"> <div class="flex relative">
<div <div
class="absolute top-0 left-0 z-0 h-full bg-linear-to-tr dark:from-[#38373D]/80 dark:to-[#38373D] from-[#DDDDDD]/80 to-[#DDDDDD] rounded-full opacity-40 tab-width" class="absolute top-0 left-0 z-0 h-full bg-linear-to-tr dark:from-[#38373D]/80 dark:to-[#38373D] from-[#DDDDDD]/80 to-[#DDDDDD] rounded-full opacity-40 tab-width"
@@ -38,7 +44,7 @@
<button <button
role="tab" role="tab"
aria-selected={activeTab === index} aria-selected={activeTab === index}
class="relative z-10 flex-1 px-4 py-2 focus-visible:outline-hidden" class="relative z-10 flex-1 px-4 py-2"
onclick={() => (activeTab = index)} onclick={() => (activeTab = index)}
> >
{title} {title}
@@ -55,7 +61,7 @@
{#if activeTab === index} {#if activeTab === index}
<div <div
role="tabpanel" role="tabpanel"
class="focus:outline-hidden w-full h-full min-h-0 pt-2 overflow-y-auto no-scrollbar pb-6 tab active relative" class="w-full h-full min-h-0 pt-2 overflow-y-auto no-scrollbar pb-6 tab active relative"
> >
{#if tab.loader} {#if tab.loader}
<LazyPanel loader={tab.loader} props={tab.props} /> <LazyPanel loader={tab.loader} props={tab.props} />
@@ -70,6 +76,8 @@
<style> <style>
@media (prefers-reduced-motion: reduce) { @media (prefers-reduced-motion: reduce) {
.tab-width { transition: none !important; } .tab-width {
transition: none !important;
}
} }
</style> </style>
@@ -85,7 +85,10 @@
return $state.snapshot(model) as ColourValue; return $state.snapshot(model) as ColourValue;
} }
function withStops(m: ColourValue, update: (stops: GradientStop[]) => GradientStop[]): ColourValue { function withStops(
m: ColourValue,
update: (stops: GradientStop[]) => GradientStop[],
): ColourValue {
return m.kind === "solid" ? m : { ...m, stops: update(m.stops) }; return m.kind === "solid" ? m : { ...m, stops: update(m.stops) };
} }
@@ -94,7 +97,9 @@
commit( commit(
m.kind === "solid" m.kind === "solid"
? { kind: "solid", colour } ? { kind: "solid", colour }
: withStops(m, (all) => all.map((stop, i) => (i === selected ? { ...stop, colour } : stop))), : withStops(m, (all) =>
all.map((stop, i) => (i === selected ? { ...stop, colour } : stop)),
),
); );
} }
@@ -162,7 +167,11 @@
} }
function moveStop(index: number, position: number) { function moveStop(index: number, position: number) {
commit(withStops(snapshot(), (all) => all.map((stop, i) => (i === index ? { ...stop, position } : stop)))); commit(
withStops(snapshot(), (all) =>
all.map((stop, i) => (i === index ? { ...stop, position } : stop)),
),
);
} }
function startStopDrag(event: PointerEvent, index: number) { function startStopDrag(event: PointerEvent, index: number) {
@@ -172,15 +181,26 @@
dragging = index; dragging = index;
} }
function addStop(event: PointerEvent) { function addStop(position: number) {
const m = snapshot(); const m = snapshot();
if (m.kind === "solid") return; if (m.kind === "solid") return;
const position = barPosition(event);
const colour = colourAt(m.stops, position); const colour = colourAt(m.stops, position);
commit(withStops(m, (all) => [...all, { colour, position }])); commit(withStops(m, (all) => [...all, { colour, position }]));
selectStop(m.stops.length); selectStop(m.stops.length);
bar!.setPointerCapture(event.pointerId); }
dragging = m.stops.length;
function selectStopAtPosition(event: PointerEvent) {
const m = snapshot();
if (m.kind === "solid") return;
const position = barPosition(event);
const nearest = m.stops.reduce(
(closest, stop, index) =>
Math.abs(stop.position - position) < Math.abs(m.stops[closest].position - position)
? index
: closest,
0,
);
selectStop(nearest);
} }
function removeStop(index: number) { function removeStop(index: number) {
@@ -234,92 +254,111 @@
<div class="flex flex-col gap-3 w-72 max-w-full text-zinc-900 select-none dark:text-white"> <div class="flex flex-col gap-3 w-72 max-w-full text-zinc-900 select-none dark:text-white">
<div> <div>
<div class="grid relative grid-cols-3 p-0.5 rounded-lg bg-zinc-100 dark:bg-zinc-700/70" role="radiogroup" aria-label="Fill type">
<div <div
class="absolute left-0.5 inset-y-0.5 w-[calc((100%-0.25rem)/3)] rounded-md bg-white shadow-sm transition-transform duration-200 ease-out motion-reduce:transition-none dark:bg-zinc-600" class="grid relative grid-cols-3 p-0.5 rounded-lg bg-zinc-100 dark:bg-zinc-700/70"
style="transform: translateX({modeIndex * 100}%);" role="radiogroup"
aria-hidden="true" aria-label="Fill type"
></div> >
{#each MODES as mode (mode.kind)}
<button
type="button"
role="radio"
aria-checked={model.kind === mode.kind}
class="relative py-1 text-xs font-medium rounded-md transition-colors duration-200 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-zinc-900 dark:focus-visible:outline-white {model.kind === mode.kind
? 'text-zinc-900 dark:text-white'
: 'text-zinc-500 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white'}"
onclick={() => setMode(mode.kind)}
>
{mode.label}
</button>
{/each}
</div>
{#if model.kind !== "solid"}
<div class="flex gap-2 items-center pt-3" transition:slide={{ duration: 180 }}>
<div <div
class="flex-1 px-2.5 py-1.5 cursor-copy touch-none" class="absolute left-0.5 inset-y-0.5 w-[calc((100%-0.25rem)/3)] rounded-md bg-white shadow-sm transition-transform duration-200 ease-out motion-reduce:transition-none dark:bg-zinc-600"
role="group" style="transform: translateX({modeIndex * 100}%);"
aria-label="Gradient stops" aria-hidden="true"
onpointerdown={addStop} ></div>
onpointermove={(event) => { {#each MODES as mode (mode.kind)}
if (dragging !== null) moveStop(dragging, barPosition(event)); <button
}} type="button"
onpointerup={() => (dragging = null)} role="radio"
onpointercancel={() => (dragging = null)} aria-checked={model.kind === mode.kind}
> class="relative py-1 text-xs font-medium rounded-md transition-colors duration-200 {model.kind ===
<div mode.kind
bind:this={bar} ? 'text-zinc-900 dark:text-white'
class="relative h-3 rounded-full ring-1 ring-inset ring-black/10 dark:ring-white/10" : 'text-zinc-500 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white'}"
style="background: linear-gradient(to right, {formatStops(stops)}), {CHECKERBOARD};" onclick={() => setMode(mode.kind)}
> >
{#each stops as stop, index (index)} {mode.label}
<button </button>
type="button" {/each}
class="absolute top-1/2 handle cursor-grab active:cursor-grabbing {index === selected ? 'handle-selected' : ''}"
style="left: {stop.position}%; --swatch: {formatColour(stop.colour)};"
aria-label="Colour stop at {Math.round(stop.position)}%"
aria-pressed={index === selected}
onpointerdown={(event) => startStopDrag(event, index)}
onkeydown={(event) => stopKeys(event, index)}
></button>
{/each}
</div>
</div>
{#if model.kind === "linear"}
<label class="flex shrink-0 items-center px-2 w-14 h-7 text-xs rounded-md bg-zinc-100 dark:bg-zinc-700/70">
<input
type="number"
min="0"
max="360"
class="p-0 w-full min-w-0 text-xs text-right bg-transparent border-0 outline-none select-text picker-number focus:ring-0"
aria-label="Gradient angle in degrees"
value={model.angle}
oninput={(event) => {
if (event.currentTarget.value !== "") setAngle(Number(event.currentTarget.value));
}}
/>
<span class="text-zinc-500 dark:text-zinc-400">°</span>
</label>
{/if}
<button
type="button"
class="grid shrink-0 place-items-center rounded-md transition size-7 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-900 disabled:opacity-30 disabled:pointer-events-none focus-visible:outline-2 focus-visible:outline-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-700 dark:hover:text-white dark:focus-visible:outline-white"
aria-label="Remove selected stop"
disabled={stops.length <= 2}
onclick={() => removeStop(selected)}
>
<svg viewBox="0 0 24 24" class="size-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M3 6h18M8 6V4h8v2m-9 0 1 14h8l1-14" />
</svg>
</button>
</div> </div>
{/if}
{#if model.kind !== "solid"}
<div class="flex gap-2 items-center pt-3" transition:slide={{ duration: 180 }}>
<div
class="flex-1 px-2.5 py-1.5 cursor-copy touch-none"
role="group"
aria-label="Gradient stops"
onpointerdown={selectStopAtPosition}
onpointermove={(event) => {
if (dragging !== null) moveStop(dragging, barPosition(event));
}}
onpointerup={() => (dragging = null)}
onpointercancel={() => (dragging = null)}
>
<div
bind:this={bar}
class="relative h-3 rounded-full ring-1 ring-inset ring-black/10 dark:ring-white/10"
style="background: linear-gradient(to right, {formatStops(stops)}), {CHECKERBOARD};"
>
{#each stops as stop, index (index)}
<button
type="button"
class="absolute top-1/2 handle cursor-grab active:cursor-grabbing {index ===
selected
? 'handle-selected'
: ''}"
style="left: {stop.position}%; --swatch: {formatColour(stop.colour)};"
aria-label="Colour stop at {Math.round(stop.position)}%"
aria-pressed={index === selected}
onpointerdown={(event) => startStopDrag(event, index)}
onkeydown={(event) => stopKeys(event, index)}
></button>
{/each}
</div>
</div>
<button
type="button"
class="grid shrink-0 place-items-center rounded-md transition size-7 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-700 dark:hover:text-white"
aria-label="Add colour stop"
title="Add colour stop"
onclick={() => addStop(50)}
>
<svg viewBox="0 0 24 24" class="size-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14" /></svg>
</button>
{#if model.kind === "linear"}
<label
class="flex shrink-0 items-center px-2 w-14 h-7 text-xs rounded-md bg-zinc-100 dark:bg-zinc-700/70"
>
<input
type="number"
min="0"
max="360"
class="p-0 w-full min-w-0 text-xs text-right bg-transparent border-0 outline-none select-text picker-number"
aria-label="Gradient angle in degrees"
value={model.angle}
oninput={(event) => {
if (event.currentTarget.value !== "") setAngle(Number(event.currentTarget.value));
}}
/>
<span class="text-zinc-500 dark:text-zinc-400">°</span>
</label>
{/if}
<button
type="button"
class="grid shrink-0 place-items-center rounded-md transition size-7 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-900 disabled:opacity-30 disabled:pointer-events-none dark:text-zinc-300 dark:hover:bg-zinc-700 dark:hover:text-white"
aria-label="Remove selected stop"
disabled={stops.length <= 2}
onclick={() => removeStop(selected)}
>
<svg viewBox="0 0 24 24" class="size-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M3 6h18M8 6V4h8v2m-9 0 1 14h8l1-14" />
</svg>
</button>
</div>
{/if}
</div> </div>
<div <div
bind:this={area} bind:this={area}
class="relative h-40 rounded-lg cursor-crosshair touch-none outline-none ring-1 ring-inset ring-black/10 focus-visible:ring-2 focus-visible:ring-zinc-900 dark:ring-white/10 dark:focus-visible:ring-white" class="relative h-40 rounded-lg cursor-crosshair touch-none outline-none ring-1 ring-inset ring-black/10 dark:ring-white/10"
style="background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl({hsva.h} 100% 50%));" style="background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl({hsva.h} 100% 50%));"
role="slider" role="slider"
tabindex="0" tabindex="0"
@@ -345,7 +384,7 @@
{#if EyeDropper} {#if EyeDropper}
<button <button
type="button" type="button"
class="grid shrink-0 place-items-center rounded-md transition size-8 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-900 focus-visible:outline-2 focus-visible:outline-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-700 dark:hover:text-white dark:focus-visible:outline-white" class="grid shrink-0 place-items-center rounded-md transition size-8 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-700 dark:hover:text-white"
aria-label="Pick a colour from the screen" aria-label="Pick a colour from the screen"
onclick={pickFromScreen} onclick={pickFromScreen}
> >
@@ -370,7 +409,9 @@
min="0" min="0"
max="100" max="100"
class="picker-track" class="picker-track"
style="background: linear-gradient(to right, transparent, {hex}), {CHECKERBOARD}; --swatch: {formatColour(active)};" style="background: linear-gradient(to right, transparent, {hex}), {CHECKERBOARD}; --swatch: {formatColour(
active,
)};"
aria-label="Opacity" aria-label="Opacity"
value={Math.round(hsva.a * 100)} value={Math.round(hsva.a * 100)}
oninput={(event) => updateHsva({ a: Number(event.currentTarget.value) / 100 })} oninput={(event) => updateHsva({ a: Number(event.currentTarget.value) / 100 })}
@@ -384,10 +425,12 @@
</div> </div>
<div class="flex gap-2"> <div class="flex gap-2">
<label class="flex flex-1 gap-1.5 items-center px-2.5 min-w-0 h-8 text-xs rounded-md bg-zinc-100 dark:bg-zinc-700/70"> <label
class="flex flex-1 gap-1.5 items-center px-2.5 min-w-0 h-8 text-xs rounded-md bg-zinc-100 dark:bg-zinc-700/70"
>
<span class="text-zinc-500 dark:text-zinc-400">#</span> <span class="text-zinc-500 dark:text-zinc-400">#</span>
<input <input
class="flex-1 p-0 min-w-0 font-mono text-xs uppercase bg-transparent border-0 outline-none select-text focus:ring-0" class="flex-1 p-0 min-w-0 font-mono text-xs uppercase bg-transparent border-0 outline-none select-text"
aria-label="Hex colour" aria-label="Hex colour"
value={hex.slice(1)} value={hex.slice(1)}
spellcheck="false" spellcheck="false"
@@ -403,16 +446,19 @@
}} }}
/> />
</label> </label>
<label class="flex shrink-0 items-center px-2.5 w-16 h-8 text-xs rounded-md bg-zinc-100 dark:bg-zinc-700/70"> <label
class="flex shrink-0 items-center px-2.5 w-16 h-8 text-xs rounded-md bg-zinc-100 dark:bg-zinc-700/70"
>
<input <input
type="number" type="number"
min="0" min="0"
max="100" max="100"
class="p-0 w-full min-w-0 text-xs text-right bg-transparent border-0 outline-none select-text picker-number focus:ring-0" class="p-0 w-full min-w-0 text-xs text-right bg-transparent border-0 outline-none select-text picker-number"
aria-label="Opacity percent" aria-label="Opacity percent"
value={Math.round(active.a * 100)} value={Math.round(active.a * 100)}
oninput={(event) => { oninput={(event) => {
if (event.currentTarget.value !== "") updateHsva({ a: clamp(Number(event.currentTarget.value), 0, 100) / 100 }); if (event.currentTarget.value !== "")
updateHsva({ a: clamp(Number(event.currentTarget.value), 0, 100) / 100 });
}} }}
/> />
<span class="text-zinc-500 dark:text-zinc-400">%</span> <span class="text-zinc-500 dark:text-zinc-400">%</span>
@@ -424,7 +470,7 @@
{#each shownPresets as preset (preset)} {#each shownPresets as preset (preset)}
<button <button
type="button" type="button"
class="rounded-md ring-1 ring-inset transition aspect-square ring-black/10 hover:scale-110 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-zinc-900 dark:ring-white/10 dark:focus-visible:outline-white" class="rounded-md ring-1 ring-inset transition aspect-square ring-black/10 hover:scale-110 dark:ring-white/10"
style="background: {asLayer(preset)}, {CHECKERBOARD};" style="background: {asLayer(preset)}, {CHECKERBOARD};"
aria-label="Apply preset {preset}" aria-label="Apply preset {preset}"
onclick={() => applyPreset(preset)} onclick={() => applyPreset(preset)}
@@ -440,30 +486,30 @@
height: 1.125rem; height: 1.125rem;
border-radius: 9999px; border-radius: 9999px;
border: 2px solid white; border: 2px solid white;
background: linear-gradient(var(--swatch), var(--swatch)), background:
linear-gradient(var(--swatch), var(--swatch)),
repeating-conic-gradient(#d4d4d8 0% 25%, #ffffff 0% 50%) 50% / 6px 6px; repeating-conic-gradient(#d4d4d8 0% 25%, #ffffff 0% 50%) 50% / 6px 6px;
box-shadow: 0 0 0 1px rgb(0 0 0 / 0.15), 0 1px 3px rgb(0 0 0 / 0.3); box-shadow:
0 0 0 1px rgb(0 0 0 / 0.15),
0 1px 3px rgb(0 0 0 / 0.3);
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
transition: transform 120ms ease, box-shadow 120ms ease; transition:
} transform 120ms ease,
box-shadow 120ms ease;
.handle:focus-visible {
outline: none;
box-shadow: 0 0 0 2px rgb(24 24 27), 0 1px 3px rgb(0 0 0 / 0.3);
}
:global(.dark) .handle:focus-visible {
box-shadow: 0 0 0 2px white, 0 1px 3px rgb(0 0 0 / 0.3);
} }
.handle-selected { .handle-selected {
z-index: 1; z-index: 1;
transform: translate(-50%, -50%) scale(1.2); transform: translate(-50%, -50%) scale(1.2);
box-shadow: 0 0 0 2px rgb(24 24 27 / 0.85), 0 2px 6px rgb(0 0 0 / 0.35); box-shadow:
0 0 0 2px rgb(24 24 27 / 0.85),
0 2px 6px rgb(0 0 0 / 0.35);
} }
:global(.dark) .handle-selected { :global(.dark) .handle-selected {
box-shadow: 0 0 0 2px rgb(255 255 255 / 0.9), 0 2px 6px rgb(0 0 0 / 0.5); box-shadow:
0 0 0 2px rgb(255 255 255 / 0.9),
0 2px 6px rgb(0 0 0 / 0.5);
} }
.picker-number { .picker-number {
@@ -486,15 +532,6 @@
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1);
} }
.picker-track:focus-visible {
outline: 2px solid rgb(24 24 27);
outline-offset: 2px;
}
:global(.dark) .picker-track:focus-visible {
outline-color: white;
}
.picker-track::-webkit-slider-thumb { .picker-track::-webkit-slider-thumb {
appearance: none; appearance: none;
width: 1.125rem; width: 1.125rem;
@@ -502,7 +539,9 @@
border: 2px solid white; border: 2px solid white;
border-radius: 9999px; border-radius: 9999px;
background: var(--swatch); background: var(--swatch);
box-shadow: 0 0 0 1px rgb(0 0 0 / 0.15), 0 1px 3px rgb(0 0 0 / 0.3); box-shadow:
0 0 0 1px rgb(0 0 0 / 0.15),
0 1px 3px rgb(0 0 0 / 0.3);
} }
.picker-track::-moz-range-thumb { .picker-track::-moz-range-thumb {
@@ -512,6 +551,8 @@
border: 2px solid white; border: 2px solid white;
border-radius: 9999px; border-radius: 9999px;
background: var(--swatch); background: var(--swatch);
box-shadow: 0 0 0 1px rgb(0 0 0 / 0.15), 0 1px 3px rgb(0 0 0 / 0.3); box-shadow:
0 0 0 1px rgb(0 0 0 / 0.15),
0 1px 3px rgb(0 0 0 / 0.3);
} }
</style> </style>
@@ -6,7 +6,6 @@
let { communityState, searchTerm }: { communityState: CommunityThemesState; searchTerm: string } = let { communityState, searchTerm }: { communityState: CommunityThemesState; searchTerm: string } =
$props(); $props();
</script> </script>
{#if communityState.browseLoading} {#if communityState.browseLoading}
@@ -48,7 +47,8 @@
installedThemeColors={communityState.installedThemeColors} installedThemeColors={communityState.installedThemeColors}
variant="community" variant="community"
onInstall={async (themeId) => { onInstall={async (themeId) => {
if (communityState.displayTheme) await communityState.installCommunityTheme(themeId, communityState.displayTheme); if (communityState.displayTheme)
await communityState.installCommunityTheme(themeId, communityState.displayTheme);
}} }}
onRemove={(id) => void communityState.removeInstalledTheme(id)} onRemove={(id) => void communityState.removeInstalledTheme(id)}
onApply={(id) => void communityState.applyInstalledTheme(id)} onApply={(id) => void communityState.applyInstalledTheme(id)}
@@ -11,9 +11,9 @@
} from "@/seqta/utils/customThemes/client"; } from "@/seqta/utils/customThemes/client";
import ThemePlaceholderCover from "@/interface/components/themes/ThemePlaceholderCover.svelte"; import ThemePlaceholderCover from "@/interface/components/themes/ThemePlaceholderCover.svelte";
import ThemeBlobImage from "@/interface/components/themes/ThemeBlobImage.svelte"; import ThemeBlobImage from "@/interface/components/themes/ThemeBlobImage.svelte";
import type { CustomTheme } from "@/types/CustomThemes"; import type { CustomTheme } from "@/types/customThemes";
import { ThemeManager } from "@/plugins/built-in/themes/theme-manager"; import { ThemeManager } from "@/plugins/built-in/themes/theme-manager";
import { themeUpdates } from "@/interface/hooks/ThemeUpdates"; import { themeUpdates } from "@/interface/hooks/themeUpdates";
import { isLocalCustomTheme } from "@/interface/utils/themeListFilters"; import { isLocalCustomTheme } from "@/interface/utils/themeListFilters";
import { formatCustomThemeApiError } from "@/seqta/utils/customThemes/apiErrors"; import { formatCustomThemeApiError } from "@/seqta/utils/customThemes/apiErrors";
@@ -90,7 +90,9 @@
Submit a custom theme you created or imported without opening the theme builder. Submit a custom theme you created or imported without opening the theme builder.
</p> </p>
{#if localSubmitError} {#if localSubmitError}
<p class="mt-2 whitespace-pre-line text-sm text-red-600 dark:text-red-400">{localSubmitError}</p> <p class="mt-2 whitespace-pre-line text-sm text-red-600 dark:text-red-400">
{localSubmitError}
</p>
{/if} {/if}
{#if localThemesLoading} {#if localThemesLoading}
<div class="mt-3 grid grid-cols-1 gap-3"> <div class="mt-3 grid grid-cols-1 gap-3">
@@ -121,9 +123,13 @@
/> />
{/if} {/if}
<div class="min-w-0 flex-1"> <div class="min-w-0 flex-1">
<span class="font-semibold text-zinc-900 dark:text-white">{theme.name || "Untitled theme"}</span> <span class="font-semibold text-zinc-900 dark:text-white"
>{theme.name || "Untitled theme"}</span
>
{#if theme.description} {#if theme.description}
<p class="mt-1 truncate text-sm text-zinc-500 dark:text-zinc-400">{theme.description}</p> <p class="mt-1 truncate text-sm text-zinc-500 dark:text-zinc-400">
{theme.description}
</p>
{/if} {/if}
</div> </div>
<div class="flex shrink-0 flex-wrap gap-2"> <div class="flex shrink-0 flex-wrap gap-2">
@@ -154,7 +160,8 @@
{#each statusFilters as status (status)} {#each statusFilters as status (status)}
<button <button
type="button" type="button"
class="rounded-full px-3 py-1 text-sm font-medium transition {communityState.statusFilter === status class="rounded-full px-3 py-1 text-sm font-medium transition {communityState.statusFilter ===
status
? 'bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900' ? 'bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900'
: 'bg-zinc-200 text-zinc-700 hover:bg-zinc-300 dark:bg-zinc-800 dark:text-zinc-300'}" : 'bg-zinc-200 text-zinc-700 hover:bg-zinc-300 dark:bg-zinc-800 dark:text-zinc-300'}"
onclick={() => (communityState.statusFilter = status)} onclick={() => (communityState.statusFilter = status)}
@@ -196,7 +203,11 @@
onclick={() => void communityState.openDetail(theme)} onclick={() => void communityState.openDetail(theme)}
> >
{#if theme.coverImage} {#if theme.coverImage}
<img src={theme.coverImage} alt="" class="h-14 w-20 shrink-0 rounded-lg object-cover" /> <img
src={theme.coverImage}
alt=""
class="h-14 w-20 shrink-0 rounded-lg object-cover"
/>
{:else} {:else}
<ThemePlaceholderCover class="h-14 w-20 shrink-0 rounded-lg object-cover" /> <ThemePlaceholderCover class="h-14 w-20 shrink-0 rounded-lg object-cover" />
{/if} {/if}
@@ -204,7 +215,9 @@
<div class="flex flex-wrap items-center gap-2"> <div class="flex flex-wrap items-center gap-2">
<span class="font-semibold text-zinc-900 dark:text-white">{theme.name}</span> <span class="font-semibold text-zinc-900 dark:text-white">{theme.name}</span>
<span <span
class="rounded-full px-2 py-0.5 text-xs font-semibold {statusBadgeClass(theme.status)}" class="rounded-full px-2 py-0.5 text-xs font-semibold {statusBadgeClass(
theme.status,
)}"
> >
{formatCustomThemeStatus(theme.status)} {formatCustomThemeStatus(theme.status)}
</span> </span>
@@ -14,7 +14,8 @@
<span class="mb-1 block text-sm font-medium">Status</span> <span class="mb-1 block text-sm font-medium">Status</span>
<Select <Select
value={communityState.reviewStatusFilter} value={communityState.reviewStatusFilter}
onChange={(v) => (communityState.reviewStatusFilter = v as typeof communityState.reviewStatusFilter)} onChange={(v) =>
(communityState.reviewStatusFilter = v as typeof communityState.reviewStatusFilter)}
options={[ options={[
{ value: "pending", label: "Pending" }, { value: "pending", label: "Pending" },
{ value: "approved", label: "Approved" }, { value: "approved", label: "Approved" },
@@ -73,7 +74,10 @@
onApply={(id) => void communityState.applyInstalledTheme(id)} onApply={(id) => void communityState.applyInstalledTheme(id)}
/> />
{#if communityState.reviewPreviewError} {#if communityState.reviewPreviewError}
<p class="fixed bottom-6 left-1/2 z-100000 -translate-x-1/2 rounded-lg bg-red-600 px-4 py-2 text-sm text-white" role="alert"> <p
class="fixed bottom-6 left-1/2 z-100000 -translate-x-1/2 rounded-lg bg-red-600 px-4 py-2 text-sm text-white"
role="alert"
>
{communityState.reviewPreviewError} {communityState.reviewPreviewError}
</p> </p>
{/if} {/if}
@@ -145,11 +145,6 @@
transform: scale(0.98); transform: scale(0.98);
} }
.bsplus-font-picker-reset:focus-visible {
outline: none;
box-shadow: 0 0 0 3px color-mix(in srgb, var(--bsplus-analytics-accent) 35%, transparent);
}
.bsplus-font-picker-reset:disabled { .bsplus-font-picker-reset:disabled {
opacity: 0.45; opacity: 0.45;
cursor: not-allowed; cursor: not-allowed;
@@ -186,11 +181,6 @@
transform: scale(0.97); transform: scale(0.97);
} }
.bsplus-font-picker-done:focus-visible {
outline: none;
box-shadow: 0 0 0 3px color-mix(in srgb, var(--bsplus-analytics-accent) 35%, transparent);
}
.bsplus-font-picker-list { .bsplus-font-picker-list {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
@@ -241,13 +231,6 @@
); );
} }
.bsplus-font-picker-option:focus-visible {
outline: none;
box-shadow:
var(--bsplus-analytics-shadow-hover),
0 0 0 3px color-mix(in srgb, var(--bsplus-analytics-accent) 30%, transparent);
}
.bsplus-font-picker-option.is-selected { .bsplus-font-picker-option.is-selected {
border-color: color-mix( border-color: color-mix(
in srgb, in srgb,
@@ -1,8 +1,8 @@
<script lang="ts"> <script lang="ts">
import { hasEnoughStorageSpace, isIndexedDBSupported, writeData, openDatabase, readAllData, deleteData } from '@/interface/hooks/BackgroundDataLoader'; import { hasEnoughStorageSpace, isIndexedDBSupported, writeData, openDatabase, readAllData, deleteData } from '@/interface/hooks/backgroundDataLoader';
import Spinner from '../Spinner.svelte'; import Spinner from '../Spinner.svelte';
import { settingsState } from '@/seqta/utils/listeners/SettingsState' import { settingsState } from '@/seqta/utils/listeners/settingsState'
import { backgroundUpdates } from '@/interface/hooks/BackgroundUpdates' import { backgroundUpdates } from '@/interface/hooks/backgroundUpdates'
import { ThemeManager } from '@/plugins/built-in/themes/theme-manager' import { ThemeManager } from '@/plugins/built-in/themes/theme-manager'
const themeManager = ThemeManager.getInstance(); const themeManager = ThemeManager.getInstance();
@@ -1,8 +1,8 @@
<script lang="ts"> <script lang="ts">
import { onMount } from "svelte"; import { onMount } from "svelte";
import { cloudAuth } from "@/seqta/utils/CloudAuth"; import { cloudAuth } from "@/seqta/utils/cloudAuth";
import CloudPfpAvatar from "@/interface/components/CloudPfpAvatar.svelte"; import CloudPfpAvatar from "@/interface/components/CloudPfpAvatar.svelte";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
let { alwaysShowUserName = false, onClick = undefined, compact = false }: { let { alwaysShowUserName = false, onClick = undefined, compact = false }: {
alwaysShowUserName?: boolean; alwaysShowUserName?: boolean;
@@ -1,12 +1,12 @@
<script lang="ts"> <script lang="ts">
import { fade } from 'svelte/transition'; import { fade } from 'svelte/transition';
import type { ThemeCoverSlide } from '@/interface/types/Theme'; import type { ThemeCoverSlide } from '@/interface/types/theme';
import emblaCarouselSvelte from 'embla-carousel-svelte'; import emblaCarouselSvelte from 'embla-carousel-svelte';
import Autoplay from 'embla-carousel-autoplay'; import Autoplay from 'embla-carousel-autoplay';
let { slides, setDisplayTheme }: { let { slides, setDisplayTheme }: {
slides: ThemeCoverSlide[]; slides: ThemeCoverSlide[];
setDisplayTheme: (theme: import('@/interface/types/Theme').Theme) => void; setDisplayTheme: (theme: import('@/interface/types/theme').Theme) => void;
} = $props(); } = $props();
let emblaApi = $state(); let emblaApi = $state();
+1 -1
View File
@@ -5,7 +5,7 @@
import MotionDiv from "../MotionDiv.svelte"; import MotionDiv from "../MotionDiv.svelte";
import PlainCloseButton from "../PlainCloseButton.svelte"; import PlainCloseButton from "../PlainCloseButton.svelte";
import CloudHeader from "./CloudHeader.svelte"; import CloudHeader from "./CloudHeader.svelte";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
type SettingsPage = "settings" | "themes" | "backgrounds"; type SettingsPage = "settings" | "themes" | "backgrounds";
@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import type { Theme } from '@/interface/types/Theme' import type { Theme } from '@/interface/types/theme'
import { import {
masterGridDisplayDownloadCount, masterGridDisplayDownloadCount,
gridCardPreviewImageUrls, gridCardPreviewImageUrls,
+17 -13
View File
@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import type { Theme } from '@/interface/types/Theme' import type { Theme } from "@/interface/types/theme";
import ThemeCard from './ThemeCard.svelte'; import ThemeCard from "./ThemeCard.svelte";
let { let {
themes, themes,
@@ -11,7 +11,7 @@
onRequestSignIn, onRequestSignIn,
allStoreThemeRows, allStoreThemeRows,
installedThemeIds = [], installedThemeIds = [],
variant = 'official', variant = "official",
}: { }: {
themes: Theme[]; themes: Theme[];
searchTerm: string; searchTerm: string;
@@ -22,17 +22,19 @@
/** Raw API list (includes `slave` rows) for master download aggregation */ /** Raw API list (includes `slave` rows) for master download aggregation */
allStoreThemeRows?: Theme[]; allStoreThemeRows?: Theme[];
installedThemeIds?: string[]; installedThemeIds?: string[];
variant?: 'official' | 'community'; variant?: "official" | "community";
} = $props(); } = $props();
let filteredThemes = $derived(themes.filter((theme: Theme) => {
const q = searchTerm.toLowerCase();
const name = (theme.name ?? '').toLowerCase();
const description = (theme.description ?? '').toLowerCase();
return name.includes(q) || description.includes(q);
}));
const isCommunity = $derived(variant === 'community'); let filteredThemes = $derived(
themes.filter((theme: Theme) => {
const q = searchTerm.toLowerCase();
const name = (theme.name ?? "").toLowerCase();
const description = (theme.description ?? "").toLowerCase();
return name.includes(q) || description.includes(q);
}),
);
const isCommunity = $derived(variant === "community");
</script> </script>
<div class="relative"> <div class="relative">
@@ -64,7 +66,9 @@
</div> </div>
{:else} {:else}
<div class="absolute top-0 flex h-96 w-full flex-col items-center justify-center text-center"> <div class="absolute top-0 flex h-96 w-full flex-col items-center justify-center text-center">
<h1 class="mt-4 text-3xl font-bold tracking-tight text-zinc-900 dark:text-zinc-100 sm:text-5xl"> <h1
class="mt-4 text-3xl font-bold tracking-tight text-zinc-900 dark:text-zinc-100 sm:text-5xl"
>
That doesn't exist! 😭😭😭 That doesn't exist! 😭😭😭
</h1> </h1>
<p class="mt-6 text-lg leading-7 text-zinc-600 dark:text-zinc-300"> <p class="mt-6 text-lg leading-7 text-zinc-600 dark:text-zinc-300">
@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import type { Theme } from '@/interface/types/Theme' import type { Theme } from '@/interface/types/theme'
import { fade } from 'svelte/transition' import { fade } from 'svelte/transition'
import { animate } from 'motion' import { animate } from 'motion'
import emblaCarouselSvelte from 'embla-carousel-svelte' import emblaCarouselSvelte from 'embla-carousel-svelte'
@@ -1,3 +1,3 @@
<script lang="ts"></script> <script lang="ts"></script>
<div class='w-full h-0.5 my-4 bg-zinc-200 dark:bg-zinc-700'></div> <div class="w-full h-0.5 my-4 bg-zinc-200 dark:bg-zinc-700"></div>
@@ -6,33 +6,56 @@
url?: string | undefined; url?: string | undefined;
} }
let { bg, isSelected, isEditMode, onClick, onDelete }: { bg: Background, isSelected: boolean, isEditMode: boolean, onClick: () => void, onDelete: () => void } = $props(); let {
bg,
isSelected,
isEditMode,
onClick,
onDelete,
}: {
bg: Background;
isSelected: boolean;
isEditMode: boolean;
onClick: () => void;
onDelete: () => void;
} = $props();
</script> </script>
<div <div
onclick={onClick} onclick={onClick}
onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') onClick() }} onkeydown={(e) => {
if (e.key === "Enter" || e.key === " ") onClick();
}}
tabindex="0" tabindex="0"
role="button" role="button"
class="relative w-16 h-16 cursor-pointer rounded-xl transition ring-3 dark:ring-zinc-500/50 ring-zinc-300 {isEditMode ? 'animate-shake' : ''} {isSelected ? 'dark:ring-4 ring-4' : 'ring-0'}" class="relative w-16 h-16 cursor-pointer rounded-xl transition ring-3 dark:ring-zinc-500/50 ring-zinc-300 {isEditMode
? 'animate-shake'
: ''} {isSelected ? 'dark:ring-4 ring-4' : 'ring-0'}"
> >
{#if isEditMode} {#if isEditMode}
<div <div
tabindex="0" tabindex="0"
role="button" role="button"
class="absolute top-0 right-0 z-10 flex w-6 h-6 p-2 text-white translate-x-1/2 -translate-y-1/2 bg-red-600 rounded-full place-items-center" class="absolute top-0 right-0 z-10 flex w-6 h-6 p-2 text-white translate-x-1/2 -translate-y-1/2 bg-red-600 rounded-full place-items-center"
onclick={(e) => { e.stopPropagation(); onDelete() }} onclick={(e) => {
onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.stopPropagation(); onDelete() } }} e.stopPropagation();
onDelete();
}}
onkeydown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.stopPropagation();
onDelete();
}
}}
> >
<div class="w-4 h-0.5 bg-white"></div> <div class="w-4 h-0.5 bg-white"></div>
</div> </div>
{/if} {/if}
{#if bg.url} {#if bg.url}
{#if bg.type === 'image'} {#if bg.type === "image"}
<img class="object-cover w-full h-full rounded-xl" src={bg.url} alt="swatch" /> <img class="object-cover w-full h-full rounded-xl" src={bg.url} alt="swatch" />
{:else if bg.type === 'video'} {:else if bg.type === "video"}
<video muted loop autoplay src={bg.url} class="object-cover w-full h-full rounded-xl"></video> <video muted loop autoplay src={bg.url} class="object-cover w-full h-full rounded-xl"></video>
{/if} {/if}
{/if} {/if}
</div> </div>
@@ -1,24 +1,38 @@
<script lang="ts"> <script lang="ts">
import { hasEnoughStorageSpace, isIndexedDBSupported, writeData, readAllData, deleteData } from '@/interface/hooks/BackgroundDataLoader' import {
import BackgroundUploader from './BackgroundUploader.svelte'; hasEnoughStorageSpace,
import BackgroundItem from './BackgroundItem.svelte' isIndexedDBSupported,
import { onMount, onDestroy } from 'svelte' writeData,
import { loadBackground } from '@/seqta/ui/ImageBackgrounds' readAllData,
import { backgroundUpdates } from '@/interface/hooks/BackgroundUpdates' deleteData,
} from "@/interface/hooks/backgroundDataLoader";
import BackgroundUploader from "./BackgroundUploader.svelte";
import BackgroundItem from "./BackgroundItem.svelte";
import { onMount, onDestroy } from "svelte";
import { loadBackground } from "@/seqta/ui/imageBackgrounds";
import { backgroundUpdates } from "@/interface/hooks/backgroundUpdates";
let { isEditMode, selectNoBackground = $bindable(), selectedBackground = $bindable() }: { isEditMode: boolean, selectNoBackground: () => void, selectedBackground: string | null } = $props(); let {
isEditMode,
selectNoBackground = $bindable(),
selectedBackground = $bindable(),
}: {
isEditMode: boolean;
selectNoBackground: () => void;
selectedBackground: string | null;
} = $props();
let backgrounds = $state<{ id: string; type: string; blob: Blob | null; url?: string }[]>([]); let backgrounds = $state<{ id: string; type: string; blob: Blob | null; url?: string }[]>([]);
let feedback = $state<{ kind: 'error' | 'warn'; text: string } | null>(null); let feedback = $state<{ kind: "error" | "warn"; text: string } | null>(null);
let imageBackgrounds = $derived(backgrounds.filter(bg => bg.type === 'image')); let imageBackgrounds = $derived(backgrounds.filter((bg) => bg.type === "image"));
let videoBackgrounds = $derived(backgrounds.filter(bg => bg.type === 'video')); let videoBackgrounds = $derived(backgrounds.filter((bg) => bg.type === "video"));
function inferBackgroundType(file: File): 'image' | 'video' { function inferBackgroundType(file: File): "image" | "video" {
const mime = file.type.toLowerCase(); const mime = file.type.toLowerCase();
if (mime.startsWith('video/')) return 'video'; if (mime.startsWith("video/")) return "video";
if (mime.startsWith('image/')) return 'image'; if (mime.startsWith("image/")) return "image";
const ext = file.name.split('.').pop()?.toLowerCase() ?? ''; const ext = file.name.split(".").pop()?.toLowerCase() ?? "";
return ['mp4', 'mov', 'webm', 'm4v', 'mkv'].includes(ext) ? 'video' : 'image'; return ["mp4", "mov", "webm", "m4v", "mkv"].includes(ext) ? "video" : "image";
} }
async function handleFileChange(file: File): Promise<void> { async function handleFileChange(file: File): Promise<void> {
@@ -35,9 +49,13 @@
throw new Error("Not enough storage space to save this background."); throw new Error("Not enough storage space to save this background.");
} }
const fileId = `${Date.now()}-${file.name.replace(/[^\w.-]+/g, '_')}`; const fileId = `${Date.now()}-${file.name.replace(/[^\w.-]+/g, "_")}`;
const fileType = inferBackgroundType(file); const fileType = inferBackgroundType(file);
const blob = file.slice(0, file.size, file.type || (fileType === 'video' ? 'video/mp4' : 'image/jpeg')); const blob = file.slice(
0,
file.size,
file.type || (fileType === "video" ? "video/mp4" : "image/jpeg"),
);
await writeData(fileId, fileType, blob); await writeData(fileId, fileType, blob);
backgrounds = [ backgrounds = [
@@ -46,17 +64,17 @@
]; ];
backgroundUpdates.triggerUpdate(); backgroundUpdates.triggerUpdate();
const ext = file.name.split('.').pop()?.toLowerCase() ?? ''; const ext = file.name.split(".").pop()?.toLowerCase() ?? "";
if (['heic', 'heif'].includes(ext) || file.type.toLowerCase().includes('hei')) { if (["heic", "heif"].includes(ext) || file.type.toLowerCase().includes("hei")) {
feedback = { feedback = {
kind: 'warn', kind: "warn",
text: 'HEIC saved, but Chrome and Edge often cannot preview it. Export as JPEG or PNG if the thumbnail stays blank.', text: "HEIC saved, but Chrome and Edge often cannot preview it. Export as JPEG or PNG if the thumbnail stays blank.",
}; };
} }
} catch (e) { } catch (e) {
feedback = { feedback = {
kind: 'error', kind: "error",
text: e instanceof Error ? e.message : 'An unknown error occurred', text: e instanceof Error ? e.message : "An unknown error occurred",
}; };
} }
} }
@@ -69,27 +87,27 @@
throw new Error("Your browser doesn't support IndexedDB. Unable to load backgrounds."); throw new Error("Your browser doesn't support IndexedDB. Unable to load backgrounds.");
} }
selectedBackground = localStorage.getItem('selectedBackground'); selectedBackground = localStorage.getItem("selectedBackground");
const dbData = await readAllData(); const dbData = await readAllData();
backgrounds.forEach(bg => { backgrounds.forEach((bg) => {
if (bg.url) URL.revokeObjectURL(bg.url); if (bg.url) URL.revokeObjectURL(bg.url);
}); });
backgrounds = dbData.map(bg => ({ backgrounds = dbData.map((bg) => ({
id: bg.id, id: bg.id,
type: bg.type, type: bg.type,
blob: bg.blob, blob: bg.blob,
url: URL.createObjectURL(bg.blob) url: URL.createObjectURL(bg.blob),
})); }));
if (selectedBackground && !backgrounds.some(bg => bg.id === selectedBackground)) { if (selectedBackground && !backgrounds.some((bg) => bg.id === selectedBackground)) {
selectNoBackground(); selectNoBackground();
} }
} catch (e) { } catch (e) {
feedback = { feedback = {
kind: 'error', kind: "error",
text: e instanceof Error ? e.message : 'An unknown error occurred', text: e instanceof Error ? e.message : "An unknown error occurred",
}; };
} }
} }
@@ -101,13 +119,13 @@
} }
selectedBackground = fileId; selectedBackground = fileId;
localStorage.setItem('selectedBackground', fileId); localStorage.setItem("selectedBackground", fileId);
} }
async function deleteBackground(fileId: string): Promise<void> { async function deleteBackground(fileId: string): Promise<void> {
try { try {
await deleteData(fileId); await deleteData(fileId);
backgrounds = backgrounds.filter(bg => bg.id !== fileId); backgrounds = backgrounds.filter((bg) => bg.id !== fileId);
if (selectedBackground === fileId) { if (selectedBackground === fileId) {
selectNoBackground(); selectNoBackground();
@@ -115,16 +133,16 @@
backgroundUpdates.triggerUpdate(); backgroundUpdates.triggerUpdate();
} catch (e) { } catch (e) {
feedback = { feedback = {
kind: 'error', kind: "error",
text: e instanceof Error ? e.message : 'An unknown error occurred', text: e instanceof Error ? e.message : "An unknown error occurred",
}; };
} }
} }
selectNoBackground = () => { selectNoBackground = () => {
selectedBackground = null; selectedBackground = null;
localStorage.setItem('selectedBackground', ''); localStorage.setItem("selectedBackground", "");
} };
$effect(() => { $effect(() => {
loadBackground(); loadBackground();
@@ -147,13 +165,19 @@
}); });
</script> </script>
<div class="relative px-1 { !( isEditMode && imageBackgrounds.length === 0 && videoBackgrounds.length === 0 ) && 'pt-2' }"> <div
class="relative px-1 {!(
isEditMode &&
imageBackgrounds.length === 0 &&
videoBackgrounds.length === 0
) && 'pt-2'}"
>
{#if feedback} {#if feedback}
<div <div
class="mx-1 mb-3 rounded-lg border px-3 py-2 text-sm {feedback.kind === 'warn' class="mx-1 mb-3 rounded-lg border px-3 py-2 text-sm {feedback.kind === 'warn'
? 'border-amber-300/60 bg-amber-50 text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/40 dark:text-amber-100' ? 'border-amber-300/60 bg-amber-50 text-amber-900 dark:border-amber-900/50 dark:bg-amber-950/40 dark:text-amber-100'
: 'border-red-300/60 bg-red-50 text-red-800 dark:border-red-900/50 dark:bg-red-950/40 dark:text-red-200'}" : 'border-red-300/60 bg-red-50 text-red-800 dark:border-red-900/50 dark:bg-red-950/40 dark:text-red-200'}"
role={feedback.kind === 'warn' ? 'status' : 'alert'} role={feedback.kind === "warn" ? "status" : "alert"}
> >
{feedback.text} {feedback.text}
</div> </div>
@@ -168,11 +192,12 @@
{#each imageBackgrounds as bg (bg.id)} {#each imageBackgrounds as bg (bg.id)}
{#if bg.url} {#if bg.url}
<BackgroundItem <BackgroundItem
bg={bg} {bg}
isSelected={selectedBackground === bg.id} isSelected={selectedBackground === bg.id}
isEditMode={isEditMode} {isEditMode}
onClick={() => selectBackground(bg.id)} onClick={() => selectBackground(bg.id)}
onDelete={() => deleteBackground(bg.id)}/> onDelete={() => deleteBackground(bg.id)}
/>
{:else} {:else}
<div class="w-16 h-16 rounded-xl bg-zinc-100 dark:bg-zinc-900 animate-pulse"></div> <div class="w-16 h-16 rounded-xl bg-zinc-100 dark:bg-zinc-900 animate-pulse"></div>
{/if} {/if}
@@ -189,9 +214,9 @@
{#each videoBackgrounds as bg (bg.id)} {#each videoBackgrounds as bg (bg.id)}
{#if bg.url} {#if bg.url}
<BackgroundItem <BackgroundItem
bg={bg} {bg}
isSelected={selectedBackground === bg.id} isSelected={selectedBackground === bg.id}
isEditMode={isEditMode} {isEditMode}
onClick={() => selectBackground(bg.id)} onClick={() => selectBackground(bg.id)}
onDelete={() => deleteBackground(bg.id)} onDelete={() => deleteBackground(bg.id)}
/> />
@@ -1,32 +1,36 @@
<script lang="ts"> <script lang="ts">
import { blobToDataUrl } from '@/seqta/utils/base64' import { blobToDataUrl } from "@/seqta/utils/base64";
let { source, alt = '', class: className = '' }: { let {
source: string | Blob | null | undefined source,
alt?: string alt = "",
class?: string class: className = "",
} = $props() }: {
source: string | Blob | null | undefined;
alt?: string;
class?: string;
} = $props();
let src = $state('') let src = $state("");
$effect(() => { $effect(() => {
const value = source const value = source;
if (!value) { if (!value) {
src = '' src = "";
return return;
} }
if (typeof value === 'string') { if (typeof value === "string") {
src = value src = value;
return return;
} }
let cancelled = false let cancelled = false;
void blobToDataUrl(value).then((url) => { void blobToDataUrl(value).then((url) => {
if (!cancelled) src = url if (!cancelled) src = url;
}) });
return () => { return () => {
cancelled = true cancelled = true;
} };
}) });
</script> </script>
{#if src} {#if src}
@@ -12,4 +12,4 @@
const src = $derived(defaultThemeCoverDataUrl(accentHint)); const src = $derived(defaultThemeCoverDataUrl(accentHint));
</script> </script>
<img src={src} alt="" class={className} draggable="false" /> <img {src} alt="" class={className} draggable="false" />
@@ -1,10 +1,10 @@
<script lang="ts"> <script lang="ts">
import type { CustomTheme, ThemeList } from '@/types/CustomThemes' import type { CustomTheme, ThemeList } from '@/types/customThemes'
import { onDestroy, onMount } from 'svelte' import { onDestroy, onMount } from 'svelte'
import browser from '@/lib/browser' import browser from '@/lib/browser'
import { themeUpdates } from '@/interface/hooks/ThemeUpdates' import { themeUpdates } from '@/interface/hooks/themeUpdates'
import { ThemeManager } from '@/plugins/built-in/themes/theme-manager' import { ThemeManager } from '@/plugins/built-in/themes/theme-manager'
import { cloudAuth } from '@/seqta/utils/CloudAuth' import { cloudAuth } from '@/seqta/utils/cloudAuth'
import SignInToFavoriteModal from '@/interface/components/SignInToFavoriteModal.svelte' import SignInToFavoriteModal from '@/interface/components/SignInToFavoriteModal.svelte'
import ThemeBlobImage from '@/interface/components/themes/ThemeBlobImage.svelte' import ThemeBlobImage from '@/interface/components/themes/ThemeBlobImage.svelte'
import ThemePlaceholderCover from '@/interface/components/themes/ThemePlaceholderCover.svelte' import ThemePlaceholderCover from '@/interface/components/themes/ThemePlaceholderCover.svelte'
@@ -101,8 +101,8 @@
} }
const openStorePage = async () => { const openStorePage = async () => {
const { OpenStorePage } = await import('@/seqta/ui/renderStore') const { openStorePage } = await import('@/seqta/ui/renderStore')
await OpenStorePage() await openStorePage()
} }
const openThemeCreator = async (themeId?: string) => { const openThemeCreator = async (themeId?: string) => {
-6
View File
@@ -4,12 +4,6 @@
display: none; display: none;
} }
input {
&:focus {
box-shadow: unset !important;
}
}
.no-scrollbar { .no-scrollbar {
scrollbar-width: none !important; scrollbar-width: none !important;
} }
@@ -1,13 +1,13 @@
import browser from "@/lib/browser"; import browser from "@/lib/browser";
import type { Theme } from "@/interface/types/Theme"; import type { Theme } from "@/interface/types/theme";
import { import {
getCommunityInstalledThemeIds, getCommunityInstalledThemeIds,
getStoreInstalledThemeIds, getStoreInstalledThemeIds,
} from "@/interface/utils/themeListFilters"; } from "@/interface/utils/themeListFilters";
import { normalizeStoreTheme } from "@/interface/utils/themeStoreFlavours"; import { normalizeStoreTheme } from "@/interface/utils/themeStoreFlavours";
import { themeUpdates } from "@/interface/hooks/ThemeUpdates"; import { themeUpdates } from "@/interface/hooks/themeUpdates";
import { ThemeManager } from "@/plugins/built-in/themes/theme-manager"; import { ThemeManager } from "@/plugins/built-in/themes/theme-manager";
import { cloudAuth, isCloudAdmin } from "@/seqta/utils/CloudAuth"; import { cloudAuth, isCloudAdmin } from "@/seqta/utils/cloudAuth";
import { import {
deleteCustomTheme, deleteCustomTheme,
fetchCommunityThemes, fetchCommunityThemes,
File renamed without changes.
-6
View File
@@ -8,12 +8,6 @@
width: var(--tab-width); width: var(--tab-width);
} }
input {
&:focus {
box-shadow: unset !important;
}
}
.animate-fade-in { .animate-fade-in {
animation: fadeIn 0.5s ease-in-out; animation: fadeIn 0.5s ease-in-out;
} }
+1 -20
View File
@@ -1,26 +1,9 @@
import Settings from "./pages/settings.svelte"; import Settings from "./pages/settings.svelte";
import IconFamily from "@/resources/fonts/IconFamily.woff";
import { resolveExtensionAssetUrl } from "@/lib/extensionAssetUrl";
import renderSvelte from "./main"; import renderSvelte from "./main";
import { initializeSettingsState } from "@/seqta/utils/listeners/SettingsState"; import { initializeSettingsState } from "@/seqta/utils/listeners/settingsState";
import { loadRemoteStatus } from "@/seqta/utils/remoteStatus"; import { loadRemoteStatus } from "@/seqta/utils/remoteStatus";
import { initVerboseLogging, verboseInfo } from "@/utils/verboseLog"; import { initVerboseLogging, verboseInfo } from "@/utils/verboseLog";
function InjectCustomIcons() {
verboseInfo("[BetterSEQTA+] Injecting Icons");
const style = document.createElement("style");
style.setAttribute("type", "text/css");
style.innerHTML = `
@font-face {
font-family: 'IconFamily';
src: url('${resolveExtensionAssetUrl(IconFamily)}') format('woff');
font-weight: normal;
font-style: normal;
}`;
document.head.appendChild(style);
}
const mountPoint = document.getElementById("app"); const mountPoint = document.getElementById("app");
if (!mountPoint) { if (!mountPoint) {
// In production, Rollup may put this entry in a shared chunk that content // In production, Rollup may put this entry in a shared chunk that content
@@ -28,8 +11,6 @@ if (!mountPoint) {
// has `#app` — never throw on SEQTA tabs. // has `#app` — never throw on SEQTA tabs.
verboseInfo("[BetterSEQTA+] Settings bootstrap skipped (no #app — not the settings page)"); verboseInfo("[BetterSEQTA+] Settings bootstrap skipped (no #app — not the settings page)");
} else { } else {
InjectCustomIcons();
void (async () => { void (async () => {
await initializeSettingsState(); await initializeSettingsState();
await loadRemoteStatus(); await loadRemoteStatus();
+9 -4
View File
@@ -21,7 +21,8 @@
<div class="inline-flex rounded-xl bg-zinc-200/80 p-1 dark:bg-zinc-800/80"> <div class="inline-flex rounded-xl bg-zinc-200/80 p-1 dark:bg-zinc-800/80">
<button <button
type="button" type="button"
class="rounded-lg px-4 py-2 text-sm font-medium transition-colors {communityState.innerTab === 'browse' class="rounded-lg px-4 py-2 text-sm font-medium transition-colors {communityState.innerTab ===
'browse'
? 'bg-white text-zinc-900 shadow-sm dark:bg-zinc-700 dark:text-white' ? 'bg-white text-zinc-900 shadow-sm dark:bg-zinc-700 dark:text-white'
: 'text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white'}" : 'text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white'}"
onclick={() => (communityState.innerTab = "browse")} onclick={() => (communityState.innerTab = "browse")}
@@ -30,7 +31,8 @@
</button> </button>
<button <button
type="button" type="button"
class="rounded-lg px-4 py-2 text-sm font-medium transition-colors {communityState.innerTab === 'mine' class="rounded-lg px-4 py-2 text-sm font-medium transition-colors {communityState.innerTab ===
'mine'
? 'bg-white text-zinc-900 shadow-sm dark:bg-zinc-700 dark:text-white' ? 'bg-white text-zinc-900 shadow-sm dark:bg-zinc-700 dark:text-white'
: 'text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white'}" : 'text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white'}"
onclick={() => (communityState.innerTab = "mine")} onclick={() => (communityState.innerTab = "mine")}
@@ -40,7 +42,8 @@
{#if communityState.isAdmin} {#if communityState.isAdmin}
<button <button
type="button" type="button"
class="rounded-lg px-4 py-2 text-sm font-medium transition-colors {communityState.innerTab === 'review' class="rounded-lg px-4 py-2 text-sm font-medium transition-colors {communityState.innerTab ===
'review'
? 'bg-white text-zinc-900 shadow-sm dark:bg-zinc-700 dark:text-white' ? 'bg-white text-zinc-900 shadow-sm dark:bg-zinc-700 dark:text-white'
: 'text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white'}" : 'text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white'}"
onclick={() => (communityState.innerTab = "review")} onclick={() => (communityState.innerTab = "review")}
@@ -63,7 +66,9 @@
</p> </p>
</div> </div>
<main class="min-h-0 flex-1 overflow-y-auto bg-zinc-50/80 px-6 py-6 dark:bg-zinc-900/40 md:px-8 lg:px-10"> <main
class="min-h-0 flex-1 overflow-y-auto bg-zinc-50/80 px-6 py-6 dark:bg-zinc-900/40 md:px-8 lg:px-10"
>
{#if communityState.innerTab === "browse"} {#if communityState.innerTab === "browse"}
<BrowsePanel {communityState} {searchTerm} /> <BrowsePanel {communityState} {searchTerm} />
{:else if communityState.innerTab === "mine"} {:else if communityState.innerTab === "mine"}
+113 -84
View File
@@ -8,12 +8,12 @@
import { standalone as StandaloneStore } from "../utils/standalone.svelte"; import { standalone as StandaloneStore } from "../utils/standalone.svelte";
import { onMount, onDestroy, tick } from "svelte"; import { onMount, onDestroy, tick } from "svelte";
import { animate } from "motion"; import { animate } from "motion";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { isPerformanceMode } from "@/seqta/utils/performanceMode"; import { isPerformanceMode } from "@/seqta/utils/performanceMode";
import { closeExtensionPopup } from "@/seqta/utils/closers/closeExtensionPopup"; import { closeExtensionPopup } from "@/seqta/utils/closers/closeExtensionPopup";
import { OpenAboutPage } from "@/seqta/utils/openers/OpenAboutPage"; import { openAboutPage } from "@/seqta/utils/openers/openAboutPage";
import { OpenWhatsNewPopup } from "@/seqta/utils/openers/OpenWhatsNewPopup"; import { openWhatsNewPopup } from "@/seqta/utils/openers/openWhatsNewPopup";
import type { Component } from "svelte"; import type { Component } from "svelte";
import SidebarNav from "../components/SidebarNav.svelte"; import SidebarNav from "../components/SidebarNav.svelte";
@@ -101,13 +101,15 @@
if (!$settingsState.devMode && activeSection === "advanced") activeSection = "general"; if (!$settingsState.devMode && activeSection === "advanced") activeSection = "general";
}); });
const appNav = $derived<NavItem[]>([ const appNav = $derived<NavItem[]>(
{ id: "timetable", label: "Timetable" }, [
{ id: "assessments", label: "Assessments" }, { id: "timetable", label: "Timetable" },
{ id: "features", label: "Features" }, { id: "assessments", label: "Assessments" },
...($settingsState.devMode ? [{ id: "advanced", label: "Advanced" }] : []), { id: "features", label: "Features" },
{ id: "shortcuts", label: "Shortcuts" }, ...($settingsState.devMode ? [{ id: "advanced", label: "Advanced" }] : []),
].filter((item) => isSectionVisible(item.id))); { id: "shortcuts", label: "Shortcuts" },
].filter((item) => isSectionVisible(item.id)),
);
const settingsNavGroups = $derived([ const settingsNavGroups = $derived([
{ label: "User Settings", items: userNav }, { label: "User Settings", items: userNav },
@@ -189,8 +191,7 @@
); );
const openGhRelease = () => { const openGhRelease = () => {
const url = const url = ghReleaseUpdate?.url ?? "https://github.com/BetterSEQTA/BetterSEQTA-Plus/releases";
ghReleaseUpdate?.url ?? "https://github.com/BetterSEQTA/BetterSEQTA-Plus/releases";
if (ghReleaseUpdate?.available) { if (ghReleaseUpdate?.available) {
dismissNightlyUpdate(); dismissNightlyUpdate();
} }
@@ -221,12 +222,12 @@
}; };
const openChangelog = () => { const openChangelog = () => {
OpenWhatsNewPopup(); openWhatsNewPopup();
closeExtensionPopup(); closeExtensionPopup();
}; };
const openAbout = () => { const openAbout = () => {
OpenAboutPage(); openAboutPage();
closeExtensionPopup(); closeExtensionPopup();
}; };
@@ -309,7 +310,9 @@
const from = panel ? getComputedStyle(panel) : null; const from = panel ? getComputedStyle(panel) : null;
const start = bounds.map((key) => parseFloat(from?.[key] ?? "0")); const start = bounds.map((key) => parseFloat(from?.[key] ?? "0"));
resizeAnimation?.stop(); resizeAnimation?.stop();
const motionEnabled = $settingsState.animations !== false && !$settingsState.performanceMode && const motionEnabled =
$settingsState.animations !== false &&
!$settingsState.performanceMode &&
!window.matchMedia("(prefers-reduced-motion: reduce)").matches; !window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const root = panel?.getRootNode() as ShadowRoot | Document | undefined; const root = panel?.getRootNode() as ShadowRoot | Document | undefined;
const restoreFocus = !!content?.contains(root?.activeElement ?? null); const restoreFocus = !!content?.contains(root?.activeElement ?? null);
@@ -337,9 +340,12 @@
await tick(); await tick();
if (!panel || !content || generation !== resizeGeneration) return; if (!panel || !content || generation !== resizeGeneration) return;
for (const key of bounds) panel.style.removeProperty(key); for (const key of bounds) panel.style.removeProperty(key);
if (restoreFocus) content.querySelector<HTMLButtonElement>( if (restoreFocus)
`[aria-label="${nextExpanded ? "Collapse" : "Expand"} settings"]`, content
)?.focus({ preventScroll: true }); .querySelector<HTMLButtonElement>(
`[aria-label="${nextExpanded ? "Collapse" : "Expand"} settings"]`,
)
?.focus({ preventScroll: true });
if (!motionEnabled) return; if (!motionEnabled) return;
const targetStyle = getComputedStyle(panel); const targetStyle = getComputedStyle(panel);
const target = bounds.map((key) => parseFloat(targetStyle[key])); const target = bounds.map((key) => parseFloat(targetStyle[key]));
@@ -347,9 +353,13 @@
// move, so compact text and images never stretch across the expanded panel. // move, so compact text and images never stretch across the expanded panel.
content.style.width = `${panel.clientWidth}px`; content.style.width = `${panel.clientWidth}px`;
content.style.height = `${panel.clientHeight}px`; content.style.height = `${panel.clientHeight}px`;
bounds.forEach((key, index) => { panel.style[key] = `${start[index]}px`; }); bounds.forEach((key, index) => {
panel.style[key] = `${start[index]}px`;
});
resizeAnimation = animate(0, 1, { resizeAnimation = animate(0, 1, {
type: "spring", stiffness: 420, damping: 36, type: "spring",
stiffness: 420,
damping: 36,
onUpdate: (progress) => { onUpdate: (progress) => {
if (generation !== resizeGeneration) return; if (generation !== resizeGeneration) return;
const opacity = Math.max(0, Math.min(1, progress)); const opacity = Math.max(0, Math.min(1, progress));
@@ -396,9 +406,7 @@
}; };
const syncCompactTab = () => { const syncCompactTab = () => {
compactActiveTab = activePage === "settings" compactActiveTab = activePage === "settings" ? (activeSection === "shortcuts" ? 1 : 0) : 2;
? activeSection === "shortcuts" ? 1 : 0
: 2;
lastExpandedTab = compactActiveTab; lastExpandedTab = compactActiveTab;
}; };
@@ -463,7 +471,8 @@
? "community-themes" ? "community-themes"
: "theme-settings"; : "theme-settings";
} else if (destination.page === "backgrounds" && destination.view) { } else if (destination.page === "backgrounds" && destination.view) {
activeBackgroundView = destination.view === "store" ? "background-store" : "background-settings"; activeBackgroundView =
destination.view === "store" ? "background-store" : "background-settings";
} }
}; };
@@ -587,18 +596,16 @@
type="search" type="search"
placeholder="Search settings" placeholder="Search settings"
bind:value={settingsSearch} bind:value={settingsSearch}
class="h-10 w-full rounded-lg bg-zinc-200/70 pl-9 pr-3 text-sm text-zinc-900 placeholder:text-zinc-400 transition-colors duration-200 focus:bg-white focus:outline-hidden focus:ring-2 focus:ring-zinc-400 focus:ring-offset-2 dark:bg-zinc-800/80 dark:text-white dark:placeholder:text-zinc-500 dark:focus:bg-zinc-800 dark:focus:ring-offset-zinc-900" class="h-10 w-full rounded-lg bg-zinc-200/70 pl-9 pr-3 text-sm text-zinc-900 placeholder:text-zinc-400 transition-colors duration-200 focus:bg-white dark:bg-zinc-800/80 dark:text-white dark:placeholder:text-zinc-500 dark:focus:bg-zinc-800"
/> />
</label> </label>
{/if} {/if}
<SidebarNav <SidebarNav groups={navGroups} selectedId={selectedNavId} onselect={selectNavItem} />
groups={navGroups}
selectedId={selectedNavId}
onselect={selectNavItem}
/>
<div class="mt-4 flex shrink-0 flex-col gap-1 border-t border-zinc-200/60 pt-4 dark:border-zinc-700/50"> <div
class="mt-4 flex shrink-0 flex-col gap-1 border-t border-zinc-200/60 pt-4 dark:border-zinc-700/50"
>
{#if ghReleaseUpdateEnabled} {#if ghReleaseUpdateEnabled}
<div class="px-3 pb-2"> <div class="px-3 pb-2">
{#if ghReleaseUpdate?.available} {#if ghReleaseUpdate?.available}
@@ -621,7 +628,7 @@
<button <button
type="button" type="button"
onclick={action.onclick} onclick={action.onclick}
class="flex h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-[16px] font-medium text-zinc-600 transition-[color,background-color,transform] duration-150 hover:bg-zinc-200/70 hover:text-zinc-950 active:scale-[0.96] focus:outline-hidden focus:ring-2 focus:ring-zinc-400 focus:ring-offset-2 dark:text-zinc-300 dark:hover:bg-zinc-700/70 dark:hover:text-white dark:focus:ring-offset-zinc-900" class="flex h-10 w-full items-center gap-3 rounded-lg px-3 text-left text-[16px] font-medium text-zinc-600 transition-[color,background-color,transform] duration-150 hover:bg-zinc-200/70 hover:text-zinc-950 active:scale-[0.96] dark:text-zinc-300 dark:hover:bg-zinc-700/70 dark:hover:text-white"
> >
<span class="w-5 text-center font-IconFamily text-[18px]" aria-hidden="true">{action.icon}</span> <span class="w-5 text-center font-IconFamily text-[18px]" aria-hidden="true">{action.icon}</span>
<span>{action.label}</span> <span>{action.label}</span>
@@ -631,7 +638,7 @@
<button <button
type="button" type="button"
onclick={() => openFeedback()} onclick={() => openFeedback()}
class="mt-2 flex w-full items-center gap-3 rounded-lg bg-zinc-200/70 px-3 py-2.5 text-left text-[16px] font-medium text-zinc-700 transition-[color,background-color,transform] duration-150 hover:bg-zinc-300/80 active:scale-[0.96] focus:outline-hidden focus:ring-2 focus:ring-zinc-400 focus:ring-offset-2 dark:bg-zinc-800/80 dark:text-zinc-200 dark:hover:bg-zinc-700 dark:focus:ring-offset-zinc-900" class="mt-2 flex w-full items-center gap-3 rounded-lg bg-zinc-200/70 px-3 py-2.5 text-left text-[16px] font-medium text-zinc-700 transition-[color,background-color,transform] duration-150 hover:bg-zinc-300/80 active:scale-[0.96] dark:bg-zinc-800/80 dark:text-zinc-200 dark:hover:bg-zinc-700"
> >
<svg <svg
class="w-5 h-5 shrink-0" class="w-5 h-5 shrink-0"
@@ -727,7 +734,6 @@
</div> </div>
</div> </div>
{/if} {/if}
</div> </div>
</div> </div>
</div> </div>
@@ -739,13 +745,17 @@
> >
<RemoteStatusStrip /> <RemoteStatusStrip />
<div <div
class="grid shrink-0 items-center border-b border-zinc-200/40 dark:border-zinc-700/40 {standalone ? 'grid-cols-1' : 'grid-cols-[minmax(0,1fr)_44px] gap-2 px-2'}" class="grid shrink-0 items-center border-b border-zinc-200/40 dark:border-zinc-700/40 {standalone
? 'grid-cols-1'
: 'grid-cols-[minmax(0,1fr)_44px] gap-2 px-2'}"
> >
<!-- svelte-ignore a11y_no_noninteractive_element_interactions --> <!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
<!-- svelte-ignore a11y_click_events_have_key_events --> <!-- svelte-ignore a11y_click_events_have_key_events -->
<img <img
src={resolveExtensionAssetUrl(darkLogo)} src={resolveExtensionAssetUrl(darkLogo)}
class="min-w-0 dark:hidden {standalone ? 'mx-auto w-4/5' : 'h-auto w-full max-w-[296px] justify-self-center object-contain'}" class="min-w-0 dark:hidden {standalone
? 'mx-auto w-4/5'
: 'h-auto w-full max-w-[296px] justify-self-center object-contain'}"
alt="BetterSEQTA+" alt="BetterSEQTA+"
onclick={handleDevModeToggle} onclick={handleDevModeToggle}
/> />
@@ -753,15 +763,33 @@
<!-- svelte-ignore a11y_click_events_have_key_events --> <!-- svelte-ignore a11y_click_events_have_key_events -->
<img <img
src={resolveExtensionAssetUrl(lightLogo)} src={resolveExtensionAssetUrl(lightLogo)}
class="hidden min-w-0 dark:block {standalone ? 'mx-auto w-4/5' : 'h-auto w-full max-w-[296px] justify-self-center object-contain'}" class="hidden min-w-0 dark:block {standalone
? 'mx-auto w-4/5'
: 'h-auto w-full max-w-[296px] justify-self-center object-contain'}"
alt="BetterSEQTA+" alt="BetterSEQTA+"
onclick={handleDevModeToggle} onclick={handleDevModeToggle}
/> />
{#if !standalone} {#if !standalone}
<button type="button" onclick={toggleExpanded} <button
class="mt-2 flex h-11 w-11 shrink-0 self-start items-center justify-center text-zinc-500 transition-[color,transform] duration-150 hover:text-zinc-950 active:scale-[0.96] focus:outline-hidden dark:text-zinc-400 dark:hover:text-white" type="button"
aria-label="Expand settings" title="Expand settings" aria-expanded="false"> onclick={toggleExpanded}
<span class="font-IconFamily text-2xl" aria-hidden="true">{"\uebdb"}</span> class="mt-2 flex h-11 w-11 shrink-0 self-start items-center justify-center text-zinc-500 transition-[color,transform] duration-150 hover:text-zinc-950 active:scale-[0.96] dark:text-zinc-400 dark:hover:text-white"
aria-label="Expand settings"
title="Expand settings"
aria-expanded="false"
>
<svg
class="text-2xl"
width="1em"
height="1em"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
aria-hidden="true"
>
<path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" />
</svg>
</button> </button>
{/if} {/if}
</div> </div>
@@ -803,19 +831,20 @@
</div> </div>
{:else} {:else}
<div <div
class="absolute inset-0 z-50 {$settingsState.DarkMode class="absolute inset-0 z-50 {$settingsState.DarkMode ? 'dark' : ''}"
? 'dark'
: ''}"
role="dialog" role="dialog"
aria-modal="true" aria-modal="true"
aria-label="BetterSEQTA+ settings" aria-label="BetterSEQTA+ settings"
> >
<button <button
type="button" type="button"
class="settings-backdrop absolute inset-0 {expanded ? 'bg-black/60' : 'bg-transparent'} {expanded && !$settingsState.performanceMode class="settings-backdrop absolute inset-0 {expanded
? 'bg-black/60'
: 'bg-transparent'} {expanded && !$settingsState.performanceMode
? 'backdrop-blur-xs' ? 'backdrop-blur-xs'
: 'backdrop-blur-none'}" : 'backdrop-blur-none'}"
class:settings-backdrop--motion={$settingsState.animations !== false && !$settingsState.performanceMode} class:settings-backdrop--motion={$settingsState.animations !== false &&
!$settingsState.performanceMode}
aria-label="Close settings" aria-label="Close settings"
onclick={handleClose} onclick={handleClose}
></button> ></button>
@@ -837,44 +866,6 @@
</div> </div>
{/if} {/if}
<style>
.settings-content {
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
}
.settings-panel {
width: min(384px, calc(100vw - 20px));
height: min(600px, calc(100vh - 95px));
top: min(80px, 10vh);
right: 10px;
border-radius: 1rem;
transform-origin: 70% 0;
}
.settings-panel--expanded {
border-radius: 0.75rem;
transform-origin: center;
width: min(1180px, 96vw);
height: min(860px, 92vh);
top: calc((100% - min(860px, 92vh)) / 2);
right: calc((100% - min(1180px, 96vw)) / 2);
}
.settings-backdrop--motion {
transition: background-color 200ms ease;
}
@media (prefers-reduced-motion: reduce) {
.settings-backdrop--motion {
transition: none;
}
}
</style>
{#if showColourPicker && ColourPickerComponent} {#if showColourPicker && ColourPickerComponent}
<ColourPickerComponent <ColourPickerComponent
hidePicker={() => { hidePicker={() => {
@@ -925,3 +916,41 @@
}} }}
/> />
{/if} {/if}
<style>
.settings-content {
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
}
.settings-panel {
width: min(384px, calc(100vw - 20px));
height: min(600px, calc(100vh - 95px));
top: min(80px, 10vh);
right: 10px;
border-radius: 1rem;
transform-origin: 70% 0;
}
.settings-panel--expanded {
border-radius: 0.75rem;
transform-origin: center;
width: min(1180px, 96vw);
height: min(860px, 92vh);
top: calc((100% - min(860px, 92vh)) / 2);
right: calc((100% - min(1180px, 96vw)) / 2);
}
.settings-backdrop--motion {
transition: background-color 200ms ease;
}
@media (prefers-reduced-motion: reduce) {
.settings-backdrop--motion {
transition: none;
}
}
</style>
@@ -5,12 +5,9 @@
import Slider from "@/interface/components/Slider.svelte"; import Slider from "@/interface/components/Slider.svelte";
import Select from "@/interface/components/Select.svelte"; import Select from "@/interface/components/Select.svelte";
import HotkeyInput from "@/interface/components/HotkeyInput.svelte"; import HotkeyInput from "@/interface/components/HotkeyInput.svelte";
import SettingRow from "./SettingRow.svelte"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { cloudAuth } from "@/seqta/utils/cloudAuth";
import { cloudAuth } from "@/seqta/utils/CloudAuth"; import { setPerformanceModePluginOverride } from "@/seqta/utils/performanceMode";
import {
setPerformanceModePluginOverride,
} from "@/seqta/utils/performanceMode";
import { PERFORMANCE_HEAVY_PLUGIN_IDS } from "@/seqta/utils/performanceModeConfig"; import { PERFORMANCE_HEAVY_PLUGIN_IDS } from "@/seqta/utils/performanceModeConfig";
import { onMount } from "svelte"; import { onMount } from "svelte";
import { import {
@@ -19,11 +16,7 @@
type SettingsSectionId, type SettingsSectionId,
type SettingsSectionSharedProps, type SettingsSectionSharedProps,
} from "./shared"; } from "./shared";
import { import { pluginSettingsStore, type PluginSettingsEntry } from "./pluginSettingsState.svelte";
pluginSettingsStore,
type PluginSettingsEntry,
} from "./pluginSettingsState.svelte";
import { toMountableComponent } from "@/types/mountableComponent";
let { let {
section, section,
@@ -56,8 +49,7 @@
const visiblePlugins = $derived( const visiblePlugins = $derived(
pluginSettingsStore.plugins.filter( pluginSettingsStore.plugins.filter(
(plugin) => (plugin) =>
(PLUGIN_SECTION_BY_ID[plugin.pluginId] ?? "features") === section && (PLUGIN_SECTION_BY_ID[plugin.pluginId] ?? "features") === section && pluginHit(plugin),
pluginHit(plugin),
), ),
); );
@@ -73,10 +65,15 @@
{#each visiblePlugins as plugin (plugin.pluginId)} {#each visiblePlugins as plugin (plugin.pluginId)}
{@const perfPaused = pluginPerfPaused(plugin.pluginId)} {@const perfPaused = pluginPerfPaused(plugin.pluginId)}
<SettingsCard class="{!(plugin as PluginSettingsEntry & { disableToggle?: boolean }).disableToggle && Object.keys(plugin.settings).length === 0 ? 'hidden' : ''} {perfPaused ? 'opacity-60' : ''}"> <SettingsCard
class="divide-y divide-zinc-200/60 dark:divide-zinc-700/40 {!plugin.disableToggle &&
Object.keys(plugin.settings).length === 0
? 'hidden'
: ''} {perfPaused ? 'opacity-60' : ''}"
>
{#if perfPaused} {#if perfPaused}
<div <div
class="flex justify-between items-center px-5 py-3 border-b border-amber-200/60 dark:border-amber-900/40 bg-amber-50/80 dark:bg-amber-950/20" class="flex justify-between items-center px-4 py-3 rounded-lg bg-amber-50/80 dark:bg-amber-950/20"
> >
<p class="text-sm text-amber-800 dark:text-amber-200"> <p class="text-sm text-amber-800 dark:text-amber-200">
Paused by Performance Mode — enable anyway Paused by Performance Mode — enable anyway
@@ -90,7 +87,11 @@
{/if} {/if}
{#if plugin.disableToggle} {#if plugin.disableToggle}
<div class="flex justify-between items-center px-4 py-3 {perfPaused ? 'pointer-events-none' : ''}"> <div
class="flex justify-between items-center px-4 py-3 {perfPaused
? 'pointer-events-none'
: ''}"
>
<div class="pr-4"> <div class="pr-4">
<h2 class="flex gap-2 items-center text-sm font-bold"> <h2 class="flex gap-2 items-center text-sm font-bold">
Enable {plugin.name} Enable {plugin.name}
@@ -106,7 +107,8 @@
</div> </div>
<div> <div>
<Switch <Switch
state={(pluginSettingsStore.values[plugin.pluginId]?.enabled as boolean | undefined) ?? true} state={(pluginSettingsStore.values[plugin.pluginId]?.enabled as boolean | undefined) ??
true}
onChange={async (value) => { onChange={async (value) => {
if (plugin.pluginId === "assessments-average" && value === true) { if (plugin.pluginId === "assessments-average" && value === true) {
showDisclaimer( showDisclaimer(
@@ -137,13 +139,15 @@
<div> <div>
{#if setting.type === "boolean"} {#if setting.type === "boolean"}
<Switch <Switch
state={(pluginSettingsStore.values[plugin.pluginId]?.[key] as boolean | undefined) ?? setting.default} state={(pluginSettingsStore.values[plugin.pluginId]?.[key] as
boolean | undefined) ?? setting.default}
onChange={(value) => pluginSettingsStore.update(plugin.pluginId, key, value)} onChange={(value) => pluginSettingsStore.update(plugin.pluginId, key, value)}
/> />
{:else if setting.type === "number"} {:else if setting.type === "number"}
<div class="w-28 shrink-0"> <div class="w-28 shrink-0">
<Slider <Slider
state={(pluginSettingsStore.values[plugin.pluginId]?.[key] as number | undefined) ?? setting.default} state={(pluginSettingsStore.values[plugin.pluginId]?.[key] as
number | undefined) ?? setting.default}
onChange={(value) => pluginSettingsStore.update(plugin.pluginId, key, value)} onChange={(value) => pluginSettingsStore.update(plugin.pluginId, key, value)}
min={setting.min} min={setting.min}
max={setting.max} max={setting.max}
@@ -154,13 +158,15 @@
<input <input
type="text" type="text"
class="px-2 py-1 text-sm rounded-md dark:bg-[#38373D]/50 bg-[#DDDDDD] dark:text-white border-none" class="px-2 py-1 text-sm rounded-md dark:bg-[#38373D]/50 bg-[#DDDDDD] dark:text-white border-none"
value={(pluginSettingsStore.values[plugin.pluginId]?.[key] as string | undefined) ?? setting.default} value={(pluginSettingsStore.values[plugin.pluginId]?.[key] as
string | undefined) ?? setting.default}
oninput={(e) => oninput={(e) =>
pluginSettingsStore.update(plugin.pluginId, key, e.currentTarget.value)} pluginSettingsStore.update(plugin.pluginId, key, e.currentTarget.value)}
/> />
{:else if setting.type === "select"} {:else if setting.type === "select"}
<Select <Select
value={(pluginSettingsStore.values[plugin.pluginId]?.[key] as string | undefined) ?? setting.default} value={(pluginSettingsStore.values[plugin.pluginId]?.[key] as
string | undefined) ?? setting.default}
onChange={(value) => pluginSettingsStore.update(plugin.pluginId, key, value)} onChange={(value) => pluginSettingsStore.update(plugin.pluginId, key, value)}
options={(setting.options as string[]).map((opt) => ({ options={(setting.options as string[]).map((opt) => ({
value: opt, value: opt,
@@ -171,7 +177,8 @@
<Button onClick={() => setting.trigger?.()} text={setting.title} /> <Button onClick={() => setting.trigger?.()} text={setting.title} />
{:else if setting.type === "hotkey"} {:else if setting.type === "hotkey"}
<HotkeyInput <HotkeyInput
value={(pluginSettingsStore.values[plugin.pluginId]?.[key] as string | undefined) ?? setting.default} value={(pluginSettingsStore.values[plugin.pluginId]?.[key] as
string | undefined) ?? setting.default}
onChange={(value) => pluginSettingsStore.update(plugin.pluginId, key, value)} onChange={(value) => pluginSettingsStore.update(plugin.pluginId, key, value)}
/> />
{:else if setting.type === "component" && setting.component} {:else if setting.type === "component" && setting.component}
@@ -183,18 +190,5 @@
{/if} {/if}
{/each} {/each}
{/if} {/if}
{#if plugin.pluginId === "global-search"}
<SettingRow
title="Theme of the Month"
description="Show the monthly featured theme popup when a new entry is available"
id={15}
Component={toMountableComponent(Switch)}
{searchQuery}
props={{
state: !($settingsState.themeOfTheMonthDisabled ?? false),
onChange: (isOn: boolean) => (settingsState.themeOfTheMonthDisabled = !isOn),
}}
/>
{/if}
</SettingsCard> </SettingsCard>
{/each} {/each}
@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import type { SettingsList } from "@/interface/types/SettingsProps"; import type { SettingsList } from "@/interface/types/settingsProps";
import { matchesSearch } from "./shared"; import { matchesSearch } from "./shared";
let { let {
@@ -6,16 +6,12 @@
import CloudHeader from "@/interface/components/store/CloudHeader.svelte"; import CloudHeader from "@/interface/components/store/CloudHeader.svelte";
import SettingRow from "../SettingRow.svelte"; import SettingRow from "../SettingRow.svelte";
import PluginSettingsBlocks from "../PluginSettingsBlocks.svelte"; import PluginSettingsBlocks from "../PluginSettingsBlocks.svelte";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { cloudAuth } from "@/seqta/utils/CloudAuth"; import { cloudAuth } from "@/seqta/utils/cloudAuth";
import { matchesSearch, type SettingsSectionSharedProps } from "../shared"; import { matchesSearch, type SettingsSectionSharedProps } from "../shared";
import { toMountableComponent } from "@/types/mountableComponent"; import { toMountableComponent } from "@/types/mountableComponent";
let { let { showDisclaimer, showCloudPanel, searchQuery = "" }: SettingsSectionSharedProps = $props();
showDisclaimer,
showCloudPanel,
searchQuery = "",
}: SettingsSectionSharedProps = $props();
let cloudState = $state(cloudAuth.state); let cloudState = $state(cloudAuth.state);
$effect(() => { $effect(() => {
@@ -102,9 +98,7 @@
{/if} {/if}
</div> </div>
{:else if showFounderBadgeSetting} {:else if showFounderBadgeSetting}
<div class="px-5 pb-4 text-sm text-zinc-600 dark:text-zinc-400"> <div class="px-5 pb-4 text-sm text-zinc-600 dark:text-zinc-400">Sign in to Cloud first.</div>
Sign in to Cloud first.
</div>
{/if} {/if}
</SettingsCard> </SettingsCard>
{/if} {/if}
@@ -2,9 +2,9 @@
import { delay } from "@/seqta/utils/delay"; import { delay } from "@/seqta/utils/delay";
import Switch from "@/interface/components/Switch.svelte"; import Switch from "@/interface/components/Switch.svelte";
import Button from "@/interface/components/Button.svelte"; import Button from "@/interface/components/Button.svelte";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { openTermsOfServicePopup } from "@/seqta/utils/openers/OpenTermsOfServicePopup"; import { openTermsOfServicePopup } from "@/seqta/utils/openers/openTermsOfServicePopup";
import { showThemeOfTheMonthPopupNow } from "@/seqta/utils/openers/OpenThemeOfTheMonthPopup"; import { showThemeOfTheMonthPopupNow } from "@/seqta/utils/openers/openThemeOfTheMonthPopup";
import { closeExtensionPopup } from "@/seqta/utils/closers/closeExtensionPopup"; import { closeExtensionPopup } from "@/seqta/utils/closers/closeExtensionPopup";
import { getSnapshotForUpload } from "@/seqta/utils/cloudSettingsSync"; import { getSnapshotForUpload } from "@/seqta/utils/cloudSettingsSync";
@@ -26,19 +26,7 @@
} }
</script> </script>
{#if $settingsState.devMode && matchesSearch( {#if $settingsState.devMode && matchesSearch(searchQuery, "Developer Mode", "Verbose logging", "Delay loading screen", "Sensitive Hider", "Mock Notices", "Show Privacy Notification", "Show Theme of the Month", "Export cloud settings JSON", "API Base URL", "GitHub latest version override")}
searchQuery,
"Developer Mode",
"Verbose logging",
"Delay loading screen",
"Sensitive Hider",
"Mock Notices",
"Show Privacy Notification",
"Show Theme of the Month",
"Export cloud settings JSON",
"API Base URL",
"GitHub latest version override",
)}
<div <div
class="flex-col p-1 my-1 bg-linear-to-br from-white rounded-xl border shadow-xs to-zinc-100 border-zinc-200/50 dark:border-zinc-700/40 dark:to-zinc-900/50 dark:from-zinc-900/40" class="flex-col p-1 my-1 bg-linear-to-br from-white rounded-xl border shadow-xs to-zinc-100 border-zinc-200/50 dark:border-zinc-700/40 dark:to-zinc-900/50 dark:from-zinc-900/40"
> >
@@ -6,10 +6,10 @@
import SidebarAppearance from "@/interface/components/SidebarAppearance.svelte"; import SidebarAppearance from "@/interface/components/SidebarAppearance.svelte";
import SettingRow from "../SettingRow.svelte"; import SettingRow from "../SettingRow.svelte";
import PluginSettingsBlocks from "../PluginSettingsBlocks.svelte"; import PluginSettingsBlocks from "../PluginSettingsBlocks.svelte";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { isSeqtaEngageExperience } from "@/seqta/utils/isSeqtaEngage"; import { isSeqtaEngageExperience } from "@/seqta/utils/isSeqtaEngage";
import { matchesSearch, type SettingsSectionSharedProps } from "../shared"; import { matchesSearch, type SettingsSectionSharedProps } from "../shared";
import type { SettingsList } from "@/interface/types/SettingsProps"; import type { SettingsList } from "@/interface/types/settingsProps";
let { let {
showColourPicker, showColourPicker,
@@ -21,26 +21,9 @@
const isEngage = isSeqtaEngageExperience(); const isEngage = isSeqtaEngageExperience();
</script> </script>
{#if matchesSearch(searchQuery, "Custom Theme Colour", "Interface Font", "Customise the overall theme colour of SEQTA Learn", "Choose the typeface used across SEQTA Learn")} {#if matchesSearch(searchQuery, "Custom Theme Colour", "Interface Font", "Theme of the Month", "Customise the overall theme colour of SEQTA Learn", "Choose the typeface used across SEQTA Learn", "Show the monthly featured theme popup when a new entry is available")}
<SettingsCard class="divide-y divide-zinc-200/60 dark:divide-zinc-700/40"> <SettingsCard class="divide-y divide-zinc-200/60 dark:divide-zinc-700/40">
{#each ( {#each [{ title: "Custom Theme Colour", description: "Customise the overall theme colour of SEQTA Learn", id: 4, Component: PickerSwatch, props: { onClick: showColourPicker } }, { title: "Interface Font", description: "Choose the typeface used across SEQTA Learn", id: 16, Component: Button, props: { onClick: showFontPicker, text: "Change" } }, { title: "Theme of the Month", description: "Show the monthly featured theme popup when a new entry is available", id: 15, Component: Switch, props: { state: !($settingsState.themeOfTheMonthDisabled ?? false), onChange: (isOn: boolean) => (settingsState.themeOfTheMonthDisabled = !isOn) } }] as unknown as SettingsList[] as option (option.id)}
[
{
title: "Custom Theme Colour",
description: "Customise the overall theme colour of SEQTA Learn",
id: 4,
Component: PickerSwatch,
props: { onClick: showColourPicker },
},
{
title: "Interface Font",
description: "Choose the typeface used across SEQTA Learn",
id: 16,
Component: Button,
props: { onClick: showFontPicker, text: "Change" },
},
] as unknown as SettingsList[]
) as option (option.id)}
<SettingRow {...option} {searchQuery} /> <SettingRow {...option} {searchQuery} />
{/each} {/each}
</SettingsCard> </SettingsCard>
@@ -50,7 +33,7 @@
<SidebarAppearance {searchQuery} /> <SidebarAppearance {searchQuery} />
{/if} {/if}
{#if matchesSearch(searchQuery, "Adaptive Theme Colour", "Soft Gradient", "Smooth colour transition")} {#if matchesSearch(searchQuery, "Adaptive Theme Colour", "Soft Gradient", "Smooth Colour Transition")}
<SettingsCard> <SettingsCard>
<div class="flex justify-between items-center px-4 py-3"> <div class="flex justify-between items-center px-4 py-3">
<div class="pr-4"> <div class="pr-4">
@@ -88,7 +71,7 @@
class="flex justify-between items-center px-4 py-3 pl-6 border-t border-zinc-100 dark:border-zinc-700/50" class="flex justify-between items-center px-4 py-3 pl-6 border-t border-zinc-100 dark:border-zinc-700/50"
> >
<div class="pr-4"> <div class="pr-4">
<h2 class="text-sm font-bold">Smooth colour transition</h2> <h2 class="text-sm font-bold">Smooth Colour Transition</h2>
<p class="text-xs text-zinc-600 dark:text-zinc-300"> <p class="text-xs text-zinc-600 dark:text-zinc-300">
Ease between class/subject colours when navigating instead of switching instantly Ease between class/subject colours when navigating instead of switching instantly
</p> </p>
@@ -4,7 +4,7 @@
import Button from "@/interface/components/Button.svelte"; import Button from "@/interface/components/Button.svelte";
import Select from "@/interface/components/Select.svelte"; import Select from "@/interface/components/Select.svelte";
import SettingRow from "../SettingRow.svelte"; import SettingRow from "../SettingRow.svelte";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { isSeqtaEngageExperience } from "@/seqta/utils/isSeqtaEngage"; import { isSeqtaEngageExperience } from "@/seqta/utils/isSeqtaEngage";
import { import {
PERFORMANCE_HEAVY_PLUGINS, PERFORMANCE_HEAVY_PLUGINS,
@@ -12,7 +12,7 @@
} from "@/seqta/utils/performanceMode"; } from "@/seqta/utils/performanceMode";
import browser from "@/lib/browser"; import browser from "@/lib/browser";
import { matchesSearch, type SettingsSectionSharedProps } from "../shared"; import { matchesSearch, type SettingsSectionSharedProps } from "../shared";
import type { SettingsList } from "@/interface/types/SettingsProps"; import type { SettingsList } from "@/interface/types/settingsProps";
import { isFeatureDisabled } from "@/seqta/utils/remoteStatus"; import { isFeatureDisabled } from "@/seqta/utils/remoteStatus";
let { searchQuery = "" }: SettingsSectionSharedProps = $props(); let { searchQuery = "" }: SettingsSectionSharedProps = $props();
@@ -160,12 +160,15 @@
{#each PERFORMANCE_HEAVY_PLUGINS as heavy (heavy.id)} {#each PERFORMANCE_HEAVY_PLUGINS as heavy (heavy.id)}
<div class="flex justify-between items-center gap-4"> <div class="flex justify-between items-center gap-4">
<div class="min-w-0"> <div class="min-w-0">
<p class="text-sm font-semibold text-zinc-800 dark:text-zinc-100">{heavy.name}</p> <p class="text-sm font-semibold text-zinc-800 dark:text-zinc-100">
{heavy.name}
</p>
<p class="text-xs text-zinc-500 dark:text-zinc-400">{heavy.description}</p> <p class="text-xs text-zinc-500 dark:text-zinc-400">{heavy.description}</p>
</div> </div>
<Switch <Switch
state={$settingsState.performanceModePluginOverrides?.[heavy.id] === true} state={$settingsState.performanceModePluginOverrides?.[heavy.id] === true}
onChange={(forceOn: boolean) => setPerformanceModePluginOverride(heavy.id, forceOn)} onChange={(forceOn: boolean) =>
setPerformanceModePluginOverride(heavy.id, forceOn)}
/> />
</div> </div>
{/each} {/each}
@@ -177,13 +180,7 @@
</SettingsCard> </SettingsCard>
{/if} {/if}
{#if matchesSearch( {#if matchesSearch(searchQuery, "Home Page Assessments", "Include Past Assessments", "Maximum Subjects", "Maximum Assessments per Subject")}
searchQuery,
"Home Page Assessments",
"Include Past Assessments",
"Maximum Subjects",
"Maximum Assessments per Subject",
)}
<SettingsCard> <SettingsCard>
<div class="flex justify-between items-center px-4 py-3"> <div class="flex justify-between items-center px-4 py-3">
<div class="pr-4"> <div class="pr-4">
@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import MotionDiv from '@/interface/components/MotionDiv.svelte'; import MotionDiv from '@/interface/components/MotionDiv.svelte';
import { settingsState } from "@/seqta/utils/listeners/SettingsState.ts" import { settingsState } from "@/seqta/utils/listeners/settingsState.ts"
import Switch from "@/interface/components/Switch.svelte" import Switch from "@/interface/components/Switch.svelte"
import Button from "@/interface/components/Button.svelte" import Button from "@/interface/components/Button.svelte"
import { onMount } from 'svelte'; import { onMount } from 'svelte';
+85 -59
View File
@@ -1,25 +1,29 @@
<script lang="ts"> <script lang="ts">
import { onMount } from 'svelte'; import { onMount } from "svelte";
import CoverSwiper from '../components/store/CoverSwiper.svelte';
import ThemeGrid from '../components/store/ThemeGrid.svelte';
import SkeletonLoader from '../components/SkeletonLoader.svelte';
import type { Theme } from '../types/Theme'
import { visibleStoreThemes, buildCoverSlidesForThemes, normalizeStoreTheme } from '@/interface/utils/themeStoreFlavours'
import browser from '@/lib/browser'
import ThemeModal from '../components/store/ThemeModal.svelte'
import { themeUpdates } from '../hooks/ThemeUpdates'
import { ThemeManager } from '@/plugins/built-in/themes/theme-manager'
import { loadBackground } from '@/seqta/ui/ImageBackgrounds' import CoverSwiper from "../components/store/CoverSwiper.svelte";
import Backgrounds from '../components/store/Backgrounds.svelte' import ThemeGrid from "../components/store/ThemeGrid.svelte";
import { cloudAuth } from '@/seqta/utils/CloudAuth' import SkeletonLoader from "../components/SkeletonLoader.svelte";
import SignInToFavoriteModal from '../components/SignInToFavoriteModal.svelte' import type { Theme } from "../types/theme";
import { getStoreInstalledThemeIds } from '@/interface/utils/themeListFilters' import {
import { consumePendingHighlightThemeId } from '@/seqta/utils/openThemeStoreWithHighlight' visibleStoreThemes,
buildCoverSlidesForThemes,
normalizeStoreTheme,
} from "@/interface/utils/themeStoreFlavours";
import browser from "@/lib/browser";
import ThemeModal from "../components/store/ThemeModal.svelte";
import { themeUpdates } from "../hooks/themeUpdates";
import { ThemeManager } from "@/plugins/built-in/themes/theme-manager";
import { loadBackground } from "@/seqta/ui/imageBackgrounds";
import Backgrounds from "../components/store/Backgrounds.svelte";
import { cloudAuth } from "@/seqta/utils/cloudAuth";
import SignInToFavoriteModal from "../components/SignInToFavoriteModal.svelte";
import { getStoreInstalledThemeIds } from "@/interface/utils/themeListFilters";
import { consumePendingHighlightThemeId } from "@/seqta/utils/openThemeStoreWithHighlight";
const themeManager = ThemeManager.getInstance(); const themeManager = ThemeManager.getInstance();
type StoreTab = 'themes' | 'backgrounds'; type StoreTab = "themes" | "backgrounds";
let { let {
activeTab, activeTab,
searchTerm, searchTerm,
@@ -38,7 +42,9 @@
let cloudLoggedIn = $state(cloudAuth.state.isLoggedIn); let cloudLoggedIn = $state(cloudAuth.state.isLoggedIn);
$effect(() => { $effect(() => {
const unsub = cloudAuth.subscribe((s) => { cloudLoggedIn = s.isLoggedIn; }); const unsub = cloudAuth.subscribe((s) => {
cloudLoggedIn = s.isLoggedIn;
});
return unsub; return unsub;
}); });
@@ -52,9 +58,9 @@
let loading = $state(true); let loading = $state(true);
let displayTheme = $state<Theme | null>(null); let displayTheme = $state<Theme | null>(null);
let currentThemes = $state<string[]>([]); let currentThemes = $state<string[]>([]);
let selectedThemeId = $state(''); let selectedThemeId = $state("");
let installedThemeColors = $state<Record<string, string>>({}); let installedThemeColors = $state<Record<string, string>>({});
let error = $state<string | null>(null); let error = $state<string | null>(null);
let fetchAttempt = $state(0); let fetchAttempt = $state(0);
let selectedBackground = $state<string | null>(null); let selectedBackground = $state<string | null>(null);
@@ -67,7 +73,15 @@
return Promise.race([ return Promise.race([
browser.runtime.sendMessage(message) as Promise<T>, browser.runtime.sendMessage(message) as Promise<T>,
new Promise<T>((_, reject) => { new Promise<T>((_, reject) => {
setTimeout(() => reject(new Error('Theme store request timed out — reload the SEQTA page after updating the extension.')), FETCH_MESSAGE_TIMEOUT_MS); setTimeout(
() =>
reject(
new Error(
"Theme store request timed out — reload the SEQTA page after updating the extension.",
),
),
FETCH_MESSAGE_TIMEOUT_MS,
);
}), }),
]); ]);
} }
@@ -75,7 +89,7 @@
const fetchCurrentThemes = async () => { const fetchCurrentThemes = async () => {
const themes = await themeManager.getAvailableThemes(); const themes = await themeManager.getAvailableThemes();
currentThemes = getStoreInstalledThemeIds(themes); currentThemes = getStoreInstalledThemeIds(themes);
selectedThemeId = themeManager.getSelectedThemeId() || ''; selectedThemeId = themeManager.getSelectedThemeId() || "";
installedThemeColors = Object.fromEntries( installedThemeColors = Object.fromEntries(
themes themes
.filter((theme) => theme != null && theme.installedFromStore === true) .filter((theme) => theme != null && theme.installedFromStore === true)
@@ -86,7 +100,7 @@
const setDisplayTheme = (theme: Theme | null) => { const setDisplayTheme = (theme: Theme | null) => {
displayTheme = theme; displayTheme = theme;
}; };
/** Featured themes first; within each group, newest by `created_at` (API: Unix seconds). */ /** Featured themes first; within each group, newest by `created_at` (API: Unix seconds). */
function compareStoreThemes(a: Theme, b: Theme): number { function compareStoreThemes(a: Theme, b: Theme): number {
const fa = a.featured === true ? 1 : 0; const fa = a.featured === true ? 1 : 0;
@@ -102,16 +116,20 @@
if (!cloudLoggedIn) return; if (!cloudLoggedIn) return;
const isFavorite = !theme.is_favorited; const isFavorite = !theme.is_favorited;
const result = (await browser.runtime.sendMessage({ const result = (await browser.runtime.sendMessage({
type: 'cloudFavorite', type: "cloudFavorite",
themeId: theme.id, themeId: theme.id,
action: isFavorite ? 'favorite' : 'unfavorite', action: isFavorite ? "favorite" : "unfavorite",
})) as { success?: boolean }; })) as { success?: boolean };
if (result?.success) { if (result?.success) {
const delta = isFavorite ? 1 : -1; const delta = isFavorite ? 1 : -1;
themes = themes.map((t) => themes = themes.map((t) =>
t.id === theme.id t.id === theme.id
? { ...t, is_favorited: isFavorite, favorite_count: Math.max(0, (t.favorite_count ?? 0) + delta) } ? {
: t ...t,
is_favorited: isFavorite,
favorite_count: Math.max(0, (t.favorite_count ?? 0) + delta),
}
: t,
); );
if (displayTheme?.id === theme.id) { if (displayTheme?.id === theme.id) {
displayTheme = { displayTheme = {
@@ -135,10 +153,10 @@
data?: { themes: unknown[] }; data?: { themes: unknown[] };
error?: string; error?: string;
}>({ }>({
type: 'fetchThemes', type: "fetchThemes",
}); });
if (!data?.success || !Array.isArray(data?.data?.themes)) { if (!data?.success || !Array.isArray(data?.data?.themes)) {
throw new Error(data?.error || 'Failed to fetch themes'); throw new Error(data?.error || "Failed to fetch themes");
} }
themes = data.data.themes themes = data.data.themes
.map((row) => normalizeStoreTheme(row as Record<string, unknown>)) .map((row) => normalizeStoreTheme(row as Record<string, unknown>))
@@ -147,13 +165,13 @@
error = null; error = null;
loading = false; loading = false;
} catch (err) { } catch (err) {
console.error('Failed to fetch themes', err); console.error("Failed to fetch themes", err);
fetchAttempt += 1; fetchAttempt += 1;
if (fetchAttempt >= MAX_FETCH_ATTEMPTS) { if (fetchAttempt >= MAX_FETCH_ATTEMPTS) {
error = error =
err instanceof Error err instanceof Error
? err.message ? err.message
: 'Could not load themes. Reload the SEQTA page, then open the store again.'; : "Could not load themes. Reload the SEQTA page, then open the store again.";
loading = false; loading = false;
return; return;
} }
@@ -162,24 +180,25 @@
}; };
function focusThemeById(themeId: string) { function focusThemeById(themeId: string) {
const match = themes.find((t) => t.id === themeId) const match =
?? themes.find((t) => t.flavours?.some((f) => f.id === themeId)); themes.find((t) => t.id === themeId) ??
themes.find((t) => t.flavours?.some((f) => f.id === themeId));
if (match) { if (match) {
setActiveTab('themes'); setActiveTab("themes");
setSearchTerm(''); setSearchTerm("");
displayTheme = match; displayTheme = match;
} }
} }
function onHighlightThemeEvent(e: Event) { function onHighlightThemeEvent(e: Event) {
const detail = (e as CustomEvent).detail; const detail = (e as CustomEvent).detail;
if (detail?.themeId && typeof detail.themeId === 'string') { if (detail?.themeId && typeof detail.themeId === "string") {
focusThemeById(detail.themeId); focusThemeById(detail.themeId);
} }
} }
onMount(() => { onMount(() => {
window.addEventListener('bsplus:highlight-theme', onHighlightThemeEvent); window.addEventListener("bsplus:highlight-theme", onHighlightThemeEvent);
themeUpdates.addListener(fetchCurrentThemes); themeUpdates.addListener(fetchCurrentThemes);
const load = async () => { const load = async () => {
@@ -196,7 +215,7 @@
} }
return () => { return () => {
window.removeEventListener('bsplus:highlight-theme', onHighlightThemeEvent); window.removeEventListener("bsplus:highlight-theme", onHighlightThemeEvent);
themeUpdates.removeListener(fetchCurrentThemes); themeUpdates.removeListener(fetchCurrentThemes);
}; };
}); });
@@ -205,8 +224,8 @@
let filteredThemes = $derived( let filteredThemes = $derived(
listThemes.filter((theme) => { listThemes.filter((theme) => {
const q = searchTerm.toLowerCase(); const q = searchTerm.toLowerCase();
const name = (theme.name ?? '').toLowerCase(); const name = (theme.name ?? "").toLowerCase();
const description = (theme.description ?? '').toLowerCase(); const description = (theme.description ?? "").toLowerCase();
return name.includes(q) || description.includes(q); return name.includes(q) || description.includes(q);
}), }),
); );
@@ -225,7 +244,9 @@
await themeManager.setTheme(themeId); await themeManager.setTheme(themeId);
themeUpdates.triggerUpdate(); themeUpdates.triggerUpdate();
await fetchCurrentThemes(); await fetchCurrentThemes();
void browser.runtime.sendMessage({ type: 'cloudSettingsRequestDebouncedUpload' }).catch(() => {}); void browser.runtime
.sendMessage({ type: "cloudSettingsRequestDebouncedUpload" })
.catch(() => {});
} }
async function removeThemeFromStore(themeId: string) { async function removeThemeFromStore(themeId: string) {
@@ -238,7 +259,9 @@
await themeManager.setTheme(themeId); await themeManager.setTheme(themeId);
selectedThemeId = themeId; selectedThemeId = themeId;
themeUpdates.triggerUpdate(); themeUpdates.triggerUpdate();
void browser.runtime.sendMessage({ type: 'cloudSettingsRequestDebouncedUpload' }).catch(() => {}); void browser.runtime
.sendMessage({ type: "cloudSettingsRequestDebouncedUpload" })
.catch(() => {});
} }
$effect(() => { $effect(() => {
@@ -265,10 +288,10 @@
</script> </script>
<div class="relative flex h-full min-h-0 flex-col overflow-hidden text-zinc-900 dark:text-white"> <div class="relative flex h-full min-h-0 flex-col overflow-hidden text-zinc-900 dark:text-white">
<main class="min-h-0 flex-1 overflow-y-auto bg-zinc-50/80 dark:bg-zinc-900/40"> <main class="min-h-0 flex-1 overflow-y-auto bg-zinc-50/80 dark:bg-zinc-900/40">
<div class={activeTab === 'backgrounds' ? 'h-full' : 'px-6 py-6 md:px-8 lg:px-10'}> <div class={activeTab === "backgrounds" ? "h-full" : "px-6 py-6 md:px-8 lg:px-10"}>
<!-- Loading State --> <!-- Loading State -->
{#if loading} {#if loading}
<div class="grid grid-cols-1 gap-4 py-12 mx-auto sm:grid-cols-2 lg:grid-cols-3"> <div class="grid grid-cols-1 gap-4 py-12 mx-auto sm:grid-cols-2 lg:grid-cols-3">
{#each Array(6) as _, i (i)} {#each Array(6) as _, i (i)}
<SkeletonLoader width="100%" height="200px" /> <SkeletonLoader width="100%" height="200px" />
@@ -276,10 +299,13 @@
</div> </div>
{:else if error} {:else if error}
<div class="flex flex-col items-center justify-center py-24 text-center max-w-lg mx-auto"> <div class="flex flex-col items-center justify-center py-24 text-center max-w-lg mx-auto">
<h2 class="text-2xl font-bold text-zinc-900 dark:text-zinc-100">Couldn&apos;t load themes</h2> <h2 class="text-2xl font-bold text-zinc-900 dark:text-zinc-100">
Couldn&apos;t load themes
</h2>
<p class="mt-3 text-zinc-600 dark:text-zinc-300">{error}</p> <p class="mt-3 text-zinc-600 dark:text-zinc-300">{error}</p>
<p class="mt-2 text-sm text-zinc-500 dark:text-zinc-400"> <p class="mt-2 text-sm text-zinc-500 dark:text-zinc-400">
After an extension update, reload your SEQTA tab so the new version can talk to the browser. After an extension update, reload your SEQTA tab so the new version can talk to the
browser.
</p> </p>
<button <button
type="button" type="button"
@@ -295,11 +321,11 @@
</div> </div>
{:else} {:else}
<!-- Themes Tab Content --> <!-- Themes Tab Content -->
{#if activeTab === 'themes'} {#if activeTab === "themes"}
{#if searchTerm === ''} {#if searchTerm === ""}
<CoverSwiper slides={coverSlides} {setDisplayTheme} /> <CoverSwiper slides={coverSlides} {setDisplayTheme} />
{/if} {/if}
<!-- ThemeGrid to display filtered themes --> <!-- ThemeGrid to display filtered themes -->
<ThemeGrid <ThemeGrid
themes={filteredThemes} themes={filteredThemes}
@@ -311,10 +337,10 @@
onRequestSignIn={() => (showSignInOverlay = true)} onRequestSignIn={() => (showSignInOverlay = true)}
installedThemeIds={currentThemes} installedThemeIds={currentThemes}
/> />
{#if displayTheme} {#if displayTheme}
<ThemeModal <ThemeModal
currentThemes={currentThemes} {currentThemes}
allThemes={listThemes} allThemes={listThemes}
allStoreThemeRows={themes} allStoreThemeRows={themes}
theme={displayTheme} theme={displayTheme}
@@ -329,7 +355,7 @@
if (displayTheme) await installThemeFromStore(themeId, displayTheme); if (displayTheme) await installThemeFromStore(themeId, displayTheme);
}} }}
onRemove={async (themeId: string) => { onRemove={async (themeId: string) => {
console.debug('deleting theme', themeId); console.debug("deleting theme", themeId);
await removeThemeFromStore(themeId); await removeThemeFromStore(themeId);
}} }}
onApply={async (themeId: string) => { onApply={async (themeId: string) => {
@@ -337,16 +363,16 @@
}} }}
/> />
{/if} {/if}
{:else if activeTab === 'backgrounds'} {:else if activeTab === "backgrounds"}
<Backgrounds <Backgrounds
{searchTerm} {searchTerm}
selectedCategory={selectedBackgroundCategory} selectedCategory={selectedBackgroundCategory}
onCategoriesChange={setBackgroundCategories} onCategoriesChange={setBackgroundCategories}
/> />
{/if} {/if}
{/if} {/if}
</div> </div>
</main> </main>
{#if showSignInOverlay} {#if showSignInOverlay}
<SignInToFavoriteModal onClose={() => (showSignInOverlay = false)} /> <SignInToFavoriteModal onClose={() => (showSignInOverlay = false)} />
+10 -10
View File
@@ -6,9 +6,9 @@
import { import {
type LoadedCustomTheme, type LoadedCustomTheme,
shouldForceThemeAppearance, shouldForceThemeAppearance,
} from '@/types/CustomThemes' } from '@/types/customThemes'
import { settingsState } from '@/seqta/utils/listeners/SettingsState' import { settingsState } from '@/seqta/utils/listeners/settingsState'
import Divider from '@/interface/components/themeCreator/divider.svelte' import Divider from '@/interface/components/themeCreator/divider.svelte'
import Switch from '@/interface/components/Switch.svelte' import Switch from '@/interface/components/Switch.svelte'
@@ -23,16 +23,16 @@
handleImageVariableChange, handleImageVariableChange,
} from '../utils/themeImageHandlers'; } from '../utils/themeImageHandlers';
import { ThemeManager } from '@/plugins/built-in/themes/theme-manager' import { ThemeManager } from '@/plugins/built-in/themes/theme-manager'
import { themeUpdates } from '../hooks/ThemeUpdates' import { themeUpdates } from '../hooks/themeUpdates'
import { CloseThemeCreator } from '@/plugins/built-in/themes/ThemeCreator' import { closeThemeCreator } from '@/plugins/built-in/themes/themeCreator'
import { submitLocalThemeToCommunity } from '@/seqta/utils/customThemes/submitLocalTheme' import { submitLocalThemeToCommunity } from '@/seqta/utils/customThemes/submitLocalTheme'
import { formatCustomThemeApiError } from '@/seqta/utils/customThemes/apiErrors' import { formatCustomThemeApiError } from '@/seqta/utils/customThemes/apiErrors'
import { cloudAuth } from '@/seqta/utils/CloudAuth' import { cloudAuth } from '@/seqta/utils/cloudAuth'
import LucideMoon from '@/interface/components/icons/LucideMoon.svelte' import LucideMoon from '@/interface/components/icons/LucideMoon.svelte'
import LucideSun from '@/interface/components/icons/LucideSun.svelte' import LucideSun from '@/interface/components/icons/LucideSun.svelte'
import SidebarAppearance from '@/interface/components/SidebarAppearance.svelte' import SidebarAppearance from '@/interface/components/SidebarAppearance.svelte'
import { FONT_PRESETS, DEFAULT_FONT_ID } from '@/seqta/ui/fonts/presets' import { FONT_PRESETS, DEFAULT_FONT_ID } from '@/seqta/ui/fonts/presets'
import { applySelectedFont, ensureFontPickerFontsLoaded } from '@/seqta/ui/fonts/Manager' import { applySelectedFont, ensureFontPickerFontsLoaded } from '@/seqta/ui/fonts/fontManager'
import { import {
applySidebarSettings, applySidebarSettings,
defaultThemeCreatorMeta, defaultThemeCreatorMeta,
@@ -41,7 +41,7 @@
} from '@/interface/utils/themeCreatorMeta' } from '@/interface/utils/themeCreatorMeta'
import { ensureThemeCoverImage } from '@/interface/utils/themePlaceholderCover' import { ensureThemeCoverImage } from '@/interface/utils/themePlaceholderCover'
import ThemeBlobImage from '@/interface/components/themes/ThemeBlobImage.svelte' import ThemeBlobImage from '@/interface/components/themes/ThemeBlobImage.svelte'
import type { ThemeCreatorMeta } from '@/types/CustomThemes' import type { ThemeCreatorMeta } from '@/types/customThemes'
const { themeID }: { themeID: string } = $props() const { themeID }: { themeID: string } = $props()
const themeManager = ThemeManager.getInstance(); const themeManager = ThemeManager.getInstance();
@@ -242,7 +242,7 @@
await themeManager.saveTheme(themeClone); await themeManager.saveTheme(themeClone);
await themeManager.setTheme(themeClone.id); await themeManager.setTheme(themeClone.id);
themeUpdates.triggerUpdate(); themeUpdates.triggerUpdate();
await CloseThemeCreator({ restoreTheme: false }); await closeThemeCreator({ restoreTheme: false });
} }
async function submitThemeToCommunity() { async function submitThemeToCommunity() {
@@ -263,7 +263,7 @@
await themeManager.setTheme(themeClone.id); await themeManager.setTheme(themeClone.id);
await submitLocalThemeToCommunity(themeClone, theme.description?.trim() || undefined); await submitLocalThemeToCommunity(themeClone, theme.description?.trim() || undefined);
themeUpdates.triggerUpdate(); themeUpdates.triggerUpdate();
await CloseThemeCreator({ restoreTheme: false }); await closeThemeCreator({ restoreTheme: false });
} catch (err) { } catch (err) {
communityError = formatCustomThemeApiError(err); communityError = formatCustomThemeApiError(err);
} finally { } finally {
@@ -443,7 +443,7 @@
type="button" type="button"
class="rounded-lg p-2 text-zinc-500 transition hover:bg-zinc-200 dark:hover:bg-zinc-700" class="rounded-lg p-2 text-zinc-500 transition hover:bg-zinc-200 dark:hover:bg-zinc-700"
aria-label="Close theme creator" aria-label="Close theme creator"
onclick={() => void CloseThemeCreator()} onclick={() => void closeThemeCreator()}
> >
✕ ✕
</button> </button>
File renamed without changes.
File renamed without changes.
-67
View File
@@ -1,67 +0,0 @@
import { settingsState } from "@/seqta/utils/listeners/SettingsState";
const THEME_CSS_VARS = [
"--better-main",
"--better-pale",
"--better-light",
"--text-color",
"--background-primary",
"--background-secondary",
"--theme-primary",
"--theme-secondary",
"--text-primary",
"--theme-offset-bg",
"--better-sub",
] as const;
const ACCENT_CSS_VARS = [
"--better-main",
"--accent-color-value",
"--accentColor",
"--colour-betterseqta-blue",
] as const;
function extractSolidColor(value: string): string | null {
const trimmed = value.trim();
if (!trimmed || trimmed === "initial") return null;
if (trimmed.startsWith("#") || trimmed.startsWith("rgb") || trimmed.startsWith("hsl")) {
return trimmed;
}
if (trimmed.includes("gradient")) {
const match = trimmed.match(/#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{3}|rgba?\([^)]+\)/i);
return match?.[0] ?? null;
}
return null;
}
function resolvePageAccentColor(): string {
const computed = getComputedStyle(document.documentElement);
for (const name of ACCENT_CSS_VARS) {
const solid = extractSolidColor(computed.getPropertyValue(name));
if (solid) return solid;
}
const fromSettings = settingsState.selectedColor?.trim();
if (fromSettings) {
const solid = extractSolidColor(fromSettings);
if (solid) return solid;
}
return "#007bff";
}
/** Copy SEQTA page theme tokens onto a portaled UI root (matches analytics sync). */
export function syncPageThemeToElement(target: HTMLElement): void {
const computed = getComputedStyle(document.documentElement);
for (const name of THEME_CSS_VARS) {
const value = computed.getPropertyValue(name).trim();
if (value) {
target.style.setProperty(name, value);
}
}
const accent = resolvePageAccentColor();
target.style.setProperty("--bsplus-analytics-accent", accent);
target.style.setProperty("--better-main", accent);
target.classList.toggle("dark", document.documentElement.classList.contains("dark"));
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { DEFAULT_FONT_ID, getFontPreset, type FontPreset } from "@/seqta/ui/fonts/presets"; import { DEFAULT_FONT_ID, getFontPreset, type FontPreset } from "@/seqta/ui/fonts/presets";
import type { LoadedCustomTheme } from "@/types/CustomThemes"; import type { LoadedCustomTheme } from "@/types/customThemes";
export type ThemeBuilderDraft = { export type ThemeBuilderDraft = {
name: string; name: string;
+3 -3
View File
@@ -1,8 +1,8 @@
import { buildThemeBuilderCss } from "@/interface/utils/themeBuilderDraft"; import { buildThemeBuilderCss } from "@/interface/utils/themeBuilderDraft";
import { applySelectedFont } from "@/seqta/ui/fonts/Manager"; import { applySelectedFont } from "@/seqta/ui/fonts/fontManager";
import { DEFAULT_FONT_ID, getFontPreset } from "@/seqta/ui/fonts/presets"; import { DEFAULT_FONT_ID, getFontPreset } from "@/seqta/ui/fonts/presets";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import type { LoadedCustomTheme, ThemeCreatorMeta } from "@/types/CustomThemes"; import type { LoadedCustomTheme, ThemeCreatorMeta } from "@/types/customThemes";
export type ThemeCreatorSidebarMeta = { export type ThemeCreatorSidebarMeta = {
sidebarStyle?: string; sidebarStyle?: string;
+1 -1
View File
@@ -1,4 +1,4 @@
import type { LoadedCustomTheme } from "@/types/CustomThemes"; import type { LoadedCustomTheme } from "@/types/customThemes";
export function handleImageUpload(event: Event, theme: LoadedCustomTheme): LoadedCustomTheme { export function handleImageUpload(event: Event, theme: LoadedCustomTheme): LoadedCustomTheme {
const input = event.target as HTMLInputElement; const input = event.target as HTMLInputElement;
+2 -2
View File
@@ -1,5 +1,5 @@
import type { CustomTheme } from "@/types/CustomThemes"; import type { CustomTheme } from "@/types/customThemes";
import type { Theme } from "@/interface/types/Theme"; import type { Theme } from "@/interface/types/theme";
import { import {
getThemeApplyButtonStyles, getThemeApplyButtonStyles,
getCommunityInstalledThemeIds, getCommunityInstalledThemeIds,
+2 -2
View File
@@ -1,5 +1,5 @@
import type { CustomTheme } from "@/types/CustomThemes"; import type { CustomTheme } from "@/types/customThemes";
import type { Theme } from "@/interface/types/Theme"; import type { Theme } from "@/interface/types/theme";
import { parseCssColor } from "@/seqta/ui/colors/parseCssColor"; import { parseCssColor } from "@/seqta/ui/colors/parseCssColor";
const DEFAULT_THEME_ACCENT = "rgba(0, 123, 255, 1)"; const DEFAULT_THEME_ACCENT = "rgba(0, 123, 255, 1)";
+1 -1
View File
@@ -1,4 +1,4 @@
import type { LoadedCustomTheme } from "@/types/CustomThemes"; import type { LoadedCustomTheme } from "@/types/customThemes";
/** SVG cover used when a theme has no store/community cover image. */ /** SVG cover used when a theme has no store/community cover image. */
export function createDefaultThemeCoverSvg(accentHint = "#52525b"): string { export function createDefaultThemeCoverSvg(accentHint = "#52525b"): string {
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Theme, ThemeCoverSlide, ThemeFlavour } from "@/interface/types/Theme"; import type { Theme, ThemeCoverSlide, ThemeFlavour } from "@/interface/types/theme";
export function isHiddenStoreTheme(theme: Theme): boolean { export function isHiddenStoreTheme(theme: Theme): boolean {
return theme.theme_role === "slave"; return theme.theme_role === "slave";
+3 -3
View File
@@ -3,14 +3,14 @@ import { resolveExtensionAssetUrl } from "./extensionAssetUrl";
describe("resolveExtensionAssetUrl", () => { describe("resolveExtensionAssetUrl", () => {
it("returns already-resolved extension URLs unchanged", () => { it("returns already-resolved extension URLs unchanged", () => {
const url = "chrome-extension://abc/assets/IconFamily-B8lopphU.woff"; const url = "chrome-extension://abc/assets/icon-48-B8lopphU.png";
expect(resolveExtensionAssetUrl(url)).toBe(url); expect(resolveExtensionAssetUrl(url)).toBe(url);
}); });
it("repairs accidental double extension URL prefix", () => { it("repairs accidental double extension URL prefix", () => {
const doubled = "chrome-extension://abc/chrome-extension://abc/assets/IconFamily-B8lopphU.woff"; const doubled = "chrome-extension://abc/chrome-extension://abc/assets/icon-48-B8lopphU.png";
expect(resolveExtensionAssetUrl(doubled)).toBe( expect(resolveExtensionAssetUrl(doubled)).toBe(
"chrome-extension://abc/assets/IconFamily-B8lopphU.woff", "chrome-extension://abc/assets/icon-48-B8lopphU.png",
); );
}); });
}); });
@@ -7,7 +7,7 @@
getThermoscorePercent, getThermoscorePercent,
readStoredList, readStoredList,
} from "./utils"; } from "./utils";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { isSeqtaEngageExperience } from "@/seqta/utils/isSeqtaEngage"; import { isSeqtaEngageExperience } from "@/seqta/utils/isSeqtaEngage";
import { buildEngageAssessmentPagePath } from "@/seqta/utils/engageAssessmentStudent"; import { buildEngageAssessmentPagePath } from "@/seqta/utils/engageAssessmentStudent";
import OverviewIcon from "./OverviewIcon.svelte"; import OverviewIcon from "./OverviewIcon.svelte";
@@ -12,7 +12,7 @@ interface PrefItem {
} }
import { getUserInfo } from "@/seqta/utils/userInfo"; import { getUserInfo } from "@/seqta/utils/userInfo";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { getMockAssessmentsData } from "@/seqta/ui/dev/hideSensitiveContent"; import { getMockAssessmentsData } from "@/seqta/ui/dev/hideSensitiveContent";
import { isSeqtaEngageExperience } from "@/seqta/utils/isSeqtaEngage"; import { isSeqtaEngageExperience } from "@/seqta/utils/isSeqtaEngage";
import { getEngageAssessmentsData } from "./engageApi"; import { getEngageAssessmentsData } from "./engageApi";
@@ -45,6 +45,12 @@
} }
} }
.bsplus-overview-static,
.bsplus-overview-static * {
animation: none !important;
transition: none !important;
}
.bsplus-overview-delay-1 { .bsplus-overview-delay-1 {
animation-delay: 80ms; animation-delay: 80ms;
} }
@@ -150,10 +156,9 @@
color: var(--bsplus-overview-text); color: var(--bsplus-overview-text);
} }
.filter-select:focus { .filter-select:focus-visible {
outline: none; outline: var(--bsplus-focus-ring) !important;
border-color: var(--bsplus-overview-accent); outline-offset: 2px;
box-shadow: 0 0 0 3px color-mix(in srgb, var(--bsplus-overview-accent) 22%, transparent);
} }
.filter-select:hover { .filter-select:hover {
@@ -365,7 +370,8 @@
} }
.menu-button:focus-visible { .menu-button:focus-visible {
box-shadow: 0 0 0 2px color-mix(in srgb, var(--bsplus-overview-accent) 35%, transparent) !important; outline: var(--bsplus-focus-ring) !important;
outline-offset: 2px;
} }
.menu-dropdown { .menu-dropdown {
+7 -57
View File
@@ -1,11 +1,12 @@
import renderSvelte from "@/interface/main"; import renderSvelte from "@/interface/main";
import { getAssessmentsData } from "./api"; import { getAssessmentsData } from "./api";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import AssessmentsOverview from "./AssessmentsOverview.svelte"; import AssessmentsOverview from "./AssessmentsOverview.svelte";
import SkeletonLoader from "./SkeletonLoader.svelte"; import SkeletonLoader from "./SkeletonLoader.svelte";
import ErrorState from "./ErrorState.svelte"; import ErrorState from "./ErrorState.svelte";
import { unmount } from "svelte"; import { unmount } from "svelte";
import { toMountableComponent } from "@/types/mountableComponent"; import { toMountableComponent } from "@/types/mountableComponent";
import { copyPageTheme, resolvePageAccentColor } from "@/seqta/ui/colors/pageTheme";
let currentApp: ReturnType<typeof renderSvelte> | null = null; let currentApp: ReturnType<typeof renderSvelte> | null = null;
let themeObserver: MutationObserver | null = null; let themeObserver: MutationObserver | null = null;
@@ -14,69 +15,17 @@ type ThemeSettingKey =
| "DarkMode" | "DarkMode"
| "adaptiveThemeColour" | "adaptiveThemeColour"
| "adaptiveThemeGradient" | "adaptiveThemeGradient"
| "selectedTheme"; | "selectedTheme"
| "animations";
let themeListeners: Array<{ key: ThemeSettingKey; listener: () => void }> = []; let themeListeners: Array<{ key: ThemeSettingKey; listener: () => void }> = [];
const THEME_CSS_VARS = [
"--better-main",
"--better-pale",
"--better-light",
"--text-color",
"--background-primary",
"--background-secondary",
"--text-primary",
"--theme-offset-bg",
"--better-sub",
] as const;
const ACCENT_CSS_VARS = [
"--better-main",
"--accent-color-value",
"--accentColor",
"--colour-betterseqta-blue",
] as const;
function extractSolidColor(value: string): string | null {
const trimmed = value.trim();
if (!trimmed || trimmed === "initial") return null;
if (trimmed.startsWith("#") || trimmed.startsWith("rgb") || trimmed.startsWith("hsl")) {
return trimmed;
}
if (trimmed.includes("gradient")) {
const match = trimmed.match(/#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{3}|rgba?\([^)]+\)/i);
return match?.[0] ?? null;
}
return null;
}
function resolvePageAccentColor(): string {
const computed = getComputedStyle(document.documentElement);
for (const name of ACCENT_CSS_VARS) {
const solid = extractSolidColor(computed.getPropertyValue(name));
if (solid) return solid;
}
const fromSettings = settingsState.selectedColor?.trim();
if (fromSettings) {
const solid = extractSolidColor(fromSettings);
if (solid) return solid;
}
return "#007bff";
}
function syncOverviewTheme(target: HTMLElement) { function syncOverviewTheme(target: HTMLElement) {
const computed = getComputedStyle(document.documentElement); copyPageTheme(target);
for (const name of THEME_CSS_VARS) {
const value =
document.documentElement.style.getPropertyValue(name).trim() ||
computed.getPropertyValue(name).trim();
if (value) target.style.setProperty(name, value);
}
const accent = resolvePageAccentColor(); const accent = resolvePageAccentColor();
target.style.setProperty("--bsplus-overview-accent", accent); target.style.setProperty("--bsplus-overview-accent", accent);
target.style.setProperty("--better-main", accent); target.style.setProperty("--better-main", accent);
target.classList.toggle("dark", document.documentElement.classList.contains("dark")); target.classList.toggle("bsplus-overview-static", !settingsState.animations);
} }
function watchOverviewTheme(root: HTMLElement) { function watchOverviewTheme(root: HTMLElement) {
@@ -92,6 +41,7 @@ function watchOverviewTheme(root: HTMLElement) {
"adaptiveThemeColour", "adaptiveThemeColour",
"adaptiveThemeGradient", "adaptiveThemeGradient",
"selectedTheme", "selectedTheme",
"animations",
] satisfies ThemeSettingKey[]) { ] satisfies ThemeSettingKey[]) {
settingsState.register(key, listener); settingsState.register(key, listener);
themeListeners.push({ key, listener }); themeListeners.push({ key, listener });
@@ -129,24 +129,6 @@ export function filterAssessmentsForActiveSubjects<T extends Record<string, unkn
); );
} }
/** Active subjects that have at least one assessment in the given list. */
export function subjectsWithUpcomingAssessments(
assessments: Record<string, unknown>[],
activeSubjects: OverviewSubject[],
): OverviewSubject[] {
const result: OverviewSubject[] = [];
const seen = new Set<string>();
for (const assessment of assessments) {
const subject = activeSubjectForAssessment(assessment, activeSubjects);
if (!subject || seen.has(subject.code)) continue;
seen.add(subject.code);
result.push(subject);
}
return result;
}
export function formatDate(dateStr: string, submitted?: boolean): string { export function formatDate(dateStr: string, submitted?: boolean): string {
const d = new Date(dateStr); const d = new Date(dateStr);
const now = new Date(); const now = new Date();
@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { onMount, tick } from 'svelte'; import { onMount, tick } from 'svelte';
import { settingsState } from '@/seqta/utils/listeners/SettingsState' import { settingsState } from '@/seqta/utils/listeners/settingsState'
import { fade, scale } from 'svelte/transition'; import { fade, scale } from 'svelte/transition';
import { circOut, quintOut } from 'svelte/easing'; import { circOut, quintOut } from 'svelte/easing';
import { type StaticCommandItem } from '../core/commands'; import { type StaticCommandItem } from '../core/commands';
@@ -1,6 +1,6 @@
import type { HomeTimetableLesson } from "@/seqta/utils/loaders/homePageTypes"; import type { HomeTimetableLesson } from "@/seqta/utils/loaders/homePageTypes";
import { settingsState } from "@/seqta/utils/listeners/SettingsState"; import { settingsState } from "@/seqta/utils/listeners/settingsState";
import { loadHomePage } from "@/seqta/utils/loaders/LoadHomePage"; import { loadHomePage } from "@/seqta/utils/loaders/loadHomePage";
import { waitForElm } from "@/seqta/utils/waitForElm"; import { waitForElm } from "@/seqta/utils/waitForElm";
export interface BaseCommandItem { export interface BaseCommandItem {
@@ -29,7 +29,7 @@ const globalSearchPlugin: Pick<Plugin<GlobalSearchSettings>, "run"> = {
const wasUpdated = await checkAndHandleUpdate(); const wasUpdated = await checkAndHandleUpdate();
if (wasUpdated) { if (wasUpdated) {
verboseLog( verboseLog(
"[Global Search] Extension updated — search index reset; the next indexing pass will repopulate.", "[BetterSEQTA+] Global Search: Extension updated — search index reset; the next indexing pass will repopulate.",
); );
} }
} catch (error: unknown) { } catch (error: unknown) {
@@ -40,18 +40,18 @@ const globalSearchPlugin: Pick<Plugin<GlobalSearchSettings>, "run"> = {
msg.includes("NS_ERROR_CORRUPTED_CONTENT") msg.includes("NS_ERROR_CORRUPTED_CONTENT")
) { ) {
verboseDebug( verboseDebug(
"[Global Search] Version check skipped due to asset loading restrictions:", "[BetterSEQTA+] Global Search: Version check skipped due to asset loading restrictions:",
msg, msg,
); );
} else { } else {
console.warn("[Global Search] Failed to check for updates:", error); console.warn("[BetterSEQTA+] Global Search: Failed to check for updates:", error);
} }
} }
try { try {
await ensureSchemaCurrent(); await ensureSchemaCurrent();
} catch (error) { } catch (error) {
console.warn("[Global Search] Schema check failed:", error); console.warn("[BetterSEQTA+] Global Search: Schema check failed:", error);
} }
try { try {
@@ -77,7 +77,7 @@ const globalSearchPlugin: Pick<Plugin<GlobalSearchSettings>, "run"> = {
try { try {
installPassiveObserver(); installPassiveObserver();
} catch (error) { } catch (error) {
console.warn("[Global Search] Passive observer install failed:", error); console.warn("[BetterSEQTA+] Global Search: Passive observer install failed:", error);
} }
} }
@@ -60,7 +60,11 @@
justify-content: center; justify-content: center;
flex: none; flex: none;
height: 32px; height: 32px;
border-radius: 0; border: 1px solid rgba(0, 0, 0, 0.1) !important;
border-bottom: none;
border-radius: 8px 8px 0 0;
background-color: rgba(248, 250, 252, 0.94) !important;
color: #555 !important;
cursor: pointer; cursor: pointer;
transition: transition:
background-color 0.2s ease, background-color 0.2s ease,
@@ -71,10 +75,12 @@
user-select: none; user-select: none;
svg { svg {
color: #555;
opacity: 0.8; opacity: 0.8;
} }
p { p {
color: #555 !important;
display: flex; display: flex;
align-self: stretch; align-self: stretch;
align-items: center; align-items: center;
@@ -85,23 +91,6 @@
} }
} }
/* Light mode chip */
.search-trigger {
border: 1px solid rgba(0, 0, 0, 0.1) !important;
border-bottom: none;
border-radius: 8px 8px 0 0;
background-color: rgba(248, 250, 252, 0.94) !important;
color: #555 !important;
p {
color: #555 !important;
}
svg {
color: #555;
}
}
.dark .search-trigger { .dark .search-trigger {
border: 1px solid rgba(255, 255, 255, 0.1) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important;
border-bottom: none; border-bottom: none;
@@ -76,7 +76,7 @@ function cloneAssessmentActionItem(item: IndexItem & { metadata: AssessmentMetad
return { itemClone, metadata: itemClone.metadata || {} }; return { itemClone, metadata: itemClone.metadata || {} };
} catch (e) { } catch (e) {
console.warn( console.warn(
"[Assessment Action] Failed to clone item, trying to clone metadata separately:", "[BetterSEQTA+] Assessment Action: Failed to clone item, trying to clone metadata separately:",
e, e,
); );
try { try {
@@ -89,7 +89,10 @@ function cloneAssessmentActionItem(item: IndexItem & { metadata: AssessmentMetad
metadata, metadata,
}; };
} catch (e2) { } catch (e2) {
console.warn("[Assessment Action] Failed to clone metadata, using direct access:", e2); console.warn(
"[BetterSEQTA+] Assessment Action: Failed to clone metadata, using direct access:",
e2,
);
const metadata = item.metadata || ({} as AssessmentMetadata); const metadata = item.metadata || ({} as AssessmentMetadata);
return { itemClone: item, metadata }; return { itemClone: item, metadata };
} }
@@ -124,7 +127,7 @@ function createMetadataValueReader(metadata: AssessmentMetadata) {
} }
return undefined; return undefined;
} catch (e) { } catch (e) {
console.warn(`[Assessment Action] Failed to access metadata.${key}:`, e); console.warn(`[BetterSEQTA+] Assessment Action: Failed to access metadata.${key}:`, e);
return undefined; return undefined;
} }
}; };
@@ -161,7 +164,10 @@ async function runAssessmentSearchAction(item: IndexItem & { metadata: Assessmen
) { ) {
const extractedId = itemClone.id.replace("assignment-", ""); const extractedId = itemClone.id.replace("assignment-", "");
assessmentId = Number(extractedId) || extractedId; assessmentId = Number(extractedId) || extractedId;
verboseLog("[Assessment Action] Extracted assessmentId from item ID:", assessmentId); verboseLog(
"[BetterSEQTA+] Assessment Action: Extracted assessmentId from item ID:",
assessmentId,
);
} }
programmeId = coerceNumericMetadataId(programmeId); programmeId = coerceNumericMetadataId(programmeId);
@@ -174,12 +180,12 @@ async function runAssessmentSearchAction(item: IndexItem & { metadata: Assessmen
if (hasProgrammeId && hasMetaclassId && hasAssessmentId) { if (hasProgrammeId && hasMetaclassId && hasAssessmentId) {
const url = `#?page=/assessments/${programmeId}:${metaclassId}&item=${assessmentId}`; const url = `#?page=/assessments/${programmeId}:${metaclassId}&item=${assessmentId}`;
verboseLog("[Assessment Action] ✅ Navigating to:", url); verboseLog("[BetterSEQTA+] Assessment Action: ✅ Navigating to:", url);
window.location.hash = url; window.location.hash = url;
return; return;
} }
console.error("[Assessment Action] ❌ Missing required metadata:", { console.error("[BetterSEQTA+] Assessment Action: ❌ Missing required metadata:", {
programmeId, programmeId,
metaclassId, metaclassId,
assessmentId, assessmentId,
@@ -194,7 +200,9 @@ async function runAssessmentSearchAction(item: IndexItem & { metadata: Assessmen
if (hasAssessmentId) { if (hasAssessmentId) {
window.location.hash = `#?page=/assessments/upcoming&item=${assessmentId}`; window.location.hash = `#?page=/assessments/upcoming&item=${assessmentId}`;
} else { } else {
console.warn("[Assessment Action] No valid assessment ID, redirecting to upcoming"); console.warn(
"[BetterSEQTA+] Assessment Action: No valid assessment ID, redirecting to upcoming",
);
window.location.hash = `#?page=/assessments/upcoming`; window.location.hash = `#?page=/assessments/upcoming`;
} }
} }
@@ -264,7 +264,7 @@ export async function seqtaFetchJson<T = unknown>(
if (json.status && json.status !== "200") { if (json.status && json.status !== "200") {
console.warn( console.warn(
`[Global Search API] Non-200 SEQTA status "${json.status}" for ${route} — returning payload anyway`, `[BetterSEQTA+] Global Search API: Non-200 SEQTA status "${json.status}" for ${route} — returning payload anyway`,
); );
} }
@@ -302,7 +302,10 @@ export async function seqtaFetchPayload<T = unknown>(
const res = await seqtaFetchJson<T>(path, body, options); const res = await seqtaFetchJson<T>(path, body, options);
return res.payload ?? null; return res.payload ?? null;
} catch (e) { } catch (e) {
console.warn(`[Global Search API] Request to ${normalizeSeqtaPath(path)} failed:`, e); console.warn(
`[BetterSEQTA+] Global Search API: Request to ${normalizeSeqtaPath(path)} failed:`,
e,
);
return null; return null;
} }
} }
@@ -86,7 +86,7 @@ function deleteDatabaseWithRetries(name: string, maxAttempts = 6): Promise<void>
try { try {
req = indexedDB.deleteDatabase(name); req = indexedDB.deleteDatabase(name);
} catch (error) { } catch (error) {
console.warn(`[DB] Could not start delete of ${name}:`, error); console.warn(`[BetterSEQTA+] DB: Could not start delete of ${name}:`, error);
resolve(); resolve();
return; return;
} }
@@ -94,7 +94,7 @@ function deleteDatabaseWithRetries(name: string, maxAttempts = 6): Promise<void>
req.onsuccess = () => resolve(); req.onsuccess = () => resolve();
req.onerror = () => { req.onerror = () => {
console.warn(`[DB] Error deleting ${name}:`, req.error); console.warn(`[BetterSEQTA+] DB: Error deleting ${name}:`, req.error);
if (attempt + 1 < maxAttempts) { if (attempt + 1 < maxAttempts) {
setTimeout(() => attemptDelete(attempt + 1), 150 * (attempt + 1)); setTimeout(() => attemptDelete(attempt + 1), 150 * (attempt + 1));
return; return;
@@ -104,7 +104,7 @@ function deleteDatabaseWithRetries(name: string, maxAttempts = 6): Promise<void>
req.onblocked = () => { req.onblocked = () => {
console.warn( console.warn(
`[DB] Delete of ${name} blocked (attempt ${attempt + 1}/${maxAttempts}); waiting for connections to close`, `[BetterSEQTA+] DB: Delete of ${name} blocked (attempt ${attempt + 1}/${maxAttempts}); waiting for connections to close`,
); );
if (attempt + 1 < maxAttempts) { if (attempt + 1 < maxAttempts) {
setTimeout(() => attemptDelete(attempt + 1), 200 * (attempt + 1)); setTimeout(() => attemptDelete(attempt + 1), 200 * (attempt + 1));
@@ -137,12 +137,17 @@ async function openDBInternal(): Promise<IDBDatabase> {
const domError = error as DOMException | undefined; const domError = error as DOMException | undefined;
if (domError?.name === "VersionError") { if (domError?.name === "VersionError") {
console.warn("[DB] localStorage version out of sync with IndexedDB; opening current version"); console.warn(
"[BetterSEQTA+] DB: localStorage version out of sync with IndexedDB; opening current version",
);
invalidateConnection(); invalidateConnection();
try { try {
return await openDatabase(); return await openDatabase();
} catch (fallbackError) { } catch (fallbackError) {
console.warn("[DB] Fallback open failed, recreating database:", fallbackError); console.warn(
"[BetterSEQTA+] DB: Fallback open failed, recreating database:",
fallbackError,
);
} }
} else { } else {
console.error("Error opening database:", error); console.error("Error opening database:", error);
@@ -253,7 +258,7 @@ async function upgradeDB(newStore: string): Promise<void> {
cachedDb = null; cachedDb = null;
dbPromise = null; dbPromise = null;
} catch (error) { } catch (error) {
console.warn("[DB] Could not probe database version before upgrade:", error); console.warn("[BetterSEQTA+] DB: Could not probe database version before upgrade:", error);
} }
try { try {
@@ -278,7 +283,7 @@ export async function ensureStoresExist(stores: string[]): Promise<void> {
try { try {
db = await openDB(); db = await openDB();
} catch (error) { } catch (error) {
console.warn("[DB] ensureStoresExist: could not open database:", error); console.warn("[BetterSEQTA+] DB: ensureStoresExist: could not open database:", error);
return; return;
} }
@@ -294,7 +299,7 @@ export async function ensureStoresExist(stores: string[]): Promise<void> {
try { try {
await openDatabaseWithStores(baseVersion + 1, missing); await openDatabaseWithStores(baseVersion + 1, missing);
} catch (error) { } catch (error) {
console.error("[DB] ensureStoresExist failed:", error); console.error("[BetterSEQTA+] DB: ensureStoresExist failed:", error);
throw error; throw error;
} }
}); });
@@ -34,13 +34,13 @@ async function ensureSchemaCurrent(): Promise<void> {
if (stored === INDEX_SCHEMA_VERSION) return; if (stored === INDEX_SCHEMA_VERSION) return;
console.warn( console.warn(
`[Indexer] Schema version changed (${stored} -> ${INDEX_SCHEMA_VERSION}); resetting structured + vector indexes.`, `[BetterSEQTA+] Indexer: Schema version changed (${stored} -> ${INDEX_SCHEMA_VERSION}); resetting structured + vector indexes.`,
); );
try { try {
await resetSearchIndexes(); await resetSearchIndexes();
} catch (e) { } catch (e) {
console.warn("[Indexer] Failed to reset search indexes:", e); console.warn("[BetterSEQTA+] Indexer: Failed to reset search indexes:", e);
} }
try { try {
@@ -108,7 +108,7 @@ async function diffAndStoreItems(targetStore: string, items: IndexItem[]): Promi
const validItems = items.filter((i) => i && i.id); const validItems = items.filter((i) => i && i.id);
if (validItems.length !== items.length) { if (validItems.length !== items.length) {
console.warn( console.warn(
`[Indexer] Filtered out ${items.length - validItems.length} invalid items before storing in '${targetStore}'.`, `[BetterSEQTA+] Indexer: Filtered out ${items.length - validItems.length} invalid items before storing in '${targetStore}'.`,
); );
} }
@@ -153,7 +153,7 @@ async function tryClaimLock(lockId: string): Promise<boolean> {
async function acquireLock(): Promise<boolean> { async function acquireLock(): Promise<boolean> {
if (isIndexingActive) { if (isIndexingActive) {
verboseDebug("[Indexer] Already indexing in this tab"); verboseDebug("[BetterSEQTA+] Indexer: Already indexing in this tab");
return false; return false;
} }
@@ -174,7 +174,7 @@ async function acquireLock(): Promise<boolean> {
if (await tryClaimLock(lockId)) return true; if (await tryClaimLock(lockId)) return true;
} }
} catch (e) { } catch (e) {
console.warn("[Indexer] Error parsing lock:", e); console.warn("[BetterSEQTA+] Indexer: Error parsing lock:", e);
} }
} }
@@ -242,7 +242,7 @@ export async function loadAllStoredItems(): Promise<IndexItem[]> {
console.error(`Error loading items for job store ${jobId}:`, error); console.error(`Error loading items for job store ${jobId}:`, error);
} }
} }
verboseDebug(`[Indexer] Loaded ${all.length} items from all primary stores.`); verboseDebug(`[BetterSEQTA+] Indexer: Loaded ${all.length} items from all primary stores.`);
return all; return all;
} }
@@ -293,12 +293,16 @@ function dispatchVectorProgress(
export async function runIndexing(): Promise<void> { export async function runIndexing(): Promise<void> {
if (isPluginBlockedByPerformanceMode("global-search")) { if (isPluginBlockedByPerformanceMode("global-search")) {
verboseDebug("[Indexer] Skipping indexing — performance mode blocks Global Search."); verboseDebug(
"[BetterSEQTA+] Indexer: Skipping indexing — performance mode blocks Global Search.",
);
return; return;
} }
if (isIndexingPaused()) { if (isIndexingPaused()) {
verboseDebug("[Indexer] Skipping indexing — index was reset; reload the page to rebuild."); verboseDebug(
"[BetterSEQTA+] Indexer: Skipping indexing — index was reset; reload the page to rebuild.",
);
return; return;
} }
@@ -327,7 +331,9 @@ export async function runIndexing(): Promise<void> {
for (const jobId of jobIds) { for (const jobId of jobIds) {
if (isIndexingPaused()) { if (isIndexingPaused()) {
verboseDebug("[Indexer] Indexing stopped — index was reset; reload the page to rebuild."); verboseDebug(
"[BetterSEQTA+] Indexer: Indexing stopped — index was reset; reload the page to rebuild.",
);
dispatchProgress(completedJobs, totalSteps, false, "Indexing paused — reload to rebuild"); dispatchProgress(completedJobs, totalSteps, false, "Indexing paused — reload to rebuild");
return; return;
} }
@@ -417,7 +423,7 @@ export async function runIndexing(): Promise<void> {
const { refreshVectorCache } = await import("../search/vector/vectorSearch"); const { refreshVectorCache } = await import("../search/vector/vectorSearch");
await refreshVectorCache(); await refreshVectorCache();
} catch (e) { } catch (e) {
console.warn("[Indexer] Failed to refresh vector cache after prune:", e); console.warn("[BetterSEQTA+] Indexer: Failed to refresh vector cache after prune:", e);
} }
} }
@@ -25,7 +25,7 @@ const fetchUpcomingAssessments = async (student: number) => {
}); });
return Array.isArray(res.payload) ? res.payload : []; return Array.isArray(res.payload) ? res.payload : [];
} catch (e) { } catch (e) {
console.error("[Assignments job] Failed to fetch upcoming assessments:", e); console.error("[BetterSEQTA+] Assignments job: Failed to fetch upcoming assessments:", e);
return []; return [];
} }
}; };
@@ -40,7 +40,7 @@ const fetchSubjects = async () => {
?.flatMap((s) => (Array.isArray(s.subjects) ? (s.subjects as OverviewSubject[]) : [])) ?? [] ?.flatMap((s) => (Array.isArray(s.subjects) ? (s.subjects as OverviewSubject[]) : [])) ?? []
); );
} catch (e) { } catch (e) {
console.error("[Assignments job] Failed to fetch subjects:", e); console.error("[BetterSEQTA+] Assignments job: Failed to fetch subjects:", e);
return []; return [];
} }
}; };
@@ -80,7 +80,7 @@ const fetchPastAssessments = async (student: number, subjects: OverviewSubject[]
} }
} catch (e) { } catch (e) {
console.warn( console.warn(
`[Assignments job] Failed to fetch past assessments for subject ${subject.code || "unknown"}:`, `[BetterSEQTA+] Assignments job: Failed to fetch past assessments for subject ${subject.code || "unknown"}:`,
e, e,
); );
} }
@@ -114,16 +114,19 @@ function buildAssignmentIndexItem(
const metaclassId = assessment.metaclassID || assessment.metaclass; const metaclassId = assessment.metaclassID || assessment.metaclass;
if (!programmeId || !metaclassId || !assessment.id) { if (!programmeId || !metaclassId || !assessment.id) {
console.warn(`[Assignments job] Skipping assignment ${assessment.id} - missing required IDs:`, { console.warn(
programmeId, `[BetterSEQTA+] Assignments job: Skipping assignment ${assessment.id} - missing required IDs:`,
metaclassId, {
assessmentId: assessment.id, programmeId,
programmeID: assessment.programmeID, metaclassId,
metaclassID: assessment.metaclassID, assessmentId: assessment.id,
programme: assessment.programme, programmeID: assessment.programmeID,
metaclass: assessment.metaclass, metaclassID: assessment.metaclassID,
assessment, programme: assessment.programme,
}); metaclass: assessment.metaclass,
assessment,
},
);
return null; return null;
} }
@@ -132,7 +135,7 @@ function buildAssignmentIndexItem(
if (finalProgrammeId === undefined || finalMetaclassId === undefined) { if (finalProgrammeId === undefined || finalMetaclassId === undefined) {
console.error( console.error(
`[Assignments job] ❌ Skipping assignment ${assessment.id} - invalid IDs after conversion:`, `[BetterSEQTA+] Assignments job: ❌ Skipping assignment ${assessment.id} - invalid IDs after conversion:`,
{ {
programmeId: finalProgrammeId, programmeId: finalProgrammeId,
metaclassId: finalMetaclassId, metaclassId: finalMetaclassId,
@@ -173,7 +176,7 @@ function buildAssignmentIndexItem(
renderComponentId: "assessment", renderComponentId: "assessment",
}; };
verboseDebug(`[Assignments job] ✅ Created item for assignment ${assessment.id}:`, { verboseDebug(`[BetterSEQTA+] Assignments job: ✅ Created item for assignment ${assessment.id}:`, {
id: item.id, id: item.id,
programmeId: item.metadata.programmeId, programmeId: item.metadata.programmeId,
programmeID: item.metadata.programmeID, programmeID: item.metadata.programmeID,
@@ -226,12 +229,12 @@ export const assignmentsJob: Job = {
const { id: student } = await getUserInfo(); const { id: student } = await getUserInfo();
if (student == null) { if (student == null) {
verboseDebug("[Assignments job] No student id; skipping run"); verboseDebug("[BetterSEQTA+] Assignments job: No student id; skipping run");
return []; return [];
} }
verboseDebug( verboseDebug(
"[Assignments job] Starting indexing - fetching all assessments (upcoming and past)...", "[BetterSEQTA+] Assignments job: Starting indexing - fetching all assessments (upcoming and past)...",
); );
const [upcoming, subjects] = await Promise.all([ const [upcoming, subjects] = await Promise.all([
@@ -240,12 +243,12 @@ export const assignmentsJob: Job = {
]); ]);
verboseDebug( verboseDebug(
`[Assignments job] Fetched ${upcoming.length} upcoming assessments and ${subjects.length} subjects`, `[BetterSEQTA+] Assignments job: Fetched ${upcoming.length} upcoming assessments and ${subjects.length} subjects`,
); );
const past = await fetchPastAssessments(student, subjects); const past = await fetchPastAssessments(student, subjects);
verboseDebug(`[Assignments job] Fetched ${past.length} past assessments`); verboseDebug(`[BetterSEQTA+] Assignments job: Fetched ${past.length} past assessments`);
const subjectLookup = new Map<string, { programme: number; metaclass: number }>(); const subjectLookup = new Map<string, { programme: number; metaclass: number }>();
subjects.forEach((s: OverviewSubject) => { subjects.forEach((s: OverviewSubject) => {
@@ -317,7 +320,7 @@ export const assignmentsJob: Job = {
const pastCount = assessmentArray.filter((a) => !a.isUpcoming).length; const pastCount = assessmentArray.filter((a) => !a.isUpcoming).length;
const upcomingCount = assessmentArray.filter((a) => a.isUpcoming).length; const upcomingCount = assessmentArray.filter((a) => a.isUpcoming).length;
verboseDebug( verboseDebug(
`[Assignments job] Processing ${assessmentArray.length} total assessments (${upcomingCount} upcoming, ${pastCount} past)`, `[BetterSEQTA+] Assignments job: Processing ${assessmentArray.length} total assessments (${upcomingCount} upcoming, ${pastCount} past)`,
); );
const batchSize = 15; const batchSize = 15;
@@ -344,7 +347,7 @@ export const assignmentsJob: Job = {
const newItemsCount = items.filter((item) => !existingIds.has(item.id)).length; const newItemsCount = items.filter((item) => !existingIds.has(item.id)).length;
const updatedItemsCount = items.length - newItemsCount; const updatedItemsCount = items.length - newItemsCount;
verboseDebug( verboseDebug(
`[Assignments job] Indexed ${items.length} assignment items (${newItemsCount} new, ${updatedItemsCount} updated)`, `[BetterSEQTA+] Assignments job: Indexed ${items.length} assignment items (${newItemsCount} new, ${updatedItemsCount} updated)`,
); );
return items; return items;
}, },
@@ -101,7 +101,7 @@ export const coursesJob: Job = {
run: async (ctx) => { run: async (ctx) => {
const subjects = await fetchActiveSubjects(); const subjects = await fetchActiveSubjects();
if (subjects.length === 0) { if (subjects.length === 0) {
verboseDebug("[Courses job] No active subjects discovered."); verboseDebug("[BetterSEQTA+] Courses job: No active subjects discovered.");
return []; return [];
} }
@@ -163,7 +163,6 @@ export const coursesJob: Job = {
isActive: true, isActive: true,
route: `/courses/${subject.programme}:${subject.metaclass}`, route: `/courses/${subject.programme}:${subject.metaclass}`,
entityType: "course", entityType: "course",
icon: "\ueb4d",
}, },
actionId: "course", actionId: "course",
renderComponentId: "course", renderComponentId: "course",
@@ -179,7 +178,7 @@ export const coursesJob: Job = {
}); });
verboseDebug( verboseDebug(
`[Courses job] Indexed ${items.length} courses across ${subjects.length} subjects.`, `[BetterSEQTA+] Courses job: Indexed ${items.length} courses across ${subjects.length} subjects.`,
); );
return items; return items;
}, },
@@ -120,7 +120,6 @@ export const documentsJob: Job = {
createdDate: doc.created_date, createdDate: doc.created_date,
entityType: "document", entityType: "document",
route: "/documents", route: "/documents",
icon: "\ueb6f",
}, },
actionId: "document", actionId: "document",
renderComponentId: "document", renderComponentId: "document",
@@ -128,7 +127,7 @@ export const documentsJob: Job = {
} }
} }
verboseDebug(`[Documents job] Indexed ${items.length} document entries.`); verboseDebug(`[BetterSEQTA+] Documents job: Indexed ${items.length} document entries.`);
return items; return items;
}, },
@@ -116,19 +116,18 @@ export const folioJob: Job = {
fileCount: Array.isArray(detail?.files) ? detail!.files!.length : 0, fileCount: Array.isArray(detail?.files) ? detail!.files!.length : 0,
entityType: "folio", entityType: "folio",
route: "/folios/read", route: "/folios/read",
icon: "\ueb16",
}, },
actionId: "folio", actionId: "folio",
renderComponentId: "folio", renderComponentId: "folio",
}); });
} catch (e) { } catch (e) {
console.warn(`[Folio job] Failed to load folio ${entry.id}:`, e); console.warn(`[BetterSEQTA+] Folio job: Failed to load folio ${entry.id}:`, e);
} }
await delay(PER_ITEM_DELAY_MS); await delay(PER_ITEM_DELAY_MS);
} }
verboseDebug(`[Folio job] Indexed ${items.length} folio entries.`); verboseDebug(`[BetterSEQTA+] Folio job: Indexed ${items.length} folio entries.`);
return items; return items;
}, },
@@ -27,7 +27,7 @@ export const forumsJob: Job = {
try { try {
list = await fetchForums(); list = await fetchForums();
} catch (e) { } catch (e) {
console.error("[Forums job] list fetch failed:", e); console.error("[BetterSEQTA+] Forums job: list fetch failed:", e);
return []; return [];
} }
@@ -43,7 +43,7 @@ export const goalsJob: Job = {
{ mode: "years" }, { mode: "years" },
); );
if (!Array.isArray(years) || years.length === 0) { if (!Array.isArray(years) || years.length === 0) {
verboseDebug("[Goals job] No goal years available; skipping."); verboseDebug("[BetterSEQTA+] Goals job: No goal years available; skipping.");
return []; return [];
} }
@@ -90,19 +90,18 @@ export const goalsJob: Job = {
updatedAt: goal.updated, updatedAt: goal.updated,
entityType: "goal", entityType: "goal",
route: `/goals/${year}`, route: `/goals/${year}`,
icon: "\uea15",
}, },
actionId: "goal", actionId: "goal",
renderComponentId: "goal", renderComponentId: "goal",
}); });
} }
} catch (e) { } catch (e) {
console.warn(`[Goals job] Failed to fetch goals for year ${year}:`, e); console.warn(`[BetterSEQTA+] Goals job: Failed to fetch goals for year ${year}:`, e);
} }
await delay(PER_YEAR_DELAY_MS); await delay(PER_YEAR_DELAY_MS);
} }
verboseDebug(`[Goals job] Indexed ${items.length} goal entries.`); verboseDebug(`[BetterSEQTA+] Goals job: Indexed ${items.length} goal entries.`);
return items; return items;
}, },
@@ -83,7 +83,7 @@ export const fetchMessageContent = async (
return await res.json(); return await res.json();
} catch (error) { } catch (error) {
console.warn( console.warn(
`[Messages job] Failed to fetch content for message ${id} (attempt ${retryCount + 1}):`, `[BetterSEQTA+] Messages job: Failed to fetch content for message ${id} (attempt ${retryCount + 1}):`,
error, error,
); );
@@ -130,7 +130,7 @@ async function estimateMessageCount(): Promise<number> {
return Math.min(firstBatch.payload.messages.length * 20, 2000); return Math.min(firstBatch.payload.messages.length * 20, 2000);
} catch (error) { } catch (error) {
console.warn("[Messages job] Failed to estimate message count:", error); console.warn("[BetterSEQTA+] Messages job: Failed to estimate message count:", error);
return 500; return 500;
} }
} }
@@ -167,7 +167,7 @@ function checkCircuitBreaker(progress: MessagesProgress): boolean {
progress.circuitBreakerOpen = true; progress.circuitBreakerOpen = true;
progress.circuitBreakerOpenTime = now; progress.circuitBreakerOpenTime = now;
console.warn( console.warn(
`[Messages job] Circuit breaker opened due to ${progress.consecutiveFailures} consecutive failures`, `[BetterSEQTA+] Messages job: Circuit breaker opened due to ${progress.consecutiveFailures} consecutive failures`,
); );
return true; return true;
} }
@@ -179,7 +179,7 @@ function checkCircuitBreaker(progress: MessagesProgress): boolean {
progress.circuitBreakerOpen = false; progress.circuitBreakerOpen = false;
progress.consecutiveFailures = 0; progress.consecutiveFailures = 0;
verboseInfo( verboseInfo(
`[Messages job] Circuit breaker closed after ${RATE_LIMIT_CONFIG.circuitBreakerResetTime}ms`, `[BetterSEQTA+] Messages job: Circuit breaker closed after ${RATE_LIMIT_CONFIG.circuitBreakerResetTime}ms`,
); );
return false; return false;
} }
@@ -271,7 +271,7 @@ async function processMessagesInParallel(
return { success: false, id, messageId: msg.id, responseTime }; return { success: false, id, messageId: msg.id, responseTime };
} }
} catch (error) { } catch (error) {
console.error(`[Messages job] content fetch failed (id ${id}):`, error); console.error(`[BetterSEQTA+] Messages job: content fetch failed (id ${id}):`, error);
return { success: false, id, messageId: msg.id, error }; return { success: false, id, messageId: msg.id, error };
} }
}); });
@@ -309,7 +309,7 @@ async function processMessagesInParallel(
updatedProgress.currentDelay = calculateAdaptiveDelay(updatedProgress, batchResponseTime); updatedProgress.currentDelay = calculateAdaptiveDelay(updatedProgress, batchResponseTime);
verboseLog( verboseLog(
`[Messages job] Processed parallel batch: ${batchSuccesses} successes, ${batchFailures} failures, ${batchResponseTime}ms total time`, `[BetterSEQTA+] Messages job: Processed parallel batch: ${batchSuccesses} successes, ${batchFailures} failures, ${batchResponseTime}ms total time`,
); );
} }
@@ -354,7 +354,7 @@ export const messagesJob: Job = {
progress.totalEstimated, progress.totalEstimated,
(progressData) => { (progressData) => {
verboseLog( verboseLog(
`[Messages job] Vector streaming progress: ${progressData.processed}/${progressData.total} (${progressData.status})`, `[BetterSEQTA+] Messages job: Vector streaming progress: ${progressData.processed}/${progressData.total} (${progressData.status})`,
); );
}, },
RATE_LIMIT_CONFIG.vectorBatchSize, RATE_LIMIT_CONFIG.vectorBatchSize,
@@ -362,11 +362,11 @@ export const messagesJob: Job = {
); );
if (progress.streamingStarted) { if (progress.streamingStarted) {
verboseLog( verboseLog(
`[Messages job] Started streaming vectorization session for ~${progress.totalEstimated} items`, `[BetterSEQTA+] Messages job: Started streaming vectorization session for ~${progress.totalEstimated} items`,
); );
} }
} catch (error) { } catch (error) {
console.warn("[Messages job] Failed to start streaming session:", error); console.warn("[BetterSEQTA+] Messages job: Failed to start streaming session:", error);
} }
} }
@@ -375,7 +375,7 @@ export const messagesJob: Job = {
if (progress.retryQueue.length > 0) { if (progress.retryQueue.length > 0) {
verboseLog( verboseLog(
`[Messages job] Processing ${Math.min(progress.retryQueue.length, 10)} items from retry queue`, `[BetterSEQTA+] Messages job: Processing ${Math.min(progress.retryQueue.length, 10)} items from retry queue`,
); );
const retryBatch = progress.retryQueue.slice(0, 10); const retryBatch = progress.retryQueue.slice(0, 10);
@@ -406,7 +406,10 @@ export const messagesJob: Job = {
return { success: false, messageId, responseTime }; return { success: false, messageId, responseTime };
} }
} catch (error) { } catch (error) {
console.error(`[Messages job] Retry failed for message ${messageId}:`, error); console.error(
`[BetterSEQTA+] Messages job: Retry failed for message ${messageId}:`,
error,
);
return { success: false, messageId, error }; return { success: false, messageId, error };
} }
}); });
@@ -441,14 +444,14 @@ export const messagesJob: Job = {
progress.currentDelay = calculateAdaptiveDelay(progress, batchResponseTime); progress.currentDelay = calculateAdaptiveDelay(progress, batchResponseTime);
verboseLog( verboseLog(
`[Messages job] Processed retry batch: ${retrySuccesses} successes, ${retryFailures} failures`, `[BetterSEQTA+] Messages job: Processed retry batch: ${retrySuccesses} successes, ${retryFailures} failures`,
); );
} }
} }
while (!progress.done) { while (!progress.done) {
if (checkCircuitBreaker(progress)) { if (checkCircuitBreaker(progress)) {
console.warn("[Messages job] Circuit breaker is open, skipping processing"); console.warn("[BetterSEQTA+] Messages job: Circuit breaker is open, skipping processing");
await delay(RATE_LIMIT_CONFIG.maxDelay); await delay(RATE_LIMIT_CONFIG.maxDelay);
continue; continue;
} }
@@ -466,7 +469,7 @@ export const messagesJob: Job = {
progress.currentDelay = calculateAdaptiveDelay(progress, responseTime); progress.currentDelay = calculateAdaptiveDelay(progress, responseTime);
progress.currentBatchSize = calculateAdaptiveBatchSize(progress, responseTime); progress.currentBatchSize = calculateAdaptiveBatchSize(progress, responseTime);
} catch (e) { } catch (e) {
console.error("[Messages job] list fetch failed:", e); console.error("[BetterSEQTA+] Messages job: list fetch failed:", e);
progress.failedRequests++; progress.failedRequests++;
progress.consecutiveFailures++; progress.consecutiveFailures++;
progress.currentDelay = Math.min( progress.currentDelay = Math.min(
@@ -520,10 +523,13 @@ export const messagesJob: Job = {
await vectorWorker.streamItems(itemsToStream); await vectorWorker.streamItems(itemsToStream);
itemsStreamedToVector += itemsToStream.length; itemsStreamedToVector += itemsToStream.length;
verboseLog( verboseLog(
`[Messages job] Streamed ${itemsToStream.length} items to vector worker (total: ${itemsStreamedToVector})`, `[BetterSEQTA+] Messages job: Streamed ${itemsToStream.length} items to vector worker (total: ${itemsStreamedToVector})`,
); );
} catch (error) { } catch (error) {
console.warn("[Messages job] Failed to stream items to vector worker:", error); console.warn(
"[BetterSEQTA+] Messages job: Failed to stream items to vector worker:",
error,
);
} }
} }
@@ -531,7 +537,10 @@ export const messagesJob: Job = {
try { try {
publishDynamicItemsUpdate(await loadAllStoredItems(), "messages", processedItems.length); publishDynamicItemsUpdate(await loadAllStoredItems(), "messages", processedItems.length);
} catch (error) { } catch (error) {
console.warn("[Messages job] Failed to dispatch incremental search update:", error); console.warn(
"[BetterSEQTA+] Messages job: Failed to dispatch incremental search update:",
error,
);
} }
} }
@@ -545,7 +554,7 @@ export const messagesJob: Job = {
progressUpdateCounter = 0; progressUpdateCounter = 0;
verboseLog( verboseLog(
`[Messages job] Progress: offset=${progress.offset}, batchSize=${progress.currentBatchSize}, delay=${progress.currentDelay}ms, failures=${progress.failedRequests}, retryQueue=${progress.retryQueue.length}, vectorStreamed=${itemsStreamedToVector}, parallelRequests=${RATE_LIMIT_CONFIG.parallelRequests}`, `[BetterSEQTA+] Messages job: Progress: offset=${progress.offset}, batchSize=${progress.currentBatchSize}, delay=${progress.currentDelay}ms, failures=${progress.failedRequests}, retryQueue=${progress.retryQueue.length}, vectorStreamed=${itemsStreamedToVector}, parallelRequests=${RATE_LIMIT_CONFIG.parallelRequests}`,
); );
} }
@@ -559,10 +568,10 @@ export const messagesJob: Job = {
try { try {
await vectorWorker.endStreamingSession(); await vectorWorker.endStreamingSession();
verboseLog( verboseLog(
`[Messages job] Ended streaming session. Total items streamed: ${itemsStreamedToVector}`, `[BetterSEQTA+] Messages job: Ended streaming session. Total items streamed: ${itemsStreamedToVector}`,
); );
} catch (error) { } catch (error) {
console.warn("[Messages job] Failed to end streaming session:", error); console.warn("[BetterSEQTA+] Messages job: Failed to end streaming session:", error);
} }
} }
Loaded 100 of 240 files, more files were not shown because too many files have changed in this diff. Show more