Skip to content

Commit ab19195

Browse files
chore(build): Rebuild plugin [skip ci]
1 parent 1e73db4 commit ab19195

File tree

3 files changed

+45
-34
lines changed

3 files changed

+45
-34
lines changed

dist/index.mjs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,18 +2165,13 @@ function docusaurusPluginResistogram(ctx, opts = {}) {
21652165
pluginId
21662166
);
21672167
(0, import_fs_extra.ensureDirSync)(pluginDataDir);
2168-
const isProd = process.env.NODE_ENV === "production";
21692168
return {
21702169
name: "docusaurus-plugin-resistogram",
21712170
getThemePath() {
21722171
return path.resolve(__dirname, "./theme");
21732172
},
2174-
// Explicitly add the theme's stylesheet to the client modules only for the production build.
2175-
// This is a workaround for an issue where the styles are not being picked up automatically
2176-
// in the production build. In development, this is disabled to allow for hot-reloading
2177-
// and correct dark mode behavior.
21782173
getClientModules() {
2179-
return isProd ? [path.resolve(__dirname, "./theme/ResistanceTable/styles.module.css")] : [];
2174+
return [path.resolve(__dirname, "./plugin.css")];
21802175
},
21812176
async contentLoaded({ actions }) {
21822177
const { abx, org, sources, hierarchicalSources, allAbxIds, allOrgIds, orgClasses, orgIdToRank, abxSyn2Id, orgSyn2Id } = await getSharedData(dataPath, files);

dist/plugin.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
:root {
2+
/* Core colors */
3+
--rt-border-color: #ddd;
4+
--rt-background-color: #fff;
5+
--rt-text-color: #333;
6+
7+
/* Component backgrounds */
8+
--rt-subtle-background: #f9f9f9;
9+
--rt-subtle-background-hover: #f0f0f0;
10+
--rt-source-info-background: #f0f0f0;
11+
--rt-source-info-text: #666;
12+
--rt-empty-cell-background: #f2f2f2;
13+
14+
/* Tooltip */
15+
--rt-tooltip-background: rgba(60, 60, 60, 0.9);
16+
--rt-tooltip-text: #fff;
17+
18+
/* Shape */
19+
--rt-tab-radius: 5px;
20+
}
21+
/*
22+
Use a generic [data-theme='dark'] selector so variables apply
23+
regardless of whether Docusaurus sets the attribute on html or body.
24+
Centralizing all variables here avoids CSS-module scoping/order issues
25+
between dev and production builds.
26+
*/
27+
[data-theme='dark'] {
28+
/* Core colors */
29+
--rt-border-color: #444;
30+
--rt-background-color: #1e1e1e;
31+
--rt-text-color: #eee;
32+
33+
/* Component backgrounds */
34+
--rt-subtle-background: #252525;
35+
--rt-subtle-background-hover: #333;
36+
--rt-source-info-background: #333;
37+
--rt-source-info-text: #bbb;
38+
--rt-empty-cell-background: #2a2a2a;
39+
40+
/* Tooltip */
41+
--rt-tooltip-background: rgba(200, 200, 200, 0.9);
42+
--rt-tooltip-text: #000;
43+
}

dist/theme/ResistanceTable/styles.module.css

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,6 @@
22
General Styles
33
============================================================================ */
44

5-
:root {
6-
--rt-border-color: #ddd;
7-
--rt-background-color: #fff;
8-
--rt-text-color: #333;
9-
--rt-subtle-background: #f9f9f9;
10-
--rt-subtle-background-hover: #f0f0f0;
11-
--rt-source-info-background: #f0f0f0;
12-
--rt-source-info-text: #666;
13-
--rt-empty-cell-background: #f2f2f2;
14-
--rt-tooltip-background: rgba(60, 60, 60, 0.9);
15-
--rt-tooltip-text: #fff;
16-
--rt-tab-radius: 5px;
17-
}
18-
19-
[data-theme='dark'] {
20-
--rt-border-color: #444;
21-
--rt-background-color: #1e1e1e;
22-
--rt-text-color: #eee;
23-
--rt-subtle-background: #252525;
24-
--rt-subtle-background-hover: #333;
25-
--rt-source-info-background: #333;
26-
--rt-source-info-text: #bbb;
27-
--rt-empty-cell-background: #2a2a2a;
28-
--rt-tooltip-background: rgba(200, 200, 200, 0.9);
29-
--rt-tooltip-text: #000;
30-
}
31-
325
.error {
336
color: red;
347
border: 1px solid red;
@@ -291,4 +264,4 @@
291264
to {
292265
transform: rotate(360deg);
293266
}
294-
}
267+
}

0 commit comments

Comments
 (0)