| | |
| | | raise SystemExit(f"AppGridTheme missing edit-mode contrast tokens: {missing_tokens}") |
| | | if "private var renderedAppGridTheme: AppGridTheme" not in content_source: |
| | | raise SystemExit("ContentView is missing the runtime theme override") |
| | | if "editPhase == .none ? appGridTheme : .defaultLight" not in content_source: |
| | | if not re.search( |
| | | r"private\s+var\s+renderedAppGridTheme\s*:\s*AppGridTheme\s*\{.*?" |
| | | r"editPhase\s*==\s*\.none.*?" |
| | | r"ProEntitlementPolicy\.effectiveTheme\(for:\s*appGridTheme\).*?" |
| | | r":\s*\.defaultLight", |
| | | content_source, |
| | | re.S, |
| | | ): |
| | | raise SystemExit("edit mode must temporarily render with the default light AppGrid theme") |
| | | if "let theme = renderedAppGridTheme" not in content_source: |
| | | raise SystemExit("AppGrid background does not use the runtime rendered theme") |