oh-my-opencode 5.1.51 → 5.1.55
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/agents/atlas/agent.d.ts +5 -5
- package/dist/agents/dynamic-agent-core-sections.d.ts +0 -1
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +1 -1
- package/dist/agents/gpt-apply-patch-guard.d.ts +0 -1
- package/dist/agents/hephaestus/agent.d.ts +3 -7
- package/dist/agents/hephaestus/model-support.d.ts +6 -0
- package/dist/agents/metis.d.ts +0 -15
- package/dist/agents/native-model-prompt.d.ts +9 -0
- package/dist/agents/native-prompt-frame.d.ts +20 -0
- package/dist/agents/native-tool-snippet.d.ts +6 -0
- package/dist/agents/sisyphus/default.d.ts +0 -1
- package/dist/agents/sisyphus-agent-factory.d.ts +2 -11
- package/dist/agents/sisyphus-junior/agent.d.ts +2 -20
- package/dist/agents/sisyphus-junior/index.d.ts +1 -11
- package/dist/agents/sisyphus-runtime-prompt-reconciler.d.ts +6 -0
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/index.js +1174 -394
- package/dist/cli/service-auth/credential-lock.d.ts +11 -0
- package/dist/cli/service-auth/credential-owner.d.ts +10 -0
- package/dist/cli/service-auth/index.d.ts +3 -1
- package/dist/cli/service-auth/keystore.d.ts +8 -1
- package/dist/cli/service-auth/owned-refresh.d.ts +21 -0
- package/dist/cli/service-auth/protocol-v2.d.ts +27 -0
- package/dist/cli/service-auth/protocol.d.ts +26 -2
- package/dist/cli/service-auth/recovery-clock.d.ts +7 -0
- package/dist/cli/service-auth/refresh-attempt.d.ts +34 -0
- package/dist/cli/service-auth/session.d.ts +9 -2
- package/dist/cli-node/index.js +1174 -394
- package/dist/config/schema/agent-overrides.d.ts +64 -0
- package/dist/config/schema/categories.d.ts +8 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +64 -0
- package/dist/hooks/native-edition-nudge/hook.d.ts +3 -4
- package/dist/index.js +15625 -8841
- package/dist/oh-my-opencode.schema.json +112 -0
- package/dist/plugin/session-tool-permissions.d.ts +10 -0
- package/dist/plugin/system-transform.d.ts +2 -1
- package/dist/plugin/tool-definition.d.ts +1 -0
- package/dist/shared/bun-ffi-shim.d.ts +29 -0
- package/dist/shared/json-file-cache-store.d.ts +11 -0
- package/dist/skills/browser/runtime/omowright/index.js +24 -33
- package/dist/skills/browser/runtime/omowright/manifest.json +3 -3
- package/dist/skills/frontend/ATTRIBUTION.md +104 -1
- package/dist/skills/frontend/SKILL.md +7 -3
- package/dist/skills/frontend/references/design/design-system-architecture.md +3 -3
- package/dist/skills/frontend/references/perfection/craft-floor.md +59 -0
- package/dist/skills/frontend/references/perfection/detect.md +52 -0
- package/dist/skills/frontend/scripts/detect/cli.ts +70 -0
- package/dist/skills/frontend/scripts/detect/config.test.ts +26 -0
- package/dist/skills/frontend/scripts/detect/config.ts +53 -0
- package/dist/skills/frontend/scripts/detect/core/characters.ts +2 -0
- package/dist/skills/frontend/scripts/detect/core/color.test.ts +29 -0
- package/dist/skills/frontend/scripts/detect/core/color.ts +150 -0
- package/dist/skills/frontend/scripts/detect/core/page.ts +84 -0
- package/dist/skills/frontend/scripts/detect/core/shadow.ts +40 -0
- package/dist/skills/frontend/scripts/detect/core/source.ts +33 -0
- package/dist/skills/frontend/scripts/detect/detect.ts +77 -0
- package/dist/skills/frontend/scripts/detect/index.ts +23 -0
- package/dist/skills/frontend/scripts/detect/lint.test.ts +27 -0
- package/dist/skills/frontend/scripts/detect/lint.ts +98 -0
- package/dist/skills/frontend/scripts/detect/render/probe-placement.test.ts +19 -0
- package/dist/skills/frontend/scripts/detect/render/probe-placement.ts +50 -0
- package/dist/skills/frontend/scripts/detect/render/renderer.ts +37 -0
- package/dist/skills/frontend/scripts/detect/render/webview.ts +71 -0
- package/dist/skills/frontend/scripts/detect/report.ts +29 -0
- package/dist/skills/frontend/scripts/detect/rule.ts +42 -0
- package/dist/skills/frontend/scripts/detect/rules/color/ai-color-palette.test.ts +74 -0
- package/dist/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +83 -0
- package/dist/skills/frontend/scripts/detect/rules/color/cream-palette.test.ts +24 -0
- package/dist/skills/frontend/scripts/detect/rules/color/cream-palette.ts +35 -0
- package/dist/skills/frontend/scripts/detect/rules/color/dark-glow.test.ts +47 -0
- package/dist/skills/frontend/scripts/detect/rules/color/dark-glow.ts +44 -0
- package/dist/skills/frontend/scripts/detect/rules/color/design-system-color.test.ts +26 -0
- package/dist/skills/frontend/scripts/detect/rules/color/design-system-color.ts +35 -0
- package/dist/skills/frontend/scripts/detect/rules/color/gradient-text.test.ts +24 -0
- package/dist/skills/frontend/scripts/detect/rules/color/gradient-text.ts +59 -0
- package/dist/skills/frontend/scripts/detect/rules/color/gray-on-color.test.ts +39 -0
- package/dist/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +38 -0
- package/dist/skills/frontend/scripts/detect/rules/color/index.ts +15 -0
- package/dist/skills/frontend/scripts/detect/rules/color/low-contrast.test.ts +209 -0
- package/dist/skills/frontend/scripts/detect/rules/color/low-contrast.ts +57 -0
- package/dist/skills/frontend/scripts/detect/rules/color/placeholder-contrast.test.ts +62 -0
- package/dist/skills/frontend/scripts/detect/rules/color/radial-halo.test.ts +40 -0
- package/dist/skills/frontend/scripts/detect/rules/color/radial-halo.ts +31 -0
- package/dist/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.test.ts +27 -0
- package/dist/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +33 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +78 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/color-path.ts +15 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +54 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +76 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +56 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +134 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/gradients.ts +91 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +63 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +7 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +141 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +58 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +25 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +31 -0
- package/dist/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +80 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.test.ts +18 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +20 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/broken-image.test.ts +25 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/broken-image.ts +17 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.test.ts +39 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +46 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/index.ts +15 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.test.ts +18 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +33 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.test.ts +58 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +34 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/repeated-container-text.test.ts +43 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +56 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/script-error.test.ts +48 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/script-error.ts +38 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/skipped-heading.test.ts +49 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +81 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +94 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +37 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.test.ts +17 -0
- package/dist/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +21 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.test.ts +43 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +48 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.test.ts +33 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +14 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/bounce-easing.test.ts +72 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +83 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/buried-raster.test.ts +95 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +72 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.test.ts +28 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +34 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/design-system-radius.test.ts +37 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +31 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.test.ts +59 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +66 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.test.ts +45 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +31 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.test.ts +76 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +19 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.test.ts +67 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +92 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/index.ts +38 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.test.ts +126 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +69 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/marquee.test.ts +63 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/marquee.ts +51 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.test.ts +67 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +41 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.test.ts +58 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +72 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.test.ts +26 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +25 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.test.ts +59 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +58 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/side-tab.test.ts +91 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +17 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +110 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +25 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +150 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +151 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +66 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +55 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +40 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +134 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +85 -0
- package/dist/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +51 -0
- package/dist/skills/frontend/scripts/detect/rules/index.ts +16 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.test.ts +64 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +62 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.test.ts +40 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +15 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.test.ts +62 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +63 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/cramped-padding.test.ts +61 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +97 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.test.ts +43 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +47 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.test.ts +28 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +43 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/heading-rhythm.test.ts +67 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +30 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/index.ts +21 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.test.ts +19 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +32 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/nested-cards.test.ts +60 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +38 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/straggler.test.ts +33 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/straggler.ts +28 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/support/cards.ts +114 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +71 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +46 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +73 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +35 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +32 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/support/motion.ts +77 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/support/padding.ts +93 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +161 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/text-occlusion.test.ts +37 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +84 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/text-overflow.test.ts +83 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +72 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.test.ts +22 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +22 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/viewport-reflow.test.ts +34 -0
- package/dist/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +33 -0
- package/dist/skills/frontend/scripts/detect/rules/source/ai-color-palette.test.ts +13 -0
- package/dist/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +11 -0
- package/dist/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.test.ts +12 -0
- package/dist/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +14 -0
- package/dist/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.test.ts +14 -0
- package/dist/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +20 -0
- package/dist/skills/frontend/scripts/detect/rules/source/bounce-easing.test.ts +19 -0
- package/dist/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +21 -0
- package/dist/skills/frontend/scripts/detect/rules/source/broken-image.test.ts +27 -0
- package/dist/skills/frontend/scripts/detect/rules/source/broken-image.ts +16 -0
- package/dist/skills/frontend/scripts/detect/rules/source/codex-grid-background.test.ts +11 -0
- package/dist/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +18 -0
- package/dist/skills/frontend/scripts/detect/rules/source/dark-glow.test.ts +15 -0
- package/dist/skills/frontend/scripts/detect/rules/source/dark-glow.ts +21 -0
- package/dist/skills/frontend/scripts/detect/rules/source/em-dash-overuse.test.ts +13 -0
- package/dist/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +15 -0
- package/dist/skills/frontend/scripts/detect/rules/source/gradient-text.test.ts +12 -0
- package/dist/skills/frontend/scripts/detect/rules/source/gradient-text.ts +11 -0
- package/dist/skills/frontend/scripts/detect/rules/source/gray-on-color.test.ts +20 -0
- package/dist/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +13 -0
- package/dist/skills/frontend/scripts/detect/rules/source/index.ts +19 -0
- package/dist/skills/frontend/scripts/detect/rules/source/marketing-buzzword.test.ts +12 -0
- package/dist/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +17 -0
- package/dist/skills/frontend/scripts/detect/rules/source/marquee.test.ts +12 -0
- package/dist/skills/frontend/scripts/detect/rules/source/marquee.ts +12 -0
- package/dist/skills/frontend/scripts/detect/rules/source/monotonous-spacing.test.ts +13 -0
- package/dist/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +22 -0
- package/dist/skills/frontend/scripts/detect/rules/source/overused-font.test.ts +21 -0
- package/dist/skills/frontend/scripts/detect/rules/source/overused-font.ts +16 -0
- package/dist/skills/frontend/scripts/detect/rules/source/radial-halo.test.ts +16 -0
- package/dist/skills/frontend/scripts/detect/rules/source/radial-halo.ts +14 -0
- package/dist/skills/frontend/scripts/detect/rules/source/side-tab.test.ts +29 -0
- package/dist/skills/frontend/scripts/detect/rules/source/side-tab.ts +58 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +78 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/corners.ts +105 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +81 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +131 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +34 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +44 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/source-color.ts +42 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +15 -0
- package/dist/skills/frontend/scripts/detect/rules/source/support/source-text.ts +110 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/all-caps-body.test.ts +24 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +15 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font-size.test.ts +21 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +23 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font.test.ts +22 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +24 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.test.ts +23 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +18 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.test.ts +33 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +26 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/index.ts +21 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/italic-serif-display.test.ts +24 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +24 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/justified-text.test.ts +31 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/justified-text.ts +32 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/line-length.test.ts +43 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/line-length.ts +28 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/oversized-h1.test.ts +26 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +20 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/overused-font.test.ts +35 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/overused-font.ts +45 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +48 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +48 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +16 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +28 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/support/painted-text.test.ts +63 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +81 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +57 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +112 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +43 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +48 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/tight-leading.test.ts +54 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +47 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/tiny-text.test.ts +60 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +23 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.test.ts +98 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +28 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/wide-tracking.test.ts +26 -0
- package/dist/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +26 -0
- package/dist/skills/frontend/scripts/detect/snapshot/collect.ts +158 -0
- package/dist/skills/frontend/scripts/detect/snapshot/style-props.ts +25 -0
- package/dist/skills/frontend/scripts/detect/testing/build-snapshot.ts +78 -0
- package/dist/skills/frontend/scripts/detect/tsconfig.json +19 -0
- package/dist/skills/frontend/scripts/detect/types.ts +124 -0
- package/dist/skills/programming/SKILL.md +17 -74
- package/dist/skills/programming/references/go/README.md +1 -1
- package/dist/skills/programming/references/go/bootstrap.md +2 -2
- package/dist/skills/programming/references/python/README.md +4 -4
- package/dist/skills/programming/references/python/one-liners.md +5 -5
- package/dist/skills/programming/references/testing/README.md +82 -0
- package/dist/skills/programming/references/testing/junk-classes.md +56 -0
- package/dist/skills/programming/references/typescript/README.md +1 -2
- package/dist/skills/programming/scripts/go/new-project.ts +197 -0
- package/dist/skills/programming/scripts/python/new-project.ts +231 -0
- package/dist/skills/programming/scripts/python/new-script.ts +134 -0
- package/dist/skills/programming/scripts/rust/new-project.ts +215 -0
- package/dist/skills/programming/scripts/scaffolders.test.ts +96 -0
- package/dist/skills/programming/scripts/shared/run-tool.ts +19 -0
- package/dist/skills/programming/scripts/typescript/check-test-junk-rules.ts +140 -0
- package/dist/skills/programming/scripts/typescript/check-test-junk.test.ts +125 -0
- package/dist/skills/programming/scripts/typescript/check-test-junk.ts +148 -0
- package/dist/skills/programming/scripts/typescript/mutation-proof.test.ts +43 -0
- package/dist/skills/programming/scripts/typescript/mutation-proof.ts +179 -0
- package/dist/skills/remove-ai-slops/SKILL.md +32 -20
- package/dist/skills/ulw-research/scripts/source-commands.mjs +3 -1
- package/dist/skills/ulw-research/scripts/source-integrity.test.ts +39 -2
- package/dist/skills/visual-qa/SKILL.md +12 -1
- package/dist/tools/delegate-task/models-distribution.d.ts +1 -0
- package/dist/tui.js +142 -42
- package/package.json +22 -19
- package/packages/lsp-core/src/lsp/config-loader.ts +18 -2
- package/packages/lsp-core/src/lsp/host-js-runtime.test.ts +150 -0
- package/packages/lsp-core/src/lsp/host-js-runtime.ts +57 -0
- package/packages/lsp-core/src/lsp/server-definitions.ts +10 -0
- package/packages/lsp-core/src/lsp/server-resolution.ts +9 -1
- package/packages/lsp-core/src/lsp/typescript-server-defaults.test.ts +84 -0
- package/packages/lsp-daemon/dist/cli.js +81 -15
- package/packages/lsp-daemon/dist/client.js +74 -8
- package/packages/lsp-daemon/dist/index.js +76 -10
- package/packages/lsp-tools-mcp/dist/cli.js +74 -8
- package/packages/lsp-tools-mcp/dist/mcp.js +74 -8
- package/packages/lsp-tools-mcp/dist/tools.js +74 -8
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +22 -4
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +77 -13
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +34 -2
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +34 -2
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/test/codex-hook.test.ts +14 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/auto-update-plan.mjs +16 -1
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +24 -33
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +3 -3
- package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +104 -1
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +7 -3
- package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +3 -3
- package/packages/omo-codex/plugin/skills/frontend/references/perfection/craft-floor.md +59 -0
- package/packages/omo-codex/plugin/skills/frontend/references/perfection/detect.md +52 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/cli.ts +70 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/config.ts +53 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/characters.ts +2 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/color.ts +150 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/page.ts +84 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/shadow.ts +40 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/core/source.ts +33 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/detect.ts +77 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/index.ts +23 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/lint.ts +98 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/probe-placement.ts +50 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/renderer.ts +37 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/render/webview.ts +71 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/report.ts +29 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rule.ts +42 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +83 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/cream-palette.ts +35 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/dark-glow.ts +44 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/design-system-color.ts +35 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/gradient-text.ts +59 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +38 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/index.ts +15 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/low-contrast.ts +57 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/radial-halo.ts +31 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +33 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +78 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/color-path.ts +15 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +54 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +76 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +56 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +134 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/gradients.ts +91 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +63 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +7 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +141 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +58 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +25 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +31 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +80 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +20 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/broken-image.ts +17 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +46 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/index.ts +15 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +33 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +34 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +56 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/script-error.ts +38 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +81 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +94 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +37 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +21 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +48 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +14 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +83 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +72 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +34 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +31 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +66 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +31 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +19 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +92 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/index.ts +38 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +69 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/marquee.ts +51 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +41 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +72 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +25 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +58 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +17 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +110 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +25 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +150 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +151 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +66 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +55 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +40 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +134 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +85 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +51 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/index.ts +16 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +62 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +15 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +63 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +97 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +47 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +43 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +30 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/index.ts +21 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +32 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +38 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/straggler.ts +28 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/cards.ts +114 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +71 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +46 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +73 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +35 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +32 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/motion.ts +77 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/padding.ts +93 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +161 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +84 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +72 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +22 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +33 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +11 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +14 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +20 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +21 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/broken-image.ts +16 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +18 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/dark-glow.ts +21 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +15 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/gradient-text.ts +11 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +13 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/index.ts +19 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +17 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/marquee.ts +12 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +22 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/overused-font.ts +16 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/radial-halo.ts +14 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/side-tab.ts +58 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +78 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/corners.ts +105 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +81 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +131 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +34 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +44 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-color.ts +42 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +15 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/source/support/source-text.ts +110 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +15 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +23 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +24 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +18 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +26 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/index.ts +21 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +24 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/justified-text.ts +32 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/line-length.ts +28 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +20 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/overused-font.ts +45 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +48 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +48 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +16 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +28 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +81 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +57 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +112 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +43 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +48 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +47 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +23 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +28 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +26 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/snapshot/collect.ts +158 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/snapshot/style-props.ts +25 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/testing/build-snapshot.ts +78 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/tsconfig.json +19 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/detect/types.ts +124 -0
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +17 -74
- package/packages/omo-codex/plugin/skills/programming/references/go/README.md +1 -1
- package/packages/omo-codex/plugin/skills/programming/references/go/bootstrap.md +2 -2
- package/packages/omo-codex/plugin/skills/programming/references/python/README.md +4 -4
- package/packages/omo-codex/plugin/skills/programming/references/python/one-liners.md +5 -5
- package/packages/omo-codex/plugin/skills/programming/references/testing/README.md +82 -0
- package/packages/omo-codex/plugin/skills/programming/references/testing/junk-classes.md +56 -0
- package/packages/omo-codex/plugin/skills/programming/references/typescript/README.md +1 -2
- package/packages/omo-codex/plugin/skills/programming/scripts/go/new-project.ts +197 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/python/new-project.ts +231 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/python/new-script.ts +134 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/rust/new-project.ts +215 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/shared/run-tool.ts +19 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-test-junk-rules.ts +140 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-test-junk.ts +148 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/mutation-proof.ts +179 -0
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +32 -20
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-commands.mjs +3 -1
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +12 -1
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +62 -0
- package/packages/omo-codex/plugin/test/payload-equivalence.test.mjs +12 -2
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +79 -10
- package/packages/shared-skills/skills/browser/runtime/omowright/index.js +24 -33
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +3 -3
- package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +104 -1
- package/packages/shared-skills/skills/frontend/SKILL.md +7 -3
- package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +3 -3
- package/packages/shared-skills/skills/frontend/references/perfection/craft-floor.md +59 -0
- package/packages/shared-skills/skills/frontend/references/perfection/detect.md +52 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/cli.ts +70 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/config.test.ts +26 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/config.ts +53 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/core/characters.ts +2 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/core/color.test.ts +29 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/core/color.ts +150 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/core/page.ts +84 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/core/shadow.ts +40 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/core/source.ts +33 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/detect.ts +77 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/index.ts +23 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/lint.test.ts +27 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/lint.ts +98 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/render/probe-placement.test.ts +19 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/render/probe-placement.ts +50 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/render/renderer.ts +37 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/render/webview.ts +71 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/report.ts +29 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rule.ts +42 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/ai-color-palette.test.ts +74 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +83 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/cream-palette.test.ts +24 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/cream-palette.ts +35 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/dark-glow.test.ts +47 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/dark-glow.ts +44 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/design-system-color.test.ts +26 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/design-system-color.ts +35 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gradient-text.test.ts +24 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gradient-text.ts +59 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gray-on-color.test.ts +39 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +38 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/index.ts +15 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/low-contrast.test.ts +209 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/low-contrast.ts +57 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/placeholder-contrast.test.ts +62 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-halo.test.ts +40 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-halo.ts +31 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.test.ts +27 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +33 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +78 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/color-path.ts +15 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +54 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +76 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +56 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +134 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/gradients.ts +91 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +63 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +7 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +141 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +58 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +25 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +31 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +80 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.test.ts +18 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +20 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/broken-image.test.ts +25 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/broken-image.ts +17 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.test.ts +39 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +46 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/index.ts +15 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.test.ts +18 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +33 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.test.ts +58 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +34 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/repeated-container-text.test.ts +43 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +56 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/script-error.test.ts +48 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/script-error.ts +38 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/skipped-heading.test.ts +49 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +81 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +94 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +37 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.test.ts +17 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +21 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.test.ts +43 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +48 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.test.ts +33 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +14 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/bounce-easing.test.ts +72 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +83 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/buried-raster.test.ts +95 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +72 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.test.ts +28 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +34 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/design-system-radius.test.ts +37 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +31 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.test.ts +59 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +66 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.test.ts +45 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +31 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.test.ts +76 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +19 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.test.ts +67 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +92 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/index.ts +38 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.test.ts +126 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +69 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/marquee.test.ts +63 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/marquee.ts +51 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.test.ts +67 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +41 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.test.ts +58 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +72 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.test.ts +26 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +25 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.test.ts +59 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +58 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/side-tab.test.ts +91 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +17 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +110 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +25 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +150 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +151 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +66 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +55 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +40 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +134 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +85 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +51 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/index.ts +16 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.test.ts +64 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +62 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.test.ts +40 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +15 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.test.ts +62 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +63 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/cramped-padding.test.ts +61 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +97 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.test.ts +43 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +47 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.test.ts +28 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +43 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/heading-rhythm.test.ts +67 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +30 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/index.ts +21 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.test.ts +19 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +32 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/nested-cards.test.ts +60 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +38 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/straggler.test.ts +33 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/straggler.ts +28 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/cards.ts +114 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +71 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +46 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +73 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +35 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +32 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/motion.ts +77 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/padding.ts +93 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +161 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-occlusion.test.ts +37 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +84 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-overflow.test.ts +83 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +72 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.test.ts +22 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +22 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/viewport-reflow.test.ts +34 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +33 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/ai-color-palette.test.ts +13 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +11 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.test.ts +12 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +14 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.test.ts +14 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +20 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/bounce-easing.test.ts +19 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +21 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/broken-image.test.ts +27 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/broken-image.ts +16 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/codex-grid-background.test.ts +11 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +18 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/dark-glow.test.ts +15 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/dark-glow.ts +21 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/em-dash-overuse.test.ts +13 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +15 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gradient-text.test.ts +12 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gradient-text.ts +11 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gray-on-color.test.ts +20 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +13 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/index.ts +19 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marketing-buzzword.test.ts +12 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +17 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marquee.test.ts +12 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/marquee.ts +12 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/monotonous-spacing.test.ts +13 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +22 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/overused-font.test.ts +21 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/overused-font.ts +16 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/radial-halo.test.ts +16 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/radial-halo.ts +14 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/side-tab.test.ts +29 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/side-tab.ts +58 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +78 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/corners.ts +105 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +81 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +131 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +34 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +44 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-color.ts +42 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +15 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/source/support/source-text.ts +110 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/all-caps-body.test.ts +24 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +15 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font-size.test.ts +21 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +23 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font.test.ts +22 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +24 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.test.ts +23 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +18 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.test.ts +33 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +26 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/index.ts +21 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/italic-serif-display.test.ts +24 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +24 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/justified-text.test.ts +31 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/justified-text.ts +32 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/line-length.test.ts +43 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/line-length.ts +28 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/oversized-h1.test.ts +26 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +20 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/overused-font.test.ts +35 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/overused-font.ts +45 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +48 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +48 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +16 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +28 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/painted-text.test.ts +63 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +81 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +57 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +112 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +43 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +48 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tight-leading.test.ts +54 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +47 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tiny-text.test.ts +60 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +23 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.test.ts +98 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +28 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/wide-tracking.test.ts +26 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +26 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/snapshot/collect.ts +158 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/snapshot/style-props.ts +25 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/testing/build-snapshot.ts +78 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/tsconfig.json +19 -0
- package/packages/shared-skills/skills/frontend/scripts/detect/types.ts +124 -0
- package/packages/shared-skills/skills/programming/SKILL.md +17 -74
- package/packages/shared-skills/skills/programming/references/go/README.md +1 -1
- package/packages/shared-skills/skills/programming/references/go/bootstrap.md +2 -2
- package/packages/shared-skills/skills/programming/references/python/README.md +4 -4
- package/packages/shared-skills/skills/programming/references/python/one-liners.md +5 -5
- package/packages/shared-skills/skills/programming/references/testing/README.md +82 -0
- package/packages/shared-skills/skills/programming/references/testing/junk-classes.md +56 -0
- package/packages/shared-skills/skills/programming/references/typescript/README.md +1 -2
- package/packages/shared-skills/skills/programming/scripts/go/new-project.ts +197 -0
- package/packages/shared-skills/skills/programming/scripts/python/new-project.ts +231 -0
- package/packages/shared-skills/skills/programming/scripts/python/new-script.ts +134 -0
- package/packages/shared-skills/skills/programming/scripts/rust/new-project.ts +215 -0
- package/packages/shared-skills/skills/programming/scripts/scaffolders.test.ts +96 -0
- package/packages/shared-skills/skills/programming/scripts/shared/run-tool.ts +19 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/check-test-junk-rules.ts +140 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/check-test-junk.test.ts +125 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/check-test-junk.ts +148 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/mutation-proof.test.ts +43 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/mutation-proof.ts +179 -0
- package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +32 -20
- package/packages/shared-skills/skills/ulw-research/scripts/source-commands.mjs +3 -1
- package/packages/shared-skills/skills/ulw-research/scripts/source-integrity.test.ts +39 -2
- package/packages/shared-skills/skills/visual-qa/SKILL.md +12 -1
- package/dist/agents/gpt-prompt-identity.d.ts +0 -3
- package/dist/agents/hephaestus/gpt-5-4.d.ts +0 -24
- package/dist/agents/hephaestus/gpt-5-5.d.ts +0 -2
- package/dist/agents/hephaestus/gpt-5-6.d.ts +0 -2
- package/dist/agents/kimi-tool-loop-guard.d.ts +0 -1
- package/dist/agents/sisyphus/claude-fable-5.d.ts +0 -19
- package/dist/agents/sisyphus/claude-opus-4-7.d.ts +0 -22
- package/dist/agents/sisyphus/claude-opus-4-8.d.ts +0 -19
- package/dist/agents/sisyphus/claude-opus-5.d.ts +0 -33
- package/dist/agents/sisyphus/gemini.d.ts +0 -20
- package/dist/agents/sisyphus/glm-5-2.d.ts +0 -4
- package/dist/agents/sisyphus/gpt-5-4.d.ts +0 -26
- package/dist/agents/sisyphus/gpt-5-5.d.ts +0 -6
- package/dist/agents/sisyphus/gpt-task-system-guide.d.ts +0 -1
- package/dist/agents/sisyphus/grok-4.d.ts +0 -21
- package/dist/agents/sisyphus/index.d.ts +0 -31
- package/dist/agents/sisyphus/kimi-k2-6.d.ts +0 -32
- package/dist/agents/sisyphus/kimi-k2-7.d.ts +0 -17
- package/dist/agents/sisyphus/kimi-k3-1.d.ts +0 -9
- package/dist/agents/sisyphus/kimi-k3.d.ts +0 -19
- package/dist/agents/sisyphus-dynamic-prompt-builder.d.ts +0 -2
- package/dist/agents/sisyphus-dynamic-prompt-execution.d.ts +0 -2
- package/dist/agents/sisyphus-dynamic-prompt-exploration.d.ts +0 -2
- package/dist/agents/sisyphus-dynamic-prompt-role.d.ts +0 -2
- package/dist/agents/sisyphus-dynamic-prompt-sections.d.ts +0 -18
- package/dist/agents/sisyphus-dynamic-prompt-style.d.ts +0 -2
- package/dist/agents/sisyphus-dynamic-prompt.d.ts +0 -3
- package/dist/agents/sisyphus-gemini-fallback-overrides.d.ts +0 -1
- package/dist/agents/sisyphus-junior/gemini.d.ts +0 -10
- package/dist/agents/sisyphus-junior/glm-5-2.d.ts +0 -1
- package/dist/agents/sisyphus-junior/gpt-5-4.d.ts +0 -11
- package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +0 -5
- package/dist/agents/sisyphus-junior/gpt.d.ts +0 -9
- package/dist/agents/sisyphus-junior/kimi-k2-6.d.ts +0 -13
- package/dist/agents/sisyphus-junior/kimi-k2-7.d.ts +0 -11
- package/dist/agents/sisyphus-junior/kimi-k3-1.d.ts +0 -6
- package/dist/agents/sisyphus-junior/kimi-k3.d.ts +0 -12
- package/dist/features/claude-code-agent-loader/opencode-config-agents-reader.d.ts +0 -1
- package/dist/features/claude-code-command-loader/loader-cache.d.ts +0 -1
- package/dist/features/claude-code-command-loader/loader.d.ts +0 -1
- package/dist/features/opencode-skill-loader/config-source-discovery.d.ts +0 -1
- package/dist/features/opencode-skill-loader/merger/config-skill-entry-loader.d.ts +0 -1
- package/dist/features/opencode-skill-loader/opencode-config-skills-reader.d.ts +0 -1
- package/dist/features/team-mode/team-layout-tmux/resolve-caller-tmux-session.d.ts +0 -1
- package/dist/features/team-mode/team-registry/team-spec-input-normalizer.d.ts +0 -1
- package/dist/shared/git-worktree/collect-git-diff-stats.d.ts +0 -1
- package/dist/shared/git-worktree/parse-status-porcelain-line.d.ts +0 -1
- package/dist/shared/migration/agent-names.d.ts +0 -1
- package/dist/shared/migration/migrations-sidecar.d.ts +0 -1
- package/dist/shared/skill-path-resolver.d.ts +0 -1
- package/dist/shared/zip-entry-listing/powershell-zip-entry-listing.d.ts +0 -1
- package/dist/shared/zip-entry-listing/zipinfo-zip-entry-listing.d.ts +0 -1
- package/dist/skills/programming/scripts/go/new-project.py +0 -138
- package/dist/skills/programming/scripts/python/new-project.py +0 -172
- package/dist/skills/programming/scripts/python/new-script.py +0 -116
- package/dist/skills/programming/scripts/rust/new-project.py +0 -178
- package/packages/omo-codex/plugin/skills/programming/scripts/go/new-project.py +0 -138
- package/packages/omo-codex/plugin/skills/programming/scripts/python/new-project.py +0 -172
- package/packages/omo-codex/plugin/skills/programming/scripts/python/new-script.py +0 -116
- package/packages/omo-codex/plugin/skills/programming/scripts/rust/new-project.py +0 -178
- package/packages/shared-skills/skills/programming/scripts/go/new-project.py +0 -138
- package/packages/shared-skills/skills/programming/scripts/python/new-project.py +0 -172
- package/packages/shared-skills/skills/programming/scripts/python/new-script.py +0 -116
- package/packages/shared-skills/skills/programming/scripts/rust/new-project.py +0 -178
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { buildSnapshot } from "../../testing/build-snapshot"
|
|
3
|
+
import { grayOnColor } from "./gray-on-color"
|
|
4
|
+
|
|
5
|
+
test("#given gray inks on navy, teal and amber #then only chromatic non-pale surfaces report", () => {
|
|
6
|
+
const snapshot = buildSnapshot([
|
|
7
|
+
...Object.entries({ navy: "#1e3a8a", teal: "#115e59", darkNavy: "#001c47", nearBlack: "#04002d", cream: "#feeed4", tint: "#fef3c7", neutral: "#f3f4f6" }).map(([id, bg]) => ({ id, text: "Some gray copy", style: { color: "#d1d5db", "background-color": bg } })),
|
|
8
|
+
{ id: "amber", text: "Gray six hundred", style: { color: "#4b5563", "background-color": "#fcd34d" } },
|
|
9
|
+
])
|
|
10
|
+
expect(grayOnColor.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#navy", "#teal", "#darkNavy", "#amber"])
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
test("#given neutral extremes and utility variants #then gray classes only report resting chromatic fills", () => {
|
|
14
|
+
const snapshot = buildSnapshot([
|
|
15
|
+
{ id: "gray", text: "Gray utility", attributes: { class: "text-gray-400 bg-blue-600" } },
|
|
16
|
+
{ id: "hover", text: "Hover not resting", attributes: { class: "text-gray-500 bg-white hover:bg-emerald-400" } },
|
|
17
|
+
{ id: "black", text: "Near black", style: { color: "#393939", "background-color": "#ffc224" } },
|
|
18
|
+
{ id: "white", text: "Near white", style: { color: "#e5e7eb", "background-color": "#115e59" } },
|
|
19
|
+
{ id: "near-black-class", text: "Dark utility", attributes: { class: "text-gray-800 bg-yellow-400" } },
|
|
20
|
+
])
|
|
21
|
+
expect(grayOnColor.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#gray"])
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
test("#given utility wrappers without direct text and bare inherited spans #then only the full color path reports", () => {
|
|
25
|
+
const snapshot = buildSnapshot([
|
|
26
|
+
{ id: "wrapper", attributes: { class: "text-gray-400 bg-blue-600" }, children: [{ text: "Wrapper copy" }] },
|
|
27
|
+
{ style: { "background-color": "#1e3a8a" }, children: [
|
|
28
|
+
{ id: "bare", tag: "span", text: "Bare gray text", style: { color: "#999999" } },
|
|
29
|
+
{ id: "paragraph", tag: "p", text: "Gray paragraph", style: { color: "#999999" } },
|
|
30
|
+
] },
|
|
31
|
+
])
|
|
32
|
+
expect(grayOnColor.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#wrapper", "#paragraph"])
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
test("#given both a gray utility and measured gray ink #then preserves both upstream forms on the same element", () => {
|
|
36
|
+
const snapshot = buildSnapshot([{ id: "dual", attributes: { class: "text-gray-400 bg-blue-600" }, text: "Measured utility",
|
|
37
|
+
style: { color: "#999999", "background-color": "#1e40af" } }])
|
|
38
|
+
expect(grayOnColor.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#dual", "#dual"])
|
|
39
|
+
})
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { luminance, parseColor, toHsl, type Rgba } from "../../core/color"
|
|
2
|
+
import { shortSnippet, styleOf } from "../../core/page"
|
|
3
|
+
import type { PageRule } from "../../rule"
|
|
4
|
+
import { oklch, spread } from "./support/gradients"
|
|
5
|
+
import { clipsText, textBackgrounds, textInk } from "./support/text-colors"
|
|
6
|
+
import { bareText } from "./support/color-path"
|
|
7
|
+
import { textPainted } from "./support/painted-text"
|
|
8
|
+
|
|
9
|
+
function colored(bg: Rgba): boolean {
|
|
10
|
+
const lum = luminance(bg)
|
|
11
|
+
const scale = lum >= 0.01 ? 1 : Math.sqrt(0.01 / Math.max(lum, 0.0001))
|
|
12
|
+
const perceptual = oklch(bg)
|
|
13
|
+
return spread(bg) > 40 * scale && (perceptual.l < 0.9 || perceptual.c >= 0.09)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const grayOnColor: PageRule = {
|
|
17
|
+
meta: {
|
|
18
|
+
id: "gray-on-color", name: "Gray text on colored background", category: "quality", severity: "warning", engine: "page",
|
|
19
|
+
description: "Mid-gray ink loses clarity on a chromatic surface.",
|
|
20
|
+
fixHint: "Use a dark shade of the surface hue or a contrasting near-white ink.",
|
|
21
|
+
},
|
|
22
|
+
check: ({ snapshot }) => snapshot.elements.flatMap((el) => {
|
|
23
|
+
if (!textPainted(snapshot, el) || bareText(el) || clipsText(el)) return []
|
|
24
|
+
const color = parseColor(styleOf(el, "color"))
|
|
25
|
+
if (!color) return []
|
|
26
|
+
const hsl = toHsl(color)
|
|
27
|
+
const gray = hsl.s < 0.2 && hsl.l > 0.3 && hsl.l < 0.85
|
|
28
|
+
const tokens = (el.attributes["class"] ?? "").split(/\s+/)
|
|
29
|
+
const grayClass = tokens.some((t) => /^text-(gray|slate|zinc|neutral|stone)-[1-6]00(?:\/\d+)?$/.test(t))
|
|
30
|
+
const bgClass = tokens.some((t) => /^bg-(red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-([2-9]00|950)(?:\/\d+)?$/.test(t))
|
|
31
|
+
const classHit = grayClass && bgClass && hsl.l < 0.85 && spread(color) <= 50
|
|
32
|
+
const backgrounds = textBackgrounds(snapshot, el)
|
|
33
|
+
const computedHit = textInk(snapshot, el) !== null && gray && backgrounds.length > 0 && backgrounds.every(colored)
|
|
34
|
+
if (!classHit && !computedHit) return []
|
|
35
|
+
const hit = { element: el, message: "Gray ink on a colored surface", snippet: shortSnippet(el) }
|
|
36
|
+
return classHit && computedHit ? [hit, hit] : [hit]
|
|
37
|
+
}),
|
|
38
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PageRule } from "../../rule"
|
|
2
|
+
import { aiColorPalette } from "./ai-color-palette"
|
|
3
|
+
import { creamPalette } from "./cream-palette"
|
|
4
|
+
import { darkGlow } from "./dark-glow"
|
|
5
|
+
import { designSystemColor } from "./design-system-color"
|
|
6
|
+
import { gradientText } from "./gradient-text"
|
|
7
|
+
import { grayOnColor } from "./gray-on-color"
|
|
8
|
+
import { lowContrast } from "./low-contrast"
|
|
9
|
+
import { radialHalo } from "./radial-halo"
|
|
10
|
+
import { radialSpotlightGlow } from "./radial-spotlight-glow"
|
|
11
|
+
|
|
12
|
+
export const COLOR_RULES: readonly PageRule[] = [
|
|
13
|
+
lowContrast, grayOnColor, aiColorPalette, creamPalette, gradientText,
|
|
14
|
+
darkGlow, radialHalo, radialSpotlightGlow, designSystemColor,
|
|
15
|
+
]
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { lintSnapshot } from "../../lint"
|
|
3
|
+
import { buildSnapshot } from "../../testing/build-snapshot"
|
|
4
|
+
import { lowContrast } from "./low-contrast"
|
|
5
|
+
|
|
6
|
+
const ink = (color: string): Readonly<Record<string, string>> => ({ color, "-webkit-text-fill-color": color })
|
|
7
|
+
|
|
8
|
+
test("#given small, large and bold text around AA thresholds #then only failures report", () => {
|
|
9
|
+
const snapshot = buildSnapshot([
|
|
10
|
+
{ id: "small-fail", text: "Faint body", style: ink("#777777") },
|
|
11
|
+
{ id: "small-pass", text: "Readable body", style: ink("#767676") },
|
|
12
|
+
{ id: "large-fail", text: "Faint heading", style: { ...ink("#9b9b9b"), "font-size": "24px" } },
|
|
13
|
+
{ id: "large-pass", text: "Readable heading", style: { ...ink("#949494"), "font-size": "24px" } },
|
|
14
|
+
{ id: "bold-fail", text: "Faint bold", style: { ...ink("#9c9c9c"), "font-size": "19px", "font-weight": "700" } },
|
|
15
|
+
{ id: "bold-pass", text: "Readable bold", style: { ...ink("#949494"), "font-size": "19px", "font-weight": "700" } },
|
|
16
|
+
])
|
|
17
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#small-fail", "#large-fail", "#bold-fail"])
|
|
18
|
+
expect(lintSnapshot(snapshot, { rules: [lowContrast] }).every((h) => h.severity === "error")).toBe(true)
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
test("#given repeated pairs and an ignored first copy #then one readable claimant counts unwaived copies", () => {
|
|
22
|
+
const snapshot = buildSnapshot([
|
|
23
|
+
{ id: "waived", text: "Waived copy", style: ink("#bbbbbb"), attributes: { "data-detect-ignore": "low-contrast" } },
|
|
24
|
+
{ id: "glyph", text: "𝕏", style: ink("#bbbbbb") },
|
|
25
|
+
{ id: "word", text: "Share this idea", style: ink("#bbbbbb") },
|
|
26
|
+
{ id: "repeat", text: "Share another idea", style: ink("#bbbbbb") },
|
|
27
|
+
{ id: "pass", text: "Readable ink", style: ink("#333333") },
|
|
28
|
+
])
|
|
29
|
+
const hits = lowContrast.check({ snapshot, config: {} })
|
|
30
|
+
expect(hits.map((h) => h.element?.selector)).toEqual(["#word"])
|
|
31
|
+
expect(hits[0]?.message.endsWith("(and 2 more)")).toBe(true)
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
test("#given named heavy cuts and ordinary family names #then only bold cuts get the large text bar", () => {
|
|
35
|
+
const snapshot = buildSnapshot(["ProximaNovaBold", "EMprint Semibold", "Gotham-Black", "Blackletter Text", 'Georgia, "Arial Black"'].map((family, i) => ({
|
|
36
|
+
id: `face-${i}`, text: "Family weight", style: { ...ink("#ffffff"), "background-color": "#ff5757", "font-size": "19px", "font-family": family },
|
|
37
|
+
})))
|
|
38
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#face-3"])
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
test("#given scrims, pseudo faces and parked underlines #then contrast uses the painted surface", () => {
|
|
42
|
+
const snapshot = buildSnapshot([
|
|
43
|
+
{ style: { position: "relative" }, rect: { width: 500, height: 200 }, children: [
|
|
44
|
+
{ style: { position: "absolute", "background-color": "rgba(0,0,0,0.8)" }, rect: { width: 500, height: 200 } },
|
|
45
|
+
{ style: { position: "absolute", "background-color": "rgba(235,230,224,0.3)" }, rect: { width: 500, height: 200 }, children: [
|
|
46
|
+
{ id: "scrim-pass", text: "White title on scrim", style: ink("#f7f5f3") },
|
|
47
|
+
] },
|
|
48
|
+
] },
|
|
49
|
+
{ id: "pseudo-fail", text: "Dark label", rect: { y: 300 }, style: ink("#333333"), before: { "background-color": "#1a1a1a" } },
|
|
50
|
+
{ id: "parked-pass", text: "Readable dark label", rect: { y: 400 }, style: ink("#333333"), before: { "background-color": "#1a1a1a", transform: "matrix(1, 0, 0, 1, -300, 0)" } },
|
|
51
|
+
{ id: "drawn-fail", text: "Ink on itself", rect: { y: 500 }, style: { ...ink("#5d666d"), "background-image": "linear-gradient(#5d666c, #5d666c)", "background-size": "100% 100%" } },
|
|
52
|
+
{ id: "underline-pass", text: "Ink with parked underline", rect: { y: 600 }, style: { ...ink("#5d666c"), "background-image": "linear-gradient(#5d666c, #5d666c)", "background-size": "0px 1px" } },
|
|
53
|
+
{ style: { position: "relative", "background-color": "#ffffff" }, rect: { y: 700, width: 420, height: 100 },
|
|
54
|
+
before: { "background-color": "#312e81", "z-index": "-1" }, children: [
|
|
55
|
+
{ id: "ring-fail", text: "Faint copy inside a border ring", rect: { y: 724 }, style: ink("#b8bcc4") },
|
|
56
|
+
] },
|
|
57
|
+
])
|
|
58
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#pseudo-fail", "#drawn-fail", "#ring-fail"])
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
test("#given stacked opaque panels and a mask fade #then hidden text cannot claim a pair", () => {
|
|
62
|
+
const snapshot = buildSnapshot([
|
|
63
|
+
{ rect: { width: 600, height: 200 }, children: [
|
|
64
|
+
{ style: { "z-index": "2", "background-color": "#ffffff" }, rect: { width: 600, height: 200 }, children: [{ id: "active", text: "Faint active copy", style: ink("#a0a0a0") }] },
|
|
65
|
+
{ style: { "z-index": "0", "background-color": "#ffffff" }, rect: { width: 600, height: 200 }, children: [{ id: "covered", text: "Faint covered copy", style: ink("#a1a1a1") }] },
|
|
66
|
+
] },
|
|
67
|
+
{ rect: { y: 300, width: 400, height: 160 }, style: { "mask-image": "linear-gradient(#000000 100px, transparent 140px)" }, children: [
|
|
68
|
+
{ id: "clear", rect: { y: 320 }, text: "Clear zone", style: ink("#a2a2a2") },
|
|
69
|
+
{ id: "masked", rect: { y: 440 }, text: "Masked zone", style: ink("#a3a3a3") },
|
|
70
|
+
] },
|
|
71
|
+
])
|
|
72
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#active", "#clear"])
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
test("#given a delayed entrance and a fading loop #then final entrance text reports but loop frames do not", () => {
|
|
76
|
+
const snapshot = buildSnapshot([
|
|
77
|
+
{ style: { opacity: "0", "animation-name": "enter", "animation-iteration-count": "1" }, children: [
|
|
78
|
+
{ id: "enter", tag: "a", text: "Get started", style: ink("#bbbbbb") },
|
|
79
|
+
] },
|
|
80
|
+
{ style: { opacity: "0.2", "animation-name": "cycle", "animation-iteration-count": "infinite" }, children: [
|
|
81
|
+
{ id: "cycle", text: "A loop frame", style: ink("#bbbbbb") },
|
|
82
|
+
] },
|
|
83
|
+
{ id: "readable", text: "Readable copy", style: ink("#111111") },
|
|
84
|
+
{ style: { position: "fixed" }, rect: { x: 1400 }, children: [{ id: "drawer", text: "Parked drawer copy", rect: { x: 1400 }, style: ink("#cccccc") }] },
|
|
85
|
+
{ id: "font-zero", text: "Invisible text", style: { ...ink("#cccccc"), "font-size": "0px" } },
|
|
86
|
+
{ tag: "video", children: [{ id: "fallback", text: "Unpainted fallback", style: ink("#cccccc") }] },
|
|
87
|
+
], { cssText: ["@keyframes enter { from { opacity: 0; } to { opacity: 1; } } @keyframes cycle { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }"] })
|
|
88
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#enter"])
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
test("#given alpha ink, inherited surfaces, gradients and disabled controls #then painted failures report", () => {
|
|
92
|
+
const snapshot = buildSnapshot([
|
|
93
|
+
{ style: { "background-color": "#000000" }, children: [
|
|
94
|
+
{ id: "alpha-fail", text: "Faint alpha", style: ink("rgba(255,255,255,0.1)") },
|
|
95
|
+
{ id: "alpha-pass", text: "Readable alpha", style: ink("rgba(255,255,255,0.9)") },
|
|
96
|
+
] },
|
|
97
|
+
{ tag: "button", attributes: { disabled: "" }, children: [{ id: "disabled", text: "Disabled", style: ink("#cccccc") }] },
|
|
98
|
+
{ id: "gradient-fail", text: "Faint gradient", style: { "background-image": "linear-gradient(#dddddd, #eeeeee)", ...ink("#bbbbbb") } },
|
|
99
|
+
{ id: "transparent", text: "Hidden fill", style: ink("transparent") },
|
|
100
|
+
{ id: "photo", text: "Unknown background", style: { ...ink("#cccccc"), "background-image": "url(photo.jpg)" } },
|
|
101
|
+
])
|
|
102
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#alpha-fail", "#gradient-fail"])
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
test("#given pale clipped text and waived plain text #then only unwaived failures report", () => {
|
|
106
|
+
const snapshot = buildSnapshot([
|
|
107
|
+
{ id: "clip-fail", text: "Pale glyphs", style: { "background-clip": "text", "background-image": "linear-gradient(#dddddd, #eeeeee)", ...ink("transparent") } },
|
|
108
|
+
{ id: "clip-pass", text: "Dark glyphs", style: { "background-clip": "text", "background-image": "linear-gradient(#111111, #333333)", ...ink("transparent") } },
|
|
109
|
+
{ id: "waived", text: "Waived faint text", style: ink("#cccccc"), attributes: { "data-detect-ignore": "low-contrast" } },
|
|
110
|
+
])
|
|
111
|
+
expect(lintSnapshot(snapshot, { rules: [lowContrast] }).map((h) => h.location.kind === "element" ? h.location.selector : "")).toEqual(["#clip-fail"])
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
test("#given gradient bands and an underline tile #then contrast reads only the paint beneath the text", () => {
|
|
115
|
+
const band = "linear-gradient(#fde68a 0%, #fde68a 30%, #1e3a8a 50%, #1e3a8a 100%)"
|
|
116
|
+
const snapshot = buildSnapshot([
|
|
117
|
+
{ id: "light-band", text: "Label", rect: { width: 240, height: 64 }, lineRects: [{ x: 16, y: 2, width: 120, height: 20 }],
|
|
118
|
+
style: { ...ink("#fffdf7"), "background-image": band } },
|
|
119
|
+
{ id: "dark-band", text: "Label", rect: { y: 100, width: 240, height: 64 }, lineRects: [{ x: 16, y: 140, width: 120, height: 20 }],
|
|
120
|
+
style: { ...ink("#fffdf8"), "background-image": band } },
|
|
121
|
+
{ id: "underline", text: "A readable link", rect: { y: 200, width: 160, height: 31 }, lineRects: [{ x: 0, y: 200, width: 120, height: 20 }],
|
|
122
|
+
style: { ...ink("#1e293b"), "background-image": "linear-gradient(#1e293b, #1e293b)", "background-repeat": "no-repeat", "background-size": "100% 2px", "background-position": "0% 100%" } },
|
|
123
|
+
])
|
|
124
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#light-band"])
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
test("#given safe text repeated across vendors and wordless prices #then only eligible word claimants replace glyphs", () => {
|
|
128
|
+
const snapshot = buildSnapshot([
|
|
129
|
+
{ id: "glyph", tag: "a", text: "𝕏", style: ink("#bbbbbb") },
|
|
130
|
+
{ attributes: { id: "taboola-feed" }, children: [{ id: "vendor-word", tag: "a", text: "Sponsored words", style: ink("#bbbbbb") }] },
|
|
131
|
+
{ id: "price", tag: "span", text: "R$ 89,90", style: ink("#aaaaaa") },
|
|
132
|
+
{ id: "name", text: "Linen shirt", style: ink("#aaaaaa") },
|
|
133
|
+
{ id: "tiny", tag: "span", text: "A tiny mark", style: { ...ink("#cccccc"), "font-size": "8px" } },
|
|
134
|
+
{ attributes: { class: "slick-dots" }, children: [
|
|
135
|
+
{ id: "dot", tag: "button", text: "1", style: { ...ink("#333333"), "background-color": "#888888" } },
|
|
136
|
+
] },
|
|
137
|
+
{ id: "site-button", tag: "button", text: "Get started", style: { ...ink("#333333"), "background-color": "#888888" } },
|
|
138
|
+
])
|
|
139
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#glyph", "#name", "#dot", "#site-button"])
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
test("#given decorative and reading text on identical pairs #then both roles report with project error severity", () => {
|
|
143
|
+
const snapshot = buildSnapshot([
|
|
144
|
+
{ id: "stamp", tag: "p", text: "v2.4.1 · 2024-03-01", style: ink("#bbbbbb") },
|
|
145
|
+
{ id: "heading", tag: "h3", text: "v2.4.1", style: ink("#bbbbbb") },
|
|
146
|
+
{ id: "initial", tag: "span", text: "A", rect: { y: 100, width: 32, height: 32 }, style: { ...ink("#ffffff"), "background-color": "#93c5fd" } },
|
|
147
|
+
{ id: "letter-link", tag: "a", text: "A", rect: { y: 150, width: 32, height: 32 }, style: { ...ink("#ffffff"), "background-color": "#93c5fd" } },
|
|
148
|
+
])
|
|
149
|
+
const findings = lintSnapshot(snapshot, { rules: [lowContrast] })
|
|
150
|
+
expect(findings.map((h) => h.location.kind === "element" ? h.location.selector : "")).toEqual(["#stamp", "#heading", "#initial", "#letter-link"])
|
|
151
|
+
expect(findings.every((h) => h.severity === "error")).toBe(true)
|
|
152
|
+
})
|
|
153
|
+
|
|
154
|
+
test("#given clipped copies and scroll-sized frames #then whole claimants and reachable lower copy report", () => {
|
|
155
|
+
const snapshot = buildSnapshot([
|
|
156
|
+
{ rect: { width: 200, height: 50 }, style: { "overflow-x": "hidden" }, children: [
|
|
157
|
+
{ id: "cut", rect: { x: -80, width: 160, height: 24 }, text: "Repeated label", style: ink("#aaaaaa") },
|
|
158
|
+
{ id: "whole", rect: { width: 160, height: 24 }, text: "Repeated label", style: ink("#aaaaaa") },
|
|
159
|
+
{ id: "sliver", rect: { x: -150, width: 160, height: 24 }, text: "A sliver of another label", style: ink("#bbbbbb") },
|
|
160
|
+
] },
|
|
161
|
+
{ rect: { y: 100, width: 500, height: 800 }, style: { "overflow-y": "hidden" }, scroll: { scrollHeight: 1500, clientHeight: 800 }, children: [
|
|
162
|
+
{ rect: { y: 100, height: 1500 }, children: [
|
|
163
|
+
{ id: "below-fold", rect: { y: 1400 }, text: "Reachable faint copy", style: ink("#cccccc") },
|
|
164
|
+
] },
|
|
165
|
+
] },
|
|
166
|
+
{ tag: "details", rect: { y: 1700 }, children: [{ id: "closed", rect: { y: 1700 }, text: "Closed panel", style: ink("#dddddd") }] },
|
|
167
|
+
{ attributes: { hidden: "until-found" }, rect: { y: 1800 }, children: [{ id: "findable", rect: { y: 1800 }, text: "Findable panel", style: ink("#eeeeee") }] },
|
|
168
|
+
{ rect: { y: 1900, width: 1280, height: 60 }, style: { "overflow-x": "hidden" }, children: [
|
|
169
|
+
{ id: "shell-layout", rect: { x: 1220, y: 1900, width: 280 }, text: "A clipped desktop column", style: ink("#ababab") },
|
|
170
|
+
] },
|
|
171
|
+
])
|
|
172
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#whole", "#below-fold", "#shell-layout"])
|
|
173
|
+
const base = buildSnapshot([
|
|
174
|
+
{ rect: { width: 1280, height: 800 }, style: { position: "fixed", "overflow-y": "hidden" }, scroll: { clientHeight: 800, scrollHeight: 1800 }, children: [
|
|
175
|
+
{ id: "frame-foot", rect: { y: 1500 }, text: "Faint frame footer", style: ink("#cccccc") },
|
|
176
|
+
] },
|
|
177
|
+
])
|
|
178
|
+
const framed = { ...base, document: { ...base.document, scrollHeight: 800 },
|
|
179
|
+
elements: base.elements.map((el) => el.tag === "body" ? { ...el, style: { ...el.style, "overflow-y": "hidden" } } : el) }
|
|
180
|
+
expect(lowContrast.check({ snapshot: framed, config: {} }).map((h) => h.element?.selector)).toEqual(["#frame-foot"])
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
test("#given a declared mockup and labelled screenshot #then hidden drawings claim no pair and screenshot pairs stay separate", () => {
|
|
184
|
+
const snapshot = buildSnapshot([
|
|
185
|
+
{ attributes: { inert: "", class: "demo-frame" }, rect: { width: 420, height: 190 }, children: [
|
|
186
|
+
{ id: "hidden-one", text: "Draft", style: ink("#cccccc") },
|
|
187
|
+
{ text: "Saved", style: ink("#cccccc") },
|
|
188
|
+
{ text: "Ready", style: ink("#cccccc") },
|
|
189
|
+
] },
|
|
190
|
+
{ id: "outside", text: "Your subscription renews on the first day of every month", style: ink("#cccccc") },
|
|
191
|
+
{ attributes: { "aria-label": "A screenshot of the billing screen", class: "shot-frame" }, rect: { y: 300, width: 420, height: 190 }, children: [
|
|
192
|
+
{ id: "shot", rect: { y: 320 }, text: "Billing", style: ink("#bbbbbb") },
|
|
193
|
+
] },
|
|
194
|
+
{ id: "after-shot", rect: { y: 600 }, text: "Your plan renews next month", style: ink("#bbbbbb") },
|
|
195
|
+
])
|
|
196
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#outside", "#shot", "#after-shot"])
|
|
197
|
+
})
|
|
198
|
+
|
|
199
|
+
test("#given captured opacity motion and a paused vanishing loop #then only steady or held-end ink is scored", () => {
|
|
200
|
+
const snapshot = buildSnapshot([
|
|
201
|
+
{ id: "transition", text: "A reveal in progress", motion: ["opacity"], style: { ...ink("#bbbbbb"), opacity: "0.3" } },
|
|
202
|
+
{ id: "finite", text: "The held entrance label", motion: ["opacity"], style: { ...ink("#bbbbbb"), opacity: "0.3",
|
|
203
|
+
"animation-name": "enter", "animation-duration": "1s", "animation-iteration-count": "1", "animation-fill-mode": "forwards", "animation-play-state": "running" } },
|
|
204
|
+
{ id: "paused", text: "A parked loop label", style: { ...ink("#bbbbbb"), opacity: "0.4",
|
|
205
|
+
"animation-name": "cycle", "animation-iteration-count": "infinite", "animation-play-state": "paused" } },
|
|
206
|
+
{ id: "steady", text: "Deliberately faded copy", style: { ...ink("#cccccc"), opacity: "0.4" } },
|
|
207
|
+
], { cssText: ["@keyframes enter { from { opacity: 0; } to { opacity: 1; } } @keyframes cycle { 0% { opacity: 0; } 100% { opacity: 1; } }"] })
|
|
208
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#finite", "#steady"])
|
|
209
|
+
})
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { blend, contrastRatio } from "../../core/color"
|
|
2
|
+
import { ancestors, fontSizePx, shortSnippet, styleOf } from "../../core/page"
|
|
3
|
+
import type { PageRule } from "../../rule"
|
|
4
|
+
import { distinctPairs, type ContrastHit } from "./support/contrast-pairs"
|
|
5
|
+
import { gradientStops } from "./support/gradients"
|
|
6
|
+
import { textPainted } from "./support/painted-text"
|
|
7
|
+
import { bareText } from "./support/color-path"
|
|
8
|
+
import { contrastRole } from "./support/contrast-role"
|
|
9
|
+
import { mockupRoots } from "./support/mockup-roots"
|
|
10
|
+
import { placeholderContrast } from "./support/placeholder-contrast"
|
|
11
|
+
import { clipsText, solidGround, textBackgrounds, textInk } from "./support/text-colors"
|
|
12
|
+
|
|
13
|
+
export const lowContrast: PageRule = {
|
|
14
|
+
meta: {
|
|
15
|
+
id: "low-contrast", name: "Low contrast text", category: "quality", severity: "error", engine: "page",
|
|
16
|
+
description: "Text falls below the WCAG AA contrast ratio for its size.",
|
|
17
|
+
fixHint: "Increase text and surface contrast to 4.5:1, or 3:1 for large text.",
|
|
18
|
+
},
|
|
19
|
+
check: ({ snapshot }) => {
|
|
20
|
+
const mockups = mockupRoots(snapshot)
|
|
21
|
+
const text = distinctPairs(snapshot, snapshot.elements.flatMap((el): readonly ContrastHit[] => {
|
|
22
|
+
if ([el, ...ancestors(snapshot, el)].some((node) => mockups.get(node.index) === "declared")) return []
|
|
23
|
+
if (!textPainted(snapshot, el)) return []
|
|
24
|
+
if ([el, ...ancestors(snapshot, el)].some((node) => node.attributes["disabled"] !== undefined || node.attributes["aria-disabled"] === "true")) return []
|
|
25
|
+
const size = fontSizePx(el)
|
|
26
|
+
if (bareText(el) && size < 9) return []
|
|
27
|
+
const familyWords = (styleOf(el, "font-family").split(",")[0] ?? "").replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase().split(/[^a-z0-9]+/)
|
|
28
|
+
const namedBold = familyWords.some((w) => ["bold", "semibold", "demibold", "extrabold", "ultrabold", "heavy", "black"].includes(w))
|
|
29
|
+
const weight = namedBold ? Math.max(700, Number.parseFloat(styleOf(el, "font-weight")) || 400) : Number.parseFloat(styleOf(el, "font-weight"))
|
|
30
|
+
const threshold = size >= 24 || (size >= 18.66 && weight >= 700) ? 3 : 4.5
|
|
31
|
+
if (clipsText(el) && el.ownText.trim() !== "") {
|
|
32
|
+
const stops = gradientStops(styleOf(el, "background-image"))
|
|
33
|
+
if (stops.length === 0 || stops.some((s) => s.color.a < 0.999)) return []
|
|
34
|
+
const ground = solidGround(snapshot, el)
|
|
35
|
+
const best = Math.max(...stops.map((s) => contrastRatio(s.color, ground)))
|
|
36
|
+
return best < threshold ? [{ element: el, pair: JSON.stringify([stops, ground, threshold]), message: `Gradient text contrast ${best.toFixed(2)}:1; needs ${threshold}:1`, snippet: shortSnippet(el) }] : []
|
|
37
|
+
}
|
|
38
|
+
const ink = textInk(snapshot, el)
|
|
39
|
+
if (!ink) return []
|
|
40
|
+
const backgrounds = textBackgrounds(snapshot, el)
|
|
41
|
+
if (backgrounds.length === 0) return []
|
|
42
|
+
const ratios = backgrounds.map((bg) => contrastRatio(blend(ink, bg), bg))
|
|
43
|
+
const ratio = Math.min(...ratios)
|
|
44
|
+
if (ratio === 1 && ![el, ...ancestors(snapshot, el)].some((node) =>
|
|
45
|
+
["a", "button", "input", "select", "textarea"].includes(node.tag) || ["button", "link"].includes(node.attributes["role"] ?? ""))) return []
|
|
46
|
+
const control = [el, ...ancestors(snapshot, el)].find((node) => node.tag === "button" || node.attributes["role"] === "button")
|
|
47
|
+
if (ratio === 1 && control && control.children.length > 1 && control.text.trim() === el.text.trim()) return []
|
|
48
|
+
const shape = size >= 96 && ink.a < 0.25 ? el.text : [el, ...ancestors(snapshot, el)].some((node) => mockups.get(node.index) === "labelled") ? "decorative" : contrastRole(snapshot, el)
|
|
49
|
+
const gradient = bareText(el) ? ancestors(snapshot, el).find((node) => !clipsText(node) && styleOf(node, "background-image").includes("gradient")) : undefined
|
|
50
|
+
const ground = backgrounds[ratios.indexOf(ratio)]
|
|
51
|
+
const pair = gradient ? JSON.stringify([ink, gradient.index, shape]) : JSON.stringify([ink, ground, threshold, shape])
|
|
52
|
+
return ratio < threshold ? [{ element: el, pair, message: `Text contrast ${ratio.toFixed(2)}:1; needs ${threshold}:1`, snippet: shortSnippet(el) }] : []
|
|
53
|
+
}))
|
|
54
|
+
return [...text, ...snapshot.elements.flatMap((el) =>
|
|
55
|
+
[el, ...ancestors(snapshot, el)].some((node) => mockups.get(node.index) === "declared") ? [] : placeholderContrast(snapshot, el))]
|
|
56
|
+
},
|
|
57
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { lintSnapshot } from "../../lint"
|
|
3
|
+
import { buildSnapshot } from "../../testing/build-snapshot"
|
|
4
|
+
import { lowContrast } from "./low-contrast"
|
|
5
|
+
import { textBackgrounds } from "./support/text-colors"
|
|
6
|
+
|
|
7
|
+
test("#given shown placeholders beside readable host ink #then each field reports its own placeholder without pair dedupe", () => {
|
|
8
|
+
const snapshot = buildSnapshot([
|
|
9
|
+
{ id: "first", tag: "input", attributes: { placeholder: "Name" }, style: { color: "#111111", "background-color": "#ffffff" }, placeholder: { color: "#bbbbbb" } },
|
|
10
|
+
{ id: "second", tag: "textarea", attributes: { placeholder: "Notes" }, style: { color: "#111111", "background-color": "#ffffff" }, placeholder: { color: "#bbbbbb" } },
|
|
11
|
+
{ id: "alpha", tag: "input", attributes: { placeholder: "Email" }, style: { color: "#111111", "background-color": "#f5f5f5" }, placeholder: { color: "rgba(255,255,255,0.4)" } },
|
|
12
|
+
{ tag: "label", text: "Team", children: [
|
|
13
|
+
{ id: "labelled", tag: "input", attributes: { placeholder: "Team name" }, style: { "background-color": "#ffffff" }, placeholder: { color: "#bbbbbb" } },
|
|
14
|
+
] },
|
|
15
|
+
])
|
|
16
|
+
const hits = lintSnapshot(snapshot, { rules: [lowContrast] })
|
|
17
|
+
expect(hits.map((hit) => hit.location.kind === "element" ? hit.location.selector : "")).toEqual(["#first", "#second", "#alpha", "#labelled"])
|
|
18
|
+
expect(hits.every((hit) => hit.severity === "error")).toBe(true)
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
test("#given absent hidden transparent disabled and readable placeholders #then none reports", () => {
|
|
22
|
+
const snapshot = buildSnapshot([
|
|
23
|
+
{ tag: "input", attributes: { placeholder: "Filled", value: "Existing value" } },
|
|
24
|
+
{ tag: "input", attributes: { placeholder: "Transparent" }, placeholder: { color: "rgba(255,255,255,0.02)" } },
|
|
25
|
+
{ tag: "input", attributes: { placeholder: "" }, placeholder: { color: "#bbbbbb" } },
|
|
26
|
+
{ tag: "input", attributes: { placeholder: "Disabled", disabled: "" }, placeholder: { color: "#bbbbbb" } },
|
|
27
|
+
{ tag: "input", attributes: { placeholder: "Readable" }, placeholder: { color: "#111111" } },
|
|
28
|
+
{ tag: "input", attributes: { type: "range", placeholder: "Not text" }, placeholder: { color: "#bbbbbb" } },
|
|
29
|
+
{ style: { display: "none" }, children: [{ tag: "textarea", attributes: { placeholder: "Hidden" }, placeholder: { color: "#bbbbbb" } }] },
|
|
30
|
+
{ tag: "input", attributes: { placeholder: "Waived", "data-detect-ignore": "low-contrast" }, placeholder: { color: "#bbbbbb" } },
|
|
31
|
+
])
|
|
32
|
+
expect(lintSnapshot(snapshot, { rules: [lowContrast] })).toEqual([])
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
test("#given large bold placeholders and translucent field layers #then thresholds use the host size and composited surface", () => {
|
|
36
|
+
const snapshot = buildSnapshot([
|
|
37
|
+
{ id: "small", tag: "input", attributes: { placeholder: "Small" }, style: { "font-size": "16px" }, placeholder: { color: "#888888" } },
|
|
38
|
+
{ id: "large", tag: "input", attributes: { placeholder: "Large" }, style: { "font-size": "24px" }, placeholder: { color: "#888888" } },
|
|
39
|
+
{ id: "bold", tag: "input", attributes: { placeholder: "Bold" }, style: { "font-size": "18.66px", "font-family": "Brand-SemiBold" }, placeholder: { color: "#888888" } },
|
|
40
|
+
{ style: { "background-color": "#0f0f11" }, children: [
|
|
41
|
+
{ style: { "background-color": "rgba(255,255,255,0.15)" }, children: [
|
|
42
|
+
{ id: "frosted", tag: "input", attributes: { placeholder: "Frosted" }, style: { "background-color": "rgba(255,255,255,0.2)" }, placeholder: { color: "#bbbbbb" } },
|
|
43
|
+
] },
|
|
44
|
+
] },
|
|
45
|
+
])
|
|
46
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((hit) => hit.element?.selector)).toEqual(["#small", "#frosted"])
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
test("#given supported modern colors and an unreadable nearer surface #then valid surfaces score and unknown paint stops the walk", () => {
|
|
50
|
+
const snapshot = buildSnapshot([
|
|
51
|
+
{ id: "p3", text: "Dim copy", rect: { y: 0 }, style: { color: "color(display-p3 0.35 0.35 0.36)", "background-color": "color(display-p3 0.07 0.07 0.08)" } },
|
|
52
|
+
{ id: "lch", text: "Warm dim copy", rect: { y: 200 }, style: { color: "lch(35 3 80)", "background-color": "lch(8 3 80)" } },
|
|
53
|
+
{ rect: { y: 400, width: 600, height: 200 }, style: { "background-color": "#ffffff" }, children: [
|
|
54
|
+
{ rect: { y: 420, width: 500, height: 100 }, style: { "background-color": "color(rec2020 0.05 0.05 0.05)" }, children: [
|
|
55
|
+
{ id: "unknown", rect: { y: 440 }, text: "Do not borrow the farther white", style: { color: "#eeeeee" } },
|
|
56
|
+
] },
|
|
57
|
+
] },
|
|
58
|
+
])
|
|
59
|
+
expect(lowContrast.check({ snapshot, config: {} }).map((hit) => hit.element?.selector)).toEqual(["#p3", "#lch"])
|
|
60
|
+
const unknown = snapshot.elements.find((el) => el.attributes["id"] === "unknown")
|
|
61
|
+
expect(unknown === undefined ? null : textBackgrounds(snapshot, unknown)).toEqual([])
|
|
62
|
+
})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { buildSnapshot } from "../../testing/build-snapshot"
|
|
3
|
+
import { radialHalo } from "./radial-halo"
|
|
4
|
+
|
|
5
|
+
test("#given dark radial washes and alternate gradients #then only saturated wide halos report", () => {
|
|
6
|
+
const snapshot = buildSnapshot([{ style: { "background-color": "#080808" }, children: [
|
|
7
|
+
...Object.entries({
|
|
8
|
+
halo: "radial-gradient(circle, rgba(80,111,255,0.85), transparent 70%)",
|
|
9
|
+
second: "radial-gradient(circle, rgba(255,90,120,0.85), transparent 70%)",
|
|
10
|
+
soft: "radial-gradient(circle, rgba(80,111,255,0.3), transparent)",
|
|
11
|
+
neutral: "radial-gradient(circle, rgba(255,255,255,0.85), transparent)",
|
|
12
|
+
opaque: "radial-gradient(circle, #1e3a8a, #0f172a)",
|
|
13
|
+
linear: "linear-gradient(#506fff, transparent)",
|
|
14
|
+
small: "radial-gradient(circle, #506fff 0px, transparent 20px)",
|
|
15
|
+
repeat: "repeating-radial-gradient(circle, #506fff, transparent)",
|
|
16
|
+
vignette: "radial-gradient(circle, #020408, transparent)",
|
|
17
|
+
}).map(([id, image]) => ({ id, style: { "background-image": image } })),
|
|
18
|
+
] }])
|
|
19
|
+
expect(radialHalo.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#halo"])
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
test("#given pseudo halos on dark and light grounds #then only dark visible hosts report", () => {
|
|
23
|
+
const before = { "background-image": "radial-gradient(circle, #506fff, transparent)" }
|
|
24
|
+
const snapshot = buildSnapshot([
|
|
25
|
+
{ id: "dark", style: { "background-color": "#080808" }, before },
|
|
26
|
+
{ id: "light", style: { "background-color": "#ffffff" }, before },
|
|
27
|
+
{ id: "hidden", style: { "display": "none", "background-color": "#080808" }, before },
|
|
28
|
+
])
|
|
29
|
+
expect(radialHalo.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#dark"])
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
test("#given a light page with a local translucent panel #then the panel does not turn on the dark-page source form", () => {
|
|
33
|
+
const base = buildSnapshot([
|
|
34
|
+
{ style: { "background-color": "rgba(18,20,26,0.86)" }, children: [
|
|
35
|
+
{ style: { "background-image": "radial-gradient(circle, #a855f7, transparent 70%)" } },
|
|
36
|
+
] },
|
|
37
|
+
], { cssText: ["body { background: #fff; } .glass { background: rgba(18,20,26,0.86); }"] })
|
|
38
|
+
const snapshot = { ...base, elements: base.elements.map((el) => el.tag === "body" ? { ...el, style: { ...el.style, "background-color": "#ffffff" } } : el) }
|
|
39
|
+
expect(radialHalo.check({ snapshot, config: {} })).toEqual([])
|
|
40
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { luminance, parseColor } from "../../core/color"
|
|
2
|
+
import { isRendered, shortSnippet, styleOf } from "../../core/page"
|
|
3
|
+
import type { PageRule } from "../../rule"
|
|
4
|
+
import { backdrop, gradientStops, splitLayers, spread } from "./support/gradients"
|
|
5
|
+
import { darkBackground } from "../source/support/css-effects"
|
|
6
|
+
|
|
7
|
+
export const radialHalo: PageRule = {
|
|
8
|
+
meta: {
|
|
9
|
+
id: "radial-halo", name: "Radial-gradient background halo", category: "slop", severity: "warning", engine: "page",
|
|
10
|
+
description: "A saturated radial fade decorates a dark surface with a halo.",
|
|
11
|
+
fixHint: "Ground the section with a solid or subtly shifted background.",
|
|
12
|
+
},
|
|
13
|
+
check: ({ snapshot }) => snapshot.elements.flatMap((el) => {
|
|
14
|
+
if (!isRendered(snapshot, el)) return []
|
|
15
|
+
const body = snapshot.elements.find((node) => node.tag === "body")
|
|
16
|
+
const root = body ? parseColor(styleOf(body, "background-color")) : null
|
|
17
|
+
if (root && root.a > 0.5 && luminance(root) >= 0.1 && !snapshot.cssText.some(darkBackground)) return []
|
|
18
|
+
const surface = backdrop(snapshot, el, "none")
|
|
19
|
+
if (!surface || luminance(surface) >= 0.1) return []
|
|
20
|
+
const styles = [el.style, el.before?.style, el.after?.style].filter((s) => s !== undefined)
|
|
21
|
+
const halo = styles.some((style) => splitLayers(style["background-image"] ?? "").some((layer) => {
|
|
22
|
+
if (!layer.startsWith("radial-gradient(")) return false
|
|
23
|
+
const stops = gradientStops(layer)
|
|
24
|
+
const first = stops[0]
|
|
25
|
+
const last = stops.at(-1)
|
|
26
|
+
if (!first || !last || stops.some((s) => /(?:^|\s)(-?\d*\.?\d+)px/.test(s.raw) && Math.abs(Number.parseFloat(s.raw.slice(s.raw.lastIndexOf(" ") + 1))) <= 24)) return false
|
|
27
|
+
return first.color.a >= 0.7 && spread(first.color) >= 24 && last.color.a <= 0.05 && luminance(first.color) > luminance(surface)
|
|
28
|
+
}))
|
|
29
|
+
return halo ? [{ element: el, message: "Chromatic radial halo on a dark surface", snippet: shortSnippet(el) }] : []
|
|
30
|
+
}).slice(0, 1),
|
|
31
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { buildSnapshot } from "../../testing/build-snapshot"
|
|
3
|
+
import { radialSpotlightGlow } from "./radial-spotlight-glow"
|
|
4
|
+
|
|
5
|
+
test("#given colored translucent spotlights and faint or opaque cousins #then only prominent low alpha glows report", () => {
|
|
6
|
+
const snapshot = buildSnapshot([{ style: { "background-color": "#0b0d13" }, children: Object.entries({
|
|
7
|
+
blue: "radial-gradient(circle, rgba(80,111,255,0.26), transparent 44%)",
|
|
8
|
+
rose: "radial-gradient(circle, rgba(255,90,120,0.12), rgba(255,90,120,0.28), transparent)",
|
|
9
|
+
hex: "radial-gradient(circle, #506fff66, transparent)",
|
|
10
|
+
faint: "radial-gradient(circle, rgba(26,189,226,0.1), transparent)",
|
|
11
|
+
opaque: "radial-gradient(circle, rgba(80,111,255,0.85), transparent)",
|
|
12
|
+
neutral: "radial-gradient(circle, rgba(255,255,255,0.35), transparent)",
|
|
13
|
+
linear: "linear-gradient(rgba(80,111,255,0.28), transparent)",
|
|
14
|
+
}).map(([id, image], i) => ({ id, text: "Section headline", rect: { width: 900, height: 600, y: i * 700 }, style: { "background-image": image } })) }])
|
|
15
|
+
expect(radialSpotlightGlow.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#blue", "#rose", "#hex"])
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
test("#given pale layers, small badges, bare panels and photo heroes #then only a bright photo overlay reports", () => {
|
|
19
|
+
const image = "radial-gradient(circle, rgba(139,92,246,0.42), transparent)"
|
|
20
|
+
const snapshot = buildSnapshot([
|
|
21
|
+
{ id: "photo", text: "Hero headline", rect: { width: 900, height: 600 }, style: { "background-image": `${image}, url(photo.jpg)` } },
|
|
22
|
+
{ id: "small", text: "Badge", rect: { width: 40, height: 40, y: 700 }, style: { "background-image": image } },
|
|
23
|
+
{ id: "bare", rect: { width: 900, height: 600, y: 800 }, style: { "background-image": image } },
|
|
24
|
+
{ id: "pale", text: "Pale headline", rect: { width: 900, height: 600, y: 1500 }, style: { "background-image": "radial-gradient(circle, rgba(63,227,223,0.2), transparent), linear-gradient(#ecf4f8, #ffffff)" } },
|
|
25
|
+
])
|
|
26
|
+
expect(radialSpotlightGlow.check({ snapshot, config: {} }).map((h) => h.element?.selector)).toEqual(["#photo"])
|
|
27
|
+
})
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { blend, contrastRatio } from "../../core/color"
|
|
2
|
+
import { isRendered, shortSnippet, styleOf, textElements } from "../../core/page"
|
|
3
|
+
import type { PageRule } from "../../rule"
|
|
4
|
+
import { backdrop, effectiveOpacity, gradientStops, splitLayers, spread } from "./support/gradients"
|
|
5
|
+
|
|
6
|
+
export const radialSpotlightGlow: PageRule = {
|
|
7
|
+
meta: {
|
|
8
|
+
id: "radial-spotlight-glow", name: "Decorative radial spotlight glow", category: "slop", severity: "warning", engine: "page",
|
|
9
|
+
description: "A translucent radial accent floats behind a section's copy.",
|
|
10
|
+
fixHint: "Remove the floating wash or use a deliberate material surface.",
|
|
11
|
+
},
|
|
12
|
+
check: ({ snapshot }) => snapshot.elements.flatMap((el) => {
|
|
13
|
+
if (!isRendered(snapshot, el) || el.rect.width < 240 || el.rect.height < 160) return []
|
|
14
|
+
const layers = splitLayers(styleOf(el, "background-image"))
|
|
15
|
+
const index = layers.findIndex((layer) => layer.startsWith("radial-gradient("))
|
|
16
|
+
if (index < 0) return []
|
|
17
|
+
const stops = gradientStops(layers[index] ?? "")
|
|
18
|
+
const last = stops.at(-1)
|
|
19
|
+
const colors = stops.filter((s) => s.color.a > 0.05)
|
|
20
|
+
if (!last || last.color.a > 0.05 || colors.length === 0 || colors.length > 2 || colors.some((s) => s.color.a >= 0.45)) return []
|
|
21
|
+
const surface = backdrop(snapshot, el, layers.slice(index + 1).join(", "))
|
|
22
|
+
const prominent = colors.some((s) => {
|
|
23
|
+
const a = s.color.a * effectiveOpacity(snapshot, el)
|
|
24
|
+
return spread(s.color) > 24 && a >= 0.14 && (surface === null || contrastRatio(blend({ ...s.color, a }, surface), surface) >= 1.3)
|
|
25
|
+
})
|
|
26
|
+
if (!prominent) return []
|
|
27
|
+
const behindText = textElements(snapshot).some((text) => {
|
|
28
|
+
const r = text.rect
|
|
29
|
+
return r.x < el.rect.x + el.rect.width && r.x + r.width > el.rect.x && r.y < el.rect.y + el.rect.height && r.y + r.height > el.rect.y
|
|
30
|
+
})
|
|
31
|
+
return behindText ? [{ element: el, message: "A radial spotlight glows behind text", snippet: shortSnippet(el) }] : []
|
|
32
|
+
}),
|
|
33
|
+
}
|