eleventy-plugin-uncharted 0.7.1 → 0.7.3
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/css/uncharted.css +5 -4
- package/eleventy.config.js +7 -2
- package/package.json +1 -1
package/css/uncharted.css
CHANGED
|
@@ -126,17 +126,18 @@
|
|
|
126
126
|
margin-bottom: 1rem;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.chart-legend-item {
|
|
129
|
+
.chart-legend > .chart-legend-item {
|
|
130
130
|
display: flex;
|
|
131
|
-
align-items:
|
|
131
|
+
align-items: baseline;
|
|
132
132
|
gap: 0.5rem;
|
|
133
133
|
background: transparent;
|
|
134
|
+
margin: 0;
|
|
134
135
|
}
|
|
135
136
|
|
|
136
137
|
.chart-legend-item::before {
|
|
137
138
|
content: '';
|
|
138
|
-
width:
|
|
139
|
-
height:
|
|
139
|
+
width: 1cap;
|
|
140
|
+
height: 1cap;
|
|
140
141
|
border-radius: 2px;
|
|
141
142
|
background-color: var(--color);
|
|
142
143
|
flex-shrink: 0;
|
package/eleventy.config.js
CHANGED
|
@@ -11,7 +11,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
11
11
|
* Uncharted - Eleventy CSS Charts Plugin
|
|
12
12
|
* @param {Object} eleventyConfig - Eleventy configuration object
|
|
13
13
|
* @param {Object} [options] - Plugin options
|
|
14
|
-
* @param {string} [options.dataDir] - Data directory path (
|
|
14
|
+
* @param {string} [options.dataDir] - @deprecated Data directory path (now auto-detected from Eleventy's dir.data)
|
|
15
15
|
* @param {boolean} [options.animate] - Enable animations globally (individual charts can override)
|
|
16
16
|
* @param {string} [options.cssPath] - Output path for stylesheet (default: '/css/uncharted.css')
|
|
17
17
|
* @param {boolean} [options.injectCss] - Automatically copy and inject CSS (default: true)
|
|
@@ -28,9 +28,14 @@ export default function(eleventyConfig, options = {}) {
|
|
|
28
28
|
eleventyDirs = dirs;
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
+
// Warn if deprecated dataDir option is used
|
|
32
|
+
if (options.dataDir) {
|
|
33
|
+
console.warn('[uncharted] "dataDir" option is deprecated; the plugin now auto-detects from Eleventy\'s dir.data config');
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
// Helper to resolve data directory
|
|
32
37
|
function getDataDir() {
|
|
33
|
-
// Plugin option takes precedence if explicitly set
|
|
38
|
+
// Plugin option takes precedence if explicitly set (deprecated)
|
|
34
39
|
if (options.dataDir) {
|
|
35
40
|
return path.resolve(process.cwd(), options.dataDir);
|
|
36
41
|
}
|