@compa11y/core 0.1.0 → 0.1.3

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.
Files changed (61) hide show
  1. package/dist/announcer/index.cjs +1 -49
  2. package/dist/announcer/index.d.cts +1 -1
  3. package/dist/announcer/index.d.ts +1 -1
  4. package/dist/announcer/index.js +1 -4
  5. package/dist/aria/index.cjs +1 -24
  6. package/dist/aria/index.d.cts +1 -1
  7. package/dist/aria/index.d.ts +1 -1
  8. package/dist/aria/index.js +1 -3
  9. package/dist/chunk-7BL2ABLF.cjs +1 -0
  10. package/dist/chunk-AQ6HEUSD.cjs +1 -0
  11. package/dist/chunk-BAFKUMWA.js +1 -0
  12. package/dist/chunk-C3VZQUKG.js +1 -0
  13. package/dist/chunk-EM45V5TK.cjs +1 -0
  14. package/dist/chunk-KQUAJKTG.cjs +1 -0
  15. package/dist/chunk-OSJIG3A2.cjs +1 -0
  16. package/dist/chunk-RE4QIUWR.js +1 -0
  17. package/dist/chunk-TGXWODB3.js +1 -0
  18. package/dist/chunk-ZAQMM5TA.js +1 -0
  19. package/dist/focus/index.cjs +1 -53
  20. package/dist/focus/index.d.cts +1 -1
  21. package/dist/focus/index.d.ts +1 -1
  22. package/dist/focus/index.js +1 -4
  23. package/dist/index.cjs +2 -572
  24. package/dist/index.d.cts +4 -4
  25. package/dist/index.d.ts +4 -4
  26. package/dist/index.js +2 -342
  27. package/dist/keyboard/index.cjs +1 -28
  28. package/dist/keyboard/index.js +1 -3
  29. package/dist/{types-DDSPmE8m.d.ts → types-DpTUSAxr.d.cts} +1 -1
  30. package/dist/{types-DDSPmE8m.d.cts → types-DpTUSAxr.d.ts} +1 -1
  31. package/package.json +1 -1
  32. package/dist/announcer/index.cjs.map +0 -1
  33. package/dist/announcer/index.js.map +0 -1
  34. package/dist/aria/index.cjs.map +0 -1
  35. package/dist/aria/index.js.map +0 -1
  36. package/dist/chunk-24U5HHMC.js +0 -309
  37. package/dist/chunk-24U5HHMC.js.map +0 -1
  38. package/dist/chunk-2CQOLVQH.js +0 -147
  39. package/dist/chunk-2CQOLVQH.js.map +0 -1
  40. package/dist/chunk-2PUYKF2E.js +0 -631
  41. package/dist/chunk-2PUYKF2E.js.map +0 -1
  42. package/dist/chunk-2WF5Y6D7.js +0 -175
  43. package/dist/chunk-2WF5Y6D7.js.map +0 -1
  44. package/dist/chunk-CQXMBRLD.cjs +0 -657
  45. package/dist/chunk-CQXMBRLD.cjs.map +0 -1
  46. package/dist/chunk-HQOFVJFO.cjs +0 -181
  47. package/dist/chunk-HQOFVJFO.cjs.map +0 -1
  48. package/dist/chunk-NBGFFCIJ.cjs +0 -314
  49. package/dist/chunk-NBGFFCIJ.cjs.map +0 -1
  50. package/dist/chunk-V6TZIZZ4.cjs +0 -158
  51. package/dist/chunk-V6TZIZZ4.cjs.map +0 -1
  52. package/dist/chunk-XEGB27QF.cjs +0 -78
  53. package/dist/chunk-XEGB27QF.cjs.map +0 -1
  54. package/dist/chunk-Z7K2G6FX.js +0 -66
  55. package/dist/chunk-Z7K2G6FX.js.map +0 -1
  56. package/dist/focus/index.cjs.map +0 -1
  57. package/dist/focus/index.js.map +0 -1
  58. package/dist/index.cjs.map +0 -1
  59. package/dist/index.js.map +0 -1
  60. package/dist/keyboard/index.cjs.map +0 -1
  61. package/dist/keyboard/index.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,343 +1,3 @@
