@t8/docsgen 0.1.17 → 0.1.18

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/dist/bin.js CHANGED
@@ -520,7 +520,7 @@ var exec = (0, import_node_util.promisify)(import_node_child_process.exec);
520
520
  async function setContent(ctx) {
521
521
  let {
522
522
  dir = "",
523
- colorScheme,
523
+ baseColor,
524
524
  theme,
525
525
  root,
526
526
  contentDir = "",
@@ -537,8 +537,7 @@ async function setContent(ctx) {
537
537
  let packageUrl = `https://unpkg.com/${packageName}@${packageVersion}`;
538
538
  let rootAttrs = "";
539
539
  if (theme) rootAttrs += ` data-theme="${escapeHTML(theme)}"`;
540
- if (colorScheme)
541
- rootAttrs += ` style="--color-scheme: ${escapeHTML(colorScheme)}"`;
540
+ if (baseColor) rootAttrs += ` style="--base-color: ${escapeHTML(baseColor)}"`;
542
541
  let icon = getIcon(ctx);
543
542
  let iconTag = icon.url ? `<link rel="icon"${icon.type ? ` type="${icon.type}"` : ""} href="${icon.url}">` : "";
544
543
  if (redirect) {
@@ -737,13 +736,10 @@ function getIconContent(baseColor = "gray") {
737
736
  }
738
737
 
739
738
  // src/bin/setImages.ts
740
- async function setImages({ dir = "", colorScheme, favicon }) {
739
+ async function setImages({ dir = "", baseColor, favicon }) {
741
740
  if (favicon) return;
742
- await (0, import_promises5.writeFile)(
743
- (0, import_node_path4.join)(dir, "./favicon.svg"),
744
- `${getIconContent(colorScheme)}
745
- `
746
- );
741
+ await (0, import_promises5.writeFile)((0, import_node_path4.join)(dir, "./favicon.svg"), `${getIconContent(baseColor)}
742
+ `);
747
743
  }
748
744
 
749
745
  // src/bin/createFiles.ts
package/dist/css/base.css CHANGED
@@ -2,7 +2,7 @@
2
2
  color-scheme: light dark;
3
3
 
4
4
  --b0: light-dark(white, #1a1a1a);
5
- --b1: var(--color-scheme, gray);
5
+ --b1: var(--base-color, gray);
6
6
  --link-color: light-dark(royalblue, deepskyblue);
7
7
  --button-color: light-dark(royalblue, royalblue);
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t8/docsgen",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "",
5
5
  "main": "dist/bin.js",
6
6
  "bin": {
@@ -19,7 +19,7 @@ const exec = promisify(defaultExec);
19
19
  export async function setContent(ctx: Context) {
20
20
  let {
21
21
  dir = "",
22
- colorScheme,
22
+ baseColor,
23
23
  theme,
24
24
  root,
25
25
  contentDir = "",
@@ -45,8 +45,7 @@ export async function setContent(ctx: Context) {
45
45
 
46
46
  if (theme) rootAttrs += ` data-theme="${escapeHTML(theme)}"`;
47
47
 
48
- if (colorScheme)
49
- rootAttrs += ` style="--color-scheme: ${escapeHTML(colorScheme)}"`;
48
+ if (baseColor) rootAttrs += ` style="--base-color: ${escapeHTML(baseColor)}"`;
50
49
 
51
50
  let icon = getIcon(ctx);
52
51
  let iconTag = icon.url
@@ -3,11 +3,8 @@ import { join } from "node:path";
3
3
  import type { Context } from "../types/Context";
4
4
  import { getIconContent } from "../utils/getIconContent";
5
5
 
6
- export async function setImages({ dir = "", colorScheme, favicon }: Context) {
6
+ export async function setImages({ dir = "", baseColor, favicon }: Context) {
7
7
  if (favicon) return;
8
8
 
9
- await writeFile(
10
- join(dir, "./favicon.svg"),
11
- `${getIconContent(colorScheme)}\n`,
12
- );
9
+ await writeFile(join(dir, "./favicon.svg"), `${getIconContent(baseColor)}\n`);
13
10
  }
package/src/css/base.css CHANGED
@@ -2,7 +2,7 @@
2
2
  color-scheme: light dark;
3
3
 
4
4
  --b0: light-dark(white, #1a1a1a);
5
- --b1: var(--color-scheme, gray);
5
+ --b1: var(--base-color, gray);
6
6
  --link-color: light-dark(royalblue, deepskyblue);
7
7
  --button-color: light-dark(royalblue, royalblue);
8
8
 
@@ -4,7 +4,7 @@ export type EntryConfig = {
4
4
  id?: string;
5
5
  source?: string;
6
6
  dir?: string;
7
- colorScheme?: string;
7
+ baseColor?: string;
8
8
  theme?: Theme;
9
9
  name?: string;
10
10
  title?: string;