@toeverything/theme
Advanced tools
Comparing version 0.5.4-canary.13 to 0.5.4-canary.14
@@ -10,5 +10,2 @@ export declare const camelToKebab: (s: string) => string; | ||
export declare const baseTheme: { | ||
popoverShadow: string; | ||
modalShadow: string; | ||
tooltipShadow: string; | ||
fontFamily: string; | ||
@@ -116,5 +113,6 @@ fontNumberFamily: string; | ||
tooltip: string; | ||
menuShadow: string; | ||
shadow: string; | ||
popoverShadow: string; | ||
modalShadow: string; | ||
tooltipShadow: string; | ||
floatButtonShadow: string; | ||
fontFamily: string; | ||
@@ -222,5 +220,6 @@ fontNumberFamily: string; | ||
tooltip: string; | ||
menuShadow: string; | ||
shadow: string; | ||
popoverShadow: string; | ||
modalShadow: string; | ||
tooltipShadow: string; | ||
floatButtonShadow: string; | ||
fontFamily: string; | ||
@@ -227,0 +226,0 @@ fontNumberFamily: string; |
const g = (r) => typeof r != "string" ? "" : r.replace(/-/g, "_").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z])(?=[a-z])/g, "$1-$2").toLowerCase().replace(/(\D+)(\d+)$/g, "$1-$2").replace(/\s|_/g, "-"), o = "apple-system, BlinkMacSystemFont,Helvetica Neue, Tahoma, PingFang SC, Microsoft Yahei, Arial,Hiragino Sans GB, sans-serif, Apple Color Emoji, Segoe UI Emoji,Segoe UI Symbol, Noto Color Emoji", t = { | ||
// shadow | ||
popoverShadow: "0px 1px 10px -6px rgba(24, 39, 75, 0.08), 0px 3px 16px -6px rgba(24, 39, 75, 0.04)", | ||
modalShadow: "0px 4px 24px #161616", | ||
tooltipShadow: "0px 0px 4px rgba(0, 0, 0, 0.14)", | ||
// font | ||
@@ -23,3 +19,3 @@ fontFamily: `Avenir Next, Poppins, ${o}`, | ||
paragraphSpace: "8px", | ||
popoverRadius: "10px", | ||
popoverRadius: "12px", | ||
zoom: "1", | ||
@@ -43,3 +39,3 @@ scale: "calc(1 / var(--affine-zoom))" | ||
backgroundCodeBlock: "rgb(250, 251, 253)", | ||
backgroundModalColor: "rgba(0, 0, 0, 0.6)", | ||
backgroundModalColor: "rgba(0, 0, 0, 0.4)", | ||
textPrimaryColor: "rgb(66, 65, 73)", | ||
@@ -110,8 +106,12 @@ textSecondaryColor: "rgb(142, 141, 145)", | ||
paletteShapeGrey: "rgb(194, 194, 194)", | ||
tooltip: "#424149" | ||
tooltip: "#424149", | ||
menuShadow: "0px 0px 12px rgba(66, 65, 73, 0.1), inset 0px 0px 0px 0.5px rgba(227, 227, 228, 1)", | ||
shadow: "0px 0px 4px rgba(66, 65, 73, 0.1)", | ||
popoverShadow: "0px 0px 24px rgba(0, 0, 0, 0.2), 0px 0px 4px rgba(0, 0, 0, 0.6), inset 0px 0px 0px 1px rgba(227, 226, 228, 1)", | ||
floatButtonShadow: "0px 1px 16px rgba(0, 0, 0, 0.1), 0px 2px 3px rgba(0, 0, 0, 0.1)" | ||
}, l = { | ||
...t, | ||
themeMode: "dark", | ||
brandColor: "rgb(84, 56, 255)", | ||
primaryColor: "rgba(106, 86, 229, 1)", | ||
brandColor: "rgba(156, 140, 255, 1)", | ||
primaryColor: "rgba(156, 140, 255, 1)", | ||
secondaryColor: "rgb(144, 150, 245)", | ||
@@ -132,3 +132,3 @@ tertiaryColor: "rgb(30, 30, 30)", | ||
processingColor: "rgb(195, 215, 255)", | ||
textEmphasisColor: "rgb(208, 205, 220)", | ||
textEmphasisColor: "rgba(156, 140, 255, 1)", | ||
textPrimaryColor: "rgb(234, 234, 234)", | ||
@@ -159,3 +159,3 @@ textSecondaryColor: "rgb(156, 156, 160)", | ||
backgroundSecondaryColor: "rgb(32, 32, 32)", | ||
backgroundModalColor: "rgba(0, 0, 0, 0.8)", | ||
backgroundModalColor: "rgba(0, 0, 0, 0.5)", | ||
backgroundOverlayPanelColor: "rgb(30, 30, 30)", | ||
@@ -196,7 +196,11 @@ tagBlue: "rgba(8, 67, 136, 1)", | ||
paletteShapeGrey: "rgb(194, 194, 194)", | ||
tooltip: "#EAEAEA" | ||
}, n = Object.entries(b).reduce( | ||
tooltip: "#EAEAEA", | ||
menuShadow: "0px 0px 12px rgba(0, 0, 0, 1), inset 0px 0px 0px 0.5px rgba(46, 46, 46, 1)", | ||
shadow: "0px 0px 4px rgba(20, 20, 20, 1)", | ||
popoverShadow: "0px 0px 26px rgba(0, 0, 0, 0.8), 0px 0px 10px rgba(0, 0, 0, 1), inset 0px 0px 0px 1px rgba(46, 46, 46, 1)", | ||
floatButtonShadow: "0px 1px 16px rgba(0, 0, 0, 1), 0px 2px 3px rgba(0, 0, 0, 1)" | ||
}, p = Object.entries(b).reduce( | ||
(r, [e, a]) => (r[`--affine-${g(e)}`] = a, r), | ||
{} | ||
), p = Object.entries(l).reduce( | ||
), n = Object.entries(l).reduce( | ||
(r, [e, a]) => (r[`--affine-${g(e)}`] = a, r), | ||
@@ -208,7 +212,7 @@ {} | ||
g as camelToKebab, | ||
p as darkCssVariables, | ||
n as darkCssVariables, | ||
l as darkTheme, | ||
n as lightCssVariables, | ||
p as lightCssVariables, | ||
b as lightTheme | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@toeverything/theme", | ||
"version": "0.5.4-canary.13", | ||
"version": "0.5.4-canary.14", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -31,8 +31,2 @@ export const camelToKebab = (s: string) => { | ||
export const baseTheme = { | ||
// shadow | ||
popoverShadow: | ||
'0px 1px 10px -6px rgba(24, 39, 75, 0.08), 0px 3px 16px -6px rgba(24, 39, 75, 0.04)', | ||
modalShadow: '0px 4px 24px #161616', | ||
tooltipShadow: '0px 0px 4px rgba(0, 0, 0, 0.14)', | ||
// font | ||
@@ -58,3 +52,3 @@ fontFamily: `Avenir Next, Poppins, ${basicFontFamily}`, | ||
paragraphSpace: '8px', | ||
popoverRadius: '10px', | ||
popoverRadius: '12px', | ||
@@ -84,3 +78,3 @@ zoom: '1', | ||
backgroundCodeBlock: 'rgb(250, 251, 253)', | ||
backgroundModalColor: 'rgba(0, 0, 0, 0.6)', | ||
backgroundModalColor: 'rgba(0, 0, 0, 0.4)', | ||
textPrimaryColor: 'rgb(66, 65, 73)', | ||
@@ -152,2 +146,9 @@ textSecondaryColor: 'rgb(142, 141, 145)', | ||
tooltip: '#424149', | ||
menuShadow: | ||
'0px 0px 12px rgba(66, 65, 73, 0.1), inset 0px 0px 0px 0.5px rgba(227, 227, 228, 1)', | ||
shadow: '0px 0px 4px rgba(66, 65, 73, 0.1)', | ||
popoverShadow: | ||
'0px 0px 24px rgba(0, 0, 0, 0.2), 0px 0px 4px rgba(0, 0, 0, 0.6), inset 0px 0px 0px 1px rgba(227, 226, 228, 1)', | ||
floatButtonShadow: | ||
'0px 1px 16px rgba(0, 0, 0, 0.1), 0px 2px 3px rgba(0, 0, 0, 0.1)', | ||
}; | ||
@@ -160,4 +161,4 @@ | ||
brandColor: 'rgb(84, 56, 255)', | ||
primaryColor: 'rgba(106, 86, 229, 1)', | ||
brandColor: 'rgba(156, 140, 255, 1)', | ||
primaryColor: 'rgba(156, 140, 255, 1)', | ||
secondaryColor: 'rgb(144, 150, 245)', | ||
@@ -178,3 +179,3 @@ tertiaryColor: 'rgb(30, 30, 30)', | ||
processingColor: 'rgb(195, 215, 255)', | ||
textEmphasisColor: 'rgb(208, 205, 220)', | ||
textEmphasisColor: 'rgba(156, 140, 255, 1)', | ||
textPrimaryColor: 'rgb(234, 234, 234)', | ||
@@ -205,3 +206,3 @@ textSecondaryColor: 'rgb(156, 156, 160)', | ||
backgroundSecondaryColor: 'rgb(32, 32, 32)', | ||
backgroundModalColor: 'rgba(0, 0, 0, 0.8)', | ||
backgroundModalColor: 'rgba(0, 0, 0, 0.5)', | ||
backgroundOverlayPanelColor: 'rgb(30, 30, 30)', | ||
@@ -243,2 +244,9 @@ tagBlue: 'rgba(8, 67, 136, 1)', | ||
tooltip: '#EAEAEA', | ||
menuShadow: | ||
'0px 0px 12px rgba(0, 0, 0, 1), inset 0px 0px 0px 0.5px rgba(46, 46, 46, 1)', | ||
shadow: '0px 0px 4px rgba(20, 20, 20, 1)', | ||
popoverShadow: | ||
'0px 0px 26px rgba(0, 0, 0, 0.8), 0px 0px 10px rgba(0, 0, 0, 1), inset 0px 0px 0px 1px rgba(46, 46, 46, 1)', | ||
floatButtonShadow: | ||
'0px 1px 16px rgba(0, 0, 0, 1), 0px 2px 3px rgba(0, 0, 0, 1)', | ||
} satisfies Omit<AffineTheme, 'editorMode'>; | ||
@@ -245,0 +253,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
60010
771