vite-plugin-react-deck 1.8.2 → 1.9.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/helpers.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { green, purple, solarizedLight } from "./themes";
1
+ import { dark, green, purple, solarizedLight } from "./themes";
2
2
  declare const themes: {
3
+ readonly dark: typeof dark;
3
4
  readonly green: typeof green;
4
5
  readonly purple: typeof purple;
5
6
  readonly "solarized-light": typeof solarizedLight;
package/index.cjs CHANGED
@@ -30,41 +30,63 @@ var fs2 = __toESM(require("fs/promises"), 1);
30
30
  var glob = __toESM(require("glob"), 1);
31
31
  var import_gray_matter2 = __toESM(require("gray-matter"), 1);
32
32
 
33
+ // src/themes/dark.ts
34
+ var dark_exports = {};
35
+ __export(dark_exports, {
36
+ themeTokens: () => themeTokens
37
+ });
38
+ var colors = {
39
+ primary: "#E8E8ED",
40
+ // soft white text
41
+ secondary: "#6E56CF",
42
+ // vibrant purple accent
43
+ tertiary: "#111113"
44
+ // near-black background
45
+ };
46
+ var fonts = {
47
+ header: '"Inter", "Helvetica Neue", Helvetica, Arial, sans-serif',
48
+ text: '"Inter", "Helvetica Neue", Helvetica, Arial, sans-serif'
49
+ };
50
+ var themeTokens = {
51
+ colors,
52
+ fonts
53
+ };
54
+
33
55
  // src/themes/green.ts
34
56
  var green_exports = {};
35
57
  __export(green_exports, {
36
- themeTokens: () => themeTokens
58
+ themeTokens: () => themeTokens2
37
59
  });
38
- var colors = {
60
+ var colors2 = {
39
61
  primary: "#FFFFFF",
40
62
  secondary: "#F49676",
41
63
  tertiary: "#042F3B"
42
64
  };
43
- var themeTokens = {
44
- colors
65
+ var themeTokens2 = {
66
+ colors: colors2
45
67
  };
46
68
 
47
69
  // src/themes/purple.ts
48
70
  var purple_exports = {};
49
71
  __export(purple_exports, {
50
- themeTokens: () => themeTokens2
72
+ themeTokens: () => themeTokens3
51
73
  });
52
- var colors2 = {
74
+ var colors3 = {
53
75
  //primary: "#56D4F8",
54
76
  primary: "#ffffff",
55
77
  secondary: "#F530EC",
56
78
  tertiary: "#2B135A"
57
79
  };
58
- var themeTokens2 = {
59
- colors: colors2
80
+ var themeTokens3 = {
81
+ colors: colors3
60
82
  };
61
83
 
62
84
  // src/themes/solarized-light.ts
63
85
  var solarized_light_exports = {};
64
86
  __export(solarized_light_exports, {
65
- themeTokens: () => themeTokens3
87
+ themeTokens: () => themeTokens4
66
88
  });
67
- var colors3 = {
89
+ var colors4 = {
68
90
  primary: "#073642",
69
91
  // base02 - dark text on light background
70
92
  secondary: "#268bd2",
@@ -72,17 +94,18 @@ var colors3 = {
72
94
  tertiary: "#fdf6e3"
73
95
  // base3 - light background
74
96
  };
75
- var fonts = {
97
+ var fonts2 = {
76
98
  header: '"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif',
77
99
  text: '"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif'
78
100
  };
79
- var themeTokens3 = {
80
- colors: colors3,
81
- fonts
101
+ var themeTokens4 = {
102
+ colors: colors4,
103
+ fonts: fonts2
82
104
  };
83
105
 
84
106
  // src/helpers.ts
85
107
  var themes = {
108
+ dark: dark_exports,
86
109
  green: green_exports,
87
110
  purple: purple_exports,
88
111
  "solarized-light": solarized_light_exports
@@ -113,10 +136,10 @@ function createDecksPageFile({
113
136
  }) {
114
137
  var _a;
115
138
  const themeModule = themes[theme];
116
- const colors4 = (_a = themeModule == null ? void 0 : themeModule.themeTokens) == null ? void 0 : _a.colors;
117
- const primary = (colors4 == null ? void 0 : colors4.primary) ?? "#ffffff";
118
- const secondary = (colors4 == null ? void 0 : colors4.secondary) ?? "#F49676";
119
- const tertiary = (colors4 == null ? void 0 : colors4.tertiary) ?? "#042F3B";
139
+ const colors5 = (_a = themeModule == null ? void 0 : themeModule.themeTokens) == null ? void 0 : _a.colors;
140
+ const primary = (colors5 == null ? void 0 : colors5.primary) ?? "#ffffff";
141
+ const secondary = (colors5 == null ? void 0 : colors5.secondary) ?? "#F49676";
142
+ const tertiary = (colors5 == null ? void 0 : colors5.tertiary) ?? "#042F3B";
120
143
  return `import React, { StrictMode, useState } from "react";
121
144
  import * as ReactDOM from "react-dom/client";
122
145
 
@@ -642,7 +665,7 @@ var import_lodash = __toESM(require("lodash"), 1);
642
665
  // src/types.ts
643
666
  var import_zod = require("zod");
644
667
  var PestacleConfigSchema = import_zod.z.object({
645
- theme: import_zod.z.enum(["green", "purple", "solarized-light"]).default("green"),
668
+ theme: import_zod.z.enum(["dark", "green", "purple", "solarized-light"]).default("green"),
646
669
  startupPage: import_zod.z.boolean().optional(),
647
670
  transition: import_zod.z.enum(["fade", "slide", "drop", "none"]).optional()
648
671
  });
package/index.mjs CHANGED
@@ -9,41 +9,63 @@ import * as fs2 from "fs/promises";
9
9
  import * as glob from "glob";
10
10
  import matter2 from "gray-matter";
11
11
 
12
+ // src/themes/dark.ts
13
+ var dark_exports = {};
14
+ __export(dark_exports, {
15
+ themeTokens: () => themeTokens
16
+ });
17
+ var colors = {
18
+ primary: "#E8E8ED",
19
+ // soft white text
20
+ secondary: "#6E56CF",
21
+ // vibrant purple accent
22
+ tertiary: "#111113"
23
+ // near-black background
24
+ };
25
+ var fonts = {
26
+ header: '"Inter", "Helvetica Neue", Helvetica, Arial, sans-serif',
27
+ text: '"Inter", "Helvetica Neue", Helvetica, Arial, sans-serif'
28
+ };
29
+ var themeTokens = {
30
+ colors,
31
+ fonts
32
+ };
33
+
12
34
  // src/themes/green.ts
13
35
  var green_exports = {};
14
36
  __export(green_exports, {
15
- themeTokens: () => themeTokens
37
+ themeTokens: () => themeTokens2
16
38
  });
17
- var colors = {
39
+ var colors2 = {
18
40
  primary: "#FFFFFF",
19
41
  secondary: "#F49676",
20
42
  tertiary: "#042F3B"
21
43
  };
22
- var themeTokens = {
23
- colors
44
+ var themeTokens2 = {
45
+ colors: colors2
24
46
  };
25
47
 
26
48
  // src/themes/purple.ts
27
49
  var purple_exports = {};
28
50
  __export(purple_exports, {
29
- themeTokens: () => themeTokens2
51
+ themeTokens: () => themeTokens3
30
52
  });
31
- var colors2 = {
53
+ var colors3 = {
32
54
  //primary: "#56D4F8",
33
55
  primary: "#ffffff",
34
56
  secondary: "#F530EC",
35
57
  tertiary: "#2B135A"
36
58
  };
37
- var themeTokens2 = {
38
- colors: colors2
59
+ var themeTokens3 = {
60
+ colors: colors3
39
61
  };
40
62
 
41
63
  // src/themes/solarized-light.ts
42
64
  var solarized_light_exports = {};
43
65
  __export(solarized_light_exports, {
44
- themeTokens: () => themeTokens3
66
+ themeTokens: () => themeTokens4
45
67
  });
46
- var colors3 = {
68
+ var colors4 = {
47
69
  primary: "#073642",
48
70
  // base02 - dark text on light background
49
71
  secondary: "#268bd2",
@@ -51,17 +73,18 @@ var colors3 = {
51
73
  tertiary: "#fdf6e3"
52
74
  // base3 - light background
53
75
  };
54
- var fonts = {
76
+ var fonts2 = {
55
77
  header: '"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif',
56
78
  text: '"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif'
57
79
  };
58
- var themeTokens3 = {
59
- colors: colors3,
60
- fonts
80
+ var themeTokens4 = {
81
+ colors: colors4,
82
+ fonts: fonts2
61
83
  };
62
84
 
63
85
  // src/helpers.ts
64
86
  var themes = {
87
+ dark: dark_exports,
65
88
  green: green_exports,
66
89
  purple: purple_exports,
67
90
  "solarized-light": solarized_light_exports
@@ -92,10 +115,10 @@ function createDecksPageFile({
92
115
  }) {
93
116
  var _a;
94
117
  const themeModule = themes[theme];
95
- const colors4 = (_a = themeModule == null ? void 0 : themeModule.themeTokens) == null ? void 0 : _a.colors;
96
- const primary = (colors4 == null ? void 0 : colors4.primary) ?? "#ffffff";
97
- const secondary = (colors4 == null ? void 0 : colors4.secondary) ?? "#F49676";
98
- const tertiary = (colors4 == null ? void 0 : colors4.tertiary) ?? "#042F3B";
118
+ const colors5 = (_a = themeModule == null ? void 0 : themeModule.themeTokens) == null ? void 0 : _a.colors;
119
+ const primary = (colors5 == null ? void 0 : colors5.primary) ?? "#ffffff";
120
+ const secondary = (colors5 == null ? void 0 : colors5.secondary) ?? "#F49676";
121
+ const tertiary = (colors5 == null ? void 0 : colors5.tertiary) ?? "#042F3B";
99
122
  return `import React, { StrictMode, useState } from "react";
100
123
  import * as ReactDOM from "react-dom/client";
101
124
 
@@ -621,7 +644,7 @@ import _ from "lodash";
621
644
  // src/types.ts
622
645
  import { z } from "zod";
623
646
  var PestacleConfigSchema = z.object({
624
- theme: z.enum(["green", "purple", "solarized-light"]).default("green"),
647
+ theme: z.enum(["dark", "green", "purple", "solarized-light"]).default("green"),
625
648
  startupPage: z.boolean().optional(),
626
649
  transition: z.enum(["fade", "slide", "drop", "none"]).optional()
627
650
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-react-deck",
3
- "version": "1.8.2",
3
+ "version": "1.9.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "index.cjs",
@@ -0,0 +1,11 @@
1
+ export declare const themeTokens: {
2
+ colors: {
3
+ primary: string;
4
+ secondary: string;
5
+ tertiary: string;
6
+ };
7
+ fonts: {
8
+ header: string;
9
+ text: string;
10
+ };
11
+ };
package/themes/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * as dark from "./dark";
1
2
  export * as green from "./green";
2
3
  export * as purple from "./purple";
3
4
  export * as solarizedLight from "./solarized-light";
package/types.d.ts CHANGED
@@ -4,7 +4,7 @@ export type TransitionName = (typeof TransitionNames)[number];
4
4
  export interface ReactDeckOptions {
5
5
  rehypePlugins: any[];
6
6
  remarkPlugins: any[];
7
- theme: "green" | "purple" | "solarized-light";
7
+ theme: "dark" | "green" | "purple" | "solarized-light";
8
8
  /** Show the talks listing page. Defaults to true in dev, false in production. */
9
9
  startupPage?: boolean;
10
10
  /** Default slide transition. */
@@ -12,6 +12,7 @@ export interface ReactDeckOptions {
12
12
  }
13
13
  export declare const PestacleConfigSchema: z.ZodObject<{
14
14
  theme: z.ZodDefault<z.ZodEnum<{
15
+ dark: "dark";
15
16
  green: "green";
16
17
  purple: "purple";
17
18
  "solarized-light": "solarized-light";