@haklex/rich-style-token 0.0.13 → 0.0.14
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/index.mjs +4 -1
- package/dist/themes.d.ts +9 -0
- package/dist/themes.d.ts.map +1 -1
- package/dist/vars.css.d.ts +3 -0
- package/dist/vars.css.d.ts.map +1 -1
- package/package.json +1 -1
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)" } };
|
|
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)" } };
|
|
4
4
|
function extractVarName(cssVarRef) {
|
|
5
5
|
const match = cssVarRef.match(/^var\((.+)\)$/);
|
|
6
6
|
return match ? match[1] : cssVarRef;
|
|
@@ -96,6 +96,7 @@ const darkColors = {
|
|
|
96
96
|
alertImportant: "#c084fc"
|
|
97
97
|
};
|
|
98
98
|
const articleLayout = {
|
|
99
|
+
layout: { maxWidth: "65ch" },
|
|
99
100
|
spacing: { xs: "4px", sm: "8px", md: "16px", lg: "24px", xl: "32px" },
|
|
100
101
|
typography: {
|
|
101
102
|
...sharedFonts,
|
|
@@ -108,6 +109,7 @@ const articleLayout = {
|
|
|
108
109
|
borderRadius: { sm: "4px", md: "8px", lg: "12px" }
|
|
109
110
|
};
|
|
110
111
|
const noteLayout = {
|
|
112
|
+
layout: { maxWidth: "65ch" },
|
|
111
113
|
spacing: articleLayout.spacing,
|
|
112
114
|
typography: {
|
|
113
115
|
...serifFonts,
|
|
@@ -120,6 +122,7 @@ const noteLayout = {
|
|
|
120
122
|
borderRadius: articleLayout.borderRadius
|
|
121
123
|
};
|
|
122
124
|
const commentLayout = {
|
|
125
|
+
layout: { maxWidth: "none" },
|
|
123
126
|
spacing: { xs: "2px", sm: "4px", md: "10px", lg: "16px", xl: "20px" },
|
|
124
127
|
typography: {
|
|
125
128
|
...sharedFonts,
|
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;
|
|
@@ -87,6 +90,9 @@ export declare const articleLayout: {
|
|
|
87
90
|
};
|
|
88
91
|
};
|
|
89
92
|
export declare const noteLayout: {
|
|
93
|
+
layout: {
|
|
94
|
+
maxWidth: string;
|
|
95
|
+
};
|
|
90
96
|
spacing: {
|
|
91
97
|
xs: string;
|
|
92
98
|
sm: string;
|
|
@@ -110,6 +116,9 @@ export declare const noteLayout: {
|
|
|
110
116
|
};
|
|
111
117
|
};
|
|
112
118
|
export declare const commentLayout: {
|
|
119
|
+
layout: {
|
|
120
|
+
maxWidth: string;
|
|
121
|
+
};
|
|
113
122
|
spacing: {
|
|
114
123
|
xs: string;
|
|
115
124
|
sm: 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;;;;;;;;;;;;;;;;;;;;;;;;;CAYzB,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;CAYtB,CAAA;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;CAYzB,CAAA"}
|
package/dist/vars.css.d.ts
CHANGED
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Cf,CAAA"}
|