wulf.js 1.9.3 → 2.0.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.
Files changed (79) hide show
  1. package/README.md +118 -78
  2. package/changelog.md +60 -0
  3. package/dist/focus-trap.esm.js +202 -136
  4. package/dist/focus-trap.esm.js.map +3 -3
  5. package/dist/focus-trap.global.js +203 -137
  6. package/dist/focus-trap.global.js.map +3 -3
  7. package/dist/focus-trap.global.min.js +4 -4
  8. package/dist/focus-trap.global.min.js.map +4 -4
  9. package/dist/index.esm.js +2130 -858
  10. package/dist/index.esm.js.map +4 -4
  11. package/dist/index.global.js +2124 -852
  12. package/dist/index.global.js.map +4 -4
  13. package/dist/index.global.min.js +4 -4
  14. package/dist/index.global.min.js.map +4 -4
  15. package/dist/mask.css +1 -1
  16. package/dist/mask.css.map +2 -2
  17. package/dist/mask.esm.js +686 -330
  18. package/dist/mask.esm.js.map +3 -3
  19. package/dist/mask.global.js +687 -331
  20. package/dist/mask.global.js.map +3 -3
  21. package/dist/mask.global.min.js +4 -4
  22. package/dist/mask.global.min.js.map +4 -4
  23. package/dist/mask.layered.css +1 -0
  24. package/dist/mask.layered.css.map +7 -0
  25. package/dist/masonry.css +1 -1
  26. package/dist/masonry.css.map +2 -2
  27. package/dist/masonry.esm.js +248 -77
  28. package/dist/masonry.esm.js.map +3 -3
  29. package/dist/masonry.global.js +249 -78
  30. package/dist/masonry.global.js.map +3 -3
  31. package/dist/masonry.global.min.js +4 -4
  32. package/dist/masonry.global.min.js.map +4 -4
  33. package/dist/masonry.layered.css +1 -0
  34. package/dist/masonry.layered.css.map +7 -0
  35. package/dist/scroll.css +1 -1
  36. package/dist/scroll.css.map +2 -2
  37. package/dist/scroll.esm.js +462 -129
  38. package/dist/scroll.esm.js.map +3 -3
  39. package/dist/scroll.global.js +463 -130
  40. package/dist/scroll.global.js.map +3 -3
  41. package/dist/scroll.global.min.js +4 -4
  42. package/dist/scroll.global.min.js.map +4 -4
  43. package/dist/scroll.layered.css +1 -0
  44. package/dist/scroll.layered.css.map +7 -0
  45. package/dist/shortcut.esm.js +164 -48
  46. package/dist/shortcut.esm.js.map +3 -3
  47. package/dist/shortcut.global.js +165 -49
  48. package/dist/shortcut.global.js.map +3 -3
  49. package/dist/shortcut.global.min.js +2 -2
  50. package/dist/shortcut.global.min.js.map +4 -4
  51. package/dist/toast.css +1 -1
  52. package/dist/toast.css.map +2 -2
  53. package/dist/toast.esm.js +489 -124
  54. package/dist/toast.esm.js.map +3 -3
  55. package/dist/toast.global.js +490 -125
  56. package/dist/toast.global.js.map +3 -3
  57. package/dist/toast.global.min.js +3 -3
  58. package/dist/toast.global.min.js.map +4 -4
  59. package/dist/toast.layered.css +1 -0
  60. package/dist/toast.layered.css.map +7 -0
  61. package/dist/types/common/dom.d.ts +38 -0
  62. package/dist/types/focus-trap/FocusTrap.d.ts +14 -6
  63. package/dist/types/focus-trap/types.d.ts +2 -2
  64. package/dist/types/index.d.ts +10 -0
  65. package/dist/types/mask/BaseInputMask.d.ts +20 -0
  66. package/dist/types/mask/InputAmountMask.d.ts +2 -0
  67. package/dist/types/mask/InputEmailMask.d.ts +16 -1
  68. package/dist/types/mask/MaskEngine.d.ts +4 -0
  69. package/dist/types/masonry/Masonry.d.ts +10 -3
  70. package/dist/types/scroll/ScrollBlock.d.ts +31 -3
  71. package/dist/types/scroll/types.d.ts +13 -1
  72. package/dist/types/shortcut/ShortcutFormatter.d.ts +6 -0
  73. package/dist/types/shortcut/ShortcutManager.d.ts +1 -0
  74. package/dist/types/toast/Toast.d.ts +4 -0
  75. package/dist/types/toast/ToastInstance.d.ts +22 -10
  76. package/dist/types/toast/ToastManager.d.ts +37 -4
  77. package/dist/types/toast/i18n/types.d.ts +2 -0
  78. package/dist/types/toast/types.d.ts +9 -2
  79. package/package.json +16 -3
