@pantoken/vitepress 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/components.css +1 -1
- package/dist/index.mjs +10 -1
- package/package.json +15 -15
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Danny Wahl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/components.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vp-doc{color:var(--instui-component-text-base-color);font-family:var(--instui-component-text-content-font-family);font-size:var(--instui-component-text-content-font-size);font-weight:var(--instui-component-text-content-font-weight);line-height:var(--instui-component-text-content-line-height)}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{color:var(--instui-component-heading-base-color);font-family:var(--instui-component-heading-h1-font-family);line-height:var(--instui-component-heading-line-height);margin:var(--instui-spacing-space-lg) 0 var(--instui-spacing-space-sm)}.vp-doc h1{font-size:var(--instui-component-heading-h1-font-size);font-weight:var(--instui-component-heading-h1-font-weight)}.vp-doc h2{font-size:var(--instui-component-heading-h2-font-size);font-weight:var(--instui-component-heading-h2-font-weight)}.vp-doc h3{font-size:var(--instui-component-heading-h3-font-size);font-weight:var(--instui-component-heading-h3-font-weight)}.vp-doc h4{font-size:var(--instui-component-heading-h4-font-size);font-weight:var(--instui-component-heading-h4-font-weight)}.vp-doc h5{font-size:var(--instui-component-heading-h5-font-size);font-weight:var(--instui-component-heading-h5-font-weight)}.vp-doc h6{font-size:var(--instui-component-heading-h6-font-size);font-weight:var(--instui-component-heading-h6-font-weight)}.vp-doc p{margin:var(--instui-spacing-space-md) 0}.vp-doc a{color:var(--instui-color-text-interactive-navigation-primary-base);text-decoration:underline}.vp-doc a:hover{color:var(--instui-color-text-interactive-navigation-primary-hover)}.vp-doc strong,.vp-doc b{font-weight:var(--instui-component-text-content-important-font-weight)}.vp-doc em,.vp-doc i{font-style:italic}.vp-doc small{font-size:var(--instui-component-text-content-small-font-size)}.vp-doc del,.vp-doc s{color:var(--instui-color-text-muted);text-decoration:line-through}.vp-doc ul,.vp-doc ol{margin:var(--instui-spacing-space-md) 0;padding-inline-start:var(--instui-spacing-space-lg)}.vp-doc li{margin:var(--instui-spacing-space2xs) 0}.vp-doc li.task-list-item{list-style:none}.vp-doc input[type=checkbox]{accent-color:var(--instui-color-text-interactive-navigation-primary-base);margin-inline-end:var(--instui-spacing-space-xs)}.vp-doc blockquote{margin:var(--instui-spacing-space-md) 0;border-inline-start:var(--instui-border-width-lg) solid var(--instui-color-stroke-base);color:var(--instui-component-text-base-color);font-size:var(--instui-component-text-content-quote-font-size);line-height:var(--instui-component-text-content-quote-line-height);padding-inline-start:var(--instui-spacing-space-md)}.vp-doc code{font-family:var(--instui-font-family-code);background:var(--instui-color-background-muted);padding:var(--instui-spacing-space2xs) var(--instui-spacing-space-xs);border-radius:var(--instui-border-radius-sm);font-size:.9em}.vp-doc pre{font-family:var(--instui-font-family-code);background:var(--instui-color-background-container);color:var(--instui-color-text-base);padding:var(--instui-spacing-space-md);border:var(--instui-border-width-sm) solid var(--instui-color-stroke-base);border-radius:var(--instui-border-radius-md);overflow-x:auto}.vp-doc pre code{font-size:inherit;background:0 0;border-radius:0;padding:0}.vp-doc hr{border:none;border-top:var(--instui-border-width-sm) solid var(--instui-color-stroke-base);margin:var(--instui-spacing-space-lg) 0}.vp-doc img{border-radius:var(--instui-border-radius-md);max-width:100%}.vp-doc table:not([class]){border-collapse:collapse;width:100%;margin:var(--instui-spacing-space-md) 0;background:var(--instui-component-table-background);color:var(--instui-component-table-color);font-family:var(--instui-component-table-font-family);font-size:var(--instui-component-table-font-size)}.vp-doc table:not([class]) th{text-align:start;background:var(--instui-component-table-col-header-background);color:var(--instui-component-table-col-header-color);font-weight:var(--instui-component-table-head-font-weight);padding:var(--instui-component-table-col-header-padding-vertical) var(--instui-component-table-col-header-padding-horizontal);border-bottom:var(--instui-border-width-md) solid var(--instui-component-table-row-border-color)}.vp-doc table:not([class]) td{color:var(--instui-component-table-cell-color);line-height:var(--instui-component-table-cell-line-height);padding:var(--instui-component-table-cell-padding-vertical) var(--instui-component-table-cell-padding-horizontal);border-bottom:var(--instui-border-width-sm) solid var(--instui-component-table-row-border-color)}
|
|
1
|
+
.vp-doc{color:var(--instui-component-text-base-color);font-family:var(--instui-component-text-content-font-family);font-size:var(--instui-component-text-content-font-size);font-weight:var(--instui-component-text-content-font-weight);line-height:var(--instui-component-text-content-line-height)}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{color:var(--instui-component-heading-base-color);font-family:var(--instui-component-heading-h1-font-family);line-height:var(--instui-component-heading-line-height);margin:var(--instui-spacing-space-lg) 0 var(--instui-spacing-space-sm)}.vp-doc h1{font-size:var(--instui-component-heading-h1-font-size);font-weight:var(--instui-component-heading-h1-font-weight)}.vp-doc h2{font-size:var(--instui-component-heading-h2-font-size);font-weight:var(--instui-component-heading-h2-font-weight)}.vp-doc h3{font-size:var(--instui-component-heading-h3-font-size);font-weight:var(--instui-component-heading-h3-font-weight)}.vp-doc h4{font-size:var(--instui-component-heading-h4-font-size);font-weight:var(--instui-component-heading-h4-font-weight)}.vp-doc h5{font-size:var(--instui-component-heading-h5-font-size);font-weight:var(--instui-component-heading-h5-font-weight)}.vp-doc h6{font-size:var(--instui-component-heading-h6-font-size);font-weight:var(--instui-component-heading-h6-font-weight)}.vp-doc p{margin:var(--instui-spacing-space-md) 0}.vp-doc a{color:var(--instui-color-text-interactive-navigation-primary-base);text-decoration:underline}.vp-doc a:hover{color:var(--instui-color-text-interactive-navigation-primary-hover)}.vp-doc strong,.vp-doc b{font-weight:var(--instui-component-text-content-important-font-weight)}.vp-doc em,.vp-doc i{font-style:italic}.vp-doc small{font-size:var(--instui-component-text-content-small-font-size)}.vp-doc del,.vp-doc s{color:var(--instui-color-text-muted);text-decoration:line-through}.vp-doc ul,.vp-doc ol{margin:var(--instui-spacing-space-md) 0;padding-inline-start:var(--instui-spacing-space-lg)}.vp-doc li{margin:var(--instui-spacing-space2xs) 0}.vp-doc li.task-list-item{list-style:none}.vp-doc input[type=checkbox]{accent-color:var(--instui-color-text-interactive-navigation-primary-base);margin-inline-end:var(--instui-spacing-space-xs)}.vp-doc blockquote{margin:var(--instui-spacing-space-md) 0;border-inline-start:var(--instui-border-width-lg) solid var(--instui-color-stroke-base);color:var(--instui-component-text-base-color);font-size:var(--instui-component-text-content-quote-font-size);line-height:var(--instui-component-text-content-quote-line-height);font-weight:var(--instui-component-text-content-quote-font-weight);font-style:var(--instui-component-text-content-quote-font-style);padding-inline-start:var(--instui-spacing-space-md)}.vp-doc code{font-family:var(--instui-font-family-code);background:var(--instui-color-background-muted);padding:var(--instui-spacing-space2xs) var(--instui-spacing-space-xs);border-radius:var(--instui-border-radius-sm);font-size:.9em}.vp-doc pre{font-family:var(--instui-font-family-code);background:var(--instui-color-background-container);color:var(--instui-color-text-base);padding:var(--instui-spacing-space-md);border:var(--instui-border-width-sm) solid var(--instui-color-stroke-base);border-radius:var(--instui-border-radius-md);overflow-x:auto}.vp-doc pre code{font-size:inherit;background:0 0;border-radius:0;padding:0}.vp-doc hr{border:none;border-top:var(--instui-border-width-sm) solid var(--instui-color-stroke-base);margin:var(--instui-spacing-space-lg) 0}.vp-doc img{border-radius:var(--instui-border-radius-md);max-width:100%}.vp-doc table:not([class]){border-collapse:collapse;width:100%;margin:var(--instui-spacing-space-md) 0;background:var(--instui-component-table-background);color:var(--instui-component-table-color);font-family:var(--instui-component-table-font-family);font-size:var(--instui-component-table-font-size)}.vp-doc table:not([class]) th{text-align:start;background:var(--instui-component-table-col-header-background);color:var(--instui-component-table-col-header-color);font-weight:var(--instui-component-table-head-font-weight);padding:var(--instui-component-table-col-header-padding-vertical) var(--instui-component-table-col-header-padding-horizontal);border-bottom:var(--instui-border-width-md) solid var(--instui-component-table-row-border-color)}.vp-doc table:not([class]) td{color:var(--instui-component-table-cell-color);line-height:var(--instui-component-table-cell-line-height);padding:var(--instui-component-table-cell-padding-vertical) var(--instui-component-table-cell-padding-horizontal);border-bottom:var(--instui-border-width-sm) solid var(--instui-component-table-row-border-color)}
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
|
+
//#region src/vitepress-vars.ts
|
|
5
|
+
/**
|
|
6
|
+
* Parsed VitePress → Instructure token mappings from `vitepress-vars.css`.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const cssPath = join(__dirname, "vitepress-vars.css");
|
|
4
13
|
/** Raw VitePress CSS variables and documentation. */
|
|
5
|
-
const VITEPRESS_VARS_CSS = readFileSync(
|
|
14
|
+
const VITEPRESS_VARS_CSS = readFileSync(cssPath, "utf-8");
|
|
6
15
|
/**
|
|
7
16
|
* Parse the VitePress variables CSS and extract the mappings into a Record.
|
|
8
17
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pantoken/vitepress",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Theme a VitePress site with Instructure tokens: maps VitePress --vp-* CSS variables to var(--instui-*).",
|
|
5
5
|
"homepage": "https://pantoken.iywahl.com",
|
|
6
6
|
"bugs": "https://github.com/thedannywahl/pantoken/issues",
|
|
@@ -27,20 +27,14 @@
|
|
|
27
27
|
"access": "public",
|
|
28
28
|
"provenance": true
|
|
29
29
|
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"generate": "node scripts/generate.ts",
|
|
32
|
-
"dev": "vp run generate && vp pack --watch",
|
|
33
|
-
"test": "vp test",
|
|
34
|
-
"check": "vp check"
|
|
35
|
-
},
|
|
36
30
|
"devDependencies": {
|
|
37
|
-
"@pantoken/components": "
|
|
38
|
-
"@pantoken/tokens": "
|
|
39
|
-
"@pantoken/utils": "
|
|
40
|
-
"@types/node": "
|
|
41
|
-
"typescript": "
|
|
42
|
-
"vite": "
|
|
43
|
-
"vite-plus": "
|
|
31
|
+
"@pantoken/components": "1.0.2",
|
|
32
|
+
"@pantoken/tokens": "0.3.0",
|
|
33
|
+
"@pantoken/utils": "1.0.1",
|
|
34
|
+
"@types/node": "^26.3.0",
|
|
35
|
+
"typescript": "^7.0.2",
|
|
36
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
|
|
37
|
+
"vite-plus": "0.3.0"
|
|
44
38
|
},
|
|
45
39
|
"engines": {
|
|
46
40
|
"node": ">=22.18.0"
|
|
@@ -48,5 +42,11 @@
|
|
|
48
42
|
"pantoken": {
|
|
49
43
|
"key": "vitepress",
|
|
50
44
|
"kind": "namespace"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"generate": "node scripts/generate.ts",
|
|
48
|
+
"dev": "vp run generate && vp pack --watch",
|
|
49
|
+
"test": "vp test",
|
|
50
|
+
"check": "vp check"
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|