@mhmo91/schmancy 0.10.18 → 0.10.20

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 (373) hide show
  1. package/custom-elements.json +0 -13
  2. package/dist/agent/{flow-CvG1fLW5.js.map → flow-3RrZM-e7.js.map} +1 -1
  3. package/dist/agent/overlay.confirm-body-mYm0zq4k.js +2863 -0
  4. package/dist/agent/overlay.confirm-body-mYm0zq4k.js.map +1 -0
  5. package/dist/agent/{rolldown-runtime-DsMetpgY.js → rolldown-runtime-BIIoCavz.js} +9 -2
  6. package/dist/agent/schmancy.agent.js +3932 -5905
  7. package/dist/agent/schmancy.agent.js.map +1 -1
  8. package/dist/agent/schmancy.manifest.json +1 -9
  9. package/dist/agent/{vendor-material-color-DcL7ZPxx.js.map → vendor-material-color-33Mj762T.js.map} +1 -1
  10. package/dist/area-C7MNn-3e.cjs +12 -0
  11. package/dist/area-C7MNn-3e.cjs.map +1 -0
  12. package/dist/{area-BIipuSyO.js → area-CRe41aIG.js} +91 -130
  13. package/dist/area-CRe41aIG.js.map +1 -0
  14. package/dist/area.cjs +1 -1
  15. package/dist/area.js +1 -1
  16. package/dist/{audio-D-TZzpXF.cjs → audio-Cvmemu84.cjs} +1 -1
  17. package/dist/{audio-D-TZzpXF.cjs.map → audio-Cvmemu84.cjs.map} +1 -1
  18. package/dist/{audio-DS43uoRA.js → audio-CxO5a2HL.js} +1 -1
  19. package/dist/{audio-DS43uoRA.js.map → audio-CxO5a2HL.js.map} +1 -1
  20. package/dist/audio.cjs +1 -1
  21. package/dist/audio.js +2 -2
  22. package/dist/{autocomplete-Mrb3koUN.js → autocomplete-CRDFL4Ul.js} +2 -2
  23. package/dist/{autocomplete-Mrb3koUN.js.map → autocomplete-CRDFL4Ul.js.map} +1 -1
  24. package/dist/{autocomplete-B8CE5vGw.cjs → autocomplete-CqUl7o0e.cjs} +1 -1
  25. package/dist/{autocomplete-B8CE5vGw.cjs.map → autocomplete-CqUl7o0e.cjs.map} +1 -1
  26. package/dist/autocomplete.cjs +1 -1
  27. package/dist/autocomplete.js +1 -1
  28. package/dist/avatar.cjs +1 -1
  29. package/dist/avatar.js +1 -1
  30. package/dist/badge.cjs +1 -1
  31. package/dist/badge.js +1 -1
  32. package/dist/{boat-DN1_tyvx.cjs → boat-BHV5kOlN.cjs} +1 -1
  33. package/dist/{boat-DN1_tyvx.cjs.map → boat-BHV5kOlN.cjs.map} +1 -1
  34. package/dist/{boat-cuoSkhGI.js → boat-XajM8A3M.js} +2 -2
  35. package/dist/{boat-cuoSkhGI.js.map → boat-XajM8A3M.js.map} +1 -1
  36. package/dist/boat.cjs +1 -1
  37. package/dist/boat.js +1 -1
  38. package/dist/breadcrumb.cjs +1 -1
  39. package/dist/breadcrumb.js +1 -1
  40. package/dist/{busy-CMKX4oQf.cjs → busy-BlBZ5ZOs.cjs} +1 -1
  41. package/dist/{busy-CMKX4oQf.cjs.map → busy-BlBZ5ZOs.cjs.map} +1 -1
  42. package/dist/{busy-Cetzws-m.js → busy-D8YsqVBf.js} +1 -1
  43. package/dist/{busy-Cetzws-m.js.map → busy-D8YsqVBf.js.map} +1 -1
  44. package/dist/busy.cjs +1 -1
  45. package/dist/busy.js +1 -1
  46. package/dist/button.cjs +15 -9
  47. package/dist/button.cjs.map +1 -1
  48. package/dist/button.js +15 -9
  49. package/dist/button.js.map +1 -1
  50. package/dist/{card-D2k3dRL0.js → card-C9TljY2Z.js} +1 -1
  51. package/dist/{card-D2k3dRL0.js.map → card-C9TljY2Z.js.map} +1 -1
  52. package/dist/{card-8VXoo2C_.cjs → card-yT_St83D.cjs} +1 -1
  53. package/dist/{card-8VXoo2C_.cjs.map → card-yT_St83D.cjs.map} +1 -1
  54. package/dist/card.cjs +1 -1
  55. package/dist/card.js +1 -1
  56. package/dist/{checkbox-8hNsBejz.js → checkbox-BDgh4rge.js} +1 -1
  57. package/dist/{checkbox-8hNsBejz.js.map → checkbox-BDgh4rge.js.map} +1 -1
  58. package/dist/{checkbox-Cq5wzeaY.cjs → checkbox-Dz2lkJs0.cjs} +1 -1
  59. package/dist/{checkbox-Cq5wzeaY.cjs.map → checkbox-Dz2lkJs0.cjs.map} +1 -1
  60. package/dist/checkbox.cjs +1 -1
  61. package/dist/checkbox.js +1 -1
  62. package/dist/{chips-DSdvCpmi.cjs → chips-M7Dr2npv.cjs} +2 -4
  63. package/dist/chips-M7Dr2npv.cjs.map +1 -0
  64. package/dist/{chips-m2NPN480.js → chips-N7fu0hA4.js} +4 -6
  65. package/dist/chips-N7fu0hA4.js.map +1 -0
  66. package/dist/chips.cjs +1 -1
  67. package/dist/chips.js +2 -2
  68. package/dist/connectivity.cjs +1 -1
  69. package/dist/connectivity.js +2 -2
  70. package/dist/content-drawer.cjs +1 -1
  71. package/dist/content-drawer.js +1 -1
  72. package/dist/{date-range-DxS3Agbj.cjs → date-range-D2vxD814.cjs} +1 -1
  73. package/dist/{date-range-DxS3Agbj.cjs.map → date-range-D2vxD814.cjs.map} +1 -1
  74. package/dist/{date-range-D98QcCHl.js → date-range-DFWOMgI3.js} +2 -2
  75. package/dist/{date-range-D98QcCHl.js.map → date-range-DFWOMgI3.js.map} +1 -1
  76. package/dist/{date-range-inline-Bvs2ZvEY.cjs → date-range-inline-C5JuZ_Kw.cjs} +1 -1
  77. package/dist/{date-range-inline-Bvs2ZvEY.cjs.map → date-range-inline-C5JuZ_Kw.cjs.map} +1 -1
  78. package/dist/{date-range-inline-TWWnTZlw.js → date-range-inline-D3q1OoKk.js} +1 -1
  79. package/dist/{date-range-inline-TWWnTZlw.js.map → date-range-inline-D3q1OoKk.js.map} +1 -1
  80. package/dist/date-range-inline.cjs +1 -1
  81. package/dist/date-range-inline.js +1 -1
  82. package/dist/date-range.cjs +1 -1
  83. package/dist/date-range.js +1 -1
  84. package/dist/delay.cjs +1 -1
  85. package/dist/delay.js +1 -1
  86. package/dist/{details-Cpg8sH2F.js → details-BrUPmd92.js} +2 -2
  87. package/dist/details-BrUPmd92.js.map +1 -0
  88. package/dist/{details-CwSDur6j.cjs → details-DmDEInaL.cjs} +2 -2
  89. package/dist/details-DmDEInaL.cjs.map +1 -0
  90. package/dist/details.cjs +1 -1
  91. package/dist/details.js +1 -1
  92. package/dist/directives.cjs +1 -1
  93. package/dist/directives.js +1 -1
  94. package/dist/{divider-Be833gGZ.js → divider-BLijs8ba.js} +1 -1
  95. package/dist/{divider-Be833gGZ.js.map → divider-BLijs8ba.js.map} +1 -1
  96. package/dist/{divider-BNdVLE0H.cjs → divider-B_Ts_-qz.cjs} +1 -1
  97. package/dist/{divider-BNdVLE0H.cjs.map → divider-B_Ts_-qz.cjs.map} +1 -1
  98. package/dist/divider.cjs +1 -1
  99. package/dist/divider.js +1 -1
  100. package/dist/dropdown.cjs +1 -1
  101. package/dist/dropdown.js +1 -1
  102. package/dist/{expand-CtoffNNj.js → expand-C-xSpg7M.js} +2 -2
  103. package/dist/{expand-CtoffNNj.js.map → expand-C-xSpg7M.js.map} +1 -1
  104. package/dist/{expand-BP6RLzHw.cjs → expand-DV5sWUB6.cjs} +1 -1
  105. package/dist/{expand-BP6RLzHw.cjs.map → expand-DV5sWUB6.cjs.map} +1 -1
  106. package/dist/expand.cjs +1 -1
  107. package/dist/expand.js +1 -1
  108. package/dist/{float-B8NcSE3a.cjs → float-LyKef0LY.cjs} +1 -1
  109. package/dist/{float-B8NcSE3a.cjs.map → float-LyKef0LY.cjs.map} +1 -1
  110. package/dist/{float-C-glc-3u.js → float-Y22yVBE2.js} +1 -1
  111. package/dist/{float-C-glc-3u.js.map → float-Y22yVBE2.js.map} +1 -1
  112. package/dist/float.cjs +1 -1
  113. package/dist/float.js +1 -1
  114. package/dist/{form-St_IwR7y.cjs → form-C_smXI2-.cjs} +1 -1
  115. package/dist/{form-St_IwR7y.cjs.map → form-C_smXI2-.cjs.map} +1 -1
  116. package/dist/{form-DJvxIyfW.js → form-LFkEQkOX.js} +9 -9
  117. package/dist/{form-DJvxIyfW.js.map → form-LFkEQkOX.js.map} +1 -1
  118. package/dist/form.cjs +1 -1
  119. package/dist/form.js +6 -6
  120. package/dist/handover/agent-runtime-followups.md +1 -1
  121. package/dist/handover/agent-runtime-v1.md +3 -3
  122. package/dist/{icons-D7df1ysG.js → icons-B3pFrwKC.js} +1 -1
  123. package/dist/{icons-D7df1ysG.js.map → icons-B3pFrwKC.js.map} +1 -1
  124. package/dist/{icons-BJld4JHp.cjs → icons-CCNy4Egc.cjs} +1 -1
  125. package/dist/{icons-BJld4JHp.cjs.map → icons-CCNy4Egc.cjs.map} +1 -1
  126. package/dist/icons.cjs +1 -1
  127. package/dist/icons.js +1 -1
  128. package/dist/{iframe-DAbgW9tT.js → iframe-BbFlCEyP.js} +1 -1
  129. package/dist/{iframe-DAbgW9tT.js.map → iframe-BbFlCEyP.js.map} +1 -1
  130. package/dist/{iframe-GT6D8l5Z.cjs → iframe-CCcmLZ_K.cjs} +1 -1
  131. package/dist/{iframe-GT6D8l5Z.cjs.map → iframe-CCcmLZ_K.cjs.map} +1 -1
  132. package/dist/iframe.cjs +1 -1
  133. package/dist/iframe.js +1 -1
  134. package/dist/index.cjs +1 -1
  135. package/dist/index.js +59 -56
  136. package/dist/{input-DC6ap_uN.js → input-Dkneo4uA.js} +2 -2
  137. package/dist/{input-DC6ap_uN.js.map → input-Dkneo4uA.js.map} +1 -1
  138. package/dist/{input-chip-c5n547tg.js → input-chip-C1-TYu4v.js} +1 -1
  139. package/dist/{input-chip-c5n547tg.js.map → input-chip-C1-TYu4v.js.map} +1 -1
  140. package/dist/{input-chip-MsiMu-b5.cjs → input-chip-F5NEkkBU.cjs} +1 -1
  141. package/dist/{input-chip-MsiMu-b5.cjs.map → input-chip-F5NEkkBU.cjs.map} +1 -1
  142. package/dist/{input-BE9wEEw4.cjs → input-sBZ89wz1.cjs} +1 -1
  143. package/dist/{input-BE9wEEw4.cjs.map → input-sBZ89wz1.cjs.map} +1 -1
  144. package/dist/input.cjs +1 -1
  145. package/dist/input.js +1 -1
  146. package/dist/json.cjs +1 -1
  147. package/dist/json.js +2 -2
  148. package/dist/kbd.cjs +1 -1
  149. package/dist/kbd.js +1 -1
  150. package/dist/{layout-Delq-QvR.cjs → layout-BbCIfIgo.cjs} +1 -1
  151. package/dist/{layout-Delq-QvR.cjs.map → layout-BbCIfIgo.cjs.map} +1 -1
  152. package/dist/{layout-BH28sKGc.js → layout-Dq2oeOTS.js} +1 -1
  153. package/dist/{layout-BH28sKGc.js.map → layout-Dq2oeOTS.js.map} +1 -1
  154. package/dist/layout.cjs +1 -1
  155. package/dist/layout.js +1 -1
  156. package/dist/{lightbox-HqJBBjAT.cjs → lightbox-B4m5lxGs.cjs} +1 -1
  157. package/dist/{lightbox-HqJBBjAT.cjs.map → lightbox-B4m5lxGs.cjs.map} +1 -1
  158. package/dist/{lightbox-CNX9Eg3U.js → lightbox-D7hYFspE.js} +1 -1
  159. package/dist/{lightbox-CNX9Eg3U.js.map → lightbox-D7hYFspE.js.map} +1 -1
  160. package/dist/lightbox.cjs +1 -1
  161. package/dist/lightbox.js +1 -1
  162. package/dist/{list-bhyuQSyO.cjs → list-C2ycz-yr.cjs} +1 -1
  163. package/dist/{list-bhyuQSyO.cjs.map → list-C2ycz-yr.cjs.map} +1 -1
  164. package/dist/{list-C76Pb-c1.js → list-Ou72tSeq.js} +1 -1
  165. package/dist/{list-C76Pb-c1.js.map → list-Ou72tSeq.js.map} +1 -1
  166. package/dist/list.cjs +1 -1
  167. package/dist/list.js +1 -1
  168. package/dist/{menu-Dag0cuWV.cjs → menu-ComSx-T0.cjs} +1 -1
  169. package/dist/{menu-Dag0cuWV.cjs.map → menu-ComSx-T0.cjs.map} +1 -1
  170. package/dist/{menu-B_-weNpZ.js → menu-YHbpRa7x.js} +2 -2
  171. package/dist/{menu-B_-weNpZ.js.map → menu-YHbpRa7x.js.map} +1 -1
  172. package/dist/menu.cjs +1 -1
  173. package/dist/menu.js +1 -1
  174. package/dist/mixins-B9kY_60p.js +636 -0
  175. package/dist/{mixins-DCVXqL1Q.js.map → mixins-B9kY_60p.js.map} +1 -1
  176. package/dist/mixins-BwGJwK7X.cjs +254 -0
  177. package/dist/{mixins-Du9HMrIG.cjs.map → mixins-BwGJwK7X.cjs.map} +1 -1
  178. package/dist/mixins.cjs +1 -1
  179. package/dist/mixins.js +1 -1
  180. package/dist/nav-drawer.cjs +1 -1
  181. package/dist/nav-drawer.js +1 -1
  182. package/dist/navigation-bar.cjs +1 -1
  183. package/dist/navigation-bar.js +1 -1
  184. package/dist/navigation-rail.cjs +1 -1
  185. package/dist/navigation-rail.js +1 -1
  186. package/dist/{notification-yd2KeHjd.cjs → notification-DZhL0ZEg.cjs} +1 -1
  187. package/dist/{notification-yd2KeHjd.cjs.map → notification-DZhL0ZEg.cjs.map} +1 -1
  188. package/dist/{notification-DySnvQeO.js → notification-O4Q5pyio.js} +3 -3
  189. package/dist/{notification-DySnvQeO.js.map → notification-O4Q5pyio.js.map} +1 -1
  190. package/dist/notification.cjs +1 -1
  191. package/dist/notification.js +1 -1
  192. package/dist/{option-CBEHYG4U.js → option-BCks0a4i.js} +1 -1
  193. package/dist/{option-CBEHYG4U.js.map → option-BCks0a4i.js.map} +1 -1
  194. package/dist/{option-BDOKUqTy.cjs → option-C2VKw8Yt.cjs} +1 -1
  195. package/dist/{option-BDOKUqTy.cjs.map → option-C2VKw8Yt.cjs.map} +1 -1
  196. package/dist/option.cjs +1 -1
  197. package/dist/option.js +1 -1
  198. package/dist/overlay-C0YSnxoV.js +743 -0
  199. package/dist/overlay-C0YSnxoV.js.map +1 -0
  200. package/dist/overlay-CG1gc1Jw.cjs +80 -0
  201. package/dist/overlay-CG1gc1Jw.cjs.map +1 -0
  202. package/dist/overlay.cjs +1 -80
  203. package/dist/{overlay.confirm-body-sUmd_zVy.cjs → overlay.confirm-body-B-Kmn7LF.cjs} +1 -1
  204. package/dist/{overlay.confirm-body-sUmd_zVy.cjs.map → overlay.confirm-body-B-Kmn7LF.cjs.map} +1 -1
  205. package/dist/{overlay.confirm-body-DESGpbru.js → overlay.confirm-body-BmOnrKbF.js} +1 -1
  206. package/dist/{overlay.confirm-body-DESGpbru.js.map → overlay.confirm-body-BmOnrKbF.js.map} +1 -1
  207. package/dist/overlay.js +5 -746
  208. package/dist/{overlay.service-BxtEFFSH.cjs → overlay.service-BPKV2a8w.cjs} +1 -1
  209. package/dist/{overlay.service-BxtEFFSH.cjs.map → overlay.service-BPKV2a8w.cjs.map} +1 -1
  210. package/dist/{overlay.service-DV_o_xQ0.js → overlay.service-CRoq9Gu-.js} +2 -2
  211. package/dist/{overlay.service-DV_o_xQ0.js.map → overlay.service-CRoq9Gu-.js.map} +1 -1
  212. package/dist/page.cjs +1 -1
  213. package/dist/page.js +4 -4
  214. package/dist/{progress-CMSst_2U.cjs → progress-B9RWAFv5.cjs} +1 -1
  215. package/dist/{progress-CMSst_2U.cjs.map → progress-B9RWAFv5.cjs.map} +1 -1
  216. package/dist/{progress-C4kDZfb7.js → progress-CEEl7vdd.js} +1 -1
  217. package/dist/{progress-C4kDZfb7.js.map → progress-CEEl7vdd.js.map} +1 -1
  218. package/dist/progress.cjs +1 -1
  219. package/dist/progress.js +1 -1
  220. package/dist/radio-group-C2y6H5YY.cjs +19 -0
  221. package/dist/radio-group-C2y6H5YY.cjs.map +1 -0
  222. package/dist/radio-group-VERF_8rC.js +71 -0
  223. package/dist/radio-group-VERF_8rC.js.map +1 -0
  224. package/dist/radio-group.cjs +1 -1
  225. package/dist/radio-group.js +1 -1
  226. package/dist/range.cjs +1 -1
  227. package/dist/range.js +1 -1
  228. package/dist/{rxjs-utils-Dv9T9IpA.js.map → rxjs-utils-Cs6XGwF6.js.map} +1 -1
  229. package/dist/{rxjs-utils-BKB2UM_j.cjs.map → rxjs-utils-Dsj75cJy.cjs.map} +1 -1
  230. package/dist/rxjs-utils.cjs +1 -1
  231. package/dist/rxjs-utils.js +1 -1
  232. package/dist/{scroll-C1klVgSQ.js → scroll-Bj7FsS08.js} +1 -1
  233. package/dist/{scroll-C1klVgSQ.js.map → scroll-Bj7FsS08.js.map} +1 -1
  234. package/dist/{scroll-S-bXF2u6.cjs → scroll-Djz3pJfX.cjs} +1 -1
  235. package/dist/{scroll-S-bXF2u6.cjs.map → scroll-Djz3pJfX.cjs.map} +1 -1
  236. package/dist/{select-UU2pB67h.js → select-ClJj_2AP.js} +3 -3
  237. package/dist/select-ClJj_2AP.js.map +1 -0
  238. package/dist/select-CngphfDB.cjs +56 -0
  239. package/dist/select-CngphfDB.cjs.map +1 -0
  240. package/dist/select.cjs +1 -1
  241. package/dist/select.js +1 -1
  242. package/dist/skeleton.cjs +1 -1
  243. package/dist/skeleton.js +1 -1
  244. package/dist/skills/SKILL.md +12 -0
  245. package/dist/skills/schmancy/SKILL.md +12 -0
  246. package/dist/slider.cjs +1 -1
  247. package/dist/slider.js +1 -1
  248. package/dist/{sound.service-DyY78ukR.cjs → sound.service-DVJZb9ox.cjs} +1 -1
  249. package/dist/{sound.service-DyY78ukR.cjs.map → sound.service-DVJZb9ox.cjs.map} +1 -1
  250. package/dist/{sound.service-BIN2W7Rv.js → sound.service-v_jqCkos.js} +1 -1
  251. package/dist/{sound.service-BIN2W7Rv.js.map → sound.service-v_jqCkos.js.map} +1 -1
  252. package/dist/{splash-screen-bGW_sS4i.js → splash-screen-BQsBy3O1.js} +1 -1
  253. package/dist/{splash-screen-bGW_sS4i.js.map → splash-screen-BQsBy3O1.js.map} +1 -1
  254. package/dist/{splash-screen-25PTDqnp.cjs → splash-screen-CntIFk2h.cjs} +1 -1
  255. package/dist/{splash-screen-25PTDqnp.cjs.map → splash-screen-CntIFk2h.cjs.map} +1 -1
  256. package/dist/splash-screen.cjs +1 -1
  257. package/dist/splash-screen.js +1 -1
  258. package/dist/{src-olrlFt4e.js → src-BAXhEv8f.js} +37 -36
  259. package/dist/{src-olrlFt4e.js.map → src-BAXhEv8f.js.map} +1 -1
  260. package/dist/{src-Blm9PNcf.cjs → src-ChFa-FDD.cjs} +1 -1
  261. package/dist/{src-Blm9PNcf.cjs.map → src-ChFa-FDD.cjs.map} +1 -1
  262. package/dist/{state-nm8yzMPp.js → state-CHbIt2Dw.js} +198 -202
  263. package/dist/{state-nm8yzMPp.js.map → state-CHbIt2Dw.js.map} +1 -1
  264. package/dist/state-DcGj-pJJ.cjs +1 -0
  265. package/dist/{state-avic94Ft.cjs.map → state-DcGj-pJJ.cjs.map} +1 -1
  266. package/dist/state.cjs +1 -1
  267. package/dist/state.js +1 -1
  268. package/dist/steps.cjs +1 -1
  269. package/dist/steps.js +1 -1
  270. package/dist/{surface-DCRy-EyT.js → surface-CHUJSY1o.js} +1 -1
  271. package/dist/{surface-DCRy-EyT.js.map → surface-CHUJSY1o.js.map} +1 -1
  272. package/dist/{surface-DWwQDX9r.cjs → surface-CXmQuXun.cjs} +1 -1
  273. package/dist/{surface-DWwQDX9r.cjs.map → surface-CXmQuXun.cjs.map} +1 -1
  274. package/dist/surface.cjs +1 -1
  275. package/dist/surface.js +1 -1
  276. package/dist/switch.cjs +1 -1
  277. package/dist/switch.js +1 -1
  278. package/dist/table.cjs +1 -1
  279. package/dist/table.js +1 -1
  280. package/dist/{tabs-Dc3_Ox2B.cjs → tabs-Bku0sC0p.cjs} +1 -1
  281. package/dist/{tabs-Dc3_Ox2B.cjs.map → tabs-Bku0sC0p.cjs.map} +1 -1
  282. package/dist/{tabs-BVC_qn8S.js → tabs-DPVX21WM.js} +1 -1
  283. package/dist/{tabs-BVC_qn8S.js.map → tabs-DPVX21WM.js.map} +1 -1
  284. package/dist/tabs.cjs +1 -1
  285. package/dist/tabs.js +1 -1
  286. package/dist/teleport.cjs +1 -1
  287. package/dist/teleport.js +1 -1
  288. package/dist/{textarea-CNa4dSvF.cjs → textarea-CqJNviYi.cjs} +1 -1
  289. package/dist/{textarea-CNa4dSvF.cjs.map → textarea-CqJNviYi.cjs.map} +1 -1
  290. package/dist/{textarea-DkfGmRSI.js → textarea-D6z1UZzs.js} +1 -1
  291. package/dist/{textarea-DkfGmRSI.js.map → textarea-D6z1UZzs.js.map} +1 -1
  292. package/dist/textarea.cjs +1 -1
  293. package/dist/textarea.js +1 -1
  294. package/dist/{theme-DCybsrfv.cjs → theme-BpKVBJCr.cjs} +1 -1
  295. package/dist/{theme-DCybsrfv.cjs.map → theme-BpKVBJCr.cjs.map} +1 -1
  296. package/dist/{theme-BiCwFfCf.js → theme-DbHfINBV.js} +3 -3
  297. package/dist/{theme-BiCwFfCf.js.map → theme-DbHfINBV.js.map} +1 -1
  298. package/dist/{theme-button-DqiA0rJg.js → theme-button-BeU8Nbs2.js} +1 -1
  299. package/dist/{theme-button-DqiA0rJg.js.map → theme-button-BeU8Nbs2.js.map} +1 -1
  300. package/dist/{theme-button-cZGRyQRK.cjs → theme-button-Cof9I85G.cjs} +1 -1
  301. package/dist/{theme-button-cZGRyQRK.cjs.map → theme-button-Cof9I85G.cjs.map} +1 -1
  302. package/dist/theme-button.cjs +1 -1
  303. package/dist/theme-button.js +1 -1
  304. package/dist/theme.cjs +1 -1
  305. package/dist/theme.js +3 -3
  306. package/dist/{theme.service-BOWIT_5k.js → theme.service-CSzNkqBB.js} +1 -1
  307. package/dist/{theme.service-BOWIT_5k.js.map → theme.service-CSzNkqBB.js.map} +1 -1
  308. package/dist/{theme.service-DkdH1t60.cjs → theme.service-CnFUmUpc.cjs} +1 -1
  309. package/dist/{theme.service-DkdH1t60.cjs.map → theme.service-CnFUmUpc.cjs.map} +1 -1
  310. package/dist/tree.cjs +1 -1
  311. package/dist/tree.js +1 -1
  312. package/dist/typography.cjs +1 -1
  313. package/dist/typography.js +1 -1
  314. package/dist/{utils-D2QUu4-g.cjs.map → utils-C-Q8ePtG.cjs.map} +1 -1
  315. package/dist/{utils-Cj_nRRyx.js.map → utils-DXE5fBBd.js.map} +1 -1
  316. package/dist/utils.cjs +1 -1
  317. package/dist/utils.js +1 -1
  318. package/dist/visually-hidden.cjs +1 -1
  319. package/dist/visually-hidden.js +1 -1
  320. package/dist/{window-BMecbTzs.cjs → window-Cql1aIX2.cjs} +1 -1
  321. package/dist/{window-BMecbTzs.cjs.map → window-Cql1aIX2.cjs.map} +1 -1
  322. package/dist/{window-DMy5Gsgu.js → window-DmMNsos0.js} +2 -2
  323. package/dist/{window-DMy5Gsgu.js.map → window-DmMNsos0.js.map} +1 -1
  324. package/dist/window.cjs +1 -1
  325. package/dist/window.js +1 -1
  326. package/package.json +1 -1
  327. package/skills/schmancy/SKILL.md +12 -0
  328. package/src/CLAUDE.md +20 -0
  329. package/src/area/area.component.ts +155 -342
  330. package/src/button/button.ts +8 -5
  331. package/src/button/icon-button.ts +8 -5
  332. package/src/chips/filter-chip.ts +1 -3
  333. package/src/details/details.ts +1 -1
  334. package/src/form/fields/radio-group/radio-button.ts +22 -44
  335. package/src/form/fields/radio-group/radio-group.ts +20 -75
  336. package/src/form/fields/select/select.ts +3 -2
  337. package/src/index.ts +8 -0
  338. package/src/overlay/overlay.component.ts +29 -39
  339. package/src/overlay/overlay.positioning.ts +10 -2
  340. package/src/state/index.ts +31 -9
  341. package/src/state/schmancy-state.html +897 -0
  342. package/src/state/schmancy-state.md +981 -0
  343. package/types/src/area/area.component.d.ts +0 -15
  344. package/types/src/button/icon-button.d.ts +1 -1
  345. package/types/src/form/fields/radio-group/radio-button.d.ts +2 -5
  346. package/types/src/form/fields/radio-group/radio-group.d.ts +2 -10
  347. package/types/src/index.d.ts +1 -0
  348. package/types/src/overlay/overlay.positioning.d.ts +9 -1
  349. package/dist/area-BIipuSyO.js.map +0 -1
  350. package/dist/area-C-EMiNEE.cjs +0 -12
  351. package/dist/area-C-EMiNEE.cjs.map +0 -1
  352. package/dist/chips-DSdvCpmi.cjs.map +0 -1
  353. package/dist/chips-m2NPN480.js.map +0 -1
  354. package/dist/details-Cpg8sH2F.js.map +0 -1
  355. package/dist/details-CwSDur6j.cjs.map +0 -1
  356. package/dist/mixins-DCVXqL1Q.js +0 -636
  357. package/dist/mixins-Du9HMrIG.cjs +0 -254
  358. package/dist/overlay.cjs.map +0 -1
  359. package/dist/overlay.js.map +0 -1
  360. package/dist/radio-group-DB9D2ZkA.js +0 -108
  361. package/dist/radio-group-DB9D2ZkA.js.map +0 -1
  362. package/dist/radio-group-dVUvYFq7.cjs +0 -40
  363. package/dist/radio-group-dVUvYFq7.cjs.map +0 -1
  364. package/dist/select-UU2pB67h.js.map +0 -1
  365. package/dist/select-fu_-rZyn.cjs +0 -56
  366. package/dist/select-fu_-rZyn.cjs.map +0 -1
  367. package/dist/state-avic94Ft.cjs +0 -1
  368. /package/dist/agent/{flow-CvG1fLW5.js → flow-3RrZM-e7.js} +0 -0
  369. /package/dist/agent/{vendor-material-color-DcL7ZPxx.js → vendor-material-color-33Mj762T.js} +0 -0
  370. /package/dist/{rxjs-utils-Dv9T9IpA.js → rxjs-utils-Cs6XGwF6.js} +0 -0
  371. /package/dist/{rxjs-utils-BKB2UM_j.cjs → rxjs-utils-Dsj75cJy.cjs} +0 -0
  372. /package/dist/{utils-D2QUu4-g.cjs → utils-C-Q8ePtG.cjs} +0 -0
  373. /package/dist/{utils-Cj_nRRyx.js → utils-DXE5fBBd.js} +0 -0
