@nldd/design-system 0.26.5 → 0.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (471) hide show
  1. package/custom-elements.json +460 -37
  2. package/dist/cdn/autoloader.js +141 -141
  3. package/dist/cdn/chunks/{accordion-item-BXEHwzcv.js → accordion-item-Db9LW8AG.js} +4 -4
  4. package/dist/cdn/chunks/{accordion-qXirmNBj.js → accordion-tLICRUFs.js} +4 -4
  5. package/dist/cdn/chunks/{activity-indicator-DP61AhsJ.js → activity-indicator-CMNIikEV.js} +5 -5
  6. package/dist/cdn/chunks/{admonition-RnRSNAri.js → admonition-DEXVkTJm.js} +4 -4
  7. package/dist/cdn/chunks/after-parse-BSKUm67Q.js +9 -0
  8. package/dist/cdn/chunks/{avatar-group-BrfrpXvd.js → avatar-group-DMU0HLBL.js} +71 -49
  9. package/dist/cdn/chunks/{avatar-DsexiOhH.js → avatar-nLrlfh4s.js} +75 -41
  10. package/dist/cdn/chunks/{badge-BiQFOq2l.js → badge-D1XadmOE.js} +5 -5
  11. package/dist/cdn/chunks/{banner-42zIYAEN.js → banner-B4kFQlHx.js} +7 -7
  12. package/dist/cdn/chunks/{bar-split-view-CjYEp276.js → bar-split-view-DtD4zmoP.js} +28 -21
  13. package/dist/cdn/chunks/{blockquote-qf4hJYvm.js → blockquote-DbFjwox8.js} +3 -3
  14. package/dist/cdn/chunks/{box-CWyg7sbR.js → box-BlwaDicI.js} +3 -3
  15. package/dist/cdn/chunks/{breadcrumbs-BaHjYdz8.js → breadcrumbs-DJS9-8wX.js} +5 -5
  16. package/dist/cdn/chunks/{button-CKV-jwGY.js → button-BK8CmshL.js} +8 -8
  17. package/dist/cdn/chunks/{button-bar-DeJ81759.js → button-bar-5RtXjgGl.js} +3 -3
  18. package/dist/cdn/chunks/{button-group-CuRkiHR5.js → button-group-BYMkQNhT.js} +2 -2
  19. package/dist/cdn/chunks/{card-DxeUNE3V.js → card-NNl0PxBY.js} +4 -4
  20. package/dist/cdn/chunks/{cell-QaG8b-Qk.js → cell-D2NzCBVZ.js} +6 -6
  21. package/dist/cdn/chunks/{checkbox-V0YerUKf.js → checkbox-CXFA_up4.js} +5 -5
  22. package/dist/cdn/chunks/{checkbox-field-DeySECgv.js → checkbox-field-sFs7GvAq.js} +7 -7
  23. package/dist/cdn/chunks/{checkbox-group-DFNy1y-A.js → checkbox-group-BPN4eRCX.js} +3 -3
  24. package/dist/cdn/chunks/{class-map-CmgI2Tu-.js → class-map-1XjgYGeg.js} +1 -1
  25. package/dist/cdn/chunks/{code-editor-BBMbUJ4d.js → code-editor-KZEaMAN7.js} +5 -5
  26. package/dist/cdn/chunks/{code-viewer-B8jse0-5.js → code-viewer-CJwpLKb1.js} +94 -87
  27. package/dist/cdn/chunks/{codemirror-input-BEotDTtZ.js → codemirror-input-CYBNNf0-.js} +5 -5
  28. package/dist/cdn/chunks/{collection-DRoS7Ona.js → collection-BdUB8qeL.js} +61 -42
  29. package/dist/cdn/chunks/{combo-box-DA1ZQJJS.js → combo-box-DxWW-zeE.js} +20 -14
  30. package/dist/cdn/chunks/{container-F1i2pmko.js → container-Dhf1Ahi8.js} +14 -10
  31. package/dist/cdn/chunks/{custom-element-DD4ffKRs.js → custom-element-DtLjpays.js} +1 -1
  32. package/dist/cdn/chunks/{date-field-DVgisQnm.js → date-field-D83r9gjY.js} +12 -12
  33. package/dist/cdn/chunks/{date-picker-BaDTota3.js → date-picker-D8qv2iuG.js} +21 -15
  34. package/dist/cdn/chunks/{decorate-CeGXihRM.js → decorate-BhnGmemK.js} +1 -1
  35. package/dist/cdn/chunks/{described-by-mixin-qFatR9dF.js → described-by-mixin-Jh_PTTde.js} +2 -2
  36. package/dist/cdn/chunks/{description-cell-D45N4P1X.js → description-cell-nQKMluy8.js} +6 -6
  37. package/dist/cdn/chunks/{dev-checks-CkCD0tPh.js → dev-checks-Bet7bhMS.js} +99 -49
  38. package/dist/cdn/chunks/{directive-helpers-B9pcQxsE.js → directive-helpers-dLE2M1R1.js} +1 -1
  39. package/dist/cdn/chunks/{dist-n8aCu6Kg.js → dist-BTuJ-NyU.js} +2 -2
  40. package/dist/cdn/chunks/{dist-BS_pQgb6.js → dist-BbwC3zHR.js} +2 -2
  41. package/dist/cdn/chunks/{dist-Dsyc1RGG.js → dist-BpqJqkl_.js} +1 -1
  42. package/dist/cdn/chunks/{dist-mxb0NzAU.js → dist-C9xmfEc_.js} +1 -1
  43. package/dist/cdn/chunks/{dist-v7yvd26H.js → dist-CYKK2xXE.js} +3 -3
  44. package/dist/cdn/chunks/{dist-rjQNj-KZ.js → dist-Cdmhq-4P.js} +2 -2
  45. package/dist/cdn/chunks/{dist-v62GtoI6.js → dist-DJSiRJRL.js} +1 -1
  46. package/dist/cdn/chunks/{dist-Cl-rXzh7.js → dist-DwevYbXo.js} +1 -1
  47. package/dist/cdn/chunks/{dist-DjlGttcc.js → dist-Dzlvec4O.js} +1 -1
  48. package/dist/cdn/chunks/{dist-jTL_Kil1.js → dist-EP5KATv0.js} +1 -1
  49. package/dist/cdn/chunks/{dist-DJQUgOKW.js → dist-u6MS5-M8.js} +3 -3
  50. package/dist/cdn/chunks/{divider-CtMx3Byp.js → divider-DjT76fuO.js} +2 -2
  51. package/dist/cdn/chunks/{document-tab-bar-SKSf69FX.js → document-tab-bar-CO2M1bFc.js} +95 -56
  52. package/dist/cdn/chunks/{dropdown-se1zjYlw.js → dropdown-CdQ1beF2.js} +5 -5
  53. package/dist/cdn/chunks/{file-field-DW_Xt5O3.js → file-field-D0UlnM9R.js} +14 -14
  54. package/dist/cdn/chunks/{form-C9-eW3zc.js → form-BV9wifov.js} +1 -1
  55. package/dist/cdn/chunks/{form-actions-Cy5tH1nk.js → form-actions-DDeF8urg.js} +2 -2
  56. package/dist/cdn/chunks/{form-associated-mixin-CA0F9CPx.js → form-associated-mixin-Cm1N24gR.js} +2 -2
  57. package/dist/cdn/chunks/{form-field-BMWm8VGS.js → form-field-IeKadcwe.js} +6 -6
  58. package/dist/cdn/chunks/{form-section-DrrXc4wZ.js → form-section-C350G5wg.js} +1 -1
  59. package/dist/cdn/chunks/frame-pass-C0RUoFMc.js +17 -0
  60. package/dist/cdn/chunks/{full-bleed-section-6QL0av4x.js → full-bleed-section-CR3zsX7K.js} +9 -10
  61. package/dist/cdn/chunks/{hero-BThWV3MR.js → hero-Ch5el5J5.js} +73 -68
  62. package/dist/cdn/chunks/{icon-CVM6X_F1.js → icon-Dj98ov4G.js} +2 -2
  63. package/dist/cdn/chunks/{icon-button-h_sEz0Ia.js → icon-button-HKoCqWG3.js} +9 -9
  64. package/dist/cdn/chunks/{icon-cell-C3Ygercd.js → icon-cell-C1I-oIWn.js} +5 -5
  65. package/dist/cdn/chunks/{identity-BR0KxjM5.js → identity-DNkEDJ8m.js} +6 -6
  66. package/dist/cdn/chunks/{if-defined-CvQli6P0.js → if-defined-CZ1Fmb74.js} +1 -1
  67. package/dist/cdn/chunks/{image-D8H73DIj.js → image-KXTd-hL-.js} +8 -8
  68. package/dist/cdn/chunks/{inline-dialog-Dlu3bneh.js → inline-dialog-BTI0xmIT.js} +6 -6
  69. package/dist/cdn/chunks/{just-in-time-education-DG0teV5g.js → just-in-time-education-BtjbYffu.js} +5 -5
  70. package/dist/cdn/chunks/{kanban-MNLyqki_.js → kanban-DNXtL34O.js} +35 -30
  71. package/dist/cdn/chunks/{kanban-column-CGF_4Q0N.js → kanban-column-D0ujQ2_W.js} +37 -25
  72. package/dist/cdn/chunks/{keyboard-shortcut-DZDtndhS.js → keyboard-shortcut-BikzmCBH.js} +3 -3
  73. package/dist/cdn/chunks/{languages-BCn4J5Ck.js → languages-CPd7_I8H.js} +12 -12
  74. package/dist/cdn/chunks/layout-pass-Cq85kSHX.js +45 -0
  75. package/dist/cdn/chunks/{link-CTj3dTmJ.js → link-DqMeRYFm.js} +6 -6
  76. package/dist/cdn/chunks/{link-group--C486tYV.js → link-group-BKn4MHA-.js} +2 -2
  77. package/dist/cdn/chunks/{list-DApLHKj-.js → list-C8Dnks-q.js} +48 -34
  78. package/dist/cdn/chunks/{list-item-BN9uuvXr.js → list-item-CSP1a_cN.js} +5 -6
  79. package/dist/cdn/chunks/{list-item-segment-CvdZT9Ni.js → list-item-segment-BvFqXXnA.js} +3 -3
  80. package/dist/cdn/chunks/{menu-2-9LtMLY.js → menu-LZ0DmVCe.js} +20 -19
  81. package/dist/cdn/chunks/{menu-bar-item-tOFEx-lS.js → menu-bar-item-DENdrp0m.js} +6 -6
  82. package/dist/cdn/chunks/{menu-bar-g-O3_TNl.js → menu-bar-rsGd3kKq.js} +62 -46
  83. package/dist/cdn/chunks/{menu-divider-Dmv0lMHV.js → menu-divider-BptK2nug.js} +3 -3
  84. package/dist/cdn/chunks/{menu-group-Ci9QUUwZ.js → menu-group-0B34NyN5.js} +4 -4
  85. package/dist/cdn/chunks/{menu-item-BnIbV4yo.js → menu-item-55vjckz2.js} +16 -12
  86. package/dist/cdn/chunks/{menu.template-sPjaMfc8.js → menu.template-B_HMnBsa.js} +105 -76
  87. package/dist/cdn/chunks/{modal-dialog-D-jAbabe.js → modal-dialog-DQY_0Qlk.js} +4 -4
  88. package/dist/cdn/chunks/{multi-line-text-field-uBZqAdr6.js → multi-line-text-field-DB4Vflno.js} +6 -6
  89. package/dist/cdn/chunks/{navigation-split-view-DARbBPq-.js → navigation-split-view-Dbhrxni9.js} +59 -47
  90. package/dist/cdn/chunks/{notification-CntIGoYh.js → notification-dtrMLORo.js} +6 -6
  91. package/dist/cdn/chunks/{number-field-C0MTabLP.js → number-field-Ctxk40as.js} +8 -8
  92. package/dist/cdn/chunks/{one-half-one-half-section-DYzf6LtU.js → one-half-one-half-section-Bx6KLSY5.js} +15 -16
  93. package/dist/cdn/chunks/{one-third-two-thirds-section-AAiaxCHH.js → one-third-two-thirds-section-Bql0Xrsc.js} +15 -16
  94. package/dist/cdn/chunks/{one-time-code-field-CCILuCy1.js → one-time-code-field-B-y5gRLi.js} +103 -64
  95. package/dist/cdn/chunks/{overflow-menu-DFoh3xL_.js → overflow-menu-Cs1VLcX7.js} +1 -1
  96. package/dist/cdn/chunks/{page-BDXLREou.js → page-Bdkit86l.js} +78 -56
  97. package/dist/cdn/chunks/{page-footer-BsVMZCXs.js → page-footer-D68JiIFE.js} +4 -4
  98. package/dist/cdn/chunks/{page-section-mixin-L0bl3wCm.js → page-section-mixin-Bmlpcmrw.js} +3 -3
  99. package/dist/cdn/chunks/{pagination-DLwbSZdO.js → pagination-BH6UQbby.js} +6 -6
  100. package/dist/cdn/chunks/{password-field-DKTJgEyb.js → password-field-Dz0znv2L.js} +8 -8
  101. package/dist/cdn/chunks/{popover-RB7uLASo.js → popover-C6j3sO70.js} +5 -5
  102. package/dist/cdn/chunks/{progress-bar-DnXWbmiw.js → progress-bar-BA_5dDXK.js} +10 -7
  103. package/dist/cdn/chunks/{progress-circle-S89MUtU8.js → progress-circle-DsCyTyw-.js} +10 -7
  104. package/dist/cdn/chunks/{radio-button-field-BF4MHiOQ.js → radio-button-field-JsQalrMs.js} +8 -7
  105. package/dist/cdn/chunks/{radio-button-group-BQUqV8wJ.js → radio-button-group-Bqn43LYh.js} +3 -3
  106. package/dist/cdn/chunks/{radio-button-B31lAjlk.js → radio-button-pcE5Vo5k.js} +92 -51
  107. package/dist/cdn/chunks/{render-marked-ChJNzktf.js → render-marked-DAVGoeYa.js} +1 -1
  108. package/dist/cdn/chunks/{reorder-handle-cell-SEERkeh7.js → reorder-handle-cell-r4OuA45S.js} +4 -4
  109. package/dist/cdn/chunks/{reorder-handle-mixin-tWe9XTjZ.js → reorder-handle-mixin-Co5E_Y7l.js} +2 -2
  110. package/dist/cdn/chunks/{repeat-CdCK17GF.js → repeat-DoLR8W_a.js} +2 -2
  111. package/dist/cdn/chunks/{rich-text-vVWOndD2.js → rich-text-CEmzxZRC.js} +3 -3
  112. package/dist/cdn/chunks/{row-header-mixin-6MoJ5Mjq.js → row-header-mixin-BCYXiXva.js} +2 -2
  113. package/dist/cdn/chunks/{scroll-fade-Cr7_IXpU.js → scroll-fade-OSFrYTum.js} +2 -2
  114. package/dist/cdn/chunks/scroll-mode-controller-Dl5hddJo.js +52 -0
  115. package/dist/cdn/chunks/{search-field-C9urWH_J.js → search-field-CT483s7J.js} +10 -10
  116. package/dist/cdn/chunks/{segmented-control-DkILAMOJ.js → segmented-control-5zMasjz7.js} +7 -7
  117. package/dist/cdn/chunks/{shadow-resets-9v6K-Fie.js → shadow-resets-DR73IFIL.js} +2 -2
  118. package/dist/cdn/chunks/{sheet-D89xI-KY.js → sheet-CDXX61d_.js} +3 -3
  119. package/dist/cdn/chunks/{shell-CFmfUD0_.js → shell-C4vAeA49.js} +4 -4
  120. package/dist/cdn/chunks/{side-by-side-split-view-ir9c0mwZ.js → side-by-side-split-view-D9_u1TIS.js} +38 -29
  121. package/dist/cdn/chunks/{sidebar-section-BhJXels3.js → sidebar-section-vWX-ymIa.js} +70 -48
  122. package/dist/cdn/chunks/{simple-section-CMoYuLYV.js → simple-section-CEw2oC7K.js} +9 -10
  123. package/dist/cdn/chunks/{skip-link-rUQq0D-l.js → skip-link-DcOGlfM9.js} +4 -4
  124. package/dist/cdn/chunks/{slider-CIQqjKUo.js → slider-B108QDlz.js} +9 -9
  125. package/dist/cdn/chunks/{spacer-CD85egxE.js → spacer-CpfTNtbZ.js} +2 -2
  126. package/dist/cdn/chunks/{spacer-cell-B33mGdru.js → spacer-cell-DBm7_AUi.js} +4 -4
  127. package/dist/cdn/chunks/{split-button-COL7r-wa.js → split-button-DxgDxdan.js} +7 -7
  128. package/dist/cdn/chunks/{split-view-divider-DVBuBzeO.js → split-view-divider-6_RDvANN.js} +2 -2
  129. package/dist/cdn/chunks/{split-view-pane-CSvIzeBg.js → split-view-pane-9tEGLRZC.js} +4 -4
  130. package/dist/cdn/chunks/{stacked-split-view-onSk2QEi.js → stacked-split-view-CRMEMwtv.js} +29 -25
  131. package/dist/cdn/chunks/{static-html-Cyhp44gp.js → static-html-CmXnRyP6.js} +1 -1
  132. package/dist/cdn/chunks/{status-bar-CjYXOQAX.js → status-bar-Blk_iYSD.js} +29 -17
  133. package/dist/cdn/chunks/{step-bar-D-To0TEw.js → step-bar-DM4a_0PG.js} +5 -5
  134. package/dist/cdn/chunks/{step-cell-B7sVGixc.js → step-cell-CUs8AKJq.js} +5 -5
  135. package/dist/cdn/chunks/{stepper-h6boMOhz.js → stepper-JwxPNJRc.js} +7 -7
  136. package/dist/cdn/chunks/{style-map-BrdTV34-.js → style-map-DUDIMhuW.js} +1 -1
  137. package/dist/cdn/chunks/{swatch-picker-gQ3m3y9U.js → swatch-picker-BXs7Ob4o.js} +6 -6
  138. package/dist/cdn/chunks/{switch-DC-BTi9E.js → switch-CWKoOyz7.js} +5 -5
  139. package/dist/cdn/chunks/{switch-field-D82mLobj.js → switch-field-BgX9mNOA.js} +6 -6
  140. package/dist/cdn/chunks/{tab-bar-sKiFzvfj.js → tab-bar-BNaJSB38.js} +85 -49
  141. package/dist/cdn/chunks/{table-CuxZfCZD.js → table-dgJdHR92.js} +111 -54
  142. package/dist/cdn/chunks/{tag-DP_ome5l.js → tag-DHHf_gxq.js} +4 -4
  143. package/dist/cdn/chunks/{term-BdiTV-Jk.js → term-DNLqQErM.js} +12 -12
  144. package/dist/cdn/chunks/{text-C-b1ygHI.js → text-CK1-qJ6d.js} +3 -3
  145. package/dist/cdn/chunks/{text-cell-DfRh7JqZ.js → text-cell-CrKBqL5A.js} +8 -8
  146. package/dist/cdn/chunks/{text-editor-DuT9Rrpv.js → text-editor-B0A2vNpD.js} +191 -191
  147. package/dist/cdn/chunks/{text-field-kAbXzkUj.js → text-field-CqYxSiKy.js} +6 -6
  148. package/dist/cdn/chunks/{time-field-DUz9ifmn.js → time-field-DHm6KQsG.js} +14 -14
  149. package/dist/cdn/chunks/{time-picker-DGOKwC9T.js → time-picker-C_BE5oNq.js} +170 -99
  150. package/dist/cdn/chunks/{title-BA-SUyAq.js → title-BpREzeX9.js} +4 -4
  151. package/dist/cdn/chunks/{title-cell-Cu5NFNUu.js → title-cell-C4ZL3mJo.js} +8 -8
  152. package/dist/cdn/chunks/{toggle-button-J6UapeqB.js → toggle-button-COQdr-hZ.js} +8 -8
  153. package/dist/cdn/chunks/{toggle-button-group-wrps-tL9.js → toggle-button-group-D4vTcGce.js} +2 -2
  154. package/dist/cdn/chunks/{token-DJkyJz-k.js → token-1DfHVSVj.js} +5 -5
  155. package/dist/cdn/chunks/{token-field-SiBFPD8-.js → token-field-s_mCjtcZ.js} +12 -12
  156. package/dist/cdn/chunks/toolbar-Bz_8d1v-.js +441 -0
  157. package/dist/cdn/chunks/{toolbar-item-DPizdgYi.js → toolbar-item-B-EDYaPf.js} +3 -3
  158. package/dist/cdn/chunks/{toolbar-title-CB4IJFGv.js → toolbar-title-Cl8VPHYK.js} +4 -4
  159. package/dist/cdn/chunks/{toolbar.styles-vmMPyzS_.js → toolbar.styles-BiT7JPsr.js} +3 -3
  160. package/dist/cdn/chunks/{tooltip-Bg2ovCCg.js → tooltip-DhPeqDvL.js} +4 -4
  161. package/dist/cdn/chunks/{top-navigation-bar-vA8wpJXS.js → top-navigation-bar-CHWqoNms.js} +121 -104
  162. package/dist/cdn/chunks/{top-title-bar-BAJGmgnj.js → top-title-bar-DUp0bSIU.js} +43 -30
  163. package/dist/cdn/chunks/{translations-Cjd13Xb6.js → translations-C6WKR-hE.js} +1 -1
  164. package/dist/cdn/chunks/{two-thirds-one-third-section-D1FvorKO.js → two-thirds-one-third-section-CftZqodu.js} +15 -16
  165. package/dist/cdn/chunks/{validation-list-D3rKnfTu.js → validation-list-BdTSfsD6.js} +3 -3
  166. package/dist/cdn/chunks/{visibility-mixin-BRMACV1l.js → visibility-mixin-DL737l0g.js} +2 -2
  167. package/dist/cdn/chunks/{visually-hidden-BukWRiJA.js → visually-hidden-DvU3wAD4.js} +2 -2
  168. package/dist/cdn/chunks/{window-C9njVzzK.js → window-7XYqha2V.js} +4 -4
  169. package/dist/cdn/chunks/{with-translations-BLzHPSUF.js → with-translations-nT8q6ELU.js} +3 -3
  170. package/dist/components/actions/menu/menu-item.d.ts +11 -0
  171. package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
  172. package/dist/components/actions/menu/menu-item.js +28 -13
  173. package/dist/components/actions/menu/menu-item.js.map +1 -1
  174. package/dist/components/actions/menu/menu.d.ts +6 -0
  175. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  176. package/dist/components/actions/menu/menu.js +14 -4
  177. package/dist/components/actions/menu/menu.js.map +1 -1
  178. package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
  179. package/dist/components/actions/menu/menu.styles.js +63 -3
  180. package/dist/components/actions/menu/menu.styles.js.map +1 -1
  181. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  182. package/dist/components/actions/menu/menu.template.js +18 -47
  183. package/dist/components/actions/menu/menu.template.js.map +1 -1
  184. package/dist/components/actions/toolbar/toolbar.d.ts +56 -16
  185. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  186. package/dist/components/actions/toolbar/toolbar.js +263 -95
  187. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  188. package/dist/components/actions/toolbar/toolbar.steps.d.ts +16 -0
  189. package/dist/components/actions/toolbar/toolbar.steps.d.ts.map +1 -0
  190. package/dist/components/actions/toolbar/toolbar.steps.js +33 -0
  191. package/dist/components/actions/toolbar/toolbar.steps.js.map +1 -0
  192. package/dist/components/content/avatar/avatar.d.ts +22 -10
  193. package/dist/components/content/avatar/avatar.d.ts.map +1 -1
  194. package/dist/components/content/avatar/avatar.js +122 -29
  195. package/dist/components/content/avatar/avatar.js.map +1 -1
  196. package/dist/components/content/avatar-group/avatar-group.d.ts +25 -10
  197. package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
  198. package/dist/components/content/avatar-group/avatar-group.js +97 -26
  199. package/dist/components/content/avatar-group/avatar-group.js.map +1 -1
  200. package/dist/components/content/avatar-group/avatar-group.template.d.ts.map +1 -1
  201. package/dist/components/content/avatar-group/avatar-group.template.js +5 -4
  202. package/dist/components/content/avatar-group/avatar-group.template.js.map +1 -1
  203. package/dist/components/content/code-viewer/code-viewer.d.ts +4 -2
  204. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  205. package/dist/components/content/code-viewer/code-viewer.js +35 -32
  206. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  207. package/dist/components/content/image/image.d.ts +1 -4
  208. package/dist/components/content/image/image.d.ts.map +1 -1
  209. package/dist/components/content/image/image.js +1 -4
  210. package/dist/components/content/image/image.js.map +1 -1
  211. package/dist/components/content/tooltip/tooltip.d.ts +1 -4
  212. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  213. package/dist/components/content/tooltip/tooltip.js +1 -4
  214. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  215. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  216. package/dist/components/forms/form-field/form-field.js +4 -0
  217. package/dist/components/forms/form-field/form-field.js.map +1 -1
  218. package/dist/components/inputs/combo-box/combo-box.d.ts +8 -0
  219. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  220. package/dist/components/inputs/combo-box/combo-box.js +28 -9
  221. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  222. package/dist/components/inputs/date-picker/date-picker.d.ts +11 -0
  223. package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
  224. package/dist/components/inputs/date-picker/date-picker.js +23 -0
  225. package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
  226. package/dist/components/inputs/date-picker/date-picker.template.d.ts.map +1 -1
  227. package/dist/components/inputs/date-picker/date-picker.template.js +4 -2
  228. package/dist/components/inputs/date-picker/date-picker.template.js.map +1 -1
  229. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
  230. package/dist/components/inputs/file-field/file-field.js +6 -1
  231. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  232. package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts +27 -5
  233. package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts.map +1 -1
  234. package/dist/components/inputs/one-time-code-field/one-time-code-field.js +128 -30
  235. package/dist/components/inputs/one-time-code-field/one-time-code-field.js.map +1 -1
  236. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  237. package/dist/components/inputs/radio-button/radio-button.js +5 -2
  238. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  239. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
  240. package/dist/components/inputs/radio-button-field/radio-button-field.js +5 -2
  241. package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
  242. package/dist/components/inputs/text-editor/text-editor.annotations.js +1 -1
  243. package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -1
  244. package/dist/components/inputs/text-editor/text-editor.js +2 -2
  245. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  246. package/dist/components/inputs/text-editor/text-editor.selection.js +1 -1
  247. package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -1
  248. package/dist/components/inputs/text-editor/text-editor.toolbar.d.ts.map +1 -1
  249. package/dist/components/inputs/text-editor/text-editor.toolbar.js +18 -12
  250. package/dist/components/inputs/text-editor/text-editor.toolbar.js.map +1 -1
  251. package/dist/components/inputs/time-picker/time-picker.d.ts +23 -0
  252. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  253. package/dist/components/inputs/time-picker/time-picker.js +132 -12
  254. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  255. package/dist/components/inputs/time-picker/time-picker.styles.d.ts.map +1 -1
  256. package/dist/components/inputs/time-picker/time-picker.styles.js +27 -6
  257. package/dist/components/inputs/time-picker/time-picker.styles.js.map +1 -1
  258. package/dist/components/inputs/time-picker/time-picker.template.d.ts.map +1 -1
  259. package/dist/components/inputs/time-picker/time-picker.template.js +1 -0
  260. package/dist/components/inputs/time-picker/time-picker.template.js.map +1 -1
  261. package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
  262. package/dist/components/inputs/token-field/token-field.js +3 -0
  263. package/dist/components/inputs/token-field/token-field.js.map +1 -1
  264. package/dist/components/layout/collection/collection.d.ts +9 -1
  265. package/dist/components/layout/collection/collection.d.ts.map +1 -1
  266. package/dist/components/layout/collection/collection.js +96 -38
  267. package/dist/components/layout/collection/collection.js.map +1 -1
  268. package/dist/components/layout/container/container.d.ts +1 -0
  269. package/dist/components/layout/container/container.d.ts.map +1 -1
  270. package/dist/components/layout/container/container.js +22 -16
  271. package/dist/components/layout/container/container.js.map +1 -1
  272. package/dist/components/layout/kanban/kanban-column.d.ts +7 -2
  273. package/dist/components/layout/kanban/kanban-column.d.ts.map +1 -1
  274. package/dist/components/layout/kanban/kanban-column.js +49 -17
  275. package/dist/components/layout/kanban/kanban-column.js.map +1 -1
  276. package/dist/components/layout/kanban/kanban.d.ts +4 -1
  277. package/dist/components/layout/kanban/kanban.d.ts.map +1 -1
  278. package/dist/components/layout/kanban/kanban.js +25 -7
  279. package/dist/components/layout/kanban/kanban.js.map +1 -1
  280. package/dist/components/layout/kanban/kanban.template.js +1 -1
  281. package/dist/components/layout/kanban/kanban.template.js.map +1 -1
  282. package/dist/components/layout/page/page.d.ts +43 -12
  283. package/dist/components/layout/page/page.d.ts.map +1 -1
  284. package/dist/components/layout/page/page.js +116 -66
  285. package/dist/components/layout/page/page.js.map +1 -1
  286. package/dist/components/layout/page/page.styles.js +2 -2
  287. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +3 -1
  288. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
  289. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +3 -1
  290. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
  291. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.d.ts.map +1 -1
  292. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +6 -7
  293. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
  294. package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -1
  295. package/dist/components/layout/page-sections/hero/hero-corner.js +24 -1
  296. package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -1
  297. package/dist/components/layout/page-sections/hero/hero-corner.styles.js +22 -22
  298. package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -1
  299. package/dist/components/layout/page-sections/hero/hero.d.ts +2 -0
  300. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  301. package/dist/components/layout/page-sections/hero/hero.js +2 -0
  302. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  303. package/dist/components/layout/page-sections/hero/hero.styles.d.ts.map +1 -1
  304. package/dist/components/layout/page-sections/hero/hero.styles.js +8 -11
  305. package/dist/components/layout/page-sections/hero/hero.styles.js.map +1 -1
  306. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +4 -2
  307. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
  308. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +4 -2
  309. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
  310. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.d.ts.map +1 -1
  311. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +12 -13
  312. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
  313. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +4 -2
  314. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
  315. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +4 -2
  316. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
  317. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.d.ts.map +1 -1
  318. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +12 -13
  319. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
  320. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +12 -9
  321. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
  322. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +66 -21
  323. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
  324. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.d.ts.map +1 -1
  325. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js +23 -17
  326. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js.map +1 -1
  327. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.d.ts.map +1 -1
  328. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.js +5 -0
  329. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.js.map +1 -1
  330. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +4 -3
  331. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  332. package/dist/components/layout/page-sections/simple-section/simple-section.js +4 -3
  333. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  334. package/dist/components/layout/page-sections/simple-section/simple-section.styles.d.ts.map +1 -1
  335. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +6 -7
  336. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
  337. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +4 -2
  338. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
  339. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +4 -2
  340. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
  341. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.d.ts.map +1 -1
  342. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +12 -13
  343. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
  344. package/dist/components/layout/shell/shell.d.ts +2 -0
  345. package/dist/components/layout/shell/shell.d.ts.map +1 -1
  346. package/dist/components/layout/shell/shell.js +2 -0
  347. package/dist/components/layout/shell/shell.js.map +1 -1
  348. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +2 -1
  349. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
  350. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +30 -17
  351. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
  352. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts +8 -3
  353. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts.map +1 -1
  354. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +35 -20
  355. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js.map +1 -1
  356. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +1 -1
  357. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts +6 -2
  358. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
  359. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +30 -15
  360. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
  361. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +1 -1
  362. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts +6 -3
  363. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
  364. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +28 -16
  365. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
  366. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +1 -1
  367. package/dist/components/lists-and-tables/list/list.d.ts +19 -0
  368. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  369. package/dist/components/lists-and-tables/list/list.js +47 -15
  370. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  371. package/dist/components/lists-and-tables/list/list.roving.d.ts +2 -1
  372. package/dist/components/lists-and-tables/list/list.roving.d.ts.map +1 -1
  373. package/dist/components/lists-and-tables/list/list.roving.js +7 -3
  374. package/dist/components/lists-and-tables/list/list.roving.js.map +1 -1
  375. package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
  376. package/dist/components/lists-and-tables/list-item/list-item.styles.js +0 -1
  377. package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
  378. package/dist/components/lists-and-tables/table/table.d.ts +34 -6
  379. package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
  380. package/dist/components/lists-and-tables/table/table.js +143 -40
  381. package/dist/components/lists-and-tables/table/table.js.map +1 -1
  382. package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
  383. package/dist/components/lists-and-tables/table/table.styles.js +13 -0
  384. package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
  385. package/dist/components/lists-and-tables/table/table.template.d.ts.map +1 -1
  386. package/dist/components/lists-and-tables/table/table.template.js +6 -0
  387. package/dist/components/lists-and-tables/table/table.template.js.map +1 -1
  388. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +33 -2
  389. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
  390. package/dist/components/navigation/document-tab-bar/document-tab-bar.js +136 -38
  391. package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
  392. package/dist/components/navigation/menu-bar/menu-bar.d.ts +21 -3
  393. package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
  394. package/dist/components/navigation/menu-bar/menu-bar.js +61 -29
  395. package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
  396. package/dist/components/navigation/tab-bar/tab-bar.d.ts +26 -4
  397. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  398. package/dist/components/navigation/tab-bar/tab-bar.js +99 -24
  399. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  400. package/dist/components/navigation/tab-bar/tab-bar.template.d.ts.map +1 -1
  401. package/dist/components/navigation/tab-bar/tab-bar.template.js +1 -0
  402. package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
  403. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +23 -14
  404. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
  405. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +126 -83
  406. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  407. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +28 -28
  408. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  409. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +5 -1
  410. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
  411. package/dist/components/navigation/top-title-bar/top-title-bar.js +36 -13
  412. package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
  413. package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts +1 -0
  414. package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts.map +1 -1
  415. package/dist/components/status-and-feedback/progress-bar/progress-bar.js +6 -0
  416. package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
  417. package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts +1 -0
  418. package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts.map +1 -1
  419. package/dist/components/status-and-feedback/progress-circle/progress-circle.js +6 -0
  420. package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
  421. package/dist/components/status-and-feedback/status-bar/status-bar.d.ts +0 -1
  422. package/dist/components/status-and-feedback/status-bar/status-bar.d.ts.map +1 -1
  423. package/dist/components/status-and-feedback/status-bar/status-bar.js +26 -6
  424. package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
  425. package/dist/nldd.min.js +882 -816
  426. package/dist/types/react.d.ts +8 -8
  427. package/dist/types/vue.d.ts +8 -8
  428. package/dist/utilities/after-parse.d.ts +30 -0
  429. package/dist/utilities/after-parse.d.ts.map +1 -0
  430. package/dist/utilities/after-parse.js +44 -0
  431. package/dist/utilities/after-parse.js.map +1 -0
  432. package/dist/utilities/dev-checks.d.ts +6 -0
  433. package/dist/utilities/dev-checks.d.ts.map +1 -1
  434. package/dist/utilities/dev-checks.js +42 -16
  435. package/dist/utilities/dev-checks.js.map +1 -1
  436. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  437. package/dist/utilities/dev-rules.generated.js +39 -2
  438. package/dist/utilities/dev-rules.generated.js.map +1 -1
  439. package/dist/utilities/frame-pass.d.ts +28 -0
  440. package/dist/utilities/frame-pass.d.ts.map +1 -0
  441. package/dist/utilities/frame-pass.js +41 -0
  442. package/dist/utilities/frame-pass.js.map +1 -0
  443. package/dist/utilities/layout-pass.d.ts +49 -0
  444. package/dist/utilities/layout-pass.d.ts.map +1 -0
  445. package/dist/utilities/layout-pass.js +103 -0
  446. package/dist/utilities/layout-pass.js.map +1 -0
  447. package/dist/utilities/radio-grouping.d.ts +30 -4
  448. package/dist/utilities/radio-grouping.d.ts.map +1 -1
  449. package/dist/utilities/radio-grouping.js +98 -17
  450. package/dist/utilities/radio-grouping.js.map +1 -1
  451. package/dist/utilities/scroll-mode-controller.d.ts +13 -6
  452. package/dist/utilities/scroll-mode-controller.d.ts.map +1 -1
  453. package/dist/utilities/scroll-mode-controller.js +47 -21
  454. package/dist/utilities/scroll-mode-controller.js.map +1 -1
  455. package/lint/css.js +58 -26
  456. package/lint/data.generated.json +1 -1
  457. package/lint/engine.js +29 -12
  458. package/lint/fix.js +103 -12
  459. package/lint/format.js +4 -3
  460. package/lint/frontends.js +153 -35
  461. package/lint/linter.js +174 -25
  462. package/lint/main.js +7 -2
  463. package/lint/project.js +50 -12
  464. package/lint/rule-compiler.js +20 -11
  465. package/lint/rule-data.js +8 -0
  466. package/lint/rule.schema.json +2 -1
  467. package/lint/session.js +42 -18
  468. package/lint/tree.js +5 -2
  469. package/package.json +1 -1
  470. package/dist/cdn/chunks/scroll-mode-controller-COUD1-3P.js +0 -42
  471. package/dist/cdn/chunks/toolbar-be8hoSAz.js +0 -364