1
- export { FOCUSABLE_SELECTORS, TABBABLE_SELECTORS, containsFocus, createFocusScope, createFocusTrap, createRovingTabindex, focusWithVisibleRing, getActiveFocusTrap, getFirstFocusable, getFocusableElements, getLastFocusSource, getLastFocusable, getNextFocusable, getPreviousFocusable, getTabbableElements, hasFocusTrap, hasVisibleFocus, initFocusVisible, isFocusVisible, isFocusable, isTabbable, isVisible, isWithinContainer, resolveElement, setFocusVisible } from './chunk-2PUYKF2E.js';
2
- export { KeyboardPatterns, createKeyboardManager, createTypeAhead, getKeyCombo, normalizeKey } from './chunk-2WF5Y6D7.js';
3
- export { announce, announceAssertive, announceError, announcePolite, announceProgress, announceStatus, clearAnnouncements, createAnnouncer, initAnnouncer, queueAnnouncement } from './chunk-2CQOLVQH.js';
4
- export { createMediaQueryListener, getScreenReaderHints, isAndroid, isBrowser, isIOS, isMac, isTouchDevice, isWindows, prefersDarkMode, prefersHighContrast, prefersReducedMotion } from './chunk-Z7K2G6FX.js';
5
- import { hasAccessibleName } from './chunk-24U5HHMC.js';
6
- export { aria, buildAriaProps, hasAccessibleName, mergeAriaIds } from './chunk-24U5HHMC.js';
1
+ export{a as FOCUSABLE_SELECTORS,b as TABBABLE_SELECTORS,j as containsFocus,x as createFocusScope,o as createFocusTrap,y as createRovingTabindex,w as focusWithVisibleRing,p as getActiveFocusTrap,h as getFirstFocusable,f as getFocusableElements,u as getLastFocusSource,i as getLastFocusable,k as getNextFocusable,l as getPreviousFocusable,g as getTabbableElements,q as hasFocusTrap,t as hasVisibleFocus,r as initFocusVisible,s as isFocusVisible,d as isFocusable,e as isTabbable,c as isVisible,m as isWithinContainer,n as resolveElement,v as setFocusVisible}from'./chunk-BAFKUMWA.js';export{d as KeyboardPatterns,c as createKeyboardManager,e as createTypeAhead,b as getKeyCombo,a as normalizeKey}from'./chunk-RE4QIUWR.js';export{b as announce,d as announceAssertive,i as announceError,c as announcePolite,j as announceProgress,h as announceStatus,e as clearAnnouncements,g as createAnnouncer,a as initAnnouncer,f as queueAnnouncement}from'./chunk-ZAQMM5TA.js';export{k as createMediaQueryListener,j as getScreenReaderHints,d as isAndroid,a as isBrowser,c as isIOS,b as isMac,f as isTouchDevice,e as isWindows,i as prefersDarkMode,h as prefersHighContrast,g as prefersReducedMotion}from'./chunk-C3VZQUKG.js';import {d as d$1}from'./chunk-TGXWODB3.js';export{a as aria,b as buildAriaProps,d as hasAccessibleName,c as mergeAriaIds}from'./chunk-TGXWODB3.js';var g=0,d="compa11y";function u(e){let n=++g;return e?`${d}-${e}-${n}`:`${d}-${n}`}function he(e,n){let r=u(n),t={};for(let o of e)t[o]=`${r}-${o}`;return t}function ke(){g=0;}function $e(e){let n=u(e);return {id:n,generate:r=>`${n}-${r}`,generateMultiple:r=>{let t={};for(let o of r)t[o]=`${n}-${o}`;return t}}}var a=null,l=new Set;function p(){return typeof process<"u"&&process.env?.NODE_ENV!=="production"}function b(e){a=e;}function f(e){return `${e.component}:${e.message}`}function i(e){if(!p())return;let n=f(e);if(l.has(n))return;if(l.add(n),a){a(e);return}let r=`[compa11y/${e.component}]`,t=m(e.type),o=e.suggestion?`${e.message}
7
2
 
8
- // src/utils/id.ts
9
- var idCounter = 0;
10
- var PREFIX = "compa11y";
11
- function generateId(prefix) {
12
- const id = ++idCounter;
13
- return prefix ? `${PREFIX}-${prefix}-${id}` : `${PREFIX}-${id}`;
14
- }
15
- function generateIds(parts, prefix) {
16
- const baseId = generateId(prefix);
17
- const ids = {};
18
- for (const part of parts) {
19
- ids[part] = `${baseId}-${part}`;
20
- }
21
- return ids;
22
- }
23
- function resetIdCounter() {
24
- idCounter = 0;
25
- }
26
- function createIdScope(componentName) {
27
- const scopeId = generateId(componentName);
28
- return {
29
- id: scopeId,
30
- generate: (suffix) => `${scopeId}-${suffix}`,
31
- generateMultiple: (parts) => {
32
- const ids = {};
33
- for (const part of parts) {
34
- ids[part] = `${scopeId}-${part}`;
35
- }
36
- return ids;
37
- }
38
- };
39
- }
40
-
41
- // src/dev/warnings.ts
42
- var warningHandler = null;
43
- var issuedWarnings = /* @__PURE__ */ new Set();
44
- function isDev() {
45
- return typeof process !== "undefined" && process.env?.NODE_ENV !== "production";
46
- }
47
- function setWarningHandler(handler) {
48
- warningHandler = handler;
49
- }
50
- function createWarningKey(warning) {
51
- return `${warning.component}:${warning.message}`;
52
- }
53
- function warn(warning) {
54
- if (!isDev()) return;
55
- const key = createWarningKey(warning);
56
- if (issuedWarnings.has(key)) return;
57
- issuedWarnings.add(key);
58
- if (warningHandler) {
59
- warningHandler(warning);
60
- return;
61
- }
62
- const prefix = `[compa11y/${warning.component}]`;
63
- const style = getConsoleStyle(warning.type);
64
- const message = warning.suggestion ? `${warning.message}
65
-
66
- \u{1F4A1} Suggestion: ${warning.suggestion}` : warning.message;
67
- switch (warning.type) {
68
- case "error":
69
- console.error(`%c${prefix}%c ${message}`, style, "");
70
- break;
71
- case "warning":
72
- console.warn(`%c${prefix}%c ${message}`, style, "");
73
- break;
74
- case "info":
75
- console.info(`%c${prefix}%c ${message}`, style, "");
76
- break;
77
- }
78
- if (warning.element) {
79
- console.log("Element:", warning.element);
80
- }
81
- }
82
- function getConsoleStyle(type) {
83
- switch (type) {
84
- case "error":
85
- return "background: #ff5555; color: white; padding: 2px 4px; border-radius: 2px; font-weight: bold;";
86
- case "warning":
87
- return "background: #ffaa00; color: black; padding: 2px 4px; border-radius: 2px; font-weight: bold;";
88
- case "info":
89
- return "background: #5555ff; color: white; padding: 2px 4px; border-radius: 2px; font-weight: bold;";
90
- }
91
- }
92
- function clearWarnings() {
93
- issuedWarnings.clear();
94
- }
95
- var checks = {
96
- /**
97
- * Check for missing accessible label
98
- */
99
- accessibleLabel(element, component, propName = "aria-label") {
100
- if (!element) return;
101
- if (!hasAccessibleName(element)) {
102
- warn({
103
- type: "error",
104
- component,
105
- message: `Missing accessible label. Screen reader users will not be able to understand this element.`,
106
- suggestion: `Add ${propName}, aria-labelledby, or visible text content.`,
107
- element
108
- });
109
- }
110
- },
111
- /**
112
- * Check for missing required prop
113
- */
114
- requiredProp(value, propName, component) {
115
- if (value === void 0 || value === null || value === "") {
116
- warn({
117
- type: "error",
118
- component,
119
- message: `Missing required prop "${propName}".`,
120
- suggestion: `Provide a value for the "${propName}" prop.`
121
- });
122
- }
123
- },
124
- /**
125
- * Check for invalid ARIA role
126
- */
127
- validRole(role, component, element) {
128
- if (!role) return;
129
- const validRoles = /* @__PURE__ */ new Set([
130
- "alert",
131
- "alertdialog",
132
- "application",
133
- "article",
134
- "banner",
135
- "button",
136
- "cell",
137
- "checkbox",
138
- "columnheader",
139
- "combobox",
140
- "complementary",
141
- "contentinfo",
142
- "definition",
143
- "dialog",
144
- "directory",
145
- "document",
146
- "feed",
147
- "figure",
148
- "form",
149
- "grid",
150
- "gridcell",
151
- "group",
152
- "heading",
153
- "img",
154
- "link",
155
- "list",
156
- "listbox",
157
- "listitem",
158
- "log",
159
- "main",
160
- "marquee",
161
- "math",
162
- "menu",
163
- "menubar",
164
- "menuitem",
165
- "menuitemcheckbox",
166
- "menuitemradio",
167
- "navigation",
168
- "none",
169
- "note",
170
- "option",
171
- "presentation",
172
- "progressbar",
173
- "radio",
174
- "radiogroup",
175
- "region",
176
- "row",
177
- "rowgroup",
178
- "rowheader",
179
- "scrollbar",
180
- "search",
181
- "searchbox",
182
- "separator",
183
- "slider",
184
- "spinbutton",
185
- "status",
186
- "switch",
187
- "tab",
188
- "table",
189
- "tablist",
190
- "tabpanel",
191
- "term",
192
- "textbox",
193
- "timer",
194
- "toolbar",
195
- "tooltip",
196
- "tree",
197
- "treegrid",
198
- "treeitem"
199
- ]);
200
- if (!validRoles.has(role)) {
201
- warn({
202
- type: "warning",
203
- component,
204
- message: `Invalid ARIA role "${role}".`,
205
- suggestion: "Use a valid ARIA role from the WAI-ARIA specification.",
206
- element
207
- });
208
- }
209
- },
210
- /**
211
- * Check for interactive element without keyboard support
212
- */
213
- keyboardAccessible(element, component, handlers) {
214
- if (!element) return;
215
- if (handlers.onClick && !handlers.onKeyDown) {
216
- const tagName = element.tagName.toLowerCase();
217
- const role = element.getAttribute("role");
218
- if (["button", "a", "input", "select", "textarea"].includes(tagName)) {
219
- return;
220
- }
221
- const interactiveRoles = ["button", "link", "menuitem", "option", "tab"];
222
- if (role && interactiveRoles.includes(role)) {
223
- warn({
224
- type: "warning",
225
- component,
226
- message: `Element has onClick but no onKeyDown handler.`,
227
- suggestion: "Add keyboard event handling for Enter and Space keys.",
228
- element
229
- });
230
- }
231
- }
232
- },
233
- /**
234
- * Check tabIndex usage
235
- */
236
- tabIndex(tabIndex, component, element) {
237
- if (tabIndex === void 0) return;
238
- if (tabIndex > 0) {
239
- warn({
240
- type: "warning",
241
- component,
242
- message: `Positive tabIndex (${tabIndex}) disrupts natural tab order.`,
243
- suggestion: "Use tabIndex={0} or tabIndex={-1} instead. Rely on DOM order for tab sequence.",
244
- element
245
- });
246
- }
247
- },
248
- /**
249
- * Check for autofocus in dialogs
250
- */
251
- dialogAutoFocus(hasAutoFocus, component) {
252
- if (!hasAutoFocus) {
253
- warn({
254
- type: "info",
255
- component,
256
- message: "No initial focus element specified for dialog.",
257
- suggestion: "Consider setting initialFocus to guide keyboard users."
258
- });
259
- }
260
- },
261
- /**
262
- * Check for missing form labels
263
- */
264
- formLabel(inputElement, labelId, component) {
265
- if (!inputElement) return;
266
- const hasLabel = labelId || inputElement.getAttribute("aria-label") || inputElement.getAttribute("aria-labelledby") || inputElement.labels?.length;
267
- if (!hasLabel) {
268
- warn({
269
- type: "error",
270
- component,
271
- message: "Form input is missing an accessible label.",
272
- suggestion: "Add a <label>, aria-label, or aria-labelledby.",
273
- element: inputElement
274
- });
275
- }
276
- },
277
- /**
278
- * Check for missing alt text on images
279
- */
280
- imageAlt(element, component) {
281
- if (!element || element.tagName !== "IMG") return;
282
- const alt = element.getAttribute("alt");
283
- const role = element.getAttribute("role");
284
- if (alt === null && role !== "presentation" && role !== "none") {
285
- warn({
286
- type: "error",
287
- component,
288
- message: "Image is missing alt attribute.",
289
- suggestion: 'Add alt="" for decorative images or descriptive alt text for meaningful images.',
290
- element
291
- });
292
- }
293
- }
294
- };
295
- function createComponentWarnings(componentName) {
296
- return {
297
- error: (message, suggestion, element) => warn({
298
- type: "error",
299
- component: componentName,
300
- message,
301
- suggestion,
302
- element
303
- }),
304
- warning: (message, suggestion, element) => warn({
305
- type: "warning",
306
- component: componentName,
307
- message,
308
- suggestion,
309
- element
310
- }),
311
- info: (message, suggestion, element) => warn({
312
- type: "info",
313
- component: componentName,
314
- message,
315
- suggestion,
316
- element
317
- }),
318
- checks: {
319
- accessibleLabel: (element, propName) => checks.accessibleLabel(element, componentName, propName),
320
- requiredProp: (value, propName) => checks.requiredProp(value, propName, componentName),
321
- keyboardAccessible: (element, handlers) => checks.keyboardAccessible(element, componentName, handlers),
322
- tabIndex: (tabIndex, element) => checks.tabIndex(tabIndex, componentName, element)
323
- }
324
- };
325
- }
326
-
327
- // src/index.ts
328
- function initA11yKit() {
329
- const cleanups = [];
330
- import('./focus/index.js').then(({ initFocusVisible: initFocusVisible2 }) => {
331
- cleanups.push(initFocusVisible2());
332
- });
333
- import('./announcer/index.js').then(({ initAnnouncer: initAnnouncer2 }) => {
334
- cleanups.push(initAnnouncer2());
335
- });
336
- return () => {
337
- cleanups.forEach((cleanup) => cleanup());
338
- };
339
- }
340
-
341
- export { checks, clearWarnings, createComponentWarnings, createIdScope, generateId, generateIds, initA11yKit, resetIdCounter, setWarningHandler, warn };
342
- //# sourceMappingURL=index.js.map
343
- //# sourceMappingURL=index.js.map
3
+ \u{1F4A1} Suggestion: ${e.suggestion}`:e.message;switch(e.type){case "error":console.error(`%c${r}%c ${o}`,t,"");break;case "warning":console.warn(`%c${r}%c ${o}`,t,"");break;case "info":console.info(`%c${r}%c ${o}`,t,"");break}e.element&&console.log("Element:",e.element);}function m(e){switch(e){case "error":return "background: #ff5555; color: white; padding: 2px 4px; border-radius: 2px; font-weight: bold;";case "warning":return "background: #ffaa00; color: black; padding: 2px 4px; border-radius: 2px; font-weight: bold;";case "info":return "background: #5555ff; color: white; padding: 2px 4px; border-radius: 2px; font-weight: bold;"}}function x(){l.clear();}var s={accessibleLabel(e,n,r="aria-label"){e&&(d$1(e)||i({type:"error",component:n,message:"Missing accessible label. Screen reader users will not be able to understand this element.",suggestion:`Add ${r}, aria-labelledby, or visible text content.`,element:e}));},requiredProp(e,n,r){(e==null||e==="")&&i({type:"error",component:r,message:`Missing required prop "${n}".`,suggestion:`Provide a value for the "${n}" prop.`});},validRole(e,n,r){if(!e)return;new Set(["alert","alertdialog","application","article","banner","button","cell","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","navigation","none","note","option","presentation","progressbar","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"]).has(e)||i({type:"warning",component:n,message:`Invalid ARIA role "${e}".`,suggestion:"Use a valid ARIA role from the WAI-ARIA specification.",element:r});},keyboardAccessible(e,n,r){if(e&&r.onClick&&!r.onKeyDown){let t=e.tagName.toLowerCase(),o=e.getAttribute("role");if(["button","a","input","select","textarea"].includes(t))return;o&&["button","link","menuitem","option","tab"].includes(o)&&i({type:"warning",component:n,message:"Element has onClick but no onKeyDown handler.",suggestion:"Add keyboard event handling for Enter and Space keys.",element:e});}},tabIndex(e,n,r){e!==void 0&&e>0&&i({type:"warning",component:n,message:`Positive tabIndex (${e}) disrupts natural tab order.`,suggestion:"Use tabIndex={0} or tabIndex={-1} instead. Rely on DOM order for tab sequence.",element:r});},dialogAutoFocus(e,n){e||i({type:"info",component:n,message:"No initial focus element specified for dialog.",suggestion:"Consider setting initialFocus to guide keyboard users."});},formLabel(e,n,r){if(!e)return;n||e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||e.labels?.length||i({type:"error",component:r,message:"Form input is missing an accessible label.",suggestion:"Add a <label>, aria-label, or aria-labelledby.",element:e});},imageAlt(e,n){if(!e||e.tagName!=="IMG")return;let r=e.getAttribute("alt"),t=e.getAttribute("role");r===null&&t!=="presentation"&&t!=="none"&&i({type:"error",component:n,message:"Image is missing alt attribute.",suggestion:'Add alt="" for decorative images or descriptive alt text for meaningful images.',element:e});}};function y(e){return {error:(n,r,t)=>i({type:"error",component:e,message:n,suggestion:r,element:t}),warning:(n,r,t)=>i({type:"warning",component:e,message:n,suggestion:r,element:t}),info:(n,r,t)=>i({type:"info",component:e,message:n,suggestion:r,element:t}),checks:{accessibleLabel:(n,r)=>s.accessibleLabel(n,e,r),requiredProp:(n,r)=>s.requiredProp(n,r,e),keyboardAccessible:(n,r)=>s.keyboardAccessible(n,e,r),tabIndex:(n,r)=>s.tabIndex(n,e,r)}}}function Ee(){let e=[];return import('./focus/index.js').then(({initFocusVisible:n})=>{e.push(n());}),import('./announcer/index.js').then(({initAnnouncer:n})=>{e.push(n());}),()=>{e.forEach(n=>n());}}export{s as checks,x as clearWarnings,y as createComponentWarnings,$e as createIdScope,u as generateId,he as generateIds,Ee as initCompa11y,ke as resetIdCounter,b as setWarningHandler,i as warn};
@@ -1,28 +1 @@
1
- 'use strict';
2
-
3
- var chunkHQOFVJFO_cjs = require('../chunk-HQOFVJFO.cjs');
4
-
5
-
6
-
7
- Object.defineProperty(exports, "KeyboardPatterns", {
8
- enumerable: true,
9
- get: function () { return chunkHQOFVJFO_cjs.KeyboardPatterns; }
10
- });
11
- Object.defineProperty(exports, "createKeyboardManager", {
12
- enumerable: true,
13
- get: function () { return chunkHQOFVJFO_cjs.createKeyboardManager; }
14
- });
15
- Object.defineProperty(exports, "createTypeAhead", {
16
- enumerable: true,
17
- get: function () { return chunkHQOFVJFO_cjs.createTypeAhead; }
18
- });
19
- Object.defineProperty(exports, "getKeyCombo", {
20
- enumerable: true,
21
- get: function () { return chunkHQOFVJFO_cjs.getKeyCombo; }
22
- });
23
- Object.defineProperty(exports, "normalizeKey", {
24
- enumerable: true,
25
- get: function () { return chunkHQOFVJFO_cjs.normalizeKey; }
26
- });
27
- //# sourceMappingURL=index.cjs.map
28
- //# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunkEM45V5TK_cjs=require('../chunk-EM45V5TK.cjs');Object.defineProperty(exports,"KeyboardPatterns",{enumerable:true,get:function(){return chunkEM45V5TK_cjs.d}});Object.defineProperty(exports,"createKeyboardManager",{enumerable:true,get:function(){return chunkEM45V5TK_cjs.c}});Object.defineProperty(exports,"createTypeAhead",{enumerable:true,get:function(){return chunkEM45V5TK_cjs.e}});Object.defineProperty(exports,"getKeyCombo",{enumerable:true,get:function(){return chunkEM45V5TK_cjs.b}});Object.defineProperty(exports,"normalizeKey",{enumerable:true,get:function(){return chunkEM45V5TK_cjs.a}});
@@ -1,3 +1 @@
1
- export { KeyboardPatterns, createKeyboardManager, createTypeAhead, getKeyCombo, normalizeKey } from '../chunk-2WF5Y6D7.js';
2
- //# sourceMappingURL=index.js.map
3
- //# sourceMappingURL=index.js.map
1
+ export{d as KeyboardPatterns,c as createKeyboardManager,e as createTypeAhead,b as getKeyCombo,a as normalizeKey}from'../chunk-RE4QIUWR.js';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Core types used across compa11y
3
3
  */
