@haklex/rich-style-token 0.0.14 → 0.0.16

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 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-font-size-large`, `--rc-line-height`, `--rc-line-height-tight` |
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)", fontSizeLarge: "var(--rc-font-size-large)", 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)" } };
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,26 +96,24 @@ const darkColors = {
96
96
  alertImportant: "#c084fc"
97
97
  };
98
98
  const articleLayout = {
99
- layout: { maxWidth: "65ch" },
99
+ layout: { maxWidth: "700px" },
100
100
  spacing: { xs: "4px", sm: "8px", md: "16px", lg: "24px", xl: "32px" },
101
101
  typography: {
102
102
  ...sharedFonts,
103
103
  fontSizeBase: "16px",
104
104
  fontSizeSmall: "14px",
105
- fontSizeLarge: "18px",
106
105
  lineHeight: "1.7",
107
106
  lineHeightTight: "1.4"
108
107
  },
109
108
  borderRadius: { sm: "4px", md: "8px", lg: "12px" }
110
109
  };
111
110
  const noteLayout = {
112
- layout: { maxWidth: "65ch" },
111
+ layout: { maxWidth: "700px" },
113
112
  spacing: articleLayout.spacing,
114
113
  typography: {
115
114
  ...serifFonts,
116
115
  fontSizeBase: "16px",
117
116
  fontSizeSmall: "14px",
118
- fontSizeLarge: "18px",
119
117
  lineHeight: "1.8",
120
118
  lineHeightTight: "1.4"
121
119
  },
@@ -128,7 +126,6 @@ const commentLayout = {
128
126
  ...sharedFonts,
129
127
  fontSizeBase: "14px",
130
128
  fontSizeSmall: "12px",
131
- fontSizeLarge: "15px",
132
129
  lineHeight: "1.5",
133
130
  lineHeightTight: "1.3"
134
131
  },
package/dist/themes.d.ts CHANGED
@@ -77,7 +77,6 @@ export declare const articleLayout: {
77
77
  typography: {
78
78
  fontSizeBase: string;
79
79
  fontSizeSmall: string;
80
- fontSizeLarge: string;
81
80
  lineHeight: string;
82
81
  lineHeightTight: string;
83
82
  fontFamily: string;
@@ -103,7 +102,6 @@ export declare const noteLayout: {
103
102
  typography: {
104
103
  fontSizeBase: string;
105
104
  fontSizeSmall: string;
106
- fontSizeLarge: string;
107
105
  lineHeight: string;
108
106
  lineHeightTight: string;
109
107
  fontFamily: string;
@@ -129,7 +127,6 @@ export declare const commentLayout: {
129
127
  typography: {
130
128
  fontSizeBase: string;
131
129
  fontSizeSmall: string;
132
- fontSizeLarge: string;
133
130
  lineHeight: string;
134
131
  lineHeightTight: string;
135
132
  fontFamily: string;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;CAYzB,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;CAYtB,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;CAYzB,CAAA"}
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"}
@@ -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
  };
@@ -1 +1 @@
1
- {"version":3,"file":"vars.css.d.ts","sourceRoot":"","sources":["../src/vars.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Cf,CAAA"}
1
+ {"version":3,"file":"vars.css.d.ts","sourceRoot":"","sources":["../src/vars.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Cf,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-style-token",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "Style tokens and CSS variables for haklex rich editor",
5
5
  "license": "MIT",
6
6
  "type": "module",