@@ -44,10 +44,79 @@ import { template } from './toolbar.template.js';
44
44
  import { nlddToolbarTranslations } from './toolbar.i18n.js';
45
45
  import { translate } from '../../../utilities/translations.js';
46
46
  import { OverflowMenu } from '../../../utilities/overflow-menu.js';
47
+ import { afterParse } from '../../../utilities/after-parse.js';
48
+ import { LayoutPass } from '../../../utilities/layout-pass.js';
49
+ import { runSteps } from './toolbar.steps.js';
47
50
  import { areaWidth, fillsRowAlone, itemsOf, overflowOrder, spacerZeros, groupForOverflow, } from './toolbar.layout.js';
48
51
  export { NLDDToolbarItem } from './toolbar-item.js';
49
52
  export { NLDDToolbarTitle } from './toolbar-title.js';
50
53
  export { groupForOverflow } from './toolbar.layout.js';
54
+ function shrinkableControlOf(item) {
55
+ const control = Array.from(item.children).find(el => el.getAttribute('slot') !== 'overflow');
56
+ return typeof control?._toolbarWidths === 'function' ? control : null;
57
+ }
58
+ /** Every toolbar that asks for a measurement in the same tick, in one pass. */
59
+ const measurePass = new LayoutPass(toolbars => runSteps(toolbars.filter(toolbar => toolbar.isConnected).map(toolbar => toolbar._measureSteps())));
60
+ /** The area widths before the first measurement, in one pass for the same reason. */
61
+ const areaPass = new LayoutPass(toolbars => runSteps(toolbars.filter(toolbar => toolbar.isConnected && !toolbar._hasMeasured).map(toolbar => toolbar._areaSteps())));
62
+ /**
63
+ * One ResizeObserver for every toolbar and its items. One per toolbar calls
64
+ * back once per toolbar, and each callback measures a layout the previous one
65
+ * changed; this one measures every toolbar that changed size in one pass.
66
+ */
67
+ const toolbarOf = new WeakMap();
68
+ let sizeObserver = null;
69
+ function observeSize(target, toolbar) {
70
+ sizeObserver ?? (sizeObserver = new ResizeObserver(entries => {
71
+ const resized = new Set();
72
+ for (const entry of entries) {
73
+ const toolbar = toolbarOf.get(entry.target);
74
+ if (toolbar?._resized(entry))
75
+ resized.add(toolbar);
76
+ }
77
+ if (!resized.size)
78
+ return;
79
+ resized.forEach(toolbar => measurePass.schedule(toolbar, toolbar.ownerDocument));
80
+ measurePass.flush();
81
+ }));
82
+ toolbarOf.set(target, toolbar);
83
+ sizeObserver.observe(target);
84
+ }
85
+ /** Only while the target is still this toolbar's: an item moved to another
86
+ * toolbar is that one's to watch. */
87
+ function unobserveSize(target, toolbar) {
88
+ if (toolbarOf.get(target) !== toolbar)
89
+ return;
90
+ sizeObserver?.unobserve(target);
91
+ toolbarOf.delete(target);
92
+ }
93
+ /** The toolbars that build their children at the next task, in one timeout. */
94
+ const toBuild = new Set();
95
+ let buildTimer = null;
96
+ function buildSoon(toolbar) {
97
+ toBuild.add(toolbar);
98
+ buildTimer ?? (buildTimer = setTimeout(() => {
99
+ buildTimer = null;
100
+ const toolbars = [...toBuild];
101
+ toBuild.clear();
102
+ toolbars.forEach(toolbar => toolbar._buildChildren());
103
+ }, 0));
104
+ }
105
+ /**
106
+ * A web font that finishes loading changes how wide an item is. The child
107
+ * resize observer sees that for a visible item, but an item already in the
108
+ * overflow menu has no width to watch: measured with the fallback font it
109
+ * went into the menu, and would stay there although it fits now. One listener
110
+ * for every toolbar, so they measure in one pass.
111
+ */
112
+ const connectedToolbars = new Set();
113
+ const onFontsLoaded = () => {
114
+ const measured = [...connectedToolbars].filter(toolbar => toolbar._hasMeasured);
115
+ if (!measured.length)
116
+ return;
117
+ measured.forEach(toolbar => measurePass.schedule(toolbar, toolbar.ownerDocument));
118
+ measurePass.flush();
119
+ };
51
120
  // # Component
