@tanstack/devtools-a11y 0.0.1 → 0.1.1
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/LICENSE +21 -0
- package/dist/esm/core/components/IssueCard.d.ts +10 -0
- package/dist/esm/core/components/IssueCard.js +83 -0
- package/dist/esm/core/components/IssueCard.js.map +1 -0
- package/dist/esm/core/components/IssueList.d.ts +6 -0
- package/dist/esm/core/components/IssueList.js +134 -0
- package/dist/esm/core/components/IssueList.js.map +1 -0
- package/dist/esm/core/components/Settings.d.ts +6 -0
- package/dist/esm/core/components/Settings.js +251 -0
- package/dist/esm/core/components/Settings.js.map +1 -0
- package/dist/esm/core/components/Shell.d.ts +2 -0
- package/dist/esm/core/components/Shell.js +214 -0
- package/dist/esm/core/components/Shell.js.map +1 -0
- package/dist/esm/core/components/index.d.ts +2 -0
- package/dist/esm/core/components/index.js +14 -0
- package/dist/esm/core/components/index.js.map +1 -0
- package/dist/esm/core/contexts/allyContext.d.ts +17 -0
- package/dist/esm/core/contexts/allyContext.js +66 -0
- package/dist/esm/core/contexts/allyContext.js.map +1 -0
- package/dist/esm/core/core.d.ts +19 -0
- package/dist/esm/core/core.js +8 -0
- package/dist/esm/core/core.js.map +1 -0
- package/dist/esm/core/index.d.ts +9 -0
- package/dist/esm/core/index.js +9 -0
- package/dist/esm/core/index.js.map +1 -0
- package/dist/esm/core/production.d.ts +2 -0
- package/dist/esm/core/production.js +4 -0
- package/dist/esm/core/styles/styles.d.ts +85 -0
- package/dist/esm/core/styles/styles.js +547 -0
- package/dist/esm/core/styles/styles.js.map +1 -0
- package/dist/esm/core/types/types.d.ts +141 -0
- package/dist/esm/core/utils/ally-audit.utils.d.ts +19 -0
- package/dist/esm/core/utils/ally-audit.utils.js +226 -0
- package/dist/esm/core/utils/ally-audit.utils.js.map +1 -0
- package/dist/esm/core/utils/config.utils.d.ts +17 -0
- package/dist/esm/core/utils/config.utils.js +63 -0
- package/dist/esm/core/utils/config.utils.js.map +1 -0
- package/dist/esm/core/utils/custom-audit.utils.d.ts +13 -0
- package/dist/esm/core/utils/custom-audit.utils.js +426 -0
- package/dist/esm/core/utils/custom-audit.utils.js.map +1 -0
- package/dist/esm/core/utils/export-audit.uitls.d.ts +17 -0
- package/dist/esm/core/utils/export-audit.uitls.js +83 -0
- package/dist/esm/core/utils/export-audit.uitls.js.map +1 -0
- package/dist/esm/core/utils/ui.utils.d.ts +24 -0
- package/dist/esm/core/utils/ui.utils.js +330 -0
- package/dist/esm/core/utils/ui.utils.js.map +1 -0
- package/dist/esm/react/A11yDevtools.d.ts +5 -0
- package/dist/esm/react/A11yDevtools.js +8 -0
- package/dist/esm/react/A11yDevtools.js.map +1 -0
- package/dist/esm/react/index.d.ts +8 -0
- package/dist/esm/react/index.js +11 -0
- package/dist/esm/react/index.js.map +1 -0
- package/dist/esm/react/plugin.d.ts +12 -0
- package/dist/esm/react/plugin.js +11 -0
- package/dist/esm/react/plugin.js.map +1 -0
- package/dist/esm/react/production/A11yDevtools.d.ts +5 -0
- package/dist/esm/react/production/A11yDevtools.js +8 -0
- package/dist/esm/react/production/A11yDevtools.js.map +1 -0
- package/dist/esm/react/production/plugin.d.ts +7 -0
- package/dist/esm/react/production/plugin.js +11 -0
- package/dist/esm/react/production/plugin.js.map +1 -0
- package/dist/esm/react/production.d.ts +3 -0
- package/dist/esm/react/production.js +5 -0
- package/dist/esm/solid/A11yDevtools.d.ts +5 -0
- package/dist/esm/solid/A11yDevtools.js +8 -0
- package/dist/esm/solid/A11yDevtools.js.map +1 -0
- package/dist/esm/solid/index.d.ts +8 -0
- package/dist/esm/solid/index.js +9 -0
- package/dist/esm/solid/index.js.map +1 -0
- package/dist/esm/solid/plugin.d.ts +12 -0
- package/dist/esm/solid/plugin.js +11 -0
- package/dist/esm/solid/plugin.js.map +1 -0
- package/dist/esm/solid/production/A11yDevtools.d.ts +5 -0
- package/dist/esm/solid/production/A11yDevtools.js +8 -0
- package/dist/esm/solid/production/A11yDevtools.js.map +1 -0
- package/dist/esm/solid/production/plugin.d.ts +7 -0
- package/dist/esm/solid/production/plugin.js +11 -0
- package/dist/esm/solid/production/plugin.js.map +1 -0
- package/dist/esm/solid/production.d.ts +3 -0
- package/dist/esm/solid/production.js +3 -0
- package/package.json +110 -7
- package/src/core/components/IssueCard.tsx +75 -0
- package/src/core/components/IssueList.tsx +155 -0
- package/src/core/components/Settings.tsx +221 -0
- package/src/core/components/Shell.tsx +154 -0
- package/src/core/components/index.tsx +12 -0
- package/src/core/contexts/allyContext.tsx +118 -0
- package/src/core/core.tsx +11 -0
- package/src/core/index.ts +10 -0
- package/src/core/production.ts +5 -0
- package/src/core/styles/styles.ts +556 -0
- package/src/core/types/types.ts +177 -0
- package/src/core/utils/ally-audit.utils.ts +345 -0
- package/src/core/utils/config.utils.ts +68 -0
- package/src/core/utils/custom-audit.utils.ts +643 -0
- package/src/core/utils/export-audit.uitls.ts +180 -0
- package/src/core/utils/ui.utils.ts +483 -0
- package/src/react/A11yDevtools.ts +12 -0
- package/src/react/index.ts +16 -0
- package/src/react/plugin.ts +9 -0
- package/src/react/production/A11yDevtools.ts +11 -0
- package/src/react/production/plugin.ts +9 -0
- package/src/react/production.ts +7 -0
- package/src/solid/A11yDevtools.ts +11 -0
- package/src/solid/index.ts +14 -0
- package/src/solid/plugin.ts +9 -0
- package/src/solid/production/A11yDevtools.ts +10 -0
- package/src/solid/production/plugin.ts +9 -0
- package/src/solid/production.ts +5 -0
- package/README.md +0 -45
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { RULE_SET_LABELS, SEVERITY_LABELS } from "../utils/ui.utils.js";
|
|
2
|
+
import { useAllyContext } from "../contexts/allyContext.js";
|
|
3
|
+
import { useStyles } from "../styles/styles.js";
|
|
4
|
+
import { A11yIssueList } from "./IssueList.js";
|
|
5
|
+
import { A11ySettingsOverlay } from "./Settings.js";
|
|
6
|
+
import { className, createComponent, effect, getNextElement, getNextMarker, insert, memo, template } from "solid-js/web";
|
|
7
|
+
import { Match, Show, Switch, createMemo, createSignal } from "solid-js";
|
|
8
|
+
import { Button, Header, MainPanel } from "@tanstack/devtools-ui";
|
|
9
|
+
//#region src/core/components/Shell.tsx
|
|
10
|
+
/** @jsxImportSource solid-js */
|
|
11
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`), _tmpl$2 = /* @__PURE__ */ template(`<div><h2>Accessibility Audit</h2><!$><!/>`), _tmpl$3 = /* @__PURE__ */ template(`<div><!$><!/><!$><!/>`), _tmpl$4 = /* @__PURE__ */ template(`<div><span></span><div></div><!$><!/>`), _tmpl$5 = /* @__PURE__ */ template(`<div><p>No audit results yet</p><p>Click "Run Audit" to scan for accessibility issues`), _tmpl$6 = /* @__PURE__ */ template(`<div><p>No accessibility issues found!</p><p>Scanned in <!$><!/>ms`), _tmpl$7 = /* @__PURE__ */ template(`<div>`);
|
|
12
|
+
function Shell() {
|
|
13
|
+
const styles = useStyles();
|
|
14
|
+
const { filteredIssues, allyResult, config, setConfig, triggerAllyScan } = useAllyContext();
|
|
15
|
+
const selectedIssueSignal = createSignal("");
|
|
16
|
+
const [displaySettings, setDisplaySettings] = createSignal(false);
|
|
17
|
+
const handleExport = (format) => {
|
|
18
|
+
if (allyResult.audit) return;
|
|
19
|
+
import("../utils/export-audit.uitls.js").then((m) => m.exportAuditResults(allyResult.audit, { format }));
|
|
20
|
+
};
|
|
21
|
+
const showOverlayState = createMemo(() => config.showOverlays);
|
|
22
|
+
return createComponent(MainPanel, {
|
|
23
|
+
get ["class"]() {
|
|
24
|
+
return styles().root;
|
|
25
|
+
},
|
|
26
|
+
withPadding: false,
|
|
27
|
+
get children() {
|
|
28
|
+
return [
|
|
29
|
+
createComponent(Header, {
|
|
30
|
+
get ["class"]() {
|
|
31
|
+
return styles().header;
|
|
32
|
+
},
|
|
33
|
+
get children() {
|
|
34
|
+
return [(() => {
|
|
35
|
+
var _el$ = getNextElement(_tmpl$2), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling, [_el$5, _co$] = getNextMarker(_el$4.nextSibling);
|
|
36
|
+
insert(_el$, createComponent(Show, {
|
|
37
|
+
get when() {
|
|
38
|
+
return memo(() => allyResult.state === "done")() && filteredIssues();
|
|
39
|
+
},
|
|
40
|
+
get children() {
|
|
41
|
+
var _el$3 = getNextElement(_tmpl$);
|
|
42
|
+
insert(_el$3, () => `${filteredIssues().length} issue${filteredIssues().length !== 1 ? "s" : ""}`);
|
|
43
|
+
effect(() => className(_el$3, styles().headerSub));
|
|
44
|
+
return _el$3;
|
|
45
|
+
}
|
|
46
|
+
}), _el$5, _co$);
|
|
47
|
+
effect((_p$) => {
|
|
48
|
+
var _v$ = styles().headerTitleRow, _v$2 = styles().headerTitle;
|
|
49
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
50
|
+
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
51
|
+
return _p$;
|
|
52
|
+
}, {
|
|
53
|
+
e: void 0,
|
|
54
|
+
t: void 0
|
|
55
|
+
});
|
|
56
|
+
return _el$;
|
|
57
|
+
})(), (() => {
|
|
58
|
+
var _el$6 = getNextElement(_tmpl$3), _el$10 = _el$6.firstChild, [_el$11, _co$4] = getNextMarker(_el$10.nextSibling), _el$12 = _el$11.nextSibling, [_el$13, _co$5] = getNextMarker(_el$12.nextSibling);
|
|
59
|
+
insert(_el$6, createComponent(Button, {
|
|
60
|
+
variant: "primary",
|
|
61
|
+
onClick: triggerAllyScan,
|
|
62
|
+
get disabled() {
|
|
63
|
+
return allyResult.state === "scanning";
|
|
64
|
+
},
|
|
65
|
+
get children() {
|
|
66
|
+
return allyResult.state === "scanning" ? "Scanning..." : "Run Audit";
|
|
67
|
+
}
|
|
68
|
+
}), _el$11, _co$4);
|
|
69
|
+
insert(_el$6, createComponent(Show, {
|
|
70
|
+
get when() {
|
|
71
|
+
return memo(() => !!(allyResult.state === "done" && allyResult.audit))() && allyResult.audit.issues.length > 0;
|
|
72
|
+
},
|
|
73
|
+
get children() {
|
|
74
|
+
return [(() => {
|
|
75
|
+
var _el$7 = getNextElement(_tmpl$3), _el$8 = _el$7.firstChild, [_el$9, _co$2] = getNextMarker(_el$8.nextSibling), _el$0 = _el$9.nextSibling, [_el$1, _co$3] = getNextMarker(_el$0.nextSibling);
|
|
76
|
+
insert(_el$7, createComponent(Button, {
|
|
77
|
+
variant: "secondary",
|
|
78
|
+
outline: true,
|
|
79
|
+
onClick: () => handleExport("json"),
|
|
80
|
+
children: "Export JSON"
|
|
81
|
+
}), _el$9, _co$2);
|
|
82
|
+
insert(_el$7, createComponent(Button, {
|
|
83
|
+
variant: "secondary",
|
|
84
|
+
outline: true,
|
|
85
|
+
onClick: () => handleExport("csv"),
|
|
86
|
+
children: "Export CSV"
|
|
87
|
+
}), _el$1, _co$3);
|
|
88
|
+
effect(() => className(_el$7, styles().buttonRow));
|
|
89
|
+
return _el$7;
|
|
90
|
+
})(), createComponent(Button, {
|
|
91
|
+
get variant() {
|
|
92
|
+
return showOverlayState() ? "success" : "warning";
|
|
93
|
+
},
|
|
94
|
+
onClick: () => setConfig("showOverlays", !config.showOverlays),
|
|
95
|
+
get children() {
|
|
96
|
+
return [memo(() => showOverlayState() ? "Hide" : "Show"), " Overlays"];
|
|
97
|
+
}
|
|
98
|
+
})];
|
|
99
|
+
}
|
|
100
|
+
}), _el$13, _co$5);
|
|
101
|
+
effect(() => className(_el$6, styles().headerActions));
|
|
102
|
+
return _el$6;
|
|
103
|
+
})()];
|
|
104
|
+
}
|
|
105
|
+
}),
|
|
106
|
+
(() => {
|
|
107
|
+
var _el$14 = getNextElement(_tmpl$4), _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$16.nextSibling, [_el$18, _co$6] = getNextMarker(_el$17.nextSibling);
|
|
108
|
+
insert(_el$15, createComponent(Show, {
|
|
109
|
+
get when() {
|
|
110
|
+
return allyResult.state === "done";
|
|
111
|
+
},
|
|
112
|
+
get children() {
|
|
113
|
+
return [memo(() => `${SEVERITY_LABELS[config.threshold]}+ | ${RULE_SET_LABELS[config.ruleSet]}`), createComponent(Show, {
|
|
114
|
+
get when() {
|
|
115
|
+
return config.disabledRules.length > 0;
|
|
116
|
+
},
|
|
117
|
+
get children() {
|
|
118
|
+
return ` | ${config.disabledRules.length} rule(s) disabled`;
|
|
119
|
+
}
|
|
120
|
+
})];
|
|
121
|
+
}
|
|
122
|
+
}));
|
|
123
|
+
insert(_el$14, createComponent(Button, {
|
|
124
|
+
variant: "secondary",
|
|
125
|
+
outline: true,
|
|
126
|
+
onClick: () => setDisplaySettings(true),
|
|
127
|
+
children: "Settings"
|
|
128
|
+
}), _el$18, _co$6);
|
|
129
|
+
effect((_p$) => {
|
|
130
|
+
var _v$3 = styles().statusBar, _v$4 = styles().statusSpacer;
|
|
131
|
+
_v$3 !== _p$.e && className(_el$14, _p$.e = _v$3);
|
|
132
|
+
_v$4 !== _p$.t && className(_el$16, _p$.t = _v$4);
|
|
133
|
+
return _p$;
|
|
134
|
+
}, {
|
|
135
|
+
e: void 0,
|
|
136
|
+
t: void 0
|
|
137
|
+
});
|
|
138
|
+
return _el$14;
|
|
139
|
+
})(),
|
|
140
|
+
(() => {
|
|
141
|
+
var _el$19 = getNextElement(_tmpl$7);
|
|
142
|
+
insert(_el$19, createComponent(Switch, { get children() {
|
|
143
|
+
return [
|
|
144
|
+
createComponent(Match, {
|
|
145
|
+
get when() {
|
|
146
|
+
return allyResult.state === "init";
|
|
147
|
+
},
|
|
148
|
+
get children() {
|
|
149
|
+
var _el$20 = getNextElement(_tmpl$5), _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling;
|
|
150
|
+
effect((_p$) => {
|
|
151
|
+
var _v$5 = styles().emptyState, _v$6 = styles().emptyPrimary, _v$7 = styles().emptySecondary;
|
|
152
|
+
_v$5 !== _p$.e && className(_el$20, _p$.e = _v$5);
|
|
153
|
+
_v$6 !== _p$.t && className(_el$21, _p$.t = _v$6);
|
|
154
|
+
_v$7 !== _p$.a && className(_el$22, _p$.a = _v$7);
|
|
155
|
+
return _p$;
|
|
156
|
+
}, {
|
|
157
|
+
e: void 0,
|
|
158
|
+
t: void 0,
|
|
159
|
+
a: void 0
|
|
160
|
+
});
|
|
161
|
+
return _el$20;
|
|
162
|
+
}
|
|
163
|
+
}),
|
|
164
|
+
createComponent(Match, {
|
|
165
|
+
get when() {
|
|
166
|
+
return memo(() => !!(allyResult.state === "done" && allyResult.audit))() && allyResult.audit.issues.length === 0;
|
|
167
|
+
},
|
|
168
|
+
get children() {
|
|
169
|
+
var _el$23 = getNextElement(_tmpl$6), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling, _el$28 = _el$25.firstChild.nextSibling, [_el$29, _co$7] = getNextMarker(_el$28.nextSibling);
|
|
170
|
+
_el$29.nextSibling;
|
|
171
|
+
insert(_el$25, () => allyResult.audit.duration.toFixed(0), _el$29, _co$7);
|
|
172
|
+
effect((_p$) => {
|
|
173
|
+
var _v$8 = styles().successState, _v$9 = styles().successTitle, _v$0 = styles().successSub;
|
|
174
|
+
_v$8 !== _p$.e && className(_el$23, _p$.e = _v$8);
|
|
175
|
+
_v$9 !== _p$.t && className(_el$24, _p$.t = _v$9);
|
|
176
|
+
_v$0 !== _p$.a && className(_el$25, _p$.a = _v$0);
|
|
177
|
+
return _p$;
|
|
178
|
+
}, {
|
|
179
|
+
e: void 0,
|
|
180
|
+
t: void 0,
|
|
181
|
+
a: void 0
|
|
182
|
+
});
|
|
183
|
+
return _el$23;
|
|
184
|
+
}
|
|
185
|
+
}),
|
|
186
|
+
createComponent(Match, {
|
|
187
|
+
get when() {
|
|
188
|
+
return memo(() => !!allyResult.audit)() && allyResult.audit.issues.length > 0;
|
|
189
|
+
},
|
|
190
|
+
get children() {
|
|
191
|
+
return createComponent(A11yIssueList, { selectedIssueSignal });
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
];
|
|
195
|
+
} }));
|
|
196
|
+
effect(() => className(_el$19, styles().content));
|
|
197
|
+
return _el$19;
|
|
198
|
+
})(),
|
|
199
|
+
createComponent(Show, {
|
|
200
|
+
get when() {
|
|
201
|
+
return displaySettings();
|
|
202
|
+
},
|
|
203
|
+
get children() {
|
|
204
|
+
return createComponent(A11ySettingsOverlay, { onClose: () => setDisplaySettings(false) });
|
|
205
|
+
}
|
|
206
|
+
})
|
|
207
|
+
];
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
//#endregion
|
|
212
|
+
export { Shell };
|
|
213
|
+
|
|
214
|
+
//# sourceMappingURL=Shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shell.js","names":["Match","Show","Switch","createMemo","createSignal","Button","Header","MainPanel","useAllyContext","RULE_SET_LABELS","SEVERITY_LABELS","useStyles","A11yIssueList","A11ySettingsOverlay","Shell","styles","filteredIssues","allyResult","config","setConfig","triggerAllyScan","selectedIssueSignal","displaySettings","setDisplaySettings","handleExport","format","audit","then","m","exportAuditResults","showOverlayState","showOverlays","_$createComponent","class","root","withPadding","children","header","_el$","_$getNextElement","_tmpl$2","_el$2","firstChild","_el$4","nextSibling","_el$5","_co$","_$getNextMarker","_$insert","when","_$memo","state","_el$3","_tmpl$","length","_$effect","_$className","headerSub","_p$","_v$","headerTitleRow","_v$2","headerTitle","e","t","undefined","_el$6","_tmpl$3","_el$10","_el$11","_co$4","_el$12","_el$13","_co$5","variant","onClick","disabled","issues","_el$7","_el$8","_el$9","_co$2","_el$0","_el$1","_co$3","outline","buttonRow","headerActions","_el$14","_tmpl$4","_el$15","_el$16","_el$17","_el$18","_co$6","threshold","ruleSet","disabledRules","_v$3","statusBar","_v$4","statusSpacer","_el$19","_tmpl$7","_el$20","_tmpl$5","_el$21","_el$22","_v$5","emptyState","_v$6","emptyPrimary","_v$7","emptySecondary","a","_el$23","_tmpl$6","_el$24","_el$25","_el$26","_el$28","_el$29","_co$7","_el$27","duration","toFixed","_v$8","successState","_v$9","successTitle","_v$0","successSub","content","onClose"],"sources":["../../../../src/core/components/Shell.tsx"],"sourcesContent":["/** @jsxImportSource solid-js */\n\nimport { Match, Show, Switch, createMemo, createSignal } from 'solid-js'\nimport { Button, Header, MainPanel } from '@tanstack/devtools-ui'\nimport { useAllyContext } from '../contexts/allyContext'\nimport { RULE_SET_LABELS, SEVERITY_LABELS } from '../utils/ui.utils'\nimport { useStyles } from '../styles/styles'\nimport { A11yIssueList } from './IssueList'\nimport { A11ySettingsOverlay } from './Settings'\n\nexport function Shell() {\n const styles = useStyles()\n\n // ally context\n const { filteredIssues, allyResult, config, setConfig, triggerAllyScan } =\n useAllyContext()\n\n // ui state\n const selectedIssueSignal = createSignal<string>('')\n const [displaySettings, setDisplaySettings] = createSignal<boolean>(false)\n\n const handleExport = (format: 'json' | 'csv') => {\n if (allyResult.audit) return\n // Keep export logic in runtime via event -> overlay? export is still a direct helper.\n // We keep this import local to avoid pulling export code into the runtime module.\n\n void import('../utils/export-audit.uitls').then((m) =>\n m.exportAuditResults(allyResult.audit!, { format }),\n )\n }\n\n const showOverlayState = createMemo(() => config.showOverlays)\n\n return (\n <MainPanel class={styles().root} withPadding={false}>\n <Header class={styles().header}>\n <div class={styles().headerTitleRow}>\n <h2 class={styles().headerTitle}>Accessibility Audit</h2>\n\n <Show when={allyResult.state === 'done' && filteredIssues()}>\n <span class={styles().headerSub}>\n {`${filteredIssues().length} issue${filteredIssues().length !== 1 ? 's' : ''}`}\n </span>\n </Show>\n </div>\n\n <div class={styles().headerActions}>\n <Button\n variant=\"primary\"\n onClick={triggerAllyScan}\n disabled={allyResult.state === 'scanning'}\n >\n {allyResult.state === 'scanning' ? 'Scanning...' : 'Run Audit'}\n </Button>\n\n <Show\n when={\n allyResult.state === 'done' &&\n allyResult.audit &&\n allyResult.audit.issues.length > 0\n }\n >\n <div class={styles().buttonRow}>\n <Button\n variant=\"secondary\"\n outline\n onClick={() => handleExport('json')}\n >\n Export JSON\n </Button>\n\n <Button\n variant=\"secondary\"\n outline\n onClick={() => handleExport('csv')}\n >\n Export CSV\n </Button>\n </div>\n\n <Button\n variant={showOverlayState() ? 'success' : 'warning'}\n onClick={() => setConfig('showOverlays', !config.showOverlays)}\n >\n {showOverlayState() ? 'Hide' : 'Show'} Overlays\n </Button>\n </Show>\n </div>\n </Header>\n\n <div class={styles().statusBar}>\n <span>\n <Show when={allyResult.state === 'done'}>\n {`${SEVERITY_LABELS[config.threshold]}+ | ${RULE_SET_LABELS[config.ruleSet]}`}\n\n <Show when={config.disabledRules.length > 0}>\n {` | ${config.disabledRules.length} rule(s) disabled`}\n </Show>\n </Show>\n </span>\n\n <div class={styles().statusSpacer} />\n\n <Button\n variant=\"secondary\"\n outline\n onClick={() => setDisplaySettings(true)}\n >\n Settings\n </Button>\n </div>\n\n <div class={styles().content}>\n <Switch>\n <Match when={allyResult.state === 'init'}>\n <div class={styles().emptyState}>\n <p class={styles().emptyPrimary}>No audit results yet</p>\n\n <p class={styles().emptySecondary}>\n Click \"Run Audit\" to scan for accessibility issues\n </p>\n </div>\n </Match>\n\n <Match\n when={\n allyResult.state === 'done' &&\n allyResult.audit &&\n allyResult.audit.issues.length === 0\n }\n >\n <div class={styles().successState}>\n <p class={styles().successTitle}>\n No accessibility issues found!\n </p>\n\n <p class={styles().successSub}>\n Scanned in {allyResult.audit!.duration.toFixed(0)}ms\n </p>\n </div>\n </Match>\n\n <Match when={allyResult.audit && allyResult.audit.issues.length > 0}>\n <A11yIssueList selectedIssueSignal={selectedIssueSignal} />\n </Match>\n </Switch>\n </div>\n\n <Show when={displaySettings()}>\n <A11ySettingsOverlay onClose={() => setDisplaySettings(false)} />\n </Show>\n </MainPanel>\n )\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAgBc,QAAQ;CACtB,MAAMC,SAASJ,WAAW;CAG1B,MAAM,EAAEK,gBAAgBC,YAAYC,QAAQC,WAAWC,oBACrDZ,gBAAgB;CAGlB,MAAMa,sBAAsBjB,aAAqB,GAAG;CACpD,MAAM,CAACkB,iBAAiBC,sBAAsBnB,aAAsB,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import { createComponent } from "solid-js/web";
|
|
4
|
+
//#region src/core/components/index.tsx
|
|
5
|
+
/** @jsxImportSource solid-js */
|
|
6
|
+
function Devtools() {
|
|
7
|
+
return createComponent(AllyProvider, { get children() {
|
|
8
|
+
return createComponent(Shell, {});
|
|
9
|
+
} });
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Devtools as default };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["AllyProvider","Shell","Devtools","_$createComponent","children"],"sources":["../../../../src/core/components/index.tsx"],"sourcesContent":["/** @jsxImportSource solid-js */\n\nimport { AllyProvider } from '../contexts/allyContext'\nimport { Shell } from './Shell'\n\nexport default function Devtools() {\n return (\n <AllyProvider>\n <Shell />\n </AllyProvider>\n )\n}\n"],"mappings":";;;;;AAKA,SAAwBE,WAAW;AACjC,QAAAC,gBACGH,cAAY,EAAA,IAAAI,WAAA;AAAA,SAAAD,gBACVF,OAAK,EAAA,CAAA;IAAA,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { A11yAuditResult, A11yPluginOptions, SeverityThreshold } from '../types/types.js';
|
|
2
|
+
import { ParentComponent } from 'solid-js';
|
|
3
|
+
type AllyProviderProps = {};
|
|
4
|
+
export declare const AllyProvider: ParentComponent<AllyProviderProps>;
|
|
5
|
+
export declare function useAllyContext(): {
|
|
6
|
+
impactKey: import('solid-js').Accessor<SeverityThreshold | "all">;
|
|
7
|
+
setImpactKey: import('solid-js').Setter<SeverityThreshold | "all">;
|
|
8
|
+
filteredIssues: import('solid-js').Accessor<import('../types/types.js').A11yIssue[]>;
|
|
9
|
+
triggerAllyScan: () => Promise<void>;
|
|
10
|
+
setConfig: import('solid-js/store').SetStoreFunction<Required<A11yPluginOptions>>;
|
|
11
|
+
config: Required<A11yPluginOptions>;
|
|
12
|
+
allyResult: {
|
|
13
|
+
audit?: A11yAuditResult;
|
|
14
|
+
state: "init" | "scanning" | "done";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { clearHighlights, highlightAllIssues } from "../utils/ui.utils.js";
|
|
2
|
+
import { filterIssuesAboveThreshold, runAudit } from "../utils/ally-audit.utils.js";
|
|
3
|
+
import { mergeConfig, saveConfig } from "../utils/config.utils.js";
|
|
4
|
+
import { createComponent } from "solid-js/web";
|
|
5
|
+
import { createContext, createEffect, createMemo, createSignal, useContext } from "solid-js";
|
|
6
|
+
import { createStore } from "solid-js/store";
|
|
7
|
+
//#region src/core/contexts/allyContext.tsx
|
|
8
|
+
/** @jsxImportSource solid-js */
|
|
9
|
+
function useAllyValue() {
|
|
10
|
+
const [config, setConfig] = createStore(mergeConfig());
|
|
11
|
+
const [allyResult, setAllyResult] = createStore({ state: "init" });
|
|
12
|
+
const [impactKey, setImpactKey] = createSignal("all");
|
|
13
|
+
const triggerAllyScan = async () => {
|
|
14
|
+
setAllyResult("state", "scanning");
|
|
15
|
+
setAllyResult({
|
|
16
|
+
audit: await runAudit(config),
|
|
17
|
+
state: "done"
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
const filteredIssues = createMemo(() => {
|
|
21
|
+
if (allyResult.state !== "done" || !allyResult.audit?.issues) return [];
|
|
22
|
+
let results = allyResult.audit.issues;
|
|
23
|
+
results = filterIssuesAboveThreshold(results, config.threshold);
|
|
24
|
+
if (config.disabledRules.length > 0) results = results.filter((issue) => !config.disabledRules.includes(issue.ruleId));
|
|
25
|
+
if (impactKey() === "all") return results;
|
|
26
|
+
return results.filter((val) => val.impact === impactKey());
|
|
27
|
+
});
|
|
28
|
+
createEffect(() => {
|
|
29
|
+
if (config.showOverlays === false) {
|
|
30
|
+
clearHighlights();
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (allyResult.state === "done") highlightAllIssues(filteredIssues());
|
|
34
|
+
});
|
|
35
|
+
createEffect(() => {
|
|
36
|
+
saveConfig(config);
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
impactKey,
|
|
40
|
+
setImpactKey,
|
|
41
|
+
filteredIssues,
|
|
42
|
+
triggerAllyScan,
|
|
43
|
+
setConfig,
|
|
44
|
+
config,
|
|
45
|
+
allyResult
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
var AllyContext = createContext(null);
|
|
49
|
+
var AllyProvider = (props) => {
|
|
50
|
+
const value = useAllyValue();
|
|
51
|
+
return createComponent(AllyContext.Provider, {
|
|
52
|
+
value,
|
|
53
|
+
get children() {
|
|
54
|
+
return props.children;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
function useAllyContext() {
|
|
59
|
+
const context = useContext(AllyContext);
|
|
60
|
+
if (context === null) throw new Error("useAllyContext must be used within an AllyProvider");
|
|
61
|
+
return context;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { AllyProvider, useAllyContext };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=allyContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allyContext.js","names":["createContext","createEffect","createMemo","createSignal","useContext","createStore","filterIssuesAboveThreshold","runAudit","mergeConfig","saveConfig","clearHighlights","highlightAllIssues","A11yAuditResult","A11yPluginOptions","SeverityThreshold","ParentComponent","useAllyValue","config","setConfig","Required","allyResult","setAllyResult","audit","state","impactKey","setImpactKey","triggerAllyScan","filteredIssues","issues","results","threshold","disabledRules","length","filter","issue","includes","ruleId","val","impact","showOverlays","ContextType","ReturnType","AllyContext","AllyProviderProps","AllyProvider","props","value","_$createComponent","Provider","children","useAllyContext","context","Error"],"sources":["../../../../src/core/contexts/allyContext.tsx"],"sourcesContent":["/** @jsxImportSource solid-js */\n\nimport {\n createContext,\n createEffect,\n createMemo,\n createSignal,\n useContext,\n} from 'solid-js'\nimport { createStore } from 'solid-js/store'\nimport { filterIssuesAboveThreshold, runAudit } from '../utils/ally-audit.utils'\nimport { mergeConfig, saveConfig } from '../utils/config.utils'\nimport { clearHighlights, highlightAllIssues } from '../utils/ui.utils'\n\n// types\nimport type {\n A11yAuditResult,\n A11yPluginOptions,\n SeverityThreshold,\n} from '../types/types'\nimport type { ParentComponent } from 'solid-js'\n\n//\n// context state\n//\n\nfunction useAllyValue() {\n const [config, setConfig] =\n createStore<Required<A11yPluginOptions>>(mergeConfig())\n\n const [allyResult, setAllyResult] = createStore<{\n audit?: A11yAuditResult\n state: 'init' | 'scanning' | 'done'\n }>({ state: 'init' })\n\n const [impactKey, setImpactKey] = createSignal<SeverityThreshold | 'all'>(\n 'all',\n )\n\n const triggerAllyScan = async () => {\n setAllyResult('state', 'scanning')\n setAllyResult({ audit: await runAudit(config), state: 'done' })\n }\n\n const filteredIssues = createMemo(() => {\n if (allyResult.state !== 'done' || !allyResult.audit?.issues) return []\n let results = allyResult.audit.issues\n\n results = filterIssuesAboveThreshold(results, config.threshold)\n\n // removes excluded rules\n if (config.disabledRules.length > 0) {\n results = results.filter(\n (issue) => !config.disabledRules.includes(issue.ruleId),\n )\n }\n\n // early return if all impacts selected\n if (impactKey() === 'all') return results\n\n return results.filter((val) => val.impact === impactKey())\n })\n\n createEffect(() => {\n if (config.showOverlays === false) {\n clearHighlights()\n return\n }\n\n if (allyResult.state === 'done') highlightAllIssues(filteredIssues())\n })\n\n createEffect(() => {\n saveConfig(config)\n })\n\n return {\n impactKey,\n setImpactKey,\n\n filteredIssues,\n\n triggerAllyScan,\n\n setConfig,\n config,\n\n allyResult,\n }\n}\n\ntype ContextType = ReturnType<typeof useAllyValue>\n\n//\n// context\n//\n\nconst AllyContext = createContext<ContextType | null>(null)\n\ntype AllyProviderProps = {}\n\nexport const AllyProvider: ParentComponent<AllyProviderProps> = (props) => {\n const value = useAllyValue()\n\n return (\n <AllyContext.Provider value={value}>{props.children}</AllyContext.Provider>\n )\n}\n\nexport function useAllyContext() {\n const context = useContext(AllyContext)\n\n if (context === null) {\n throw new Error('useAllyContext must be used within an AllyProvider')\n }\n\n return context\n}\n"],"mappings":";;;;;;;;AA0BA,SAASgB,eAAe;CACtB,MAAM,CAACC,QAAQC,aACbb,YAAyCG,aAAa,CAAC;CAEzD,MAAM,CAACY,YAAYC,iBAAiBhB,YAGjC,EAAEkB,OAAO,QAAQ,CAAC;CAErB,MAAM,CAACC,WAAWC,gBAAgBtB,aAChC,MACD;CAED,MAAMuB,kBAAkB,YAAY;AAClCL,gBAAc,SAAS,WAAW;AAClCA,gBAAc;GAAEC,OAAO,MAAMf,SAASU,OAAO;GAAEM,OAAO;GAAQ,CAAC;;CAGjE,MAAMI,iBAAiBzB,iBAAiB;AACtC,MAAIkB,WAAWG,UAAU,UAAU,CAACH,WAAWE,OAAOM,OAAQ,QAAO,EAAE;EACvE,IAAIC,UAAUT,WAAWE,MAAMM;AAE/BC,YAAUvB,2BAA2BuB,SAASZ,OAAOa,UAAU;AAG/D,MAAIb,OAAOc,cAAcC,SAAS,EAChCH,WAAUA,QAAQI,QACfC,UAAU,CAACjB,OAAOc,cAAcI,SAASD,MAAME,OAClD,CAAC;AAIH,MAAIZ,WAAW,KAAK,MAAO,QAAOK;AAElC,SAAOA,QAAQI,QAAQI,QAAQA,IAAIC,WAAWd,WAAW,CAAC;GAC1D;AAEFvB,oBAAmB;AACjB,MAAIgB,OAAOsB,iBAAiB,OAAO;AACjC7B,oBAAiB;AACjB;;AAGF,MAAIU,WAAWG,UAAU,OAAQZ,oBAAmBgB,gBAAgB,CAAC;GACrE;AAEF1B,oBAAmB;AACjBQ,aAAWQ,OAAO;GAClB;AAEF,QAAO;EACLO;EACAC;EAEAE;EAEAD;EAEAR;EACAD;EAEAG;EACD;;AASH,IAAMsB,cAAc1C,cAAkC,KAAK;AAI3D,IAAa4C,gBAAoDC,UAAU;CACzE,MAAMC,QAAQ9B,cAAc;AAE5B,QAAA+B,gBACGL,YAAYM,UAAQ;EAAQF;EAAK,IAAAG,WAAA;AAAA,UAAGJ,MAAMI;;EAAQ,CAAA;;AAIvD,SAAgBC,iBAAiB;CAC/B,MAAMC,UAAU/C,WAAWsC,YAAY;AAEvC,KAAIS,YAAY,KACd,OAAM,IAAIC,MAAM,qDAAqD;AAGvE,QAAOD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** @jsxImportSource solid-js */
|
|
2
|
+
export interface A11yDevtoolsInit {
|
|
3
|
+
}
|
|
4
|
+
declare const A11yDevtoolsCore: new () => {
|
|
5
|
+
"__#private@#isMounted": boolean;
|
|
6
|
+
"__#private@#isMounting": boolean;
|
|
7
|
+
"__#private@#abortMount": boolean;
|
|
8
|
+
"__#private@#dispose"?: () => void;
|
|
9
|
+
mount<T extends HTMLElement>(el: T, props: import('@tanstack/devtools').TanStackDevtoolsPluginProps): Promise<void>;
|
|
10
|
+
unmount(): void;
|
|
11
|
+
}, A11yDevtoolsCoreNoOp: new () => {
|
|
12
|
+
mount<T extends HTMLElement>(_el: T, _props: import('@tanstack/devtools').TanStackDevtoolsPluginProps): Promise<void>;
|
|
13
|
+
unmount(): void;
|
|
14
|
+
"__#private@#isMounted": boolean;
|
|
15
|
+
"__#private@#isMounting": boolean;
|
|
16
|
+
"__#private@#abortMount": boolean;
|
|
17
|
+
"__#private@#dispose"?: () => void;
|
|
18
|
+
};
|
|
19
|
+
export { A11yDevtoolsCore, A11yDevtoolsCoreNoOp };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { constructCoreClass } from "@tanstack/devtools-utils/solid";
|
|
2
|
+
//#region src/core/core.tsx
|
|
3
|
+
/** @jsxImportSource solid-js */
|
|
4
|
+
var [A11yDevtoolsCore, A11yDevtoolsCoreNoOp] = constructCoreClass(() => import("./components/index.js"));
|
|
5
|
+
//#endregion
|
|
6
|
+
export { A11yDevtoolsCore, A11yDevtoolsCoreNoOp };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=core.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","names":["constructCoreClass","A11yDevtoolsInit","A11yDevtoolsCore","A11yDevtoolsCoreNoOp"],"sources":["../../../src/core/core.tsx"],"sourcesContent":["/** @jsxImportSource solid-js */\n\nimport { constructCoreClass } from '@tanstack/devtools-utils/solid'\n\nexport interface A11yDevtoolsInit {}\n\nconst [A11yDevtoolsCore, A11yDevtoolsCoreNoOp] = constructCoreClass(\n () => import('./components'),\n)\n\nexport { A11yDevtoolsCore, A11yDevtoolsCoreNoOp }\n"],"mappings":";;;AAMA,IAAM,CAACE,kBAAkBC,wBAAwBH,yBACzC,OAAO,yBACd"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const A11yDevtoolsCore: new () => {
|
|
2
|
+
"__#private@#isMounted": boolean;
|
|
3
|
+
"__#private@#isMounting": boolean;
|
|
4
|
+
"__#private@#abortMount": boolean;
|
|
5
|
+
"__#private@#dispose"?: () => void;
|
|
6
|
+
mount<T extends HTMLElement>(el: T, props: import('@tanstack/devtools').TanStackDevtoolsPluginProps): Promise<void>;
|
|
7
|
+
unmount(): void;
|
|
8
|
+
};
|
|
9
|
+
export type { A11yDevtoolsInit } from './core.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { A11yDevtoolsCore as A11yDevtoolsCore$1, A11yDevtoolsCoreNoOp } from "./core.js";
|
|
4
|
+
//#region src/core/index.ts
|
|
5
|
+
var A11yDevtoolsCore = process.env.NODE_ENV !== "development" ? A11yDevtoolsCoreNoOp : A11yDevtoolsCore$1;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { A11yDevtoolsCore };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/core/index.ts"],"sourcesContent":["'use client'\n\nimport * as Devtools from './core'\n\nexport const A11yDevtoolsCore =\n process.env.NODE_ENV !== 'development'\n ? Devtools.A11yDevtoolsCoreNoOp\n : Devtools.A11yDevtoolsCore\n\nexport type { A11yDevtoolsInit } from './core'\n"],"mappings":";;;;AAIA,IAAA,mBAAA,QAAA,IAAA,aAAA,gBAAA,uBAAA"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { TanStackDevtoolsTheme } from '@tanstack/devtools-ui';
|
|
2
|
+
import { RuleCategory, SeverityThreshold } from '../types/types.js';
|
|
3
|
+
export declare const CATEGORY_LABELS: Record<RuleCategory, string>;
|
|
4
|
+
export declare const CATEGORIES: Array<RuleCategory>;
|
|
5
|
+
export declare function useStyles(): import('solid-js').Accessor<{
|
|
6
|
+
colors: {
|
|
7
|
+
bg: string;
|
|
8
|
+
fg: string;
|
|
9
|
+
border: string;
|
|
10
|
+
muted: string;
|
|
11
|
+
muted2: string;
|
|
12
|
+
theme: TanStackDevtoolsTheme;
|
|
13
|
+
};
|
|
14
|
+
root: string;
|
|
15
|
+
header: string;
|
|
16
|
+
headerTitleRow: string;
|
|
17
|
+
headerTitle: string;
|
|
18
|
+
headerSub: string;
|
|
19
|
+
headerActions: string;
|
|
20
|
+
primaryButton: string;
|
|
21
|
+
primaryButtonDisabled: string;
|
|
22
|
+
button: string;
|
|
23
|
+
buttonRow: string;
|
|
24
|
+
toggleOverlay: string;
|
|
25
|
+
toggleOverlayOn: string;
|
|
26
|
+
statusBar: string;
|
|
27
|
+
statusSpacer: string;
|
|
28
|
+
smallLinkButton: string;
|
|
29
|
+
content: string;
|
|
30
|
+
emptyState: string;
|
|
31
|
+
emptyPrimary: string;
|
|
32
|
+
emptySecondary: string;
|
|
33
|
+
successState: string;
|
|
34
|
+
successTitle: string;
|
|
35
|
+
successSub: string;
|
|
36
|
+
summaryGrid: string;
|
|
37
|
+
summaryButton: string;
|
|
38
|
+
summaryButtonActive: (impact: SeverityThreshold) => string;
|
|
39
|
+
summaryCount: (impact: SeverityThreshold) => string;
|
|
40
|
+
summaryLabel: string;
|
|
41
|
+
section: string;
|
|
42
|
+
sectionTitle: (impact: SeverityThreshold) => string;
|
|
43
|
+
issueCard: string;
|
|
44
|
+
issueCardSelected: string;
|
|
45
|
+
issueRow: string;
|
|
46
|
+
issueMain: string;
|
|
47
|
+
issueTitleRow: string;
|
|
48
|
+
dot: (impact: SeverityThreshold) => string;
|
|
49
|
+
issueMessage: string;
|
|
50
|
+
selector: string;
|
|
51
|
+
issueAside: string;
|
|
52
|
+
helpLink: string;
|
|
53
|
+
disableRule: string;
|
|
54
|
+
tags: string;
|
|
55
|
+
tag: string;
|
|
56
|
+
settingsOverlay: string;
|
|
57
|
+
settingsHeader: string;
|
|
58
|
+
settingsTitle: string;
|
|
59
|
+
doneButton: string;
|
|
60
|
+
settingsContent: string;
|
|
61
|
+
settingsSection: string;
|
|
62
|
+
settingsRowStack: string;
|
|
63
|
+
settingsSectionLabel: string;
|
|
64
|
+
settingsRow: string;
|
|
65
|
+
settingsRowTitle: string;
|
|
66
|
+
settingsRowDesc: string;
|
|
67
|
+
select: string;
|
|
68
|
+
rulesHeaderRow: string;
|
|
69
|
+
rulesHeaderActions: string;
|
|
70
|
+
filtersRow: string;
|
|
71
|
+
search: string;
|
|
72
|
+
rulesList: string;
|
|
73
|
+
ruleRow: string;
|
|
74
|
+
ruleRowDisabled: string;
|
|
75
|
+
ruleRowBorder: string;
|
|
76
|
+
ruleCheckbox: string;
|
|
77
|
+
ruleInfo: string;
|
|
78
|
+
ruleTop: string;
|
|
79
|
+
ruleId: string;
|
|
80
|
+
ruleIdDisabled: string;
|
|
81
|
+
bpBadge: string;
|
|
82
|
+
ruleDesc: string;
|
|
83
|
+
catTagRow: string;
|
|
84
|
+
catTag: string;
|
|
85
|
+
}>;
|