4
- type AriaRole = 'alert' | 'alertdialog' | 'application' | 'article' | 'banner' | 'button' | 'cell' | 'checkbox' | 'columnheader' | 'combobox' | 'complementary' | 'contentinfo' | 'definition' | 'dialog' | 'directory' | 'document' | 'feed' | 'figure' | 'form' | 'grid' | 'gridcell' | 'group' | 'heading' | 'img' | 'link' | 'list' | 'listbox' | 'listitem' | 'log' | 'main' | 'marquee' | 'math' | 'menu' | 'menubar' | 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'navigation' | 'none' | 'note' | 'option' | 'presentation' | 'progressbar' | 'radio' | 'radiogroup' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'scrollbar' | 'search' | 'searchbox' | 'separator' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'table' | 'tablist' | 'tabpanel' | 'term' | 'textbox' | 'timer' | 'toolbar' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem';
4
+ type AriaRole = 'alert' | 'alertdialog' | 'application' | 'article' | 'banner' | 'button' | 'cell' | 'columnheader' | 'combobox' | 'complementary' | 'contentinfo' | 'definition' | 'dialog' | 'directory' | 'document' | 'feed' | 'figure' | 'form' | 'grid' | 'gridcell' | 'group' | 'heading' | 'img' | 'link' | 'list' | 'listbox' | 'listitem' | 'log' | 'main' | 'marquee' | 'math' | 'menu' | 'menubar' | 'menuitem' | 'menuitemradio' | 'navigation' | 'none' | 'note' | 'option' | 'presentation' | 'progressbar' | 'radio' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'scrollbar' | 'search' | 'searchbox' | 'separator' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'table' | 'tablist' | 'tabpanel' | 'term' | 'textbox' | 'timer' | 'toolbar' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem';
5
5
  type AriaLivePoliteness = 'off' | 'polite' | 'assertive';