52
121
  let NLDDToolbar = class NLDDToolbar extends LitElement {
53
122
  constructor() {
@@ -81,21 +150,17 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
81
150
  this._idCounter = 0;
82
151
  this._itemWidths = new Map();
83
152
  this._observer = null;
84
- this._resizeObserver = null;
85
153
  this._isMeasuring = false;
86
- this._childResizeObserver = null;
154
+ /** The items and title whose size is watched (see _watchChildSizes). */
155
+ this._sizedChildren = new Set();
87
156
  this._lastChildWidths = new WeakMap();
88
157
  this._isBuilding = false;
158
+ this._rebuildPending = false;
159
+ this._built = false;
160
+ this._lastWidth = null;
161
+ /** @internal */
89
162
  this._hasMeasured = false;
90
163
  this._prioritizedItemsCache = null;
91
- /** A web font that finishes loading changes how wide an item is. The child
92
- * resize observer sees that for a visible item, but an item already in the
93
- * overflow menu has no width to watch: measured with the fallback font it
94
- * went into the menu, and would stay there although it fits now. */
95
- this._onFontsLoaded = () => {
96
- if (this._hasMeasured)
97
- this._measureAndUpdate();
98
- };
99
164
  }
100
165
  // — i18n —————————————————————————————————————————————————————————————————
101
166
  _t(key) {
@@ -137,32 +202,90 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
137
202
  }
138
203
  }