@@ -16,13 +16,16 @@ import { ButtonVariant } from './button'
16
16
  export class SchmnacyIconButton extends SchmancyElement {
17
17
  static styles = [css`
18
18
  :host {
19
- display: inline-block;
20
- width: fit-content;
19
+ display: inline-flex;
21
20
  border-radius: 9999px;
22
21
  transition:
23
22
  box-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
24
23
  transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
25
24
  }
25
+ :host([width="full"]) {
26
+ display: flex;
27
+ width: 100%;
28
+ }
26
29
  :host(:hover:not([disabled])) {
27
30
  box-shadow: 0 2px 12px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 18%, transparent);
28
31
  }
@@ -71,7 +74,7 @@ export class SchmnacyIconButton extends SchmancyElement {
71
74
  * @type {'full' | 'auto'}
72
75
  * @default 'auto'
73
76
  */
74
- @property()
77
+ @property({ reflect: true })
75
78
  public width: 'full' | 'auto' = 'auto'
76
79
 
77
80
  /**
@@ -189,7 +192,7 @@ export class SchmnacyIconButton extends SchmancyElement {
189
192
  event.stopPropagation()
190
193
  }
191
194
 
192
- protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
195
+ protected firstUpdated(_changedProperties: PropertyValueMap<unknown> | Map<PropertyKey, unknown>): void {
193
196
  // Add any first-update logic here if needed.
194
197
  }
195
198
 
@@ -210,7 +213,7 @@ export class SchmnacyIconButton extends SchmancyElement {
210
213
  effectiveVariant === 'filled' ||
211
214
  effectiveVariant === 'filled tonal'),
212
215
  'hover:shadow-sm': !this.disabled && effectiveVariant === 'elevated',
213
- 'w-full text-center': this.width === 'full',
216
+ 'flex-1 text-center': this.width === 'full',
214
217
  'bg-surface-low text-primary-default shadow-xs': effectiveVariant === 'elevated',
215
218
  'bg-transparent text-primary-default border-1 border-outline': effectiveVariant === 'outlined',
216
219
  'bg-primary-default text-primary-on': effectiveVariant === 'filled',
@@ -22,10 +22,8 @@ import { magnetic } from '../directives/magnetic'
22
22
  export class SchmancyFilterChip extends SchmancyElement {
23
23
  static styles = [css`
24
24
  :host {
25
- display: inline-block;
25
+ display: inline-flex;
26
26
  outline: none;
27
- width: fit-content;
28
- min-width: fit-content;
29
27
  border-radius: 0.5rem;
30
28
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
31
29
  }
@@ -216,7 +216,7 @@ export default class SchmancyDetails extends SurfaceMixin(SchmancyElement) {
216
216
 
217
217
  const detailsClasses = this.classMap({
218
218
  'w-full rounded-xl transition-shadow duration-200 ease-out': true,
219
- 'overflow-hidden': !this.overlay,
219
+ 'overflow-visible': !this.overlay,
220
220
  'overflow-visible relative': this.overlay,
221
221
  })
222
222
 
@@ -1,7 +1,6 @@
1
1
  import { SchmancyElement } from '@mixins/index'
2
2
  import { html } from 'lit'
3
3
  import { customElement, property } from 'lit/decorators.js'
4
- import { FormFieldMixin } from '@mixins/formField.mixin'
5
4
  import { fromEvent, takeUntil } from 'rxjs'
6
5
 
7
6
  /**
@@ -13,62 +12,41 @@ import { fromEvent, takeUntil } from 'rxjs'
13
12
  * @prop {boolean} disabled - Whether the radio button is disabled
14
13
  */
15
14
  @customElement('schmancy-radio-button')
16
- export class RadioButton extends FormFieldMixin(SchmancyElement) {
17
- @property({ type: String }) override value = ''
15
+ export class RadioButton extends SchmancyElement {
16
+ @property({ type: String }) value = ''
18
17
  @property({ type: Boolean, reflect: true }) checked = false
19
- @property({ type: Boolean }) override disabled = false
20
- @property({ type: String }) override name = ''
18
+ @property({ type: Boolean }) disabled = false
19
+ @property({ type: String }) name = ''
21
20
 
22
21
  connectedCallback() {
23
22
  super.connectedCallback()
24
- // Listen for click events
25
23
  fromEvent<MouseEvent>(this, 'click')
26
24
  .pipe(takeUntil(this.disconnecting))
27
- .subscribe(this.handleClick)
25
+ .subscribe(this._handleClick)
28
26
  }
29
27
 
30
- disconnectedCallback() {
31
- super.disconnectedCallback()
32
- // Event listeners are automatically cleaned up via takeUntil(this.disconnecting)
33
- }
34
-
35
- private handleClick() {
28
+ private _handleClick = () => {
36
29
  if (this.disabled) return
37
-
38
- // Find parent radio-group if exists
39
- const radioGroup = this.closest('schmancy-radio-group')
40
- if (radioGroup) {
41
- // Let the radio-group handle the change
42
- const event = new CustomEvent('radio-button-click', {
43
- detail: { value: this.value },
44
- bubbles: true,
45
- composed: true,
46
- })
47
- this.dispatchEvent(event)
48
- } else {
49
- // Standalone usage
50
- this.checked = true
51
- this.emitChange({ value: this.value })
52
- }
30
+ this.dispatchEvent(new CustomEvent('radio-button-click', {
31
+ detail: { value: this.value },
32
+ bubbles: true,
33
+ composed: true,
34
+ }))
53
35
  }
54
36
 
55
37
  render() {
56
38
  return html`
57
- <label class="relative flex items-start cursor-pointer">
58
- <div class="flex items-center h-6">
59
- <input
60
- type="radio"
61
- class="h-4 w-4 text-primary-default focus:ring-primary-container border-outline"
62
- .value=${this.value}
63
- .checked=${this.checked}
64
- .disabled=${this.disabled}
65
- .name=${this.name}
66
- @change=${() => {}}
67
- />
68
- </div>
69
- <div class="ml-3">
70
- <slot name="label"></slot>
71
- </div>
39
+ <label class="flex items-center gap-3 cursor-pointer">
40
+ <input
41
+ type="radio"
42
+ class="h-4 w-4 text-primary-default focus:ring-primary-container border-outline"
43
+ .value=${this.value}
44
+ .checked=${this.checked}
45
+ .disabled=${this.disabled}
46
+ .name=${this.name}
47
+ @change=${() => {}}
48
+ />
49
+ <slot></slot>
72
50
  </label>
73
51
  `
74
52
  }
@@ -1,104 +1,49 @@
1
1
  import { html, unsafeCSS } from 'lit'
2
2
  import { customElement, property } from 'lit/decorators.js'
3
- import { Subject, fromEvent, takeUntil } from 'rxjs'
3
+ import { fromEvent, takeUntil } from 'rxjs'
4
4
  import style from './radio-group.scss?inline'
5
5
  import { SchmancyElement } from '@mixins/index'
6
6
  import { when } from 'lit/directives/when.js'
7
7
  import { FormFieldMixin } from '@mixins/formField.mixin'
8
+ import type { RadioButton } from './radio-button.ts'
9
+
10
+ export type SchmancyRadioGroupChangeEvent = CustomEvent<{ value: string }>
8
11
 
9
- export type SchmancyRadioGroupOption = {
10
- label: string
11
- value: string
12
- }
13
- export type SchmancyRadioGroupChangeEvent = CustomEvent<{
14
- value: string
15
- }>
16
12
  @customElement('schmancy-radio-group')
17
13
  export class RadioGroup extends FormFieldMixin(SchmancyElement) {
18
- static styles = [unsafeCSS(style)];
14
+ static styles = [unsafeCSS(style)]
19
15
  @property({ type: String }) override label = ''
20
16
  @property({ type: String }) override name = ''
21
17
  @property({ type: String }) override value = ''
22
- @property({ type: Array }) options: SchmancyRadioGroupOption[] = []
23
- @property({ type: Boolean }) override required: boolean = false
24
- private selection$ = new Subject<string>()
18
+ @property({ type: Boolean }) override required = false
25
19
 
26
20
  connectedCallback() {
27
21
  super.connectedCallback()
28
- this.selection$.pipe(takeUntil(this.disconnecting)).subscribe(value => {
29
- this.value = value
30
- this.emitChange({ value })
31
- // Update all child radio buttons
32
- this.updateChildRadioButtons()
33
- })
34
-
35
- // Listen for radio button clicks from children
36
22
  fromEvent<CustomEvent>(this, 'radio-button-click')
37
23
  .pipe(takeUntil(this.disconnecting))
38
- .subscribe((e: CustomEvent) => {
39
- this.selection$.next(e.detail.value)
24
+ .subscribe((e: CustomEvent<{ value: string }>) => {
25
+ this.value = e.detail.value
26
+ this.emitChange({ value: e.detail.value })
27
+ this._syncChildren()
40
28
  })
41
29
  }
42
30
 
43
- disconnectedCallback() {
44
- super.disconnectedCallback()
45
- // Subscriptions are automatically cleaned up via takeUntil(this.disconnecting)
46
- this.selection$?.complete()
31
+ updated(changed: Map<string, unknown>) {
32
+ super.updated(changed)
33
+ if (changed.has('value')) this._syncChildren()
47
34
  }
48
-
49
- private handleSelection(value: string) {
50
- this.selection$.next(value)
51
- }
52
-
53
- private updateChildRadioButtons() {
54
- // Update child radio buttons checked state
55
- const radioButtons = this.querySelectorAll('schmancy-radio-button')
56
- radioButtons.forEach(button => {
57
- const buttonValue = button.getAttribute('value')
58
- if (buttonValue === this.value) {
59
- button.setAttribute('checked', '')
60
- } else {
61
- button.removeAttribute('checked')
62
- }
35
+
36
+ private _syncChildren() {
37
+ this.querySelectorAll<RadioButton>('schmancy-radio-button').forEach(btn => {
38
+ btn.checked = btn.value === this.value
63
39
  })
64
40
  }
65
-
66
- // For backwards compatibility with direct option setting
67
- updated(changedProperties: Map<string, unknown>) {
68
- super.updated(changedProperties)
69
- if (changedProperties.has('value')) {
70
- this.updateChildRadioButtons()
71
- }
72
- }
73
41
 
74
42
  render() {
75
- // Check if we have any slotted radio buttons
76
- const hasSlottedContent = this.childElementCount > 0
77
-
78
43
  return html`
79
- <div class="grid gap-4">
80
- ${when(this.label, () => html` <label class="text-base font-semibold text-surface-on">${this.label}</label> `)}
81
-
82
- ${hasSlottedContent ?
83
- html`<slot></slot>` :
84
- this.options?.map(option => html`
85
- <div class="flex items-center">
86
- <input
87
- .required=${this.required}
88
- id=${option.value}
89
- class="h-4 w-4 border-outline text-primary-default focus:ring-primary-default"
90
- type="radio"
91
- name=${this.name}
92
- .value=${option.value}
93
- .checked=${option.value === this.value}
94
- @change=${() => this.handleSelection(option.value)}
95
- />
96
- <label for=${option.value} class="ml-3 block text-sm font-medium leading-6 text-surface-on">
97
- ${option.label || option.value}
98
- </label>
99
- </div>
100
- `)
101
- }
44
+ <div role="radiogroup" aria-label=${this.label} aria-required=${this.required} class="grid gap-2">
45
+ ${when(this.label, () => html`<schmancy-typography type="label" token="lg">${this.label}</schmancy-typography>`)}
46
+ <slot></slot>
102
47
  </div>
103
48
  `
104
49
  }
@@ -52,10 +52,11 @@ export class SchmancySelect extends SchmancyFormField() {
52
52
  @property({ type: String, reflect: true })
53
53
  override get value(): string | string[] {
54
54
  return this.multi
55
- ? this._selectedValues$.value
56
- : this._selectedValue$.value
55
+ ? (this._selectedValues$?.value ?? [])
56
+ : (this._selectedValue$?.value ?? '')
57
57
  }
58
58
  override set value(val: string | string[]) {
59
+ if (!this._selectedValue$ || !this._selectedValues$) return
59
60
  if (this.multi) {
60
61
  const values = Array.isArray(val)
61
62
  ? val
package/src/index.ts CHANGED
@@ -35,6 +35,14 @@ export * from './navigation-bar';
35
35
  export * from './navigation-rail';
36
36
  export * from './notification';
37
37
  export * from './option';
38
+ // Overlay's `show`, `confirm`, `prompt`, etc. need to surface through
39
+ // the main barrel. Module Federation's static-export discovery (and
40
+ // rolldown's tree-shake analysis through MF virtual modules) walks
41
+ // the package's main entry to enumerate available exports, so when
42
+ // downstream code does `import { show } from '@mhmo91/schmancy/overlay'`
43
+ // inside a federated context, the build-time check passes only if
44
+ // `show` is reachable from the main barrel.
45
+ export * from './overlay';
38
46
  export * from './page';
39
47
  export * from './progress';
40
48
  export * from './form/fields/radio-group';
@@ -409,51 +409,41 @@ export class SchmancyOverlay extends SchmancyElement {
409
409
  )
410
410
  .subscribe()
411
411
 
412
- // Modal tier: manual Esc (popover tiers use native toggle event).
413
- if (this.tier === 'modal') {
414
- fromEvent<KeyboardEvent>(document, 'keydown')
415
- .pipe(
416
- filter((e) => e.key === 'Escape'),
417
- tap((e) => {
418
- if (!this.dismissable) {
419
- e.preventDefault()
420
- return
421
- }
412
+ // Manual Esc all tiers. Modal has no native dismiss; anchored
413
+ // tiers use `popover="manual"` so the browser doesn't auto-Esc them
414
+ // either (the auto popover-stack would close ancestor overlays when
415
+ // a nested overlay opens — see positionPopoverAPI's comment).
416
+ fromEvent<KeyboardEvent>(document, 'keydown')
417
+ .pipe(
418
+ filter((e) => e.key === 'Escape'),
419
+ tap((e) => {
420
+ if (!this.dismissable) {
422
421
  e.preventDefault()
423
- void this.close('escape')
424
- }),
425
- takeUntil(until),
426
- )
427
- .subscribe()
428
- }
429
-
430
- // Popover tiers: native `toggle` event fires on open/close, with
431
- // `newState: 'closed'` when the browser light-dismisses the popover.
432
- if (this.tier === 'popover-fui' || this.tier === 'css-anchor') {
433
- fromEvent<ToggleEvent>(this._surface, 'toggle')
434
- .pipe(
435
- filter((e) => e.newState === 'closed'),
436
- take(1),
437
- tap(() => {
438
- if (!this._closing) void this.close('light-dismiss')
439
- }),
440
- takeUntil(until),
441
- )
442
- .subscribe()
443
- }
422
+ return
423
+ }
424
+ e.preventDefault()
425
+ void this.close('escape')
426
+ }),
427
+ takeUntil(until),
428
+ )
429
+ .subscribe()
444
430
 
445
- // Floating-UI-only tier: manual outside-click dismissal.
446
- if (this.tier === 'fui-only') {
431
+ // Manual outside-click — all anchored tiers. Modal layouts have a
432
+ // backdrop that catches outside clicks via `onBackdropClick`; the
433
+ // anchored tiers (no backdrop) need a document-level pointerdown
434
+ // listener that ignores clicks whose composedPath includes the
435
+ // surface or anchor. Use composedPath membership (not
436
+ // `Node.contains`) so clicks on elements inside slotted /
437
+ // shadow-DOM descendants of the surface are correctly classified
438
+ // as "inside".
439
+ if (this.tier !== 'modal') {
447
440
  fromEvent<PointerEvent>(document, 'pointerdown', { capture: true })
448
441
  .pipe(
449
442
  filter((e) => {
450
443
  if (!this.dismissable) return false
451
- const target = e.composedPath()[0] as Node | undefined
452
- if (!target) return false
453
- // Clicks inside the surface shouldn't dismiss.
454
- if (this._surface?.contains(target as Node)) return false
455
- // Clicks on the anchor itself shouldn't dismiss (avoid re-toggle).
456
- if (this._resolvedAnchor?.el?.contains(target as Node)) return false
444
+ const path = e.composedPath()
445
+ if (this._surface && path.includes(this._surface)) return false
446
+ if (this._resolvedAnchor?.el && path.includes(this._resolvedAnchor.el)) return false
457
447
  return true
458
448
  }),
459
449
  take(1),
@@ -145,18 +145,26 @@ function cssForPlacement(p: OverlayPlacement): string {
145
145
  * ======================================================================= */
146
146
 
147
147
  /**
148
- * Wire the Popover API lifecycle — the surface gets `popover="auto"` and
148
+ * Wire the Popover API lifecycle — the surface gets `popover="manual"` and
149
149
  * `showPopover()` is called to promote it into the native top layer. No
150
150
  * position math here; the caller pairs this with `positionFloatingUI` for
151
151
  * the geometry, since Tier 2 is Popover-for-stacking + Floating UI-for-math.
152
152
  *
153
+ * `manual` (not `auto`) so stacked overlays don't fight the browser's
154
+ * popover-auto light-dismiss algorithm: opening a second `popover="auto"`
155
+ * that isn't a DOM/invoker descendant of the first closes the first via
156
+ * the toggle event. Each schmancy overlay is appended as a sibling to
157
+ * `<body>`, so the browser can't see the nesting and would dismiss the
158
+ * parent. With `manual`, schmancy owns Esc + outside-click via
159
+ * `wireCloseTriggers`, and the top-layer rendering is preserved.
160
+ *
153
161
  * Returns a cleanup function that hides the popover and strips the attr.
154
162
  */
155
163
  export function positionPopoverAPI(surface: HTMLElement): () => void {
156
164
  if (!CAPS.popover) {
157
165
  throw new Error('positionPopoverAPI requires Popover API support')
158
166
  }
159
- surface.setAttribute('popover', 'auto')
167
+ surface.setAttribute('popover', 'manual')
160
168
  try {
161
169
  ;(surface as unknown as { showPopover(): void }).showPopover()
162
170
  } catch {
@@ -209,10 +209,22 @@ function detectKind(value: unknown): RuntimeKind {
209
209
  // share a single registry. Without this, source-state and dist-state would
210
210
  // each maintain their own `claimed` set and could both register the same
211
211
  // namespace, producing two singletons with the same name.
212
+ //
213
+ // Module Federation is the load-driver here: when web bundles its own copy
214
+ // of schmancy/state and so does owl (the remote), both modules execute and
215
+ // each tries to register every namespace its consumers declare. The global
216
+ // claim Set is what dedupes that. The instance map below is what makes the
217
+ // dedup TRANSPARENT — `state('user/state').memory(null)` returns the same
218
+ // bound singleton the first caller got, so consumers don't need to know
219
+ // who arrived first.
212
220
  const CLAIMED_KEY = Symbol.for('schmancy.state.claimed')
221
+ const INSTANCES_KEY = Symbol.for('schmancy.state.instances')
213
222
  const __claimedSlot = (globalThis as { [CLAIMED_KEY]?: Set<string> })
214
223
  __claimedSlot[CLAIMED_KEY] ??= new Set<string>()
215
224
  const claimed = __claimedSlot[CLAIMED_KEY]!
225
+ const __instancesSlot = (globalThis as { [INSTANCES_KEY]?: Map<string, unknown> })
226
+ __instancesSlot[INSTANCES_KEY] ??= new Map<string, unknown>()
227
+ const instances = __instancesSlot[INSTANCES_KEY]!
216
228
 
217
229
  // ---------------------------------------------------------------------------
218
230
  // Context resolution.
@@ -576,17 +588,27 @@ function createInstance(args: CreateInstanceArgs, options: CreateInstanceOptions
576
588
  }
577
589
 
578
590
  function makeHandle(namespace: string): Record<string, (initial: unknown) => unknown> {
579
- if (claimed.has(namespace)) {
580
- throw new Error(
581
- `[state] namespace "${namespace}" already registered. Each namespace must be unique.`,
582
- )
583
- }
591
+ // Idempotent on `(namespace, storage)`. The first caller for a given
592
+ // namespace+storage combination creates the instance; later callers get
593
+ // the same instance back regardless of `initial`. (Initial value is
594
+ // scoped to construction by definition.) This makes the factory safe
595
+ // under module-duplication conditions — Module Federation's loadShare
596
+ // proxies, multiple build-time copies of schmancy, dev/HMR re-evaluation.
584
597
  claimed.add(namespace)
598
+ const ensure = (storage: 'memory' | 'local' | 'session' | 'indexeddb') =>
599
+ (initial: unknown) => {
600
+ const key = `${namespace}@${storage}`
601
+ const cached = instances.get(key)
602
+ if (cached !== undefined) return cached
603
+ const instance = createInstance({ namespace, initial, storage })
604
+ instances.set(key, instance)
605
+ return instance
606
+ }
585
607
  return {
586
- memory: initial => createInstance({ namespace, initial, storage: 'memory' }),
587
- local: initial => createInstance({ namespace, initial, storage: 'local' }),
588
- session: initial => createInstance({ namespace, initial, storage: 'session' }),
589
- idb: initial => createInstance({ namespace, initial, storage: 'indexeddb' }),
608
+ memory: ensure('memory'),
609
+ local: ensure('local'),
610
+ session: ensure('session'),
611
+ idb: ensure('indexeddb'),
590
612
  }
591
613
  }
592
614