@blueprintjs/icons 4.0.0-beta.6 → 4.0.0-rc.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/dist/icons.bundle.js +1 -1
- package/icons.json +1127 -539
- package/lib/cjs/generated/16px/blueprint-icons-16.d.ts +9 -2
- package/lib/cjs/generated/16px/blueprint-icons-16.js +553 -539
- package/lib/cjs/generated/16px/blueprint-icons-16.js.map +1 -1
- package/lib/cjs/generated/16px/paths/add-clip.d.ts +2 -0
- package/lib/cjs/generated/16px/paths/add-clip.js +4 -0
- package/lib/cjs/generated/16px/paths/add-clip.js.map +1 -0
- package/lib/cjs/generated/16px/paths/cargo-ship.d.ts +2 -0
- package/lib/cjs/generated/16px/paths/cargo-ship.js +4 -0
- package/lib/cjs/generated/16px/paths/cargo-ship.js.map +1 -0
- package/lib/cjs/generated/16px/paths/clip.d.ts +2 -0
- package/lib/cjs/generated/16px/paths/clip.js +4 -0
- package/lib/cjs/generated/16px/paths/clip.js.map +1 -0
- package/lib/cjs/generated/16px/paths/index.d.ts +7 -0
- package/lib/cjs/generated/16px/paths/index.js +25 -11
- package/lib/cjs/generated/16px/paths/index.js.map +1 -1
- package/lib/cjs/generated/16px/paths/rectangle.d.ts +2 -0
- package/lib/cjs/generated/16px/paths/rectangle.js +4 -0
- package/lib/cjs/generated/16px/paths/rectangle.js.map +1 -0
- package/lib/cjs/generated/16px/paths/ship.d.ts +2 -0
- package/lib/cjs/generated/16px/paths/ship.js +4 -0
- package/lib/cjs/generated/16px/paths/ship.js.map +1 -0
- package/lib/cjs/generated/16px/paths/symbol-rectangle.d.ts +2 -0
- package/lib/cjs/generated/16px/paths/symbol-rectangle.js +4 -0
- package/lib/cjs/generated/16px/paths/symbol-rectangle.js.map +1 -0
- package/lib/cjs/generated/16px/paths/target.d.ts +2 -0
- package/lib/cjs/generated/16px/paths/target.js +4 -0
- package/lib/cjs/generated/16px/paths/target.js.map +1 -0
- package/lib/cjs/generated/20px/blueprint-icons-20.d.ts +9 -2
- package/lib/cjs/generated/20px/blueprint-icons-20.js +553 -539
- package/lib/cjs/generated/20px/blueprint-icons-20.js.map +1 -1
- package/lib/cjs/generated/20px/paths/add-clip.d.ts +2 -0
- package/lib/cjs/generated/20px/paths/add-clip.js +4 -0
- package/lib/cjs/generated/20px/paths/add-clip.js.map +1 -0
- package/lib/cjs/generated/20px/paths/cargo-ship.d.ts +2 -0
- package/lib/cjs/generated/20px/paths/cargo-ship.js +4 -0
- package/lib/cjs/generated/20px/paths/cargo-ship.js.map +1 -0
- package/lib/cjs/generated/20px/paths/clip.d.ts +2 -0
- package/lib/cjs/generated/20px/paths/clip.js +4 -0
- package/lib/cjs/generated/20px/paths/clip.js.map +1 -0
- package/lib/cjs/generated/20px/paths/index.d.ts +7 -0
- package/lib/cjs/generated/20px/paths/index.js +25 -11
- package/lib/cjs/generated/20px/paths/index.js.map +1 -1
- package/lib/cjs/generated/20px/paths/rectangle.d.ts +2 -0
- package/lib/cjs/generated/20px/paths/rectangle.js +4 -0
- package/lib/cjs/generated/20px/paths/rectangle.js.map +1 -0
- package/lib/cjs/generated/20px/paths/ship.d.ts +2 -0
- package/lib/cjs/generated/20px/paths/ship.js +4 -0
- package/lib/cjs/generated/20px/paths/ship.js.map +1 -0
- package/lib/cjs/generated/20px/paths/symbol-rectangle.d.ts +2 -0
- package/lib/cjs/generated/20px/paths/symbol-rectangle.js +4 -0
- package/lib/cjs/generated/20px/paths/symbol-rectangle.js.map +1 -0
- package/lib/cjs/generated/20px/paths/target.d.ts +2 -0
- package/lib/cjs/generated/20px/paths/target.js +4 -0
- package/lib/cjs/generated/20px/paths/target.js.map +1 -0
- package/lib/cjs/iconCodepoints.d.ts +7 -0
- package/lib/cjs/iconNames.d.ts +14 -0
- package/lib/cjs/iconSvgPaths.d.ts +3 -2
- package/lib/cjs/iconSvgPaths.js +5 -4
- package/lib/cjs/iconSvgPaths.js.map +1 -1
- package/lib/css/blueprint-icons-16.eot +0 -0
- package/lib/css/blueprint-icons-16.ttf +0 -0
- package/lib/css/blueprint-icons-16.woff +0 -0
- package/lib/css/blueprint-icons-16.woff2 +0 -0
- package/lib/css/blueprint-icons-20.eot +0 -0
- package/lib/css/blueprint-icons-20.ttf +0 -0
- package/lib/css/blueprint-icons-20.woff +0 -0
- package/lib/css/blueprint-icons-20.woff2 +0 -0
- package/lib/css/blueprint-icons.css +2 -2
- package/lib/css/blueprint-icons.css.map +1 -1
- package/lib/esm/generated/16px/blueprint-icons-16.d.ts +9 -2
- package/lib/esm/generated/16px/blueprint-icons-16.js +553 -539
- package/lib/esm/generated/16px/blueprint-icons-16.js.map +1 -1
- package/lib/esm/generated/16px/paths/add-clip.d.ts +2 -0
- package/lib/esm/generated/16px/paths/add-clip.js +2 -0
- package/lib/esm/generated/16px/paths/add-clip.js.map +1 -0
- package/lib/esm/generated/16px/paths/cargo-ship.d.ts +2 -0
- package/lib/esm/generated/16px/paths/cargo-ship.js +2 -0
- package/lib/esm/generated/16px/paths/cargo-ship.js.map +1 -0
- package/lib/esm/generated/16px/paths/clip.d.ts +2 -0
- package/lib/esm/generated/16px/paths/clip.js +2 -0
- package/lib/esm/generated/16px/paths/clip.js.map +1 -0
- package/lib/esm/generated/16px/paths/index.d.ts +7 -0
- package/lib/esm/generated/16px/paths/index.js +7 -0
- package/lib/esm/generated/16px/paths/index.js.map +1 -1
- package/lib/esm/generated/16px/paths/rectangle.d.ts +2 -0
- package/lib/esm/generated/16px/paths/rectangle.js +2 -0
- package/lib/esm/generated/16px/paths/rectangle.js.map +1 -0
- package/lib/esm/generated/16px/paths/ship.d.ts +2 -0
- package/lib/esm/generated/16px/paths/ship.js +2 -0
- package/lib/esm/generated/16px/paths/ship.js.map +1 -0
- package/lib/esm/generated/16px/paths/symbol-rectangle.d.ts +2 -0
- package/lib/esm/generated/16px/paths/symbol-rectangle.js +2 -0
- package/lib/esm/generated/16px/paths/symbol-rectangle.js.map +1 -0
- package/lib/esm/generated/16px/paths/target.d.ts +2 -0
- package/lib/esm/generated/16px/paths/target.js +2 -0
- package/lib/esm/generated/16px/paths/target.js.map +1 -0
- package/lib/esm/generated/20px/blueprint-icons-20.d.ts +9 -2
- package/lib/esm/generated/20px/blueprint-icons-20.js +553 -539
- package/lib/esm/generated/20px/blueprint-icons-20.js.map +1 -1
- package/lib/esm/generated/20px/paths/add-clip.d.ts +2 -0
- package/lib/esm/generated/20px/paths/add-clip.js +2 -0
- package/lib/esm/generated/20px/paths/add-clip.js.map +1 -0
- package/lib/esm/generated/20px/paths/cargo-ship.d.ts +2 -0
- package/lib/esm/generated/20px/paths/cargo-ship.js +2 -0
- package/lib/esm/generated/20px/paths/cargo-ship.js.map +1 -0
- package/lib/esm/generated/20px/paths/clip.d.ts +2 -0
- package/lib/esm/generated/20px/paths/clip.js +2 -0
- package/lib/esm/generated/20px/paths/clip.js.map +1 -0
- package/lib/esm/generated/20px/paths/index.d.ts +7 -0
- package/lib/esm/generated/20px/paths/index.js +7 -0
- package/lib/esm/generated/20px/paths/index.js.map +1 -1
- package/lib/esm/generated/20px/paths/rectangle.d.ts +2 -0
- package/lib/esm/generated/20px/paths/rectangle.js +2 -0
- package/lib/esm/generated/20px/paths/rectangle.js.map +1 -0
- package/lib/esm/generated/20px/paths/ship.d.ts +2 -0
- package/lib/esm/generated/20px/paths/ship.js +2 -0
- package/lib/esm/generated/20px/paths/ship.js.map +1 -0
- package/lib/esm/generated/20px/paths/symbol-rectangle.d.ts +2 -0
- package/lib/esm/generated/20px/paths/symbol-rectangle.js +2 -0
- package/lib/esm/generated/20px/paths/symbol-rectangle.js.map +1 -0
- package/lib/esm/generated/20px/paths/target.d.ts +2 -0
- package/lib/esm/generated/20px/paths/target.js +2 -0
- package/lib/esm/generated/20px/paths/target.js.map +1 -0
- package/lib/esm/iconCodepoints.d.ts +7 -0
- package/lib/esm/iconNames.d.ts +14 -0
- package/lib/esm/iconSvgPaths.d.ts +3 -2
- package/lib/esm/iconSvgPaths.js +3 -4
- package/lib/esm/iconSvgPaths.js.map +1 -1
- package/lib/esnext/generated/16px/blueprint-icons-16.d.ts +9 -2
- package/lib/esnext/generated/16px/blueprint-icons-16.js +553 -539
- package/lib/esnext/generated/16px/blueprint-icons-16.js.map +1 -1
- package/lib/esnext/generated/16px/paths/add-clip.d.ts +2 -0
- package/lib/esnext/generated/16px/paths/add-clip.js +2 -0
- package/lib/esnext/generated/16px/paths/add-clip.js.map +1 -0
- package/lib/esnext/generated/16px/paths/cargo-ship.d.ts +2 -0
- package/lib/esnext/generated/16px/paths/cargo-ship.js +2 -0
- package/lib/esnext/generated/16px/paths/cargo-ship.js.map +1 -0
- package/lib/esnext/generated/16px/paths/clip.d.ts +2 -0
- package/lib/esnext/generated/16px/paths/clip.js +2 -0
- package/lib/esnext/generated/16px/paths/clip.js.map +1 -0
- package/lib/esnext/generated/16px/paths/index.d.ts +7 -0
- package/lib/esnext/generated/16px/paths/index.js +7 -0
- package/lib/esnext/generated/16px/paths/index.js.map +1 -1
- package/lib/esnext/generated/16px/paths/rectangle.d.ts +2 -0
- package/lib/esnext/generated/16px/paths/rectangle.js +2 -0
- package/lib/esnext/generated/16px/paths/rectangle.js.map +1 -0
- package/lib/esnext/generated/16px/paths/ship.d.ts +2 -0
- package/lib/esnext/generated/16px/paths/ship.js +2 -0
- package/lib/esnext/generated/16px/paths/ship.js.map +1 -0
- package/lib/esnext/generated/16px/paths/symbol-rectangle.d.ts +2 -0
- package/lib/esnext/generated/16px/paths/symbol-rectangle.js +2 -0
- package/lib/esnext/generated/16px/paths/symbol-rectangle.js.map +1 -0
- package/lib/esnext/generated/16px/paths/target.d.ts +2 -0
- package/lib/esnext/generated/16px/paths/target.js +2 -0
- package/lib/esnext/generated/16px/paths/target.js.map +1 -0
- package/lib/esnext/generated/20px/blueprint-icons-20.d.ts +9 -2
- package/lib/esnext/generated/20px/blueprint-icons-20.js +553 -539
- package/lib/esnext/generated/20px/blueprint-icons-20.js.map +1 -1
- package/lib/esnext/generated/20px/paths/add-clip.d.ts +2 -0
- package/lib/esnext/generated/20px/paths/add-clip.js +2 -0
- package/lib/esnext/generated/20px/paths/add-clip.js.map +1 -0
- package/lib/esnext/generated/20px/paths/cargo-ship.d.ts +2 -0
- package/lib/esnext/generated/20px/paths/cargo-ship.js +2 -0
- package/lib/esnext/generated/20px/paths/cargo-ship.js.map +1 -0
- package/lib/esnext/generated/20px/paths/clip.d.ts +2 -0
- package/lib/esnext/generated/20px/paths/clip.js +2 -0
- package/lib/esnext/generated/20px/paths/clip.js.map +1 -0
- package/lib/esnext/generated/20px/paths/index.d.ts +7 -0
- package/lib/esnext/generated/20px/paths/index.js +7 -0
- package/lib/esnext/generated/20px/paths/index.js.map +1 -1
- package/lib/esnext/generated/20px/paths/rectangle.d.ts +2 -0
- package/lib/esnext/generated/20px/paths/rectangle.js +2 -0
- package/lib/esnext/generated/20px/paths/rectangle.js.map +1 -0
- package/lib/esnext/generated/20px/paths/ship.d.ts +2 -0
- package/lib/esnext/generated/20px/paths/ship.js +2 -0
- package/lib/esnext/generated/20px/paths/ship.js.map +1 -0
- package/lib/esnext/generated/20px/paths/symbol-rectangle.d.ts +2 -0
- package/lib/esnext/generated/20px/paths/symbol-rectangle.js +2 -0
- package/lib/esnext/generated/20px/paths/symbol-rectangle.js.map +1 -0
- package/lib/esnext/generated/20px/paths/target.d.ts +2 -0
- package/lib/esnext/generated/20px/paths/target.js +2 -0
- package/lib/esnext/generated/20px/paths/target.js.map +1 -0
- package/lib/esnext/iconCodepoints.d.ts +7 -0
- package/lib/esnext/iconNames.d.ts +14 -0
- package/lib/esnext/iconSvgPaths.d.ts +3 -2
- package/lib/esnext/iconSvgPaths.js +3 -4
- package/lib/esnext/iconSvgPaths.js.map +1 -1
- package/lib/scss/blueprint-icons-16.scss +546 -539
- package/package.json +4 -4
- package/scripts/copy-fonts.sh +1 -1
- package/scripts/generate-icon-fonts.js +50 -53
- package/src/generated/16px/_icon-variables.scss +546 -539
- package/src/generated/16px/blueprint-icons-16.css +4 -5
- package/src/generated/16px/blueprint-icons-16.eot +0 -0
- package/src/generated/16px/blueprint-icons-16.ts +567 -539
- package/src/generated/16px/blueprint-icons-16.ttf +0 -0
- package/src/generated/16px/blueprint-icons-16.woff +0 -0
- package/src/generated/16px/blueprint-icons-16.woff2 +0 -0
- package/src/generated/16px/paths/add-clip.ts +1 -0
- package/src/generated/16px/paths/cargo-ship.ts +1 -0
- package/src/generated/16px/paths/clip.ts +1 -0
- package/src/generated/16px/paths/index.ts +7 -0
- package/src/generated/16px/paths/rectangle.ts +1 -0
- package/src/generated/16px/paths/ship.ts +1 -0
- package/src/generated/16px/paths/symbol-rectangle.ts +1 -0
- package/src/generated/16px/paths/target.ts +1 -0
- package/src/generated/20px/blueprint-icons-20.css +4 -5
- package/src/generated/20px/blueprint-icons-20.eot +0 -0
- package/src/generated/20px/blueprint-icons-20.ts +567 -539
- package/src/generated/20px/blueprint-icons-20.ttf +0 -0
- package/src/generated/20px/blueprint-icons-20.woff +0 -0
- package/src/generated/20px/blueprint-icons-20.woff2 +0 -0
- package/src/generated/20px/paths/add-clip.ts +1 -0
- package/src/generated/20px/paths/cargo-ship.ts +1 -0
- package/src/generated/20px/paths/clip.ts +1 -0
- package/src/generated/20px/paths/index.ts +7 -0
- package/src/generated/20px/paths/rectangle.ts +1 -0
- package/src/generated/20px/paths/ship.ts +1 -0
- package/src/generated/20px/paths/symbol-rectangle.ts +1 -0
- package/src/generated/20px/paths/target.ts +1 -0
- package/src/iconSvgPaths.ts +3 -4
- package/lib/css/blueprint-icons-16.svg +0 -1629
- package/lib/css/blueprint-icons-20.svg +0 -1629
- package/src/generated/16px/blueprint-icons-16.svg +0 -1629
- package/src/generated/20px/blueprint-icons-20.svg +0 -1629
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueprintjs/icons",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-rc.0",
|
|
4
4
|
"description": "Components, fonts, icons, and css files for creating and displaying icons.",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"tslib": "~1.13.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@blueprintjs/node-build-scripts": "^2.0.0-
|
|
45
|
-
"@blueprintjs/test-commons": "^1.0.0-
|
|
44
|
+
"@blueprintjs/node-build-scripts": "^2.0.0-rc.0",
|
|
45
|
+
"@blueprintjs/test-commons": "^1.0.0-rc.0",
|
|
46
46
|
"enzyme": "^3.11.0",
|
|
47
|
-
"fantasticon": "^1.2.
|
|
47
|
+
"fantasticon": "^1.2.3",
|
|
48
48
|
"mocha": "^8.2.1",
|
|
49
49
|
"npm-run-all": "^4.1.5",
|
|
50
50
|
"react": "^16.14.0",
|
package/scripts/copy-fonts.sh
CHANGED
|
@@ -17,66 +17,63 @@
|
|
|
17
17
|
* @fileoverview Generates icon fonts and codepoints from SVG sources
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
const { generateFonts, FontAssetType, OtherAssetType } = require("fantasticon");
|
|
20
|
+
const { generateFonts: runFantasticon, FontAssetType, OtherAssetType } = require("fantasticon");
|
|
21
21
|
const { getLogger } = require("fantasticon/lib/cli/logger");
|
|
22
22
|
const fs = require("fs");
|
|
23
23
|
const path = require("path");
|
|
24
24
|
|
|
25
|
+
const iconsMetadata = require("../icons.json");
|
|
25
26
|
const { RESOURCES_DIR, GENERATED_SRC_DIR, NS } = require("./common");
|
|
26
27
|
|
|
27
28
|
const logger = getLogger();
|
|
28
|
-
|
|
29
|
+
const codepoints = {};
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
tag: "i",
|
|
48
|
-
prefix: `${NS}-icon-standard`,
|
|
49
|
-
})
|
|
50
|
-
.then(results => {
|
|
51
|
-
logger.results(results);
|
|
52
|
-
})
|
|
53
|
-
.catch(error => {
|
|
54
|
-
logger.error(error);
|
|
55
|
-
});
|
|
31
|
+
(async function () {
|
|
32
|
+
for (const icon of iconsMetadata) {
|
|
33
|
+
if (Object.values(codepoints).indexOf(icon.codepoint) !== -1) {
|
|
34
|
+
throw new Error(
|
|
35
|
+
`[generate-icon-fonts] Invalid metadata entry in icons.json: icon "${icon.iconName}" cannot have codepoint ${icon.codepoint}, it is already in use.`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
codepoints[icon.iconName] = icon.codepoint;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
logger.start();
|
|
42
|
+
await Promise.all([
|
|
43
|
+
connectToLogger(generateFonts(16, `${NS}-icon-standard`)),
|
|
44
|
+
connectToLogger(generateFonts(20, `${NS}-icon-large`)),
|
|
45
|
+
]);
|
|
46
|
+
})();
|
|
56
47
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
48
|
+
async function generateFonts(size, prefix) {
|
|
49
|
+
fs.mkdirSync(path.join(GENERATED_SRC_DIR, `${size}px/paths`), { recursive: true });
|
|
50
|
+
return runFantasticon({
|
|
51
|
+
name: `blueprint-icons-${size}`,
|
|
52
|
+
inputDir: path.join(RESOURCES_DIR, `${size}px`),
|
|
53
|
+
outputDir: path.join(GENERATED_SRC_DIR, `${size}px`),
|
|
54
|
+
normalize: true,
|
|
55
|
+
descent: 0,
|
|
56
|
+
// N.B. Important: we need to scale up the font height so that the icons do not get visually degraded
|
|
57
|
+
// or compressed through rounding errors (svgicons2svgfont rasterizes the icons in order to convert them)
|
|
58
|
+
// See https://github.com/palantir/blueprint/issues/5002
|
|
59
|
+
fontHeight: size * 20,
|
|
60
|
+
fontTypes: [FontAssetType.TTF, FontAssetType.EOT, FontAssetType.WOFF2, FontAssetType.WOFF],
|
|
61
|
+
// CSS contains @font-face, SCSS contains codepoints, TS contains enums & codepoints
|
|
62
|
+
assetTypes: [OtherAssetType.CSS, OtherAssetType.SCSS, OtherAssetType.TS],
|
|
63
|
+
templates: {
|
|
64
|
+
// N.B. in icons-20, we don't generate CSS or the codepoints since we expect them to be the same as icons-16
|
|
65
|
+
scss: path.resolve(__dirname, `./icons-${size}.scss.hbs`),
|
|
66
|
+
css: path.resolve(__dirname, "./icons.css.hbs"),
|
|
67
|
+
},
|
|
68
|
+
pathOptions: {
|
|
69
|
+
scss: path.join(GENERATED_SRC_DIR, `${size}px`, "_icon-variables.scss"),
|
|
70
|
+
},
|
|
71
|
+
codepoints,
|
|
72
|
+
tag: "i",
|
|
73
|
+
prefix,
|
|
82
74
|
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function connectToLogger(runner) {
|
|
78
|
+
return runner.then(results => logger.results(results)).catch(error => logger.error(error));
|
|
79
|
+
}
|