139
204
  if (needsRebuild)
140
- this._buildChildren();
205
+ this._rebuild();
141
206
  else if (needsMenuResync)
142
207
  this._syncMenuItems();
143
208
  });
144
209
  // Here and not in firstUpdated: disconnecting takes it down, and a toolbar
145
210
  // moved in the DOM or kept by a framework connects again without a first
146
211
  // update, so it would no longer follow its width.
147
- this._resizeObserver = new ResizeObserver(() => {
148
- if (this._isMeasuring)
149
- return;
150
- this._overflowMenu.hide();
151
- this._measureAndUpdate();
152
- });
153
- this._resizeObserver.observe(this);
154
- setTimeout(() => this._buildChildren(), 0);
155
- document.fonts?.addEventListener('loadingdone', this._onFontsLoaded);
212
+ observeSize(this, this);
213
+ buildSoon(this);
214
+ if (!connectedToolbars.size)
215
+ document.fonts?.addEventListener('loadingdone', onFontsLoaded);
216
+ connectedToolbars.add(this);
156
217
  }
157
218
  disconnectedCallback() {
158
219
  super.disconnectedCallback();
159
- document.fonts?.removeEventListener('loadingdone', this._onFontsLoaded);
220
+ connectedToolbars.delete(this);
221
+ if (!connectedToolbars.size)
222
+ document.fonts?.removeEventListener('loadingdone', onFontsLoaded);
223
+ toBuild.delete(this);
224
+ measurePass.cancel(this);
225
+ areaPass.cancel(this);
160
226
  this._observer?.disconnect();
161
227
  this._observer = null;
162
- this._resizeObserver?.disconnect();
163
- this._resizeObserver = null;
164
- this._childResizeObserver?.disconnect();
165
- this._childResizeObserver = null;
228
+ unobserveSize(this, this);
229
+ this._lastWidth = null;
230
+ this._sizedChildren.forEach(el => unobserveSize(el, this));
231
+ this._sizedChildren.clear();
232
+ }
233
+ /**
234
+ * A rebuild for a change in the children. While the parser is still adding
235
+ * them, the observer calls back once per child; one rebuild after the parse
236
+ * does for all of them.
237
+ */
238
+ _rebuild() {
239
+ if (this._rebuildPending)
240
+ return;
241
+ const run = () => {
242
+ this._rebuildPending = false;
243
+ if (this.isConnected)
244
+ this._buildChildren();
245
+ };
246
+ this._rebuildPending = afterParse(run, this.ownerDocument);
247
+ if (!this._rebuildPending)
248
+ this._buildChildren();
249
+ }
250
+ /** A measurement in the next pass, together with the other toolbars. */
251
+ _scheduleMeasure() {
252
+ measurePass.schedule(this, this.ownerDocument);
253
+ }
254
+ /**
255
+ * Whether a size change reported by the shared observer calls for a
256
+ * measurement. Measuring changes these very sizes, since an item that moves
257
+ * into the overflow menu collapses. `_isMeasuring` covers the synchronous
258
+ * pass, and the render that follows lands after it, so a child is compared
259
+ * against the width it last had and stays quiet when nothing really moved.
260
+ * @internal
261
+ */
262
+ _resized(entry) {
263
+ if (this._isMeasuring)
264
+ return false;
265
+ if (entry.target === this) {
266
+ // Only the width decides what fits. The height changes with what the
267
+ // items render, which their own reports already cover.
268
+ // The border box, as the measurement reads it with getBoundingClientRect.
269
+ const width = entry.borderBoxSize?.[0]?.inlineSize ?? entry.contentRect.width;
270
+ if (width === this._lastWidth)
271
+ return false;
272
+ this._lastWidth = width;
273
+ this._overflowMenu.hide();
274
+ return true;
275
+ }
276
+ if (this._isBuilding)
277
+ return false;
278
+ const el = entry.target;
279
+ // An item in the overflow menu has no width to speak of. It is the
280
+ // hiding that took it away, not the content, so it says nothing about
281
+ // whether the layout should change.
282
+ if (el.hasAttribute('hidden'))
283
+ return false;
284
+ const width = entry.contentRect.width;
285
+ if (Math.abs((this._lastChildWidths.get(el) ?? -1) - width) < 0.5)
286
+ return false;
287
+ this._lastChildWidths.set(el, width);
288
+ return true;
166
289
  }
