@haklex/rich-style-token 0.0.13 → 0.0.15
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 +1 -2
- package/dist/index.mjs +4 -4
- package/dist/themes.d.ts +9 -3
- package/dist/themes.d.ts.map +1 -1
- package/dist/vars.css.d.ts +3 -1
- package/dist/vars.css.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ const style = createThemeStyle({
|
|
|
62
62
|
|------|------|
|
|
63
63
|
| **Color** | `--rc-text`, `--rc-text-secondary`, `--rc-bg`, `--rc-bg-secondary`, `--rc-border`, `--rc-accent`, `--rc-accent-light`, `--rc-link`, `--rc-code-text`, `--rc-code-bg`, `--rc-quote-border`, `--rc-quote-bg`, `--rc-alert-info`, `--rc-alert-warning`, `--rc-alert-tip`, `--rc-alert-caution`, `--rc-alert-important` |
|
|
64
64
|
| **Spacing** | `--rc-space-xs`, `--rc-space-sm`, `--rc-space-md`, `--rc-space-lg`, `--rc-space-xl` |
|
|
65
|
-
| **Typography** | `--rc-font-family`, `--rc-font-mono`, `--rc-font-size-base`, `--rc-font-size-small`, `--rc-
|
|
65
|
+
| **Typography** | `--rc-font-family`, `--rc-font-mono`, `--rc-font-size-base`, `--rc-font-size-small`, `--rc-line-height`, `--rc-line-height-tight` |
|
|
66
66
|
| **Border Radius** | `--rc-radius-sm`, `--rc-radius-md`, `--rc-radius-lg` |
|
|
67
67
|
|
|
68
68
|
## 导出
|
|
@@ -125,7 +125,6 @@ vars.typography.fontFamily // 字体族
|
|
|
125
125
|
vars.typography.fontMono // 等宽字体
|
|
126
126
|
vars.typography.fontSizeBase // 基础字号
|
|
127
127
|
vars.typography.fontSizeSmall // 小字号
|
|
128
|
-
vars.typography.fontSizeLarge // 大字号
|
|
129
128
|
vars.typography.lineHeight // 行高
|
|
130
129
|
vars.typography.lineHeightTight // 紧行高
|
|
131
130
|
```
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useMemo, use } from "react";
|
|
3
|
-
var vars = { color: { text: "var(--rc-text)", textSecondary: "var(--rc-text-secondary)", bg: "var(--rc-bg)", bgSecondary: "var(--rc-bg-secondary)", border: "var(--rc-border)", accent: "var(--rc-accent)", accentLight: "var(--rc-accent-light)", link: "var(--rc-link)", codeText: "var(--rc-code-text)", codeBg: "var(--rc-code-bg)", quoteBorder: "var(--rc-quote-border)", quoteBg: "var(--rc-quote-bg)", alertInfo: "var(--rc-alert-info)", alertWarning: "var(--rc-alert-warning)", alertTip: "var(--rc-alert-tip)", alertCaution: "var(--rc-alert-caution)", alertImportant: "var(--rc-alert-important)" }, spacing: { xs: "var(--rc-space-xs)", sm: "var(--rc-space-sm)", md: "var(--rc-space-md)", lg: "var(--rc-space-lg)", xl: "var(--rc-space-xl)" }, typography: { fontFamily: "var(--rc-font-family)", fontMono: "var(--rc-font-mono)", fontSizeBase: "var(--rc-font-size-base)", fontSizeSmall: "var(--rc-font-size-small)",
|
|
3
|
+
var vars = { color: { text: "var(--rc-text)", textSecondary: "var(--rc-text-secondary)", bg: "var(--rc-bg)", bgSecondary: "var(--rc-bg-secondary)", border: "var(--rc-border)", accent: "var(--rc-accent)", accentLight: "var(--rc-accent-light)", link: "var(--rc-link)", codeText: "var(--rc-code-text)", codeBg: "var(--rc-code-bg)", quoteBorder: "var(--rc-quote-border)", quoteBg: "var(--rc-quote-bg)", alertInfo: "var(--rc-alert-info)", alertWarning: "var(--rc-alert-warning)", alertTip: "var(--rc-alert-tip)", alertCaution: "var(--rc-alert-caution)", alertImportant: "var(--rc-alert-important)" }, spacing: { xs: "var(--rc-space-xs)", sm: "var(--rc-space-sm)", md: "var(--rc-space-md)", lg: "var(--rc-space-lg)", xl: "var(--rc-space-xl)" }, typography: { fontFamily: "var(--rc-font-family)", fontMono: "var(--rc-font-mono)", fontSizeBase: "var(--rc-font-size-base)", fontSizeSmall: "var(--rc-font-size-small)", lineHeight: "var(--rc-line-height)", lineHeightTight: "var(--rc-line-height-tight)" }, borderRadius: { sm: "var(--rc-radius-sm)", md: "var(--rc-radius-md)", lg: "var(--rc-radius-lg)" }, layout: { maxWidth: "var(--rc-max-width)" } };
|
|
4
4
|
function extractVarName(cssVarRef) {
|
|
5
5
|
const match = cssVarRef.match(/^var\((.+)\)$/);
|
|
6
6
|
return match ? match[1] : cssVarRef;
|
|
@@ -96,36 +96,36 @@ const darkColors = {
|
|
|
96
96
|
alertImportant: "#c084fc"
|
|
97
97
|
};
|
|
98
98
|
const articleLayout = {
|
|
99
|
+
layout: { maxWidth: "700px" },
|
|
99
100
|
spacing: { xs: "4px", sm: "8px", md: "16px", lg: "24px", xl: "32px" },
|
|
100
101
|
typography: {
|
|
101
102
|
...sharedFonts,
|
|
102
103
|
fontSizeBase: "16px",
|
|
103
104
|
fontSizeSmall: "14px",
|
|
104
|
-
fontSizeLarge: "18px",
|
|
105
105
|
lineHeight: "1.7",
|
|
106
106
|
lineHeightTight: "1.4"
|
|
107
107
|
},
|
|
108
108
|
borderRadius: { sm: "4px", md: "8px", lg: "12px" }
|
|
109
109
|
};
|
|
110
110
|
const noteLayout = {
|
|
111
|
+
layout: { maxWidth: "700px" },
|
|
111
112
|
spacing: articleLayout.spacing,
|
|
112
113
|
typography: {
|
|
113
114
|
...serifFonts,
|
|
114
115
|
fontSizeBase: "16px",
|
|
115
116
|
fontSizeSmall: "14px",
|
|
116
|
-
fontSizeLarge: "18px",
|
|
117
117
|
lineHeight: "1.8",
|
|
118
118
|
lineHeightTight: "1.4"
|
|
119
119
|
},
|
|
120
120
|
borderRadius: articleLayout.borderRadius
|
|
121
121
|
};
|
|
122
122
|
const commentLayout = {
|
|
123
|
+
layout: { maxWidth: "none" },
|
|
123
124
|
spacing: { xs: "2px", sm: "4px", md: "10px", lg: "16px", xl: "20px" },
|
|
124
125
|
typography: {
|
|
125
126
|
...sharedFonts,
|
|
126
127
|
fontSizeBase: "14px",
|
|
127
128
|
fontSizeSmall: "12px",
|
|
128
|
-
fontSizeLarge: "15px",
|
|
129
129
|
lineHeight: "1.5",
|
|
130
130
|
lineHeightTight: "1.3"
|
|
131
131
|
},
|
package/dist/themes.d.ts
CHANGED
|
@@ -64,6 +64,9 @@ export declare const darkColors: {
|
|
|
64
64
|
alertImportant: string;
|
|
65
65
|
};
|
|
66
66
|
export declare const articleLayout: {
|
|
67
|
+
layout: {
|
|
68
|
+
maxWidth: string;
|
|
69
|
+
};
|
|
67
70
|
spacing: {
|
|
68
71
|
xs: string;
|
|
69
72
|
sm: string;
|
|
@@ -74,7 +77,6 @@ export declare const articleLayout: {
|
|
|
74
77
|
typography: {
|
|
75
78
|
fontSizeBase: string;
|
|
76
79
|
fontSizeSmall: string;
|
|
77
|
-
fontSizeLarge: string;
|
|
78
80
|
lineHeight: string;
|
|
79
81
|
lineHeightTight: string;
|
|
80
82
|
fontFamily: string;
|
|
@@ -87,6 +89,9 @@ export declare const articleLayout: {
|
|
|
87
89
|
};
|
|
88
90
|
};
|
|
89
91
|
export declare const noteLayout: {
|
|
92
|
+
layout: {
|
|
93
|
+
maxWidth: string;
|
|
94
|
+
};
|
|
90
95
|
spacing: {
|
|
91
96
|
xs: string;
|
|
92
97
|
sm: string;
|
|
@@ -97,7 +102,6 @@ export declare const noteLayout: {
|
|
|
97
102
|
typography: {
|
|
98
103
|
fontSizeBase: string;
|
|
99
104
|
fontSizeSmall: string;
|
|
100
|
-
fontSizeLarge: string;
|
|
101
105
|
lineHeight: string;
|
|
102
106
|
lineHeightTight: string;
|
|
103
107
|
fontFamily: string;
|
|
@@ -110,6 +114,9 @@ export declare const noteLayout: {
|
|
|
110
114
|
};
|
|
111
115
|
};
|
|
112
116
|
export declare const commentLayout: {
|
|
117
|
+
layout: {
|
|
118
|
+
maxWidth: string;
|
|
119
|
+
};
|
|
113
120
|
spacing: {
|
|
114
121
|
xs: string;
|
|
115
122
|
sm: string;
|
|
@@ -120,7 +127,6 @@ export declare const commentLayout: {
|
|
|
120
127
|
typography: {
|
|
121
128
|
fontSizeBase: string;
|
|
122
129
|
fontSizeSmall: string;
|
|
123
|
-
fontSizeLarge: string;
|
|
124
130
|
lineHeight: string;
|
|
125
131
|
lineHeightTight: string;
|
|
126
132
|
fontFamily: string;
|
package/dist/themes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;CAKvB,CAAA;AAED,eAAO,MAAM,UAAU;;;CAItB,CAAA;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;CAkB9B,CAAA;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;CAI9B,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;CAkBtB,CAAA;AAED,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;CAKvB,CAAA;AAED,eAAO,MAAM,UAAU;;;CAItB,CAAA;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;CAkB9B,CAAA;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;CAI9B,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;CAkBtB,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;CAWzB,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;CAWtB,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;CAWzB,CAAA"}
|
package/dist/vars.css.d.ts
CHANGED
|
@@ -30,7 +30,6 @@ export declare const vars: {
|
|
|
30
30
|
fontMono: `var(--${string})`;
|
|
31
31
|
fontSizeBase: `var(--${string})`;
|
|
32
32
|
fontSizeSmall: `var(--${string})`;
|
|
33
|
-
fontSizeLarge: `var(--${string})`;
|
|
34
33
|
lineHeight: `var(--${string})`;
|
|
35
34
|
lineHeightTight: `var(--${string})`;
|
|
36
35
|
};
|
|
@@ -39,5 +38,8 @@ export declare const vars: {
|
|
|
39
38
|
md: `var(--${string})`;
|
|
40
39
|
lg: `var(--${string})`;
|
|
41
40
|
};
|
|
41
|
+
layout: {
|
|
42
|
+
maxWidth: `var(--${string})`;
|
|
43
|
+
};
|
|
42
44
|
};
|
|
43
45
|
//# sourceMappingURL=vars.css.d.ts.map
|
package/dist/vars.css.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vars.css.d.ts","sourceRoot":"","sources":["../src/vars.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"vars.css.d.ts","sourceRoot":"","sources":["../src/vars.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Cf,CAAA"}
|