@@ -0,0 +1 @@
1
+ @layer wulf{:root{--mask-padding-y: .625rem;--mask-padding-x: .875rem;--mask-border-radius: inherit;--mask-bg-color: transparent;--mask-text-color: inherit;--mask-placeholder-color-light: #64748b;--mask-placeholder-color-dark: #94a3b8;--mask-placeholder-color: var(--mask-placeholder-color-light);--mask-selection-bg: rgba(59, 130, 246, .25);--mask-focus-outline: 2px solid currentColor;--mask-focus-outline-offset: 2px;--mask-autofill-ring-color: #2563eb}@supports (color: light-dark(white,black)){:root{--mask-placeholder-color: light-dark(var(--mask-placeholder-color-light), var(--mask-placeholder-color-dark));--mask-autofill-ring-color: light-dark(#2563eb, #60a5fa)}}@media(prefers-contrast:more){:root{--mask-placeholder-color-light: #334155;--mask-placeholder-color-dark: #e2e8f0;--mask-placeholder-color: var(--mask-placeholder-color-light);--mask-focus-outline: 3px solid currentColor}@supports (color: light-dark(white,black)){:root{--mask-placeholder-color: light-dark(var(--mask-placeholder-color-light), var(--mask-placeholder-color-dark))}}}.wulf-mask-wrapper{display:inline-grid;grid-template-columns:1fr;grid-template-rows:1fr;vertical-align:middle;box-sizing:border-box;position:relative;background:var(--mask-bg-color);border-radius:var(--mask-border-radius)}.wulf-mask-wrapper>input,.wulf-mask-wrapper .mask-ghost,.wulf-mask-wrapper:after{grid-area:1 / 1 / 2 / 2;box-sizing:border-box;margin:0;min-width:0;padding-block:var(--mask-padding-y);padding-inline:var(--mask-padding-x);font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;line-height:inherit;letter-spacing:inherit;font-kerning:none;font-variant-numeric:tabular-nums;border-radius:inherit}.wulf-mask-wrapper>input{position:relative;color:var(--mask-text-color);border:none}.wulf-mask-wrapper>input:focus-visible{outline:var(--mask-focus-outline);outline-offset:var(--mask-focus-outline-offset)}.wulf-mask-wrapper>input::selection{background:var(--mask-selection-bg);color:inherit}.wulf-mask-wrapper>input:is(:autofill,:-webkit-autofill){box-shadow:inset 0 0 0 2px var(--mask-autofill-ring-color)}.wulf-mask-wrapper>input:is(:autofill,:-webkit-autofill):focus-visible{outline:var(--mask-focus-outline);outline-offset:var(--mask-focus-outline-offset)}.wulf-mask-wrapper.has-visible-ghost:not([data-disabled])>input::placeholder,.wulf-mask-wrapper:not(.has-ghost)[data-mask]:not([data-mask=""]):not([data-disabled]):focus-within>input::placeholder{color:transparent;opacity:0}.wulf-mask-wrapper:has(>input:is(:autofill,:-webkit-autofill)) .mask-ghost-remaining,.wulf-mask-wrapper:has(>input:is(:autofill,:-webkit-autofill)):not(.has-ghost):after{color:transparent}.wulf-mask-wrapper .mask-ghost{position:relative;z-index:1;display:flex;align-items:center;background:transparent;pointer-events:none;-webkit-user-select:none;user-select:none;white-space:pre;overflow:hidden;border:0 solid transparent}.wulf-mask-wrapper .mask-ghost .mask-ghost-typed{visibility:hidden;color:transparent;flex-shrink:0}.wulf-mask-wrapper .mask-ghost .mask-ghost-remaining{color:var(--mask-placeholder-color);flex-shrink:0}.wulf-mask-wrapper .wulf-mask-sr-status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;pointer-events:none}.wulf-mask-wrapper.has-ghost:after,.wulf-mask-wrapper:has(.mask-ghost):after{content:none!important;display:none!important}.wulf-mask-wrapper:not(.has-ghost):after{content:attr(data-mask);content:attr(data-mask) / "";position:relative;z-index:1;display:flex;align-items:center;background:transparent;color:var(--mask-placeholder-color);pointer-events:none;-webkit-user-select:none;user-select:none;white-space:pre;border:none}.wulf-mask-wrapper[data-disabled] .mask-ghost,.wulf-mask-wrapper[data-disabled]:after{content:none!important;display:none!important}.wulf-mask-wrapper[data-disabled]>input{color:var(--mask-text-color)!important;caret-color:auto}.wulf-mask-wrapper.mask-focus-only:not(:focus-within):not([data-disabled]) .mask-ghost-remaining,.wulf-mask-wrapper.mask-focus-only:not(:focus-within):not([data-disabled]):after{color:transparent}.wulf-mask-wrapper.has-selection:not([data-disabled]) .mask-ghost-remaining,.wulf-mask-wrapper.has-selection:not([data-disabled]):not(.has-ghost):after{color:transparent!important;transition:none!important}@media(prefers-reduced-motion:no-preference){.wulf-mask-wrapper .mask-ghost .mask-ghost-remaining,.wulf-mask-wrapper:not(.has-ghost):after{transition:color .15s ease}}@media(forced-colors:active){.wulf-mask-wrapper .mask-ghost .mask-ghost-typed{visibility:hidden!important;color:transparent!important}.wulf-mask-wrapper .mask-ghost .mask-ghost-remaining{color:GrayText!important}.wulf-mask-wrapper:not(.has-ghost):after{color:GrayText!important}.wulf-mask-wrapper>input:is(:autofill,:-webkit-autofill){outline:2px solid Highlight}.wulf-mask-wrapper>input:focus-visible,.wulf-mask-wrapper>input:is(:autofill,:-webkit-autofill):focus-visible{outline:2px solid Highlight}}.wulf-mask-wrapper.align-right>input,.wulf-mask-wrapper[data-align=right]>input,.wulf-mask-wrapper[data-mask-align=right]>input{text-align:right}.wulf-mask-wrapper.align-right .mask-ghost,.wulf-mask-wrapper[data-align=right] .mask-ghost,.wulf-mask-wrapper[data-mask-align=right] .mask-ghost{justify-content:right;text-align:right}.wulf-mask-wrapper.align-right:not(.has-ghost):after,.wulf-mask-wrapper[data-align=right]:not(.has-ghost):after,.wulf-mask-wrapper[data-mask-align=right]:not(.has-ghost):after{justify-content:right;text-align:right}.wulf-mask-wrapper.align-center>input,.wulf-mask-wrapper[data-align=center]>input,.wulf-mask-wrapper[data-mask-align=center]>input{text-align:center}.wulf-mask-wrapper.align-center .mask-ghost,.wulf-mask-wrapper[data-align=center] .mask-ghost,.wulf-mask-wrapper[data-mask-align=center] .mask-ghost{justify-content:center;text-align:center}.wulf-mask-wrapper.align-center:not(.has-ghost):after,.wulf-mask-wrapper[data-align=center]:not(.has-ghost):after,.wulf-mask-wrapper[data-mask-align=center]:not(.has-ghost):after{justify-content:center;text-align:center}.wulf-mask-wrapper.align-left>input,.wulf-mask-wrapper[data-align=left]>input,.wulf-mask-wrapper[data-mask-align=left]>input{text-align:left}.wulf-mask-wrapper.align-left .mask-ghost,.wulf-mask-wrapper[data-align=left] .mask-ghost,.wulf-mask-wrapper[data-mask-align=left] .mask-ghost{justify-content:left;text-align:left}.wulf-mask-wrapper.align-left:not(.has-ghost):after,.wulf-mask-wrapper[data-align=left]:not(.has-ghost):after,.wulf-mask-wrapper[data-mask-align=left]:not(.has-ghost):after{justify-content:left;text-align:left}}
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["<stdin>"],
4
+ "sourcesContent": ["@layer wulf {\n/* ==========================================================================\n InputMask LESS - Architecture CSS Grid & ::after\n Namespace : .wulf-mask-wrapper\n Compatible polices proportionnelles (non-monospace) et monospaces.\n Z\u00E9ro d\u00E9calage de s\u00E9lection, gestion du mode d\u00E9sactiv\u00E9 et focus-only.\n ========================================================================== */\n:root {\n --mask-padding-y: 0.625rem;\n --mask-padding-x: 0.875rem;\n --mask-border-radius: inherit;\n --mask-bg-color: transparent;\n --mask-text-color: inherit;\n --mask-placeholder-color-light: #64748b;\n --mask-placeholder-color-dark: #94a3b8;\n /* Slate-500 : Contraste >= 4.5:1 sur fond blanc (WCAG 1.4.3 AA) */\n --mask-placeholder-color: var(--mask-placeholder-color-light);\n --mask-selection-bg: rgba(59, 130, 246, 0.25);\n --mask-focus-outline: 2px solid currentColor;\n --mask-focus-outline-offset: 2px;\n --mask-autofill-ring-color: #2563eb;\n}\n@supports (color: light-dark(white, black)) {\n :root {\n --mask-placeholder-color: light-dark(var(--mask-placeholder-color-light), var(--mask-placeholder-color-dark));\n --mask-autofill-ring-color: light-dark(#2563eb, #60a5fa);\n }\n}\n@media (prefers-contrast: more) {\n :root {\n --mask-placeholder-color-light: #334155;\n --mask-placeholder-color-dark: #e2e8f0;\n --mask-placeholder-color: var(--mask-placeholder-color-light);\n --mask-focus-outline: 3px solid currentColor;\n }\n @supports (color: light-dark(white, black)) {\n :root {\n --mask-placeholder-color: light-dark(var(--mask-placeholder-color-light), var(--mask-placeholder-color-dark));\n }\n }\n}\n/* ==========================================================================\n Conteneur principal isol\u00E9 sous namespace .wulf-mask-wrapper\n ========================================================================== */\n.wulf-mask-wrapper {\n display: inline-grid;\n grid-template-columns: 1fr;\n grid-template-rows: 1fr;\n vertical-align: middle;\n box-sizing: border-box;\n position: relative;\n background: var(--mask-bg-color);\n border-radius: var(--mask-border-radius);\n /* Superposition parfaite de l'input, du ghost et du pseudo-\u00E9l\u00E9ment ::after */\n /* Input dans le flux */\n /* Masque le placeholder natif uniquement lorsqu'un ghost ou gabarit actif est visible */\n /* Masque le texte fant\u00F4me si le navigateur vient de remplir via autofill */\n /* Conteneur fant\u00F4me */\n /* Statut masqu\u00E9 visuellement pour annonce AT des compl\u00E9tions inline */\n /* Fallback ::after pour usage pur CSS sans instance JS .mask-ghost */\n /* Mode d\u00E9sactiv\u00E9 */\n /* Option focus-only */\n /* Masquage instantan\u00E9 du fant\u00F4me lors d'une s\u00E9lection active pour \u00E9viter toute surbrillance doubl\u00E9e */\n /* ==========================================================================\n Alignements textuels (gauche, droite, centre)\n ========================================================================== */\n}\n.wulf-mask-wrapper > input,\n.wulf-mask-wrapper .mask-ghost,\n.wulf-mask-wrapper::after {\n grid-area: 1 / 1 / 2 / 2;\n box-sizing: border-box;\n margin: 0;\n min-width: 0;\n padding-block: var(--mask-padding-y);\n padding-inline: var(--mask-padding-x);\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n font-style: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n font-kerning: none;\n font-variant-numeric: tabular-nums;\n border-radius: inherit;\n}\n.wulf-mask-wrapper > input {\n position: relative;\n color: var(--mask-text-color);\n border: none;\n}\n.wulf-mask-wrapper > input:focus-visible {\n outline: var(--mask-focus-outline);\n outline-offset: var(--mask-focus-outline-offset);\n}\n.wulf-mask-wrapper > input::selection {\n background: var(--mask-selection-bg);\n color: inherit;\n}\n.wulf-mask-wrapper > input:is(:autofill, :-webkit-autofill) {\n box-shadow: inset 0 0 0 2px var(--mask-autofill-ring-color);\n}\n.wulf-mask-wrapper > input:is(:autofill, :-webkit-autofill):focus-visible {\n outline: var(--mask-focus-outline);\n outline-offset: var(--mask-focus-outline-offset);\n}\n.wulf-mask-wrapper.has-visible-ghost:not([data-disabled]) > input::placeholder,\n.wulf-mask-wrapper:not(.has-ghost)[data-mask]:not([data-mask=\"\"]):not([data-disabled]):focus-within > input::placeholder {\n color: transparent;\n opacity: 0;\n}\n.wulf-mask-wrapper:has( > input:is(:autofill, :-webkit-autofill)) .mask-ghost-remaining,\n.wulf-mask-wrapper:has( > input:is(:autofill, :-webkit-autofill)):not(.has-ghost)::after {\n color: transparent;\n}\n.wulf-mask-wrapper .mask-ghost {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n background: transparent;\n pointer-events: none;\n -webkit-user-select: none;\n user-select: none;\n white-space: pre;\n overflow: hidden;\n border: 0 solid transparent;\n}\n.wulf-mask-wrapper .mask-ghost .mask-ghost-typed {\n visibility: hidden;\n color: transparent;\n flex-shrink: 0;\n}\n.wulf-mask-wrapper .mask-ghost .mask-ghost-remaining {\n color: var(--mask-placeholder-color);\n flex-shrink: 0;\n}\n.wulf-mask-wrapper .wulf-mask-sr-status {\n position: absolute;\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.wulf-mask-wrapper.has-ghost::after,\n.wulf-mask-wrapper:has(.mask-ghost)::after {\n content: none !important;\n display: none !important;\n}\n.wulf-mask-wrapper:not(.has-ghost)::after {\n content: attr(data-mask);\n content: attr(data-mask) / \"\";\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n background: transparent;\n color: var(--mask-placeholder-color);\n pointer-events: none;\n -webkit-user-select: none;\n user-select: none;\n white-space: pre;\n border: none;\n}\n.wulf-mask-wrapper[data-disabled] .mask-ghost,\n.wulf-mask-wrapper[data-disabled]::after {\n content: none !important;\n display: none !important;\n}\n.wulf-mask-wrapper[data-disabled] > input {\n color: var(--mask-text-color) !important;\n caret-color: auto;\n}\n.wulf-mask-wrapper.mask-focus-only:not(:focus-within):not([data-disabled]) .mask-ghost-remaining,\n.wulf-mask-wrapper.mask-focus-only:not(:focus-within):not([data-disabled])::after {\n color: transparent;\n}\n.wulf-mask-wrapper.has-selection:not([data-disabled]) .mask-ghost-remaining,\n.wulf-mask-wrapper.has-selection:not([data-disabled]):not(.has-ghost)::after {\n color: transparent !important;\n transition: none !important;\n}\n@media (prefers-reduced-motion: no-preference) {\n .wulf-mask-wrapper .mask-ghost .mask-ghost-remaining,\n .wulf-mask-wrapper:not(.has-ghost)::after {\n transition: color 0.15s ease;\n }\n}\n@media (forced-colors: active) {\n .wulf-mask-wrapper .mask-ghost .mask-ghost-typed {\n visibility: hidden !important;\n color: transparent !important;\n }\n .wulf-mask-wrapper .mask-ghost .mask-ghost-remaining {\n color: GrayText !important;\n }\n .wulf-mask-wrapper:not(.has-ghost)::after {\n color: GrayText !important;\n }\n .wulf-mask-wrapper > input:is(:autofill, :-webkit-autofill) {\n outline: 2px solid Highlight;\n }\n .wulf-mask-wrapper > input:focus-visible,\n .wulf-mask-wrapper > input:is(:autofill, :-webkit-autofill):focus-visible {\n outline: 2px solid Highlight;\n }\n}\n.wulf-mask-wrapper.align-right > input,\n.wulf-mask-wrapper[data-align=\"right\"] > input,\n.wulf-mask-wrapper[data-mask-align=\"right\"] > input {\n text-align: right;\n}\n.wulf-mask-wrapper.align-right .mask-ghost,\n.wulf-mask-wrapper[data-align=\"right\"] .mask-ghost,\n.wulf-mask-wrapper[data-mask-align=\"right\"] .mask-ghost {\n justify-content: right;\n text-align: right;\n}\n.wulf-mask-wrapper.align-right:not(.has-ghost)::after,\n.wulf-mask-wrapper[data-align=\"right\"]:not(.has-ghost)::after,\n.wulf-mask-wrapper[data-mask-align=\"right\"]:not(.has-ghost)::after {\n justify-content: right;\n text-align: right;\n}\n.wulf-mask-wrapper.align-center > input,\n.wulf-mask-wrapper[data-align=\"center\"] > input,\n.wulf-mask-wrapper[data-mask-align=\"center\"] > input {\n text-align: center;\n}\n.wulf-mask-wrapper.align-center .mask-ghost,\n.wulf-mask-wrapper[data-align=\"center\"] .mask-ghost,\n.wulf-mask-wrapper[data-mask-align=\"center\"] .mask-ghost {\n justify-content: center;\n text-align: center;\n}\n.wulf-mask-wrapper.align-center:not(.has-ghost)::after,\n.wulf-mask-wrapper[data-align=\"center\"]:not(.has-ghost)::after,\n.wulf-mask-wrapper[data-mask-align=\"center\"]:not(.has-ghost)::after {\n justify-content: center;\n text-align: center;\n}\n.wulf-mask-wrapper.align-left > input,\n.wulf-mask-wrapper[data-align=\"left\"] > input,\n.wulf-mask-wrapper[data-mask-align=\"left\"] > input {\n text-align: left;\n}\n.wulf-mask-wrapper.align-left .mask-ghost,\n.wulf-mask-wrapper[data-align=\"left\"] .mask-ghost,\n.wulf-mask-wrapper[data-mask-align=\"left\"] .mask-ghost {\n justify-content: left;\n text-align: left;\n}\n.wulf-mask-wrapper.align-left:not(.has-ghost)::after,\n.wulf-mask-wrapper[data-align=\"left\"]:not(.has-ghost)::after,\n.wulf-mask-wrapper[data-mask-align=\"left\"]:not(.has-ghost)::after {\n justify-content: left;\n text-align: left;\n}\n\n}"],
5
+ "mappings": "AAAA,YAOA,MACE,kBAAkB,QAClB,kBAAkB,QAClB,sBAAsB,QACtB,iBAAiB,YACjB,mBAAmB,QACnB,gCAAgC,QAChC,+BAA+B,QAE/B,0BAA0B,IAAI,gCAC9B,qBAAqB,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,KACxC,sBAAsB,IAAI,MAAM,aAChC,6BAA6B,IAC7B,4BAA4B,OAC9B,CACA,UAAU,CAAC,KAAK,EAAE,WAAW,KAAK,CAAE,QAClC,MACE,0BAA0B,WAAW,IAAI,+BAA+B,EAAE,IAAI,gCAC9E,4BAA4B,WAAW,OAAO,EAAE,QAClD,CACF,CACA,OAAO,iBAAmB,MACxB,MACE,gCAAgC,QAChC,+BAA+B,QAC/B,0BAA0B,IAAI,gCAC9B,sBAAsB,IAAI,MAAM,YAClC,CACA,UAAU,CAAC,KAAK,EAAE,WAAW,KAAK,CAAE,QAClC,MACE,0BAA0B,WAAW,IAAI,+BAA+B,EAAE,IAA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,CACA,CAzLC,iBAyLiB,CAAC,YAAa,CAAE,MAClC,CA1LC,iBA0LiB,CAAC,kBAAqB,CAAE,MAC1C,CA3LC,iBA2LiB,CAAC,uBAA0B,CAAE,MAC7C,WAAY,MACd,CACA,CA9LC,iBA8LiB,CALC,aAKa,CAtKZ,WAuKpB,CA/LC,iBA+LiB,CAAC,mBAAqB,CAvKpB,WAwKpB,CAhMC,iBAgMiB,CAAC,wBAA0B,CAxKzB,WAyKlB,gBAAiB,OACjB,WAAY,MACd,CACA,CApMC,iBAoMiB,CAXC,YAWY,KAAK,CArIZ,UAqIuB,OAC/C,CArMC,iBAqMiB,CAAC,kBAAoB,KAAK,CAtIpB,UAsI+B,OACvD,CAtMC,iBAsMiB,CAAC,uBAAyB,KAAK,CAvIzB,UAuIoC,OAC1D,gBAAiB,OACjB,WAAY,MACd,CACA,CA1MC,iBA0MiB,CAAC,UAAW,CAAE,MAChC,CA3MC,iBA2MiB,CAAC,gBAAmB,CAAE,MACxC,CA5MC,iBA4MiB,CAAC,qBAAwB,CAAE,MAC3C,WAAY,IACd,CACA,CA/MC,iBA+MiB,CALC,WAKW,CAvLV,WAwLpB,CAhNC,iBAgNiB,CAAC,iBAAmB,CAxLlB,WAyLpB,CAjNC,iBAiNiB,CAAC,sBAAwB,CAzLvB,WA0LlB,gBAAiB,KACjB,WAAY,IACd,CACA,CArNC,iBAqNiB,CAXC,UAWU,KAAK,CAtJV,UAsJqB,OAC7C,CAtNC,iBAsNiB,CAAC,gBAAkB,KAAK,CAvJlB,UAuJ6B,OACrD,CAvNC,iBAuNiB,CAAC,qBAAuB,KAAK,CAxJvB,UAwJkC,OACxD,gBAAiB,KACjB,WAAY,IACd,CAEA",
6
+ "names": []
7
+ }
package/dist/masonry.css CHANGED
@@ -1 +1 @@
1
- :root{--wulf-masonry-duration: .3s;--wulf-masonry-timing: cubic-bezier(.2, .8, .2, 1)}.wulf-masonry{position:relative;box-sizing:border-box;width:100%;transition:height var(--wulf-masonry-duration) var(--wulf-masonry-timing);reading-flow:masonry-order}.wulf-masonry.wulf-masonry--fit-width{margin-left:auto;margin-right:auto}.wulf-masonry>.wulf-masonry-item{position:absolute;top:0;left:0;margin:0;box-sizing:border-box;width:var(--wulf-masonry-w, auto);transform:translate3d(var(--wulf-masonry-x, 0px),var(--wulf-masonry-y, 0px),0);transition:transform var(--wulf-masonry-duration) var(--wulf-masonry-timing),opacity var(--wulf-masonry-duration) ease;will-change:transform}.wulf-masonry>.wulf-masonry-item.wulf-masonry-item--hidden{opacity:0;transform:translate3d(var(--wulf-masonry-x, 0px),calc(var(--wulf-masonry-y, 0px) + 20px),0) scale(.95);pointer-events:none}.wulf-masonry.wulf-masonry--native{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--wulf-masonry-col-min, 250px),1fr));grid-template-rows:masonry;gap:var(--wulf-masonry-gutter-y, 16px) var(--wulf-masonry-gutter-x, 16px);height:auto!important}.wulf-masonry.wulf-masonry--native>.wulf-masonry-item{position:static!important;transform:none!important;width:auto!important;transition:none!important}.wulf-masonry.wulf-masonry--native>.wulf-masonry-item[data-masonry-span="2"],.wulf-masonry.wulf-masonry--native>.wulf-masonry-item.span-2{grid-column:span 2}.wulf-masonry.wulf-masonry--native>.wulf-masonry-item[data-masonry-span="3"],.wulf-masonry.wulf-masonry--native>.wulf-masonry-item.span-3{grid-column:span 3}@media(prefers-reduced-motion:reduce){.wulf-masonry,.wulf-masonry>.wulf-masonry-item{transition-duration:0s!important;transition-delay:0s!important}}
1
+ :root{--wulf-masonry-duration: .3s;--wulf-masonry-timing: cubic-bezier(.2, .8, .2, 1);--wulf-masonry-stagger: 0ms}.wulf-masonry{position:relative;contain:style;box-sizing:border-box;width:100%}.wulf-masonry.wulf-masonry--fit-width{margin-inline:auto}.wulf-masonry>.wulf-masonry-item{position:absolute;top:0;left:0;margin:0;box-sizing:border-box;width:var(--wulf-masonry-w, auto);translate:var(--wulf-masonry-x, 0px) var(--wulf-masonry-y, 0px);scale:1;opacity:1}.wulf-masonry>.wulf-masonry-item.wulf-masonry-item--hidden{opacity:0;translate:var(--wulf-masonry-x, 0px) calc(var(--wulf-masonry-y, 0px) + 20px);scale:.95;pointer-events:none;transition-delay:0ms!important}.wulf-masonry.wulf-masonry--native{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--wulf-masonry-col-min, 250px),1fr));grid-template-rows:masonry;gap:var(--wulf-masonry-gutter-y, 16px) var(--wulf-masonry-gutter-x, 16px)}@supports (display: grid-lanes){.wulf-masonry.wulf-masonry--native{display:grid-lanes}}.wulf-masonry.wulf-masonry--native:where(.wulf-masonry){height:auto}.wulf-masonry.wulf-masonry--native>.wulf-masonry-item:where(.wulf-masonry-item){position:static;translate:none;scale:1;width:auto;transition:none}.wulf-masonry.wulf-masonry--native>.wulf-masonry-item[data-masonry-span="2"],.wulf-masonry.wulf-masonry--native>.wulf-masonry-item.span-2,.wulf-masonry.wulf-masonry--native>.wulf-masonry-item.col-span-2{grid-column:span 2}.wulf-masonry.wulf-masonry--native>.wulf-masonry-item[data-masonry-span="3"],.wulf-masonry.wulf-masonry--native>.wulf-masonry-item.span-3,.wulf-masonry.wulf-masonry--native>.wulf-masonry-item.col-span-3{grid-column:span 3}@media(prefers-reduced-motion:no-preference){.wulf-masonry:not(.wulf-masonry--native)>.wulf-masonry-item{transition:translate var(--wulf-masonry-duration) var(--wulf-masonry-timing),scale var(--wulf-masonry-duration) var(--wulf-masonry-timing),opacity var(--wulf-masonry-duration) ease;transition-delay:calc(var(--wulf-masonry-index, 0) * var(--wulf-masonry-stagger, 0ms))}@supports (transition-delay: calc(sibling-index()*1ms)){.wulf-masonry:not(.wulf-masonry--native)>.wulf-masonry-item{transition-delay:calc((sibling-index() - 1) * var(--wulf-masonry-stagger, 0ms))}}}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["<stdin>"],
4
- "sourcesContent": ["/**\n * Styles encapsul\u00E9s pour Wulf.Masonry\n * Pr\u00E9fixe unifi\u00E9 .wulf-\n * Positionnement mat\u00E9riel acc\u00E9l\u00E9r\u00E9 par GPU, transitions fluides et tokens CSS surchargeables.\n */\n:root {\n --wulf-masonry-duration: 300ms;\n --wulf-masonry-timing: cubic-bezier(0.2, 0.8, 0.2, 1);\n}\n.wulf-masonry {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n transition: height var(--wulf-masonry-duration) var(--wulf-masonry-timing);\n reading-flow: masonry-order;\n}\n.wulf-masonry.wulf-masonry--fit-width {\n margin-left: auto;\n margin-right: auto;\n}\n.wulf-masonry > .wulf-masonry-item {\n position: absolute;\n top: 0;\n left: 0;\n margin: 0;\n box-sizing: border-box;\n width: var(--wulf-masonry-w, auto);\n transform: translate3d(var(--wulf-masonry-x, 0px), var(--wulf-masonry-y, 0px), 0);\n transition: transform var(--wulf-masonry-duration) var(--wulf-masonry-timing), opacity var(--wulf-masonry-duration) ease;\n will-change: transform;\n}\n.wulf-masonry > .wulf-masonry-item.wulf-masonry-item--hidden {\n opacity: 0;\n transform: translate3d(var(--wulf-masonry-x, 0px), calc(var(--wulf-masonry-y, 0px) + 20px), 0) scale(0.95);\n pointer-events: none;\n}\n.wulf-masonry.wulf-masonry--native {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(var(--wulf-masonry-col-min, 250px), 1fr));\n grid-template-rows: masonry;\n gap: var(--wulf-masonry-gutter-y, 16px) var(--wulf-masonry-gutter-x, 16px);\n height: auto !important;\n}\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item {\n position: static !important;\n transform: none !important;\n width: auto !important;\n transition: none !important;\n}\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item[data-masonry-span=\"2\"],\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item.span-2 {\n grid-column: span 2;\n}\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item[data-masonry-span=\"3\"],\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item.span-3 {\n grid-column: span 3;\n}\n@media (prefers-reduced-motion: reduce) {\n .wulf-masonry,\n .wulf-masonry > .wulf-masonry-item {\n transition-duration: 0s !important;\n transition-delay: 0s !important;\n }\n}\n"],
5
- "mappings": "AAKA,MACE,yBAAyB,IACzB,uBAAuB,aAAa,EAAG,EAAE,EAAG,EAAE,EAAG,EAAE,EACrD,CACA,CAAC,aACC,SAAU,SACV,WAAY,WACZ,MAAO,KACP,WAAY,OAAO,IAAI,yBAAyB,IAAI,uBACpD,aAAc,aAChB,CACA,CAPC,YAOY,CAAC,wBACZ,YAAa,KACb,aAAc,IAChB,CACA,CAXC,YAWa,CAAE,CAAC,kBACf,SAAU,SACV,IAAK,EACL,KAAM,EAvBR,OAwBU,EACR,WAAY,WACZ,MAAO,IAAI,gBAAgB,EAAE,MAC7B,UAAW,YAAY,IAAI,gBAAgB,EAAE,IAAI,CAAE,IAAI,gBAAgB,EAAE,IAAI,CAAE,GAC/E,WAAY,UAAU,IAAI,yBAAyB,IAAI,sBAAsB,CAAE,QAAQ,IAAI,yBAAyB,KACpH,YAAa,SACf,CACA,CAtBC,YAsBa,CAAE,CAXC,iBAWiB,CAAC,0BACjC,QAAS,EACT,UAAW,YAAY,IAAI,gBAAgB,EAAE,IAAI,CAAE,KAAK,IAAI,gBAAgB,EAAE,KAAK,EAAE,KAAK,CAAE,GAAG,MAAM,KACrG,eAAgB,IAClB,CACA,CA3BC,YA2BY,CAAC,qBACZ,QAAS,KACT,sBAAuB,OAAO,SAAS,CAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,CAAE,MACpF,mBAAoB,QACpB,IAAK,IAAI,uBAAuB,EAAE,MAAM,IAAI,uBAAuB,EAAE,MACrE,OAAQ,cACV,CACA,CAlCC,YAkCY,CAPC,oBAOqB,CAAE,CAvBpB,kBAwBf,SAAU,iBACV,UAAW,eACX,MAAO,eACP,WAAY,cACd,CACA,CAxCC,YAwCY,CAbC,oBAaqB,CAAE,CA7BpB,iBA6BsC,CAAC,uBACxD,CAzCC,YAyCY,CAdC,oBAcqB,CAAE,CA9BpB,iBA8BsC,CAAC,OACtD,YAAa,KAAK,CACpB,CACA,CA5CC,YA4CY,CAjBC,oBAiBqB,CAAE,CAjCpB,iBAiCsC,CAAC,uBACxD,CA7CC,YA6CY,CAlBC,oBAkBqB,CAAE,CAlCpB,iBAkCsC,CAAC,OACtD,YAAa,KAAK,CACpB,CACA,OAAO,uBAAyB,QAC9B,CAjDD,aAkDC,CAlDD,YAkDe,CAAE,CAvCD,kBAwCb,oBAAqB,aACrB,iBAAkB,YACpB,CACF",
4
+ "sourcesContent": ["/**\n * Styles encapsul\u00E9s pour Wulf.Masonry\n * Pr\u00E9fixe unifi\u00E9 .wulf-\n * Positionnement mat\u00E9riel acc\u00E9l\u00E9r\u00E9 par GPU via propri\u00E9t\u00E9s individuelles et tokens CSS surchargeables.\n */\n:root {\n --wulf-masonry-duration: 300ms;\n --wulf-masonry-timing: cubic-bezier(0.2, 0.8, 0.2, 1);\n --wulf-masonry-stagger: 0ms;\n}\n.wulf-masonry {\n position: relative;\n contain: style;\n box-sizing: border-box;\n width: 100%;\n}\n.wulf-masonry.wulf-masonry--fit-width {\n margin-inline: auto;\n}\n.wulf-masonry > .wulf-masonry-item {\n position: absolute;\n top: 0;\n left: 0;\n margin: 0;\n box-sizing: border-box;\n width: var(--wulf-masonry-w, auto);\n translate: var(--wulf-masonry-x, 0px) var(--wulf-masonry-y, 0px);\n scale: 1;\n opacity: 1;\n}\n.wulf-masonry > .wulf-masonry-item.wulf-masonry-item--hidden {\n opacity: 0;\n translate: var(--wulf-masonry-x, 0px) calc(var(--wulf-masonry-y, 0px) + 20px);\n scale: 0.95;\n pointer-events: none;\n transition-delay: 0ms !important;\n}\n.wulf-masonry.wulf-masonry--native {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(var(--wulf-masonry-col-min, 250px), 1fr));\n grid-template-rows: masonry;\n gap: var(--wulf-masonry-gutter-y, 16px) var(--wulf-masonry-gutter-x, 16px);\n}\n@supports (display: grid-lanes) {\n .wulf-masonry.wulf-masonry--native {\n display: grid-lanes;\n }\n}\n.wulf-masonry.wulf-masonry--native:where(.wulf-masonry) {\n height: auto;\n}\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item:where(.wulf-masonry-item) {\n position: static;\n translate: none;\n scale: 1;\n width: auto;\n transition: none;\n}\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item[data-masonry-span=\"2\"],\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item.span-2,\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item.col-span-2 {\n grid-column: span 2;\n}\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item[data-masonry-span=\"3\"],\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item.span-3,\n.wulf-masonry.wulf-masonry--native > .wulf-masonry-item.col-span-3 {\n grid-column: span 3;\n}\n@media (prefers-reduced-motion: no-preference) {\n .wulf-masonry:not(.wulf-masonry--native) > .wulf-masonry-item {\n transition: translate var(--wulf-masonry-duration) var(--wulf-masonry-timing), scale var(--wulf-masonry-duration) var(--wulf-masonry-timing), opacity var(--wulf-masonry-duration) ease;\n transition-delay: calc(var(--wulf-masonry-index, 0) * var(--wulf-masonry-stagger, 0ms));\n }\n @supports (transition-delay: calc(sibling-index() * 1ms)) {\n .wulf-masonry:not(.wulf-masonry--native) > .wulf-masonry-item {\n transition-delay: calc((sibling-index() - 1) * var(--wulf-masonry-stagger, 0ms));\n }\n }\n}\n"],
5
+ "mappings": "AAKA,MACE,yBAAyB,IACzB,uBAAuB,aAAa,EAAG,EAAE,EAAG,EAAE,EAAG,EAAE,GACnD,wBAAwB,GAC1B,CACA,CAAC,aACC,SAAU,SACV,QAAS,MACT,WAAY,WACZ,MAAO,IACT,CACA,CANC,YAMY,CAAC,wBACZ,cAAe,IACjB,CACA,CATC,YASa,CAAE,CAAC,kBACf,SAAU,SACV,IAAK,EACL,KAAM,EAtBR,OAuBU,EACR,WAAY,WACZ,MAAO,IAAI,gBAAgB,EAAE,MAC7B,UAAW,IAAI,gB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E,CAlD5B,kBAmDb,WAAY,UAAU,IAAI,yBAAyB,IAAI,sBAAsB,CAAE,MAAM,IAAI,yBAAyB,IAAI,sBAAsB,CAAE,QAAQ,IAAI,yBAAyB,KACnL,iBAAkB,KAAK,IAAI,oBAAoB,EAAE,GAAG,EAAE,IAAI,sBAAsB,EAAE,KACpF,CACA,UAAU,CAAC,gBAAgB,EAAE,KAAK,eAAgB,CAAE,MAClD,CAhEH,YAgEgB,KAAK,CArCR,qBAqC+B,CAAE,CAvD9B,kBAwDX,iBAAkB,KAAK,CAAC,gBAAgB,EAAE,GAAG,EAAE,IAAI,sBAAsB,EAAE,KAC7E,CACF,CACF",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,76 @@
1
+ // src/common/dom.ts
2
+ function getSafeWulfNamespace() {
3
+ if (typeof window === "undefined") return null;
4
+ const win = window;
5
+ const existing = win.Wulf;
6
+ if (!existing || typeof existing !== "object" || typeof Node !== "undefined" && existing instanceof Node || typeof HTMLCollection !== "undefined" && existing instanceof HTMLCollection) {
7
+ const fresh = {};
8
+ win.Wulf = fresh;
9
+ return fresh;
10
+ }
11
+ return existing;
12
+ }
13
+ function parseCssDurationMs(duration, fallbackMs = 300, maxMs = 6e4) {
14
+ const safeFallback = Number.isFinite(fallbackMs) && fallbackMs >= 0 ? Math.min(fallbackMs, maxMs) : 300;
15
+ if (typeof duration === "number") {
16
+ return Number.isFinite(duration) && duration >= 0 ? Math.min(duration, maxMs) : safeFallback;
17
+ }
18
+ if (typeof duration === "string") {
19
+ const parts = duration.split(",");
20
+ let maxParsed = -1;
21
+ for (const part of parts) {
22
+ const match = /^\+?(\d+(?:\.\d+)?|\.\d+)(ms|s)?$/i.exec(part.trim());
23
+ if (match) {
24
+ const raw = parseFloat(match[1]);
25
+ if (Number.isFinite(raw) && raw >= 0) {
26
+ const ms = match[2]?.toLowerCase() === "s" ? raw * 1e3 : raw;
27
+ if (ms > maxParsed) {
28
+ maxParsed = ms;
29
+ }
30
+ }
31
+ }
32
+ }
33
+ if (maxParsed >= 0) {
34
+ return Math.min(maxParsed, maxMs);
35
+ }
36
+ }
37
+ return safeFallback;
38
+ }
39
+ function prefersReducedMotion() {
40
+ return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
41
+ }
42
+ function waitForAnimations(element, fallbackMs, signal) {
43
+ const safeFallback = Number.isFinite(fallbackMs) ? Math.min(fallbackMs, 6e4) : 300;
44
+ if (signal?.aborted || safeFallback <= 0 || prefersReducedMotion()) {
45
+ return Promise.resolve();
46
+ }
47
+ const animations = typeof element.getAnimations === "function" ? element.getAnimations().filter((a) => {
48
+ if (a.playState !== "running") return false;
49
+ const timing = a.effect?.getComputedTiming?.();
50
+ return timing ? Number.isFinite(timing.endTime) : true;
51
+ }) : [];
52
+ if (animations.length === 0) {
53
+ return Promise.resolve();
54
+ }
55
+ return new Promise((resolve) => {
56
+ let settled = false;
57
+ let timerId = null;
58
+ const finish = () => {
59
+ if (settled) return;
60
+ settled = true;
61
+ if (timerId !== null) {
62
+ clearTimeout(timerId);
63
+ timerId = null;
64
+ }
65
+ signal?.removeEventListener("abort", finish);
66
+ resolve();
67
+ };
68
+ signal?.addEventListener("abort", finish, { once: true });
69
+ timerId = setTimeout(finish, safeFallback);
70
+ Promise.allSettled(animations.map((a) => a.finished)).then(finish);
71
+ });
72
+ }
73
+
1
74
  // src/masonry/LayoutEngine.ts