167
290
  firstUpdated() {
168
291
  this._syncHosts();
@@ -171,17 +294,19 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
171
294
  if (changedProperties.has('size') || changedProperties.has('showItemLabels')) {
172
295
  this._syncHosts();
173
296
  }
174
- if (changedProperties.has('_startChildren') ||
297
+ // Not for the first render: the children are only known once they are
298
+ // built, which measures anyway.
299
+ if (this._built && (changedProperties.has('_startChildren') ||
175
300
  changedProperties.has('_centerChildren') ||
176
- changedProperties.has('_endChildren')) {
177
- this.updateComplete.then(() => this._measureAndUpdate());
301
+ changedProperties.has('_endChildren'))) {
302
+ this.updateComplete.then(() => this._scheduleMeasure());
178
303
  }
179
304
  if (changedProperties.has('_overflowIds') ||
180
305
  changedProperties.has('_pinnedOverflowItems')) {
181
306
  this._syncMenuItems();
182
307
  this._syncMenuAnchor();
183
308
  if (!this._hasMeasured) {
184
- this.updateComplete.then(() => this._updateAreaVars());
309
+ this.updateComplete.then(() => areaPass.schedule(this, this.ownerDocument));
185
310
  }
186
311
  }
187
312
  }
@@ -193,7 +318,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
193
318
  * not carry listeners added with addEventListener; its `select` is sent on
194
319
  * to the original (see utilities/overflow-menu.ts). */
195
320
  _syncMenuItems() {
196
- const overflowed = [...this._getPrioritizedItems()].reverse()
321
+ const overflowed = this._getPrioritizedItems().toReversed()
197
322
  .filter(child => this._overflowIds.has(child.id))
198
323
  .flatMap(child => child.overflowItems);
199
324
  this._overflowMenu.mirror([...overflowed, ...this._pinnedOverflowItems]);
@@ -256,15 +381,27 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
256
381
  ? child.element
257
382
  : null;
258
383
  }
384
+ /** Also what the size observer compares with: this measurement has seen
385
+ * these widths, so a report of the same width needs no new one. Items
386
+ * have no padding or border, so their box is their content box. */
259
387
  _measureItemWidths() {
260
388
  this._allHostChildren().forEach(child => {
261
389
  if (child.type === 'item' || child.type === 'title') {
262
390
  const host = child.element;
263
- this._itemWidths.set(child.id, host.getBoundingClientRect().width);
391
+ const width = host.getBoundingClientRect().width;
392
+ this._itemWidths.set(child.id, width);
393
+ if (!host.hidden)
394
+ this._lastChildWidths.set(host, width);
264
395
  }
265
396
  });
266
397
  }
267
- _updateAreaVars() {
398
+ /**
399
+ * Publishes how wide each area is, for the spacers that center the center.
400
+ * Reads everything first and writes after, so toolbars side by side lay
401
+ * out once (see runSteps).
402
+ * @internal
403
+ */
404
+ *_areaSteps() {
268
405
  const itemsEl = this.shadowRoot?.querySelector('.toolbar__items');
269
406
  if (!itemsEl)
270
407
  return;
@@ -276,6 +413,17 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
276
413
  const overflowButtonWidth = (overflowButtonContainerEl && !overflowButtonContainerEl.classList.contains('is-hidden') && overflowButtonEl)
277
414
  ? overflowButtonEl.getBoundingClientRect().width + hostGap
278
415
  : 0;
416
+ // Route to the centered center-fill layout whenever nothing is actually
417
+ // rendered in start/end — measured by real rendering, not child presence,
418
+ // so a consumer-hidden (display:none) back button doesn't strand a centered
419
+ // title at the left (it would otherwise keep centerOnly false and fall into
420
+ // the spacer path, where startWidth===0 && endWidth===0 suppresses both
421
+ // balancing spacers). An item the toolbar moved into the overflow menu
422
+ // still counts: switching layout then changes what fits, so the next
423
+ // measurement brings it back, and the two layouts take turns forever.
424
+ const centerOnly = this._isCenterOnly();
425
+ const rendered = this._allHostChildren().filter(c => !this._overflowIds.has(c.id) && c.element.getClientRects().length > 0);
426
+ yield 'write';
279
427
  this.style.setProperty('--_toolbar-overflow-button-width', `${overflowButtonWidth}px`);
280
428
  const startWidth = areaWidth(this._startChildren, this._overflowIds, this._itemWidths, itemGap);
281
429
  const centerWidth = areaWidth(this._centerChildren, this._overflowIds, this._itemWidths, itemGap);
@@ -296,18 +444,8 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
296
444
  this._leftSpacerZero = leftZero;
297
445
  if (rightZero !== this._rightSpacerZero)
298
446
  this._rightSpacerZero = rightZero;
299
- // Route to the centered center-fill layout whenever nothing is actually
300
- // rendered in start/end — measured by real rendering, not child presence,
301
- // so a consumer-hidden (display:none) back button doesn't strand a centered
302
- // title at the left (it would otherwise keep centerOnly false and fall into
303
- // the spacer path, where startWidth===0 && endWidth===0 suppresses both
304
- // balancing spacers). An item the toolbar moved into the overflow menu
305
- // still counts: switching layout then changes what fits, so the next
306
- // measurement brings it back, and the two layouts take turns forever.
307
- const centerOnly = this._isCenterOnly();
308
447
  if (centerOnly !== this._centerOnly)
309
448
  this._centerOnly = centerOnly;
310
- const rendered = this._allHostChildren().filter(c => !this._overflowIds.has(c.id) && c.element.getClientRects().length > 0);
311
449
  const soloFluid = fillsRowAlone(rendered);
312
450
  if (soloFluid !== this._soloFluid)
313
451
  this._soloFluid = soloFluid;
@@ -330,29 +468,67 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
330
468
  _hasPresentChild(children) {
331
469
  return children.some(c => this._overflowIds.has(c.id)) || this._hasRenderedChild(children);
332
470
  }
471
+ /** Measures this toolbar now, by itself. */
333
472
  _measureAndUpdate() {
473
+ measurePass.cancel(this);
474
+ runSteps([this._measureSteps()]);
475
+ }
476
+ /**
477
+ * Decides what fits, as steps that read or write (see runSteps).
478
+ * @internal
479
+ */
480
+ *_measureSteps() {
334
481
  if (this._isMeasuring)
335
482
  return;
336
483
  const itemsEl = this.shadowRoot?.querySelector('.toolbar__items');
337
484
  if (!itemsEl)
338
485
  return;
339
486
  this._isMeasuring = true;
340
- const hostWidth = this.getBoundingClientRect().width;
341
- this.style.setProperty('--_toolbar-width', `${hostWidth}px`);
342
- this._measureOverflow(itemsEl);
343
- this._hasMeasured = true;
344
- this._isMeasuring = false;
487
+ try {
488
+ const hostWidth = this.getBoundingClientRect().width;
489
+ // The width this measurement fits the items in; a report of the same
490
+ // width from the size observer is no resize.
491
+ this._lastWidth = hostWidth;
492
+ yield 'write';
493
+ this.style.setProperty('--_toolbar-width', `${hostWidth}px`);
494
+ yield* this._overflowSteps(itemsEl);
495
+ this._hasMeasured = true;
496
+ }
497
+ finally {
498
+ this._isMeasuring = false;
499
+ }
345
500
  }
346
- _measureOverflow(itemsEl) {
501
+ /** Starts in the write phase; ends in the read phase. */
502
+ *_overflowSteps(itemsEl) {
347
503
  const overflowButtonEl = this.shadowRoot?.querySelector('.toolbar__overflow-button');
348
504
  const allChildren = this._allHostChildren();
349
505
  const itemChildren = itemsOf(allChildren);
350
506
  const titleChildren = allChildren.filter((c) => c.type === 'title');
351
- // Show all items, reset solo-fluid to fluid with min-width restored.
507
+ // Show all items, and read what a control with its own overflow wants
508
+ // (see _syncShrinkable) with everything shown.
509
+ const controls = new Map();
352
510
  itemChildren.forEach(child => {
353
511
  const host = child.element;
354
512
  host.hidden = false;
355
- this._syncShrinkable(host);
513
+ host.removeAttribute('shrunk');
514
+ const control = shrinkableControlOf(host);
515
+ if (control)
516
+ controls.set(host, control);
517
+ });
518
+ if (controls.size) {
519
+ controls.forEach(control => control._setMeasuring?.(true));
520
+ yield 'read';
521
+ const widths = new Map([...controls].map(([host, control]) => [host, control._toolbarWidths()]));
522
+ yield 'write';
523
+ controls.forEach(control => control._setMeasuring?.(false));
524
+ itemChildren.forEach(child => this._syncShrinkable(child.element, widths.get(child.element) ?? null));
525
+ }
526
+ else {
527
+ itemChildren.forEach(child => this._syncShrinkable(child.element, null));
528
+ }
529
+ // Reset solo-fluid to fluid with min-width restored.
530
+ itemChildren.forEach(child => {
531
+ const host = child.element;
356
532
  if (host.hasAttribute('solo-fluid')) {
357
533
  host.removeAttribute('solo-fluid');
358
534
  host.toggleAttribute('fluid', child.isFluid);
@@ -372,20 +548,21 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
372
548
  else {
373
549
  overflowButtonEl?.classList.add('is-hidden');
374
550
  }
375
- void itemsEl.offsetWidth;
551
+ yield 'read';
376
552
  const centerOnly = this._isCenterOnly();
377
553
  const isOverflowing = () => itemsEl.scrollWidth > itemsEl.clientWidth + 1;
378
554
  if (!isOverflowing()) {
379
555
  if (this._overflowIds.size > 0) {
380
556
  this._overflowIds = new Set();
381
557
  }
382
- this._promoteSoloFluid(itemsEl, itemChildren, titleChildren, centerOnly);
558
+ yield* this._promoteSoloFluidSteps(itemsEl, itemChildren, titleChildren, centerOnly);
383
559
  this._measureItemWidths();
384
- this._updateAreaVars();
560
+ yield* this._areaSteps();
385
561
  return;
386
562
  }
563
+ yield 'write';
387
564
  overflowButtonEl?.classList.remove('is-hidden');
388
- void itemsEl.offsetWidth;
565
+ yield 'read';
389
566
  const prioritized = this._getPrioritizedItems();
390
567
  const newOverflowIds = new Set();
391
568
  const priorityGroups = groupForOverflow(prioritized);
@@ -410,40 +587,42 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
410
587
  .map(c => c.element)
411
588
  .filter(host => host.hasAttribute('shrinkable'));
412
589
  if (shrinkable.length > 0) {
590
+ yield 'write';
413
591
  shrinkable.forEach(host => host.toggleAttribute('shrunk', true));
414
- void itemsEl.offsetWidth;
592
+ yield 'read';
415
593
  if (!isOverflowing())
416
594
  break;
417
595
  }
596
+ yield 'write';
418
597
  for (const child of group) {
419
598
  newOverflowIds.add(child.id);
420
599
  const host = child.element;
421
600
  host.hidden = true;
422
601
  host.removeAttribute('shrunk');
423
602
  }
424
- void itemsEl.offsetWidth;
603
+ yield 'read';
425
604
  }
426
605
  if (newOverflowIds.size === 0 && this._pinnedOverflowItems.length === 0) {
606
+ yield 'write';
427
607
  overflowButtonEl?.classList.add('is-hidden');
608
+ yield 'read';
428
609
  }
429
- this._promoteSoloFluid(itemsEl, itemChildren, titleChildren, centerOnly);
610
+ yield* this._promoteSoloFluidSteps(itemsEl, itemChildren, titleChildren, centerOnly);
430
611
  const changed = newOverflowIds.size !== this._overflowIds.size ||
431
612
  [...newOverflowIds].some(id => !this._overflowIds.has(id));
432
613
  if (changed) {
433
614
  this._overflowIds = newOverflowIds;
434
615
  }
435
616
  this._measureItemWidths();
436
- this._updateAreaVars();
617
+ yield* this._areaSteps();
437
618
  }
438
619
  /**
439
620
  * Gives an item whose control overflows by itself (nldd-tab-bar) the width
440
621
  * that control wants with everything shown, and remembers how narrow it can
441
622
  * get. Read on every measurement, because the control's content can change.
623
+ * Writes only: the widths were read before, for every toolbar in the pass.
442
624
  */
443
- _syncShrinkable(host) {
444
- host.removeAttribute('shrunk');
445
- const control = Array.from(host.children).find(el => el.getAttribute('slot') !== 'overflow');
446
- const widths = typeof control?._toolbarWidths === 'function' ? control._toolbarWidths() : null;
625
+ _syncShrinkable(host, widths) {
447
626
  host.toggleAttribute('shrinkable', Boolean(widths));
448
627
  if (widths) {
449
628
  host.style.setProperty('--_toolbar-item-preferred-width', `${widths.preferred}px`);
@@ -460,7 +639,14 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
460
639
  * center-only mode the center-fill wrapper already grows the items, so item
461
640
  * promotion is skipped there (matching the previous template behavior).
462
641
  */
463
- _promoteSoloFluid(itemsEl, itemChildren, titleChildren, centerOnly) {
642
+ /**
643
+ * Promotes a lone remaining fluid item (or a lone title when no items are
644
+ * visible) to the solo-fluid state so it grows to fill the row. In
645
+ * center-only mode the center-fill wrapper already grows the items, so item
646
+ * promotion is skipped there (matching the previous template behavior).
647
+ * Starts and ends in the read phase.
648
+ */
649
+ *_promoteSoloFluidSteps(itemsEl, itemChildren, titleChildren, centerOnly) {
464
650
  // Real rendering, not the `hidden` property: a consumer-hidden
465
651
  // (display:none) start/end item must not count as a "remaining visible"
466
652
  // item, or it blocks promoting a lone title to solo-fluid (which is what
@@ -468,24 +654,27 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
468
654
  // display:none too, so this stays equivalent for the overflow flow.
469
655
  const remainingVisible = itemChildren.filter(c => c.element.getClientRects().length > 0);
470
656
  if (!centerOnly && remainingVisible.length === 1 && remainingVisible[0].element.hasAttribute('fluid')) {
657
+ yield 'write';
471
658
  const host = remainingVisible[0].element;
472
659
  host.removeAttribute('fluid');
473
660
  host.setAttribute('solo-fluid', '');
474
661
  host.style.removeProperty('--_toolbar-item-min-width');
475
- void itemsEl.offsetWidth;
662
+ yield 'read';
476
663
  }
477
664
  const remainingTitles = titleChildren.filter(c => !c.element.hidden);
478
665
  if (remainingVisible.length === 0 && remainingTitles.length === 1) {
666
+ yield 'write';
479
667
  const host = remainingTitles[0].element;
480
668
  host.setAttribute('solo-fluid', '');
481
669
  host.style.setProperty('min-width', '0px');
482
- void itemsEl.offsetWidth;
670
+ yield 'read';
483
671
  }
484
672
  // A title holds its own width while items can still move into the menu.
485
673
  // When nothing else can go and the row still does not fit, it gives way.
486
674
  if (itemsEl.scrollWidth > itemsEl.clientWidth + 1) {
675
+ yield 'write';
487
676
  remainingTitles.forEach(c => c.element.style.setProperty('min-width', '0px'));
488
- void itemsEl.offsetWidth;
677
+ yield 'read';
489
678
  }
490
679
  }
491
680
  _buildChildrenForSlot(slotName) {
@@ -535,6 +724,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
535
724
  (tag === 'nldd-menu-item' || tag === 'nldd-menu-divider' || tag === 'nldd-menu-group');
536
725
  });
537
726
  }
727
+ /** @internal */
538
728
  _buildChildren() {
539
729
  if (this._isBuilding)
540
730
  return;
@@ -544,6 +734,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
544
734
  this._centerChildren = this._buildChildrenForSlot('center');
545
735
  this._endChildren = this._buildChildrenForSlot('end');
546
736
  this._buildPinnedOverflowItems();
737
+ this._built = true;
547
738
  this._prioritizedItemsCache = null;
548
739
  this._syncHosts();
549
740
  const itemAttributeFilter = ['label', 'priority', 'min-width', 'max-width', 'width', 'text', 'disabled', 'selected', 'type'];
@@ -561,37 +752,14 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
561
752
  * some of those and has no way to tell which of them moved a pixel, so it
562
753
  * asked the wrong question. This one reads the answer.
563
754
  *
564
- * Measuring changes these very sizes, since an item that moves into the
565
- * overflow menu collapses. `_isMeasuring` covers the synchronous pass, and
566
- * the render that follows lands after it, so the callback compares against
567
- * the widths it last acted on and stays quiet when nothing really moved.
755
+ * The observer is shared by every toolbar; what a report means for this one
756
+ * is decided in _resized.
568
757
  */
569
758
  _watchChildSizes() {
570
- this._childResizeObserver?.disconnect();
571
- this._childResizeObserver ?? (this._childResizeObserver = new ResizeObserver(entries => {
572
- if (this._isMeasuring || this._isBuilding)
573
- return;
574
- let moved = false;
575
- for (const entry of entries) {
576
- const el = entry.target;
577
- // An item in the overflow menu has no width to speak of. It is the
578
- // hiding that took it away, not the content, so it says nothing about
579
- // whether the layout should change.
580
- if (el.hasAttribute('hidden'))
581
- continue;
582
- const width = entry.contentRect.width;
583
- if (Math.abs((this._lastChildWidths.get(el) ?? -1) - width) < 0.5)
584
- continue;
585
- this._lastChildWidths.set(el, width);
586
- moved = true;
587
- }
588
- if (moved)
589
- this._measureAndUpdate();
590
- }));
759
+ this._sizedChildren.forEach(el => unobserveSize(el, this));
760
+ this._sizedChildren = new Set(this._hostChildElements());
591
761
  this._lastChildWidths = new WeakMap();
592
- for (const el of this._hostChildElements()) {
593
- this._childResizeObserver.observe(el);
594
- }
762
+ this._sizedChildren.forEach(el => observeSize(el, this));
595
763
  }
596
764
  /** The elements this toolbar lays out: its items and its title. */
597
765
  _hostChildElements() {
@@ -601,7 +769,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
601
769
  });
602
770
  }
603
771
  render() {
604
- // Pre-measurement fallback: before the first _updateAreaVars there is no
772
+ // Pre-measurement fallback: before the first _areaSteps there is no
605
773
  // rendering to read, so fall back to mere DOM presence. _soloFluid takes
606
774
  // over from the first measurement on.
607
775
  const isSoloFluid = this._soloFluid