@hyperfixi/behaviors 2.2.0 → 2.3.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 (131) hide show
  1. package/dist/all.browser.global.js +316 -54
  2. package/dist/all.browser.global.js.map +1 -1
  3. package/dist/autodismiss.browser.global.js +54 -2
  4. package/dist/autodismiss.browser.global.js.map +1 -1
  5. package/dist/behaviors/autodismiss.cjs +54 -18
  6. package/dist/behaviors/autodismiss.cjs.map +1 -1
  7. package/dist/behaviors/autodismiss.js +2 -2
  8. package/dist/behaviors/clickoutside.cjs +23 -4
  9. package/dist/behaviors/clickoutside.cjs.map +1 -1
  10. package/dist/behaviors/clickoutside.js +2 -2
  11. package/dist/behaviors/clipboard.cjs +43 -21
  12. package/dist/behaviors/clipboard.cjs.map +1 -1
  13. package/dist/behaviors/clipboard.js +2 -2
  14. package/dist/behaviors/focustrap.cjs +44 -3
  15. package/dist/behaviors/focustrap.cjs.map +1 -1
  16. package/dist/behaviors/focustrap.js +2 -2
  17. package/dist/behaviors/removable.cjs +7 -4
  18. package/dist/behaviors/removable.cjs.map +1 -1
  19. package/dist/behaviors/removable.js +2 -2
  20. package/dist/behaviors/resizable.cjs +22 -14
  21. package/dist/behaviors/resizable.cjs.map +1 -1
  22. package/dist/behaviors/resizable.js +2 -2
  23. package/dist/behaviors/scrollreveal.cjs +25 -13
  24. package/dist/behaviors/scrollreveal.cjs.map +1 -1
  25. package/dist/behaviors/scrollreveal.js +2 -2
  26. package/dist/behaviors/sortable.cjs +18 -12
  27. package/dist/behaviors/sortable.cjs.map +1 -1
  28. package/dist/behaviors/sortable.js +2 -2
  29. package/dist/behaviors/tabs.cjs +80 -11
  30. package/dist/behaviors/tabs.cjs.map +1 -1
  31. package/dist/behaviors/tabs.js +2 -2
  32. package/dist/behaviors/toggleable.cjs +5 -2
  33. package/dist/behaviors/toggleable.cjs.map +1 -1
  34. package/dist/behaviors/toggleable.js +2 -2
  35. package/dist/chunk-66U2RSYJ.js +100 -0
  36. package/dist/chunk-66U2RSYJ.js.map +1 -0
  37. package/dist/{chunk-2NSKQMNM.js → chunk-7O7UOSBH.js} +2 -2
  38. package/dist/{chunk-244WSZOL.js → chunk-EKKJVXDZ.js} +2 -2
  39. package/dist/{chunk-AFGA54SA.js → chunk-F3CASJ7Q.js} +2 -2
  40. package/dist/{chunk-YHQRFUWV.js → chunk-GALKOMJ5.js} +2 -2
  41. package/dist/{chunk-272NKUJ3.js → chunk-HMU342XE.js} +8 -5
  42. package/dist/chunk-HMU342XE.js.map +1 -0
  43. package/dist/chunk-HQDYH45I.js +137 -0
  44. package/dist/chunk-HQDYH45I.js.map +1 -0
  45. package/dist/{chunk-WTUVPVSD.js → chunk-IQM32TEY.js} +2 -2
  46. package/dist/{chunk-H5Y5ARYG.js → chunk-L52AGCMP.js} +2 -2
  47. package/dist/{chunk-H2MCHR5A.js → chunk-LQJOQTBZ.js} +2 -2
  48. package/dist/{chunk-7JDV2THA.js → chunk-MVNHMYIK.js} +11 -11
  49. package/dist/{chunk-BWZ6EGII.js → chunk-NC6I6T7T.js} +19 -13
  50. package/dist/{chunk-BWZ6EGII.js.map → chunk-NC6I6T7T.js.map} +1 -1
  51. package/dist/chunk-OJ3YWO3W.js +92 -0
  52. package/dist/chunk-OJ3YWO3W.js.map +1 -0
  53. package/dist/{chunk-64DIQGQI.js → chunk-SLOXO6IY.js} +24 -5
  54. package/dist/chunk-SLOXO6IY.js.map +1 -0
  55. package/dist/{chunk-RPERQTFU.js → chunk-TLLGH5KX.js} +2 -2
  56. package/dist/{chunk-V5IWDPDP.js → chunk-U5GNXZUF.js} +23 -15
  57. package/dist/{chunk-V5IWDPDP.js.map → chunk-U5GNXZUF.js.map} +1 -1
  58. package/dist/{chunk-GPTHAUWN.js → chunk-URZGNPTQ.js} +26 -14
  59. package/dist/chunk-URZGNPTQ.js.map +1 -0
  60. package/dist/chunk-WOTZO7K4.js +92 -0
  61. package/dist/chunk-WOTZO7K4.js.map +1 -0
  62. package/dist/{chunk-JKBWIJFI.js → chunk-WPOQIMCC.js} +2 -2
  63. package/dist/{chunk-WUHHMDAA.js → chunk-XYZ7FOXJ.js} +6 -3
  64. package/dist/{chunk-WUHHMDAA.js.map → chunk-XYZ7FOXJ.js.map} +1 -1
  65. package/dist/{chunk-DYHBKDKB.js → chunk-ZZ2WSAX3.js} +2 -2
  66. package/dist/clickoutside.browser.global.js +16 -5
  67. package/dist/clickoutside.browser.global.js.map +1 -1
  68. package/dist/clipboard.browser.global.js +43 -2
  69. package/dist/clipboard.browser.global.js.map +1 -1
  70. package/dist/core.browser.global.js +5 -2
  71. package/dist/core.browser.global.js.map +1 -1
  72. package/dist/focustrap.browser.global.js +46 -5
  73. package/dist/focustrap.browser.global.js.map +1 -1
  74. package/dist/index.cjs +321 -102
  75. package/dist/index.cjs.map +1 -1
  76. package/dist/index.js +21 -21
  77. package/dist/loaders.cjs +321 -102
  78. package/dist/loaders.cjs.map +1 -1
  79. package/dist/loaders.js +11 -11
  80. package/dist/removable.browser.global.js +8 -5
  81. package/dist/removable.browser.global.js.map +1 -1
  82. package/dist/resizable.browser.global.js +24 -16
  83. package/dist/resizable.browser.global.js.map +1 -1
  84. package/dist/resolver.browser.global.js +407 -0
  85. package/dist/resolver.browser.global.js.map +1 -0
  86. package/dist/schemas/index.cjs +321 -102
  87. package/dist/schemas/index.cjs.map +1 -1
  88. package/dist/schemas/index.js +10 -10
  89. package/dist/scrollreveal.browser.global.js +27 -8
  90. package/dist/scrollreveal.browser.global.js.map +1 -1
  91. package/dist/sortable.browser.global.js +19 -13
  92. package/dist/sortable.browser.global.js.map +1 -1
  93. package/dist/tabs.browser.global.js +80 -2
  94. package/dist/tabs.browser.global.js.map +1 -1
  95. package/dist/toggleable.browser.global.js +6 -3
  96. package/dist/toggleable.browser.global.js.map +1 -1
  97. package/package.json +1 -1
  98. package/src/behavior-resolver.ts +91 -0
  99. package/src/browser-resolver-bundle.ts +42 -0
  100. package/src/schemas/autodismiss.schema.ts +54 -18
  101. package/src/schemas/clickoutside.schema.ts +22 -3
  102. package/src/schemas/clipboard.schema.ts +43 -21
  103. package/src/schemas/focustrap.schema.ts +44 -3
  104. package/src/schemas/removable.schema.ts +7 -4
  105. package/src/schemas/resizable.schema.ts +22 -14
  106. package/src/schemas/scrollreveal.schema.ts +25 -13
  107. package/src/schemas/sortable.schema.ts +18 -12
  108. package/src/schemas/tabs.schema.ts +80 -11
  109. package/src/schemas/toggleable.schema.ts +5 -2
  110. package/dist/chunk-272NKUJ3.js.map +0 -1
  111. package/dist/chunk-64DIQGQI.js.map +0 -1
  112. package/dist/chunk-GPTHAUWN.js.map +0 -1
  113. package/dist/chunk-GVJPA2EK.js +0 -68
  114. package/dist/chunk-GVJPA2EK.js.map +0 -1
  115. package/dist/chunk-QKDYW4VM.js +0 -70
  116. package/dist/chunk-QKDYW4VM.js.map +0 -1
  117. package/dist/chunk-RB7OB6OD.js +0 -51
  118. package/dist/chunk-RB7OB6OD.js.map +0 -1
  119. package/dist/chunk-ZQQZTMCJ.js +0 -64
  120. package/dist/chunk-ZQQZTMCJ.js.map +0 -1
  121. /package/dist/{chunk-2NSKQMNM.js.map → chunk-7O7UOSBH.js.map} +0 -0
  122. /package/dist/{chunk-244WSZOL.js.map → chunk-EKKJVXDZ.js.map} +0 -0
  123. /package/dist/{chunk-AFGA54SA.js.map → chunk-F3CASJ7Q.js.map} +0 -0
  124. /package/dist/{chunk-YHQRFUWV.js.map → chunk-GALKOMJ5.js.map} +0 -0
  125. /package/dist/{chunk-WTUVPVSD.js.map → chunk-IQM32TEY.js.map} +0 -0
  126. /package/dist/{chunk-H5Y5ARYG.js.map → chunk-L52AGCMP.js.map} +0 -0
  127. /package/dist/{chunk-H2MCHR5A.js.map → chunk-LQJOQTBZ.js.map} +0 -0
  128. /package/dist/{chunk-7JDV2THA.js.map → chunk-MVNHMYIK.js.map} +0 -0
  129. /package/dist/{chunk-RPERQTFU.js.map → chunk-TLLGH5KX.js.map} +0 -0
  130. /package/dist/{chunk-JKBWIJFI.js.map → chunk-WPOQIMCC.js.map} +0 -0
  131. /package/dist/{chunk-DYHBKDKB.js.map → chunk-ZZ2WSAX3.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";var HyperFixiBehaviors=(()=>{var le=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var _t=Object.getOwnPropertyNames;var Yt=Object.prototype.hasOwnProperty;var u=(e,t)=>()=>(e&&(t=e(e=0)),t);var y=(e,t)=>{for(var r in t)le(e,r,{get:t[r],enumerable:!0})},Nt=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _t(t))!Yt.call(e,i)&&i!==r&&le(e,i,{get:()=>t[i],enumerable:!(o=Wt(t,i))||o.enumerable});return e};var $t=e=>Nt(le({},"__esModule",{value:!0}),e);var T,de=u(()=>{"use strict";T={name:"Draggable",category:"ui",tier:"core",version:"1.0.0",description:"Makes elements draggable with pointer events",parameters:[{name:"dragHandle",type:"selector",optional:!0,default:"me",description:"CSS selector for the drag handle element"}],events:[{name:"draggable:start",description:"Fired when drag begins"},{name:"draggable:move",description:"Fired during each movement"},{name:"draggable:end",description:"Fired when drag completes"}],requirements:["position: absolute or position: fixed on the element"],source:`
1
+ "use strict";var HyperFixiBehaviors=(()=>{var le=Object.defineProperty;var _t=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var Yt=Object.prototype.hasOwnProperty;var u=(e,t)=>()=>(e&&(t=e(e=0)),t);var y=(e,t)=>{for(var r in t)le(e,r,{get:t[r],enumerable:!0})},Nt=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Wt(t))!Yt.call(e,i)&&i!==r&&le(e,i,{get:()=>t[i],enumerable:!(o=_t(t,i))||o.enumerable});return e};var qt=e=>Nt(le({},"__esModule",{value:!0}),e);var C,de=u(()=>{"use strict";C={name:"Draggable",category:"ui",tier:"core",version:"1.0.0",description:"Makes elements draggable with pointer events",parameters:[{name:"dragHandle",type:"selector",optional:!0,default:"me",description:"CSS selector for the drag handle element"}],events:[{name:"draggable:start",description:"Fired when drag begins"},{name:"draggable:move",description:"Fired during each movement"},{name:"draggable:end",description:"Fired when drag completes"}],requirements:["position: absolute or position: fixed on the element"],source:`
2
2
  behavior Draggable(dragHandle)
3
3
  init
4
4
  if no dragHandle set dragHandle to me
@@ -21,16 +21,19 @@ behavior Draggable(dragHandle)
21
21
  trigger draggable:end
22
22
  end
23
23
  end
24
- `.trim()}});function s(){if(typeof window>"u")return null;let e=window;return e.lokascript||e.hyperfixi||null}var b=u(()=>{"use strict"});var nt={};y(nt,{default:()=>pe,draggableMetadata:()=>me,draggableSource:()=>ue,registerDraggable:()=>M});function qt(e,t){let r=e;if(t.dragHandle&&t.dragHandle!=="me")if(typeof t.dragHandle=="string"){let o=e.querySelector(t.dragHandle);o instanceof HTMLElement&&(r=o)}else t.dragHandle instanceof HTMLElement&&(r=t.dragHandle);r.addEventListener("pointerdown",o=>{o.preventDefault(),o.stopPropagation(),e.dispatchEvent(new CustomEvent("draggable:start",{bubbles:!0}));let i=e.offsetLeft,m=e.offsetTop,a=o.clientX-i,c=o.clientY-m;function p(d){e.style.left=`${d.clientX-a}px`,e.style.top=`${d.clientY-c}px`,e.dispatchEvent(new CustomEvent("draggable:move",{bubbles:!0}))}function l(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",l),e.dispatchEvent(new CustomEvent("draggable:end",{bubbles:!0}))}document.addEventListener("pointermove",p),document.addEventListener("pointerup",l)})}async function M(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Draggable",parameters:["dragHandle"],eventHandlers:[],imperativeInstaller:qt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var ue,me,pe,K=u(()=>{"use strict";de();b();ue=T.source,me=T;s()&&M().catch(console.error);pe={source:T.source,metadata:T,register:M}});var k,fe=u(()=>{"use strict";k={name:"Removable",category:"data",tier:"common",version:"1.2.0",description:"Makes elements removable on click",parameters:[{name:"triggerEl",type:"selector",optional:!0,default:"me",description:"Element that triggers removal (e.g., a close button)"},{name:"confirm",type:"boolean",optional:!0,default:!1,description:"Show confirmation dialog before removal"},{name:"effect",type:"string",optional:!0,default:"none",enum:["fade","none"],description:'Transition effect: "fade" or "none"'}],events:[{name:"removable:before",description:"Fired before removal (cancelable)"},{name:"removable:removed",description:"Fired after removal"}],source:`
25
- behavior Removable(triggerEl, confirm, effect)
24
+ `.trim()}});function s(){if(typeof window>"u")return null;let e=window;return e.lokascript||e.hyperfixi||null}var g=u(()=>{"use strict"});var nt={};y(nt,{default:()=>pe,draggableMetadata:()=>me,draggableSource:()=>ue,registerDraggable:()=>T});function jt(e,t){let r=e;if(t.dragHandle&&t.dragHandle!=="me")if(typeof t.dragHandle=="string"){let o=e.querySelector(t.dragHandle);o instanceof HTMLElement&&(r=o)}else t.dragHandle instanceof HTMLElement&&(r=t.dragHandle);r.addEventListener("pointerdown",o=>{o.preventDefault(),o.stopPropagation(),e.dispatchEvent(new CustomEvent("draggable:start",{bubbles:!0}));let i=e.offsetLeft,m=e.offsetTop,a=o.clientX-i,c=o.clientY-m;function p(d){e.style.left=`${d.clientX-a}px`,e.style.top=`${d.clientY-c}px`,e.dispatchEvent(new CustomEvent("draggable:move",{bubbles:!0}))}function l(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",l),e.dispatchEvent(new CustomEvent("draggable:end",{bubbles:!0}))}document.addEventListener("pointermove",p),document.addEventListener("pointerup",l)})}async function T(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Draggable",parameters:["dragHandle"],eventHandlers:[],imperativeInstaller:jt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var ue,me,pe,K=u(()=>{"use strict";de();g();ue=C.source,me=C;s()&&T().catch(console.error);pe={source:C.source,metadata:C,register:T}});var k,fe=u(()=>{"use strict";k={name:"Removable",category:"data",tier:"common",version:"1.2.0",description:"Makes elements removable on click",parameters:[{name:"triggerEl",type:"selector",optional:!0,default:"me",description:"Element that triggers removal (e.g., a close button)"},{name:"confirmRemoval",type:"boolean",optional:!0,default:!1,description:"Show confirmation dialog before removal"},{name:"effect",type:"string",optional:!0,default:"none",enum:["fade","none"],description:'Transition effect: "fade" or "none"'}],events:[{name:"removable:before",description:"Fired before removal (cancelable)"},{name:"removable:removed",description:"Fired after removal"}],source:`
25
+ behavior Removable(triggerEl, confirmRemoval, effect)
26
26
  init
27
27
  if triggerEl is undefined
28
28
  set triggerEl to me
29
29
  end
30
30
  end
31
31
  on click from triggerEl
32
- if confirm
33
- if not window.confirm("Are you sure?")
32
+ if confirmRemoval
33
+ js(me)
34
+ if (!window.confirm("Are you sure?")) return "cancel";
35
+ end
36
+ if it is "cancel"
34
37
  halt
35
38
  end
36
39
  end
@@ -42,7 +45,7 @@ behavior Removable(triggerEl, confirm, effect)
42
45
  remove me
43
46
  end
44
47
  end
45
- `.trim()}});var st={};y(st,{default:()=>ge,registerRemovable:()=>C,removableMetadata:()=>ve,removableSource:()=>he});async function C(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r=t.compileSync(k.source,{traditional:!0});if(!r.ok)throw new Error(`Failed to compile Removable behavior: ${JSON.stringify(r.errors)}`);let o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r.ast,o)}var he,ve,ge,J=u(()=>{"use strict";fe();b();he=k.source,ve=k;s()&&C().catch(console.error);ge={source:k.source,metadata:k,register:C}});var B,be=u(()=>{"use strict";B={name:"Toggleable",category:"form",tier:"core",version:"1.0.0",description:"Toggles a CSS class on click",parameters:[{name:"cls",type:"string",optional:!0,default:"active",description:"CSS class to toggle"},{name:"target",type:"selector",optional:!0,default:"me",description:"Element to toggle the class on"}],events:[{name:"toggleable:on",description:"Fired when class is added"},{name:"toggleable:off",description:"Fired when class is removed"}],source:`
48
+ `.trim()}});var st={};y(st,{default:()=>he,registerRemovable:()=>M,removableMetadata:()=>be,removableSource:()=>ve});async function M(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r=t.compileSync(k.source,{traditional:!0});if(!r.ok)throw new Error(`Failed to compile Removable behavior: ${JSON.stringify(r.errors)}`);let o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r.ast,o)}var ve,be,he,J=u(()=>{"use strict";fe();g();ve=k.source,be=k;s()&&M().catch(console.error);he={source:k.source,metadata:k,register:M}});var A,ge=u(()=>{"use strict";A={name:"Toggleable",category:"form",tier:"core",version:"1.0.0",description:"Toggles a CSS class on click",parameters:[{name:"cls",type:"string",optional:!0,default:"active",description:"CSS class to toggle"},{name:"target",type:"selector",optional:!0,default:"me",description:"Element to toggle the class on"}],events:[{name:"toggleable:on",description:"Fired when class is added"},{name:"toggleable:off",description:"Fired when class is removed"}],source:`
46
49
  behavior Toggleable(cls, target)
47
50
  init
48
51
  if cls is undefined
@@ -54,39 +57,58 @@ behavior Toggleable(cls, target)
54
57
  end
55
58
  on click
56
59
  toggle .{cls} on target
60
+ js(target, cls)
61
+ var eventName = target.classList.contains(cls) ? 'toggleable:on' : 'toggleable:off';
62
+ target.dispatchEvent(new CustomEvent(eventName, { bubbles: true }));
63
+ end
57
64
  end
58
- end
59
- `.trim()}});var ct={};y(ct,{default:()=>we,registerToggleable:()=>R,toggleableMetadata:()=>xe,toggleableSource:()=>ye});function Xt(e,t){let r=t.cls||"active",o=e;if(t.target&&t.target!=="me")if(typeof t.target=="string"){let i=document.querySelector(t.target);i instanceof HTMLElement&&(o=i)}else t.target instanceof HTMLElement&&(o=t.target);e.addEventListener("click",()=>{let i=o.classList.contains(r);o.classList.toggle(r),o.dispatchEvent(new CustomEvent(i?"toggleable:off":"toggleable:on",{bubbles:!0}))})}async function R(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Toggleable",parameters:["cls","target"],eventHandlers:[],imperativeInstaller:Xt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var ye,xe,we,Q=u(()=>{"use strict";be();b();ye=B.source,xe=B;s()&&R().catch(console.error);we={source:B.source,metadata:B,register:R}});var H,Se=u(()=>{"use strict";H={name:"Sortable",category:"ui",tier:"common",version:"1.0.0",description:"Makes child elements reorderable via drag-and-drop",parameters:[{name:"handle",type:"selector",optional:!0,default:"none",description:"CSS selector for drag handles within items"},{name:"dragClass",type:"string",optional:!0,default:"sorting",description:"CSS class added to item during drag"}],events:[{name:"sortable:start",description:"Fired when drag begins"},{name:"sortable:move",description:"Fired during drag \u2014 handle this event to reorder DOM elements"},{name:"sortable:end",description:"Fired when drag completes"}],requirements:["Users must handle DOM reordering in sortable:move event handlers"],source:`
65
+ end`.trim()}});var ct={};y(ct,{default:()=>we,registerToggleable:()=>R,toggleableMetadata:()=>xe,toggleableSource:()=>ye});function Xt(e,t){let r=t.cls||"active",o=e;if(t.target&&t.target!=="me")if(typeof t.target=="string"){let i=document.querySelector(t.target);i instanceof HTMLElement&&(o=i)}else t.target instanceof HTMLElement&&(o=t.target);e.addEventListener("click",()=>{let i=o.classList.contains(r);o.classList.toggle(r),o.dispatchEvent(new CustomEvent(i?"toggleable:off":"toggleable:on",{bubbles:!0}))})}async function R(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Toggleable",parameters:["cls","target"],eventHandlers:[],imperativeInstaller:Xt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var ye,xe,we,Q=u(()=>{"use strict";ge();g();ye=A.source,xe=A;s()&&R().catch(console.error);we={source:A.source,metadata:A,register:R}});var B,Ee=u(()=>{"use strict";B={name:"Sortable",category:"ui",tier:"common",version:"1.0.0",description:"Makes child elements reorderable via drag-and-drop",parameters:[{name:"handle",type:"selector",optional:!0,default:"none",description:"CSS selector for drag handles within items"},{name:"dragClass",type:"string",optional:!0,default:"sorting",description:"CSS class added to item during drag"}],events:[{name:"sortable:start",description:"Fired when drag begins"},{name:"sortable:move",description:"Fired during drag \u2014 handle this event to reorder DOM elements"},{name:"sortable:end",description:"Fired when drag completes"}],requirements:["Users must handle DOM reordering in sortable:move event handlers"],source:`
60
66
  behavior Sortable(handle, dragClass)
61
67
  init
62
- if no dragClass set dragClass to "sorting"
68
+ if dragClass is undefined
69
+ set dragClass to "sorting"
70
+ end
63
71
  end
64
- on pointerdown(target, clientY) from me
65
- set item to closest <li/> in target
66
- if no item exit
67
- if handle
68
- set handleEl to target.closest(handle)
69
- if no handleEl exit
72
+ on pointerdown(clientY) from me
73
+ js(me, handle, event)
74
+ var target = event.target;
75
+ var item = target.closest("li");
76
+ if (!item || !me.contains(item)) return false;
77
+ if (handle && !target.closest(handle)) return false;
78
+ event.preventDefault();
79
+ event.stopPropagation();
80
+ return true;
70
81
  end
71
- halt the event
72
- add dragClass to item
82
+ if it is false
83
+ exit
84
+ end
85
+ add .{dragClass} to me
73
86
  trigger sortable:start on me
74
87
  repeat until event pointerup from document
75
88
  wait for pointermove(clientY) from document
76
89
  trigger sortable:move on me
77
90
  end
78
- remove dragClass from item
91
+ remove .{dragClass} from me
79
92
  trigger sortable:end on me
80
93
  end
81
- end
82
- `.trim()}});var lt={};y(lt,{default:()=>Le,registerSortable:()=>A,sortableMetadata:()=>ke,sortableSource:()=>Ee});function Ut(e,t){let r=t.dragClass||"sorting",o=t.handle||null;e.addEventListener("pointerdown",i=>{let m=i.target,a=m.closest("li");if(!a||!e.contains(a)||o&&!m.closest(o))return;i.preventDefault(),a.classList.add(r),e.dispatchEvent(new CustomEvent("sortable:start",{bubbles:!0,detail:{item:a}}));function c(l){e.dispatchEvent(new CustomEvent("sortable:move",{bubbles:!0,detail:{clientY:l.clientY,item:a}}))}function p(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",p),a.classList.remove(r),e.dispatchEvent(new CustomEvent("sortable:end",{bubbles:!0,detail:{item:a}}))}document.addEventListener("pointermove",c),document.addEventListener("pointerup",p)})}async function A(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Sortable",parameters:["handle","dragClass"],eventHandlers:[],imperativeInstaller:Ut},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var Ee,ke,Le,Z=u(()=>{"use strict";Se();b();Ee=H.source,ke=H;s()&&A().catch(console.error);Le={source:H.source,metadata:H,register:A}});var I,Te=u(()=>{"use strict";I={name:"Resizable",category:"ui",tier:"optional",version:"1.0.0",description:"Makes elements resizable by dragging",parameters:[{name:"handle",type:"selector",optional:!0,default:"me",description:"CSS selector for the resize handle (defaults to the element itself)"},{name:"minWidth",type:"number",optional:!0,default:50,description:"Minimum width in pixels"},{name:"minHeight",type:"number",optional:!0,default:50,description:"Minimum height in pixels"},{name:"maxWidth",type:"number",optional:!0,default:9999,description:"Maximum width in pixels"},{name:"maxHeight",type:"number",optional:!0,default:9999,description:"Maximum height in pixels"}],events:[{name:"resizable:start",description:"Fired when resize begins"},{name:"resizable:resize",description:"Fired during resize"},{name:"resizable:end",description:"Fired when resize completes"}],source:`
94
+ end`.trim()}});var lt={};y(lt,{default:()=>Le,registerSortable:()=>H,sortableMetadata:()=>ke,sortableSource:()=>Se});function $t(e,t){let r=t.dragClass||"sorting",o=t.handle||null;e.addEventListener("pointerdown",i=>{let m=i.target,a=m.closest("li");if(!a||!e.contains(a)||o&&!m.closest(o))return;i.preventDefault(),a.classList.add(r),e.dispatchEvent(new CustomEvent("sortable:start",{bubbles:!0,detail:{item:a}}));function c(l){e.dispatchEvent(new CustomEvent("sortable:move",{bubbles:!0,detail:{clientY:l.clientY,item:a}}))}function p(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",p),a.classList.remove(r),e.dispatchEvent(new CustomEvent("sortable:end",{bubbles:!0,detail:{item:a}}))}document.addEventListener("pointermove",c),document.addEventListener("pointerup",p)})}async function H(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Sortable",parameters:["handle","dragClass"],eventHandlers:[],imperativeInstaller:$t},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var Se,ke,Le,Z=u(()=>{"use strict";Ee();g();Se=B.source,ke=B;s()&&H().catch(console.error);Le={source:B.source,metadata:B,register:H}});var I,Ce=u(()=>{"use strict";I={name:"Resizable",category:"ui",tier:"optional",version:"1.0.0",description:"Makes elements resizable by dragging",parameters:[{name:"handle",type:"selector",optional:!0,default:"me",description:"CSS selector for the resize handle (defaults to the element itself)"},{name:"minWidth",type:"number",optional:!0,default:50,description:"Minimum width in pixels"},{name:"minHeight",type:"number",optional:!0,default:50,description:"Minimum height in pixels"},{name:"maxWidth",type:"number",optional:!0,default:9999,description:"Maximum width in pixels"},{name:"maxHeight",type:"number",optional:!0,default:9999,description:"Maximum height in pixels"}],events:[{name:"resizable:start",description:"Fired when resize begins"},{name:"resizable:resize",description:"Fired during resize"},{name:"resizable:end",description:"Fired when resize completes"}],source:`
83
95
  behavior Resizable(handle, minWidth, minHeight, maxWidth, maxHeight)
84
96
  init
85
- if no handle set handle to me
86
- if no minWidth set minWidth to 50
87
- if no minHeight set minHeight to 50
88
- if no maxWidth set maxWidth to 9999
89
- if no maxHeight set maxHeight to 9999
97
+ if handle is undefined
98
+ set handle to me
99
+ end
100
+ if minWidth is undefined
101
+ set minWidth to 50
102
+ end
103
+ if minHeight is undefined
104
+ set minHeight to 50
105
+ end
106
+ if maxWidth is undefined
107
+ set maxWidth to 9999
108
+ end
109
+ if maxHeight is undefined
110
+ set maxHeight to 9999
111
+ end
90
112
  end
91
113
  on pointerdown(clientX, clientY) from handle
92
114
  halt the event
@@ -98,48 +120,288 @@ behavior Resizable(handle, minWidth, minHeight, maxWidth, maxHeight)
98
120
  set startX to clientX
99
121
  set startY to clientY
100
122
  repeat until event pointerup from document
101
- wait for pointermove(clientX, clientY) or
102
- pointerup from document
103
- set newWidth to startWidth + (clientX - startX)
104
- set newHeight to startHeight + (clientY - startY)
105
- if newWidth < minWidth set newWidth to minWidth
106
- if newWidth > maxWidth set newWidth to maxWidth
107
- if newHeight < minHeight set newHeight to minHeight
108
- if newHeight > maxHeight set newHeight to maxHeight
109
- add { width: \${newWidth}px; height: \${newHeight}px; }
123
+ wait for pointermove(clientX, clientY) or pointerup from document
124
+ js(startWidth, startHeight, clientX, clientY, startX, startY, minWidth, maxWidth, minHeight, maxHeight, me)
125
+ var nw = Math.max(minWidth, Math.min(maxWidth, startWidth + (clientX - startX)));
126
+ var nh = Math.max(minHeight, Math.min(maxHeight, startHeight + (clientY - startY)));
127
+ me.style.width = nw + 'px';
128
+ me.style.height = nh + 'px';
129
+ end
110
130
  trigger resizable:resize
111
131
  end
112
132
  trigger resizable:end
113
133
  end
114
134
  end
115
- `.trim()}});var dt={};y(dt,{default:()=>Be,registerResizable:()=>D,resizableMetadata:()=>Ce,resizableSource:()=>Me});function Vt(e,t){let r=e;if(t.handle&&t.handle!=="me")if(typeof t.handle=="string"){let c=e.querySelector(t.handle);c instanceof HTMLElement&&(r=c)}else t.handle instanceof HTMLElement&&(r=t.handle);let o=t.minWidth??50,i=t.minHeight??50,m=t.maxWidth??9999,a=t.maxHeight??9999;r.addEventListener("pointerdown",c=>{c.preventDefault(),e.dispatchEvent(new CustomEvent("resizable:start",{bubbles:!0}));let p=e.offsetWidth,l=e.offsetHeight,d=c.clientX,w=c.clientY;function g(n){let f=Math.max(o,Math.min(m,p+(n.clientX-d))),E=Math.max(i,Math.min(a,l+(n.clientY-w)));e.style.width=`${f}px`,e.style.height=`${E}px`,e.dispatchEvent(new CustomEvent("resizable:resize",{bubbles:!0}))}function ce(){document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",ce),e.dispatchEvent(new CustomEvent("resizable:end",{bubbles:!0}))}document.addEventListener("pointermove",g),document.addEventListener("pointerup",ce)})}async function D(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Resizable",parameters:["handle","minWidth","minHeight","maxWidth","maxHeight"],eventHandlers:[],imperativeInstaller:Vt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var Me,Ce,Be,ee=u(()=>{"use strict";Te();b();Me=I.source,Ce=I;s()&&D().catch(console.error);Be={source:I.source,metadata:I,register:D}});var F,Re=u(()=>{"use strict";F={name:"Clipboard",category:"ui",tier:"core",version:"1.0.0",description:"Copies text to clipboard on click with visual feedback",parameters:[{name:"text",type:"string",optional:!0,description:"Literal text to copy (takes priority over source)"},{name:"source",type:"selector",optional:!0,default:"me",description:"Element whose textContent or value is copied"},{name:"feedback",type:"selector",optional:!0,description:"Element to show .copied feedback on (defaults to the installed element)"},{name:"feedbackDuration",type:"number",optional:!0,default:2e3,description:"Duration in ms to show .copied class feedback"}],events:[{name:"clipboard:copied",description:"Fired after text is copied successfully"},{name:"clipboard:error",description:"Fired when clipboard write fails"}],requirements:["navigator.clipboard.writeText() requires HTTPS or localhost",'Falls back to document.execCommand("copy") for older browsers'],source:["behavior Clipboard(text, source, feedback, feedbackDuration)"," init"," if feedbackDuration is undefined set feedbackDuration to 2000"," if source is undefined set source to me"," end"," on click"," if text is not undefined"," set copyText to text"," else"," set copyText to source's value or source's textContent"," end"," js(copyText) navigator.clipboard.writeText(copyText) end"," set feedbackEl to feedback or me"," add .copied to feedbackEl"," wait feedbackDuration ms"," remove .copied from feedbackEl"," trigger clipboard:copied"," end","end"].join(`
116
- `)}});var mt={};y(mt,{clipboardMetadata:()=>Ae,clipboardSource:()=>He,default:()=>Ie,registerClipboard:()=>P});async function Gt(e){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(e);return}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function ut(e,t){return!t||t==="me"?e:t instanceof HTMLElement?t:typeof t=="string"&&(e.querySelector(t)||document.querySelector(t))||null}function jt(e,t){let r=typeof t.feedbackDuration=="number"?t.feedbackDuration:2e3;e.addEventListener("click",async()=>{let o;if(t.text!=null)o=String(t.text);else{let i=ut(e,t.source)||e;o=i.value??i.textContent??""}try{await Gt(o);let i=ut(e,t.feedback)||e;i.classList.add("copied"),setTimeout(()=>i.classList.remove("copied"),r),e.dispatchEvent(new CustomEvent("clipboard:copied",{bubbles:!0,detail:{text:o}}))}catch(i){e.dispatchEvent(new CustomEvent("clipboard:error",{bubbles:!0,detail:{error:i}}))}})}async function P(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Clipboard",parameters:["text","source","feedback","feedbackDuration"],eventHandlers:[],imperativeInstaller:jt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var He,Ae,Ie,te=u(()=>{"use strict";Re();b();He=F.source,Ae=F;s()&&P().catch(console.error);Ie={source:F.source,metadata:F,register:P}});var O,De=u(()=>{"use strict";O={name:"AutoDismiss",category:"ui",tier:"core",version:"1.0.0",description:"Auto-removes elements after a delay with optional pause-on-hover",parameters:[{name:"delay",type:"number",optional:!0,default:5e3,description:"Time in ms before the element is removed"},{name:"pauseOnHover",type:"boolean",optional:!0,default:!0,description:"Pause the countdown when the mouse hovers over the element"},{name:"effect",type:"string",optional:!0,default:"none",enum:["fade","none"],description:'Transition effect before removal: "fade" or "none"'}],events:[{name:"autodismiss:start",description:"Fired when the countdown timer starts"},{name:"autodismiss:dismissed",description:"Fired before removal (cancelable via preventDefault)"},{name:"autodismiss:paused",description:"Fired when the timer is paused on hover"},{name:"autodismiss:resumed",description:"Fired when the timer resumes on mouseleave"}],source:["behavior AutoDismiss(delay, pauseOnHover, effect)"," init"," if delay is undefined set delay to 5000"," if pauseOnHover is undefined set pauseOnHover to true",' if effect is undefined set effect to "none"'," end"," on load"," trigger autodismiss:start"," wait delay ms"," trigger autodismiss:dismissed",' if effect is "fade"'," transition opacity to 0 over 300ms"," end"," remove me"," end","end"].join(`
117
- `)}});var pt={};y(pt,{autoDismissMetadata:()=>Pe,autoDismissSource:()=>Fe,default:()=>Oe,registerAutoDismiss:()=>z});function Kt(e,t){let r=typeof t.delay=="number"?t.delay:5e3,o=t.pauseOnHover!==!1,i=t.effect==="fade"?"fade":"none",m=null,a=r,c=Date.now();function p(){let d=new CustomEvent("autodismiss:dismissed",{bubbles:!0,cancelable:!0});e.dispatchEvent(d),!d.defaultPrevented&&(i==="fade"?(e.style.transition="opacity 300ms",e.style.opacity="0",setTimeout(()=>e.remove(),300)):e.remove())}function l(){c=Date.now(),m=setTimeout(p,a)}e.dispatchEvent(new CustomEvent("autodismiss:start",{bubbles:!0})),l(),o&&(e.addEventListener("mouseenter",()=>{m!=null&&(clearTimeout(m),m=null,a-=Date.now()-c,a<0&&(a=0),e.dispatchEvent(new CustomEvent("autodismiss:paused",{bubbles:!0})))}),e.addEventListener("mouseleave",()=>{m==null&&e.isConnected&&(e.dispatchEvent(new CustomEvent("autodismiss:resumed",{bubbles:!0})),l())}))}async function z(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"AutoDismiss",parameters:["delay","pauseOnHover","effect"],eventHandlers:[],imperativeInstaller:Kt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var Fe,Pe,Oe,re=u(()=>{"use strict";De();b();Fe=O.source,Pe=O;s()&&z().catch(console.error);Oe={source:O.source,metadata:O,register:z}});var W,ze=u(()=>{"use strict";W={name:"ClickOutside",category:"ui",tier:"core",version:"1.0.0",description:"Fires an event when the user clicks outside the element",parameters:[{name:"active",type:"boolean",optional:!0,default:!0,description:"Whether the listener is active (can be toggled programmatically)"}],events:[{name:"clickoutside",description:"Fired when a pointer press occurs outside the element"}],requirements:["Uses pointerdown instead of click to avoid timing issues with removed elements"],source:`
135
+ `.trim()}});var dt={};y(dt,{default:()=>Ae,registerResizable:()=>F,resizableMetadata:()=>Me,resizableSource:()=>Te});function Ut(e,t){let r=e;if(t.handle&&t.handle!=="me")if(typeof t.handle=="string"){let c=e.querySelector(t.handle);c instanceof HTMLElement&&(r=c)}else t.handle instanceof HTMLElement&&(r=t.handle);let o=t.minWidth??50,i=t.minHeight??50,m=t.maxWidth??9999,a=t.maxHeight??9999;r.addEventListener("pointerdown",c=>{c.preventDefault(),e.dispatchEvent(new CustomEvent("resizable:start",{bubbles:!0}));let p=e.offsetWidth,l=e.offsetHeight,d=c.clientX,w=c.clientY;function h(n){let f=Math.max(o,Math.min(m,p+(n.clientX-d))),S=Math.max(i,Math.min(a,l+(n.clientY-w)));e.style.width=`${f}px`,e.style.height=`${S}px`,e.dispatchEvent(new CustomEvent("resizable:resize",{bubbles:!0}))}function ce(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",ce),e.dispatchEvent(new CustomEvent("resizable:end",{bubbles:!0}))}document.addEventListener("pointermove",h),document.addEventListener("pointerup",ce)})}async function F(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Resizable",parameters:["handle","minWidth","minHeight","maxWidth","maxHeight"],eventHandlers:[],imperativeInstaller:Ut},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var Te,Me,Ae,ee=u(()=>{"use strict";Ce();g();Te=I.source,Me=I;s()&&F().catch(console.error);Ae={source:I.source,metadata:I,register:F}});var D,Re=u(()=>{"use strict";D={name:"Clipboard",category:"ui",tier:"core",version:"1.0.0",description:"Copies text to clipboard on click with visual feedback",parameters:[{name:"text",type:"string",optional:!0,description:"Literal text to copy (takes priority over source)"},{name:"source",type:"selector",optional:!0,default:"me",description:"Element whose textContent or value is copied"},{name:"feedback",type:"selector",optional:!0,description:"Element to show .copied feedback on (defaults to the installed element)"},{name:"feedbackDuration",type:"number",optional:!0,default:2e3,description:"Duration in ms to show .copied class feedback"}],events:[{name:"clipboard:copied",description:"Fired after text is copied successfully"},{name:"clipboard:error",description:"Fired when clipboard write fails"}],requirements:["navigator.clipboard.writeText() requires HTTPS or localhost",'Falls back to document.execCommand("copy") for older browsers'],source:`
136
+ behavior Clipboard(text, source, feedback, feedbackDuration)
137
+ init
138
+ if feedbackDuration is undefined
139
+ set feedbackDuration to 2000
140
+ end
141
+ if source is undefined
142
+ set source to me
143
+ end
144
+ end
145
+ on click
146
+ if text is not undefined
147
+ set copyText to text
148
+ else
149
+ set copyText to source's textContent
150
+ end
151
+ js(me, copyText, feedback, feedbackDuration)
152
+ async function copyToClipboard(t) {
153
+ if (navigator.clipboard && navigator.clipboard.writeText) {
154
+ await navigator.clipboard.writeText(t);
155
+ return;
156
+ }
157
+ var ta = document.createElement('textarea');
158
+ ta.value = t;
159
+ ta.style.position = 'fixed';
160
+ ta.style.opacity = '0';
161
+ document.body.appendChild(ta);
162
+ ta.select();
163
+ try { document.execCommand('copy'); } finally { document.body.removeChild(ta); }
164
+ }
165
+ try {
166
+ await copyToClipboard(copyText);
167
+ var feedbackEl = feedback ? (typeof feedback === 'string' ? document.querySelector(feedback) : feedback) : me;
168
+ if (!feedbackEl) feedbackEl = me;
169
+ feedbackEl.classList.add('copied');
170
+ me.dispatchEvent(new CustomEvent('clipboard:copied', { bubbles: true, detail: { text: copyText } }));
171
+ setTimeout(function() { feedbackEl.classList.remove('copied'); }, feedbackDuration);
172
+ } catch(err) {
173
+ me.dispatchEvent(new CustomEvent('clipboard:error', { bubbles: true, detail: { error: err } }));
174
+ }
175
+ end
176
+ end
177
+ end`.trim()}});var mt={};y(mt,{clipboardMetadata:()=>He,clipboardSource:()=>Be,default:()=>Ie,registerClipboard:()=>O});async function Vt(e){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(e);return}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function ut(e,t){return!t||t==="me"?e:t instanceof HTMLElement?t:typeof t=="string"&&(e.querySelector(t)||document.querySelector(t))||null}function Gt(e,t){let r=typeof t.feedbackDuration=="number"?t.feedbackDuration:2e3;e.addEventListener("click",async()=>{let o;if(t.text!=null)o=String(t.text);else{let i=ut(e,t.source)||e;o=i.value??i.textContent??""}try{await Vt(o);let i=ut(e,t.feedback)||e;i.classList.add("copied"),setTimeout(()=>i.classList.remove("copied"),r),e.dispatchEvent(new CustomEvent("clipboard:copied",{bubbles:!0,detail:{text:o}}))}catch(i){e.dispatchEvent(new CustomEvent("clipboard:error",{bubbles:!0,detail:{error:i}}))}})}async function O(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Clipboard",parameters:["text","source","feedback","feedbackDuration"],eventHandlers:[],imperativeInstaller:Gt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var Be,He,Ie,te=u(()=>{"use strict";Re();g();Be=D.source,He=D;s()&&O().catch(console.error);Ie={source:D.source,metadata:D,register:O}});var P,Fe=u(()=>{"use strict";P={name:"AutoDismiss",category:"ui",tier:"core",version:"1.0.0",description:"Auto-removes elements after a delay with optional pause-on-hover",parameters:[{name:"delay",type:"number",optional:!0,default:5e3,description:"Time in ms before the element is removed"},{name:"pauseOnHover",type:"boolean",optional:!0,default:!0,description:"Pause the countdown when the mouse hovers over the element"},{name:"effect",type:"string",optional:!0,default:"none",enum:["fade","none"],description:'Transition effect before removal: "fade" or "none"'}],events:[{name:"autodismiss:start",description:"Fired when the countdown timer starts"},{name:"autodismiss:dismissed",description:"Fired before removal (cancelable via preventDefault)"},{name:"autodismiss:paused",description:"Fired when the timer is paused on hover"},{name:"autodismiss:resumed",description:"Fired when the timer resumes on mouseleave"}],source:`
178
+ behavior AutoDismiss(delay, pauseOnHover, effect)
179
+ init
180
+ if delay is undefined
181
+ set delay to 5000
182
+ end
183
+ if pauseOnHover is undefined
184
+ set pauseOnHover to true
185
+ end
186
+ if effect is undefined
187
+ set effect to "none"
188
+ end
189
+ js(me, delay, effect, pauseOnHover)
190
+ me.dispatchEvent(new CustomEvent('autodismiss:start', { bubbles: true }));
191
+ var remaining = delay;
192
+ var startedAt = Date.now();
193
+ var timerId = null;
194
+ function dismiss() {
195
+ var ev = new CustomEvent('autodismiss:dismissed', { bubbles: true, cancelable: true });
196
+ me.dispatchEvent(ev);
197
+ if (ev.defaultPrevented) return;
198
+ if (effect === 'fade') {
199
+ me.style.transition = 'opacity 300ms';
200
+ me.style.opacity = '0';
201
+ setTimeout(function() { me.remove(); }, 300);
202
+ } else {
203
+ me.remove();
204
+ }
205
+ }
206
+ function start() {
207
+ startedAt = Date.now();
208
+ timerId = setTimeout(dismiss, remaining);
209
+ }
210
+ start();
211
+ if (pauseOnHover) {
212
+ me.addEventListener('mouseenter', function() {
213
+ if (timerId != null) {
214
+ clearTimeout(timerId);
215
+ timerId = null;
216
+ remaining -= Date.now() - startedAt;
217
+ if (remaining < 0) remaining = 0;
218
+ me.dispatchEvent(new CustomEvent('autodismiss:paused', { bubbles: true }));
219
+ }
220
+ });
221
+ me.addEventListener('mouseleave', function() {
222
+ if (timerId == null && me.isConnected) {
223
+ me.dispatchEvent(new CustomEvent('autodismiss:resumed', { bubbles: true }));
224
+ start();
225
+ }
226
+ });
227
+ }
228
+ end
229
+ end
230
+ end`.trim()}});var pt={};y(pt,{autoDismissMetadata:()=>Oe,autoDismissSource:()=>De,default:()=>Pe,registerAutoDismiss:()=>z});function Kt(e,t){let r=typeof t.delay=="number"?t.delay:5e3,o=t.pauseOnHover!==!1,i=t.effect==="fade"?"fade":"none",m=null,a=r,c=Date.now();function p(){let d=new CustomEvent("autodismiss:dismissed",{bubbles:!0,cancelable:!0});e.dispatchEvent(d),!d.defaultPrevented&&(i==="fade"?(e.style.transition="opacity 300ms",e.style.opacity="0",setTimeout(()=>e.remove(),300)):e.remove())}function l(){c=Date.now(),m=setTimeout(p,a)}e.dispatchEvent(new CustomEvent("autodismiss:start",{bubbles:!0})),l(),o&&(e.addEventListener("mouseenter",()=>{m!=null&&(clearTimeout(m),m=null,a-=Date.now()-c,a<0&&(a=0),e.dispatchEvent(new CustomEvent("autodismiss:paused",{bubbles:!0})))}),e.addEventListener("mouseleave",()=>{m==null&&e.isConnected&&(e.dispatchEvent(new CustomEvent("autodismiss:resumed",{bubbles:!0})),l())}))}async function z(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"AutoDismiss",parameters:["delay","pauseOnHover","effect"],eventHandlers:[],imperativeInstaller:Kt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var De,Oe,Pe,re=u(()=>{"use strict";Fe();g();De=P.source,Oe=P;s()&&z().catch(console.error);Pe={source:P.source,metadata:P,register:z}});var _,ze=u(()=>{"use strict";_={name:"ClickOutside",category:"ui",tier:"core",version:"1.0.0",description:"Fires an event when the user clicks outside the element",parameters:[{name:"active",type:"boolean",optional:!0,default:!0,description:"Whether the listener is active (can be toggled programmatically)"}],events:[{name:"clickoutside",description:"Fired when a pointer press occurs outside the element"},{name:"clickoutside:activate",description:"Listen for this event to programmatically activate detection"},{name:"clickoutside:deactivate",description:"Listen for this event to programmatically deactivate detection"}],requirements:["Uses pointerdown instead of click to avoid timing issues with removed elements"],source:`
118
231
  behavior ClickOutside(active)
119
232
  init
120
- if active is undefined set active to true
233
+ if active is undefined
234
+ set active to true
235
+ end
121
236
  end
122
237
  on pointerdown from document
123
- if active and not me.contains(event.target)
124
- trigger clickoutside on me
238
+ js(me, active)
239
+ if (!me.isConnected) return;
240
+ if (active && !me.contains(event.target)) {
241
+ me.dispatchEvent(new CustomEvent('clickoutside', { bubbles: true }));
242
+ }
125
243
  end
126
244
  end
127
- end`.trim()}});var ft={};y(ft,{clickOutsideMetadata:()=>_e,clickOutsideSource:()=>We,default:()=>Ye,registerClickOutside:()=>_});function Jt(e,t){let r=t.active!==!1;function o(i){if(!e.isConnected){document.removeEventListener("pointerdown",o);return}r&&!e.contains(i.target)&&e.dispatchEvent(new CustomEvent("clickoutside",{bubbles:!0}))}document.addEventListener("pointerdown",o),e.addEventListener("clickoutside:activate",()=>{r=!0}),e.addEventListener("clickoutside:deactivate",()=>{r=!1})}async function _(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"ClickOutside",parameters:["active"],eventHandlers:[],imperativeInstaller:Jt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var We,_e,Ye,oe=u(()=>{"use strict";ze();b();We=W.source,_e=W;s()&&_().catch(console.error);Ye={source:W.source,metadata:W,register:_}});var Y,Ne=u(()=>{"use strict";Y={name:"FocusTrap",category:"ui",tier:"core",version:"1.0.0",description:"Confines Tab navigation inside an element with ARIA support",parameters:[{name:"active",type:"boolean",optional:!0,default:!0,description:"Whether the trap is active on install"},{name:"initialFocus",type:"selector",optional:!0,description:"Element to focus when the trap activates"},{name:"returnFocus",type:"boolean",optional:!0,default:!0,description:"Restore focus to the previously focused element on deactivation"}],events:[{name:"focustrap:activated",description:"Fired when the trap is activated"},{name:"focustrap:deactivated",description:"Fired when the trap is deactivated"}],requirements:['Sets aria-modal="true" on the element when active',"Listens for focustrap:activate and focustrap:deactivate custom events for programmatic control"],source:`
245
+ on clickoutside:activate
246
+ set active to true
247
+ end
248
+ on clickoutside:deactivate
249
+ set active to false
250
+ end
251
+ end`.trim()}});var ft={};y(ft,{clickOutsideMetadata:()=>We,clickOutsideSource:()=>_e,default:()=>Ye,registerClickOutside:()=>W});function Jt(e,t){let r=t.active!==!1;function o(i){if(!e.isConnected){document.removeEventListener("pointerdown",o);return}r&&!e.contains(i.target)&&e.dispatchEvent(new CustomEvent("clickoutside",{bubbles:!0}))}document.addEventListener("pointerdown",o),e.addEventListener("clickoutside:activate",()=>{r=!0}),e.addEventListener("clickoutside:deactivate",()=>{r=!1})}async function W(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"ClickOutside",parameters:["active"],eventHandlers:[],imperativeInstaller:Jt},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var _e,We,Ye,oe=u(()=>{"use strict";ze();g();_e=_.source,We=_;s()&&W().catch(console.error);Ye={source:_.source,metadata:_,register:W}});var Y,Ne=u(()=>{"use strict";Y={name:"FocusTrap",category:"ui",tier:"core",version:"1.0.0",description:"Confines Tab navigation inside an element with ARIA support",parameters:[{name:"active",type:"boolean",optional:!0,default:!0,description:"Whether the trap is active on install"},{name:"initialFocus",type:"selector",optional:!0,description:"Element to focus when the trap activates"},{name:"returnFocus",type:"boolean",optional:!0,default:!0,description:"Restore focus to the previously focused element on deactivation"}],events:[{name:"focustrap:activated",description:"Fired when the trap is activated"},{name:"focustrap:deactivated",description:"Fired when the trap is deactivated"}],requirements:['Sets aria-modal="true" on the element when active',"Listens for focustrap:activate and focustrap:deactivate custom events for programmatic control"],source:`
128
252
  behavior FocusTrap(active, initialFocus, returnFocus)
129
253
  init
130
- if active is undefined set active to true
131
- if returnFocus is undefined set returnFocus to true
254
+ if active is undefined
255
+ set active to true
256
+ end
257
+ if returnFocus is undefined
258
+ set returnFocus to true
259
+ end
260
+ js(me, active, initialFocus, returnFocus)
261
+ var FOCUSABLE = 'a[href],button:not(:disabled),input:not(:disabled),select:not(:disabled),textarea:not(:disabled),[tabindex]:not([tabindex="-1"])';
262
+ var isActive = false;
263
+ var previouslyFocused = null;
264
+ function getFocusable() { return Array.from(me.querySelectorAll(FOCUSABLE)); }
265
+ function activate() {
266
+ if (isActive) return;
267
+ isActive = true;
268
+ previouslyFocused = document.activeElement;
269
+ me.setAttribute('aria-modal', 'true');
270
+ var initEl = initialFocus ? (typeof initialFocus === 'string' ? me.querySelector(initialFocus) : initialFocus) : null;
271
+ if (initEl) { initEl.focus(); } else { var f = getFocusable(); if (f.length) f[0].focus(); }
272
+ me.dispatchEvent(new CustomEvent('focustrap:activated', { bubbles: true }));
273
+ }
274
+ function deactivate() {
275
+ if (!isActive) return;
276
+ isActive = false;
277
+ me.removeAttribute('aria-modal');
278
+ if (returnFocus && previouslyFocused instanceof HTMLElement) previouslyFocused.focus();
279
+ previouslyFocused = null;
280
+ me.dispatchEvent(new CustomEvent('focustrap:deactivated', { bubbles: true }));
281
+ }
282
+ me.addEventListener('keydown', function(e) {
283
+ if (!isActive || e.key !== 'Tab') return;
284
+ var focusable = getFocusable();
285
+ if (focusable.length === 0) { e.preventDefault(); return; }
286
+ e.preventDefault();
287
+ var idx = focusable.indexOf(document.activeElement);
288
+ if (e.shiftKey) {
289
+ focusable[idx <= 0 ? focusable.length - 1 : idx - 1].focus();
290
+ } else {
291
+ focusable[idx >= focusable.length - 1 ? 0 : idx + 1].focus();
292
+ }
293
+ });
294
+ me.addEventListener('focustrap:activate', function() { activate(); });
295
+ me.addEventListener('focustrap:deactivate', function() { deactivate(); });
296
+ if (active) activate();
297
+ end
132
298
  end
133
- -- Imperative installer handles Tab key trapping and focus management
134
- end`.trim()}});var ht={};y(ht,{default:()=>Xe,focusTrapMetadata:()=>qe,focusTrapSource:()=>$e,registerFocusTrap:()=>N});function Zt(e,t){return t?t instanceof HTMLElement?t:typeof t=="string"&&(e.querySelector(t)||document.querySelector(t))||null:null}function er(e,t){let r=t.returnFocus!==!1,o=!1,i=null;function m(){return Array.from(e.querySelectorAll(Qt))}function a(l){if(!o||l.key!=="Tab")return;let d=m();if(d.length===0){l.preventDefault();return}l.preventDefault();let w=d.indexOf(document.activeElement);if(l.shiftKey){let g=w<=0?d.length-1:w-1;d[g].focus()}else{let g=w>=d.length-1?0:w+1;d[g].focus()}}function c(){if(o)return;o=!0,i=document.activeElement,e.setAttribute("aria-modal","true");let l=Zt(e,t.initialFocus);if(l)l.focus();else{let d=m();d.length>0&&d[0].focus()}e.dispatchEvent(new CustomEvent("focustrap:activated",{bubbles:!0}))}function p(){o&&(o=!1,e.removeAttribute("aria-modal"),r&&i instanceof HTMLElement&&i.focus(),i=null,e.dispatchEvent(new CustomEvent("focustrap:deactivated",{bubbles:!0})))}e.addEventListener("keydown",a),e.addEventListener("focustrap:activate",()=>c()),e.addEventListener("focustrap:deactivate",()=>p()),t.active!==!1&&c()}async function N(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"FocusTrap",parameters:["active","initialFocus","returnFocus"],eventHandlers:[],imperativeInstaller:er},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var $e,qe,Qt,Xe,ie=u(()=>{"use strict";Ne();b();$e=Y.source,qe=Y,Qt=["a[href]","button:not(:disabled)","input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"])'].join(", ");s()&&N().catch(console.error);Xe={source:Y.source,metadata:Y,register:N}});var $,Ue=u(()=>{"use strict";$={name:"ScrollReveal",category:"layout",tier:"common",version:"1.0.0",description:"Adds a class when the element enters the viewport via IntersectionObserver",parameters:[{name:"cls",type:"string",optional:!0,default:"revealed",description:"CSS class added when element enters viewport"},{name:"threshold",type:"number",optional:!0,default:.1,description:"Intersection ratio threshold (0-1) for triggering"},{name:"once",type:"boolean",optional:!0,default:!0,description:"If true, disconnect observer after first intersection"},{name:"rootMargin",type:"string",optional:!0,default:"0px",description:"CSS margin around the viewport for triggering earlier or later"}],events:[{name:"scrollreveal:enter",description:"Fired when the element enters the viewport"},{name:"scrollreveal:exit",description:"Fired when the element exits the viewport"}],requirements:["Uses IntersectionObserver API (supported in all modern browsers)"],source:`
135
- behavior ScrollReveal(cls, threshold, once, rootMargin)
299
+ end`.trim()}});var vt={};y(vt,{default:()=>Xe,focusTrapMetadata:()=>je,focusTrapSource:()=>qe,registerFocusTrap:()=>N});function Zt(e,t){return t?t instanceof HTMLElement?t:typeof t=="string"&&(e.querySelector(t)||document.querySelector(t))||null:null}function er(e,t){let r=t.returnFocus!==!1,o=!1,i=null;function m(){return Array.from(e.querySelectorAll(Qt))}function a(l){if(!o||l.key!=="Tab")return;let d=m();if(d.length===0){l.preventDefault();return}l.preventDefault();let w=d.indexOf(document.activeElement);if(l.shiftKey){let h=w<=0?d.length-1:w-1;d[h].focus()}else{let h=w>=d.length-1?0:w+1;d[h].focus()}}function c(){if(o)return;o=!0,i=document.activeElement,e.setAttribute("aria-modal","true");let l=Zt(e,t.initialFocus);if(l)l.focus();else{let d=m();d.length>0&&d[0].focus()}e.dispatchEvent(new CustomEvent("focustrap:activated",{bubbles:!0}))}function p(){o&&(o=!1,e.removeAttribute("aria-modal"),r&&i instanceof HTMLElement&&i.focus(),i=null,e.dispatchEvent(new CustomEvent("focustrap:deactivated",{bubbles:!0})))}e.addEventListener("keydown",a),e.addEventListener("focustrap:activate",()=>c()),e.addEventListener("focustrap:deactivate",()=>p()),t.active!==!1&&c()}async function N(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"FocusTrap",parameters:["active","initialFocus","returnFocus"],eventHandlers:[],imperativeInstaller:er},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var qe,je,Qt,Xe,ie=u(()=>{"use strict";Ne();g();qe=Y.source,je=Y,Qt=["a[href]","button:not(:disabled)","input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"])'].join(", ");s()&&N().catch(console.error);Xe={source:Y.source,metadata:Y,register:N}});var q,$e=u(()=>{"use strict";q={name:"ScrollReveal",category:"layout",tier:"common",version:"1.0.0",description:"Adds a class when the element enters the viewport via IntersectionObserver",parameters:[{name:"cls",type:"string",optional:!0,default:"revealed",description:"CSS class added when element enters viewport"},{name:"threshold",type:"number",optional:!0,default:.1,description:"Intersection ratio threshold (0-1) for triggering"},{name:"once",type:"boolean",optional:!0,default:!0,description:"If true, disconnect observer after first intersection"}],events:[{name:"scrollreveal:enter",description:"Fired when the element enters the viewport"},{name:"scrollreveal:exit",description:"Fired when the element exits the viewport"}],requirements:["Uses IntersectionObserver API (supported in all modern browsers)"],source:`
300
+ behavior ScrollReveal(cls, threshold, once)
136
301
  init
137
- if cls is undefined set cls to "revealed"
138
- if threshold is undefined set threshold to 0.1
139
- if once is undefined set once to true
140
- if rootMargin is undefined set rootMargin to "0px"
141
- end
142
- -- Imperative installer handles IntersectionObserver setup
143
- end`.trim()}});var vt={};y(vt,{default:()=>je,registerScrollReveal:()=>q,scrollRevealMetadata:()=>Ge,scrollRevealSource:()=>Ve});function tr(e,t){let r=typeof t.cls=="string"?t.cls:"revealed",o=typeof t.threshold=="number"?t.threshold:.1,i=t.once!==!1,m=typeof t.rootMargin=="string"?t.rootMargin:"0px",a=new IntersectionObserver(c=>{for(let p of c)p.isIntersecting?(e.classList.add(r),e.dispatchEvent(new CustomEvent("scrollreveal:enter",{bubbles:!0})),i&&a.disconnect()):i||(e.classList.remove(r),e.dispatchEvent(new CustomEvent("scrollreveal:exit",{bubbles:!0})))},{threshold:o,rootMargin:m});a.observe(e)}async function q(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"ScrollReveal",parameters:["cls","threshold","once","rootMargin"],eventHandlers:[],imperativeInstaller:tr},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var Ve,Ge,je,ae=u(()=>{"use strict";Ue();b();Ve=$.source,Ge=$;s()&&q().catch(console.error);je={source:$.source,metadata:$,register:q}});var X,Ke=u(()=>{"use strict";X={name:"Tabs",category:"ui",tier:"core",version:"1.0.0",description:"WAI-ARIA compliant tabs with roving tabindex keyboard navigation. Auto-wires role, aria-selected, aria-controls, and aria-labelledby attributes.",parameters:[{name:"orientation",type:"string",optional:!0,default:"horizontal",enum:["horizontal","vertical"],description:"Arrow key direction: horizontal (Left/Right) or vertical (Up/Down)"},{name:"activeTab",type:"number",optional:!0,default:0,description:"Initial active tab index (zero-based)"},{name:"wrap",type:"boolean",optional:!0,default:!0,description:"Wrap to first/last tab when navigating past the end"},{name:"activeClass",type:"string",optional:!0,default:"active",description:"CSS class applied to the active tab and its panel"}],events:[{name:"tabs:change",description:"Fired before tab selection changes (cancelable via preventDefault)"},{name:"tabs:changed",description:"Fired after tab selection has changed"}],requirements:['Sets role="tablist" on the tab container','Sets role="tab" on tab buttons and role="tabpanel" on content panels',"Manages aria-selected, aria-controls, aria-labelledby, and tabindex","Keyboard: Arrow keys navigate, Home/End jump to first/last, Tab exits tablist"],source:["behavior Tabs(orientation, activeTab, wrap, activeClass)"," init",' if orientation is undefined set orientation to "horizontal"'," if activeTab is undefined set activeTab to 0"," if wrap is undefined set wrap to true",' if activeClass is undefined set activeClass to "active"'," end"," -- Imperative installer handles ARIA wiring and keyboard navigation","end"].join(`
144
- `)}});var bt={};y(bt,{default:()=>Ze,registerTabs:()=>U,tabsMetadata:()=>Qe,tabsSource:()=>Je});function gt(e,t){return e.id||(e.id=`${t}-${++rr}`),e.id}function or(e,t){let r=t.orientation==="vertical"?"vertical":"horizontal",o=t.wrap!==!1,i=t.activeClass||"active",m=typeof t.activeTab=="number"?t.activeTab:0,a=Array.from(e.querySelectorAll('[role="tab"]')),c=Array.from(e.querySelectorAll('[role="tabpanel"]'));if(a.length===0||c.length===0)return;let p=e.querySelector('[role="tablist"]')||a[0].parentElement;p&&!p.getAttribute("role")&&p.setAttribute("role","tablist"),p&&p.setAttribute("aria-orientation",r);let l=Math.min(a.length,c.length);for(let n=0;n<l;n++){let f=gt(a[n],"tab"),E=gt(c[n],"tabpanel");a[n].setAttribute("aria-controls",E),c[n].setAttribute("aria-labelledby",f)}let d=-1;function w(n,f){if(n===f||n<0||n>=l)return!1;let E={tab:a[n],panel:c[n],index:n,previousIndex:f},j=new CustomEvent("tabs:change",{bubbles:!0,cancelable:!0,detail:E});return e.dispatchEvent(j),j.defaultPrevented?!1:(f>=0&&f<l&&(a[f].setAttribute("aria-selected","false"),a[f].setAttribute("tabindex","-1"),a[f].classList.remove(i),c[f].setAttribute("aria-hidden","true"),c[f].classList.remove(i)),a[n].setAttribute("aria-selected","true"),a[n].setAttribute("tabindex","0"),a[n].classList.add(i),c[n].setAttribute("aria-hidden","false"),c[n].classList.add(i),d=n,e.dispatchEvent(new CustomEvent("tabs:changed",{bubbles:!0,detail:E})),!0)}for(let n=0;n<l;n++)a[n].setAttribute("aria-selected","false"),a[n].setAttribute("tabindex","-1"),a[n].classList.remove(i),c[n].setAttribute("aria-hidden","true"),c[n].classList.remove(i);let g=Math.max(0,Math.min(m,l-1));a[g].setAttribute("aria-selected","true"),a[g].setAttribute("tabindex","0"),a[g].classList.add(i),c[g].setAttribute("aria-hidden","false"),c[g].classList.add(i),d=g;for(let n=0;n<l;n++)a[n].addEventListener("click",()=>{w(n,d),a[n].focus()});(p||e).addEventListener("keydown",n=>{let f=r==="horizontal",E=f?"ArrowRight":"ArrowDown",j=f?"ArrowLeft":"ArrowUp",x=null;n.key===E?(x=d+1,x>=l&&(x=o?0:null)):n.key===j?(x=d-1,x<0&&(x=o?l-1:null)):n.key==="Home"?x=0:n.key==="End"&&(x=l-1),x!==null&&(n.preventDefault(),w(x,d)&&a[x].focus())}),e.addEventListener("tabs:select",(n=>{let f=n.detail?.index;typeof f=="number"&&w(f,d)}))}async function U(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Tabs",parameters:["orientation","activeTab","wrap","activeClass"],eventHandlers:[],imperativeInstaller:or},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var Je,Qe,rr,Ze,ne=u(()=>{"use strict";Ke();b();Je=X.source,Qe=X,rr=0;s()&&U().catch(console.error);Ze={source:X.source,metadata:X,register:U}});var ir={};y(ir,{ALL_BEHAVIOR_NAMES:()=>It,AutoDismiss:()=>Oe,BEHAVIORS_BY_CATEGORY:()=>Dt,BEHAVIORS_BY_TIER:()=>Ft,BEHAVIOR_CATEGORIES:()=>Pt,BEHAVIOR_TIERS:()=>Ot,ClickOutside:()=>Ye,Clipboard:()=>Ie,Draggable:()=>pe,FocusTrap:()=>Xe,Removable:()=>ge,Resizable:()=>Be,ScrollReveal:()=>je,Sortable:()=>Le,Tabs:()=>Ze,Toggleable:()=>we,autoDismissMetadata:()=>Pe,autoDismissSource:()=>Fe,clickOutsideMetadata:()=>_e,clickOutsideSource:()=>We,clipboardMetadata:()=>Ae,clipboardSource:()=>He,draggableMetadata:()=>me,draggableSource:()=>ue,focusTrapMetadata:()=>qe,focusTrapSource:()=>$e,getAllSchemas:()=>Tt,getAllSchemasRecord:()=>Mt,getAvailableBehaviors:()=>rt,getBehavior:()=>yt,getBehaviorsByCategory:()=>ot,getBehaviorsByTier:()=>it,getRegisteredBehaviors:()=>Lt,getSchema:()=>wt,hasLoader:()=>kt,isRegistered:()=>Et,loadAll:()=>Rt,loadBehavior:()=>V,preloadCategory:()=>Bt,preloadTier:()=>Ct,ready:()=>se,registerAll:()=>zt,registerAllWithRuntime:()=>At,registerAutoDismiss:()=>z,registerBehavior:()=>tt,registerClickOutside:()=>_,registerClipboard:()=>P,registerDraggable:()=>M,registerFocusTrap:()=>N,registerLoader:()=>v,registerRemovable:()=>C,registerResizable:()=>D,registerSchema:()=>h,registerScrollReveal:()=>q,registerSortable:()=>A,registerTabs:()=>U,registerToggleable:()=>R,registerWithRuntime:()=>Ht,removableMetadata:()=>ve,removableSource:()=>he,resizableMetadata:()=>Ce,resizableSource:()=>Me,scrollRevealMetadata:()=>Ge,scrollRevealSource:()=>Ve,sortableMetadata:()=>ke,sortableSource:()=>Ee,tabsMetadata:()=>Qe,tabsSource:()=>Je,toggleableMetadata:()=>xe,toggleableSource:()=>ye,tryGetBehavior:()=>xt,tryGetSchema:()=>St});K();J();Q();Z();ee();te();re();oe();ie();ae();ne();var S=new Map,L=new Map,G=new Map,et=new Map;function tt(e,t){S.set(e,t),t.metadata&&L.set(e,t.metadata)}function h(e){L.set(e.name,e)}function v(e,t){G.set(e,t)}function yt(e){let t=S.get(e);if(!t){let r=Array.from(S.keys()).join(", ");throw new Error(`Behavior '${e}' is not registered. Registered behaviors: ${r||"none"}. Use loadBehavior('${e}') to lazy load it.`)}return t}function xt(e){return S.get(e)}function wt(e){let t=L.get(e);if(!t)throw new Error(`Schema for behavior '${e}' is not registered. Use tryGetSchema('${e}') for a non-throwing alternative.`);return t}function St(e){return L.get(e)}function Et(e){return S.has(e)}function kt(e){return G.has(e)}function Lt(){return Array.from(S.keys())}function rt(){let e=new Set([...S.keys(),...G.keys()]);return Array.from(e)}function ot(e){let t=[];for(let[r,o]of L)o.category===e&&t.push(r);return t}function it(e){let t=[];for(let[r,o]of L)o.tier===e&&t.push(r);return t}function Tt(){return Array.from(L.values())}function Mt(){let e={};for(let[t,r]of L)e[t]=r;return e}async function V(e){let t=S.get(e);if(t)return t;let r=et.get(e);if(r)return r;let o=G.get(e);if(!o)throw new Error(`No loader registered for behavior '${e}'. Available loaders: ${Array.from(G.keys()).join(", ")||"none"}`);let i=o().then(m=>{let a=m.default;return tt(e,a),et.delete(e),a});return et.set(e,i),i}async function Ct(e){let t=it(e);await Promise.all(t.map(r=>V(r).catch(o=>{console.warn(`[behaviors] Failed to preload '${r}' (tier: ${e}):`,o)})))}async function Bt(e){let t=ot(e);await Promise.all(t.map(r=>V(r).catch(o=>{console.warn(`[behaviors] Failed to preload '${r}' (category: ${e}):`,o)})))}async function Rt(){let e=rt();await Promise.all(e.map(t=>V(t).catch(r=>{console.warn(`[behaviors] Failed to load '${t}':`,r)})))}async function Ht(e,t){await(await V(e)).register(t)}async function At(e){let t=Array.from(S.values()).map(r=>r.register(e));await Promise.all(t)}de();Se();Te();fe();be();Re();De();ze();Ne();Ue();Ke();h(T);h(H);h(I);h(k);h(B);h(F);h(O);h(W);h(Y);h($);h(X);v("Draggable",()=>Promise.resolve().then(()=>(K(),nt)));v("Sortable",()=>Promise.resolve().then(()=>(Z(),lt)));v("Resizable",()=>Promise.resolve().then(()=>(ee(),dt)));v("Removable",()=>Promise.resolve().then(()=>(J(),st)));v("Toggleable",()=>Promise.resolve().then(()=>(Q(),ct)));v("Clipboard",()=>Promise.resolve().then(()=>(te(),mt)));v("AutoDismiss",()=>Promise.resolve().then(()=>(re(),pt)));v("ClickOutside",()=>Promise.resolve().then(()=>(oe(),ft)));v("FocusTrap",()=>Promise.resolve().then(()=>(ie(),ht)));v("ScrollReveal",()=>Promise.resolve().then(()=>(ae(),vt)));v("Tabs",()=>Promise.resolve().then(()=>(ne(),bt)));var It=["Draggable","Sortable","Resizable","Removable","Toggleable","Clipboard","AutoDismiss","ClickOutside","FocusTrap","ScrollReveal","Tabs"],Dt={ui:["Draggable","Sortable","Resizable","Clipboard","AutoDismiss","ClickOutside","FocusTrap","Tabs"],data:["Removable"],animation:[],form:["Toggleable"],layout:["ScrollReveal"]},Ft={core:["Draggable","Toggleable","Clipboard","AutoDismiss","ClickOutside","FocusTrap","Tabs"],common:["Sortable","Removable","ScrollReveal"],optional:["Resizable"]},Pt={Draggable:"ui",Sortable:"ui",Resizable:"ui",Removable:"data",Toggleable:"form",Clipboard:"ui",AutoDismiss:"ui",ClickOutside:"ui",FocusTrap:"ui",ScrollReveal:"layout",Tabs:"ui"},Ot={Draggable:"core",Sortable:"common",Resizable:"optional",Removable:"common",Toggleable:"core",Clipboard:"core",AutoDismiss:"core",ClickOutside:"core",FocusTrap:"core",ScrollReveal:"common",Tabs:"core"};K();J();Q();Z();ee();te();re();oe();ie();ae();ne();b();async function zt(e){await Promise.all([M(e),C(e),R(e),A(e),D(e),P(e),z(e),_(e),N(e),q(e),U(e)])}var se=null,at=s();if(at){let e=window;se=zt(at),e.__hyperfixi_behaviors_ready=se,se.then(()=>{let t=at,r=e.__hyperfixi_behaviors_ready;delete e.__hyperfixi_behaviors_ready,t.attributeProcessor?.scanAndProcessAll?t.attributeProcessor.scanAndProcessAll().finally(()=>{e.__hyperfixi_behaviors_ready=r}):t.processNode&&(t.processNode(document),e.__hyperfixi_behaviors_ready=r)}).catch(t=>{console.error("[behaviors] Auto-registration failed:",t)})}return $t(ir);})();
302
+ if cls is undefined
303
+ set cls to "revealed"
304
+ end
305
+ if threshold is undefined
306
+ set threshold to 0.1
307
+ end
308
+ if once is undefined
309
+ set once to true
310
+ end
311
+ js(me, cls, threshold, once)
312
+ var obs = new IntersectionObserver(function(entries) {
313
+ for (var i = 0; i < entries.length; i++) {
314
+ if (entries[i].isIntersecting) {
315
+ me.classList.add(cls);
316
+ me.dispatchEvent(new CustomEvent('scrollreveal:enter', { bubbles: true }));
317
+ if (once) obs.disconnect();
318
+ } else if (!once) {
319
+ me.classList.remove(cls);
320
+ me.dispatchEvent(new CustomEvent('scrollreveal:exit', { bubbles: true }));
321
+ }
322
+ }
323
+ }, { threshold: threshold });
324
+ obs.observe(me);
325
+ end
326
+ end
327
+ end`.trim()}});var bt={};y(bt,{default:()=>Ge,registerScrollReveal:()=>j,scrollRevealMetadata:()=>Ve,scrollRevealSource:()=>Ue});function tr(e,t){let r=typeof t.cls=="string"?t.cls:"revealed",o=typeof t.threshold=="number"?t.threshold:.1,i=t.once!==!1,m=typeof t.rootMargin=="string"?t.rootMargin:"0px",a=new IntersectionObserver(c=>{for(let p of c)p.isIntersecting?(e.classList.add(r),e.dispatchEvent(new CustomEvent("scrollreveal:enter",{bubbles:!0})),i&&a.disconnect()):i||(e.classList.remove(r),e.dispatchEvent(new CustomEvent("scrollreveal:exit",{bubbles:!0})))},{threshold:o,rootMargin:m});a.observe(e)}async function j(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"ScrollReveal",parameters:["cls","threshold","once","rootMargin"],eventHandlers:[],imperativeInstaller:tr},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var Ue,Ve,Ge,ae=u(()=>{"use strict";$e();g();Ue=q.source,Ve=q;s()&&j().catch(console.error);Ge={source:q.source,metadata:q,register:j}});var X,Ke=u(()=>{"use strict";X={name:"Tabs",category:"ui",tier:"core",version:"1.0.0",description:"WAI-ARIA compliant tabs with roving tabindex keyboard navigation. Auto-wires role, aria-selected, aria-controls, and aria-labelledby attributes.",parameters:[{name:"orientation",type:"string",optional:!0,default:"horizontal",enum:["horizontal","vertical"],description:"Arrow key direction: horizontal (Left/Right) or vertical (Up/Down)"},{name:"activeTab",type:"number",optional:!0,default:0,description:"Initial active tab index (zero-based)"},{name:"wrap",type:"boolean",optional:!0,default:!0,description:"Wrap to first/last tab when navigating past the end"},{name:"activeClass",type:"string",optional:!0,default:"active",description:"CSS class applied to the active tab and its panel"}],events:[{name:"tabs:change",description:"Fired before tab selection changes (cancelable via preventDefault)"},{name:"tabs:changed",description:"Fired after tab selection has changed"}],requirements:['Sets role="tablist" on the tab container','Sets role="tab" on tab buttons and role="tabpanel" on content panels',"Manages aria-selected, aria-controls, aria-labelledby, and tabindex","Keyboard: Arrow keys navigate, Home/End jump to first/last, Tab exits tablist"],source:`
328
+ behavior Tabs(orientation, activeTab, wrap, activeClass)
329
+ init
330
+ if orientation is undefined
331
+ set orientation to "horizontal"
332
+ end
333
+ if activeTab is undefined
334
+ set activeTab to 0
335
+ end
336
+ if wrap is undefined
337
+ set wrap to true
338
+ end
339
+ if activeClass is undefined
340
+ set activeClass to "active"
341
+ end
342
+ js(me, orientation, activeTab, wrap, activeClass)
343
+ var tabs = Array.from(me.querySelectorAll('[role="tab"]'));
344
+ var panels = Array.from(me.querySelectorAll('[role="tabpanel"]'));
345
+ if (tabs.length === 0 || panels.length === 0) return;
346
+ var tablist = me.querySelector('[role="tablist"]') || tabs[0].parentElement;
347
+ if (tablist) tablist.setAttribute('aria-orientation', orientation);
348
+ var count = Math.min(tabs.length, panels.length);
349
+ var idN = 0;
350
+ for (var i = 0; i < count; i++) {
351
+ if (!tabs[i].id) tabs[i].id = 'tab-' + (++idN);
352
+ if (!panels[i].id) panels[i].id = 'tabpanel-' + idN;
353
+ tabs[i].setAttribute('aria-controls', panels[i].id);
354
+ panels[i].setAttribute('aria-labelledby', tabs[i].id);
355
+ }
356
+ var cur = Math.max(0, Math.min(activeTab, count - 1));
357
+ function activate(idx, prev) {
358
+ if (idx === prev || idx < 0 || idx >= count) return false;
359
+ var ev = new CustomEvent('tabs:change', { bubbles: true, cancelable: true, detail: { index: idx, previousIndex: prev } });
360
+ me.dispatchEvent(ev);
361
+ if (ev.defaultPrevented) return false;
362
+ if (prev >= 0 && prev < count) {
363
+ tabs[prev].setAttribute('aria-selected', 'false');
364
+ tabs[prev].setAttribute('tabindex', '-1');
365
+ tabs[prev].classList.remove(activeClass);
366
+ panels[prev].setAttribute('aria-hidden', 'true');
367
+ panels[prev].classList.remove(activeClass);
368
+ }
369
+ tabs[idx].setAttribute('aria-selected', 'true');
370
+ tabs[idx].setAttribute('tabindex', '0');
371
+ tabs[idx].classList.add(activeClass);
372
+ panels[idx].setAttribute('aria-hidden', 'false');
373
+ panels[idx].classList.add(activeClass);
374
+ cur = idx;
375
+ me.dispatchEvent(new CustomEvent('tabs:changed', { bubbles: true, detail: { index: idx } }));
376
+ return true;
377
+ }
378
+ for (var j = 0; j < count; j++) {
379
+ tabs[j].setAttribute('aria-selected', 'false');
380
+ tabs[j].setAttribute('tabindex', '-1');
381
+ panels[j].setAttribute('aria-hidden', 'true');
382
+ panels[j].classList.remove(activeClass);
383
+ }
384
+ tabs[cur].setAttribute('aria-selected', 'true');
385
+ tabs[cur].setAttribute('tabindex', '0');
386
+ tabs[cur].classList.add(activeClass);
387
+ panels[cur].setAttribute('aria-hidden', 'false');
388
+ panels[cur].classList.add(activeClass);
389
+ for (var k = 0; k < count; k++) {
390
+ (function(idx) {
391
+ tabs[idx].addEventListener('click', function() { if (activate(idx, cur)) tabs[idx].focus(); });
392
+ })(k);
393
+ }
394
+ (tablist || me).addEventListener('keydown', function(e) {
395
+ var nk = orientation === 'horizontal' ? 'ArrowRight' : 'ArrowDown';
396
+ var pk = orientation === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';
397
+ var next = null;
398
+ if (e.key === nk) { next = cur + 1; if (next >= count) next = wrap ? 0 : null; }
399
+ else if (e.key === pk) { next = cur - 1; if (next < 0) next = wrap ? count - 1 : null; }
400
+ else if (e.key === 'Home') next = 0;
401
+ else if (e.key === 'End') next = count - 1;
402
+ if (next !== null) { e.preventDefault(); if (activate(next, cur)) tabs[next].focus(); }
403
+ });
404
+ end
405
+ end
406
+ end`.trim()}});var gt={};y(gt,{default:()=>Ze,registerTabs:()=>$,tabsMetadata:()=>Qe,tabsSource:()=>Je});function ht(e,t){return e.id||(e.id=`${t}-${++rr}`),e.id}function or(e,t){let r=t.orientation==="vertical"?"vertical":"horizontal",o=t.wrap!==!1,i=t.activeClass||"active",m=typeof t.activeTab=="number"?t.activeTab:0,a=Array.from(e.querySelectorAll('[role="tab"]')),c=Array.from(e.querySelectorAll('[role="tabpanel"]'));if(a.length===0||c.length===0)return;let p=e.querySelector('[role="tablist"]')||a[0].parentElement;p&&!p.getAttribute("role")&&p.setAttribute("role","tablist"),p&&p.setAttribute("aria-orientation",r);let l=Math.min(a.length,c.length);for(let n=0;n<l;n++){let f=ht(a[n],"tab"),S=ht(c[n],"tabpanel");a[n].setAttribute("aria-controls",S),c[n].setAttribute("aria-labelledby",f)}let d=-1;function w(n,f){if(n===f||n<0||n>=l)return!1;let S={tab:a[n],panel:c[n],index:n,previousIndex:f},G=new CustomEvent("tabs:change",{bubbles:!0,cancelable:!0,detail:S});return e.dispatchEvent(G),G.defaultPrevented?!1:(f>=0&&f<l&&(a[f].setAttribute("aria-selected","false"),a[f].setAttribute("tabindex","-1"),a[f].classList.remove(i),c[f].setAttribute("aria-hidden","true"),c[f].classList.remove(i)),a[n].setAttribute("aria-selected","true"),a[n].setAttribute("tabindex","0"),a[n].classList.add(i),c[n].setAttribute("aria-hidden","false"),c[n].classList.add(i),d=n,e.dispatchEvent(new CustomEvent("tabs:changed",{bubbles:!0,detail:S})),!0)}for(let n=0;n<l;n++)a[n].setAttribute("aria-selected","false"),a[n].setAttribute("tabindex","-1"),a[n].classList.remove(i),c[n].setAttribute("aria-hidden","true"),c[n].classList.remove(i);let h=Math.max(0,Math.min(m,l-1));a[h].setAttribute("aria-selected","true"),a[h].setAttribute("tabindex","0"),a[h].classList.add(i),c[h].setAttribute("aria-hidden","false"),c[h].classList.add(i),d=h;for(let n=0;n<l;n++)a[n].addEventListener("click",()=>{w(n,d),a[n].focus()});(p||e).addEventListener("keydown",n=>{let f=r==="horizontal",S=f?"ArrowRight":"ArrowDown",G=f?"ArrowLeft":"ArrowUp",x=null;n.key===S?(x=d+1,x>=l&&(x=o?0:null)):n.key===G?(x=d-1,x<0&&(x=o?l-1:null)):n.key==="Home"?x=0:n.key==="End"&&(x=l-1),x!==null&&(n.preventDefault(),w(x,d)&&a[x].focus())}),e.addEventListener("tabs:select",(n=>{let f=n.detail?.index;typeof f=="number"&&w(f,d)}))}async function $(e){let t=e||s();if(!t)throw new Error("LokaScript not found. Make sure @hyperfixi/core is loaded before registering behaviors.");let r={type:"behavior",name:"Tabs",parameters:["orientation","activeTab","wrap","activeClass"],eventHandlers:[],imperativeInstaller:or},o=t.createContext?t.createContext():{locals:new Map,globals:new Map};await t.execute(r,o)}var Je,Qe,rr,Ze,ne=u(()=>{"use strict";Ke();g();Je=X.source,Qe=X,rr=0;s()&&$().catch(console.error);Ze={source:X.source,metadata:X,register:$}});var ir={};y(ir,{ALL_BEHAVIOR_NAMES:()=>It,AutoDismiss:()=>Pe,BEHAVIORS_BY_CATEGORY:()=>Ft,BEHAVIORS_BY_TIER:()=>Dt,BEHAVIOR_CATEGORIES:()=>Ot,BEHAVIOR_TIERS:()=>Pt,ClickOutside:()=>Ye,Clipboard:()=>Ie,Draggable:()=>pe,FocusTrap:()=>Xe,Removable:()=>he,Resizable:()=>Ae,ScrollReveal:()=>Ge,Sortable:()=>Le,Tabs:()=>Ze,Toggleable:()=>we,autoDismissMetadata:()=>Oe,autoDismissSource:()=>De,clickOutsideMetadata:()=>We,clickOutsideSource:()=>_e,clipboardMetadata:()=>He,clipboardSource:()=>Be,draggableMetadata:()=>me,draggableSource:()=>ue,focusTrapMetadata:()=>je,focusTrapSource:()=>qe,getAllSchemas:()=>Ct,getAllSchemasRecord:()=>Tt,getAvailableBehaviors:()=>rt,getBehavior:()=>yt,getBehaviorsByCategory:()=>ot,getBehaviorsByTier:()=>it,getRegisteredBehaviors:()=>Lt,getSchema:()=>wt,hasLoader:()=>kt,isRegistered:()=>St,loadAll:()=>Rt,loadBehavior:()=>U,preloadCategory:()=>At,preloadTier:()=>Mt,ready:()=>se,registerAll:()=>zt,registerAllWithRuntime:()=>Ht,registerAutoDismiss:()=>z,registerBehavior:()=>tt,registerClickOutside:()=>W,registerClipboard:()=>O,registerDraggable:()=>T,registerFocusTrap:()=>N,registerLoader:()=>b,registerRemovable:()=>M,registerResizable:()=>F,registerSchema:()=>v,registerScrollReveal:()=>j,registerSortable:()=>H,registerTabs:()=>$,registerToggleable:()=>R,registerWithRuntime:()=>Bt,removableMetadata:()=>be,removableSource:()=>ve,resizableMetadata:()=>Me,resizableSource:()=>Te,scrollRevealMetadata:()=>Ve,scrollRevealSource:()=>Ue,sortableMetadata:()=>ke,sortableSource:()=>Se,tabsMetadata:()=>Qe,tabsSource:()=>Je,toggleableMetadata:()=>xe,toggleableSource:()=>ye,tryGetBehavior:()=>xt,tryGetSchema:()=>Et});K();J();Q();Z();ee();te();re();oe();ie();ae();ne();var E=new Map,L=new Map,V=new Map,et=new Map;function tt(e,t){E.set(e,t),t.metadata&&L.set(e,t.metadata)}function v(e){L.set(e.name,e)}function b(e,t){V.set(e,t)}function yt(e){let t=E.get(e);if(!t){let r=Array.from(E.keys()).join(", ");throw new Error(`Behavior '${e}' is not registered. Registered behaviors: ${r||"none"}. Use loadBehavior('${e}') to lazy load it.`)}return t}function xt(e){return E.get(e)}function wt(e){let t=L.get(e);if(!t)throw new Error(`Schema for behavior '${e}' is not registered. Use tryGetSchema('${e}') for a non-throwing alternative.`);return t}function Et(e){return L.get(e)}function St(e){return E.has(e)}function kt(e){return V.has(e)}function Lt(){return Array.from(E.keys())}function rt(){let e=new Set([...E.keys(),...V.keys()]);return Array.from(e)}function ot(e){let t=[];for(let[r,o]of L)o.category===e&&t.push(r);return t}function it(e){let t=[];for(let[r,o]of L)o.tier===e&&t.push(r);return t}function Ct(){return Array.from(L.values())}function Tt(){let e={};for(let[t,r]of L)e[t]=r;return e}async function U(e){let t=E.get(e);if(t)return t;let r=et.get(e);if(r)return r;let o=V.get(e);if(!o)throw new Error(`No loader registered for behavior '${e}'. Available loaders: ${Array.from(V.keys()).join(", ")||"none"}`);let i=o().then(m=>{let a=m.default;return tt(e,a),et.delete(e),a});return et.set(e,i),i}async function Mt(e){let t=it(e);await Promise.all(t.map(r=>U(r).catch(o=>{console.warn(`[behaviors] Failed to preload '${r}' (tier: ${e}):`,o)})))}async function At(e){let t=ot(e);await Promise.all(t.map(r=>U(r).catch(o=>{console.warn(`[behaviors] Failed to preload '${r}' (category: ${e}):`,o)})))}async function Rt(){let e=rt();await Promise.all(e.map(t=>U(t).catch(r=>{console.warn(`[behaviors] Failed to load '${t}':`,r)})))}async function Bt(e,t){await(await U(e)).register(t)}async function Ht(e){let t=Array.from(E.values()).map(r=>r.register(e));await Promise.all(t)}de();Ee();Ce();fe();ge();Re();Fe();ze();Ne();$e();Ke();v(C);v(B);v(I);v(k);v(A);v(D);v(P);v(_);v(Y);v(q);v(X);b("Draggable",()=>Promise.resolve().then(()=>(K(),nt)));b("Sortable",()=>Promise.resolve().then(()=>(Z(),lt)));b("Resizable",()=>Promise.resolve().then(()=>(ee(),dt)));b("Removable",()=>Promise.resolve().then(()=>(J(),st)));b("Toggleable",()=>Promise.resolve().then(()=>(Q(),ct)));b("Clipboard",()=>Promise.resolve().then(()=>(te(),mt)));b("AutoDismiss",()=>Promise.resolve().then(()=>(re(),pt)));b("ClickOutside",()=>Promise.resolve().then(()=>(oe(),ft)));b("FocusTrap",()=>Promise.resolve().then(()=>(ie(),vt)));b("ScrollReveal",()=>Promise.resolve().then(()=>(ae(),bt)));b("Tabs",()=>Promise.resolve().then(()=>(ne(),gt)));var It=["Draggable","Sortable","Resizable","Removable","Toggleable","Clipboard","AutoDismiss","ClickOutside","FocusTrap","ScrollReveal","Tabs"],Ft={ui:["Draggable","Sortable","Resizable","Clipboard","AutoDismiss","ClickOutside","FocusTrap","Tabs"],data:["Removable"],animation:[],form:["Toggleable"],layout:["ScrollReveal"]},Dt={core:["Draggable","Toggleable","Clipboard","AutoDismiss","ClickOutside","FocusTrap","Tabs"],common:["Sortable","Removable","ScrollReveal"],optional:["Resizable"]},Ot={Draggable:"ui",Sortable:"ui",Resizable:"ui",Removable:"data",Toggleable:"form",Clipboard:"ui",AutoDismiss:"ui",ClickOutside:"ui",FocusTrap:"ui",ScrollReveal:"layout",Tabs:"ui"},Pt={Draggable:"core",Sortable:"common",Resizable:"optional",Removable:"common",Toggleable:"core",Clipboard:"core",AutoDismiss:"core",ClickOutside:"core",FocusTrap:"core",ScrollReveal:"common",Tabs:"core"};K();J();Q();Z();ee();te();re();oe();ie();ae();ne();g();async function zt(e){await Promise.all([T(e),M(e),R(e),H(e),F(e),O(e),z(e),W(e),N(e),j(e),$(e)])}var se=null,at=s();if(at){let e=window;se=zt(at),e.__hyperfixi_behaviors_ready=se,se.then(()=>{let t=at,r=e.__hyperfixi_behaviors_ready;delete e.__hyperfixi_behaviors_ready,t.attributeProcessor?.scanAndProcessAll?t.attributeProcessor.scanAndProcessAll().finally(()=>{e.__hyperfixi_behaviors_ready=r}):t.processNode&&(t.processNode(document),e.__hyperfixi_behaviors_ready=r)}).catch(t=>{console.error("[behaviors] Auto-registration failed:",t)})}return qt(ir);})();
145
407
  //# sourceMappingURL=all.browser.global.js.map