colorsbymax 0.4.0 → 0.5.0
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/CHANGELOG.md +133 -110
- package/README.md +26 -8
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/{ThemeSwitcher-DB_-2YB8.js → ThemeSwitcher-Cns36kps.js} +4971 -1896
- package/dist/auto.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +27 -8
package/dist/auto.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ThemeProvider, t as ThemeSwitcher } from "./ThemeSwitcher-Cns36kps.js";
|
|
2
2
|
import { createElement } from "react";
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
4
|
//#region src/auto.js
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as PAIRINGS, C as TOKEN_KEYS, D as MIN_CONTRAST_NON_TEXT, E as MIN_CONTRAST_LARGE_TEXT, F as contrastRatio, I as normalizeHex, M as checkTheme, N as fixAll, O as MIN_CONTRAST_TEXT, P as suggestFix, S as TOKEN_GROUPS, T as deriveAppTokens, _ as darkTokens, a as
|
|
1
|
+
import { A as PAIRINGS, C as TOKEN_KEYS, D as MIN_CONTRAST_NON_TEXT, E as MIN_CONTRAST_LARGE_TEXT, F as contrastRatio, I as normalizeHex, M as checkTheme, N as fixAll, O as MIN_CONTRAST_TEXT, P as suggestFix, S as TOKEN_GROUPS, T as deriveAppTokens, _ as darkTokens, a as DEFAULT_STORAGE_KEY, b as BASE_TOKENS, c as coloursFromFile, d as themeFromPalette, f as collectColors, g as themeFromRoles, h as suggestThemes, i as useTheme, j as checkRamp, k as MIN_RAMP_STEP_DELTA_E, l as dominantColours, m as inferRoles, n as ThemeProvider, o as prePaintScript, p as detectSiteName, r as applyTokens, s as DEFAULT_SETTINGS, t as ThemeSwitcher, u as rolesFromPalette, v as isDarkTheme, w as completeTokens, x as PRESETS, y as toDark } from "./ThemeSwitcher-Cns36kps.js";
|
|
2
2
|
export { BASE_TOKENS, DEFAULT_SETTINGS, DEFAULT_STORAGE_KEY, MIN_CONTRAST_LARGE_TEXT, MIN_CONTRAST_NON_TEXT, MIN_CONTRAST_TEXT, MIN_RAMP_STEP_DELTA_E, PAIRINGS, PRESETS, TOKEN_GROUPS, TOKEN_KEYS, ThemeProvider, ThemeSwitcher, applyTokens, checkRamp, checkTheme, collectColors, coloursFromFile, completeTokens, contrastRatio, darkTokens, deriveAppTokens, detectSiteName, dominantColours, fixAll, inferRoles, isDarkTheme, normalizeHex, prePaintScript, rolesFromPalette, suggestFix, suggestThemes, themeFromPalette, themeFromRoles, toDark, useTheme };
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -96,17 +96,32 @@ export interface ColorsByMaxConfig {
|
|
|
96
96
|
*/
|
|
97
97
|
colourLogo?: boolean
|
|
98
98
|
/**
|
|
99
|
-
* How boldly a
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* '
|
|
99
|
+
* How boldly the site takes a theme, for a first-time visitor. 'subtle' keeps the site's own
|
|
100
|
+
* backgrounds, cards and text and brings the theme in on buttons, links and highlights.
|
|
101
|
+
* 'balanced' is the theme as designed (the default on a site painted with the --color-*
|
|
102
|
+
* variables). 'colourful' is an overhaul: tinted backgrounds, and the page's parts painted by role
|
|
103
|
+
* as a designer would (the default on a site colorsbymax re-colours). Visitors can switch in the panel.
|
|
103
104
|
*/
|
|
104
|
-
colourStyle?: '
|
|
105
|
+
colourStyle?: 'subtle' | 'balanced' | 'colourful'
|
|
106
|
+
/**
|
|
107
|
+
* The bell in the panel: says when a newer colorsbymax is out, with how to update, and shows news
|
|
108
|
+
* from mrmaxdesigns. 'dev' (default) shows it only on development addresses (localhost and the
|
|
109
|
+
* like), never to a live site's visitors; true everywhere; false never. It checks once a day.
|
|
110
|
+
*/
|
|
111
|
+
updates?: boolean | 'dev'
|
|
112
|
+
/** How strongly Colourful paints for a first-time visitor, 0 (a light wash) to 100 (bold). Default 50. */
|
|
113
|
+
colourStrength?: number
|
|
105
114
|
/**
|
|
106
115
|
* Parts of the panel to switch off for everyone, e.g. `{ scan: false, audit: false }`. All are on
|
|
107
116
|
* by default. Unlike the rest of the config it's read live, so a site can change it after loading.
|
|
108
117
|
*/
|
|
109
|
-
features?: Partial<Record<'picks' | 'library' | 'search' | 'surprise' | 'scan' | 'custom' | 'overrides' | 'importExport' | 'audit' | 'addToSite' | 'colourStyle' | 'colourCount', boolean>>
|
|
118
|
+
features?: Partial<Record<'picks' | 'library' | 'search' | 'surprise' | 'scan' | 'custom' | 'overrides' | 'importExport' | 'audit' | 'addToSite' | 'colourStyle' | 'colourCount' | 'studio', boolean>>
|
|
119
|
+
/**
|
|
120
|
+
* Only colour these pages, e.g. `['/', '/pricing', '/blog/*']`. A path ending in `/*` is that
|
|
121
|
+
* section and every page under it. Every other page keeps its own colours. Default: the whole
|
|
122
|
+
* site. A visitor can choose differently in Studio, on their own device.
|
|
123
|
+
*/
|
|
124
|
+
pages?: string[]
|
|
110
125
|
/**
|
|
111
126
|
* The mode a first-time visitor starts in (default 'light'; 'system' follows their device). Any
|
|
112
127
|
* site can start dark: every theme has a dark twin. Visitors can still change it.
|
|
@@ -232,8 +247,12 @@ export interface PanelSettings {
|
|
|
232
247
|
libraryCollapsed: boolean
|
|
233
248
|
/** Whether themes re-colour the site's logo too. Off (the default) keeps its own colours. */
|
|
234
249
|
colourLogo: boolean
|
|
235
|
-
/**
|
|
236
|
-
colourStyle: '
|
|
250
|
+
/** How boldly the site takes a theme: its own look with the theme's accents, the theme as designed, or an overhaul. */
|
|
251
|
+
colourStyle: 'subtle' | 'balanced' | 'colourful'
|
|
252
|
+
/** How strongly Colourful paints, 0 (a light wash) to 100 (bold). */
|
|
253
|
+
colourStrength: number
|
|
254
|
+
/** Whether Colourful tints the page with colours from the site's own pictures. */
|
|
255
|
+
imageTints: boolean
|
|
237
256
|
/** Hidden on this device (from the finish screen); Alt+Shift+C or ?colorsbymax brings it back. */
|
|
238
257
|
hideButton: boolean
|
|
239
258
|
}
|