@mistriwork/engine 1.0.0-rc.18 → 1.0.0-rc.19
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/shared/theme.js
CHANGED
|
@@ -707,6 +707,11 @@ function stateFindings(theme, name, at, palette, all) {
|
|
|
707
707
|
names its own block (nav.current) is measured on that instead. */
|
|
708
708
|
if (recipes.nav === 'pill' && !palette.navCurrent)
|
|
709
709
|
check("navAccent/accentSoft over navGround (the pill menu's current entry)", color('navAccent'), soft && nav ? over(soft, nav) : undefined);
|
|
710
|
+
/* A round avatar look draws the sidebar's identity mark in the menu's accent on a 12% tint of that accent, laid on
|
|
711
|
+
the menu's ground (lumenLook.css). */
|
|
712
|
+
const navAccent = color('navAccent');
|
|
713
|
+
if (recipes.avatar === 'round')
|
|
714
|
+
check('navAccent/its own tint over navGround (the identity mark)', navAccent, tintOver(navAccent, nav));
|
|
710
715
|
/* The search is a field on the surface in the page's ink (themeFamilies.css), a pair the page's checks read; the
|
|
711
716
|
dark bar alone draws it on an 8% ink tint of its own ground in its muted ink (brandLook.css). */
|
|
712
717
|
if (recipes.bar === 'dark')
|
|
@@ -758,13 +763,17 @@ function stateFindings(theme, name, at, palette, all) {
|
|
|
758
763
|
for (const [part, style] of Object.entries(theme.parts ?? {})) {
|
|
759
764
|
if (!style || (style.ground === undefined && style.ink === undefined))
|
|
760
765
|
continue;
|
|
761
|
-
const
|
|
766
|
+
const round = recipes.avatar === 'round';
|
|
767
|
+
const ink = style.ink ? pathRole(style.ink) : partInk(part, round);
|
|
762
768
|
const ground = style.ground ? pathRole(style.ground) : partGround(part, palette);
|
|
763
769
|
if (!ink || !ground)
|
|
764
770
|
continue;
|
|
765
771
|
const said = (role) => rolePath(role);
|
|
766
772
|
const label = `parts.${part}: ${ink} on ${ground}`;
|
|
767
|
-
|
|
773
|
+
/* A round mark left on its own ground is drawn on a 12% tint of the menu's accent over the menu (lumenLook.css),
|
|
774
|
+
not on the menu's ground itself. */
|
|
775
|
+
const tinted = part === 'identityMark' && round && !style.ground;
|
|
776
|
+
const foreground = color(ink), background = tinted ? tintOver(color('navAccent'), color('navGround')) : color(ground);
|
|
768
777
|
if (!foreground || !background)
|
|
769
778
|
continue;
|
|
770
779
|
const ratio = measuredContrast(foreground, background);
|
|
@@ -781,9 +790,15 @@ function stateFindings(theme, name, at, palette, all) {
|
|
|
781
790
|
}
|
|
782
791
|
return result;
|
|
783
792
|
}
|
|
793
|
+
/** The round identity mark's ground: its accent at 12% over the menu (lumenLook.css). */
|
|
794
|
+
function tintOver(accent, ground) {
|
|
795
|
+
return accent && ground ? over(mixColor(accent, [0, 0, 0, 0], 0.12), ground) : undefined;
|
|
796
|
+
}
|
|
784
797
|
/** The ink a part's words are drawn in when its style says none: the menu's for the menu's parts, the link's for a
|
|
785
798
|
link; a primary button's is the ink drawn on the accent fill. */
|
|
786
|
-
function partInk(part) {
|
|
799
|
+
function partInk(part, round) {
|
|
800
|
+
if (part === 'identityMark')
|
|
801
|
+
return round ? 'navAccent' : 'navInk';
|
|
787
802
|
if (part === 'button.primary')
|
|
788
803
|
return 'onAccent';
|
|
789
804
|
if (/^(?:nav|bar|logo)\b/.test(part))
|
|
@@ -792,6 +807,8 @@ function partInk(part) {
|
|
|
792
807
|
}
|
|
793
808
|
/** The ground a part is drawn on when its style says none. */
|
|
794
809
|
function partGround(part, palette) {
|
|
810
|
+
if (part === 'identityMark')
|
|
811
|
+
return 'navGround';
|
|
795
812
|
if (/^(?:nav|bar|logo)\b/.test(part))
|
|
796
813
|
return 'navGround';
|
|
797
814
|
if (part === 'button.primary')
|
|
@@ -211,7 +211,7 @@ export declare function typeAttributes(type: ThemeTypeDefinition | undefined): R
|
|
|
211
211
|
* The published parts a theme may dress one by one (themeParts.ts says what each may take and how it is worn). Here,
|
|
212
212
|
* with the words the root wears for them, because the first paint sets `data-parts` as it sets the recipes'.
|
|
213
213
|
*/
|
|
214
|
-
export declare const THEME_PARTS: readonly ["ground", "bar", "bar.search", "nav", "nav.item", "nav.current", "nav.group", "logo", "page.title", "tabs", "tab.current", "section", "section.title", "stat", "stat.figure", "fields", "field.label", "table", "table.head", "table.row", "status", "tag", "button.primary", "button.secondary", "button.quiet", "link", "board.lane", "board.card", "workflow.step", "banner", "steps.step", "avatar", "menu", "dialog", "chart"];
|
|
214
|
+
export declare const THEME_PARTS: readonly ["ground", "bar", "bar.search", "nav", "nav.item", "nav.current", "nav.group", "logo", "page.title", "tabs", "tab.current", "section", "section.title", "stat", "stat.figure", "fields", "field.label", "table", "table.head", "table.row", "status", "tag", "button.primary", "button.secondary", "button.quiet", "link", "board.lane", "board.card", "workflow.step", "banner", "steps.step", "avatar", "identityMark", "menu", "dialog", "chart"];
|
|
215
215
|
/** What a part style may say, in the order its words are written. */
|
|
216
216
|
export declare const PART_PROPERTIES: readonly ['ground', 'ink', 'edge', 'radius', 'lift', 'face', 'weight', 'case'];
|
|
217
217
|
/** The root's `data-parts`: one word per property a part says (`stat:ground button.primary:case`); undefined when none. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mistriwork/engine",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.19",
|
|
4
4
|
"description": "The engine both products stand on: the adapters (SQLite, Postgres), the catalog, the query language, keyset pages, the HTTP kit and the shared rules. No React.",
|
|
5
5
|
"homepage": "https://mistriwork.dev",
|
|
6
6
|
"bugs": {
|