audit-list-window.ts — astro Source File
Architecture documentation for audit-list-window.ts, a typescript file in the astro codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR d310463d_8a0b_dea5_7789_386c15eb1d6e["audit-list-window.ts"] af6796b7_df62_9b1f_c5fc_dbdce9fa2c50["../../runtime/client/dev-toolbar/ui-library/icons.js"] d310463d_8a0b_dea5_7789_386c15eb1d6e --> af6796b7_df62_9b1f_c5fc_dbdce9fa2c50 64d5b0f9_0840_9b1a_91b0_2250f9b130b6["../index.js"] d310463d_8a0b_dea5_7789_386c15eb1d6e --> 64d5b0f9_0840_9b1a_91b0_2250f9b130b6 c19ed93d_c905_8e8a_abab_010a7ccd1966["../rules/index.js"] d310463d_8a0b_dea5_7789_386c15eb1d6e --> c19ed93d_c905_8e8a_abab_010a7ccd1966 style d310463d_8a0b_dea5_7789_386c15eb1d6e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { Icon } from '../../../ui-library/icons.js';
import type { Audit } from '../index.js';
import { getAuditCategory, rulesCategories } from '../rules/index.js';
export function createRoundedBadge(icon: Icon) {
const badge = document.createElement('astro-dev-toolbar-badge');
badge.shadowRoot.innerHTML += `
<style>
:host>div {
padding: 12px 8px;
font-size: 14px;
display: flex;
gap: 4px;
}
</style>
`;
badge.innerHTML = `<astro-dev-toolbar-icon icon="${icon}"></astro-dev-toolbar-icon>0`;
return {
badge,
updateCount: (count: number) => {
if (count === 0) {
badge.badgeStyle = 'green';
} else {
badge.badgeStyle = 'purple';
}
badge.innerHTML = `<astro-dev-toolbar-icon icon="${icon}"></astro-dev-toolbar-icon>${count}`;
},
};
}
export class DevToolbarAuditListWindow extends HTMLElement {
_audits: Audit[] = [];
shadowRoot: ShadowRoot;
badges: {
[key: string]: {
badge: HTMLElement;
updateCount: (count: number) => void;
};
} = {};
get audits() {
return this._audits;
}
set audits(value) {
this._audits = value;
this.render();
}
constructor() {
super();
this.shadowRoot = this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `<style>
:host {
box-sizing: border-box;
// ... (353 more lines)
Domain
Subdomains
Functions
Classes
Dependencies
- ../../runtime/client/dev-toolbar/ui-library/icons.js
- ../index.js
- ../rules/index.js
Source
Frequently Asked Questions
What does audit-list-window.ts do?
audit-list-window.ts is a source file in the astro codebase, written in typescript. It belongs to the DevToolbar domain, ToolbarClient subdomain.
What functions are defined in audit-list-window.ts?
audit-list-window.ts defines 1 function(s): createRoundedBadge.
What does audit-list-window.ts depend on?
audit-list-window.ts imports 3 module(s): ../../runtime/client/dev-toolbar/ui-library/icons.js, ../index.js, ../rules/index.js.
Where is audit-list-window.ts in the architecture?
audit-list-window.ts is located at packages/astro/src/runtime/client/dev-toolbar/apps/audit/ui/audit-list-window.ts (domain: DevToolbar, subdomain: ToolbarClient, directory: packages/astro/src/runtime/client/dev-toolbar/apps/audit/ui).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free