wulf.js 2.1.1 → 2.2.0
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/README.md +217 -11
- package/changelog.md +50 -0
- package/dist/anchor.esm.js +9 -0
- package/dist/anchor.esm.js.map +7 -0
- package/dist/anchor.global.js +695 -0
- package/dist/anchor.global.js.map +7 -0
- package/dist/anchor.global.min.js +6 -0
- package/dist/anchor.global.min.js.map +7 -0
- package/dist/autosize.css +1 -0
- package/dist/autosize.css.map +7 -0
- package/dist/autosize.esm.js +10 -0
- package/dist/autosize.esm.js.map +7 -0
- package/dist/autosize.global.js +657 -0
- package/dist/autosize.global.js.map +7 -0
- package/dist/autosize.global.min.js +6 -0
- package/dist/autosize.global.min.js.map +7 -0
- package/dist/autosize.layered.css +1 -0
- package/dist/autosize.layered.css.map +7 -0
- package/dist/chunks/chunk-22AIMRD5.js +119 -0
- package/dist/chunks/chunk-22AIMRD5.js.map +7 -0
- package/dist/chunks/chunk-5N2IRGDM.js +766 -0
- package/dist/chunks/chunk-5N2IRGDM.js.map +7 -0
- package/dist/chunks/chunk-72FVCNNZ.js +863 -0
- package/dist/chunks/chunk-72FVCNNZ.js.map +7 -0
- package/dist/chunks/chunk-AXZYYW7H.js +865 -0
- package/dist/chunks/chunk-AXZYYW7H.js.map +7 -0
- package/dist/chunks/chunk-CM3SBIVQ.js +1116 -0
- package/dist/chunks/chunk-CM3SBIVQ.js.map +7 -0
- package/dist/chunks/chunk-H4GRLGQ3.js +578 -0
- package/dist/chunks/chunk-H4GRLGQ3.js.map +7 -0
- package/dist/chunks/chunk-ITRU2RFV.js +1195 -0
- package/dist/chunks/chunk-ITRU2RFV.js.map +7 -0
- package/dist/chunks/chunk-NLUQZEL4.js +1029 -0
- package/dist/chunks/chunk-NLUQZEL4.js.map +7 -0
- package/dist/chunks/chunk-QV46A7FV.js +197 -0
- package/dist/chunks/chunk-QV46A7FV.js.map +7 -0
- package/dist/chunks/chunk-SXLUXN6W.js +612 -0
- package/dist/chunks/chunk-SXLUXN6W.js.map +7 -0
- package/dist/chunks/chunk-T2H4EJCW.js +621 -0
- package/dist/chunks/chunk-T2H4EJCW.js.map +7 -0
- package/dist/chunks/chunk-TILLYEF2.js +6044 -0
- package/dist/chunks/chunk-TILLYEF2.js.map +7 -0
- package/dist/chunks/chunk-VJO22BAT.js +72 -0
- package/dist/chunks/chunk-VJO22BAT.js.map +7 -0
- package/dist/chunks/chunk-ZGUU6DMM.js +77 -0
- package/dist/chunks/chunk-ZGUU6DMM.js.map +7 -0
- package/dist/focus-trap.esm.js +6 -594
- package/dist/focus-trap.esm.js.map +3 -3
- package/dist/focus-trap.global.js +176 -61
- package/dist/focus-trap.global.js.map +3 -3
- package/dist/focus-trap.global.min.js +4 -4
- package/dist/focus-trap.global.min.js.map +4 -4
- package/dist/index.esm.js +79 -10448
- package/dist/index.esm.js.map +4 -4
- package/dist/index.global.js +3660 -202
- package/dist/index.global.js.map +4 -4
- package/dist/index.global.min.js +6 -3
- package/dist/index.global.min.js.map +4 -4
- package/dist/mask.esm.js +16 -6094
- package/dist/mask.esm.js.map +4 -4
- package/dist/mask.global.js +44 -55
- package/dist/mask.global.js.map +3 -3
- package/dist/mask.global.min.js +3 -3
- package/dist/mask.global.min.js.map +4 -4
- package/dist/masonry.esm.js +15 -1158
- package/dist/masonry.esm.js.map +4 -4
- package/dist/masonry.global.js +84 -94
- package/dist/masonry.global.js.map +3 -3
- package/dist/masonry.global.min.js +4 -4
- package/dist/masonry.global.min.js.map +4 -4
- package/dist/scroll.css +1 -1
- package/dist/scroll.css.map +2 -2
- package/dist/scroll.esm.js +14 -1252
- package/dist/scroll.esm.js.map +3 -3
- package/dist/scroll.global.js +64 -58
- package/dist/scroll.global.js.map +3 -3
- package/dist/scroll.global.min.js +3 -3
- package/dist/scroll.global.min.js.map +4 -4
- package/dist/scroll.layered.css +1 -1
- package/dist/scroll.layered.css.map +2 -2
- package/dist/shortcut.esm.js +6 -901
- package/dist/shortcut.esm.js.map +4 -4
- package/dist/shortcut.global.js +43 -36
- package/dist/shortcut.global.js.map +3 -3
- package/dist/shortcut.global.min.js +6 -3
- package/dist/shortcut.global.min.js.map +4 -4
- package/dist/size-report.json +319 -0
- package/dist/sortable.css +1 -0
- package/dist/sortable.css.map +7 -0
- package/dist/sortable.esm.js +22 -0
- package/dist/sortable.esm.js.map +7 -0
- package/dist/sortable.global.js +1477 -0
- package/dist/sortable.global.js.map +7 -0
- package/dist/sortable.global.min.js +6 -0
- package/dist/sortable.global.min.js.map +7 -0
- package/dist/sortable.layered.css +1 -0
- package/dist/sortable.layered.css.map +7 -0
- package/dist/sri-manifest.json +64 -0
- package/dist/toast.css +1 -1
- package/dist/toast.css.map +2 -2
- package/dist/toast.esm.js +19 -1208
- package/dist/toast.esm.js.map +3 -3
- package/dist/toast.global.js +314 -111
- package/dist/toast.global.js.map +3 -3
- package/dist/toast.global.min.js +3 -3
- package/dist/toast.global.min.js.map +4 -4
- package/dist/toast.layered.css +1 -1
- package/dist/toast.layered.css.map +2 -2
- package/dist/types/anchor/Anchor.d.ts +41 -0
- package/dist/types/anchor/index.d.ts +3 -0
- package/dist/types/anchor/types.d.ts +115 -0
- package/dist/types/autosize/Autosize.d.ts +71 -0
- package/dist/types/autosize/index.d.ts +3 -0
- package/dist/types/autosize/types.d.ts +66 -0
- package/dist/types/common/AuditableComponent.d.ts +1 -1
- package/dist/types/common/registry.d.ts +40 -0
- package/dist/types/focus-trap/FocusTrap.d.ts +3 -1
- package/dist/types/index.d.ts +13 -1
- package/dist/types/scroll/types.d.ts +6 -0
- package/dist/types/shortcut/ShortcutManager.d.ts +2 -0
- package/dist/types/shortcut/types.d.ts +5 -0
- package/dist/types/sortable/Sortable.d.ts +75 -0
- package/dist/types/sortable/i18n/en.d.ts +2 -0
- package/dist/types/sortable/i18n/fr.d.ts +2 -0
- package/dist/types/sortable/i18n/index.d.ts +9 -0
- package/dist/types/sortable/i18n/types.d.ts +15 -0
- package/dist/types/sortable/index.d.ts +4 -0
- package/dist/types/sortable/types.d.ts +112 -0
- package/dist/types/toast/Toast.d.ts +6 -1
- package/dist/types/toast/ToastInstance.d.ts +7 -0
- package/dist/types/toast/ToastManager.d.ts +2 -2
- package/dist/types/toast/types.d.ts +27 -1
- package/dist/types/undo/UndoManager.d.ts +112 -0
- package/dist/types/undo/i18n/en.d.ts +2 -0
- package/dist/types/undo/i18n/fr.d.ts +2 -0
- package/dist/types/undo/i18n/index.d.ts +9 -0
- package/dist/types/undo/i18n/types.d.ts +6 -0
- package/dist/types/undo/index.d.ts +5 -0
- package/dist/types/undo/types.d.ts +106 -0
- package/dist/undo.esm.js +23 -0
- package/dist/undo.esm.js.map +7 -0
- package/dist/undo.global.js +1029 -0
- package/dist/undo.global.js.map +7 -0
- package/dist/undo.global.min.js +6 -0
- package/dist/undo.global.min.js.map +7 -0
- package/package.json +54 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["<stdin>"],
|
|
4
|
-
"sourcesContent": ["@layer wulf {\n/**\n * Feuille de style de la librairie Wulf.Toast\n * Pr\u00E9fixe unifi\u00E9 : .wulf-toast / .wulf-toast-container\n */\n:root {\n --wulf-toast-bg: #1e293b;\n --wulf-toast-title-color: #f8fafc;\n --wulf-toast-text-color: #cbd5e1;\n --wulf-toast-icon-color: #38bdf8;\n --wulf-toast-close-color: #94a3b8;\n --wulf-toast-close-hover: #ffffff;\n --wulf-toast-border: rgba(255, 255, 255, 0.08);\n --wulf-toast-close-hover-bg: rgba(255, 255, 255, 0.1);\n --wulf-toast-focus-ring: #38bdf8;\n}\n@supports (color: light-dark(white, black)) {\n :root {\n --wulf-toast-bg: light-dark(#ffffff, #1e293b);\n --wulf-toast-title-color: light-dark(#0f172a, #f8fafc);\n --wulf-toast-text-color: light-dark(#334155, #cbd5e1);\n --wulf-toast-close-color: light-dark(#475569, #94a3b8);\n --wulf-toast-close-hover: light-dark(#0f172a, #ffffff);\n --wulf-toast-border: light-dark(rgba(15, 23, 42, 0.12), rgba(255, 255, 255, 0.08));\n --wulf-toast-close-hover-bg: light-dark(rgba(15, 23, 42, 0.08), rgba(255, 255, 255, 0.1));\n --wulf-toast-focus-ring: light-dark(#0369a1, #38bdf8);\n }\n}\n.wulf-toast-container {\n position: fixed;\n z-index: 99999;\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n max-width: calc(100vw - 2rem);\n max-width: calc(100dvw - 2rem);\n width: auto;\n pointer-events: none;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n}\n.wulf-toast-container[popover] {\n inset: auto;\n border: none;\n background: transparent;\n color: inherit;\n overflow: visible;\n padding: 0;\n margin: 0;\n}\n.wulf-toast-container[popover]:not(:popover-open):not(.\\:popover-open) {\n display: none;\n}\n.wulf-toast-container.wulf-toast-top-right {\n top: 1rem;\n right: 1rem;\n align-items: flex-end;\n}\n.wulf-toast-container.wulf-toast-top-left {\n top: 1rem;\n left: 1rem;\n align-items: flex-start;\n}\n.wulf-toast-container.wulf-toast-top-center {\n top: 1rem;\n left: 0;\n right: 0;\n width: fit-content;\n margin-inline: auto;\n align-items: center;\n}\n.wulf-toast-container.wulf-toast-bottom-right {\n bottom: 1rem;\n right: 1rem;\n align-items: flex-end;\n}\n.wulf-toast-container.wulf-toast-bottom-left {\n bottom: 1rem;\n left: 1rem;\n align-items: flex-start;\n}\n.wulf-toast-container.wulf-toast-bottom-center {\n bottom: 1rem;\n left: 0;\n right: 0;\n width: fit-content;\n margin-inline: auto;\n align-items: center;\n}\n.wulf-toast {\n position: relative;\n overflow: hidden;\n overflow: clip;\n pointer-events: auto;\n display: flex;\n align-items: flex-start;\n gap: 0.75rem;\n width: min(440px, calc(100vw - 2rem));\n width: min(440px, calc(100dvw - 2rem));\n max-width: 100%;\n padding: 0.875rem 1rem;\n border-radius: 0.625rem;\n background-color: var(--wulf-toast-bg);\n color: var(--wulf-toast-text-color);\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);\n border: 1px solid var(--wulf-toast-border);\n font-family: inherit;\n font-size: 0.875rem;\n line-height: 1.45;\n box-sizing: border-box;\n opacity: 1;\n translate: 0 0;\n scale: 1;\n}\n.wulf-toast:focus-visible {\n outline: 2px solid var(--wulf-toast-focus-ring);\n outline-offset: 2px;\n}\n.wulf-toast .wulf-toast-icon {\n flex-shrink: 0;\n font-size: 1.25rem;\n line-height: 1;\n margin-top: 0.125rem;\n color: var(--wulf-toast-icon-color);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.wulf-toast .wulf-toast-content {\n flex: 1 1 auto;\n min-width: 0;\n word-break: break-word;\n overflow-wrap: break-word;\n}\n.wulf-toast .wulf-toast-content.wulf-toast-content--interactive {\n cursor: pointer;\n border-radius: 0.375rem;\n}\n.wulf-toast .wulf-toast-content.wulf-toast-content--interactive:focus-visible {\n outline: 2px solid var(--wulf-toast-focus-ring);\n outline-offset: 2px;\n}\n.wulf-toast .wulf-toast-title {\n font-weight: 600;\n font-size: 0.9375rem;\n color: var(--wulf-toast-title-color);\n margin-bottom: 0.25rem;\n white-space: pre-line;\n}\n.wulf-toast .wulf-toast-message {\n color: var(--wulf-toast-text-color);\n white-space: pre-line;\n}\n.wulf-toast .wulf-toast-close {\n flex-shrink: 0;\n background: transparent;\n border: none;\n padding: 0;\n margin: -0.125rem -0.25rem 0 0.25rem;\n min-inline-size: 24px;\n min-block-size: 24px;\n width: 1.5rem;\n height: 1.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--wulf-toast-close-color);\n cursor: pointer;\n font-size: 1.25rem;\n line-height: 1;\n border-radius: 0.375rem;\n}\n.wulf-toast .wulf-toast-close:hover {\n color: var(--wulf-toast-close-hover);\n background-color: var(--wulf-toast-close-hover-bg);\n}\n.wulf-toast .wulf-toast-close:focus-visible {\n outline: 2px solid var(--wulf-toast-focus-ring);\n outline-offset: 1px;\n}\n.wulf-toast .wulf-toast-progress {\n position: absolute;\n inset-block-end: 0;\n inset-inline-start: 0;\n height: 3px;\n width: 100%;\n background: currentColor;\n opacity: 0.35;\n transform-origin: left;\n pointer-events: none;\n}\n.wulf-toast .wulf-toast-progress:dir(rtl) {\n transform-origin: right;\n}\n.wulf-toast:hover .wulf-toast-progress,\n.wulf-toast:focus-within .wulf-toast-progress,\n.wulf-toast.is-paused .wulf-toast-progress {\n animation-play-state: paused;\n}\n/* Repli explicite pour les navigateurs ne supportant pas :popover-open (polyfill OddBird) */\n@supports not selector(:popover-open) {\n .wulf-toast-container[popover]:not(.\\:popover-open) {\n display: none;\n }\n}\n/* Cible tactile agrandie sur pointeur grossier (WCAG 2.5.8) */\n@media (pointer: coarse) {\n .wulf-toast .wulf-toast-close {\n min-width: 44px;\n min-height: 44px;\n margin: -0.5rem -0.5rem 0 0.25rem;\n }\n}\n/* Conteneur cach\u00E9 visuellement pour l'annonce ARIA sur canal unique */\n.wulf-toast-announcer {\n position: fixed;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n pointer-events: none;\n}\n@keyframes wulfToastProgress {\n from {\n scale: 1 1;\n }\n to {\n scale: 0 1;\n }\n}\n/* Animations actives uniquement sans restriction de mouvement */\n@media (prefers-reduced-motion: no-preference) {\n .wulf-toast {\n transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), translate 0.25s cubic-bezier(0.16, 1, 0.3, 1), scale 0.25s cubic-bezier(0.16, 1, 0.3, 1);\n }\n .wulf-toast.wulf-toast-hiding {\n opacity: 0;\n translate: 0 -8px;\n scale: 0.94;\n transition: opacity 0.22s cubic-bezier(0.7, 0, 0.84, 0), translate 0.22s cubic-bezier(0.7, 0, 0.84, 0), scale 0.22s cubic-bezier(0.7, 0, 0.84, 0);\n }\n .wulf-toast.wulf-toast-hiding-fast {\n opacity: 0;\n scale: 0.96;\n transition: opacity 0.09s ease-out, scale 0.09s ease-out;\n }\n .wulf-toast .wulf-toast-close {\n transition: color 0.15s ease, background-color 0.15s ease;\n }\n .wulf-toast .wulf-toast-progress {\n animation: wulfToastProgress var(--wulf-toast-duration, 5000ms) linear forwards;\n }\n @starting-style {\n .wulf-toast {\n opacity: 0;\n translate: 0 -8px;\n scale: 0.96;\n }\n }\n}\n/* Respect strict des pr\u00E9f\u00E9rences utilisateur de mouvement r\u00E9duit (WCAG) */\n@media (prefers-reduced-motion: reduce) {\n .wulf-toast-progress {\n display: none;\n }\n}\n/* Mode contraste accru */\n@media (prefers-contrast: more) {\n :root {\n --wulf-toast-close-color: #ffffff;\n }\n @supports (color: light-dark(white, black)) {\n :root {\n --wulf-toast-close-color: light-dark(#0f172a, #ffffff);\n }\n }\n .wulf-toast {\n border: 2px solid currentColor;\n }\n .wulf-toast .wulf-toast-close:focus-visible {\n outline: 2px solid currentColor;\n }\n}\n/* Support du mode Contraste \u00C9lev\u00E9 (Windows High Contrast / forced-colors) */\n@media (forced-colors: active) {\n .wulf-toast {\n border: 1px solid CanvasText;\n }\n .wulf-toast .wulf-toast-close {\n border: 1px solid ButtonText;\n }\n .wulf-toast .wulf-toast-progress {\n forced-color-adjust: none;\n background: Highlight;\n opacity: 1;\n }\n}\n\n}"],
|
|
5
|
-
"mappings": "AAAA,YAKA,MACE,iBAAiB,QACjB,0BAA0B,QAC1B,yBAAyB,QACzB,yBAAyB,QACzB,0BAA0B,QAC1B,0BAA0B,QAC1B,qBAAqB,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KACzC,6BAA6B,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IACjD,yBAAyB,
|
|
4
|
+
"sourcesContent": ["@layer wulf {\n/**\n * Feuille de style de la librairie Wulf.Toast\n * Pr\u00E9fixe unifi\u00E9 : .wulf-toast / .wulf-toast-container\n */\n:root {\n --wulf-toast-bg: #1e293b;\n --wulf-toast-title-color: #f8fafc;\n --wulf-toast-text-color: #cbd5e1;\n --wulf-toast-icon-color: #38bdf8;\n --wulf-toast-close-color: #94a3b8;\n --wulf-toast-close-hover: #ffffff;\n --wulf-toast-border: rgba(255, 255, 255, 0.08);\n --wulf-toast-close-hover-bg: rgba(255, 255, 255, 0.1);\n --wulf-toast-focus-ring: #38bdf8;\n --wulf-toast-action-color: #38bdf8;\n --wulf-toast-action-bg: rgba(56, 189, 248, 0.14);\n --wulf-toast-action-hover-bg: rgba(56, 189, 248, 0.24);\n --wulf-toast-action-border: rgba(56, 189, 248, 0.35);\n}\n@supports (color: light-dark(white, black)) {\n :root {\n --wulf-toast-bg: light-dark(#ffffff, #1e293b);\n --wulf-toast-title-color: light-dark(#0f172a, #f8fafc);\n --wulf-toast-text-color: light-dark(#334155, #cbd5e1);\n --wulf-toast-close-color: light-dark(#475569, #94a3b8);\n --wulf-toast-close-hover: light-dark(#0f172a, #ffffff);\n --wulf-toast-border: light-dark(rgba(15, 23, 42, 0.12), rgba(255, 255, 255, 0.08));\n --wulf-toast-close-hover-bg: light-dark(rgba(15, 23, 42, 0.08), rgba(255, 255, 255, 0.1));\n --wulf-toast-focus-ring: light-dark(#0369a1, #38bdf8);\n --wulf-toast-action-color: light-dark(#0369a1, #38bdf8);\n --wulf-toast-action-bg: light-dark(rgba(3, 105, 161, 0.1), rgba(56, 189, 248, 0.14));\n --wulf-toast-action-hover-bg: light-dark(rgba(3, 105, 161, 0.18), rgba(56, 189, 248, 0.24));\n --wulf-toast-action-border: light-dark(rgba(3, 105, 161, 0.3), rgba(56, 189, 248, 0.35));\n }\n}\n.wulf-toast-container {\n position: fixed;\n z-index: 99999;\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n max-width: calc(100vw - 2rem);\n max-width: calc(100dvw - 2rem);\n width: auto;\n pointer-events: none;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n}\n.wulf-toast-container[popover] {\n inset: auto;\n border: none;\n background: transparent;\n color: inherit;\n overflow: visible;\n padding: 0;\n margin: 0;\n}\n.wulf-toast-container[popover]:not(:popover-open):not(.\\:popover-open) {\n display: none;\n}\n.wulf-toast-container.wulf-toast-top-right {\n top: 1rem;\n right: 1rem;\n align-items: flex-end;\n}\n.wulf-toast-container.wulf-toast-top-left {\n top: 1rem;\n left: 1rem;\n align-items: flex-start;\n}\n.wulf-toast-container.wulf-toast-top-center {\n top: 1rem;\n left: 0;\n right: 0;\n width: fit-content;\n margin-inline: auto;\n align-items: center;\n}\n.wulf-toast-container.wulf-toast-bottom-right {\n bottom: 1rem;\n right: 1rem;\n align-items: flex-end;\n}\n.wulf-toast-container.wulf-toast-bottom-left {\n bottom: 1rem;\n left: 1rem;\n align-items: flex-start;\n}\n.wulf-toast-container.wulf-toast-bottom-center {\n bottom: 1rem;\n left: 0;\n right: 0;\n width: fit-content;\n margin-inline: auto;\n align-items: center;\n}\n.wulf-toast {\n position: relative;\n overflow: hidden;\n overflow: clip;\n pointer-events: auto;\n display: flex;\n align-items: flex-start;\n gap: 0.75rem;\n width: min(440px, calc(100vw - 2rem));\n width: min(440px, calc(100dvw - 2rem));\n max-width: 100%;\n padding: 0.875rem 1rem;\n border-radius: 0.625rem;\n background-color: var(--wulf-toast-bg);\n color: var(--wulf-toast-text-color);\n box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);\n border: 1px solid var(--wulf-toast-border);\n font-family: inherit;\n font-size: 0.875rem;\n line-height: 1.45;\n box-sizing: border-box;\n opacity: 1;\n translate: 0 0;\n scale: 1;\n}\n.wulf-toast:focus-visible {\n outline: 2px solid var(--wulf-toast-focus-ring);\n outline-offset: 2px;\n}\n.wulf-toast .wulf-toast-icon {\n flex-shrink: 0;\n font-size: 1.25rem;\n line-height: 1;\n margin-top: 0.125rem;\n color: var(--wulf-toast-icon-color);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.wulf-toast .wulf-toast-content {\n flex: 1 1 auto;\n min-width: 0;\n word-break: break-word;\n overflow-wrap: break-word;\n}\n.wulf-toast .wulf-toast-content.wulf-toast-content--interactive {\n cursor: pointer;\n border-radius: 0.375rem;\n}\n.wulf-toast .wulf-toast-content.wulf-toast-content--interactive:focus-visible {\n outline: 2px solid var(--wulf-toast-focus-ring);\n outline-offset: 2px;\n}\n.wulf-toast .wulf-toast-title {\n font-weight: 600;\n font-size: 0.9375rem;\n color: var(--wulf-toast-title-color);\n margin-bottom: 0.25rem;\n white-space: pre-line;\n}\n.wulf-toast .wulf-toast-message {\n color: var(--wulf-toast-text-color);\n white-space: pre-line;\n}\n.wulf-toast .wulf-toast-action {\n flex-shrink: 0;\n align-self: center;\n background-color: var(--wulf-toast-action-bg);\n color: var(--wulf-toast-action-color);\n border: 1px solid var(--wulf-toast-action-border);\n border-radius: 0.375rem;\n padding: 0.25rem 0.625rem;\n min-block-size: 24px;\n font-family: inherit;\n font-size: 0.8125rem;\n font-weight: 600;\n line-height: 1.25;\n cursor: pointer;\n}\n.wulf-toast .wulf-toast-action:hover:not(:disabled) {\n background-color: var(--wulf-toast-action-hover-bg);\n}\n.wulf-toast .wulf-toast-action:focus-visible {\n outline: 2px solid var(--wulf-toast-focus-ring);\n outline-offset: 2px;\n}\n.wulf-toast .wulf-toast-action:disabled {\n opacity: 0.6;\n cursor: wait;\n}\n.wulf-toast .wulf-toast-close {\n flex-shrink: 0;\n background: transparent;\n border: none;\n padding: 0;\n margin: -0.125rem -0.25rem 0 0.25rem;\n min-inline-size: 24px;\n min-block-size: 24px;\n width: 1.5rem;\n height: 1.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--wulf-toast-close-color);\n cursor: pointer;\n font-size: 1.25rem;\n line-height: 1;\n border-radius: 0.375rem;\n}\n.wulf-toast .wulf-toast-close:hover {\n color: var(--wulf-toast-close-hover);\n background-color: var(--wulf-toast-close-hover-bg);\n}\n.wulf-toast .wulf-toast-close:focus-visible {\n outline: 2px solid var(--wulf-toast-focus-ring);\n outline-offset: 1px;\n}\n.wulf-toast .wulf-toast-progress {\n position: absolute;\n inset-block-end: 0;\n inset-inline-start: 0;\n height: 3px;\n width: 100%;\n background: currentColor;\n opacity: 0.35;\n transform-origin: left;\n pointer-events: none;\n}\n.wulf-toast .wulf-toast-progress:dir(rtl) {\n transform-origin: right;\n}\n.wulf-toast:hover .wulf-toast-progress,\n.wulf-toast:focus-within .wulf-toast-progress,\n.wulf-toast.is-paused .wulf-toast-progress {\n animation-play-state: paused;\n}\n/* Repli explicite pour les navigateurs ne supportant pas :popover-open (polyfill OddBird) */\n@supports not selector(:popover-open) {\n .wulf-toast-container[popover]:not(.\\:popover-open) {\n display: none;\n }\n}\n/* Cible tactile agrandie sur pointeur grossier (WCAG 2.5.8) */\n@media (pointer: coarse) {\n .wulf-toast .wulf-toast-action {\n min-block-size: 44px;\n padding: 0.5rem 0.75rem;\n }\n .wulf-toast .wulf-toast-close {\n min-width: 44px;\n min-height: 44px;\n margin: -0.5rem -0.5rem 0 0.25rem;\n }\n}\n/* Conteneur cach\u00E9 visuellement pour l'annonce ARIA sur canal unique */\n.wulf-toast-announcer {\n position: fixed;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n pointer-events: none;\n}\n@keyframes wulfToastProgress {\n from {\n scale: 1 1;\n }\n to {\n scale: 0 1;\n }\n}\n/* Animations actives uniquement sans restriction de mouvement */\n@media (prefers-reduced-motion: no-preference) {\n .wulf-toast {\n transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), translate 0.25s cubic-bezier(0.16, 1, 0.3, 1), scale 0.25s cubic-bezier(0.16, 1, 0.3, 1);\n }\n .wulf-toast.wulf-toast-hiding {\n opacity: 0;\n translate: 0 -8px;\n scale: 0.94;\n transition: opacity 0.22s cubic-bezier(0.7, 0, 0.84, 0), translate 0.22s cubic-bezier(0.7, 0, 0.84, 0), scale 0.22s cubic-bezier(0.7, 0, 0.84, 0);\n }\n .wulf-toast.wulf-toast-hiding-fast {\n opacity: 0;\n scale: 0.96;\n transition: opacity 0.09s ease-out, scale 0.09s ease-out;\n }\n .wulf-toast .wulf-toast-close {\n transition: color 0.15s ease, background-color 0.15s ease;\n }\n .wulf-toast .wulf-toast-progress {\n animation: wulfToastProgress var(--wulf-toast-duration, 5000ms) linear forwards;\n }\n @starting-style {\n .wulf-toast {\n opacity: 0;\n translate: 0 -8px;\n scale: 0.96;\n }\n }\n}\n/* Respect strict des pr\u00E9f\u00E9rences utilisateur de mouvement r\u00E9duit (WCAG) */\n@media (prefers-reduced-motion: reduce) {\n .wulf-toast-progress {\n display: none;\n }\n}\n/* Mode contraste accru */\n@media (prefers-contrast: more) {\n :root {\n --wulf-toast-close-color: #ffffff;\n }\n @supports (color: light-dark(white, black)) {\n :root {\n --wulf-toast-close-color: light-dark(#0f172a, #ffffff);\n }\n }\n .wulf-toast {\n border: 2px solid currentColor;\n }\n .wulf-toast .wulf-toast-action {\n border: 2px solid currentColor;\n }\n .wulf-toast .wulf-toast-close:focus-visible,\n .wulf-toast .wulf-toast-action:focus-visible {\n outline: 2px solid currentColor;\n }\n}\n/* Support du mode Contraste \u00C9lev\u00E9 (Windows High Contrast / forced-colors) */\n@media (forced-colors: active) {\n .wulf-toast {\n border: 1px solid CanvasText;\n }\n .wulf-toast .wulf-toast-action,\n .wulf-toast .wulf-toast-close {\n border: 1px solid ButtonText;\n }\n .wulf-toast .wulf-toast-progress {\n forced-color-adjust: none;\n background: Highlight;\n opacity: 1;\n }\n}\n\n}"],
|
|
5
|
+
"mappings": "AAAA,YAKA,MACE,iBAAiB,QACjB,0BAA0B,QAC1B,yBAAyB,QACzB,yBAAyB,QACzB,0BAA0B,QAC1B,0BAA0B,QAC1B,qBAAqB,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KACzC,6BAA6B,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IACjD,yBAAyB,QACzB,2BAA2B,QAC3B,wBAAwB,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,KAC3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AAS,CACX,CACF,CAEA",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AuditableComponent } from '../common/AuditableComponent';
|
|
2
|
+
import { AnchorOptions, AnchorPlacementOption, AnchorPositionResult, IAnchor } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Moteur headless de positionnement contextuel (Wulf.Anchor).
|
|
5
|
+
* Délègue progressivement à CSS Anchor Positioning et fournit un moteur géométrique universel sans dépendance.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Anchor extends AuditableComponent implements IAnchor {
|
|
8
|
+
readonly reference: HTMLElement;
|
|
9
|
+
readonly floating: HTMLElement;
|
|
10
|
+
private options;
|
|
11
|
+
private anchorName;
|
|
12
|
+
private isDestroyed;
|
|
13
|
+
private isRunning;
|
|
14
|
+
private nativeApplied;
|
|
15
|
+
private rafId;
|
|
16
|
+
private resizeObserver;
|
|
17
|
+
private abortController;
|
|
18
|
+
private savedRefAnchorName;
|
|
19
|
+
private savedFloatingStyles;
|
|
20
|
+
private savedPlacementAttr;
|
|
21
|
+
private savedArrowStyles;
|
|
22
|
+
constructor(reference: HTMLElement | string, floating: HTMLElement | string, options?: AnchorOptions);
|
|
23
|
+
/**
|
|
24
|
+
* Détecte si CSS Anchor Positioning natif (anchor-name + position-area) est supporté.
|
|
25
|
+
*/
|
|
26
|
+
static supportsNativeAnchor(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Calcule la position géométrique optimale sans muter le DOM.
|
|
29
|
+
*/
|
|
30
|
+
static computePosition(reference: HTMLElement, floating: HTMLElement, options?: AnchorOptions): AnchorPositionResult;
|
|
31
|
+
update(): AnchorPositionResult;
|
|
32
|
+
setPlacement(placement: AnchorPlacementOption): this;
|
|
33
|
+
start(): this;
|
|
34
|
+
stop(): this;
|
|
35
|
+
audit(): string[];
|
|
36
|
+
protected getAuditPrefix(): string;
|
|
37
|
+
protected getAuditTargetLabel(): string;
|
|
38
|
+
destroy(): void;
|
|
39
|
+
private restoreNativeStyles;
|
|
40
|
+
private saveInitialState;
|
|
41
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { AuditableOptions, IAuditable } from '../common/AuditableComponent';
|
|
2
|
+
export type AnchorSide = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
export type AnchorAlignment = 'start' | 'end';
|
|
4
|
+
export type AnchorPlacement = AnchorSide | `${AnchorSide}-${AnchorAlignment}`;
|
|
5
|
+
export type AnchorPlacementOption = AnchorPlacement | 'best';
|
|
6
|
+
export type AnchorStrategy = 'fixed' | 'absolute';
|
|
7
|
+
export type AnchorOffset = number | {
|
|
8
|
+
mainAxis?: number;
|
|
9
|
+
crossAxis?: number;
|
|
10
|
+
};
|
|
11
|
+
export interface AnchorRect {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}
|
|
17
|
+
export interface AnchorPositionResult {
|
|
18
|
+
/** Coordonnée X appliquée dans le repère du floating */
|
|
19
|
+
x: number;
|
|
20
|
+
/** Coordonnée Y appliquée dans le repère du floating */
|
|
21
|
+
y: number;
|
|
22
|
+
/** Coordonnée X dans le viewport visuel */
|
|
23
|
+
viewportX: number;
|
|
24
|
+
/** Coordonnée Y dans le viewport visuel */
|
|
25
|
+
viewportY: number;
|
|
26
|
+
/** Placement effectif (après éventuel flip) */
|
|
27
|
+
placement: AnchorPlacement;
|
|
28
|
+
/** Côté effectif */
|
|
29
|
+
side: AnchorSide;
|
|
30
|
+
/** Alignement effectif (null si centré) */
|
|
31
|
+
alignment: AnchorAlignment | null;
|
|
32
|
+
/** Position X de la flèche relative au floating (null si non calculée) */
|
|
33
|
+
arrowX: number | null;
|
|
34
|
+
/** Position Y de la flèche relative au floating (null si non calculée) */
|
|
35
|
+
arrowY: number | null;
|
|
36
|
+
/** true si CSS Anchor Positioning natif est utilisé */
|
|
37
|
+
isNative: boolean;
|
|
38
|
+
/** true si l'élément de référence est entièrement rogné hors de sa boundary */
|
|
39
|
+
isReferenceClipped: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface AnchorOptions extends AuditableOptions {
|
|
42
|
+
/**
|
|
43
|
+
* Placement souhaité par rapport à la référence (ou `'best'` pour choisir automatiquement parmi `preferredPlacements` puis les autres placements).
|
|
44
|
+
* @default 'bottom-start'
|
|
45
|
+
*/
|
|
46
|
+
placement?: AnchorPlacementOption;
|
|
47
|
+
/**
|
|
48
|
+
* Liste ordonnée des placements préférés évalués en priorité lorsque `placement === 'best'`.
|
|
49
|
+
* Si aucune des 12 positions ne dispose de la place nécessaire, le 1er placement préféré est retenu.
|
|
50
|
+
*/
|
|
51
|
+
preferredPlacements?: AnchorPlacement[];
|
|
52
|
+
/**
|
|
53
|
+
* Stratégie de positionnement CSS.
|
|
54
|
+
* @default 'fixed'
|
|
55
|
+
*/
|
|
56
|
+
strategy?: AnchorStrategy;
|
|
57
|
+
/**
|
|
58
|
+
* Décalage entre la référence et le floating (en px).
|
|
59
|
+
* @default 8
|
|
60
|
+
*/
|
|
61
|
+
offset?: AnchorOffset;
|
|
62
|
+
/**
|
|
63
|
+
* Bascule automatiquement vers le côté opposé en cas de débordement.
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
flip?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Recale l'élément le long de l'axe transversal pour rester dans la boundary.
|
|
69
|
+
* @default true
|
|
70
|
+
*/
|
|
71
|
+
shift?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Marge de sécurité minimale avec les bords de la boundary (en px).
|
|
74
|
+
* @default 8
|
|
75
|
+
*/
|
|
76
|
+
padding?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Élément flèche optionnel (HTMLElement ou sélecteur dans floating/document).
|
|
79
|
+
*/
|
|
80
|
+
arrow?: HTMLElement | string | null;
|
|
81
|
+
/**
|
|
82
|
+
* Marge minimale aux extrémités du floating pour la flèche (en px).
|
|
83
|
+
* @default 6
|
|
84
|
+
*/
|
|
85
|
+
arrowPadding?: number;
|
|
86
|
+
/**
|
|
87
|
+
* Zone de contrainte pour flip/shift.
|
|
88
|
+
* @default 'clippingAncestors'
|
|
89
|
+
*/
|
|
90
|
+
boundary?: HTMLElement | AnchorRect | 'clippingAncestors' | 'viewport';
|
|
91
|
+
/**
|
|
92
|
+
* Met à jour automatiquement la position sur ResizeObserver, scroll et visualViewport.
|
|
93
|
+
* @default true
|
|
94
|
+
*/
|
|
95
|
+
autoUpdate?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Délègue progressivement au standard CSS Anchor Positioning (`anchor-name` + `position-area`)
|
|
98
|
+
* lorsque le navigateur le supporte (hors arrow et en stratégie 'fixed').
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
101
|
+
useNativeAnchor?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Callback déclenché après chaque calcul/application de position.
|
|
104
|
+
*/
|
|
105
|
+
onPosition?: (result: AnchorPositionResult) => void;
|
|
106
|
+
}
|
|
107
|
+
export interface IAnchor extends IAuditable {
|
|
108
|
+
readonly reference: HTMLElement;
|
|
109
|
+
readonly floating: HTMLElement;
|
|
110
|
+
update(): AnchorPositionResult;
|
|
111
|
+
start(): this;
|
|
112
|
+
stop(): this;
|
|
113
|
+
setPlacement(placement: AnchorPlacementOption): this;
|
|
114
|
+
destroy(): void;
|
|
115
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { AuditableComponent } from '../common/AuditableComponent';
|
|
2
|
+
import { AutosizeMode, AutosizeOptions, IAutosize } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Moteur de redimensionnement fluide pour `<textarea>` (`Wulf.Autosize`).
|
|
5
|
+
* Délégation progressive à `field-sizing: content` et repli JS/CSSOM déterministe
|
|
6
|
+
* sans transition pendant la frappe ni saut de scroll.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Autosize extends AuditableComponent implements IAutosize {
|
|
9
|
+
readonly element: HTMLTextAreaElement | null;
|
|
10
|
+
mode: AutosizeMode;
|
|
11
|
+
private options;
|
|
12
|
+
private disabled;
|
|
13
|
+
private isDestroyed;
|
|
14
|
+
private isMeasuring;
|
|
15
|
+
private savedStyles;
|
|
16
|
+
private abortController;
|
|
17
|
+
private resizeObserver;
|
|
18
|
+
private rafId;
|
|
19
|
+
private lastInlineSize;
|
|
20
|
+
private lastHeight;
|
|
21
|
+
private lastAppliedHeight;
|
|
22
|
+
private manualHeightPx;
|
|
23
|
+
constructor(target: HTMLTextAreaElement | string, options?: AutosizeOptions);
|
|
24
|
+
/**
|
|
25
|
+
* Indique si le navigateur supporte nativement `field-sizing: content`.
|
|
26
|
+
*/
|
|
27
|
+
static supportsNativeFieldSizing(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Initialisation opt-in explicite de tous les `<textarea data-wulf-autosize>` dans `root`.
|
|
30
|
+
* Aucun effet de bord au chargement du module.
|
|
31
|
+
*/
|
|
32
|
+
static initAll(root?: ParentNode, options?: AutosizeOptions): Autosize[];
|
|
33
|
+
/**
|
|
34
|
+
* Recalcule et applique la hauteur optimale de la zone de texte.
|
|
35
|
+
*/
|
|
36
|
+
update(): number;
|
|
37
|
+
/**
|
|
38
|
+
* Efface toute hauteur manuelle mémorisée (mode `resize: 'vertical'`) et réévalue la taille.
|
|
39
|
+
*/
|
|
40
|
+
reset(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Active ou suspend le redimensionnement automatique tout en restaurant les styles d'origine à la pause.
|
|
43
|
+
*/
|
|
44
|
+
setDisabled(disabled: boolean): void;
|
|
45
|
+
isDisabled(): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Met à jour les options à la volée et applique le nouveau dimensionnement.
|
|
48
|
+
*/
|
|
49
|
+
updateOptions(options: Partial<AutosizeOptions>): void;
|
|
50
|
+
/**
|
|
51
|
+
* Audite la conformité WAI-ARIA / WCAG du `<textarea>` ciblé.
|
|
52
|
+
*/
|
|
53
|
+
audit(): string[];
|
|
54
|
+
protected getAuditPrefix(): string;
|
|
55
|
+
protected getAuditTargetLabel(): string;
|
|
56
|
+
/**
|
|
57
|
+
* Détruit l'instance : coupe tous les écouteurs/observers et restaure intégralement le DOM d'origine.
|
|
58
|
+
*/
|
|
59
|
+
destroy(): void;
|
|
60
|
+
private hasNonEmptyLabel;
|
|
61
|
+
private captureInitialStyles;
|
|
62
|
+
private restoreInitialStyles;
|
|
63
|
+
private bindEvents;
|
|
64
|
+
private captureManualResizeIfNeeded;
|
|
65
|
+
private scheduleUpdate;
|
|
66
|
+
private readBoundingHeight;
|
|
67
|
+
private isElementOverflowing;
|
|
68
|
+
private computeBounds;
|
|
69
|
+
private applyModeAndMeasure;
|
|
70
|
+
private emitResize;
|
|
71
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { AuditableOptions, IAuditable } from '../common/AuditableComponent';
|
|
2
|
+
/** Mode de redimensionnement manuel autorisé sur la zone de texte */
|
|
3
|
+
export type AutosizeResizeMode = 'none' | 'vertical';
|
|
4
|
+
/** Stratégie active de dimensionnement */
|
|
5
|
+
export type AutosizeMode = 'native' | 'fallback';
|
|
6
|
+
export interface AutosizeResizeDetail {
|
|
7
|
+
textarea: HTMLTextAreaElement;
|
|
8
|
+
height: number;
|
|
9
|
+
previousHeight: number;
|
|
10
|
+
overflowing: boolean;
|
|
11
|
+
mode: AutosizeMode;
|
|
12
|
+
}
|
|
13
|
+
export interface AutosizeOptions extends AuditableOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Nombre minimal de lignes visibles.
|
|
16
|
+
* Si omis, réutilise l'attribut HTML `rows` si entier >= 1.
|
|
17
|
+
*/
|
|
18
|
+
minRows?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Nombre maximal de lignes avant bascule en défilement interne (`overflow-y: auto`).
|
|
21
|
+
*/
|
|
22
|
+
maxRows?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Hauteur minimale explicite en pixels.
|
|
25
|
+
*/
|
|
26
|
+
minHeight?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Hauteur maximale explicite en pixels.
|
|
29
|
+
*/
|
|
30
|
+
maxHeight?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Délègue au CSS natif `field-sizing: content` quand supporté par le navigateur et `resize === 'none'`.
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
useNativeFieldSizing?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Autorise ou interdit la poignée de redimensionnement manuelle verticale.
|
|
38
|
+
* Dès que `'vertical'` est actif, `field-sizing` est désactivé pour éviter tout conflit de hauteur.
|
|
39
|
+
* @default 'none'
|
|
40
|
+
*/
|
|
41
|
+
resize?: AutosizeResizeMode;
|
|
42
|
+
/**
|
|
43
|
+
* Recalcule la hauteur lorsque les polices web finissent de charger (`document.fonts.ready`).
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
observeFonts?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Suspend le redimensionnement automatique sans détruire l'instance.
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Callback invoqué à chaque variation effective de hauteur (>= 0.5px).
|
|
54
|
+
*/
|
|
55
|
+
onResize?: (detail: AutosizeResizeDetail) => void;
|
|
56
|
+
}
|
|
57
|
+
export interface IAutosize extends IAuditable {
|
|
58
|
+
readonly element: HTMLTextAreaElement | null;
|
|
59
|
+
readonly mode: AutosizeMode;
|
|
60
|
+
update(): number;
|
|
61
|
+
reset(): void;
|
|
62
|
+
setDisabled(disabled: boolean): void;
|
|
63
|
+
isDisabled(): boolean;
|
|
64
|
+
updateOptions(options: Partial<AutosizeOptions>): void;
|
|
65
|
+
destroy(): void;
|
|
66
|
+
}
|
|
@@ -41,5 +41,5 @@ export declare abstract class AuditableComponent implements IAuditable {
|
|
|
41
41
|
* Vérifie si un attribut de référence d'IDs ARIA (ex: aria-labelledby, aria-describedby, aria-errormessage)
|
|
42
42
|
* pointe vers des éléments réellement présents dans le document (et optionnellement non vides).
|
|
43
43
|
*/
|
|
44
|
-
protected checkAriaIdReferences(element: HTMLElement, attrName: 'aria-labelledby' | 'aria-describedby' | 'aria-errormessage', warnings: string[], requireNonEmptyText?: boolean): boolean;
|
|
44
|
+
protected checkAriaIdReferences(element: HTMLElement, attrName: 'aria-labelledby' | 'aria-describedby' | 'aria-errormessage' | 'aria-controls', warnings: string[], requireNonEmptyText?: boolean): boolean;
|
|
45
45
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registres internes partagés entre bundles (index vs sous-modules ESM) via Symbol.for sur globalThis.
|
|
3
|
+
* Totalement paresseux (aucun effet de bord au chargement du module) et immunisé contre le DOM Clobbering.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Retourne la pile LIFO partagée des FocusTrap actifs/en pause.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getSharedTrapStack<T>(): T[];
|
|
9
|
+
/**
|
|
10
|
+
* Retourne l'instance singleton partagée du ToastManager.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getSharedToastManager<T>(): T | null;
|
|
13
|
+
/**
|
|
14
|
+
* Définit l'instance singleton partagée du ToastManager.
|
|
15
|
+
*/
|
|
16
|
+
export declare function setSharedToastManager<T>(instance: T | null): void;
|
|
17
|
+
/**
|
|
18
|
+
* Enregistre un conteneur officiel créé par Wulf.Toast (protection anti-spoof FocusTrap).
|
|
19
|
+
*/
|
|
20
|
+
export declare function registerToastContainer(el: HTMLElement): void;
|
|
21
|
+
/**
|
|
22
|
+
* Retire un conteneur officiel Wulf.Toast du registre.
|
|
23
|
+
*/
|
|
24
|
+
export declare function unregisterToastContainer(el: HTMLElement): void;
|
|
25
|
+
/**
|
|
26
|
+
* Vérifie si un élément DOM est un conteneur officiel enregistré par Wulf.Toast.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isRegisteredToastContainer(el: Element | null): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Enregistre une région d'annonce officielle créée par Wulf.Toast.
|
|
31
|
+
*/
|
|
32
|
+
export declare function registerToastAnnouncer(el: HTMLElement): void;
|
|
33
|
+
/**
|
|
34
|
+
* Retire une région d'annonce officielle Wulf.Toast du registre.
|
|
35
|
+
*/
|
|
36
|
+
export declare function unregisterToastAnnouncer(el: HTMLElement): void;
|
|
37
|
+
/**
|
|
38
|
+
* Vérifie si un élément DOM est une région d'annonce officielle enregistrée par Wulf.Toast.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isRegisteredToastAnnouncer(el: Element | null): boolean;
|
|
@@ -23,8 +23,9 @@ export declare class FocusTrap extends AuditableComponent {
|
|
|
23
23
|
* Vérifie si un élément est réellement focusable, visible et actif dans le DOM.
|
|
24
24
|
*/
|
|
25
25
|
isFocusable(el: HTMLElement): boolean;
|
|
26
|
+
private collectFocusables;
|
|
26
27
|
/**
|
|
27
|
-
* Retourne tous les éléments focusables réels ordonnés dans le conteneur.
|
|
28
|
+
* Retourne tous les éléments focusables réels ordonnés dans le conteneur (Light DOM + Shadow DOM ouverts).
|
|
28
29
|
*/
|
|
29
30
|
getFocusableElements(): HTMLElement[];
|
|
30
31
|
/**
|
|
@@ -59,6 +60,7 @@ export declare class FocusTrap extends AuditableComponent {
|
|
|
59
60
|
* Détruit l'instance proprement.
|
|
60
61
|
*/
|
|
61
62
|
destroy(): void;
|
|
63
|
+
private isNodeInsideContainer;
|
|
62
64
|
private isEventInside;
|
|
63
65
|
private isInsideToastContainer;
|
|
64
66
|
private ensureContainerTabIndex;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,15 +6,27 @@ export * as FocusTrap from './focus-trap';
|
|
|
6
6
|
export { FocusTrap as WulfFocusTrap } from './focus-trap';
|
|
7
7
|
export * as Shortcut from './shortcut';
|
|
8
8
|
export { ShortcutManager as WulfShortcut } from './shortcut';
|
|
9
|
+
export * as Anchor from './anchor';
|
|
10
|
+
export { Anchor as WulfAnchor } from './anchor';
|
|
11
|
+
export * as Sortable from './sortable';
|
|
12
|
+
export { Sortable as WulfSortable } from './sortable';
|
|
13
|
+
export * as Autosize from './autosize';
|
|
14
|
+
export { Autosize as WulfAutosize } from './autosize';
|
|
15
|
+
export * as Undo from './undo';
|
|
16
|
+
export { UndoManager, UndoManager as WulfUndo } from './undo';
|
|
9
17
|
export { ScrollBlock } from './scroll';
|
|
10
18
|
export type { ScrollAxis, ScrollMode, ScrollInfo, ScrollToTarget, ScrollToTargetOptions, ScrollI18n, ScrollBlockOptions, IScrollBlock } from './scroll';
|
|
11
19
|
export { Masonry as WulfMasonry, LayoutEngine } from './masonry';
|
|
12
20
|
export type { MasonryGutter, MasonryItemPosition, MasonryI18n, MasonryOptions, IMasonry } from './masonry';
|
|
13
21
|
export { Toast as WulfToast, ToastInstance, ToastManager } from './toast';
|
|
14
|
-
export type { ToastPosition, ToastCloseReason, ToastI18n, ToastOptions, IToastInstance } from './toast';
|
|
22
|
+
export type { ToastPosition, ToastCloseReason, ToastAction, ToastPromiseMessage, ToastPromiseOptions, ToastI18n, ToastOptions, IToastInstance } from './toast';
|
|
15
23
|
export type { FocusTrapOptions, FocusTrapTarget } from './focus-trap';
|
|
16
24
|
export { ShortcutManager, ShortcutFormatter } from './shortcut';
|
|
17
25
|
export type { KeyModifier, ShortcutInfo, ShortcutHandler, ShortcutDefinition, RegisteredShortcut, NormalizedStep, ShortcutManagerOptions } from './shortcut';
|
|
26
|
+
export type { AnchorSide, AnchorAlignment, AnchorPlacement, AnchorPlacementOption, AnchorStrategy, AnchorOffset, AnchorRect, AnchorPositionResult, AnchorOptions, IAnchor } from './anchor';
|
|
27
|
+
export type { SortableAxis, SortableTrigger, SortableI18n, SortableStartDetail, SortableMoveDetail, SortableReorderDetail, SortableCancelDetail, SortableOptions, ISortable } from './sortable';
|
|
28
|
+
export type { AutosizeResizeMode, AutosizeMode, AutosizeResizeDetail, AutosizeOptions, IAutosize } from './autosize';
|
|
29
|
+
export type { UndoCloneStrategy, UndoActionType, UndoEntry, UndoPushOptions, UndoChangeDetail, UndoKeyboardOptions, UndoControlsTarget, UndoI18n, UndoOptions, IUndoManager } from './undo';
|
|
18
30
|
export * from './common/dom';
|
|
19
31
|
export * from './common/i18n';
|
|
20
32
|
export * from './common/AuditableComponent';
|
|
@@ -33,6 +33,12 @@ export interface ScrollBlockOptions extends AuditableOptions {
|
|
|
33
33
|
* @default false
|
|
34
34
|
*/
|
|
35
35
|
alwaysVisible?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Activer les ombres/fades de débordement 100% CSS pur (`animation-timeline: scroll()` en progressive enhancement).
|
|
38
|
+
* Zéro écouteur JavaScript supplémentaire, zéro impact sur le hot-path 60 FPS.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
scrollShadows?: boolean;
|
|
36
42
|
/**
|
|
37
43
|
* Libellé d'accessibilité ARIA attribué au viewport défilant.
|
|
38
44
|
* @default Dérivé de i18n.viewport ('Zone de contenu défilable')
|
|
@@ -11,6 +11,8 @@ export declare class ShortcutManager extends AuditableComponent {
|
|
|
11
11
|
private sequenceBuffer;
|
|
12
12
|
private sequenceTimer;
|
|
13
13
|
private isListening;
|
|
14
|
+
private isDestroyed;
|
|
15
|
+
private emittedAuditWarnings;
|
|
14
16
|
private boundListener;
|
|
15
17
|
private abortController;
|
|
16
18
|
private idCounter;
|
|
@@ -98,4 +98,9 @@ export interface ShortcutManagerOptions {
|
|
|
98
98
|
* Callback appelé si une exception survient dans un handler de raccourci.
|
|
99
99
|
*/
|
|
100
100
|
onError?: (error: Error, combo: string) => void;
|
|
101
|
+
/**
|
|
102
|
+
* Exécute un audit WAI-ARIA et émet un avertissement console lors de l'enregistrement.
|
|
103
|
+
* @default true
|
|
104
|
+
*/
|
|
105
|
+
audit?: boolean;
|
|
101
106
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { LocalizedComponent } from '../common/LocalizedComponent';
|
|
2
|
+
import { SortableI18n } from './i18n';
|
|
3
|
+
import { ISortable, SortableOptions } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Moteur headless zéro dépendance de réordonnancement intra-conteneur (Pointeur + Clavier WAI-ARIA).
|
|
6
|
+
*/
|
|
7
|
+
export declare class Sortable extends LocalizedComponent<SortableI18n> implements ISortable {
|
|
8
|
+
protected static _i18n: import("./i18n").I18nManager<SortableI18n>;
|
|
9
|
+
static readonly i18n: import("./i18n").I18nManager<SortableI18n>;
|
|
10
|
+
readonly container: HTMLElement | null;
|
|
11
|
+
private options;
|
|
12
|
+
private isDestroyed;
|
|
13
|
+
private isMovingFocus;
|
|
14
|
+
private dragSessionSeq;
|
|
15
|
+
private rootAbort;
|
|
16
|
+
private pointerDrag;
|
|
17
|
+
private keyboardGrab;
|
|
18
|
+
private hadRootClass;
|
|
19
|
+
private savedAttributes;
|
|
20
|
+
private addedHandles;
|
|
21
|
+
private activeAnimations;
|
|
22
|
+
private srStatusEl;
|
|
23
|
+
private announceTimerId;
|
|
24
|
+
private mutationObserver;
|
|
25
|
+
constructor(target: HTMLElement | string, options?: SortableOptions);
|
|
26
|
+
protected getAuditPrefix(): string;
|
|
27
|
+
protected getAuditTargetLabel(): string;
|
|
28
|
+
getItems(): HTMLElement[];
|
|
29
|
+
isDisabled(): boolean;
|
|
30
|
+
isDragging(): boolean;
|
|
31
|
+
setDisabled(disabled: boolean): void;
|
|
32
|
+
updateOptions(options: Partial<SortableOptions>): void;
|
|
33
|
+
refresh(): void;
|
|
34
|
+
move(fromIndex: number, toIndex: number): boolean;
|
|
35
|
+
cancel(): void;
|
|
36
|
+
audit(): string[];
|
|
37
|
+
destroy(): void;
|
|
38
|
+
private resolveI18n;
|
|
39
|
+
private getItemLabelText;
|
|
40
|
+
private mountStatusRegion;
|
|
41
|
+
private announce;
|
|
42
|
+
private resolveTriggerForItem;
|
|
43
|
+
private findItemForEvent;
|
|
44
|
+
private hasInteractiveDescendantBeforeItem;
|
|
45
|
+
private findHandleInPath;
|
|
46
|
+
private bindContainerEvents;
|
|
47
|
+
private observeDomChanges;
|
|
48
|
+
private handleFocusIn;
|
|
49
|
+
private handlePointerDown;
|
|
50
|
+
private activatePointerDrag;
|
|
51
|
+
private handlePointerMove;
|
|
52
|
+
private updatePointerPosition;
|
|
53
|
+
private computePointerTargetIndex;
|
|
54
|
+
private updateDropMarker;
|
|
55
|
+
private setDropMarkerVars;
|
|
56
|
+
private clearDropMarker;
|
|
57
|
+
private startAutoScrollLoop;
|
|
58
|
+
private handlePointerUp;
|
|
59
|
+
private handlePointerCancel;
|
|
60
|
+
private handlePointerEscape;
|
|
61
|
+
private endPointerDrag;
|
|
62
|
+
private handleKeyDown;
|
|
63
|
+
private startKeyboardGrab;
|
|
64
|
+
private computeKeyboardNextIndex;
|
|
65
|
+
private stepKeyboardGrab;
|
|
66
|
+
private clearKeyboardGrabVisuals;
|
|
67
|
+
private commitKeyboardGrab;
|
|
68
|
+
private cancelKeyboardGrab;
|
|
69
|
+
private handleFocusOut;
|
|
70
|
+
private snapshotRects;
|
|
71
|
+
private animateFlip;
|
|
72
|
+
private isRtl;
|
|
73
|
+
private emitReorder;
|
|
74
|
+
private safeInvoke;
|
|
75
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createI18nManager, I18nManager } from '../../common/i18n';
|
|
2
|
+
import { LocalizedComponent } from '../../common/LocalizedComponent';
|
|
3
|
+
import { SortableI18n } from './types';
|
|
4
|
+
export type { I18nManager };
|
|
5
|
+
export { createI18nManager, LocalizedComponent };
|
|
6
|
+
export * from './types';
|
|
7
|
+
export * from './fr';
|
|
8
|
+
export * from './en';
|
|
9
|
+
export declare const sortableI18n: I18nManager<SortableI18n>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contrat des messages d'accessibilité WAI-ARIA et libellés i18n pour Sortable.
|
|
3
|
+
*/
|
|
4
|
+
export interface SortableI18n {
|
|
5
|
+
/** Annonce lors de la saisie clavier d'un élément */
|
|
6
|
+
grabbed: (label: string, position: number, total: number) => string;
|
|
7
|
+
/** Annonce lors du déplacement d'un élément saisi */
|
|
8
|
+
moved: (label: string, position: number, total: number) => string;
|
|
9
|
+
/** Annonce lors du dépôt effectif d'un élément à une nouvelle position */
|
|
10
|
+
dropped: (label: string, position: number, total: number) => string;
|
|
11
|
+
/** Annonce lors de l'annulation du déplacement (Échap / cancel) */
|
|
12
|
+
cancelled: (label: string, position: number, total: number) => string;
|
|
13
|
+
/** Libellé par défaut si un élément n'a ni aria-label ni texte exploitable */
|
|
14
|
+
defaultItemLabel: (position: number) => string;
|
|
15
|
+
}
|