6
6
  interface FocusableElement extends HTMLElement {
7
7
  focus(options?: FocusOptions): void;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Core types used across compa11y
3
3
  */
4
- type AriaRole = 'alert' | 'alertdialog' | 'application' | 'article' | 'banner' | 'button' | 'cell' | 'checkbox' | 'columnheader' | 'combobox' | 'complementary' | 'contentinfo' | 'definition' | 'dialog' | 'directory' | 'document' | 'feed' | 'figure' | 'form' | 'grid' | 'gridcell' | 'group' | 'heading' | 'img' | 'link' | 'list' | 'listbox' | 'listitem' | 'log' | 'main' | 'marquee' | 'math' | 'menu' | 'menubar' | 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'navigation' | 'none' | 'note' | 'option' | 'presentation' | 'progressbar' | 'radio' | 'radiogroup' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'scrollbar' | 'search' | 'searchbox' | 'separator' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'table' | 'tablist' | 'tabpanel' | 'term' | 'textbox' | 'timer' | 'toolbar' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem';
4
+ type AriaRole = 'alert' | 'alertdialog' | 'application' | 'article' | 'banner' | 'button' | 'cell' | 'columnheader' | 'combobox' | 'complementary' | 'contentinfo' | 'definition' | 'dialog' | 'directory' | 'document' | 'feed' | 'figure' | 'form' | 'grid' | 'gridcell' | 'group' | 'heading' | 'img' | 'link' | 'list' | 'listbox' | 'listitem' | 'log' | 'main' | 'marquee' | 'math' | 'menu' | 'menubar' | 'menuitem' | 'menuitemradio' | 'navigation' | 'none' | 'note' | 'option' | 'presentation' | 'progressbar' | 'radio' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'scrollbar' | 'search' | 'searchbox' | 'separator' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'table' | 'tablist' | 'tabpanel' | 'term' | 'textbox' | 'timer' | 'toolbar' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem';
5
5
  type AriaLivePoliteness = 'off' | 'polite' | 'assertive';
6
6
  interface FocusableElement extends HTMLElement {
7
7
  focus(options?: FocusOptions): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compa11y/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "Framework-agnostic accessibility primitives",
5
5
  "author": "Ivan Trajkovski",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}