@toeverything/theme
Advanced tools
Comparing version 1.0.14 to 1.0.15
import { grabbingCursor, grabCursor } from './cursors'; | ||
import { darkCssVariablesV2, lightCssVariablesV2 } from './v2'; | ||
@@ -17,3 +18,3 @@ export const camelToKebab = (s: string) => { | ||
}; | ||
const themeToVar = (themeName: keyof AffineTheme) => | ||
export const themeToVar = (themeName: keyof AffineTheme) => | ||
`--affine-${camelToKebab(themeName)}` as keyof AffineCssVariables; | ||
@@ -458,2 +459,12 @@ const objectEntries = <T extends Record<string, any>>( | ||
export const combinedLightCssVariables = { | ||
...lightCssVariables, | ||
...lightCssVariablesV2, | ||
}; | ||
export const combinedDarkCssVariables = { | ||
...darkCssVariables, | ||
...darkCssVariablesV2, | ||
}; | ||
/** | ||
@@ -460,0 +471,0 @@ * Get AFFiNE css variable name type safely |
export declare const camelToKebab: (s: string) => string; | ||
export declare const themeToVar: (themeName: keyof AffineTheme) => "--affine-scale" | "--affine-zoom" | "--affine-blue50" | "--affine-blue100" | "--affine-blue200" | "--affine-blue300" | "--affine-blue400" | "--affine-blue500" | "--affine-blue600" | "--affine-blue700" | "--affine-blue800" | "--affine-blue900" | "--affine-blue950" | "--affine-black10" | "--affine-black30" | "--affine-black50" | "--affine-black60" | "--affine-black80" | "--affine-black90" | "--affine-black" | "--affine-white10" | "--affine-white30" | "--affine-white50" | "--affine-white60" | "--affine-white80" | "--affine-white90" | "--affine-white" | "--affine-tooltip" | "--affine-shadow1" | "--affine-shadow2" | "--affine-shadow3" | "--affine-blue" | "--affine-font-family" | "--affine-line-height" | "--affine-text-emphasis-color" | "--affine-border-color" | "--affine-theme-mode" | "--affine-brand-color" | "--affine-tertiary-color" | "--affine-primary-color" | "--affine-primary-color04" | "--affine-secondary-color" | "--affine-background-success-color" | "--affine-background-error-color" | "--affine-background-processing-color" | "--affine-background-warning-color" | "--affine-background-primary-color" | "--affine-background-overlay-panel-color" | "--affine-background-secondary-color" | "--affine-background-tertiary-color" | "--affine-background-code-block" | "--affine-background-modal-color" | "--affine-text-primary-color" | "--affine-text-secondary-color" | "--affine-text-disable-color" | "--affine-hover-color" | "--affine-hover-color-filled" | "--affine-link-color" | "--affine-quote-color" | "--affine-list-color" | "--affine-icon-color" | "--affine-icon-secondary" | "--affine-divider-color" | "--affine-placeholder-color" | "--affine-edgeless-grid-color" | "--affine-success-color" | "--affine-warning-color" | "--affine-error-color" | "--affine-processing-color" | "--affine-tag-white" | "--affine-tag-gray" | "--affine-tag-red" | "--affine-tag-orange" | "--affine-tag-yellow" | "--affine-tag-green" | "--affine-tag-teal" | "--affine-tag-blue" | "--affine-tag-purple" | "--affine-tag-pink" | "--affine-tag-magenta" | "--affine-button-shadow" | "--affine-overlay-panel-shadow" | "--affine-active-shadow" | "--affine-embed-shadow" | "--affine-menu-shadow" | "--affine-toolbar-shadow" | "--affine-overlay-shadow" | "--affine-popover-shadow" | "--affine-float-button-shadow" | "--affine-float-button-shadow1" | "--affine-float-button-shadow2" | "--affine-kanban-shadow" | "--affine-cmd-shadow" | "--affine-large-button-effect" | "--affine-note-shadow-box" | "--affine-note-shadow-sticker" | "--affine-note-shadow-paper" | "--affine-note-shadow-float" | "--affine-note-shadow-film" | "--affine-button-gray-color" | "--affine-card-background-blue" | "--affine-card-background-green" | "--affine-card-background-grey" | "--affine-windows-close-button" | "--affine-text-highlight-pink" | "--affine-text-highlight-red" | "--affine-text-highlight-orange" | "--affine-text-highlight-yellow" | "--affine-text-highlight-green" | "--affine-text-highlight-teal" | "--affine-text-highlight-blue" | "--affine-text-highlight-purple" | "--affine-text-highlight-grey" | "--affine-text-highlight-foreground-red" | "--affine-text-highlight-foreground-orange" | "--affine-text-highlight-foreground-yellow" | "--affine-text-highlight-foreground-green" | "--affine-text-highlight-foreground-teal" | "--affine-text-highlight-foreground-blue" | "--affine-text-highlight-foreground-purple" | "--affine-text-highlight-foreground-grey" | "--affine-note-background-yellow" | "--affine-note-background-orange" | "--affine-note-background-red" | "--affine-note-background-magenta" | "--affine-note-background-purple" | "--affine-note-background-blue" | "--affine-note-background-teal" | "--affine-note-background-green" | "--affine-note-background-black" | "--affine-note-background-grey" | "--affine-note-background-white" | "--affine-font-serif-family" | "--affine-font-mono-family" | "--affine-font-sans-family" | "--affine-font-number-family" | "--affine-font-code-family" | "--affine-font-title" | "--affine-font-h1" | "--affine-font-h2" | "--affine-font-h3" | "--affine-font-h4" | "--affine-font-h5" | "--affine-font-h6" | "--affine-font-base" | "--affine-font-sm" | "--affine-font-xs" | "--affine-z-index-modal" | "--affine-z-index-popover" | "--affine-paragraph-space" | "--affine-popover-radius" | "--affine-editor-width" | "--affine-editor-side-padding" | "--affine-palette-line-yellow" | "--affine-palette-line-orange" | "--affine-palette-line-tangerine" | "--affine-palette-line-red" | "--affine-palette-line-magenta" | "--affine-palette-line-purple" | "--affine-palette-line-navy" | "--affine-palette-line-blue" | "--affine-palette-line-teal" | "--affine-palette-line-green" | "--affine-palette-line-white" | "--affine-palette-line-black" | "--affine-palette-line-grey" | "--affine-palette-shape-yellow" | "--affine-palette-shape-orange" | "--affine-palette-shape-tangerine" | "--affine-palette-shape-red" | "--affine-palette-shape-magenta" | "--affine-palette-shape-purple" | "--affine-palette-shape-navy" | "--affine-palette-shape-blue" | "--affine-palette-shape-green" | "--affine-palette-shape-white" | "--affine-palette-shape-black" | "--affine-palette-shape-grey" | "--affine-multi-players-purple" | "--affine-multi-players-magenta" | "--affine-multi-players-red" | "--affine-multi-players-orange" | "--affine-multi-players-green" | "--affine-palette-shape-teal" | "--affine-multi-players-blue" | "--affine-multi-players-brown" | "--affine-multi-players-grey" | "--affine-pure-black" | "--affine-pure-black10" | "--affine-pure-black20" | "--affine-pure-black80" | "--affine-pure-white" | "--affine-pure-white10" | "--affine-toggle-circle-background-color" | "--affine-toggle-disable-background-color" | "--affine-toggle-circle-shadow" | "--affine-button-inner-shadow" | "--affine-multi-cursors-shadow" | "--affine-multi-players-shadow" | "--affine-grabbing-cursor" | "--affine-grab-cursor" | "--affine-editor-mode"; | ||
type Kebab<T extends string, A extends string = ''> = T extends `${infer F}${infer R}` ? Kebab<R, `${A}${F extends Lowercase<F> ? '' : '-'}${Lowercase<F>}`> : A; | ||
@@ -504,2 +505,410 @@ export type AffineTheme = typeof lightTheme & { | ||
export declare const printCssVariables: AffineCssVariables; | ||
export declare const combinedLightCssVariables: { | ||
"--affine-scale": string; | ||
"--affine-zoom": string; | ||
"--affine-blue50": string; | ||
"--affine-blue100": string; | ||
"--affine-blue200": string; | ||
"--affine-blue300": string; | ||
"--affine-blue400": string; | ||
"--affine-blue500": string; | ||
"--affine-blue600": string; | ||
"--affine-blue700": string; | ||
"--affine-blue800": string; | ||
"--affine-blue900": string; | ||
"--affine-blue950": string; | ||
"--affine-black10": string; | ||
"--affine-black30": string; | ||
"--affine-black50": string; | ||
"--affine-black60": string; | ||
"--affine-black80": string; | ||
"--affine-black90": string; | ||
"--affine-black": string; | ||
"--affine-white10": string; | ||
"--affine-white30": string; | ||
"--affine-white50": string; | ||
"--affine-white60": string; | ||
"--affine-white80": string; | ||
"--affine-white90": string; | ||
"--affine-white": string; | ||
"--affine-tooltip": string; | ||
"--affine-shadow1": string; | ||
"--affine-shadow2": string; | ||
"--affine-shadow3": string; | ||
"--affine-blue": string; | ||
"--affine-font-family": string; | ||
"--affine-line-height": string; | ||
"--affine-text-emphasis-color": string; | ||
"--affine-border-color": string; | ||
"--affine-theme-mode": string; | ||
"--affine-brand-color": string; | ||
"--affine-tertiary-color": string; | ||
"--affine-primary-color": string; | ||
"--affine-primary-color04": string; | ||
"--affine-secondary-color": string; | ||
"--affine-background-success-color": string; | ||
"--affine-background-error-color": string; | ||
"--affine-background-processing-color": string; | ||
"--affine-background-warning-color": string; | ||
"--affine-background-primary-color": string; | ||
"--affine-background-overlay-panel-color": string; | ||
"--affine-background-secondary-color": string; | ||
"--affine-background-tertiary-color": string; | ||
"--affine-background-code-block": string; | ||
"--affine-background-modal-color": string; | ||
"--affine-text-primary-color": string; | ||
"--affine-text-secondary-color": string; | ||
"--affine-text-disable-color": string; | ||
"--affine-hover-color": string; | ||
"--affine-hover-color-filled": string; | ||
"--affine-link-color": string; | ||
"--affine-quote-color": string; | ||
"--affine-list-color": string; | ||
"--affine-icon-color": string; | ||
"--affine-icon-secondary": string; | ||
"--affine-divider-color": string; | ||
"--affine-placeholder-color": string; | ||
"--affine-edgeless-grid-color": string; | ||
"--affine-success-color": string; | ||
"--affine-warning-color": string; | ||
"--affine-error-color": string; | ||
"--affine-processing-color": string; | ||
"--affine-tag-white": string; | ||
"--affine-tag-gray": string; | ||
"--affine-tag-red": string; | ||
"--affine-tag-orange": string; | ||
"--affine-tag-yellow": string; | ||
"--affine-tag-green": string; | ||
"--affine-tag-teal": string; | ||
"--affine-tag-blue": string; | ||
"--affine-tag-purple": string; | ||
"--affine-tag-pink": string; | ||
"--affine-tag-magenta": string; | ||
"--affine-button-shadow": string; | ||
"--affine-overlay-panel-shadow": string; | ||
"--affine-active-shadow": string; | ||
"--affine-embed-shadow": string; | ||
"--affine-menu-shadow": string; | ||
"--affine-toolbar-shadow": string; | ||
"--affine-overlay-shadow": string; | ||
"--affine-popover-shadow": string; | ||
"--affine-float-button-shadow": string; | ||
"--affine-float-button-shadow1": string; | ||
"--affine-float-button-shadow2": string; | ||
"--affine-kanban-shadow": string; | ||
"--affine-cmd-shadow": string; | ||
"--affine-large-button-effect": string; | ||
"--affine-note-shadow-box": string; | ||
"--affine-note-shadow-sticker": string; | ||
"--affine-note-shadow-paper": string; | ||
"--affine-note-shadow-float": string; | ||
"--affine-note-shadow-film": string; | ||
"--affine-button-gray-color": string; | ||
"--affine-card-background-blue": string; | ||
"--affine-card-background-green": string; | ||
"--affine-card-background-grey": string; | ||
"--affine-windows-close-button": string; | ||
"--affine-text-highlight-pink": string; | ||
"--affine-text-highlight-red": string; | ||
"--affine-text-highlight-orange": string; | ||
"--affine-text-highlight-yellow": string; | ||
"--affine-text-highlight-green": string; | ||
"--affine-text-highlight-teal": string; | ||
"--affine-text-highlight-blue": string; | ||
"--affine-text-highlight-purple": string; | ||
"--affine-text-highlight-grey": string; | ||
"--affine-text-highlight-foreground-red": string; | ||
"--affine-text-highlight-foreground-orange": string; | ||
"--affine-text-highlight-foreground-yellow": string; | ||
"--affine-text-highlight-foreground-green": string; | ||
"--affine-text-highlight-foreground-teal": string; | ||
"--affine-text-highlight-foreground-blue": string; | ||
"--affine-text-highlight-foreground-purple": string; | ||
"--affine-text-highlight-foreground-grey": string; | ||
"--affine-note-background-yellow": string; | ||
"--affine-note-background-orange": string; | ||
"--affine-note-background-red": string; | ||
"--affine-note-background-magenta": string; | ||
"--affine-note-background-purple": string; | ||
"--affine-note-background-blue": string; | ||
"--affine-note-background-teal": string; | ||
"--affine-note-background-green": string; | ||
"--affine-note-background-black": string; | ||
"--affine-note-background-grey": string; | ||
"--affine-note-background-white": string; | ||
"--affine-font-serif-family": string; | ||
"--affine-font-mono-family": string; | ||
"--affine-font-sans-family": string; | ||
"--affine-font-number-family": string; | ||
"--affine-font-code-family": string; | ||
"--affine-font-title": string; | ||
"--affine-font-h1": string; | ||
"--affine-font-h2": string; | ||
"--affine-font-h3": string; | ||
"--affine-font-h4": string; | ||
"--affine-font-h5": string; | ||
"--affine-font-h6": string; | ||
"--affine-font-base": string; | ||
"--affine-font-sm": string; | ||
"--affine-font-xs": string; | ||
"--affine-z-index-modal": string; | ||
"--affine-z-index-popover": string; | ||
"--affine-paragraph-space": string; | ||
"--affine-popover-radius": string; | ||
"--affine-editor-width": string; | ||
"--affine-editor-side-padding": string; | ||
"--affine-palette-line-yellow": string; | ||
"--affine-palette-line-orange": string; | ||
"--affine-palette-line-tangerine": string; | ||
"--affine-palette-line-red": string; | ||
"--affine-palette-line-magenta": string; | ||
"--affine-palette-line-purple": string; | ||
"--affine-palette-line-navy": string; | ||
"--affine-palette-line-blue": string; | ||
"--affine-palette-line-teal": string; | ||
"--affine-palette-line-green": string; | ||
"--affine-palette-line-white": string; | ||
"--affine-palette-line-black": string; | ||
"--affine-palette-line-grey": string; | ||
"--affine-palette-shape-yellow": string; | ||
"--affine-palette-shape-orange": string; | ||
"--affine-palette-shape-tangerine": string; | ||
"--affine-palette-shape-red": string; | ||
"--affine-palette-shape-magenta": string; | ||
"--affine-palette-shape-purple": string; | ||
"--affine-palette-shape-navy": string; | ||
"--affine-palette-shape-blue": string; | ||
"--affine-palette-shape-green": string; | ||
"--affine-palette-shape-white": string; | ||
"--affine-palette-shape-black": string; | ||
"--affine-palette-shape-grey": string; | ||
"--affine-multi-players-purple": string; | ||
"--affine-multi-players-magenta": string; | ||
"--affine-multi-players-red": string; | ||
"--affine-multi-players-orange": string; | ||
"--affine-multi-players-green": string; | ||
"--affine-palette-shape-teal": string; | ||
"--affine-multi-players-blue": string; | ||
"--affine-multi-players-brown": string; | ||
"--affine-multi-players-grey": string; | ||
"--affine-pure-black": string; | ||
"--affine-pure-black10": string; | ||
"--affine-pure-black20": string; | ||
"--affine-pure-black80": string; | ||
"--affine-pure-white": string; | ||
"--affine-pure-white10": string; | ||
"--affine-toggle-circle-background-color": string; | ||
"--affine-toggle-disable-background-color": string; | ||
"--affine-toggle-circle-shadow": string; | ||
"--affine-button-inner-shadow": string; | ||
"--affine-multi-cursors-shadow": string; | ||
"--affine-multi-players-shadow": string; | ||
"--affine-grabbing-cursor": string; | ||
"--affine-grab-cursor": string; | ||
"--affine-editor-mode": string; | ||
}; | ||
export declare const combinedDarkCssVariables: { | ||
"--affine-scale": string; | ||
"--affine-zoom": string; | ||
"--affine-blue50": string; | ||
"--affine-blue100": string; | ||
"--affine-blue200": string; | ||
"--affine-blue300": string; | ||
"--affine-blue400": string; | ||
"--affine-blue500": string; | ||
"--affine-blue600": string; | ||
"--affine-blue700": string; | ||
"--affine-blue800": string; | ||
"--affine-blue900": string; | ||
"--affine-blue950": string; | ||
"--affine-black10": string; | ||
"--affine-black30": string; | ||
"--affine-black50": string; | ||
"--affine-black60": string; | ||
"--affine-black80": string; | ||
"--affine-black90": string; | ||
"--affine-black": string; | ||
"--affine-white10": string; | ||
"--affine-white30": string; | ||
"--affine-white50": string; | ||
"--affine-white60": string; | ||
"--affine-white80": string; | ||
"--affine-white90": string; | ||
"--affine-white": string; | ||
"--affine-tooltip": string; | ||
"--affine-shadow1": string; | ||
"--affine-shadow2": string; | ||
"--affine-shadow3": string; | ||
"--affine-blue": string; | ||
"--affine-font-family": string; | ||
"--affine-line-height": string; | ||
"--affine-text-emphasis-color": string; | ||
"--affine-border-color": string; | ||
"--affine-theme-mode": string; | ||
"--affine-brand-color": string; | ||
"--affine-tertiary-color": string; | ||
"--affine-primary-color": string; | ||
"--affine-primary-color04": string; | ||
"--affine-secondary-color": string; | ||
"--affine-background-success-color": string; | ||
"--affine-background-error-color": string; | ||
"--affine-background-processing-color": string; | ||
"--affine-background-warning-color": string; | ||
"--affine-background-primary-color": string; | ||
"--affine-background-overlay-panel-color": string; | ||
"--affine-background-secondary-color": string; | ||
"--affine-background-tertiary-color": string; | ||
"--affine-background-code-block": string; | ||
"--affine-background-modal-color": string; | ||
"--affine-text-primary-color": string; | ||
"--affine-text-secondary-color": string; | ||
"--affine-text-disable-color": string; | ||
"--affine-hover-color": string; | ||
"--affine-hover-color-filled": string; | ||
"--affine-link-color": string; | ||
"--affine-quote-color": string; | ||
"--affine-list-color": string; | ||
"--affine-icon-color": string; | ||
"--affine-icon-secondary": string; | ||
"--affine-divider-color": string; | ||
"--affine-placeholder-color": string; | ||
"--affine-edgeless-grid-color": string; | ||
"--affine-success-color": string; | ||
"--affine-warning-color": string; | ||
"--affine-error-color": string; | ||
"--affine-processing-color": string; | ||
"--affine-tag-white": string; | ||
"--affine-tag-gray": string; | ||
"--affine-tag-red": string; | ||
"--affine-tag-orange": string; | ||
"--affine-tag-yellow": string; | ||
"--affine-tag-green": string; | ||
"--affine-tag-teal": string; | ||
"--affine-tag-blue": string; | ||
"--affine-tag-purple": string; | ||
"--affine-tag-pink": string; | ||
"--affine-tag-magenta": string; | ||
"--affine-button-shadow": string; | ||
"--affine-overlay-panel-shadow": string; | ||
"--affine-active-shadow": string; | ||
"--affine-embed-shadow": string; | ||
"--affine-menu-shadow": string; | ||
"--affine-toolbar-shadow": string; | ||
"--affine-overlay-shadow": string; | ||
"--affine-popover-shadow": string; | ||
"--affine-float-button-shadow": string; | ||
"--affine-float-button-shadow1": string; | ||
"--affine-float-button-shadow2": string; | ||
"--affine-kanban-shadow": string; | ||
"--affine-cmd-shadow": string; | ||
"--affine-large-button-effect": string; | ||
"--affine-note-shadow-box": string; | ||
"--affine-note-shadow-sticker": string; | ||
"--affine-note-shadow-paper": string; | ||
"--affine-note-shadow-float": string; | ||
"--affine-note-shadow-film": string; | ||
"--affine-button-gray-color": string; | ||
"--affine-card-background-blue": string; | ||
"--affine-card-background-green": string; | ||
"--affine-card-background-grey": string; | ||
"--affine-windows-close-button": string; | ||
"--affine-text-highlight-pink": string; | ||
"--affine-text-highlight-red": string; | ||
"--affine-text-highlight-orange": string; | ||
"--affine-text-highlight-yellow": string; | ||
"--affine-text-highlight-green": string; | ||
"--affine-text-highlight-teal": string; | ||
"--affine-text-highlight-blue": string; | ||
"--affine-text-highlight-purple": string; | ||
"--affine-text-highlight-grey": string; | ||
"--affine-text-highlight-foreground-red": string; | ||
"--affine-text-highlight-foreground-orange": string; | ||
"--affine-text-highlight-foreground-yellow": string; | ||
"--affine-text-highlight-foreground-green": string; | ||
"--affine-text-highlight-foreground-teal": string; | ||
"--affine-text-highlight-foreground-blue": string; | ||
"--affine-text-highlight-foreground-purple": string; | ||
"--affine-text-highlight-foreground-grey": string; | ||
"--affine-note-background-yellow": string; | ||
"--affine-note-background-orange": string; | ||
"--affine-note-background-red": string; | ||
"--affine-note-background-magenta": string; | ||
"--affine-note-background-purple": string; | ||
"--affine-note-background-blue": string; | ||
"--affine-note-background-teal": string; | ||
"--affine-note-background-green": string; | ||
"--affine-note-background-black": string; | ||
"--affine-note-background-grey": string; | ||
"--affine-note-background-white": string; | ||
"--affine-font-serif-family": string; | ||
"--affine-font-mono-family": string; | ||
"--affine-font-sans-family": string; | ||
"--affine-font-number-family": string; | ||
"--affine-font-code-family": string; | ||
"--affine-font-title": string; | ||
"--affine-font-h1": string; | ||
"--affine-font-h2": string; | ||
"--affine-font-h3": string; | ||
"--affine-font-h4": string; | ||
"--affine-font-h5": string; | ||
"--affine-font-h6": string; | ||
"--affine-font-base": string; | ||
"--affine-font-sm": string; | ||
"--affine-font-xs": string; | ||
"--affine-z-index-modal": string; | ||
"--affine-z-index-popover": string; | ||
"--affine-paragraph-space": string; | ||
"--affine-popover-radius": string; | ||
"--affine-editor-width": string; | ||
"--affine-editor-side-padding": string; | ||
"--affine-palette-line-yellow": string; | ||
"--affine-palette-line-orange": string; | ||
"--affine-palette-line-tangerine": string; | ||
"--affine-palette-line-red": string; | ||
"--affine-palette-line-magenta": string; | ||
"--affine-palette-line-purple": string; | ||
"--affine-palette-line-navy": string; | ||
"--affine-palette-line-blue": string; | ||
"--affine-palette-line-teal": string; | ||
"--affine-palette-line-green": string; | ||
"--affine-palette-line-white": string; | ||
"--affine-palette-line-black": string; | ||
"--affine-palette-line-grey": string; | ||
"--affine-palette-shape-yellow": string; | ||
"--affine-palette-shape-orange": string; | ||
"--affine-palette-shape-tangerine": string; | ||
"--affine-palette-shape-red": string; | ||
"--affine-palette-shape-magenta": string; | ||
"--affine-palette-shape-purple": string; | ||
"--affine-palette-shape-navy": string; | ||
"--affine-palette-shape-blue": string; | ||
"--affine-palette-shape-green": string; | ||
"--affine-palette-shape-white": string; | ||
"--affine-palette-shape-black": string; | ||
"--affine-palette-shape-grey": string; | ||
"--affine-multi-players-purple": string; | ||
"--affine-multi-players-magenta": string; | ||
"--affine-multi-players-red": string; | ||
"--affine-multi-players-orange": string; | ||
"--affine-multi-players-green": string; | ||
"--affine-palette-shape-teal": string; | ||
"--affine-multi-players-blue": string; | ||
"--affine-multi-players-brown": string; | ||
"--affine-multi-players-grey": string; | ||
"--affine-pure-black": string; | ||
"--affine-pure-black10": string; | ||
"--affine-pure-black20": string; | ||
"--affine-pure-black80": string; | ||
"--affine-pure-white": string; | ||
"--affine-pure-white10": string; | ||
"--affine-toggle-circle-background-color": string; | ||
"--affine-toggle-disable-background-color": string; | ||
"--affine-toggle-circle-shadow": string; | ||
"--affine-button-inner-shadow": string; | ||
"--affine-multi-cursors-shadow": string; | ||
"--affine-multi-players-shadow": string; | ||
"--affine-grabbing-cursor": string; | ||
"--affine-grab-cursor": string; | ||
"--affine-editor-mode": string; | ||
}; | ||
/** | ||
@@ -506,0 +915,0 @@ * Get AFFiNE css variable name type safely |
@@ -0,1 +1,2 @@ | ||
import { lightCssVariablesV2 as i, darkCssVariablesV2 as C } from "./v2/index.js"; | ||
function b(r) { | ||
@@ -5,3 +6,3 @@ const a = r.replace(/\n/g, "").replace(/[\s]{2,}/g, " "); | ||
} | ||
const i = b(` | ||
const d = b(` | ||
<svg | ||
@@ -25,3 +26,3 @@ width="24" | ||
</svg> | ||
`), C = b(` | ||
`), h = b(` | ||
<svg | ||
@@ -45,3 +46,3 @@ width="24" | ||
</svg> | ||
`), d = (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, "-"), p = (r, a) => `url(${r}), ${a.join(", ")}`, l = (r) => `--affine-${d(r)}`, u = (r) => Object.entries(r), e = "apple-system, BlinkMacSystemFont, 'Helvetica Neue', Tahoma, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji','Segoe UI Symbol', 'Noto Color Emoji'", o = "'Helvetica Neue', Tahoma, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji','Segoe UI Symbol', 'Noto Color Emoji'", x = { | ||
`), u = (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, "-"), p = (r, a) => `url(${r}), ${a.join(", ")}`, l = (r) => `--affine-${u(r)}`, c = (r) => Object.entries(r), e = "apple-system, BlinkMacSystemFont, 'Helvetica Neue', Tahoma, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji','Segoe UI Symbol', 'Noto Color Emoji'", o = "'Helvetica Neue', Tahoma, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji','Segoe UI Symbol', 'Noto Color Emoji'", n = { | ||
// font | ||
@@ -121,6 +122,6 @@ fontFamily: `'Inter', 'Source Sans 3', Poppins, ${e}`, | ||
// cursors | ||
grabbingCursor: p(i, ["grabbing"]), | ||
grabCursor: p(C, ["grab"]) | ||
}, h = { | ||
...x, | ||
grabbingCursor: p(d, ["grabbing"]), | ||
grabCursor: p(h, ["grab"]) | ||
}, s = { | ||
...n, | ||
themeMode: "light", | ||
@@ -257,4 +258,4 @@ brandColor: "#1E96EB", | ||
noteBackgroundWhite: "rgba(255, 255, 255, 1)" | ||
}, c = { | ||
...x, | ||
}, S = { | ||
...n, | ||
themeMode: "dark", | ||
@@ -391,3 +392,3 @@ brandColor: "#1E96EB", | ||
noteBackgroundWhite: "rgba(0, 0, 0, 1)" | ||
}, s = { | ||
}, w = { | ||
fontFamily: `'Inter', 'Source Sans 3', Poppins, ${o}`, | ||
@@ -399,17 +400,26 @@ fontSerifFamily: `'Source Serif 4', 'Noto Serif' , serif, 'Cambria', ${o}`, | ||
fontCodeFamily: `'IBM Plex Mono', 'Space Mono', Consolas, Menlo, Monaco, Courier, monospace, ${o}` | ||
}, g = (r) => u(r).reduce((a, [t, n]) => ({ ...a, [l(t)]: n }), {}), S = g(h), w = g(c), B = g(s); | ||
function k(r, a) { | ||
}, g = (r) => c(r).reduce((a, [t, x]) => ({ ...a, [l(t)]: x }), {}), k = g(s), B = g(S), y = g(w), F = { | ||
...k, | ||
...i | ||
}, f = { | ||
...B, | ||
...C | ||
}; | ||
function V(r, a) { | ||
return `var(${r.startsWith("--") ? r : l(r)}${a ? `, ${a}` : ""})`; | ||
} | ||
export { | ||
x as baseTheme, | ||
d as camelToKebab, | ||
k as cssVar, | ||
w as darkCssVariables, | ||
c as darkTheme, | ||
S as lightCssVariables, | ||
h as lightTheme, | ||
B as printCssVariables, | ||
s as printTheme | ||
n as baseTheme, | ||
u as camelToKebab, | ||
f as combinedDarkCssVariables, | ||
F as combinedLightCssVariables, | ||
V as cssVar, | ||
B as darkCssVariables, | ||
S as darkTheme, | ||
k as lightCssVariables, | ||
s as lightTheme, | ||
y as printCssVariables, | ||
w as printTheme, | ||
l as themeToVar | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@toeverything/theme", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "repository": "toeverything/design", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
434205
21
3611
2