@d3plus/docs 3.0.3 → 3.0.4
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.
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {addons} from "storybook/manager-api";
|
|
2
|
+
|
|
3
|
+
addons.register("Favicon", api => {
|
|
4
|
+
|
|
5
|
+
const setFavicon = () => {
|
|
6
|
+
|
|
7
|
+
const elem = document.querySelector("link[rel='icon']");
|
|
8
|
+
elem.href = "/images/favicon.ico?v=4";
|
|
9
|
+
elem.type = "image/png";
|
|
10
|
+
elem.sizes = "256x256";
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const detector = () => {
|
|
15
|
+
const elem = document.querySelector("link[rel='icon']");
|
|
16
|
+
if (elem && elem.href.endsWith("favicon.svg")) setFavicon();
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const observerOpts = {childList: true, subtree: true, characterData: true};
|
|
20
|
+
|
|
21
|
+
return new MutationObserver(detector).observe(document.head, observerOpts);
|
|
22
|
+
|
|
23
|
+
});
|
package/.storybook/main.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
<
|
|
2
|
-
<meta name="description" content="Data visualization made easy. A javascript library that extends the popular D3.js to enable fast and beautiful visualizations."/>
|
|
1
|
+
<meta name="description" content="An open-source JavaScript visualization library that streamlines the creation of beautiful and accessible SVG data visualizations."/>
|
|
3
2
|
|
|
4
|
-
<link rel="
|
|
5
|
-
<link rel="apple-touch-icon" sizes="256x256" href="/images/touchicon.png?v=3">
|
|
3
|
+
<link rel="apple-touch-icon" href="/images/touchicon.png?v=4" sizes="256x256">
|
|
6
4
|
|
|
7
5
|
<!-- Inter -->
|
|
8
6
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
7
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
8
|
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" rel="stylesheet">
|
|
11
9
|
|
|
10
|
+
<!-- Social Sharing META Tags -->
|
|
11
|
+
<meta property="og:title" content="D3plus">
|
|
12
|
+
<meta property="og:type" content="website" />
|
|
13
|
+
<meta property="og:image" content="https://d3plus.org/images/share.png?v=1">
|
|
14
|
+
<meta property="og:url" content="https://d3plus.org">
|
|
15
|
+
<meta name="twitter:card" content="summary">
|
|
16
|
+
|
|
12
17
|
<style>
|
|
13
18
|
|
|
14
19
|
/* styles logo text */
|
|
@@ -18,6 +23,7 @@
|
|
|
18
23
|
letter-spacing: 0;
|
|
19
24
|
}
|
|
20
25
|
|
|
26
|
+
/* hides top control bar */
|
|
21
27
|
.sb-bar {
|
|
22
28
|
display: none;
|
|
23
29
|
}
|
package/.storybook/manager.js
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {addons} from "storybook/manager-api";
|
|
2
|
+
|
|
3
|
+
const SITE_TITLE = "D3plus";
|
|
4
|
+
|
|
5
|
+
addons.register("Title", api => {
|
|
6
|
+
|
|
7
|
+
const setTitle = () => {
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
const storyData = api.getCurrentStoryData();
|
|
11
|
+
const prefix = storyData.title ? storyData.title.replace(/\//g, ' / ') : false;
|
|
12
|
+
document.title = prefix ? `${prefix} - ${SITE_TITLE}` : SITE_TITLE;
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
15
|
+
document.title = SITE_TITLE;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const detector = () => {
|
|
21
|
+
if (document.title.endsWith("Storybook")) setTitle();
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const elem = document.querySelector("title");
|
|
25
|
+
|
|
26
|
+
const observerOpts = {childList: true, subtree: true, characterData: true};
|
|
27
|
+
|
|
28
|
+
return new MutationObserver(detector).observe(elem, observerOpts);
|
|
29
|
+
|
|
30
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d3plus/docs",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "Documentation and examples for the d3plus visualization library.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://d3plus.org",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"dev:local": "storybook dev --docs --ci --no-version-updates --port=4000"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@d3plus/core": "3.0.
|
|
20
|
-
"@d3plus/dom": "3.0.
|
|
21
|
-
"@d3plus/format": "3.0.
|
|
22
|
-
"@d3plus/locales": "3.0.
|
|
23
|
-
"@d3plus/react": "3.0.
|
|
19
|
+
"@d3plus/core": "3.0.4",
|
|
20
|
+
"@d3plus/dom": "3.0.4",
|
|
21
|
+
"@d3plus/format": "3.0.4",
|
|
22
|
+
"@d3plus/locales": "3.0.4",
|
|
23
|
+
"@d3plus/react": "3.0.4",
|
|
24
24
|
"@types/react": "^19.1.0",
|
|
25
25
|
"next": "^15.2.4",
|
|
26
26
|
"react": "^18.2.0",
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
parameters: {
|
|
13
13
|
docs: {
|
|
14
14
|
description: {
|
|
15
|
-
component: "Capitalizes the first letter of each word in a phrase/sentence.",
|
|
15
|
+
component: "Capitalizes the first letter of each word in a phrase/sentence, accounting for words in English that should be kept lowercase such as \"and\" or \"of\", as well as acronym that should be kept uppercase such as \"CEO\" or \"TVs\".",
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
}
|
|
Binary file
|