2
75
  var LayoutEngine = class {
3
76
  /**
@@ -77,11 +150,13 @@ var LayoutEngine = class {
77
150
  return Math.min(maxCols, parsed);
78
151
  }
79
152
  }
80
- const match = item.className.match(/(?:^|\s)(?:span|col-span)-(\d+)(?:\s|$)/);
81
- if (match && match[1]) {
82
- const parsed = parseInt(match[1], 10);
83
- if (!isNaN(parsed) && parsed > 0) {
84
- return Math.min(maxCols, parsed);
153
+ for (const cls of item.classList) {
154
+ const match = /^(?:span|col-span)-(\d+)$/.exec(cls);
155
+ if (match && match[1]) {
156
+ const parsed = parseInt(match[1], 10);
157
+ if (!isNaN(parsed) && parsed > 0) {
158
+ return Math.min(maxCols, parsed);
159
+ }
85
160
  }
86
161
  }
87
162
  return 1;
@@ -173,7 +248,10 @@ var LayoutEngine = class {
173
248
  }
174
249
  }
175
250
  const itemW = span * colWidth + (span - 1) * gutterX;
176
- const targetX = targetCol * (colWidth + gutterX);
251
+ const isRtl = typeof window !== "undefined" && typeof window.getComputedStyle === "function" && window.getComputedStyle(container).direction === "rtl";
252
+ const effectiveWidth = fittedWidth !== void 0 ? fittedWidth : containerWidth;
253
+ const rawX = targetCol * (colWidth + gutterX);
254
+ const targetX = isRtl ? Math.max(0, effectiveWidth - rawX - itemW) : rawX;
177
255
  positions.push({
178
256
  element: item,
179
257
  x: targetX,
@@ -240,8 +318,11 @@ var AuditableComponent = class {
240
318
  const rawValue = element.getAttribute(attrName)?.trim();
241
319
  if (!rawValue) return false;
242
320
  const doc = element.ownerDocument || document;
321
+ const root = typeof element.getRootNode === "function" ? element.getRootNode() : doc;
243
322
  const ids = rawValue.split(/\s+/).filter(Boolean);
244
- const isValid = ids.length > 0 && ids.every((id) => Boolean(doc.getElementById(id)));
323
+ const isValid = ids.length > 0 && ids.every(
324
+ (id) => Boolean(typeof ShadowRoot !== "undefined" && root instanceof ShadowRoot ? root.getElementById(id) : doc.getElementById(id))
325
+ );
245
326
  if (!isValid) {
246
327
  warnings.push(
247
328
  `Attribut ${attrName}="${rawValue}" invalide : l'\xE9l\xE9ment cible est introuvable dans le DOM.`
@@ -253,6 +334,7 @@ var AuditableComponent = class {
253
334
 
254
335
  // src/common/LocalizedComponent.ts
255
336
  var LocalizedComponent = class extends AuditableComponent {
337
+ static _i18n;
256
338
  /**
257
339
  * Définit la langue globale du composant (ex: 'fr', 'en', 'es').
258
340
  */
@@ -303,6 +385,10 @@ var LocalizedComponent = class extends AuditableComponent {
303
385
  static t(key, instanceOverride) {
304
386
  return this._i18n ? this._i18n.t(key, instanceOverride) : String(key);
305
387
  }
388
+ /**
389
+ * Surcharges de localisation spécifiques à cette instance.
390
+ */
391
+ i18nOverrides;
306
392
  constructor(i18nOverrides) {
307
393
  super();
308
394
  this.i18nOverrides = i18nOverrides;
@@ -333,7 +419,7 @@ function getPrimaryLanguage(normalizedLocale) {
333
419
  function assignDefined(target, source) {
334
420
  if (!source || typeof source !== "object") return target;
335
421
  for (const key of Object.keys(source)) {
336
- if (isSafeKey(String(key)) && Object.prototype.hasOwnProperty.call(source, key) && source[key] !== void 0) {
422
+ if (isSafeKey(String(key)) && Object.hasOwn(source, key) && source[key] !== void 0) {
337
423
  target[key] = source[key];
338
424
  }
339
425
  }
@@ -394,7 +480,7 @@ function createI18nManager(defaultLocale, locales) {
394
480
  if (!isSafeKey(String(key))) {
395
481
  return "";
396
482
  }
397
- if (instanceOverride && typeof instanceOverride === "object" && Object.prototype.hasOwnProperty.call(instanceOverride, key) && instanceOverride[key] !== void 0) {
483
+ if (instanceOverride && typeof instanceOverride === "object" && Object.hasOwn(instanceOverride, key) && instanceOverride[key] !== void 0) {
398
484
  return String(instanceOverride[key]);
399
485
  }
400
486
  if (globalOverrides[key] !== void 0) {
@@ -452,20 +538,28 @@ var masonryI18n = createI18nManager("fr", {
452
538
 
453
539
  // src/masonry/Masonry.ts
454
540
  var Masonry = class extends LocalizedComponent {
541
+ static _i18n = masonryI18n;
542
+ static i18n = masonryI18n;
543
+ root;
544
+ isNativeCSSGrid = false;
545
+ _items = [];
546
+ options;
547
+ resizeObserver = null;
548
+ itemResizeObserver = null;
549
+ observedItems = /* @__PURE__ */ new Set();
550
+ observedItemHeights = /* @__PURE__ */ new WeakMap();
551
+ removingItems = /* @__PURE__ */ new WeakSet();
552
+ layoutRafId = null;
553
+ isDestroyed = false;
554
+ wasRoleInferred = false;
555
+ wasAriaLabelInferred = false;
556
+ hasExplicitAriaLabel = false;
557
+ lastInferredAriaLabel = "";
558
+ abortController = new AbortController();
559
+ watchedImages = /* @__PURE__ */ new WeakSet();
560
+ originalContainerStyles;
455
561
  constructor(target, options = {}) {
456
562
  super(options.i18n);
457
- this.isNativeCSSGrid = false;
458
- this._items = [];
459
- this.resizeObserver = null;
460
- this.itemResizeObserver = null;
461
- this.layoutRafId = null;
462
- this.isDestroyed = false;
463
- this.wasRoleInferred = false;
464
- this.wasAriaLabelInferred = false;
465
- this.hasExplicitAriaLabel = false;
466
- this.lastInferredAriaLabel = "";
467
- this.removeTimers = /* @__PURE__ */ new Set();
468
- this.pendingImageListeners = [];
469
563
  if (typeof target === "string") {
470
564
  let el = null;
471
565
  try {
@@ -508,10 +602,11 @@ var Masonry = class extends LocalizedComponent {
508
602
  }),
509
603
  audit: options.audit ?? true
510
604
  };
511
- const supportsNativeCSS = typeof CSS !== "undefined" && typeof CSS.supports === "function" && CSS.supports("grid-template-rows", "masonry");
605
+ const supportsNativeCSS = typeof CSS !== "undefined" && typeof CSS.supports === "function" && (CSS.supports("display", "grid-lanes") || CSS.supports("grid-template-rows", "masonry"));
512
606
  if (this.options.useNativeCSSGrid && supportsNativeCSS) {
513
607
  this.isNativeCSSGrid = true;
514
608
  this.root.classList.add("wulf-masonry", "wulf-masonry--native");
609
+ this.syncNativeGridVariables();
515
610
  } else {
516
611
  this.root.classList.add("wulf-masonry");
517
612
  }
@@ -535,7 +630,7 @@ var Masonry = class extends LocalizedComponent {
535
630
  this.wasRoleInferred = true;
536
631
  }
537
632
  const label = this.hasExplicitAriaLabel ? this.options.ariaLabel : this.t("gallery");
538
- if (label && !this.root.hasAttribute("aria-label")) {
633
+ if (label && !this.root.hasAttribute("aria-label") && !this.root.hasAttribute("aria-labelledby")) {
539
634
  this.root.setAttribute("aria-label", label);
540
635
  this.lastInferredAriaLabel = label;
541
636
  this.wasAriaLabelInferred = true;
@@ -563,7 +658,7 @@ var Masonry = class extends LocalizedComponent {
563
658
  let durValue = "300ms";
564
659
  if (typeof dur === "number" && Number.isFinite(dur) && dur >= 0) {
565
660
  durValue = `${dur}ms`;
566
- } else if (typeof dur === "string" && /^\s*\d+(\.\d+)?(ms|s)\s*$/i.test(dur)) {
661
+ } else if (typeof dur === "string" && /^\s*(?:\d+(?:\.\d+)?|\.\d+)(ms|s)\s*$/i.test(dur)) {
567
662
  durValue = dur.trim();
568
663
  }
569
664
  this.root.style.setProperty("--wulf-masonry-duration", durValue);
@@ -576,24 +671,37 @@ var Masonry = class extends LocalizedComponent {
576
671
  let matched = [];
577
672
  if (this.options.itemSelector === "> *") {
578
673
  matched = Array.from(this.root.children).filter(
579
- (el) => el instanceof HTMLElement && !el.hasAttribute("data-masonry-ignore")
674
+ (el) => el instanceof HTMLElement && !el.hasAttribute("data-masonry-ignore") && !this.removingItems.has(el)
580
675
  );
581
676
  } else {
582
677
  try {
583
- matched = Array.from(this.root.querySelectorAll(this.options.itemSelector)).filter(
584
- (el) => el.parentElement === this.root && !el.hasAttribute("data-masonry-ignore")
678
+ const rawSelector = this.options.itemSelector.trim();
679
+ const selector = rawSelector.startsWith(">") ? `:scope ${rawSelector}` : rawSelector;
680
+ matched = Array.from(this.root.querySelectorAll(selector)).filter(
681
+ (el) => el.parentElement === this.root && !el.hasAttribute("data-masonry-ignore") && !this.removingItems.has(el)
585
682
  );
586
683
  } catch {
587
684
  matched = Array.from(this.root.children).filter(
588
- (el) => el instanceof HTMLElement && !el.hasAttribute("data-masonry-ignore")
685
+ (el) => el instanceof HTMLElement && !el.hasAttribute("data-masonry-ignore") && !this.removingItems.has(el)
589
686
  );
590
687
  }
591
688
  }
689
+ if (this.itemResizeObserver) {
690
+ const nextSet = new Set(matched);
691
+ for (const prevEl of this.observedItems) {
692
+ if (!nextSet.has(prevEl)) {
693
+ this.itemResizeObserver.unobserve(prevEl);
694
+ this.observedItems.delete(prevEl);
695
+ this.observedItemHeights.delete(prevEl);
696
+ }
697
+ }
698
+ }
592
699
  this._items = matched;
593
700
  for (const item of this._items) {
594
701
  item.classList.add("wulf-masonry-item");
595
- if (this.itemResizeObserver) {
702
+ if (this.itemResizeObserver && !this.observedItems.has(item)) {
596
703
  this.itemResizeObserver.observe(item);
704
+ this.observedItems.add(item);
597
705
  }
598
706
  }
599
707
  }
@@ -613,11 +721,52 @@ var Masonry = class extends LocalizedComponent {
613
721
  }
614
722
  });
615
723
  this.resizeObserver.observe(this.root);
616
- this.itemResizeObserver = new ResizeObserver(() => {
617
- this.scheduleLayout();
724
+ this.itemResizeObserver = new ResizeObserver((entries) => {
725
+ let heightChanged = false;
726
+ for (const entry of entries) {
727
+ const newH = entry.borderBoxSize?.[0]?.blockSize ?? entry.contentRect.height;
728
+ const prevH = this.observedItemHeights.get(entry.target);
729
+ if (prevH === void 0 || Math.abs(newH - prevH) >= 1) {
730
+ this.observedItemHeights.set(entry.target, newH);
731
+ if (prevH !== void 0) {
732
+ heightChanged = true;
733
+ }
734
+ }
735
+ }
736
+ if (heightChanged) {
737
+ this.scheduleLayout();
738
+ }
618
739
  });
619
740
  for (const item of this._items) {
620
741
  this.itemResizeObserver.observe(item);
742
+ this.observedItems.add(item);
743
+ }
744
+ }
745
+ /**
746
+ * Synchronise les variables CSS du mode natif CSS Grid Level 3 depuis les options JS.
747
+ */
748
+ syncNativeGridVariables() {
749
+ const { x: gutterX, y: gutterY } = LayoutEngine.parseGutter(this.options.gutter);
750
+ this.root.style.setProperty("--wulf-masonry-gutter-x", `${gutterX}px`);
751
+ this.root.style.setProperty("--wulf-masonry-gutter-y", `${gutterY}px`);
752
+ if (typeof this.options.columnWidth === "number" && Number.isFinite(this.options.columnWidth) && this.options.columnWidth > 0) {
753
+ this.root.style.setProperty("--wulf-masonry-col-min", `${this.options.columnWidth}px`);
754
+ } else if (this.options.columnWidth instanceof HTMLElement) {
755
+ const w = this.options.columnWidth.getBoundingClientRect().width;
756
+ if (w > 0) {
757
+ this.root.style.setProperty("--wulf-masonry-col-min", `${w}px`);
758
+ }
759
+ } else if (typeof this.options.columnWidth === "string" && this.options.columnWidth.trim()) {
760
+ try {
761
+ const el = this.root.querySelector(this.options.columnWidth);
762
+ if (el) {
763
+ const w = el.getBoundingClientRect().width;
764
+ if (w > 0) {
765
+ this.root.style.setProperty("--wulf-masonry-col-min", `${w}px`);
766
+ }
767
+ }
768
+ } catch {
769
+ }
621
770
  }
622
771
  }
623
772
  /**
@@ -627,14 +776,12 @@ var Masonry = class extends LocalizedComponent {
627
776
  if (!this.options.autoImages) return;
628
777
  const images = Array.from(this.root.querySelectorAll("img"));
629
778
  for (const img of images) {
630
- if (!img.complete) {
779
+ if (!img.complete && !this.watchedImages.has(img)) {
780
+ this.watchedImages.add(img);
631
781
  const attachLoadListener = () => {
632
- const onLoad = () => {
633
- this.pendingImageListeners = this.pendingImageListeners.filter((l) => l.handler !== onLoad);
782
+ img.addEventListener("load", () => {
634
783
  if (!this.isDestroyed) this.scheduleLayout();
635
- };
636
- this.pendingImageListeners.push({ img, handler: onLoad });
637
- img.addEventListener("load", onLoad, { once: true });
784
+ }, { once: true, signal: this.abortController.signal });
638
785
  };
639
786
  if (typeof img.decode === "function") {
640
787
  img.decode().then(() => {
@@ -668,10 +815,17 @@ var Masonry = class extends LocalizedComponent {
668
815
  if (this.isDestroyed) return;
669
816
  this.syncAccessibilityLabels();
670
817
  if (this.isNativeCSSGrid) {
818
+ this.syncNativeGridVariables();
819
+ for (const el of this._items) {
820
+ el.classList.remove("wulf-masonry-item--hidden");
821
+ }
671
822
  this.options.onLayout([]);
672
823
  return;
673
824
  }
674
825
  this.root.setAttribute("aria-busy", "true");
826
+ if (this.options.fitWidth && this.root.classList.contains("wulf-masonry--fit-width")) {
827
+ this.root.style.width = "";
828
+ }
675
829
  const result = LayoutEngine.calculate(this.root, this._items, this.options);
676
830
  this.root.style.height = `${result.containerHeight}px`;
677
831
  if (this.options.fitWidth && result.fittedWidth !== void 0) {
@@ -681,6 +835,14 @@ var Masonry = class extends LocalizedComponent {
681
835
  this.root.classList.remove("wulf-masonry--fit-width");
682
836
  }
683
837
  const stagger = this.options.stagger;
838
+ const validStagger = typeof stagger === "number" && Number.isFinite(stagger) && stagger > 0;
839
+ if (validStagger) {
840
+ this.root.style.setProperty("--wulf-masonry-stagger", `${stagger}ms`);
841
+ } else {
842
+ this.root.style.removeProperty("--wulf-masonry-stagger");
843
+ }
844
+ const hasIgnoredChildren = this._items.length !== this.root.children.length;
845
+ const supportsSiblingIndex = !hasIgnoredChildren && typeof CSS !== "undefined" && typeof CSS.supports === "function" && CSS.supports("transition-delay", "calc(sibling-index() * 1ms)");
684
846
  const usePercent = this.options.percentPosition && result.containerWidth > 0;
685
847
  for (let i = 0; i < result.positions.length; i++) {
686
848
  const pos = result.positions[i];
@@ -693,12 +855,13 @@ var Masonry = class extends LocalizedComponent {
693
855
  }
694
856
  item.style.setProperty("--wulf-masonry-x", `${pos.x}px`);
695
857
  item.style.setProperty("--wulf-masonry-y", `${pos.y}px`);
696
- if (stagger > 0) {
697
- item.style.transitionDelay = `${i * stagger}ms`;
858
+ if (validStagger && !supportsSiblingIndex) {
859
+ item.style.setProperty("--wulf-masonry-index", String(i));
698
860
  } else {
699
- item.style.removeProperty("transition-delay");
861
+ item.style.removeProperty("--wulf-masonry-index");
700
862
  }
701
863
  item.classList.remove("wulf-masonry-item--hidden");
864
+ this.observedItemHeights.set(item, pos.height);
702
865
  this.options.onItemPlaced(item, pos);
703
866
  }
704
867
  this.root.setAttribute("aria-busy", "false");
@@ -713,7 +876,11 @@ var Masonry = class extends LocalizedComponent {
713
876
  if (list.length === 0) return;
714
877
  const frag = document.createDocumentFragment();
715
878
  for (const el of list) {
716
- el.classList.add("wulf-masonry-item", "wulf-masonry-item--hidden");
879
+ if (this.isNativeCSSGrid) {
880
+ el.classList.add("wulf-masonry-item");
881
+ } else {
882
+ el.classList.add("wulf-masonry-item", "wulf-masonry-item--hidden");
883
+ }
717
884
  frag.appendChild(el);
718
885
  }
719
886
  this.root.appendChild(frag);
@@ -731,7 +898,11 @@ var Masonry = class extends LocalizedComponent {
731
898
  const first = this.root.firstChild;
732
899
  const frag = document.createDocumentFragment();
733
900
  for (const el of list) {
734
- el.classList.add("wulf-masonry-item", "wulf-masonry-item--hidden");
901
+ if (this.isNativeCSSGrid) {
902
+ el.classList.add("wulf-masonry-item");
903
+ } else {
904
+ el.classList.add("wulf-masonry-item", "wulf-masonry-item--hidden");
905
+ }
735
906
  frag.appendChild(el);
736
907
  }
737
908
  this.root.insertBefore(frag, first);
@@ -740,44 +911,51 @@ var Masonry = class extends LocalizedComponent {
740
911
  this.layout();
741
912
  }
742
913
  /**
743
- * Supprime des éléments avec animation de fondu/sortie.
914
+ * Supprime des éléments avec animation de fondu/sortie synchronisée via Web Animations API.
744
915
  */
745
916
  remove(elements) {
746
917
  if (this.isDestroyed) return;
747
918
  const list = Array.isArray(elements) ? elements : [elements];
748
919
  if (list.length === 0) return;
749
- for (const el of list) {
750
- el.classList.add("wulf-masonry-item--hidden");
751
- }
752
- const dur = typeof this.options.transitionDuration === "number" ? this.options.transitionDuration : 300;
753
- if (dur <= 0) {
920
+ const finalizeRemoval = () => {
921
+ if (this.isDestroyed) return;
754
922
  for (const el of list) {
923
+ this.removingItems.delete(el);
755
924
  if (el.parentElement === this.root) {
756
925
  if (this.itemResizeObserver) {
757
926
  this.itemResizeObserver.unobserve(el);
927
+ this.observedItems.delete(el);
928
+ this.observedItemHeights.delete(el);
758
929
  }
759
930
  this.root.removeChild(el);
760
931
  }
761
932
  }
762
933
  this.reloadItems();
763
934
  this.layout();
935
+ };
936
+ for (const el of list) {
937
+ this.removingItems.add(el);
938
+ if (typeof document !== "undefined" && document.activeElement && el.contains(document.activeElement)) {
939
+ document.activeElement.blur?.();
940
+ }
941
+ el.setAttribute("inert", "");
942
+ el.style.transitionDelay = "0ms";
943
+ el.classList.add("wulf-masonry-item--hidden");
944
+ }
945
+ const dur = parseCssDurationMs(this.options.transitionDuration, 300);
946
+ if (dur <= 0 || this.isNativeCSSGrid) {
947
+ finalizeRemoval();
764
948
  return;
765
949
  }
766
- const timerId = window.setTimeout(() => {
767
- this.removeTimers.delete(timerId);
768
- if (this.isDestroyed) return;
769
- for (const el of list) {
770
- if (el.parentElement === this.root) {
771
- if (this.itemResizeObserver) {
772
- this.itemResizeObserver.unobserve(el);
773
- }
774
- this.root.removeChild(el);
775
- }
950
+ this.reloadItems();
951
+ this.layout();
952
+ Promise.all(
953
+ list.map((el) => waitForAnimations(el, dur, this.abortController.signal))
954
+ ).then(() => {
955
+ if (!this.abortController.signal.aborted) {
956
+ finalizeRemoval();
776
957
  }
777
- this.reloadItems();
778
- this.layout();
779
- }, dur);
780
- this.removeTimers.add(timerId);
958
+ });
781
959
  }
782
960
  /**
783
961
  * Vérifie la conformité d'accessibilité WAI-ARIA de la grille Masonry
@@ -814,14 +992,7 @@ var Masonry = class extends LocalizedComponent {
814
992
  destroy() {
815
993
  if (this.isDestroyed) return;
816
994
  this.isDestroyed = true;
817
- for (const timerId of this.removeTimers) {
818
- clearTimeout(timerId);
819
- }
820
- this.removeTimers.clear();
821
- for (const { img, handler } of this.pendingImageListeners) {
822
- img.removeEventListener("load", handler);
823
- }
824
- this.pendingImageListeners = [];
995
+ this.abortController.abort();
825
996
  if (this.layoutRafId !== null) {
826
997
  cancelAnimationFrame(this.layoutRafId);
827
998
  this.layoutRafId = null;
@@ -843,6 +1014,10 @@ var Masonry = class extends LocalizedComponent {
843
1014
  this.root.removeAttribute("aria-label");
844
1015
  }
845
1016
  this.root.style.removeProperty("--wulf-masonry-duration");
1017
+ this.root.style.removeProperty("--wulf-masonry-stagger");
1018
+ this.root.style.removeProperty("--wulf-masonry-col-min");
1019
+ this.root.style.removeProperty("--wulf-masonry-gutter-x");
1020
+ this.root.style.removeProperty("--wulf-masonry-gutter-y");
846
1021
  if (this.originalContainerStyles.height) {
847
1022
  this.root.style.height = this.originalContainerStyles.height;
848
1023
  } else {
@@ -858,20 +1033,16 @@ var Masonry = class extends LocalizedComponent {
858
1033
  item.style.removeProperty("--wulf-masonry-w");
859
1034
  item.style.removeProperty("--wulf-masonry-x");
860
1035
  item.style.removeProperty("--wulf-masonry-y");
861
- item.style.removeProperty("transition-delay");
1036
+ item.style.removeProperty("--wulf-masonry-index");
862
1037
  }
863
1038
  this._items = [];
864
1039
  }
865
1040
  };
866
- Masonry._i18n = masonryI18n;
867
- Masonry.i18n = masonryI18n;
868
1041
 
869
1042
  // src/masonry/index.ts
870
1043
  var index_default = Masonry;
871
- if (typeof window !== "undefined") {
872
- const win = window;
873
- const wulfNamespace = win.Wulf || {};
874
- win.Wulf = wulfNamespace;
1044
+ var wulfNamespace = getSafeWulfNamespace();
1045
+ if (wulfNamespace) {
875
1046
  wulfNamespace.Masonry = Object.assign(Masonry, {
876
1047
  Masonry,
877
1048
  LayoutEngine,