mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
Expand concept system: modes, ratings, re-roll, breadth strategy
Catalog: mode-aligned staging surfaces (persuade/operate/read/experience), star ratings on approvals feeding challenger draw weights, family retirements, authoring strategy and territory guide, rework and breadth authoring rounds, composition mining from rejected worlds. Seed: six challengers (two per tier), --reroll chains, --mode staging filter, rating-weighted draws. New-work: Present/visualize/re-roll flow, image-gen requirement, register-neutral vocabulary. Pipeline: per-mode staging prompts with split frames, hero-from-board reference generation, render-safety guards. Labs: ratings UI, unrated filter, mode chips, composition approve-guard. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
144cee5c36
commit
7557935fdb
@@ -30,6 +30,9 @@ function checkBorders(tag, widths, colors, radius, opts = {}) {
|
||||
// text-level borders, not chips. They skip the left/right arms below.
|
||||
const spanBadge = tag === 'span' && !!opts.badgeLike;
|
||||
if (BORDER_SAFE_TAGS.has(tag) && !spanBadge) return [];
|
||||
// A live status/alert region wears a colored single-edge border as a
|
||||
// severity accent (toast, snackbar, callout), not as the side-tab tell.
|
||||
if (opts.statusContext) return [];
|
||||
const findings = [];
|
||||
const sides = ['Top', 'Right', 'Bottom', 'Left'];
|
||||
|
||||
@@ -1743,6 +1746,20 @@ function isTabContextElement(el) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Status-surface context for accent borders. On a live status/alert region
|
||||
// (role=status|alert|alertdialog|log, or aria-live=polite|assertive) a colored
|
||||
// single-edge border is the established severity-accent convention — a toast,
|
||||
// snackbar, or callout bar — not the decorative side-tab tell. The element
|
||||
// itself or a wrapping live region qualifies. This never fires from the
|
||||
// CSS-only / regex scanners, which have no role information.
|
||||
function isStatusContextElement(el) {
|
||||
if (!el) return false;
|
||||
try {
|
||||
if (el.closest?.('[role="status"], [role="alert"], [role="alertdialog"], [role="log"], [aria-live="polite"], [aria-live="assertive"]')) return true;
|
||||
} catch { /* selector engine differences — fall through */ }
|
||||
return false;
|
||||
}
|
||||
|
||||
function checkElementBordersDOM(el) {
|
||||
const tag = el.tagName.toLowerCase();
|
||||
if (BORDER_SAFE_TAGS.has(tag)) return [];
|
||||
@@ -1758,6 +1775,7 @@ function checkElementBordersDOM(el) {
|
||||
const ownBg = parseRgb(style.backgroundColor) || parseAnyColor(style.backgroundColor);
|
||||
return checkBorders(tag, widths, colors, parseFloat(style.borderRadius) || 0, {
|
||||
tabContext: isTabContextElement(el),
|
||||
statusContext: isStatusContextElement(el),
|
||||
badgeLike: !!(ownBg && (ownBg.a ?? 1) > 0.1),
|
||||
});
|
||||
}
|
||||
@@ -3209,6 +3227,7 @@ function checkElementBorders(tag, style, overrides, resolvedRadius, el = null) {
|
||||
const ownBg = parseAnyColor(style.backgroundColor);
|
||||
return checkBorders(tag, widths, colors, radius, {
|
||||
tabContext: isTabContextElement(el),
|
||||
statusContext: isStatusContextElement(el),
|
||||
badgeLike: !!(ownBg && (ownBg.a ?? 1) > 0.1),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user