@omnitron-dev/prism 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/README.md +44 -0
- package/bin/prism.js +13 -0
- package/dist/accessibility/index.d.ts +157 -0
- package/dist/accessibility/index.js +186 -0
- package/dist/accessibility/index.js.map +1 -0
- package/dist/blocks/index.d.ts +1239 -0
- package/dist/blocks/index.js +1712 -0
- package/dist/blocks/index.js.map +1 -0
- package/dist/chunk-77KIJLPP.js +37 -0
- package/dist/chunk-77KIJLPP.js.map +1 -0
- package/dist/chunk-BTIT7WYH.js +339 -0
- package/dist/chunk-BTIT7WYH.js.map +1 -0
- package/dist/chunk-BV32OJ2A.js +1409 -0
- package/dist/chunk-BV32OJ2A.js.map +1 -0
- package/dist/chunk-DDY7TLUI.js +139 -0
- package/dist/chunk-DDY7TLUI.js.map +1 -0
- package/dist/chunk-DXXZ3ITR.js +4227 -0
- package/dist/chunk-DXXZ3ITR.js.map +1 -0
- package/dist/chunk-E3XANPTO.js +2319 -0
- package/dist/chunk-E3XANPTO.js.map +1 -0
- package/dist/chunk-FU52GL2E.js +3 -0
- package/dist/chunk-FU52GL2E.js.map +1 -0
- package/dist/chunk-GYDT5EKX.js +16505 -0
- package/dist/chunk-GYDT5EKX.js.map +1 -0
- package/dist/chunk-HO2GKTWJ.js +28 -0
- package/dist/chunk-HO2GKTWJ.js.map +1 -0
- package/dist/chunk-JDTC2SBY.js +140 -0
- package/dist/chunk-JDTC2SBY.js.map +1 -0
- package/dist/chunk-JNU4QHJK.js +6 -0
- package/dist/chunk-JNU4QHJK.js.map +1 -0
- package/dist/chunk-LAEY5USO.js +2621 -0
- package/dist/chunk-LAEY5USO.js.map +1 -0
- package/dist/chunk-UR6X3W5I.js +530 -0
- package/dist/chunk-UR6X3W5I.js.map +1 -0
- package/dist/chunk-WC2WM2JD.js +883 -0
- package/dist/chunk-WC2WM2JD.js.map +1 -0
- package/dist/chunk-XWL6J6IO.js +40 -0
- package/dist/chunk-XWL6J6IO.js.map +1 -0
- package/dist/cli/index.js +2695 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config-BA6IeTq9.d.ts +100 -0
- package/dist/core/index.d.ts +454 -0
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -0
- package/dist/forms/index.d.ts +562 -0
- package/dist/forms/index.js +545 -0
- package/dist/forms/index.js.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.js +10 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/http/index.d.ts +233 -0
- package/dist/http/index.js +282 -0
- package/dist/http/index.js.map +1 -0
- package/dist/index-odhPSv9I.d.ts +2491 -0
- package/dist/index.css +131 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +9109 -0
- package/dist/index.js +13280 -0
- package/dist/index.js.map +1 -0
- package/dist/layouts/index.d.ts +854 -0
- package/dist/layouts/index.js +6 -0
- package/dist/layouts/index.js.map +1 -0
- package/dist/netron/index.d.ts +4 -0
- package/dist/netron/index.js +4 -0
- package/dist/netron/index.js.map +1 -0
- package/dist/registry/index.d.ts +352 -0
- package/dist/registry/index.js +4 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry-BrDNftd5.d.ts +574 -0
- package/dist/settings-plpR26Xk.d.ts +455 -0
- package/dist/state/index.d.ts +981 -0
- package/dist/state/index.js +5 -0
- package/dist/state/index.js.map +1 -0
- package/dist/theme/index.d.ts +1049 -0
- package/dist/theme/index.js +5 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme-CrXLfP1c.d.ts +389 -0
- package/dist/types/index.d.ts +146 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/use-timeout-D7U3EAtH.d.ts +808 -0
- package/package.json +194 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useState, useCallback, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
function useBoolean(defaultValue = false) {
|
|
4
|
+
const [value, setValue] = useState(defaultValue);
|
|
5
|
+
const onTrue = useCallback(() => {
|
|
6
|
+
setValue(true);
|
|
7
|
+
}, []);
|
|
8
|
+
const onFalse = useCallback(() => {
|
|
9
|
+
setValue(false);
|
|
10
|
+
}, []);
|
|
11
|
+
const onToggle = useCallback(() => {
|
|
12
|
+
setValue((prev) => !prev);
|
|
13
|
+
}, []);
|
|
14
|
+
return useMemo(
|
|
15
|
+
() => ({
|
|
16
|
+
value,
|
|
17
|
+
onTrue,
|
|
18
|
+
onFalse,
|
|
19
|
+
onToggle,
|
|
20
|
+
setValue
|
|
21
|
+
}),
|
|
22
|
+
[value, onTrue, onFalse, onToggle]
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { useBoolean };
|
|
27
|
+
//# sourceMappingURL=chunk-HO2GKTWJ.js.map
|
|
28
|
+
//# sourceMappingURL=chunk-HO2GKTWJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/hooks/use-boolean.ts"],"names":[],"mappings":";;AAiEO,SAAS,UAAA,CAAW,eAAe,KAAA,EAAyB;AACjE,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAAS,YAAY,CAAA;AAE/C,EAAA,MAAM,MAAA,GAAS,YAAY,MAAM;AAC/B,IAAA,QAAA,CAAS,IAAI,CAAA;AAAA,EACf,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,MAAM,OAAA,GAAU,YAAY,MAAM;AAChC,IAAA,QAAA,CAAS,KAAK,CAAA;AAAA,EAChB,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,MAAM,QAAA,GAAW,YAAY,MAAM;AACjC,IAAA,QAAA,CAAS,CAAC,IAAA,KAAS,CAAC,IAAI,CAAA;AAAA,EAC1B,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,OAAO,OAAA;AAAA,IACL,OAAO;AAAA,MACL,KAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA;AAAA,KACF,CAAA;AAAA,IACA,CAAC,KAAA,EAAO,MAAA,EAAQ,OAAA,EAAS,QAAQ;AAAA,GACnC;AACF","file":"chunk-HO2GKTWJ.js","sourcesContent":["'use client';\n\n/**\n * useBoolean Hook\n *\n * A hook for managing boolean state with convenient toggle methods.\n *\n * @module @omnitron-dev/prism/core/hooks/use-boolean\n */\n\nimport { useState, useCallback, useMemo } from 'react';\n\n/**\n * Return type for useBoolean hook.\n */\nexport interface UseBooleanReturn {\n /** Current boolean value */\n value: boolean;\n /** Set value to true */\n onTrue: () => void;\n /** Set value to false */\n onFalse: () => void;\n /** Toggle the value */\n onToggle: () => void;\n /** Set to specific value */\n setValue: (value: boolean) => void;\n}\n\n/**\n * Hook for managing boolean state with convenient toggle methods.\n *\n * @param defaultValue - Initial boolean value (default: false)\n * @returns Boolean state and control methods\n *\n * @example\n * ```tsx\n * function Modal() {\n * const dialog = useBoolean();\n *\n * return (\n * <>\n * <Button onClick={dialog.onTrue}>Open</Button>\n * <Dialog open={dialog.value} onClose={dialog.onFalse}>\n * <DialogContent>...</DialogContent>\n * </Dialog>\n * </>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * function Sidebar() {\n * const { value: isCollapsed, onToggle } = useBoolean(false);\n *\n * return (\n * <nav style={{ width: isCollapsed ? 64 : 240 }}>\n * <IconButton onClick={onToggle}>\n * {isCollapsed ? <MenuIcon /> : <CloseIcon />}\n * </IconButton>\n * </nav>\n * );\n * }\n * ```\n */\nexport function useBoolean(defaultValue = false): UseBooleanReturn {\n const [value, setValue] = useState(defaultValue);\n\n const onTrue = useCallback(() => {\n setValue(true);\n }, []);\n\n const onFalse = useCallback(() => {\n setValue(false);\n }, []);\n\n const onToggle = useCallback(() => {\n setValue((prev) => !prev);\n }, []);\n\n return useMemo(\n () => ({\n value,\n onTrue,\n onFalse,\n onToggle,\n setValue,\n }),\n [value, onTrue, onFalse, onToggle]\n );\n}\n"]}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import Box from '@mui/material/Box';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
function SkipLink({ href, children, sx }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
Box,
|
|
7
|
+
{
|
|
8
|
+
component: "a",
|
|
9
|
+
href,
|
|
10
|
+
sx: [
|
|
11
|
+
(theme) => ({
|
|
12
|
+
position: "absolute",
|
|
13
|
+
top: "-100%",
|
|
14
|
+
left: 0,
|
|
15
|
+
right: 0,
|
|
16
|
+
zIndex: theme.zIndex.tooltip + 1,
|
|
17
|
+
padding: theme.spacing(1, 2),
|
|
18
|
+
backgroundColor: theme.palette.primary.main,
|
|
19
|
+
color: theme.palette.primary.contrastText,
|
|
20
|
+
textAlign: "center",
|
|
21
|
+
textDecoration: "none",
|
|
22
|
+
fontWeight: theme.typography.fontWeightMedium,
|
|
23
|
+
fontSize: theme.typography.body2.fontSize,
|
|
24
|
+
// Show on focus
|
|
25
|
+
"&:focus": {
|
|
26
|
+
top: 0,
|
|
27
|
+
outline: `2px solid ${theme.palette.primary.dark}`,
|
|
28
|
+
outlineOffset: 2
|
|
29
|
+
}
|
|
30
|
+
}),
|
|
31
|
+
...Array.isArray(sx) ? sx : [sx]
|
|
32
|
+
],
|
|
33
|
+
children
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// src/core/accessibility/index.ts
|
|
39
|
+
function generateAriaId(prefix) {
|
|
40
|
+
return `${prefix}-${Math.random().toString(36).slice(2, 9)}`;
|
|
41
|
+
}
|
|
42
|
+
function combineAriaDescribedBy(...ids) {
|
|
43
|
+
const validIds = ids.filter(Boolean);
|
|
44
|
+
return validIds.length > 0 ? validIds.join(" ") : void 0;
|
|
45
|
+
}
|
|
46
|
+
var srOnly = {
|
|
47
|
+
position: "absolute",
|
|
48
|
+
width: "1px",
|
|
49
|
+
height: "1px",
|
|
50
|
+
padding: 0,
|
|
51
|
+
margin: "-1px",
|
|
52
|
+
overflow: "hidden",
|
|
53
|
+
clip: "rect(0, 0, 0, 0)",
|
|
54
|
+
whiteSpace: "nowrap",
|
|
55
|
+
border: 0
|
|
56
|
+
};
|
|
57
|
+
var focusVisibleStyles = (theme) => ({
|
|
58
|
+
"&:focus-visible": {
|
|
59
|
+
outline: `2px solid ${theme.palette.primary.main}`,
|
|
60
|
+
outlineOffset: 2
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
function handleListKeyDown(event, options) {
|
|
64
|
+
const { items, currentIndex, onSelect, orientation = "vertical" } = options;
|
|
65
|
+
const nextKey = orientation === "vertical" ? "ArrowDown" : "ArrowRight";
|
|
66
|
+
const prevKey = orientation === "vertical" ? "ArrowUp" : "ArrowLeft";
|
|
67
|
+
let newIndex;
|
|
68
|
+
switch (event.key) {
|
|
69
|
+
case nextKey:
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
newIndex = Math.min(currentIndex + 1, items.length - 1);
|
|
72
|
+
break;
|
|
73
|
+
case prevKey:
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
newIndex = Math.max(currentIndex - 1, 0);
|
|
76
|
+
break;
|
|
77
|
+
case "Home":
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
newIndex = 0;
|
|
80
|
+
break;
|
|
81
|
+
case "End":
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
newIndex = items.length - 1;
|
|
84
|
+
break;
|
|
85
|
+
case "Enter":
|
|
86
|
+
case " ":
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
onSelect?.(currentIndex);
|
|
89
|
+
return;
|
|
90
|
+
default:
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (newIndex !== currentIndex && items[newIndex]) {
|
|
94
|
+
items[newIndex].focus();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
var ARIA_LABELS = {
|
|
98
|
+
/** Main navigation */
|
|
99
|
+
mainNav: "Main navigation",
|
|
100
|
+
/** Secondary navigation */
|
|
101
|
+
secondaryNav: "Secondary navigation",
|
|
102
|
+
/** Search */
|
|
103
|
+
search: "Search",
|
|
104
|
+
/** Main content */
|
|
105
|
+
main: "Main content",
|
|
106
|
+
/** Header */
|
|
107
|
+
header: "Header",
|
|
108
|
+
/** Footer */
|
|
109
|
+
footer: "Footer",
|
|
110
|
+
/** Sidebar */
|
|
111
|
+
sidebar: "Sidebar",
|
|
112
|
+
/** Breadcrumb navigation */
|
|
113
|
+
breadcrumb: "Breadcrumb navigation",
|
|
114
|
+
/** User menu */
|
|
115
|
+
userMenu: "User menu",
|
|
116
|
+
/** Settings */
|
|
117
|
+
settings: "Settings"
|
|
118
|
+
};
|
|
119
|
+
function getAriaExpanded(expanded, controlsId) {
|
|
120
|
+
return {
|
|
121
|
+
"aria-expanded": expanded,
|
|
122
|
+
...controlsId && { "aria-controls": controlsId }
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function announceToScreenReader(message, priority = "polite") {
|
|
126
|
+
const announcement = document.createElement("div");
|
|
127
|
+
announcement.setAttribute("role", "status");
|
|
128
|
+
announcement.setAttribute("aria-live", priority);
|
|
129
|
+
announcement.setAttribute("aria-atomic", "true");
|
|
130
|
+
Object.assign(announcement.style, srOnly);
|
|
131
|
+
announcement.textContent = message;
|
|
132
|
+
document.body.appendChild(announcement);
|
|
133
|
+
setTimeout(() => {
|
|
134
|
+
document.body.removeChild(announcement);
|
|
135
|
+
}, 1e3);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export { ARIA_LABELS, SkipLink, announceToScreenReader, combineAriaDescribedBy, focusVisibleStyles, generateAriaId, getAriaExpanded, handleListKeyDown, srOnly };
|
|
139
|
+
//# sourceMappingURL=chunk-JDTC2SBY.js.map
|
|
140
|
+
//# sourceMappingURL=chunk-JDTC2SBY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/accessibility/skip-link.tsx","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ACL,eAAA,EAAiB,QAAA;AAAA,IACjB,GAAI,UAAA,IAAc,EAAE,eAAA,EAAiB,UAAA;AAAW,GAClD;AACF;AASO,SAAS,sBAAA,CAAuB,OAAA,EAAiB,QAAA,GAAmC,QAAA,EAAgB;AACzG,EAAA,MAAM,YAAA,GAAe,QAAA,CAAS,aAAA,CAAc,KAAK,CAAA;AACjD,EAAA,YAAA,CAAa,YAAA,CAAa,QAAQ,QAAQ,CAAA;AAC1C,EAAA,YAAA,CAAa,YAAA,CAAa,aAAa,QAAQ,CAAA;AAC/C,EAAA,YAAA,CAAa,YAAA,CAAa,eAAe,MAAM,CAAA;AAC/C,EAAA,MAAA,CAAO,MAAA,CAAO,YAAA,CAAa,KAAA,EAAO,MAAM,CAAA;AACxC,EAAA,YAAA,CAAa,WAAA,GAAc,OAAA;AAE3B,EAAA,QAAA,CAAS,IAAA,CAAK,YAAY,YAAY,CAAA;AAGtC,EAAA,UAAA,CAAW,MAAM;AACf,IAAA,QAAA,CAAS,IAAA,CAAK,YAAY,YAAY,CAAA;AAAA,EACxC,GAAG,GAAI,CAAA;AACT","file":"chunk-JDTC2SBY.js","sourcesContent":["/**\n * Skip Link Component\n *\n * Provides keyboard users a way to skip navigation and jump to main content.\n *\n * @module @omnitron-dev/prism/core/accessibility/skip-link\n */\n\nimport type { ReactNode } from 'react';\nimport Box from '@mui/material/Box';\nimport type { SxProps, Theme } from '@mui/material';\n\n/**\n * Props for SkipLink component.\n */\nexport interface SkipLinkProps {\n /** Target element ID to skip to */\n href: string;\n /** Link content (typically \"Skip to main content\") */\n children: ReactNode;\n /** MUI sx prop */\n sx?: SxProps<Theme>;\n}\n\n/**\n * Skip link that is visually hidden until focused.\n * Allows keyboard users to skip navigation and jump to main content.\n *\n * @example\n * ```tsx\n * <SkipLink href=\"#main-content\">Skip to main content</SkipLink>\n * ```\n */\nexport function SkipLink({ href, children, sx }: SkipLinkProps): ReactNode {\n return (\n <Box\n component=\"a\"\n href={href}\n sx={[\n (theme) => ({\n position: 'absolute',\n top: '-100%',\n left: 0,\n right: 0,\n zIndex: theme.zIndex.tooltip + 1,\n padding: theme.spacing(1, 2),\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n textAlign: 'center',\n textDecoration: 'none',\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.body2.fontSize,\n // Show on focus\n '&:focus': {\n top: 0,\n outline: `2px solid ${theme.palette.primary.dark}`,\n outlineOffset: 2,\n },\n }),\n ...(Array.isArray(sx) ? sx : [sx]),\n ]}\n >\n {children}\n </Box>\n );\n}\n","/**\n * Accessibility Utilities\n *\n * WCAG 2.1 compliant accessibility components and utilities.\n *\n * @module @omnitron-dev/prism/core/accessibility\n */\n\nexport { SkipLink } from './skip-link.js';\nexport type { SkipLinkProps } from './skip-link.js';\n\n// =============================================================================\n// ARIA HELPERS\n// =============================================================================\n\n/**\n * Generate ID for accessibility references.\n */\nexport function generateAriaId(prefix: string): string {\n return `${prefix}-${Math.random().toString(36).slice(2, 9)}`;\n}\n\n/**\n * Combine multiple aria-describedby values.\n */\nexport function combineAriaDescribedBy(...ids: (string | undefined)[]): string | undefined {\n const validIds = ids.filter(Boolean);\n return validIds.length > 0 ? validIds.join(' ') : undefined;\n}\n\n/**\n * Screen reader only styles (visually hidden but accessible).\n */\nexport const srOnly = {\n position: 'absolute' as const,\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap' as const,\n border: 0,\n};\n\n/**\n * Focus visible styles for keyboard navigation.\n */\nexport const focusVisibleStyles = (theme: { palette: { primary: { main: string } } }) => ({\n '&:focus-visible': {\n outline: `2px solid ${theme.palette.primary.main}`,\n outlineOffset: 2,\n },\n});\n\n// =============================================================================\n// KEYBOARD NAVIGATION HELPERS\n// =============================================================================\n\n/**\n * Handle keyboard navigation for list items.\n */\nexport function handleListKeyDown(\n event: React.KeyboardEvent,\n options: {\n items: HTMLElement[];\n currentIndex: number;\n onSelect?: (index: number) => void;\n orientation?: 'vertical' | 'horizontal';\n }\n): void {\n const { items, currentIndex, onSelect, orientation = 'vertical' } = options;\n\n const nextKey = orientation === 'vertical' ? 'ArrowDown' : 'ArrowRight';\n const prevKey = orientation === 'vertical' ? 'ArrowUp' : 'ArrowLeft';\n\n let newIndex: number;\n\n switch (event.key) {\n case nextKey:\n event.preventDefault();\n newIndex = Math.min(currentIndex + 1, items.length - 1);\n break;\n case prevKey:\n event.preventDefault();\n newIndex = Math.max(currentIndex - 1, 0);\n break;\n case 'Home':\n event.preventDefault();\n newIndex = 0;\n break;\n case 'End':\n event.preventDefault();\n newIndex = items.length - 1;\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n onSelect?.(currentIndex);\n return;\n default:\n return;\n }\n\n if (newIndex !== currentIndex && items[newIndex]) {\n items[newIndex].focus();\n }\n}\n\n// =============================================================================\n// LANDMARK ROLES\n// =============================================================================\n\n/**\n * Standard ARIA landmark labels.\n */\nexport const ARIA_LABELS = {\n /** Main navigation */\n mainNav: 'Main navigation',\n /** Secondary navigation */\n secondaryNav: 'Secondary navigation',\n /** Search */\n search: 'Search',\n /** Main content */\n main: 'Main content',\n /** Header */\n header: 'Header',\n /** Footer */\n footer: 'Footer',\n /** Sidebar */\n sidebar: 'Sidebar',\n /** Breadcrumb navigation */\n breadcrumb: 'Breadcrumb navigation',\n /** User menu */\n userMenu: 'User menu',\n /** Settings */\n settings: 'Settings',\n} as const;\n\n/**\n * Common ARIA expanded patterns.\n */\nexport interface AriaExpandedProps {\n 'aria-expanded': boolean;\n 'aria-controls'?: string;\n}\n\n/**\n * Get aria-expanded props.\n */\nexport function getAriaExpanded(expanded: boolean, controlsId?: string): AriaExpandedProps {\n return {\n 'aria-expanded': expanded,\n ...(controlsId && { 'aria-controls': controlsId }),\n };\n}\n\n// =============================================================================\n// LIVE REGION HELPERS\n// =============================================================================\n\n/**\n * Announce message to screen readers.\n */\nexport function announceToScreenReader(message: string, priority: 'polite' | 'assertive' = 'polite'): void {\n const announcement = document.createElement('div');\n announcement.setAttribute('role', 'status');\n announcement.setAttribute('aria-live', priority);\n announcement.setAttribute('aria-atomic', 'true');\n Object.assign(announcement.style, srOnly);\n announcement.textContent = message;\n\n document.body.appendChild(announcement);\n\n // Remove after announcement is read\n setTimeout(() => {\n document.body.removeChild(announcement);\n }, 1000);\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BackendConnectionAware, BackendStatus, ConnectionAware, MultiBackendConnectionAware, MultiBackendProvider, NetronProvider, NetronReactClient, RequireAllBackends, RequireAnyBackend, RequireBackendConnection, RequireConnection, createNetronClient, createServiceHook, useAllBackendsConnected, useAnyBackendConnected, useBackend, useBackendConnectionState, useBackendMutation, useBackendQuery, useBackendService, useDefaults, useHydration, useMultiBackend, useMutation, useNetronClient, useNetronClientSafe, useNetronConnection, useQuery, useService, useSubscription } from '@omnitron-dev/netron-react';
|
|
2
|
+
export { AuthGuard, AuthProvider, GuestGuard, Hide, PermissionGuard, RoleGuard, Show, useAuth, useAuthRequired, useIsAuthenticated, useUser } from '@omnitron-dev/netron-react/auth';
|
|
3
|
+
export { MutationCache, QueryCache, hashQueryKey, matchQueryKey } from '@omnitron-dev/netron-react/cache';
|
|
4
|
+
export { AuthenticationClient, MultiBackendClient, SessionTokenStorage, WebSocketClient, createMultiBackendClient } from '@omnitron-dev/netron-browser';
|
|
5
|
+
//# sourceMappingURL=chunk-JNU4QHJK.js.map
|
|
6
|
+
//# sourceMappingURL=chunk-JNU4QHJK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-JNU4QHJK.js","sourcesContent":[]}
|