vite-plugin-react-deck 1.9.1 → 1.10.0
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 +2 -1
- package/index.cjs +38 -15
- package/index.mjs +38 -15
- package/package.json +1 -1
- package/themes/index.d.ts +1 -0
- package/themes/light.d.ts +11 -0
- package/types.d.ts +2 -1
package/helpers.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { dark, green, purple, solarizedLight } from "./themes";
|
|
1
|
+
import { dark, green, light, purple, solarizedLight } from "./themes";
|
|
2
2
|
declare const themes: {
|
|
3
3
|
readonly dark: typeof dark;
|
|
4
4
|
readonly green: typeof green;
|
|
5
|
+
readonly light: typeof light;
|
|
5
6
|
readonly purple: typeof purple;
|
|
6
7
|
readonly "solarized-light": typeof solarizedLight;
|
|
7
8
|
};
|
package/index.cjs
CHANGED
|
@@ -66,27 +66,49 @@ var themeTokens2 = {
|
|
|
66
66
|
colors: colors2
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
+
// src/themes/light.ts
|
|
70
|
+
var light_exports = {};
|
|
71
|
+
__export(light_exports, {
|
|
72
|
+
themeTokens: () => themeTokens3
|
|
73
|
+
});
|
|
74
|
+
var colors3 = {
|
|
75
|
+
primary: "#1a1a2e",
|
|
76
|
+
// dark navy text
|
|
77
|
+
secondary: "#0077b6",
|
|
78
|
+
// vivid blue accent
|
|
79
|
+
tertiary: "#f5f5f7"
|
|
80
|
+
// off-white background
|
|
81
|
+
};
|
|
82
|
+
var fonts2 = {
|
|
83
|
+
header: '"Inter", "Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
84
|
+
text: '"Inter", "Helvetica Neue", Helvetica, Arial, sans-serif'
|
|
85
|
+
};
|
|
86
|
+
var themeTokens3 = {
|
|
87
|
+
colors: colors3,
|
|
88
|
+
fonts: fonts2
|
|
89
|
+
};
|
|
90
|
+
|
|
69
91
|
// src/themes/purple.ts
|
|
70
92
|
var purple_exports = {};
|
|
71
93
|
__export(purple_exports, {
|
|
72
|
-
themeTokens: () =>
|
|
94
|
+
themeTokens: () => themeTokens4
|
|
73
95
|
});
|
|
74
|
-
var
|
|
96
|
+
var colors4 = {
|
|
75
97
|
//primary: "#56D4F8",
|
|
76
98
|
primary: "#ffffff",
|
|
77
99
|
secondary: "#F530EC",
|
|
78
100
|
tertiary: "#2B135A"
|
|
79
101
|
};
|
|
80
|
-
var
|
|
81
|
-
colors:
|
|
102
|
+
var themeTokens4 = {
|
|
103
|
+
colors: colors4
|
|
82
104
|
};
|
|
83
105
|
|
|
84
106
|
// src/themes/solarized-light.ts
|
|
85
107
|
var solarized_light_exports = {};
|
|
86
108
|
__export(solarized_light_exports, {
|
|
87
|
-
themeTokens: () =>
|
|
109
|
+
themeTokens: () => themeTokens5
|
|
88
110
|
});
|
|
89
|
-
var
|
|
111
|
+
var colors5 = {
|
|
90
112
|
primary: "#073642",
|
|
91
113
|
// base02 - dark text on light background
|
|
92
114
|
secondary: "#268bd2",
|
|
@@ -94,19 +116,20 @@ var colors4 = {
|
|
|
94
116
|
tertiary: "#fdf6e3"
|
|
95
117
|
// base3 - light background
|
|
96
118
|
};
|
|
97
|
-
var
|
|
119
|
+
var fonts3 = {
|
|
98
120
|
header: '"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
99
121
|
text: '"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif'
|
|
100
122
|
};
|
|
101
|
-
var
|
|
102
|
-
colors:
|
|
103
|
-
fonts:
|
|
123
|
+
var themeTokens5 = {
|
|
124
|
+
colors: colors5,
|
|
125
|
+
fonts: fonts3
|
|
104
126
|
};
|
|
105
127
|
|
|
106
128
|
// src/helpers.ts
|
|
107
129
|
var themes = {
|
|
108
130
|
dark: dark_exports,
|
|
109
131
|
green: green_exports,
|
|
132
|
+
light: light_exports,
|
|
110
133
|
purple: purple_exports,
|
|
111
134
|
"solarized-light": solarized_light_exports
|
|
112
135
|
};
|
|
@@ -136,10 +159,10 @@ function createDecksPageFile({
|
|
|
136
159
|
}) {
|
|
137
160
|
var _a;
|
|
138
161
|
const themeModule = themes[theme];
|
|
139
|
-
const
|
|
140
|
-
const primary = (
|
|
141
|
-
const secondary = (
|
|
142
|
-
const tertiary = (
|
|
162
|
+
const colors6 = (_a = themeModule == null ? void 0 : themeModule.themeTokens) == null ? void 0 : _a.colors;
|
|
163
|
+
const primary = (colors6 == null ? void 0 : colors6.primary) ?? "#ffffff";
|
|
164
|
+
const secondary = (colors6 == null ? void 0 : colors6.secondary) ?? "#F49676";
|
|
165
|
+
const tertiary = (colors6 == null ? void 0 : colors6.tertiary) ?? "#042F3B";
|
|
143
166
|
return `import React, { StrictMode, useState } from "react";
|
|
144
167
|
import * as ReactDOM from "react-dom/client";
|
|
145
168
|
|
|
@@ -665,7 +688,7 @@ var import_lodash = __toESM(require("lodash"), 1);
|
|
|
665
688
|
// src/types.ts
|
|
666
689
|
var import_zod = require("zod");
|
|
667
690
|
var PestacleConfigSchema = import_zod.z.object({
|
|
668
|
-
theme: import_zod.z.enum(["dark", "green", "purple", "solarized-light"]).default("green"),
|
|
691
|
+
theme: import_zod.z.enum(["dark", "green", "light", "purple", "solarized-light"]).default("green"),
|
|
669
692
|
startupPage: import_zod.z.boolean().optional(),
|
|
670
693
|
transition: import_zod.z.enum(["fade", "slide", "drop", "none"]).optional()
|
|
671
694
|
});
|
package/index.mjs
CHANGED
|
@@ -45,27 +45,49 @@ var themeTokens2 = {
|
|
|
45
45
|
colors: colors2
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
+
// src/themes/light.ts
|
|
49
|
+
var light_exports = {};
|
|
50
|
+
__export(light_exports, {
|
|
51
|
+
themeTokens: () => themeTokens3
|
|
52
|
+
});
|
|
53
|
+
var colors3 = {
|
|
54
|
+
primary: "#1a1a2e",
|
|
55
|
+
// dark navy text
|
|
56
|
+
secondary: "#0077b6",
|
|
57
|
+
// vivid blue accent
|
|
58
|
+
tertiary: "#f5f5f7"
|
|
59
|
+
// off-white background
|
|
60
|
+
};
|
|
61
|
+
var fonts2 = {
|
|
62
|
+
header: '"Inter", "Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
63
|
+
text: '"Inter", "Helvetica Neue", Helvetica, Arial, sans-serif'
|
|
64
|
+
};
|
|
65
|
+
var themeTokens3 = {
|
|
66
|
+
colors: colors3,
|
|
67
|
+
fonts: fonts2
|
|
68
|
+
};
|
|
69
|
+
|
|
48
70
|
// src/themes/purple.ts
|
|
49
71
|
var purple_exports = {};
|
|
50
72
|
__export(purple_exports, {
|
|
51
|
-
themeTokens: () =>
|
|
73
|
+
themeTokens: () => themeTokens4
|
|
52
74
|
});
|
|
53
|
-
var
|
|
75
|
+
var colors4 = {
|
|
54
76
|
//primary: "#56D4F8",
|
|
55
77
|
primary: "#ffffff",
|
|
56
78
|
secondary: "#F530EC",
|
|
57
79
|
tertiary: "#2B135A"
|
|
58
80
|
};
|
|
59
|
-
var
|
|
60
|
-
colors:
|
|
81
|
+
var themeTokens4 = {
|
|
82
|
+
colors: colors4
|
|
61
83
|
};
|
|
62
84
|
|
|
63
85
|
// src/themes/solarized-light.ts
|
|
64
86
|
var solarized_light_exports = {};
|
|
65
87
|
__export(solarized_light_exports, {
|
|
66
|
-
themeTokens: () =>
|
|
88
|
+
themeTokens: () => themeTokens5
|
|
67
89
|
});
|
|
68
|
-
var
|
|
90
|
+
var colors5 = {
|
|
69
91
|
primary: "#073642",
|
|
70
92
|
// base02 - dark text on light background
|
|
71
93
|
secondary: "#268bd2",
|
|
@@ -73,19 +95,20 @@ var colors4 = {
|
|
|
73
95
|
tertiary: "#fdf6e3"
|
|
74
96
|
// base3 - light background
|
|
75
97
|
};
|
|
76
|
-
var
|
|
98
|
+
var fonts3 = {
|
|
77
99
|
header: '"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
78
100
|
text: '"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif'
|
|
79
101
|
};
|
|
80
|
-
var
|
|
81
|
-
colors:
|
|
82
|
-
fonts:
|
|
102
|
+
var themeTokens5 = {
|
|
103
|
+
colors: colors5,
|
|
104
|
+
fonts: fonts3
|
|
83
105
|
};
|
|
84
106
|
|
|
85
107
|
// src/helpers.ts
|
|
86
108
|
var themes = {
|
|
87
109
|
dark: dark_exports,
|
|
88
110
|
green: green_exports,
|
|
111
|
+
light: light_exports,
|
|
89
112
|
purple: purple_exports,
|
|
90
113
|
"solarized-light": solarized_light_exports
|
|
91
114
|
};
|
|
@@ -115,10 +138,10 @@ function createDecksPageFile({
|
|
|
115
138
|
}) {
|
|
116
139
|
var _a;
|
|
117
140
|
const themeModule = themes[theme];
|
|
118
|
-
const
|
|
119
|
-
const primary = (
|
|
120
|
-
const secondary = (
|
|
121
|
-
const tertiary = (
|
|
141
|
+
const colors6 = (_a = themeModule == null ? void 0 : themeModule.themeTokens) == null ? void 0 : _a.colors;
|
|
142
|
+
const primary = (colors6 == null ? void 0 : colors6.primary) ?? "#ffffff";
|
|
143
|
+
const secondary = (colors6 == null ? void 0 : colors6.secondary) ?? "#F49676";
|
|
144
|
+
const tertiary = (colors6 == null ? void 0 : colors6.tertiary) ?? "#042F3B";
|
|
122
145
|
return `import React, { StrictMode, useState } from "react";
|
|
123
146
|
import * as ReactDOM from "react-dom/client";
|
|
124
147
|
|
|
@@ -644,7 +667,7 @@ import _ from "lodash";
|
|
|
644
667
|
// src/types.ts
|
|
645
668
|
import { z } from "zod";
|
|
646
669
|
var PestacleConfigSchema = z.object({
|
|
647
|
-
theme: z.enum(["dark", "green", "purple", "solarized-light"]).default("green"),
|
|
670
|
+
theme: z.enum(["dark", "green", "light", "purple", "solarized-light"]).default("green"),
|
|
648
671
|
startupPage: z.boolean().optional(),
|
|
649
672
|
transition: z.enum(["fade", "slide", "drop", "none"]).optional()
|
|
650
673
|
});
|
package/package.json
CHANGED
package/themes/index.d.ts
CHANGED
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: "dark" | "green" | "purple" | "solarized-light";
|
|
7
|
+
theme: "dark" | "green" | "light" | "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. */
|
|
@@ -14,6 +14,7 @@ export declare const PestacleConfigSchema: z.ZodObject<{
|
|
|
14
14
|
theme: z.ZodDefault<z.ZodEnum<{
|
|
15
15
|
dark: "dark";
|
|
16
16
|
green: "green";
|
|
17
|
+
light: "light";
|
|
17
18
|
purple: "purple";
|
|
18
19
|
"solarized-light": "solarized-light";
|
|
19
20
|
}>>;
|