@brunosouzas/design-system 0.3.2 → 0.5.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/README.md +58 -7
- package/dist/scripts/cover.d.ts +3 -2
- package/dist/scripts/cover.js +24 -12
- package/dist/src/pieces/cast.d.ts +32 -0
- package/dist/src/pieces/cast.js +280 -0
- package/dist/src/pieces/cover.d.ts +54 -15
- package/dist/src/pieces/cover.js +327 -108
- package/dist/src/pieces/diagram.d.ts +9 -0
- package/dist/src/pieces/diagram.js +7 -0
- package/dist/src/pieces/index.d.ts +2 -1
- package/dist/src/pieces/index.js +2 -1
- package/dist/src/pieces/library.d.ts +5 -0
- package/dist/src/pieces/library.js +6 -1
- package/dist/tokens/generated/tokens.d.ts +44 -0
- package/dist/tokens/generated/tokens.js +44 -0
- package/package.json +1 -1
- package/tokens/generated/tokens.css +26 -0
- package/tokens/generated/tokens.json +44 -0
- package/tokens/generated/tokens.ts +44 -0
package/dist/src/pieces/index.js
CHANGED
|
@@ -10,5 +10,6 @@ export { COLOUR_TOKENS, DATA_COLOUR, MAX_ITEMS, paint, MAX_SIZE, checkParams, co
|
|
|
10
10
|
export { definePiece } from "./piece.js";
|
|
11
11
|
export * from "./library.js";
|
|
12
12
|
export { EIP_ICONS, EIP_ICON_NAMES, EIP_ICON_HEIGHT, EIP_ICON_WIDTH } from "./eip-icons.js";
|
|
13
|
-
export { FORMATS, SAFE_ID, backgroundNames, bannerRingCount, comparePaths, coverTree, validateCoverSpec } from "./cover.js";
|
|
13
|
+
export { FORMATS, LANGUAGE, SAFE_ID, backgroundNames, bannerRingCount, comparePaths, coverTree, diagramRings, validateCoverSpec } from "./cover.js";
|
|
14
14
|
export { tokens } from "../../tokens/generated/tokens.js";
|
|
15
|
+
export { EMOTE_KINDS, MASCOTS, MASCOT_ACTIONS, MASCOT_FACES } from "./cast.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { emote, mascot } from "./cast.ts";
|
|
2
|
+
export { emote, mascot };
|
|
1
3
|
export * from "./metro.ts";
|
|
2
4
|
export * from "./diagram.ts";
|
|
3
5
|
export * from "./ui-icons.ts";
|
|
@@ -325,6 +327,9 @@ export declare const PIECES: {
|
|
|
325
327
|
readonly eipIcon: import("./piece.ts").Piece<EipIconParams>;
|
|
326
328
|
readonly uiIcon: import("./piece.ts").Piece<import("./ui-icons.ts").UiIconParams>;
|
|
327
329
|
readonly linkIcon: import("./piece.ts").Piece<import("./link-icons.ts").LinkIconParams>;
|
|
330
|
+
readonly stateStart: import("./piece.ts").Piece<import("./diagram.ts").StateStartParams>;
|
|
331
|
+
readonly mascot: import("./piece.ts").Piece<import("./cast.ts").MascotParams>;
|
|
332
|
+
readonly emote: import("./piece.ts").Piece<import("./cast.ts").EmoteParams>;
|
|
328
333
|
};
|
|
329
334
|
export type PieceName = keyof typeof PIECES;
|
|
330
335
|
export declare const PIECE_NAMES: PieceName[];
|
|
@@ -12,9 +12,11 @@ import { drawn, el, g, r2, shadowed } from "./node.js";
|
|
|
12
12
|
import { col, colour, count, label, MAX_SIZE, PATH_DATA, pos, size } from "./params.js";
|
|
13
13
|
import { definePiece } from "./piece.js";
|
|
14
14
|
import { METRO_PIECES } from "./metro.js";
|
|
15
|
-
import { DIAGRAM_PIECES } from "./diagram.js";
|
|
15
|
+
import { DIAGRAM_PIECES, stateStart } from "./diagram.js";
|
|
16
16
|
import { uiIcon } from "./ui-icons.js";
|
|
17
17
|
import { linkIcon } from "./link-icons.js";
|
|
18
|
+
import { emote, mascot } from "./cast.js";
|
|
19
|
+
export { emote, mascot };
|
|
18
20
|
export * from "./metro.js";
|
|
19
21
|
export * from "./diagram.js";
|
|
20
22
|
export * from "./ui-icons.js";
|
|
@@ -384,5 +386,8 @@ export const PIECES = {
|
|
|
384
386
|
uiIcon,
|
|
385
387
|
linkIcon,
|
|
386
388
|
...DIAGRAM_PIECES,
|
|
389
|
+
stateStart,
|
|
390
|
+
mascot,
|
|
391
|
+
emote,
|
|
387
392
|
};
|
|
388
393
|
export const PIECE_NAMES = Object.keys(PIECES);
|
|
@@ -4,6 +4,50 @@ export declare const tokens: {
|
|
|
4
4
|
readonly radius: 20;
|
|
5
5
|
readonly width: 1200;
|
|
6
6
|
};
|
|
7
|
+
readonly bodyDiagram: {
|
|
8
|
+
readonly layoutWidth: 560;
|
|
9
|
+
readonly radius: 14;
|
|
10
|
+
readonly ringRadius: 70;
|
|
11
|
+
readonly startRadius: 11;
|
|
12
|
+
readonly width: 800;
|
|
13
|
+
};
|
|
14
|
+
readonly cast: {
|
|
15
|
+
readonly agent: {
|
|
16
|
+
readonly neck: "#E3E8F5";
|
|
17
|
+
readonly shine: "#E6ECFF";
|
|
18
|
+
};
|
|
19
|
+
readonly architect: {
|
|
20
|
+
readonly fill: "#22B5A4";
|
|
21
|
+
readonly shine: "#9CF0E4";
|
|
22
|
+
};
|
|
23
|
+
readonly data: {
|
|
24
|
+
readonly fill: "#8C6CF0";
|
|
25
|
+
readonly lens: "#EAF1FF";
|
|
26
|
+
readonly lid: "#C2B1FF";
|
|
27
|
+
readonly shine: "#B39CFF";
|
|
28
|
+
};
|
|
29
|
+
readonly dev: {
|
|
30
|
+
readonly chin: "#8FA6FF";
|
|
31
|
+
readonly fill: "#5B7CFA";
|
|
32
|
+
readonly screen: "#DCE6FF";
|
|
33
|
+
};
|
|
34
|
+
readonly devops: {
|
|
35
|
+
readonly fill: "#D76AA5";
|
|
36
|
+
readonly shine: "#F3B8D6";
|
|
37
|
+
};
|
|
38
|
+
readonly emotePop: {
|
|
39
|
+
readonly damping: 9;
|
|
40
|
+
readonly mass: 0.7;
|
|
41
|
+
readonly stiffness: 170;
|
|
42
|
+
};
|
|
43
|
+
readonly glow: "#7FD1FF";
|
|
44
|
+
readonly ground: "#D3DBF5";
|
|
45
|
+
readonly metal: "#C9D2E8";
|
|
46
|
+
readonly mouth: "#B94A3E";
|
|
47
|
+
readonly request: {
|
|
48
|
+
readonly shine: "#D6E2FF";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
7
51
|
readonly color: {
|
|
8
52
|
readonly backend: "#FF6B6B";
|
|
9
53
|
readonly blocked: "#FF8A3D";
|
|
@@ -5,6 +5,50 @@ export const tokens = {
|
|
|
5
5
|
"radius": 20,
|
|
6
6
|
"width": 1200
|
|
7
7
|
},
|
|
8
|
+
"bodyDiagram": {
|
|
9
|
+
"layoutWidth": 560,
|
|
10
|
+
"radius": 14,
|
|
11
|
+
"ringRadius": 70,
|
|
12
|
+
"startRadius": 11,
|
|
13
|
+
"width": 800
|
|
14
|
+
},
|
|
15
|
+
"cast": {
|
|
16
|
+
"agent": {
|
|
17
|
+
"neck": "#E3E8F5",
|
|
18
|
+
"shine": "#E6ECFF"
|
|
19
|
+
},
|
|
20
|
+
"architect": {
|
|
21
|
+
"fill": "#22B5A4",
|
|
22
|
+
"shine": "#9CF0E4"
|
|
23
|
+
},
|
|
24
|
+
"data": {
|
|
25
|
+
"fill": "#8C6CF0",
|
|
26
|
+
"lens": "#EAF1FF",
|
|
27
|
+
"lid": "#C2B1FF",
|
|
28
|
+
"shine": "#B39CFF"
|
|
29
|
+
},
|
|
30
|
+
"dev": {
|
|
31
|
+
"chin": "#8FA6FF",
|
|
32
|
+
"fill": "#5B7CFA",
|
|
33
|
+
"screen": "#DCE6FF"
|
|
34
|
+
},
|
|
35
|
+
"devops": {
|
|
36
|
+
"fill": "#D76AA5",
|
|
37
|
+
"shine": "#F3B8D6"
|
|
38
|
+
},
|
|
39
|
+
"emotePop": {
|
|
40
|
+
"damping": 9,
|
|
41
|
+
"mass": 0.7,
|
|
42
|
+
"stiffness": 170
|
|
43
|
+
},
|
|
44
|
+
"glow": "#7FD1FF",
|
|
45
|
+
"ground": "#D3DBF5",
|
|
46
|
+
"metal": "#C9D2E8",
|
|
47
|
+
"mouth": "#B94A3E",
|
|
48
|
+
"request": {
|
|
49
|
+
"shine": "#D6E2FF"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
8
52
|
"color": {
|
|
9
53
|
"backend": "#FF6B6B",
|
|
10
54
|
"blocked": "#FF8A3D",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brunosouzas/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Design tokens and illustration pieces of brunosouzas.com: tokens as CSS, JSON and TypeScript, pieces that draw SVG (and React), and a cover command.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
--ds-banner-height: 420px;
|
|
4
4
|
--ds-banner-radius: 20px;
|
|
5
5
|
--ds-banner-width: 1200px;
|
|
6
|
+
--ds-body-diagram-layout-width: 560px;
|
|
7
|
+
--ds-body-diagram-radius: 14px;
|
|
8
|
+
--ds-body-diagram-ring-radius: 70px;
|
|
9
|
+
--ds-body-diagram-start-radius: 11px;
|
|
10
|
+
--ds-body-diagram-width: 800px;
|
|
11
|
+
--ds-cast-agent-neck: #E3E8F5;
|
|
12
|
+
--ds-cast-agent-shine: #E6ECFF;
|
|
13
|
+
--ds-cast-architect-fill: #22B5A4;
|
|
14
|
+
--ds-cast-architect-shine: #9CF0E4;
|
|
15
|
+
--ds-cast-data-fill: #8C6CF0;
|
|
16
|
+
--ds-cast-data-lens: #EAF1FF;
|
|
17
|
+
--ds-cast-data-lid: #C2B1FF;
|
|
18
|
+
--ds-cast-data-shine: #B39CFF;
|
|
19
|
+
--ds-cast-dev-chin: #8FA6FF;
|
|
20
|
+
--ds-cast-dev-fill: #5B7CFA;
|
|
21
|
+
--ds-cast-dev-screen: #DCE6FF;
|
|
22
|
+
--ds-cast-devops-fill: #D76AA5;
|
|
23
|
+
--ds-cast-devops-shine: #F3B8D6;
|
|
24
|
+
--ds-cast-emote-pop-damping: 9;
|
|
25
|
+
--ds-cast-emote-pop-mass: 0.7;
|
|
26
|
+
--ds-cast-emote-pop-stiffness: 170;
|
|
27
|
+
--ds-cast-glow: #7FD1FF;
|
|
28
|
+
--ds-cast-ground: #D3DBF5;
|
|
29
|
+
--ds-cast-metal: #C9D2E8;
|
|
30
|
+
--ds-cast-mouth: #B94A3E;
|
|
31
|
+
--ds-cast-request-shine: #D6E2FF;
|
|
6
32
|
--ds-color-backend: #FF6B6B;
|
|
7
33
|
--ds-color-blocked: #FF8A3D;
|
|
8
34
|
--ds-color-caller: #8FB2FF;
|
|
@@ -4,6 +4,50 @@
|
|
|
4
4
|
"radius": 20,
|
|
5
5
|
"width": 1200
|
|
6
6
|
},
|
|
7
|
+
"bodyDiagram": {
|
|
8
|
+
"layoutWidth": 560,
|
|
9
|
+
"radius": 14,
|
|
10
|
+
"ringRadius": 70,
|
|
11
|
+
"startRadius": 11,
|
|
12
|
+
"width": 800
|
|
13
|
+
},
|
|
14
|
+
"cast": {
|
|
15
|
+
"agent": {
|
|
16
|
+
"neck": "#E3E8F5",
|
|
17
|
+
"shine": "#E6ECFF"
|
|
18
|
+
},
|
|
19
|
+
"architect": {
|
|
20
|
+
"fill": "#22B5A4",
|
|
21
|
+
"shine": "#9CF0E4"
|
|
22
|
+
},
|
|
23
|
+
"data": {
|
|
24
|
+
"fill": "#8C6CF0",
|
|
25
|
+
"lens": "#EAF1FF",
|
|
26
|
+
"lid": "#C2B1FF",
|
|
27
|
+
"shine": "#B39CFF"
|
|
28
|
+
},
|
|
29
|
+
"dev": {
|
|
30
|
+
"chin": "#8FA6FF",
|
|
31
|
+
"fill": "#5B7CFA",
|
|
32
|
+
"screen": "#DCE6FF"
|
|
33
|
+
},
|
|
34
|
+
"devops": {
|
|
35
|
+
"fill": "#D76AA5",
|
|
36
|
+
"shine": "#F3B8D6"
|
|
37
|
+
},
|
|
38
|
+
"emotePop": {
|
|
39
|
+
"damping": 9,
|
|
40
|
+
"mass": 0.7,
|
|
41
|
+
"stiffness": 170
|
|
42
|
+
},
|
|
43
|
+
"glow": "#7FD1FF",
|
|
44
|
+
"ground": "#D3DBF5",
|
|
45
|
+
"metal": "#C9D2E8",
|
|
46
|
+
"mouth": "#B94A3E",
|
|
47
|
+
"request": {
|
|
48
|
+
"shine": "#D6E2FF"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
7
51
|
"color": {
|
|
8
52
|
"backend": "#FF6B6B",
|
|
9
53
|
"blocked": "#FF8A3D",
|
|
@@ -6,6 +6,50 @@ export const tokens = {
|
|
|
6
6
|
"radius": 20,
|
|
7
7
|
"width": 1200
|
|
8
8
|
},
|
|
9
|
+
"bodyDiagram": {
|
|
10
|
+
"layoutWidth": 560,
|
|
11
|
+
"radius": 14,
|
|
12
|
+
"ringRadius": 70,
|
|
13
|
+
"startRadius": 11,
|
|
14
|
+
"width": 800
|
|
15
|
+
},
|
|
16
|
+
"cast": {
|
|
17
|
+
"agent": {
|
|
18
|
+
"neck": "#E3E8F5",
|
|
19
|
+
"shine": "#E6ECFF"
|
|
20
|
+
},
|
|
21
|
+
"architect": {
|
|
22
|
+
"fill": "#22B5A4",
|
|
23
|
+
"shine": "#9CF0E4"
|
|
24
|
+
},
|
|
25
|
+
"data": {
|
|
26
|
+
"fill": "#8C6CF0",
|
|
27
|
+
"lens": "#EAF1FF",
|
|
28
|
+
"lid": "#C2B1FF",
|
|
29
|
+
"shine": "#B39CFF"
|
|
30
|
+
},
|
|
31
|
+
"dev": {
|
|
32
|
+
"chin": "#8FA6FF",
|
|
33
|
+
"fill": "#5B7CFA",
|
|
34
|
+
"screen": "#DCE6FF"
|
|
35
|
+
},
|
|
36
|
+
"devops": {
|
|
37
|
+
"fill": "#D76AA5",
|
|
38
|
+
"shine": "#F3B8D6"
|
|
39
|
+
},
|
|
40
|
+
"emotePop": {
|
|
41
|
+
"damping": 9,
|
|
42
|
+
"mass": 0.7,
|
|
43
|
+
"stiffness": 170
|
|
44
|
+
},
|
|
45
|
+
"glow": "#7FD1FF",
|
|
46
|
+
"ground": "#D3DBF5",
|
|
47
|
+
"metal": "#C9D2E8",
|
|
48
|
+
"mouth": "#B94A3E",
|
|
49
|
+
"request": {
|
|
50
|
+
"shine": "#D6E2FF"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
9
53
|
"color": {
|
|
10
54
|
"backend": "#FF6B6B",
|
|
11
55
|
"blocked": "#FF8A3D",
|