mirror of
https://github.com/gra0007/obsidian-css-inlay-colors.git
synced 2026-07-22 10:40:31 +00:00
Merge pull request #27 from GRA0007/feat/custom-palettes
Add custom palette support
This commit is contained in:
commit
e7c54a2868
16 changed files with 4402 additions and 214 deletions
5
.changes/add-palettes.md
Normal file
5
.changes/add-palettes.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"obsidian-css-inlay-colors": minor:feat
|
||||
---
|
||||
|
||||
Adds support for custom palettes that let you use standard color charts like RAL (e.g. `(RAL 1004)` or `(aci 91)`)
|
||||
5
.changes/fix-preview-border.md
Normal file
5
.changes/fix-preview-border.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"obsidian-css-inlay-colors": patch:fix
|
||||
---
|
||||
|
||||
Ensure borders between the preview and text are hidden with certain themes in the live preview mode
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -7,5 +7,8 @@ main.js
|
|||
# Exclude sourcemaps
|
||||
*.map
|
||||
|
||||
# obsidian
|
||||
# Obsidian
|
||||
data.json
|
||||
|
||||
# Dev
|
||||
palette-colors.json
|
||||
|
|
|
|||
29
README.md
29
README.md
|
|
@ -10,6 +10,8 @@ To use, just put any [valid CSS color syntax](https://developer.mozilla.org/en-U
|
|||
|
||||
<img src="example.jpg" alt="Example of the extension running for all CSS color formats" width="200">
|
||||
|
||||
## Features
|
||||
|
||||
### Color Picker
|
||||
|
||||
Enable the color picker setting to change a color using a color picker in live preview mode. Note that the color picker does not support opacity, and will only let you select from sRGB colors. It will attempt to preserve the existing format you have written, as well as any existing opacity.
|
||||
|
|
@ -24,6 +26,33 @@ Surround a color with square brackets (\`[\#663399]\`) to hide the color name an
|
|||
|
||||
There's also an option in the plugin settings to hide all color names globally.
|
||||
|
||||
### Custom Palettes
|
||||
|
||||
This plugin supports custom color palettes which you can use by enabling the setting and creating a [CSS snippet](https://help.obsidian.md/snippets) file that targets the palette names you want to support.
|
||||
|
||||
Enabling the setting exposes classes for every inline code block surrounded by parentheses, replacing all spaces with hyphens, and converting to lowercase. For example, \`(RAL 170 50 10)\` exposes the class `.ral-170-50-10`. If that class gets a `color` set, it will show a color inlay.
|
||||
|
||||
Note, the plugin detects classes that target `.css-color-inlay` only, see the example below.
|
||||
|
||||
```css
|
||||
.css-color-inlay.my-cool-color { color: #663399; }
|
||||
/* Or, use CSS nesting */
|
||||
.css-color-inlay {
|
||||
&.my-hot-color { color: orangered; }
|
||||
}
|
||||
/* Now `(my cool color)` and `(my hot color)` will have inlays */
|
||||
```
|
||||
|
||||
#### Predefined Palettes
|
||||
|
||||
There are 6 [predefined color palettes](./palettes.css) you can download using the button in the settings, and it includes the following:
|
||||
|
||||
- AutoCAD Color Index
|
||||
- Australian Color Standard (AS 2700)
|
||||
- British Standard Colors (BS 381, BS 4800)
|
||||
- Federal Standard (FS 595C, ANA)
|
||||
- RAL Colors (Classic, Design, Effect, Plastics)
|
||||
|
||||
### Custom CSS
|
||||
|
||||
Customize the inlays by targeting the `.css-color-inlay` class. For example, you can make them circular with the following snippet:
|
||||
|
|
|
|||
|
|
@ -25,5 +25,8 @@
|
|||
"quoteStyle": "single",
|
||||
"semicolons": "asNeeded"
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"includes": ["**", "!palettes.css"]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
15
package.json
15
package.json
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "obsidian-css-inlay-colors",
|
||||
"version": "1.3.1",
|
||||
"packageManager": "pnpm@10.17.1+sha512.17c560fca4867ae9473a3899ad84a88334914f379be46d455cbf92e5cf4b39d34985d452d2583baf19967fa76cb5c17bc9e245529d0b98745721aa7200ecaf7a",
|
||||
"packageManager": "pnpm@10.18.3+sha512.bbd16e6d7286fd7e01f6b3c0b3c932cda2965c06a908328f74663f10a9aea51f1129eea615134bf992831b009eabe167ecb7008b597f40ff9bc75946aadfb08d",
|
||||
"description": "Show inline color hints for CSS colors",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
@ -20,7 +20,8 @@
|
|||
"inlay",
|
||||
"picker",
|
||||
"hex",
|
||||
"rgb"
|
||||
"rgb",
|
||||
"palette"
|
||||
],
|
||||
"author": "Benji Grant",
|
||||
"license": "MIT",
|
||||
|
|
@ -29,20 +30,20 @@
|
|||
"url": "https://github.com/GRA0007/obsidian-css-inlay-colors.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.2.4",
|
||||
"@biomejs/biome": "^2.2.6",
|
||||
"@types/culori": "^4.0.1",
|
||||
"@types/node": "^24.5.2",
|
||||
"@types/node": "^24.8.1",
|
||||
"builtin-modules": "5.0.0",
|
||||
"covector": "^0.12.4",
|
||||
"esbuild": "0.25.10",
|
||||
"esbuild": "0.25.11",
|
||||
"obsidian": "latest",
|
||||
"tslib": "2.8.1",
|
||||
"typescript": "5.9.2"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/language": "^6.11.3",
|
||||
"@codemirror/state": "^6.5.2",
|
||||
"@codemirror/view": "^6.38.3",
|
||||
"@codemirror/view": "^6.38.6",
|
||||
"culori": "^4.0.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3868
palettes.css
Normal file
3868
palettes.css
Normal file
File diff suppressed because it is too large
Load diff
361
pnpm-lock.yaml
361
pnpm-lock.yaml
|
|
@ -15,21 +15,21 @@ importers:
|
|||
specifier: ^6.5.2
|
||||
version: 6.5.2
|
||||
'@codemirror/view':
|
||||
specifier: ^6.38.3
|
||||
version: 6.38.3
|
||||
specifier: ^6.38.6
|
||||
version: 6.38.6
|
||||
culori:
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2
|
||||
devDependencies:
|
||||
'@biomejs/biome':
|
||||
specifier: ^2.2.4
|
||||
version: 2.2.4
|
||||
specifier: ^2.2.6
|
||||
version: 2.2.6
|
||||
'@types/culori':
|
||||
specifier: ^4.0.1
|
||||
version: 4.0.1
|
||||
'@types/node':
|
||||
specifier: ^24.5.2
|
||||
version: 24.5.2
|
||||
specifier: ^24.8.1
|
||||
version: 24.8.1
|
||||
builtin-modules:
|
||||
specifier: 5.0.0
|
||||
version: 5.0.0
|
||||
|
|
@ -37,69 +37,69 @@ importers:
|
|||
specifier: ^0.12.4
|
||||
version: 0.12.4(mocha@10.8.2)
|
||||
esbuild:
|
||||
specifier: 0.25.10
|
||||
version: 0.25.10
|
||||
specifier: 0.25.11
|
||||
version: 0.25.11
|
||||
obsidian:
|
||||
specifier: latest
|
||||
version: 1.8.7(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)
|
||||
version: 1.10.0(@codemirror/state@6.5.2)(@codemirror/view@6.38.6)
|
||||
tslib:
|
||||
specifier: 2.8.1
|
||||
version: 2.8.1
|
||||
typescript:
|
||||
specifier: 5.9.2
|
||||
version: 5.9.2
|
||||
specifier: 5.9.3
|
||||
version: 5.9.3
|
||||
|
||||
packages:
|
||||
|
||||
'@biomejs/biome@2.2.4':
|
||||
resolution: {integrity: sha512-TBHU5bUy/Ok6m8c0y3pZiuO/BZoY/OcGxoLlrfQof5s8ISVwbVBdFINPQZyFfKwil8XibYWb7JMwnT8wT4WVPg==}
|
||||
'@biomejs/biome@2.2.6':
|
||||
resolution: {integrity: sha512-yKTCNGhek0rL5OEW1jbLeZX8LHaM8yk7+3JRGv08my+gkpmtb5dDE+54r2ZjZx0ediFEn1pYBOJSmOdDP9xtFw==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
hasBin: true
|
||||
|
||||
'@biomejs/cli-darwin-arm64@2.2.4':
|
||||
resolution: {integrity: sha512-RJe2uiyaloN4hne4d2+qVj3d3gFJFbmrr5PYtkkjei1O9c+BjGXgpUPVbi8Pl8syumhzJjFsSIYkcLt2VlVLMA==}
|
||||
'@biomejs/cli-darwin-arm64@2.2.6':
|
||||
resolution: {integrity: sha512-UZPmn3M45CjTYulgcrFJFZv7YmK3pTxTJDrFYlNElT2FNnkkX4fsxjExTSMeWKQYoZjvekpH5cvrYZZlWu3yfA==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@biomejs/cli-darwin-x64@2.2.4':
|
||||
resolution: {integrity: sha512-cFsdB4ePanVWfTnPVaUX+yr8qV8ifxjBKMkZwN7gKb20qXPxd/PmwqUH8mY5wnM9+U0QwM76CxFyBRJhC9tQwg==}
|
||||
'@biomejs/cli-darwin-x64@2.2.6':
|
||||
resolution: {integrity: sha512-HOUIquhHVgh/jvxyClpwlpl/oeMqntlteL89YqjuFDiZ091P0vhHccwz+8muu3nTyHWM5FQslt+4Jdcd67+xWQ==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@biomejs/cli-linux-arm64-musl@2.2.4':
|
||||
resolution: {integrity: sha512-7TNPkMQEWfjvJDaZRSkDCPT/2r5ESFPKx+TEev+I2BXDGIjfCZk2+b88FOhnJNHtksbOZv8ZWnxrA5gyTYhSsQ==}
|
||||
'@biomejs/cli-linux-arm64-musl@2.2.6':
|
||||
resolution: {integrity: sha512-TjCenQq3N6g1C+5UT3jE1bIiJb5MWQvulpUngTIpFsL4StVAUXucWD0SL9MCW89Tm6awWfeXBbZBAhJwjyFbRQ==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@biomejs/cli-linux-arm64@2.2.4':
|
||||
resolution: {integrity: sha512-M/Iz48p4NAzMXOuH+tsn5BvG/Jb07KOMTdSVwJpicmhN309BeEyRyQX+n1XDF0JVSlu28+hiTQ2L4rZPvu7nMw==}
|
||||
'@biomejs/cli-linux-arm64@2.2.6':
|
||||
resolution: {integrity: sha512-BpGtuMJGN+o8pQjvYsUKZ+4JEErxdSmcRD/JG3mXoWc6zrcA7OkuyGFN1mDggO0Q1n7qXxo/PcupHk8gzijt5g==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@biomejs/cli-linux-x64-musl@2.2.4':
|
||||
resolution: {integrity: sha512-m41nFDS0ksXK2gwXL6W6yZTYPMH0LughqbsxInSKetoH6morVj43szqKx79Iudkp8WRT5SxSh7qVb8KCUiewGg==}
|
||||
'@biomejs/cli-linux-x64-musl@2.2.6':
|
||||
resolution: {integrity: sha512-1ZcBux8zVM3JhWN2ZCPaYf0+ogxXG316uaoXJdgoPZcdK/rmRcRY7PqHdAos2ExzvjIdvhQp72UcveI98hgOog==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@biomejs/cli-linux-x64@2.2.4':
|
||||
resolution: {integrity: sha512-orr3nnf2Dpb2ssl6aihQtvcKtLySLta4E2UcXdp7+RTa7mfJjBgIsbS0B9GC8gVu0hjOu021aU8b3/I1tn+pVQ==}
|
||||
'@biomejs/cli-linux-x64@2.2.6':
|
||||
resolution: {integrity: sha512-1HaM/dpI/1Z68zp8ZdT6EiBq+/O/z97a2AiHMl+VAdv5/ELckFt9EvRb8hDHpk8hUMoz03gXkC7VPXOVtU7faA==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@biomejs/cli-win32-arm64@2.2.4':
|
||||
resolution: {integrity: sha512-NXnfTeKHDFUWfxAefa57DiGmu9VyKi0cDqFpdI+1hJWQjGJhJutHPX0b5m+eXvTKOaf+brU+P0JrQAZMb5yYaQ==}
|
||||
'@biomejs/cli-win32-arm64@2.2.6':
|
||||
resolution: {integrity: sha512-h3A88G8PGM1ryTeZyLlSdfC/gz3e95EJw9BZmA6Po412DRqwqPBa2Y9U+4ZSGUAXCsnSQE00jLV8Pyrh0d+jQw==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@biomejs/cli-win32-x64@2.2.4':
|
||||
resolution: {integrity: sha512-3Y4V4zVRarVh/B/eSHczR4LYoSVyv3Dfuvm3cWs5w/HScccS0+Wt/lHOcDTRYeHjQmMYVC3rIRWqyN2EI52+zg==}
|
||||
'@biomejs/cli-win32-x64@2.2.6':
|
||||
resolution: {integrity: sha512-yx0CqeOhPjYQ5ZXgPfu8QYkgBhVJyvWe36as7jRuPrKPO5ylVDfwVtPQ+K/mooNTADW0IhxOZm3aPu16dP8yNQ==}
|
||||
engines: {node: '>=14.21.3'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
|
@ -122,8 +122,8 @@ packages:
|
|||
'@codemirror/state@6.5.2':
|
||||
resolution: {integrity: sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==}
|
||||
|
||||
'@codemirror/view@6.38.3':
|
||||
resolution: {integrity: sha512-x2t87+oqwB1mduiQZ6huIghjMt4uZKFEdj66IcXw7+a5iBEvv9lh7EWDRHI7crnD4BMGpnyq/RzmCGbiEZLcvQ==}
|
||||
'@codemirror/view@6.38.6':
|
||||
resolution: {integrity: sha512-qiS0z1bKs5WOvHIAC0Cybmv4AJSkAXgX5aD6Mqd2epSLlVJsQl8NG23jCVouIgkh4All/mrbdsf2UOLFnJw0tw==}
|
||||
|
||||
'@covector/apply@0.10.0':
|
||||
resolution: {integrity: sha512-/LB0kG0RGsqcQopjg6FX94fUDaVrPSpsU5CaKbdOWXGzRBwMa4MZxiGu1S8mji3xcLE6ALUBQNZpyOKsfxXaGQ==}
|
||||
|
|
@ -173,158 +173,158 @@ packages:
|
|||
'@effection/subscription@2.0.6':
|
||||
resolution: {integrity: sha512-znTi75JFyC1S0YjyTtFEWNRQbhk01UxOapWELlIkZOwjGIEjcx6+G8y6n9JpZ8OGKmJQ0GBlRMZozsR5gcQvBg==}
|
||||
|
||||
'@esbuild/aix-ppc64@0.25.10':
|
||||
resolution: {integrity: sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==}
|
||||
'@esbuild/aix-ppc64@0.25.11':
|
||||
resolution: {integrity: sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ppc64]
|
||||
os: [aix]
|
||||
|
||||
'@esbuild/android-arm64@0.25.10':
|
||||
resolution: {integrity: sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==}
|
||||
'@esbuild/android-arm64@0.25.11':
|
||||
resolution: {integrity: sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@esbuild/android-arm@0.25.10':
|
||||
resolution: {integrity: sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==}
|
||||
'@esbuild/android-arm@0.25.11':
|
||||
resolution: {integrity: sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
|
||||
'@esbuild/android-x64@0.25.10':
|
||||
resolution: {integrity: sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==}
|
||||
'@esbuild/android-x64@0.25.11':
|
||||
resolution: {integrity: sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
'@esbuild/darwin-arm64@0.25.10':
|
||||
resolution: {integrity: sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==}
|
||||
'@esbuild/darwin-arm64@0.25.11':
|
||||
resolution: {integrity: sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@esbuild/darwin-x64@0.25.10':
|
||||
resolution: {integrity: sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==}
|
||||
'@esbuild/darwin-x64@0.25.11':
|
||||
resolution: {integrity: sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@esbuild/freebsd-arm64@0.25.10':
|
||||
resolution: {integrity: sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==}
|
||||
'@esbuild/freebsd-arm64@0.25.11':
|
||||
resolution: {integrity: sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
|
||||
'@esbuild/freebsd-x64@0.25.10':
|
||||
resolution: {integrity: sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==}
|
||||
'@esbuild/freebsd-x64@0.25.11':
|
||||
resolution: {integrity: sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@esbuild/linux-arm64@0.25.10':
|
||||
resolution: {integrity: sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==}
|
||||
'@esbuild/linux-arm64@0.25.11':
|
||||
resolution: {integrity: sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-arm@0.25.10':
|
||||
resolution: {integrity: sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==}
|
||||
'@esbuild/linux-arm@0.25.11':
|
||||
resolution: {integrity: sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-ia32@0.25.10':
|
||||
resolution: {integrity: sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==}
|
||||
'@esbuild/linux-ia32@0.25.11':
|
||||
resolution: {integrity: sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ia32]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-loong64@0.25.10':
|
||||
resolution: {integrity: sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==}
|
||||
'@esbuild/linux-loong64@0.25.11':
|
||||
resolution: {integrity: sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-mips64el@0.25.10':
|
||||
resolution: {integrity: sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==}
|
||||
'@esbuild/linux-mips64el@0.25.11':
|
||||
resolution: {integrity: sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-ppc64@0.25.10':
|
||||
resolution: {integrity: sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==}
|
||||
'@esbuild/linux-ppc64@0.25.11':
|
||||
resolution: {integrity: sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-riscv64@0.25.10':
|
||||
resolution: {integrity: sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==}
|
||||
'@esbuild/linux-riscv64@0.25.11':
|
||||
resolution: {integrity: sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-s390x@0.25.10':
|
||||
resolution: {integrity: sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==}
|
||||
'@esbuild/linux-s390x@0.25.11':
|
||||
resolution: {integrity: sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-x64@0.25.10':
|
||||
resolution: {integrity: sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==}
|
||||
'@esbuild/linux-x64@0.25.11':
|
||||
resolution: {integrity: sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/netbsd-arm64@0.25.10':
|
||||
resolution: {integrity: sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==}
|
||||
'@esbuild/netbsd-arm64@0.25.11':
|
||||
resolution: {integrity: sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [netbsd]
|
||||
|
||||
'@esbuild/netbsd-x64@0.25.10':
|
||||
resolution: {integrity: sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==}
|
||||
'@esbuild/netbsd-x64@0.25.11':
|
||||
resolution: {integrity: sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
|
||||
'@esbuild/openbsd-arm64@0.25.10':
|
||||
resolution: {integrity: sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==}
|
||||
'@esbuild/openbsd-arm64@0.25.11':
|
||||
resolution: {integrity: sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [openbsd]
|
||||
|
||||
'@esbuild/openbsd-x64@0.25.10':
|
||||
resolution: {integrity: sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==}
|
||||
'@esbuild/openbsd-x64@0.25.11':
|
||||
resolution: {integrity: sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
|
||||
'@esbuild/openharmony-arm64@0.25.10':
|
||||
resolution: {integrity: sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==}
|
||||
'@esbuild/openharmony-arm64@0.25.11':
|
||||
resolution: {integrity: sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [openharmony]
|
||||
|
||||
'@esbuild/sunos-x64@0.25.10':
|
||||
resolution: {integrity: sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==}
|
||||
'@esbuild/sunos-x64@0.25.11':
|
||||
resolution: {integrity: sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
|
||||
'@esbuild/win32-arm64@0.25.10':
|
||||
resolution: {integrity: sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==}
|
||||
'@esbuild/win32-arm64@0.25.11':
|
||||
resolution: {integrity: sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@esbuild/win32-ia32@0.25.10':
|
||||
resolution: {integrity: sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==}
|
||||
'@esbuild/win32-ia32@0.25.11':
|
||||
resolution: {integrity: sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
|
||||
'@esbuild/win32-x64@0.25.10':
|
||||
resolution: {integrity: sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==}
|
||||
'@esbuild/win32-x64@0.25.11':
|
||||
resolution: {integrity: sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
|
@ -359,14 +359,14 @@ packages:
|
|||
'@types/culori@4.0.1':
|
||||
resolution: {integrity: sha512-43M51r/22CjhbOXyGT361GZ9vncSVQ39u62x5eJdBQFviI8zWp2X5jzqg7k4M6PVgDQAClpy2bUe2dtwEgEDVQ==}
|
||||
|
||||
'@types/estree@1.0.5':
|
||||
resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
|
||||
'@types/estree@1.0.8':
|
||||
resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
|
||||
|
||||
'@types/mdast@3.0.15':
|
||||
resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==}
|
||||
|
||||
'@types/node@24.5.2':
|
||||
resolution: {integrity: sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==}
|
||||
'@types/node@24.8.1':
|
||||
resolution: {integrity: sha512-alv65KGRadQVfVcG69MuB4IzdYVpRwMG/mq8KWOaoOdyY617P5ivaDiMCGOFDWD2sAn5Q0mR3mRtUOgm99hL9Q==}
|
||||
|
||||
'@types/tern@0.23.9':
|
||||
resolution: {integrity: sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==}
|
||||
|
|
@ -528,8 +528,8 @@ packages:
|
|||
emoji-regex@8.0.0:
|
||||
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
||||
|
||||
esbuild@0.25.10:
|
||||
resolution: {integrity: sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==}
|
||||
esbuild@0.25.11:
|
||||
resolution: {integrity: sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
|
||||
|
|
@ -748,11 +748,11 @@ packages:
|
|||
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
obsidian@1.8.7:
|
||||
resolution: {integrity: sha512-h4bWwNFAGRXlMlMAzdEiIM2ppTGlrh7uGOJS6w4gClrsjc+ei/3YAtU2VdFUlCiPuTHpY4aBpFJJW75S1Tl/JA==}
|
||||
obsidian@1.10.0:
|
||||
resolution: {integrity: sha512-F7hhnmGRQD1TanDPFT//LD3iKNUVd7N8sKL7flCCHRszfTxpDJ39j3T7LHbcGpyid906i6lD5oO+cnfLBzJMKw==}
|
||||
peerDependencies:
|
||||
'@codemirror/state': ^6.0.0
|
||||
'@codemirror/view': ^6.0.0
|
||||
'@codemirror/state': 6.5.0
|
||||
'@codemirror/view': 6.38.1
|
||||
|
||||
on-exit-leak-free@2.1.2:
|
||||
resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==}
|
||||
|
|
@ -918,6 +918,9 @@ packages:
|
|||
style-mod@4.1.2:
|
||||
resolution: {integrity: sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==}
|
||||
|
||||
style-mod@4.1.3:
|
||||
resolution: {integrity: sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==}
|
||||
|
||||
supports-color@7.2.0:
|
||||
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
|
||||
engines: {node: '>=8'}
|
||||
|
|
@ -946,13 +949,13 @@ packages:
|
|||
resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
typescript@5.9.2:
|
||||
resolution: {integrity: sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==}
|
||||
typescript@5.9.3:
|
||||
resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
undici-types@7.12.0:
|
||||
resolution: {integrity: sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==}
|
||||
undici-types@7.14.0:
|
||||
resolution: {integrity: sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==}
|
||||
|
||||
unified@9.2.2:
|
||||
resolution: {integrity: sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==}
|
||||
|
|
@ -1032,39 +1035,39 @@ packages:
|
|||
|
||||
snapshots:
|
||||
|
||||
'@biomejs/biome@2.2.4':
|
||||
'@biomejs/biome@2.2.6':
|
||||
optionalDependencies:
|
||||
'@biomejs/cli-darwin-arm64': 2.2.4
|
||||
'@biomejs/cli-darwin-x64': 2.2.4
|
||||
'@biomejs/cli-linux-arm64': 2.2.4
|
||||
'@biomejs/cli-linux-arm64-musl': 2.2.4
|
||||
'@biomejs/cli-linux-x64': 2.2.4
|
||||
'@biomejs/cli-linux-x64-musl': 2.2.4
|
||||
'@biomejs/cli-win32-arm64': 2.2.4
|
||||
'@biomejs/cli-win32-x64': 2.2.4
|
||||
'@biomejs/cli-darwin-arm64': 2.2.6
|
||||
'@biomejs/cli-darwin-x64': 2.2.6
|
||||
'@biomejs/cli-linux-arm64': 2.2.6
|
||||
'@biomejs/cli-linux-arm64-musl': 2.2.6
|
||||
'@biomejs/cli-linux-x64': 2.2.6
|
||||
'@biomejs/cli-linux-x64-musl': 2.2.6
|
||||
'@biomejs/cli-win32-arm64': 2.2.6
|
||||
'@biomejs/cli-win32-x64': 2.2.6
|
||||
|
||||
'@biomejs/cli-darwin-arm64@2.2.4':
|
||||
'@biomejs/cli-darwin-arm64@2.2.6':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-darwin-x64@2.2.4':
|
||||
'@biomejs/cli-darwin-x64@2.2.6':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-linux-arm64-musl@2.2.4':
|
||||
'@biomejs/cli-linux-arm64-musl@2.2.6':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-linux-arm64@2.2.4':
|
||||
'@biomejs/cli-linux-arm64@2.2.6':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-linux-x64-musl@2.2.4':
|
||||
'@biomejs/cli-linux-x64-musl@2.2.6':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-linux-x64@2.2.4':
|
||||
'@biomejs/cli-linux-x64@2.2.6':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-win32-arm64@2.2.4':
|
||||
'@biomejs/cli-win32-arm64@2.2.6':
|
||||
optional: true
|
||||
|
||||
'@biomejs/cli-win32-x64@2.2.4':
|
||||
'@biomejs/cli-win32-x64@2.2.6':
|
||||
optional: true
|
||||
|
||||
'@chainsafe/abort-controller@3.0.1':
|
||||
|
|
@ -1085,7 +1088,7 @@ snapshots:
|
|||
'@codemirror/language@6.11.3':
|
||||
dependencies:
|
||||
'@codemirror/state': 6.5.2
|
||||
'@codemirror/view': 6.38.3
|
||||
'@codemirror/view': 6.38.6
|
||||
'@lezer/common': 1.2.3
|
||||
'@lezer/highlight': 1.2.1
|
||||
'@lezer/lr': 1.4.2
|
||||
|
|
@ -1095,11 +1098,11 @@ snapshots:
|
|||
dependencies:
|
||||
'@marijn/find-cluster-break': 1.0.2
|
||||
|
||||
'@codemirror/view@6.38.3':
|
||||
'@codemirror/view@6.38.6':
|
||||
dependencies:
|
||||
'@codemirror/state': 6.5.2
|
||||
crelt: 1.0.6
|
||||
style-mod: 4.1.2
|
||||
style-mod: 4.1.3
|
||||
w3c-keyname: 2.2.8
|
||||
|
||||
'@covector/apply@0.10.0':
|
||||
|
|
@ -1212,82 +1215,82 @@ snapshots:
|
|||
dependencies:
|
||||
'@effection/core': 2.2.3
|
||||
|
||||
'@esbuild/aix-ppc64@0.25.10':
|
||||
'@esbuild/aix-ppc64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/android-arm64@0.25.10':
|
||||
'@esbuild/android-arm64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/android-arm@0.25.10':
|
||||
'@esbuild/android-arm@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/android-x64@0.25.10':
|
||||
'@esbuild/android-x64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/darwin-arm64@0.25.10':
|
||||
'@esbuild/darwin-arm64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/darwin-x64@0.25.10':
|
||||
'@esbuild/darwin-x64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/freebsd-arm64@0.25.10':
|
||||
'@esbuild/freebsd-arm64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/freebsd-x64@0.25.10':
|
||||
'@esbuild/freebsd-x64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-arm64@0.25.10':
|
||||
'@esbuild/linux-arm64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-arm@0.25.10':
|
||||
'@esbuild/linux-arm@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-ia32@0.25.10':
|
||||
'@esbuild/linux-ia32@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-loong64@0.25.10':
|
||||
'@esbuild/linux-loong64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-mips64el@0.25.10':
|
||||
'@esbuild/linux-mips64el@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-ppc64@0.25.10':
|
||||
'@esbuild/linux-ppc64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-riscv64@0.25.10':
|
||||
'@esbuild/linux-riscv64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-s390x@0.25.10':
|
||||
'@esbuild/linux-s390x@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-x64@0.25.10':
|
||||
'@esbuild/linux-x64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/netbsd-arm64@0.25.10':
|
||||
'@esbuild/netbsd-arm64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/netbsd-x64@0.25.10':
|
||||
'@esbuild/netbsd-x64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/openbsd-arm64@0.25.10':
|
||||
'@esbuild/openbsd-arm64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/openbsd-x64@0.25.10':
|
||||
'@esbuild/openbsd-x64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/openharmony-arm64@0.25.10':
|
||||
'@esbuild/openharmony-arm64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/sunos-x64@0.25.10':
|
||||
'@esbuild/sunos-x64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/win32-arm64@0.25.10':
|
||||
'@esbuild/win32-arm64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/win32-ia32@0.25.10':
|
||||
'@esbuild/win32-ia32@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@esbuild/win32-x64@0.25.10':
|
||||
'@esbuild/win32-x64@0.25.11':
|
||||
optional: true
|
||||
|
||||
'@lezer/common@1.2.3': {}
|
||||
|
|
@ -1320,19 +1323,19 @@ snapshots:
|
|||
|
||||
'@types/culori@4.0.1': {}
|
||||
|
||||
'@types/estree@1.0.5': {}
|
||||
'@types/estree@1.0.8': {}
|
||||
|
||||
'@types/mdast@3.0.15':
|
||||
dependencies:
|
||||
'@types/unist': 2.0.11
|
||||
|
||||
'@types/node@24.5.2':
|
||||
'@types/node@24.8.1':
|
||||
dependencies:
|
||||
undici-types: 7.12.0
|
||||
undici-types: 7.14.0
|
||||
|
||||
'@types/tern@0.23.9':
|
||||
dependencies:
|
||||
'@types/estree': 1.0.5
|
||||
'@types/estree': 1.0.8
|
||||
|
||||
'@types/unist@2.0.11': {}
|
||||
|
||||
|
|
@ -1499,34 +1502,34 @@ snapshots:
|
|||
|
||||
emoji-regex@8.0.0: {}
|
||||
|
||||
esbuild@0.25.10:
|
||||
esbuild@0.25.11:
|
||||
optionalDependencies:
|
||||
'@esbuild/aix-ppc64': 0.25.10
|
||||
'@esbuild/android-arm': 0.25.10
|
||||
'@esbuild/android-arm64': 0.25.10
|
||||
'@esbuild/android-x64': 0.25.10
|
||||
'@esbuild/darwin-arm64': 0.25.10
|
||||
'@esbuild/darwin-x64': 0.25.10
|
||||
'@esbuild/freebsd-arm64': 0.25.10
|
||||
'@esbuild/freebsd-x64': 0.25.10
|
||||
'@esbuild/linux-arm': 0.25.10
|
||||
'@esbuild/linux-arm64': 0.25.10
|
||||
'@esbuild/linux-ia32': 0.25.10
|
||||
'@esbuild/linux-loong64': 0.25.10
|
||||
'@esbuild/linux-mips64el': 0.25.10
|
||||
'@esbuild/linux-ppc64': 0.25.10
|
||||
'@esbuild/linux-riscv64': 0.25.10
|
||||
'@esbuild/linux-s390x': 0.25.10
|
||||
'@esbuild/linux-x64': 0.25.10
|
||||
'@esbuild/netbsd-arm64': 0.25.10
|
||||
'@esbuild/netbsd-x64': 0.25.10
|
||||
'@esbuild/openbsd-arm64': 0.25.10
|
||||
'@esbuild/openbsd-x64': 0.25.10
|
||||
'@esbuild/openharmony-arm64': 0.25.10
|
||||
'@esbuild/sunos-x64': 0.25.10
|
||||
'@esbuild/win32-arm64': 0.25.10
|
||||
'@esbuild/win32-ia32': 0.25.10
|
||||
'@esbuild/win32-x64': 0.25.10
|
||||
'@esbuild/aix-ppc64': 0.25.11
|
||||
'@esbuild/android-arm': 0.25.11
|
||||
'@esbuild/android-arm64': 0.25.11
|
||||
'@esbuild/android-x64': 0.25.11
|
||||
'@esbuild/darwin-arm64': 0.25.11
|
||||
'@esbuild/darwin-x64': 0.25.11
|
||||
'@esbuild/freebsd-arm64': 0.25.11
|
||||
'@esbuild/freebsd-x64': 0.25.11
|
||||
'@esbuild/linux-arm': 0.25.11
|
||||
'@esbuild/linux-arm64': 0.25.11
|
||||
'@esbuild/linux-ia32': 0.25.11
|
||||
'@esbuild/linux-loong64': 0.25.11
|
||||
'@esbuild/linux-mips64el': 0.25.11
|
||||
'@esbuild/linux-ppc64': 0.25.11
|
||||
'@esbuild/linux-riscv64': 0.25.11
|
||||
'@esbuild/linux-s390x': 0.25.11
|
||||
'@esbuild/linux-x64': 0.25.11
|
||||
'@esbuild/netbsd-arm64': 0.25.11
|
||||
'@esbuild/netbsd-x64': 0.25.11
|
||||
'@esbuild/openbsd-arm64': 0.25.11
|
||||
'@esbuild/openbsd-x64': 0.25.11
|
||||
'@esbuild/openharmony-arm64': 0.25.11
|
||||
'@esbuild/sunos-x64': 0.25.11
|
||||
'@esbuild/win32-arm64': 0.25.11
|
||||
'@esbuild/win32-ia32': 0.25.11
|
||||
'@esbuild/win32-x64': 0.25.11
|
||||
|
||||
escalade@3.2.0: {}
|
||||
|
||||
|
|
@ -1742,10 +1745,10 @@ snapshots:
|
|||
|
||||
normalize-path@3.0.0: {}
|
||||
|
||||
obsidian@1.8.7(@codemirror/state@6.5.2)(@codemirror/view@6.38.3):
|
||||
obsidian@1.10.0(@codemirror/state@6.5.2)(@codemirror/view@6.38.6):
|
||||
dependencies:
|
||||
'@codemirror/state': 6.5.2
|
||||
'@codemirror/view': 6.38.3
|
||||
'@codemirror/view': 6.38.6
|
||||
'@types/codemirror': 5.60.8
|
||||
moment: 2.29.4
|
||||
|
||||
|
|
@ -1908,6 +1911,8 @@ snapshots:
|
|||
|
||||
style-mod@4.1.2: {}
|
||||
|
||||
style-mod@4.1.3: {}
|
||||
|
||||
supports-color@7.2.0:
|
||||
dependencies:
|
||||
has-flag: 4.0.0
|
||||
|
|
@ -1932,9 +1937,9 @@ snapshots:
|
|||
|
||||
type-fest@0.7.1: {}
|
||||
|
||||
typescript@5.9.2: {}
|
||||
typescript@5.9.3: {}
|
||||
|
||||
undici-types@7.12.0: {}
|
||||
undici-types@7.14.0: {}
|
||||
|
||||
unified@9.2.2:
|
||||
dependencies:
|
||||
|
|
|
|||
21
src/live.ts
21
src/live.ts
|
|
@ -12,6 +12,7 @@ import type { NodeProp } from '@lezer/common'
|
|||
import { type Color, formatHex } from 'culori'
|
||||
import { editorLivePreviewField } from 'obsidian'
|
||||
import { formatColor } from './formatColor'
|
||||
import { getPaletteClass, getPaletteClasses } from './palettes'
|
||||
import { parseColor } from './parseColor'
|
||||
import type { CssColorsPluginSettings } from './settings'
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ export const inlayExtension = (settings: CssColorsPluginSettings) => {
|
|||
class CSSColorInlayWidget extends WidgetType {
|
||||
constructor(
|
||||
readonly text: string,
|
||||
readonly color: Color,
|
||||
readonly color: Color | 'palette',
|
||||
readonly colorPickerEnabled: boolean,
|
||||
readonly hideName: boolean,
|
||||
readonly view: EditorView,
|
||||
|
|
@ -58,10 +59,14 @@ class CSSColorInlayWidget extends WidgetType {
|
|||
|
||||
toDOM() {
|
||||
const inlay = document.createElement('label')
|
||||
inlay.className = `css-color-inlay ${this.hideName ? 'css-color-name-hidden' : ''}`
|
||||
inlay.style.setProperty('--css-color-inlay-color', this.text)
|
||||
inlay.className = `css-color-inlay ${
|
||||
this.color === 'palette'
|
||||
? `css-color-palette ${getPaletteClass(this.text)}`
|
||||
: ''
|
||||
} ${this.hideName ? 'css-color-name-hidden' : ''}`
|
||||
inlay.style.color = this.text
|
||||
|
||||
if (this.colorPickerEnabled) {
|
||||
if (this.colorPickerEnabled && this.color !== 'palette') {
|
||||
const input = document.createElement('input')
|
||||
input.type = 'color'
|
||||
input.value = formatHex(this.color)
|
||||
|
|
@ -78,7 +83,7 @@ class CSSColorInlayWidget extends WidgetType {
|
|||
to: pos + this.text.length,
|
||||
insert: formatColor(
|
||||
this.text,
|
||||
this.color,
|
||||
this.color as Color,
|
||||
(e.currentTarget as HTMLInputElement).value,
|
||||
),
|
||||
},
|
||||
|
|
@ -103,6 +108,7 @@ const createColorWidgets = (
|
|||
if (!view.state.field(editorLivePreviewField)) return Decoration.none
|
||||
|
||||
const widgets: Range<Decoration>[] = []
|
||||
const paletteClasses = settings.palettesEnabled ? getPaletteClasses() : []
|
||||
|
||||
for (const { from, to } of view.visibleRanges) {
|
||||
syntaxTree(view.state).iterate({
|
||||
|
|
@ -112,7 +118,10 @@ const createColorWidgets = (
|
|||
if (
|
||||
node.type.prop(tokenClassNodeProp)?.split(' ').includes('inline-code')
|
||||
) {
|
||||
const res = parseColor(view.state.sliceDoc(node.from, node.to))
|
||||
const res = parseColor(
|
||||
view.state.sliceDoc(node.from, node.to),
|
||||
paletteClasses,
|
||||
)
|
||||
if (!res) return
|
||||
const { text, color, isNameHidden } = res
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Plugin } from 'obsidian'
|
||||
import { inlayPostProcessor } from 'src/preview'
|
||||
import { inlayExtension } from './live'
|
||||
import { inlayPostProcessor } from './preview'
|
||||
import {
|
||||
type CssColorsPluginSettings,
|
||||
CssColorsSettingsTab,
|
||||
|
|
|
|||
149
src/palettes.ts
Normal file
149
src/palettes.ts
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
import { type App, Modal, Notice, normalizePath, Setting } from 'obsidian'
|
||||
|
||||
const SNIPPET_NAME = 'css-inlay-palettes'
|
||||
|
||||
/** Normalize a palette name into a class */
|
||||
export const getPaletteClass = (text: string) =>
|
||||
text.trim().toLocaleLowerCase().replace(/\s+/g, '-')
|
||||
|
||||
const parsePaletteClasses = (selectorText: string) => {
|
||||
return selectorText.split(',').flatMap((selector) => {
|
||||
const name = selector
|
||||
.replaceAll('.css-color-inlay', '')
|
||||
.replace(/[&.]/g, '')
|
||||
.trim()
|
||||
return name.toLocaleLowerCase() === name ? [name] : []
|
||||
})
|
||||
}
|
||||
|
||||
/** Get a list of all palette classes available */
|
||||
export const getPaletteClasses = () => {
|
||||
const classes = []
|
||||
|
||||
for (const sheet of document.styleSheets) {
|
||||
for (const rule of sheet.cssRules) {
|
||||
if (
|
||||
rule instanceof CSSStyleRule &&
|
||||
rule.selectorText.contains('.css-color-inlay')
|
||||
) {
|
||||
// Nested rule
|
||||
if (rule.cssRules.length > 0) {
|
||||
for (const nestedRule of rule.cssRules) {
|
||||
if (
|
||||
nestedRule instanceof CSSStyleRule &&
|
||||
nestedRule.selectorText.startsWith('&') &&
|
||||
nestedRule.styleMap.has('color')
|
||||
) {
|
||||
classes.push(...parsePaletteClasses(nestedRule.selectorText))
|
||||
}
|
||||
}
|
||||
}
|
||||
// Individual rule (.css-color-inlay.my-color)
|
||||
if (
|
||||
rule.selectorText !== '.css-color-inlay' &&
|
||||
rule.cssRules.length === 0 &&
|
||||
rule.styleMap.has('color')
|
||||
) {
|
||||
classes.push(...parsePaletteClasses(rule.selectorText))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return classes
|
||||
}
|
||||
|
||||
const createPaletteFilePath = (app: App) =>
|
||||
normalizePath(`${app.vault.configDir}/snippets/${SNIPPET_NAME}.css`)
|
||||
|
||||
/** Snippet exists and is enabled in Obsidian Appearance settings */
|
||||
const checkIfSnippetEnabled = async (app: App) => {
|
||||
if (!(await app.vault.adapter.exists(createPaletteFilePath(app))))
|
||||
return false
|
||||
|
||||
const config = await app.vault.adapter.read(
|
||||
normalizePath(`${app.vault.configDir}/appearance.json`),
|
||||
)
|
||||
try {
|
||||
const enabledSnippets: string[] = JSON.parse(config).enabledCssSnippets
|
||||
return enabledSnippets.includes(SNIPPET_NAME)
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
const confirmIfOverwrite = async (app: App) => {
|
||||
if (await app.vault.adapter.exists(createPaletteFilePath(app)))
|
||||
return new Promise<boolean>((resolve) => {
|
||||
new ConfirmDownloadModal(app, (confirmed) => resolve(confirmed)).open()
|
||||
})
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
/** Download the predefined palettes file to the snippets directory. Confirm if the file already exists. */
|
||||
export const downloadPredefinedPalettes = async (app: App) => {
|
||||
if (await confirmIfOverwrite(app)) {
|
||||
try {
|
||||
await fetch(
|
||||
'https://raw.githubusercontent.com/GRA0007/obsidian-css-inlay-colors/refs/heads/main/palettes.css',
|
||||
)
|
||||
.then((res) => {
|
||||
if (!res.ok) throw new Error('Failed to fetch')
|
||||
return res.text()
|
||||
})
|
||||
.then((data) =>
|
||||
app.vault.adapter.write(createPaletteFilePath(app), data),
|
||||
)
|
||||
new Notice('Palette file downloaded')
|
||||
if (!(await checkIfSnippetEnabled(app)))
|
||||
new EnableSnippetInfoModal(app).open()
|
||||
} catch {
|
||||
new Notice('Failed to download file')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ConfirmDownloadModal extends Modal {
|
||||
constructor(app: App, onConfirm: (confirmed: boolean) => void) {
|
||||
super(app)
|
||||
this.setTitle('Overwrite Existing Palettes')
|
||||
this.setContent(
|
||||
"You've already got a custom palette file in your snippets directory, would you like to redownload and overwrite it?",
|
||||
)
|
||||
|
||||
let confirmed = false
|
||||
new Setting(this.contentEl)
|
||||
.addButton((button) =>
|
||||
button.setButtonText('Cancel').onClick(() => {
|
||||
this.close()
|
||||
}),
|
||||
)
|
||||
.addButton((button) =>
|
||||
button
|
||||
.setButtonText('Replace existing file')
|
||||
.setCta()
|
||||
.onClick(() => {
|
||||
confirmed = true
|
||||
this.close()
|
||||
}),
|
||||
)
|
||||
this.setCloseCallback(() => onConfirm(confirmed))
|
||||
}
|
||||
}
|
||||
|
||||
class EnableSnippetInfoModal extends Modal {
|
||||
constructor(app: App) {
|
||||
super(app)
|
||||
this.setTitle('Enable CSS Snippet')
|
||||
this.setContent(
|
||||
'The custom palette file has been downloaded, you should now enable it from the "Appearance → CSS snippets" setting.',
|
||||
)
|
||||
|
||||
new Setting(this.contentEl).addButton((button) =>
|
||||
button.setButtonText('Got it').onClick(() => {
|
||||
this.close()
|
||||
}),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import { type Color, parse, parseHex } from 'culori'
|
||||
import { getPaletteClass } from './palettes'
|
||||
|
||||
export const parseColor = (text: string) => {
|
||||
export const parseColor = (text: string, paletteClasses: string[]) => {
|
||||
// If color is surrounded with square brackets, the name should be hidden
|
||||
let isNameHidden = false
|
||||
if (text.startsWith('[') && text.endsWith(']')) {
|
||||
|
|
@ -9,14 +10,29 @@ export const parseColor = (text: string) => {
|
|||
}
|
||||
|
||||
// Check if color is valid
|
||||
let color: Color | undefined
|
||||
try {
|
||||
color = parse(text)
|
||||
if (color === undefined) return
|
||||
// Ignore hex colors that don't start with a hash
|
||||
if (color.mode === 'rgb' && parseHex(text) && text.charAt(0) !== '#') return
|
||||
} catch {
|
||||
return
|
||||
let color: Color | 'palette' | undefined
|
||||
|
||||
// Is palette color
|
||||
if (
|
||||
paletteClasses.length > 0 &&
|
||||
text.startsWith('(') &&
|
||||
text.endsWith(')') &&
|
||||
paletteClasses.includes(getPaletteClass(text.slice(1, -1)))
|
||||
) {
|
||||
text = text.slice(1, -1)
|
||||
color = 'palette'
|
||||
}
|
||||
|
||||
if (!color) {
|
||||
try {
|
||||
color = parse(text)
|
||||
if (color === undefined) return
|
||||
// Ignore hex colors that don't start with a hash
|
||||
if (color.mode === 'rgb' && parseHex(text) && text.charAt(0) !== '#')
|
||||
return
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
return { text, color, isNameHidden }
|
||||
|
|
|
|||
|
|
@ -1,23 +1,27 @@
|
|||
import { Notice } from 'obsidian'
|
||||
import { getPaletteClass, getPaletteClasses } from './palettes'
|
||||
import { parseColor } from './parseColor'
|
||||
import type { CssColorsPluginSettings } from './settings'
|
||||
|
||||
export const inlayPostProcessor =
|
||||
(settings: CssColorsPluginSettings) => (el: HTMLElement) => {
|
||||
const paletteClasses = settings.palettesEnabled ? getPaletteClasses() : []
|
||||
|
||||
for (const code of el.findAll('code')) {
|
||||
const res = parseColor(code.innerText.trim())
|
||||
const res = parseColor(code.innerText.trim(), paletteClasses)
|
||||
if (!res) continue
|
||||
const { text, isNameHidden } = res
|
||||
const { text, color, isNameHidden } = res
|
||||
|
||||
// Clear codeblock before adding inlay
|
||||
if (settings.hideNames || isNameHidden) {
|
||||
code.innerHTML = ''
|
||||
}
|
||||
if (settings.hideNames || isNameHidden) code.empty()
|
||||
|
||||
const paletteClass =
|
||||
color === 'palette' ? `css-color-palette ${getPaletteClass(text)}` : ''
|
||||
|
||||
code.createSpan({
|
||||
prepend: true,
|
||||
cls: `css-color-inlay ${settings.hideNames || isNameHidden ? 'css-color-name-hidden' : ''}`,
|
||||
attr: { style: `--css-color-inlay-color: ${text};` },
|
||||
cls: `css-color-inlay ${paletteClass} ${settings.hideNames || isNameHidden ? 'css-color-name-hidden' : ''}`,
|
||||
attr: { style: `color: ${text};` },
|
||||
})
|
||||
|
||||
if (settings.copyOnClick) {
|
||||
|
|
@ -31,8 +35,8 @@ export const inlayPostProcessor =
|
|||
.then(() => {
|
||||
const toast = document.createDocumentFragment()
|
||||
const toastColor = document.createElement('span')
|
||||
toastColor.className = 'css-color-inlay'
|
||||
toastColor.style = `--css-color-inlay-color: ${text};`
|
||||
toastColor.className = `css-color-inlay ${paletteClass}`
|
||||
toastColor.style.color = text
|
||||
toast.append(toastColor)
|
||||
toast.append(
|
||||
document.createTextNode('Copied color to the clipboard'),
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
import { type App, PluginSettingTab, Setting } from 'obsidian'
|
||||
import type CssColorsPlugin from './main'
|
||||
import { downloadPredefinedPalettes } from './palettes'
|
||||
|
||||
export interface CssColorsPluginSettings {
|
||||
showInLiveEditor: boolean
|
||||
colorPickerEnabled: boolean
|
||||
hideNames: boolean
|
||||
copyOnClick: boolean
|
||||
palettesEnabled: boolean
|
||||
}
|
||||
|
||||
export const DEFAULT_SETTINGS: CssColorsPluginSettings = {
|
||||
|
|
@ -13,6 +15,7 @@ export const DEFAULT_SETTINGS: CssColorsPluginSettings = {
|
|||
colorPickerEnabled: false,
|
||||
hideNames: false,
|
||||
copyOnClick: true,
|
||||
palettesEnabled: false,
|
||||
}
|
||||
|
||||
export class CssColorsSettingsTab extends PluginSettingTab {
|
||||
|
|
@ -83,5 +86,91 @@ export class CssColorsSettingsTab extends PluginSettingTab {
|
|||
await this.plugin.saveSettings()
|
||||
}),
|
||||
)
|
||||
|
||||
new Setting(containerEl).setHeading().setName('Custom Palettes')
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Enable palette support')
|
||||
.setDesc(
|
||||
createFragment((desc) => {
|
||||
desc.appendText(
|
||||
'Enable custom color palette support. This will generate classes for every inline code block surrounded in parentheses so they can be targeted with a CSS snippet file.',
|
||||
)
|
||||
desc.createEl('br')
|
||||
desc.createEl('a', {
|
||||
text: 'Learn more',
|
||||
href: 'https://github.com/GRA0007/obsidian-css-inlay-colors?tab=readme-ov-file#custom-palettes',
|
||||
})
|
||||
}),
|
||||
)
|
||||
.addToggle((toggle) =>
|
||||
toggle
|
||||
.setValue(this.plugin.settings.palettesEnabled)
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.palettesEnabled = value
|
||||
await this.plugin.saveSettings()
|
||||
}),
|
||||
)
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Download predefined palettes')
|
||||
.setDesc(
|
||||
createFragment((desc) => {
|
||||
desc.appendText('You can download a ')
|
||||
desc.createEl('a', {
|
||||
text: 'snippet file',
|
||||
href: 'https://github.com/GRA0007/obsidian-css-inlay-colors/blob/main/palettes.css',
|
||||
})
|
||||
desc.appendText(
|
||||
' with some predefined palettes. It comes with the following:',
|
||||
)
|
||||
}),
|
||||
)
|
||||
.addButton((button) => {
|
||||
button
|
||||
.setButtonText('Download')
|
||||
.onClick(() => downloadPredefinedPalettes(this.app))
|
||||
})
|
||||
.infoEl.createDiv({ cls: 'setting-item-description' })
|
||||
.createEl('ul', {
|
||||
text: createFragment((el) => {
|
||||
el.createEl('li', {
|
||||
text: createFragment((li) => {
|
||||
li.createEl('strong', { text: 'AutoCAD Color Index' })
|
||||
li.createDiv({ text: 'Example: (aci 91)' })
|
||||
}),
|
||||
})
|
||||
el.createEl('li', {
|
||||
text: createFragment((li) => {
|
||||
li.createEl('strong', {
|
||||
text: 'Australian Color Standard (AS 2700)',
|
||||
})
|
||||
li.createDiv({ text: 'Example: (as N45)' })
|
||||
}),
|
||||
})
|
||||
el.createEl('li', {
|
||||
text: createFragment((li) => {
|
||||
li.createEl('strong', {
|
||||
text: 'British Standard Colors (BS 381, BS 4800)',
|
||||
})
|
||||
li.createDiv({ text: 'Example: (bs 381 593) or (bs 14-E-51)' })
|
||||
}),
|
||||
})
|
||||
el.createEl('li', {
|
||||
text: createFragment((li) => {
|
||||
li.createEl('strong', { text: 'Federal Standard (FS 595C, ANA)' })
|
||||
li.createDiv({ text: 'Example: (fs 11086) or (fs w3-ana-609)' })
|
||||
}),
|
||||
})
|
||||
el.createEl('li', {
|
||||
text: createFragment((li) => {
|
||||
li.createEl('strong', {
|
||||
text: 'RAL Colors (Classic, Design, Effect, Plastics)',
|
||||
})
|
||||
li.createDiv({ text: 'Example: (ral 170 50 10) or (ral 6010)' })
|
||||
}),
|
||||
})
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
.css-color-inlay {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
border: 1px solid currentColor;
|
||||
border: 1px solid var(--code-normal);
|
||||
display: inline-block;
|
||||
border-radius: 0.2em;
|
||||
vertical-align: middle;
|
||||
margin-right: 0.3em;
|
||||
margin-top: -0.1em;
|
||||
background: var(--css-color-inlay-color);
|
||||
background: currentColor;
|
||||
|
||||
&.css-color-name-hidden {
|
||||
margin-right: 0;
|
||||
|
|
@ -27,10 +27,12 @@
|
|||
padding-inline-end: 0;
|
||||
border-start-end-radius: 0;
|
||||
border-end-end-radius: 0;
|
||||
border-inline-end: 0;
|
||||
|
||||
& + .cm-inline-code:not(.cm-formatting) {
|
||||
padding-inline-start: 0;
|
||||
border-start-start-radius: 0;
|
||||
border-end-start-radius: 0;
|
||||
border-inline-start: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"lib": ["DOM", "ES5", "ES6", "ES7", "ES2024"]
|
||||
"lib": ["DOM", "DOM.Iterable", "ES5", "ES6", "ES7", "ES2024"]
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue