@nldd/design-system 0.26.4 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/custom-elements.json +428 -37
  2. package/dist/cdn/autoloader.js +141 -141
  3. package/dist/cdn/chunks/{accordion-qXirmNBj.js → accordion-DBM4AcGb.js} +4 -4
  4. package/dist/cdn/chunks/{accordion-item-BXEHwzcv.js → accordion-item-D90CmJyl.js} +4 -4
  5. package/dist/cdn/chunks/{activity-indicator-DP61AhsJ.js → activity-indicator-B6m9h0oa.js} +5 -5
  6. package/dist/cdn/chunks/{admonition-RnRSNAri.js → admonition-B-YTkCjn.js} +4 -4
  7. package/dist/cdn/chunks/after-parse-BSKUm67Q.js +9 -0
  8. package/dist/cdn/chunks/{avatar-DsexiOhH.js → avatar-CfBP9UZZ.js} +75 -41
  9. package/dist/cdn/chunks/{avatar-group-BrfrpXvd.js → avatar-group-DW_xMwb_.js} +71 -49
  10. package/dist/cdn/chunks/{badge-BiQFOq2l.js → badge-DnAuIhp1.js} +5 -5
  11. package/dist/cdn/chunks/{banner-42zIYAEN.js → banner-CRk2ARtC.js} +7 -7
  12. package/dist/cdn/chunks/{bar-split-view-CjYEp276.js → bar-split-view-DDgOYs7Z.js} +28 -21
  13. package/dist/cdn/chunks/{blockquote-qf4hJYvm.js → blockquote-DlfhBScg.js} +3 -3
  14. package/dist/cdn/chunks/{box-CWyg7sbR.js → box-DdU13yI4.js} +3 -3
  15. package/dist/cdn/chunks/{breadcrumbs-BaHjYdz8.js → breadcrumbs-CqkR_6XN.js} +5 -5
  16. package/dist/cdn/chunks/{button-bar-DeJ81759.js → button-bar-BKkap9nk.js} +3 -3
  17. package/dist/cdn/chunks/{button-group-CuRkiHR5.js → button-group-D-YTmErV.js} +2 -2
  18. package/dist/cdn/chunks/{button-CKV-jwGY.js → button-muXGJHlo.js} +8 -8
  19. package/dist/cdn/chunks/{card-DxeUNE3V.js → card-Dvqz83fC.js} +4 -4
  20. package/dist/cdn/chunks/{cell-QaG8b-Qk.js → cell-C0O8tZbX.js} +6 -6
  21. package/dist/cdn/chunks/{checkbox-V0YerUKf.js → checkbox-CNWROiHV.js} +5 -5
  22. package/dist/cdn/chunks/{checkbox-field-DeySECgv.js → checkbox-field-DCYpRJfz.js} +7 -7
  23. package/dist/cdn/chunks/{checkbox-group-DFNy1y-A.js → checkbox-group-DxWAYp_b.js} +3 -3
  24. package/dist/cdn/chunks/{class-map-CmgI2Tu-.js → class-map-D720ceWJ.js} +1 -1
  25. package/dist/cdn/chunks/{code-editor-BBMbUJ4d.js → code-editor-DlnTXkHx.js} +5 -5
  26. package/dist/cdn/chunks/{code-viewer-B8jse0-5.js → code-viewer-DyJzo36-.js} +94 -87
  27. package/dist/cdn/chunks/{codemirror-input-BEotDTtZ.js → codemirror-input-DPSOMYZ4.js} +5 -5
  28. package/dist/cdn/chunks/{collection-DRoS7Ona.js → collection-i7H8zkQ8.js} +61 -42
  29. package/dist/cdn/chunks/{combo-box-DA1ZQJJS.js → combo-box-CpNl_us0.js} +20 -14
  30. package/dist/cdn/chunks/{container-F1i2pmko.js → container-YWW7mHNa.js} +14 -10
  31. package/dist/cdn/chunks/{custom-element-DD4ffKRs.js → custom-element-D8yf5dqU.js} +1 -1
  32. package/dist/cdn/chunks/{date-field-DVgisQnm.js → date-field-DzhUp4Rk.js} +12 -12
  33. package/dist/cdn/chunks/{date-picker-BaDTota3.js → date-picker-CGvsvK3g.js} +21 -15
  34. package/dist/cdn/chunks/{decorate-CeGXihRM.js → decorate-1aEyfetK.js} +1 -1
  35. package/dist/cdn/chunks/{described-by-mixin-qFatR9dF.js → described-by-mixin-DffYoaxu.js} +2 -2
  36. package/dist/cdn/chunks/{description-cell-D45N4P1X.js → description-cell-DEw6xc2o.js} +6 -6
  37. package/dist/cdn/chunks/{dev-checks-CkCD0tPh.js → dev-checks-CTopJcdE.js} +12 -0
  38. package/dist/cdn/chunks/{directive-helpers-B9pcQxsE.js → directive-helpers-BQml5ahH.js} +1 -1
  39. package/dist/cdn/chunks/{dist-BS_pQgb6.js → dist-B5t9fS8q.js} +2 -2
  40. package/dist/cdn/chunks/{dist-DjlGttcc.js → dist-B87Ag4L-.js} +1 -1
  41. package/dist/cdn/chunks/{dist-v62GtoI6.js → dist-BKnqQxdv.js} +1 -1
  42. package/dist/cdn/chunks/{dist-Dsyc1RGG.js → dist-BYbLHkMP.js} +1 -1
  43. package/dist/cdn/chunks/{dist-Cl-rXzh7.js → dist-C8ZY_QIK.js} +1 -1
  44. package/dist/cdn/chunks/{dist-v7yvd26H.js → dist-CIX4JLW1.js} +3 -3
  45. package/dist/cdn/chunks/{dist-DJQUgOKW.js → dist-Cr8NctvS.js} +3 -3
  46. package/dist/cdn/chunks/{dist-mxb0NzAU.js → dist-D59Ae7dj.js} +1 -1
  47. package/dist/cdn/chunks/{dist-n8aCu6Kg.js → dist-DAf6EMuK.js} +2 -2
  48. package/dist/cdn/chunks/{dist-rjQNj-KZ.js → dist-DevfJ4Mu.js} +2 -2
  49. package/dist/cdn/chunks/{dist-jTL_Kil1.js → dist-qHSPGfTO.js} +1 -1
  50. package/dist/cdn/chunks/{divider-CtMx3Byp.js → divider-44rkHLYj.js} +2 -2
  51. package/dist/cdn/chunks/{document-tab-bar-SKSf69FX.js → document-tab-bar-CcSKzhEy.js} +95 -56
  52. package/dist/cdn/chunks/{dropdown-se1zjYlw.js → dropdown-CJPjI-p1.js} +5 -5
  53. package/dist/cdn/chunks/{file-field-DW_Xt5O3.js → file-field-B4HQKpkI.js} +14 -14
  54. package/dist/cdn/chunks/{form-actions-Cy5tH1nk.js → form-actions-HaBfh6vm.js} +2 -2
  55. package/dist/cdn/chunks/{form-associated-mixin-CA0F9CPx.js → form-associated-mixin-BByNH679.js} +2 -2
  56. package/dist/cdn/chunks/{form-field-BMWm8VGS.js → form-field-CwYXsuvv.js} +6 -6
  57. package/dist/cdn/chunks/{form-C9-eW3zc.js → form-obggZEpt.js} +1 -1
  58. package/dist/cdn/chunks/{form-section-DrrXc4wZ.js → form-section-B2UZx_-z.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-BSnWghWY.js} +9 -10
  61. package/dist/cdn/chunks/{hero-BThWV3MR.js → hero-CzbuEAUM.js} +73 -68
  62. package/dist/cdn/chunks/{icon-CVM6X_F1.js → icon-CkCT7sPE.js} +2 -2
  63. package/dist/cdn/chunks/{icon-button-h_sEz0Ia.js → icon-button-BBGwCfYp.js} +9 -9
  64. package/dist/cdn/chunks/{icon-cell-C3Ygercd.js → icon-cell-DcHnXV-8.js} +5 -5
  65. package/dist/cdn/chunks/{identity-BR0KxjM5.js → identity-C0fujsxK.js} +6 -6
  66. package/dist/cdn/chunks/{if-defined-CvQli6P0.js → if-defined-CL4nn-Q-.js} +1 -1
  67. package/dist/cdn/chunks/{image-D8H73DIj.js → image-BgtqLXfM.js} +8 -8
  68. package/dist/cdn/chunks/{inline-dialog-Dlu3bneh.js → inline-dialog-BYRIWhkm.js} +6 -6
  69. package/dist/cdn/chunks/{just-in-time-education-DG0teV5g.js → just-in-time-education-DwH3ubhZ.js} +5 -5
  70. package/dist/cdn/chunks/{kanban-MNLyqki_.js → kanban-BIZUoBj-.js} +35 -30
  71. package/dist/cdn/chunks/{kanban-column-CGF_4Q0N.js → kanban-column-CtjCIgaR.js} +37 -25
  72. package/dist/cdn/chunks/{keyboard-shortcut-DZDtndhS.js → keyboard-shortcut-BHylGMNu.js} +3 -3
  73. package/dist/cdn/chunks/{languages-BCn4J5Ck.js → languages-DghCYmiz.js} +12 -12
  74. package/dist/cdn/chunks/layout-pass-Cq85kSHX.js +45 -0
  75. package/dist/cdn/chunks/{link-CTj3dTmJ.js → link-S53veJpD.js} +6 -6
  76. package/dist/cdn/chunks/{link-group--C486tYV.js → link-group-B2_vdANe.js} +2 -2
  77. package/dist/cdn/chunks/{list-DApLHKj-.js → list-C8hY4uGW.js} +48 -34
  78. package/dist/cdn/chunks/{list-item-BN9uuvXr.js → list-item-CK1Rli4F.js} +5 -6
  79. package/dist/cdn/chunks/{list-item-segment-CvdZT9Ni.js → list-item-segment-KyrcOFDA.js} +3 -3
  80. package/dist/cdn/chunks/{menu-bar-g-O3_TNl.js → menu-bar-BRoqy5zp.js} +62 -46
  81. package/dist/cdn/chunks/{menu-bar-item-tOFEx-lS.js → menu-bar-item-DKW198ZW.js} +6 -6
  82. package/dist/cdn/chunks/{menu-divider-Dmv0lMHV.js → menu-divider-DDPBPK-o.js} +3 -3
  83. package/dist/cdn/chunks/{menu-group-Ci9QUUwZ.js → menu-group-uZXsE-uu.js} +4 -4
  84. package/dist/cdn/chunks/{menu-item-BnIbV4yo.js → menu-item-BOvb4QLd.js} +16 -12
  85. package/dist/cdn/chunks/{menu-2-9LtMLY.js → menu-m67vk1Z4.js} +20 -19
  86. package/dist/cdn/chunks/{menu.template-sPjaMfc8.js → menu.template-v6VnRUNJ.js} +105 -76
  87. package/dist/cdn/chunks/{modal-dialog-D-jAbabe.js → modal-dialog-BNq0r-1L.js} +4 -4
  88. package/dist/cdn/chunks/{multi-line-text-field-uBZqAdr6.js → multi-line-text-field-Bfq47I3P.js} +6 -6
  89. package/dist/cdn/chunks/{navigation-split-view-DARbBPq-.js → navigation-split-view-BiPoxCLL.js} +59 -47
  90. package/dist/cdn/chunks/{notification-CntIGoYh.js → notification-DjZXBv4J.js} +6 -6
  91. package/dist/cdn/chunks/{number-field-C0MTabLP.js → number-field-tqoQLrgZ.js} +8 -8
  92. package/dist/cdn/chunks/{one-half-one-half-section-DYzf6LtU.js → one-half-one-half-section-CyIm21PD.js} +15 -16
  93. package/dist/cdn/chunks/{one-third-two-thirds-section-AAiaxCHH.js → one-third-two-thirds-section-CpnK0vzB.js} +15 -16
  94. package/dist/cdn/chunks/{one-time-code-field-CCILuCy1.js → one-time-code-field-6sMEfzoY.js} +103 -64
  95. package/dist/cdn/chunks/{overflow-menu-DFoh3xL_.js → overflow-menu-IfYEX8tm.js} +1 -1
  96. package/dist/cdn/chunks/{page-footer-BsVMZCXs.js → page-footer-ET6j1N2Z.js} +4 -4
  97. package/dist/cdn/chunks/{page-section-mixin-L0bl3wCm.js → page-section-mixin-D9JL2q9A.js} +3 -3
  98. package/dist/cdn/chunks/{page-BDXLREou.js → page-w4XAfBWD.js} +76 -54
  99. package/dist/cdn/chunks/{pagination-DLwbSZdO.js → pagination-D7QFUu8x.js} +6 -6
  100. package/dist/cdn/chunks/{password-field-DKTJgEyb.js → password-field-Ck5wx6pg.js} +8 -8
  101. package/dist/cdn/chunks/{popover-RB7uLASo.js → popover-DOmi5m85.js} +5 -5
  102. package/dist/cdn/chunks/{progress-bar-DnXWbmiw.js → progress-bar-BDNcB06i.js} +10 -7
  103. package/dist/cdn/chunks/{progress-circle-S89MUtU8.js → progress-circle-BAMztpb3.js} +10 -7
  104. package/dist/cdn/chunks/{radio-button-B31lAjlk.js → radio-button-DAps6n0Q.js} +92 -51
  105. package/dist/cdn/chunks/{radio-button-field-BF4MHiOQ.js → radio-button-field-BbPk0nM_.js} +8 -7
  106. package/dist/cdn/chunks/{radio-button-group-BQUqV8wJ.js → radio-button-group-lxzwku00.js} +3 -3
  107. package/dist/cdn/chunks/{render-marked-ChJNzktf.js → render-marked-ClMFyNu0.js} +1 -1
  108. package/dist/cdn/chunks/{reorder-handle-cell-SEERkeh7.js → reorder-handle-cell-Cap2u2zx.js} +4 -4
  109. package/dist/cdn/chunks/{reorder-handle-mixin-tWe9XTjZ.js → reorder-handle-mixin-CnRKPVqU.js} +2 -2
  110. package/dist/cdn/chunks/{repeat-CdCK17GF.js → repeat-CIyCvHHQ.js} +2 -2
  111. package/dist/cdn/chunks/{rich-text-vVWOndD2.js → rich-text-CblFmHY-.js} +3 -3
  112. package/dist/cdn/chunks/{row-header-mixin-6MoJ5Mjq.js → row-header-mixin-C8z9StDU.js} +2 -2
  113. package/dist/cdn/chunks/{scroll-fade-Cr7_IXpU.js → scroll-fade-C_L9CJrR.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-JeUPcBjZ.js} +10 -10
  116. package/dist/cdn/chunks/{segmented-control-DkILAMOJ.js → segmented-control-DtycvVyp.js} +7 -7
  117. package/dist/cdn/chunks/{shadow-resets-9v6K-Fie.js → shadow-resets-DgR56wQK.js} +2 -2
  118. package/dist/cdn/chunks/{sheet-D89xI-KY.js → sheet-XtRs26hN.js} +3 -3
  119. package/dist/cdn/chunks/{shell-CFmfUD0_.js → shell-CCaEEGna.js} +4 -4
  120. package/dist/cdn/chunks/{side-by-side-split-view-ir9c0mwZ.js → side-by-side-split-view-mhXD4Lde.js} +38 -29
  121. package/dist/cdn/chunks/{sidebar-section-BhJXels3.js → sidebar-section-Cwd4LSE6.js} +70 -48
  122. package/dist/cdn/chunks/{simple-section-CMoYuLYV.js → simple-section-BuiaCGks.js} +9 -10
  123. package/dist/cdn/chunks/{skip-link-rUQq0D-l.js → skip-link-nTlmioFt.js} +4 -4
  124. package/dist/cdn/chunks/{slider-CIQqjKUo.js → slider-C0rNQEIY.js} +9 -9
  125. package/dist/cdn/chunks/{spacer-CD85egxE.js → spacer-CeSO9CP1.js} +2 -2
  126. package/dist/cdn/chunks/{spacer-cell-B33mGdru.js → spacer-cell-NhlxEdhA.js} +4 -4
  127. package/dist/cdn/chunks/{split-button-COL7r-wa.js → split-button-BR-ccA6_.js} +7 -7
  128. package/dist/cdn/chunks/{split-view-divider-DVBuBzeO.js → split-view-divider-HcIV0yli.js} +2 -2
  129. package/dist/cdn/chunks/{split-view-pane-CSvIzeBg.js → split-view-pane-BgFUL3BV.js} +4 -4
  130. package/dist/cdn/chunks/{stacked-split-view-onSk2QEi.js → stacked-split-view-j77p3uE2.js} +29 -25
  131. package/dist/cdn/chunks/{static-html-Cyhp44gp.js → static-html-CGoLwgpW.js} +1 -1
  132. package/dist/cdn/chunks/{status-bar-CjYXOQAX.js → status-bar-ByJ21hV2.js} +29 -17
  133. package/dist/cdn/chunks/{step-bar-D-To0TEw.js → step-bar-CRxF0S42.js} +5 -5
  134. package/dist/cdn/chunks/{step-cell-B7sVGixc.js → step-cell-C-gOxNA6.js} +5 -5
  135. package/dist/cdn/chunks/{stepper-h6boMOhz.js → stepper-Dmljb7Qc.js} +7 -7
  136. package/dist/cdn/chunks/{style-map-BrdTV34-.js → style-map-CK811FGv.js} +1 -1
  137. package/dist/cdn/chunks/{swatch-picker-gQ3m3y9U.js → swatch-picker-DtAgTXLo.js} +6 -6
  138. package/dist/cdn/chunks/{switch-DC-BTi9E.js → switch-Bqion92b.js} +5 -5
  139. package/dist/cdn/chunks/{switch-field-D82mLobj.js → switch-field-CWobTcEn.js} +6 -6
  140. package/dist/cdn/chunks/{tab-bar-sKiFzvfj.js → tab-bar-DPtRjP8Z.js} +85 -49
  141. package/dist/cdn/chunks/{table-CuxZfCZD.js → table-C4CFiDgr.js} +111 -54
  142. package/dist/cdn/chunks/{tag-DP_ome5l.js → tag-Bo23A60g.js} +4 -4
  143. package/dist/cdn/chunks/{term-BdiTV-Jk.js → term-DPMEWR-t.js} +12 -12
  144. package/dist/cdn/chunks/{text-C-b1ygHI.js → text-CuiMvMZQ.js} +3 -3
  145. package/dist/cdn/chunks/{text-cell-DfRh7JqZ.js → text-cell-E3yc99xw.js} +8 -8
  146. package/dist/cdn/chunks/{text-editor-DuT9Rrpv.js → text-editor-BVmHiq_b.js} +191 -191
  147. package/dist/cdn/chunks/{text-field-kAbXzkUj.js → text-field-DOv1aI_F.js} +6 -6
  148. package/dist/cdn/chunks/{time-field-DUz9ifmn.js → time-field-BhlLk6tt.js} +14 -14
  149. package/dist/cdn/chunks/{time-picker-DGOKwC9T.js → time-picker-A4-HeVas.js} +170 -99
  150. package/dist/cdn/chunks/{title-BA-SUyAq.js → title-EMt-SYKV.js} +4 -4
  151. package/dist/cdn/chunks/{title-cell-Cu5NFNUu.js → title-cell--EE-L_8a.js} +8 -8
  152. package/dist/cdn/chunks/{toggle-button-J6UapeqB.js → toggle-button-BLwpxmQs.js} +8 -8
  153. package/dist/cdn/chunks/{toggle-button-group-wrps-tL9.js → toggle-button-group-scdxolJt.js} +2 -2
  154. package/dist/cdn/chunks/{token-DJkyJz-k.js → token-DVgXuCRO.js} +5 -5
  155. package/dist/cdn/chunks/{token-field-SiBFPD8-.js → token-field-CICQXLlO.js} +12 -12
  156. package/dist/cdn/chunks/toolbar-Des2gaH2.js +441 -0
  157. package/dist/cdn/chunks/{toolbar-item-DPizdgYi.js → toolbar-item-CkwQ2UyY.js} +3 -3
  158. package/dist/cdn/chunks/{toolbar-title-CB4IJFGv.js → toolbar-title-PoOf794l.js} +4 -4
  159. package/dist/cdn/chunks/{toolbar.styles-vmMPyzS_.js → toolbar.styles-DzreUGTp.js} +3 -3
  160. package/dist/cdn/chunks/{tooltip-Bg2ovCCg.js → tooltip-CMCT2iiD.js} +4 -4
  161. package/dist/cdn/chunks/{top-navigation-bar-vA8wpJXS.js → top-navigation-bar-BfMGgTIy.js} +121 -104
  162. package/dist/cdn/chunks/{top-title-bar-BAJGmgnj.js → top-title-bar-CvvldlNt.js} +43 -30
  163. package/dist/cdn/chunks/{translations-Cjd13Xb6.js → translations-C5JpcNNC.js} +1 -1
  164. package/dist/cdn/chunks/{two-thirds-one-third-section-D1FvorKO.js → two-thirds-one-third-section-BTkeIiHm.js} +15 -16
  165. package/dist/cdn/chunks/{validation-list-D3rKnfTu.js → validation-list-BasB3ZaT.js} +3 -3
  166. package/dist/cdn/chunks/{visibility-mixin-BRMACV1l.js → visibility-mixin-BxhcJG-x.js} +2 -2
  167. package/dist/cdn/chunks/{visually-hidden-BukWRiJA.js → visually-hidden-ByHY8pKl.js} +2 -2
  168. package/dist/cdn/chunks/{window-C9njVzzK.js → window-B5blEfMR.js} +4 -4
  169. package/dist/cdn/chunks/{with-translations-BLzHPSUF.js → with-translations-QDhHJYMT.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/forms/form-field/form-field.d.ts.map +1 -1
  208. package/dist/components/forms/form-field/form-field.js +4 -0
  209. package/dist/components/forms/form-field/form-field.js.map +1 -1
  210. package/dist/components/inputs/combo-box/combo-box.d.ts +8 -0
  211. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  212. package/dist/components/inputs/combo-box/combo-box.js +28 -9
  213. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  214. package/dist/components/inputs/date-picker/date-picker.d.ts +11 -0
  215. package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
  216. package/dist/components/inputs/date-picker/date-picker.js +23 -0
  217. package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
  218. package/dist/components/inputs/date-picker/date-picker.template.d.ts.map +1 -1
  219. package/dist/components/inputs/date-picker/date-picker.template.js +4 -2
  220. package/dist/components/inputs/date-picker/date-picker.template.js.map +1 -1
  221. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
  222. package/dist/components/inputs/file-field/file-field.js +6 -1
  223. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  224. package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts +27 -5
  225. package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts.map +1 -1
  226. package/dist/components/inputs/one-time-code-field/one-time-code-field.js +128 -30
  227. package/dist/components/inputs/one-time-code-field/one-time-code-field.js.map +1 -1
  228. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  229. package/dist/components/inputs/radio-button/radio-button.js +5 -2
  230. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  231. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
  232. package/dist/components/inputs/radio-button-field/radio-button-field.js +5 -2
  233. package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
  234. package/dist/components/inputs/text-editor/text-editor.annotations.js +1 -1
  235. package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -1
  236. package/dist/components/inputs/text-editor/text-editor.js +2 -2
  237. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  238. package/dist/components/inputs/text-editor/text-editor.selection.js +1 -1
  239. package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -1
  240. package/dist/components/inputs/text-editor/text-editor.toolbar.d.ts.map +1 -1
  241. package/dist/components/inputs/text-editor/text-editor.toolbar.js +18 -12
  242. package/dist/components/inputs/text-editor/text-editor.toolbar.js.map +1 -1
  243. package/dist/components/inputs/time-picker/time-picker.d.ts +23 -0
  244. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  245. package/dist/components/inputs/time-picker/time-picker.js +132 -12
  246. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  247. package/dist/components/inputs/time-picker/time-picker.styles.d.ts.map +1 -1
  248. package/dist/components/inputs/time-picker/time-picker.styles.js +27 -6
  249. package/dist/components/inputs/time-picker/time-picker.styles.js.map +1 -1
  250. package/dist/components/inputs/time-picker/time-picker.template.d.ts.map +1 -1
  251. package/dist/components/inputs/time-picker/time-picker.template.js +1 -0
  252. package/dist/components/inputs/time-picker/time-picker.template.js.map +1 -1
  253. package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
  254. package/dist/components/inputs/token-field/token-field.js +3 -0
  255. package/dist/components/inputs/token-field/token-field.js.map +1 -1
  256. package/dist/components/layout/collection/collection.d.ts +9 -1
  257. package/dist/components/layout/collection/collection.d.ts.map +1 -1
  258. package/dist/components/layout/collection/collection.js +96 -38
  259. package/dist/components/layout/collection/collection.js.map +1 -1
  260. package/dist/components/layout/container/container.d.ts +1 -0
  261. package/dist/components/layout/container/container.d.ts.map +1 -1
  262. package/dist/components/layout/container/container.js +22 -16
  263. package/dist/components/layout/container/container.js.map +1 -1
  264. package/dist/components/layout/kanban/kanban-column.d.ts +7 -2
  265. package/dist/components/layout/kanban/kanban-column.d.ts.map +1 -1
  266. package/dist/components/layout/kanban/kanban-column.js +49 -17
  267. package/dist/components/layout/kanban/kanban-column.js.map +1 -1
  268. package/dist/components/layout/kanban/kanban.d.ts +4 -1
  269. package/dist/components/layout/kanban/kanban.d.ts.map +1 -1
  270. package/dist/components/layout/kanban/kanban.js +25 -7
  271. package/dist/components/layout/kanban/kanban.js.map +1 -1
  272. package/dist/components/layout/kanban/kanban.template.js +1 -1
  273. package/dist/components/layout/kanban/kanban.template.js.map +1 -1
  274. package/dist/components/layout/page/page.d.ts +39 -12
  275. package/dist/components/layout/page/page.d.ts.map +1 -1
  276. package/dist/components/layout/page/page.js +112 -66
  277. package/dist/components/layout/page/page.js.map +1 -1
  278. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +3 -1
  279. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
  280. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +3 -1
  281. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
  282. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.d.ts.map +1 -1
  283. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +6 -7
  284. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
  285. package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -1
  286. package/dist/components/layout/page-sections/hero/hero-corner.js +24 -1
  287. package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -1
  288. package/dist/components/layout/page-sections/hero/hero-corner.styles.js +22 -22
  289. package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -1
  290. package/dist/components/layout/page-sections/hero/hero.d.ts +2 -0
  291. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  292. package/dist/components/layout/page-sections/hero/hero.js +2 -0
  293. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  294. package/dist/components/layout/page-sections/hero/hero.styles.d.ts.map +1 -1
  295. package/dist/components/layout/page-sections/hero/hero.styles.js +8 -11
  296. package/dist/components/layout/page-sections/hero/hero.styles.js.map +1 -1
  297. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +4 -2
  298. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
  299. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +4 -2
  300. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
  301. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.d.ts.map +1 -1
  302. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +12 -13
  303. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
  304. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +4 -2
  305. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
  306. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +4 -2
  307. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
  308. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.d.ts.map +1 -1
  309. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +12 -13
  310. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
  311. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +12 -9
  312. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
  313. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +66 -21
  314. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
  315. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.d.ts.map +1 -1
  316. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js +23 -17
  317. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js.map +1 -1
  318. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.d.ts.map +1 -1
  319. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.js +5 -0
  320. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.template.js.map +1 -1
  321. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +4 -3
  322. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  323. package/dist/components/layout/page-sections/simple-section/simple-section.js +4 -3
  324. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  325. package/dist/components/layout/page-sections/simple-section/simple-section.styles.d.ts.map +1 -1
  326. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +6 -7
  327. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
  328. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +4 -2
  329. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
  330. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +4 -2
  331. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
  332. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.d.ts.map +1 -1
  333. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +12 -13
  334. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
  335. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +2 -1
  336. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
  337. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +30 -17
  338. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
  339. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts +8 -3
  340. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts.map +1 -1
  341. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +35 -20
  342. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js.map +1 -1
  343. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +1 -1
  344. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts +6 -2
  345. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
  346. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +30 -15
  347. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
  348. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.styles.js +1 -1
  349. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts +6 -3
  350. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
  351. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +28 -16
  352. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
  353. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.styles.js +1 -1
  354. package/dist/components/lists-and-tables/list/list.d.ts +19 -0
  355. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  356. package/dist/components/lists-and-tables/list/list.js +47 -15
  357. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  358. package/dist/components/lists-and-tables/list/list.roving.d.ts +2 -1
  359. package/dist/components/lists-and-tables/list/list.roving.d.ts.map +1 -1
  360. package/dist/components/lists-and-tables/list/list.roving.js +7 -3
  361. package/dist/components/lists-and-tables/list/list.roving.js.map +1 -1
  362. package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
  363. package/dist/components/lists-and-tables/list-item/list-item.styles.js +0 -1
  364. package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
  365. package/dist/components/lists-and-tables/table/table.d.ts +34 -6
  366. package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
  367. package/dist/components/lists-and-tables/table/table.js +143 -40
  368. package/dist/components/lists-and-tables/table/table.js.map +1 -1
  369. package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
  370. package/dist/components/lists-and-tables/table/table.styles.js +13 -0
  371. package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
  372. package/dist/components/lists-and-tables/table/table.template.d.ts.map +1 -1
  373. package/dist/components/lists-and-tables/table/table.template.js +6 -0
  374. package/dist/components/lists-and-tables/table/table.template.js.map +1 -1
  375. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +33 -2
  376. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
  377. package/dist/components/navigation/document-tab-bar/document-tab-bar.js +136 -38
  378. package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
  379. package/dist/components/navigation/menu-bar/menu-bar.d.ts +21 -3
  380. package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
  381. package/dist/components/navigation/menu-bar/menu-bar.js +61 -29
  382. package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
  383. package/dist/components/navigation/tab-bar/tab-bar.d.ts +26 -4
  384. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  385. package/dist/components/navigation/tab-bar/tab-bar.js +99 -24
  386. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  387. package/dist/components/navigation/tab-bar/tab-bar.template.d.ts.map +1 -1
  388. package/dist/components/navigation/tab-bar/tab-bar.template.js +1 -0
  389. package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
  390. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +23 -14
  391. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
  392. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +126 -83
  393. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  394. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +28 -28
  395. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  396. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +5 -1
  397. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
  398. package/dist/components/navigation/top-title-bar/top-title-bar.js +36 -13
  399. package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
  400. package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts +1 -0
  401. package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts.map +1 -1
  402. package/dist/components/status-and-feedback/progress-bar/progress-bar.js +6 -0
  403. package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
  404. package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts +1 -0
  405. package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts.map +1 -1
  406. package/dist/components/status-and-feedback/progress-circle/progress-circle.js +6 -0
  407. package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
  408. package/dist/components/status-and-feedback/status-bar/status-bar.d.ts +0 -1
  409. package/dist/components/status-and-feedback/status-bar/status-bar.d.ts.map +1 -1
  410. package/dist/components/status-and-feedback/status-bar/status-bar.js +26 -6
  411. package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
  412. package/dist/nldd.min.js +880 -814
  413. package/dist/types/react.d.ts +8 -8
  414. package/dist/types/vue.d.ts +8 -8
  415. package/dist/utilities/after-parse.d.ts +30 -0
  416. package/dist/utilities/after-parse.d.ts.map +1 -0
  417. package/dist/utilities/after-parse.js +44 -0
  418. package/dist/utilities/after-parse.js.map +1 -0
  419. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  420. package/dist/utilities/dev-rules.generated.js +12 -0
  421. package/dist/utilities/dev-rules.generated.js.map +1 -1
  422. package/dist/utilities/frame-pass.d.ts +28 -0
  423. package/dist/utilities/frame-pass.d.ts.map +1 -0
  424. package/dist/utilities/frame-pass.js +41 -0
  425. package/dist/utilities/frame-pass.js.map +1 -0
  426. package/dist/utilities/layout-pass.d.ts +49 -0
  427. package/dist/utilities/layout-pass.d.ts.map +1 -0
  428. package/dist/utilities/layout-pass.js +103 -0
  429. package/dist/utilities/layout-pass.js.map +1 -0
  430. package/dist/utilities/radio-grouping.d.ts +30 -4
  431. package/dist/utilities/radio-grouping.d.ts.map +1 -1
  432. package/dist/utilities/radio-grouping.js +98 -17
  433. package/dist/utilities/radio-grouping.js.map +1 -1
  434. package/dist/utilities/scroll-mode-controller.d.ts +13 -6
  435. package/dist/utilities/scroll-mode-controller.d.ts.map +1 -1
  436. package/dist/utilities/scroll-mode-controller.js +47 -21
  437. package/dist/utilities/scroll-mode-controller.js.map +1 -1
  438. package/lint/data.generated.json +1 -1
  439. package/lint/format.js +7 -4
  440. package/lint/frontends.js +347 -0
  441. package/lint/linter.js +1 -1
  442. package/lint/main.js +1 -0
  443. package/lint/project.js +8 -1
  444. package/lint/session.js +30 -8
  445. package/package.json +1 -1
  446. package/dist/cdn/chunks/scroll-mode-controller-COUD1-3P.js +0 -42
  447. package/dist/cdn/chunks/toolbar-be8hoSAz.js +0 -364
package/lint/format.js CHANGED
@@ -45,7 +45,10 @@ function hintSummary(results, root, explainRule) {
45
45
  return lines;
46
46
  }
47
47
 
48
- export function formatText(results, { root, files, ms, skipped, loose, explainRule }) {
48
+ /** `in 2 files`, and how many with our markup the linter could not read besides. */
49
+ const inFiles = (files, unread) => `in ${plural(files, 'file')}${unread ? ` (${unread} not read)` : ''}`;
50
+
51
+ export function formatText(results, { root, files, unread, ms, skipped, loose, explainRule }) {
49
52
  const lines = [];
50
53
  for (const { filename, source, findings } of results) {
51
54
  const sourceLines = source.split('\n');
@@ -66,7 +69,7 @@ export function formatText(results, { root, files, ms, skipped, loose, explainRu
66
69
  const warnings = count('warn');
67
70
  const hints = count('hint') ? `, ${plural(count('hint'), 'hint')}` : '';
68
71
  const known = (skipped ? dim(` (${skipped} in baseline)`) : '') + (loose ? dim(` (${loose} accepted no longer found: run --tighten-baseline)`) : '');
69
- const summary = `${plural(errors, 'error')}, ${plural(warnings, 'warning')}${hints} in ${plural(files, 'file')} (${ms} ms)`;
72
+ const summary = `${plural(errors, 'error')}, ${plural(warnings, 'warning')}${hints} ${inFiles(files, unread)} (${ms} ms)`;
70
73
  const fixable = all.filter(({ fix }) => fix).length;
71
74
  const canFix = fixable ? `, ${fixable} fixable with --fix` : '';
72
75
  lines.push(`${errors + warnings ? red('✖') : '✔'} ${summary}${known}${canFix}`);
@@ -74,7 +77,7 @@ export function formatText(results, { root, files, ms, skipped, loose, explainRu
74
77
  }
75
78
 
76
79
  /** A count per rule, most first: where to start when a project has hundreds. */
77
- export function formatStatistics(results, { files, ms, skipped }) {
80
+ export function formatStatistics(results, { files, unread, ms, skipped }) {
78
81
  const counts = new Map();
79
82
  for (const { rule, severity, fix } of results.flatMap(({ findings }) => findings)) {
80
83
  const entry = counts.get(rule) ?? { rule, severity, count: 0 };
@@ -88,7 +91,7 @@ export function formatStatistics(results, { files, ms, skipped }) {
88
91
  return [
89
92
  ...rows.map(({ count, severity, rule, fixable }) => `${String(count).padStart(width)} ${severity.padEnd(5)} ${rule}${fixable ? ' [--fix]' : ''}`),
90
93
  ...(rows.length > 0 ? [''] : []),
91
- `${plural(total, 'finding')} in ${plural(files, 'file')} (${ms} ms)${skipped ? ` (${skipped} in baseline)` : ''}`,
94
+ `${plural(total, 'finding')} ${inFiles(files, unread)} (${ms} ms)${skipped ? ` (${skipped} in baseline)` : ''}`,
92
95
  ].join('\n');
93
96
  }
94
97
 
package/lint/frontends.js CHANGED
@@ -115,6 +115,8 @@ function readHtmlChildren(children, parent, given) {
115
115
  for (const block of styleBlocks(node)) appendChild(parent, styleNode(block));
116
116
  continue;
117
117
  }
118
+ // Content a frontend already knows nobody can read here.
119
+ if (node.type === 'hole') appendUnknown(parent, node.startIndex);
118
120
  if (node.type !== 'tag') continue;
119
121
  const { name, attribs } = node;
120
122
  // In a document, a template is inert until something stamps it out, here or elsewhere.
@@ -390,6 +392,350 @@ function mdxAsHtml(mdx) {
390
392
  return out.join('');
391
393
  }
392
394
 
395
+ /** Private-use characters that stand in the text for an expression, one per brace. */
396
+ const HOLE = '\uE000';
397
+ const OPENS_CONDITION = '\uE001';
398
+ const OPENS_LOOP = '\uE002';
399
+ const OPENS_BOTH = '\uE003';
400
+ const CLOSES = '\uE004';
401
+ const MARKS = new Set([HOLE, OPENS_CONDITION, OPENS_LOOP, OPENS_BOTH, CLOSES]);
402
+
403
+ /** Elements HTML never closes, so they do not nest inside an expression either. */
404
+ const VOID = new Set(['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr']);
405
+
406
+ /** Stands for an element in the script of an expression, when that script is judged. */
407
+ const ELEMENT = '\uE005';
408
+
409
+ const ONLY_COMMENTS = /^(\/\*[\s\S]*?\*\/\s*)+$/;
410
+
411
+ /**
412
+ * Whether the script around the elements of an expression can render something
413
+ * else: a branch of `? :`, `||` or `??` that is no element and not nothing.
414
+ */
415
+ function rendersMore(script) {
416
+ const parts = [];
417
+ // The bracket depth of every `?` that waits for its `:`.
418
+ const ternaries = [];
419
+ let depth = 0;
420
+ let glue = false;
421
+ for (const piece of script.replace(/\s/g, '').split(/(\?\?|\|\||\?(?!\.)|:)/)) {
422
+ // A `:` at another depth than the open `?` is a type or a key, `(item: Item) =>`: part of the operand.
423
+ const isType = piece === ':' && ternaries.at(-1) !== depth;
424
+ const part = piece.replace(/[()]/g, '');
425
+ if (isType || glue) parts.push(parts.pop() + part);
426
+ else parts.push(part);
427
+ glue = isType;
428
+ if (piece === '?') ternaries.push(depth);
429
+ else if (piece === ':' && !isType) ternaries.pop();
430
+ else depth += (piece.match(/[([{]/g)?.length ?? 0) - (piece.match(/[)\]}]/g)?.length ?? 0);
431
+ }
432
+ const rendersNothingElse = (part) => part.includes(ELEMENT) || /^(null|undefined|false|''|"")?[}\];,]*$/.test(part);
433
+ for (let at = 1; at < parts.length; at += 2) {
434
+ // What stands left of `||` and `??` is rendered when it is there.
435
+ const leftRenders = parts[at] !== '?' && parts[at] !== ':' && !parts[at - 1].includes(ELEMENT);
436
+ // Before a `?` stands a condition, `a ? <x /> : b ? <y /> : null`, not a branch.
437
+ const isCondition = parts[at + 2] === '?';
438
+ if (leftRenders || (!isCondition && !rendersNothingElse(parts[at + 1]))) return true;
439
+ }
440
+ return false;
441
+ }
442
+
443
+ /** After these a `<` starts an element; after any other word it compares. */
444
+ const BEFORE_ELEMENT = new Set(['return', 'yield', 'await', 'case', 'default', 'else', 'do', 'typeof', 'void', 'in', 'of']);
445
+
446
+ /**
447
+ * Astro as HTML of the same length. The frontmatter goes. An expression in a value
448
+ * reads as bound, a spread or a shorthand as a spread. An expression between the
449
+ * tags keeps the elements it holds and loses its script: a mark where it starts
450
+ * says whether they are behind a condition or in a loop, and one where it ends
451
+ * closes that. An expression without elements leaves one mark, for content nobody
452
+ * can read here.
453
+ */
454
+ function astroAsHtml(source) {
455
+ const out = source.split('');
456
+ const { length } = source;
457
+ const put = (at, text) => {
458
+ for (let i = 0; i < text.length; i += 1) out[at + i] = text[i];
459
+ };
460
+ const clear = (from, to) => {
461
+ for (let i = from; i < to; i += 1) if (out[i] !== '\n') out[i] = ' ';
462
+ };
463
+ const find = (text, from) => {
464
+ const at = source.indexOf(text, from);
465
+ return at === -1 ? length : at;
466
+ };
467
+
468
+ // The same characters in the file itself are no marks.
469
+ for (let i = 0; i < length; i += 1) if (MARKS.has(out[i])) out[i] = ' ';
470
+
471
+ const frontmatter = /^\s*---[ \t]*\r?\n(?:[\s\S]*?\n)?---[ \t]*\r?(?:\n|$)/.exec(source);
472
+ if (frontmatter) clear(0, frontmatter[0].length);
473
+
474
+ /**
475
+ * Whether the `<` here opens an element, going by the script before it: `last` is
476
+ * where that ends, past any comment and whitespace, or -1 at the start.
477
+ */
478
+ function opensElement(at, last) {
479
+ if (!/[a-zA-Z>]/.test(source[at + 1] ?? '')) return false;
480
+ const before = source.slice(Math.max(0, last - 20), last + 1);
481
+ const word = /(?<![\w$.])[a-z]+$/.exec(before)?.[0];
482
+ if (word) return BEFORE_ELEMENT.has(word);
483
+ // After a value, a `<` compares: a name, a call, an index or a string.
484
+ return !/[\w$)\]'"`.]$/.test(before);
485
+ }
486
+
487
+ /** From the `/` of a regex to the one that closes it, on the same line; else nowhere. */
488
+ function endOfRegex(start) {
489
+ let inClass = false;
490
+ for (let at = start + 1; at < length && source[at] !== '\n'; at += 1) {
491
+ if (source[at] === '\\') at += 1;
492
+ else if (source[at] === '[') inClass = true;
493
+ else if (source[at] === ']') inClass = false;
494
+ else if (source[at] === '/' && !inClass) return at;
495
+ }
496
+ return start;
497
+ }
498
+
499
+ /** From a backtick to the one that closes it, past every `${…}`. */
500
+ function endOfTemplate(start) {
501
+ let at = start + 1;
502
+ while (at < length && source[at] !== '`') {
503
+ if (source[at] === '\\') at += 1;
504
+ else if (source.startsWith('${', at)) at = endOfScript(at + 1);
505
+ at += 1;
506
+ }
507
+ return at;
508
+ }
509
+
510
+ /**
511
+ * From a `{` to the `}` that closes it, past strings, comments and nested braces.
512
+ * With `elements`, every element in it is read as markup and listed there.
513
+ */
514
+ function endOfScript(start, elements) {
515
+ let depth = 0;
516
+ let at = start;
517
+ // The last character of script so far: a comment says nothing about what follows it.
518
+ let last = -1;
519
+ while (at < length) {
520
+ const char = source[at];
521
+ const isComment = source.startsWith('/*', at) || source.startsWith('//', at);
522
+ if (char === '"' || char === "'") at = endOfString(source, at);
523
+ else if (char === '`') at = endOfTemplate(at);
524
+ else if (isComment) at = source[at + 1] === '*' ? find('*/', at + 2) + 1 : find('\n', at);
525
+ // After a value a `/` divides; anywhere else it opens a regex, which may hold a quote.
526
+ else if (char === '/' && !/[\w$)\]'"`]/.test(source[last] ?? '')) at = endOfRegex(at);
527
+ else if (char === '{') depth += 1;
528
+ else if (char === '}' && --depth === 0) return at;
529
+ else if (char === '<' && elements && opensElement(at, last)) {
530
+ const end = readMarkup(at, true);
531
+ elements.push([at, end]);
532
+ at = end - 1;
533
+ }
534
+ if (!isComment && /\S/.test(source[at] ?? '') && at > start) last = at;
535
+ at += 1;
536
+ }
537
+ return length - 1;
538
+ }
539
+
540
+ /** An expression as a value, or loose in a tag: a filler without spaces, so it stays one attribute. */
541
+ function fillInTag(start, end, isValue) {
542
+ const size = end - start + 1;
543
+ // Straight before `/>` an unquoted value would swallow the slash.
544
+ const room = isValue && source[end + 1] === '/' ? size - 1 : size;
545
+ clear(start, end + 1);
546
+ // A comment between the attributes sets nothing.
547
+ if (!isValue && ONLY_COMMENTS.test(source.slice(start + 1, end).trim())) return;
548
+ if (!isValue) put(start, size >= 3 ? `:[${'x'.repeat(size - 3)}]` : '');
549
+ else if (room >= 3) put(start, `\${${'x'.repeat(room - 3)}}`);
550
+ else put(start, room === 2 && size === 3 ? '{{' : '""');
551
+ }
552
+
553
+ /** One start tag, from its `<`. Says where it ends and whether its content is raw text. */
554
+ function readTag(start) {
555
+ const name = /^[^\s/>]*/.exec(source.slice(start + 1))[0];
556
+ let at = start + 1 + name.length;
557
+ let raw = /^(script|style)$/i.test(name);
558
+ while (at < length && source[at] !== '>') {
559
+ const char = source[at];
560
+ if (char === '{') {
561
+ const end = endOfScript(at);
562
+ fillInTag(at, end, false);
563
+ at = end + 1;
564
+ continue;
565
+ }
566
+ if (/[\s/]/.test(char)) {
567
+ at += 1;
568
+ continue;
569
+ }
570
+ const written = /^[^\s=/>{]+/.exec(source.slice(at))?.[0] ?? char;
571
+ if (written === 'is:raw') raw = true;
572
+ at += written.length;
573
+ const equals = /^\s*=\s*/.exec(source.slice(at));
574
+ if (!equals) continue;
575
+ at += equals[0].length;
576
+ const first = source[at];
577
+ if (first === '"' || first === "'") at = find(first, at + 1) + 1;
578
+ else if (first === '{' || first === '`') {
579
+ const end = first === '{' ? endOfScript(at) : endOfTemplate(at);
580
+ fillInTag(at, end, true);
581
+ at = end + 1;
582
+ } else at += /^[^\s>]*/.exec(source.slice(at))[0].length;
583
+ }
584
+ return { name, end: at, selfClosing: source[at - 1] === '/', raw };
585
+ }
586
+
587
+ /** What an expression between the tags leaves behind. */
588
+ function fillExpression(start, end, elements) {
589
+ const script = [];
590
+ let from = start;
591
+ // A place in the script, between the braces, where a mark can stand.
592
+ let free = -1;
593
+ for (const [elementStart, elementEnd] of [...elements, [end + 1, end + 1]]) {
594
+ script.push(source.slice(from, elementStart));
595
+ clear(from, elementStart);
596
+ const first = Math.max(from, start + 1);
597
+ if (free === -1 && first < Math.min(elementStart, end)) free = first;
598
+ from = elementEnd;
599
+ }
600
+ if (elements.length > 0) {
601
+ // A string goes first, so a `//` in `'https://…'` is no comment that eats the line.
602
+ const strings = /'(?:\\.|[^'\\\n])+'|"(?:\\.|[^"\\\n])+"|`(?:\\.|[^`\\])+`/g;
603
+ const text = script.map((part) => part.replace(strings, "'x'")).join(ELEMENT).replace(/\/\*[\s\S]*?\*\/|\/\/.*/g, '');
604
+ // Only an element between the braces: it is there, as if written without them.
605
+ if (!/[^\s(){}\uE005]/.test(text)) return;
606
+ const loop = /=>|\bfunction\b/.test(text);
607
+ const condition = /&&|\|\||\?/.test(text) || !loop;
608
+ put(start, loop && condition ? OPENS_BOTH : loop ? OPENS_LOOP : OPENS_CONDITION);
609
+ put(end, CLOSES);
610
+ // `a ? 'tekst' : <x />` and `a || <x />` can render something that is no element.
611
+ if (free !== -1 && rendersMore(text)) put(free, HOLE);
612
+ return;
613
+ }
614
+ const inner = source.slice(start + 1, end).trim();
615
+ const literal = /^(["'])([^"'<&{}\\\n]*)\1$/.exec(inner);
616
+ // A string written out is text, and a comment renders nothing.
617
+ if (literal) put(source.indexOf(literal[2], start), literal[2]);
618
+ else if (inner !== '' && !ONLY_COMMENTS.test(inner)) put(start, HOLE);
619
+ }
620
+
621
+ /**
622
+ * Markup from `at`. Inside an expression it reads one element, or one fragment,
623
+ * and returns where that ends, so the script around it can go on.
624
+ */
625
+ function readMarkup(start, oneElement = false) {
626
+ let at = start;
627
+ let depth = 0;
628
+ while (at < length) {
629
+ if (source.startsWith('<!--', at)) {
630
+ at = Math.min(find('-->', at + 4) + 3, length);
631
+ } else if (source.startsWith('</', at)) {
632
+ const end = find('>', at);
633
+ if (end === at + 2) clear(at, end + 1);
634
+ at = end + 1;
635
+ depth -= 1;
636
+ if (oneElement && depth <= 0) return at;
637
+ } else if (source.startsWith('<>', at)) {
638
+ clear(at, at + 2);
639
+ at += 2;
640
+ depth += 1;
641
+ } else if (source[at] === '<' && /[a-zA-Z]/.test(source[at + 1] ?? '')) {
642
+ const tag = readTag(at);
643
+ at = tag.end + 1;
644
+ const closes = tag.selfClosing || VOID.has(tag.name.toLowerCase());
645
+ if (!closes) depth += 1;
646
+ if (tag.raw && !closes) {
647
+ // Case-insensitive without lowering the source, which can change its length.
648
+ const closer = new RegExp(`</${tag.name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`, 'gi');
649
+ closer.lastIndex = at;
650
+ const end = closer.exec(source)?.index ?? length;
651
+ // What `is:raw` holds is text as it stands, not elements and not expressions.
652
+ if (!/^(script|style)$/i.test(tag.name)) for (let i = at; i < end; i += 1) if (/[<{}]/.test(out[i])) out[i] = ' ';
653
+ at = end;
654
+ }
655
+ if (oneElement && depth <= 0) return at;
656
+ } else if (source[at] === '{') {
657
+ const elements = [];
658
+ const end = endOfScript(at, elements);
659
+ fillExpression(at, end, elements);
660
+ at = end + 1;
661
+ } else at += 1;
662
+ }
663
+ return length;
664
+ }
665
+
666
+ readMarkup(frontmatter ? frontmatter[0].length : 0);
667
+ return out.join('');
668
+ }
669
+
670
+ /** Directives of Astro itself: they tell the compiler something and set no attribute. */
671
+ const ASTRO_DIRECTIVE = /^(client|set|is|define|transition|server|class):/;
672
+
673
+ /**
674
+ * Turns the marks of `astroAsHtml` into what the tree builder already knows: a
675
+ * wrapper with a condition or a loop around the elements of an expression, and a
676
+ * hole for content that is filled in. `set:html` fills an element the same way.
677
+ */
678
+ function liftAstro(children) {
679
+ const out = [];
680
+ const open = [out];
681
+ const hole = (startIndex) => ({ type: 'hole', startIndex });
682
+ for (const node of children) {
683
+ if (node.type === 'text') {
684
+ let from = 0;
685
+ const flush = (to) => {
686
+ if (to > from) open.at(-1).push({ type: 'text', data: node.data.slice(from, to), startIndex: (node.startIndex ?? 0) + from });
687
+ from = to + 1;
688
+ };
689
+ for (let at = 0; at < node.data.length; at += 1) {
690
+ const mark = node.data[at];
691
+ if (!MARKS.has(mark)) continue;
692
+ flush(at);
693
+ const startIndex = (node.startIndex ?? 0) + at;
694
+ if (mark === HOLE) open.at(-1).push(hole(startIndex));
695
+ else if (mark === CLOSES) {
696
+ if (open.length > 1) open.pop();
697
+ } else {
698
+ const attribs = {};
699
+ if (mark !== OPENS_LOOP) attribs['v-if'] = '';
700
+ if (mark !== OPENS_CONDITION) attribs['v-for'] = '';
701
+ const wrapper = { type: 'tag', name: 'Fragment', attribs, children: [], startIndex };
702
+ open.at(-1).push(wrapper);
703
+ open.push(wrapper.children);
704
+ }
705
+ }
706
+ flush(node.data.length);
707
+ continue;
708
+ }
709
+ if (node.type === 'tag') {
710
+ const names = Object.keys(node.attribs);
711
+ const filled = names.some((name) => name === 'set:html' || name === 'set:text');
712
+ // An inert template, and a fragment that is filled in: unknown here. A fragment
713
+ // that names a slot of its component renders nothing itself, so it reads through.
714
+ if (node.name === 'template' || (node.name === 'Fragment' && filled)) {
715
+ open.at(-1).push(hole(node.startIndex ?? 0));
716
+ continue;
717
+ }
718
+ if (names.includes('class:list')) node.attribs.class ??= '${}';
719
+ for (const name of names) if (ASTRO_DIRECTIVE.test(name)) delete node.attribs[name];
720
+ node.children = filled ? [hole(node.startIndex ?? 0)] : liftAstro(node.children);
721
+ }
722
+ open.at(-1).push(node);
723
+ }
724
+ return out;
725
+ }
726
+
727
+ /**
728
+ * An Astro component: frontmatter, then a template that is HTML with expressions.
729
+ * Its root stays open, also for a layout with an `<html>`: the page comes in
730
+ * through a slot.
731
+ */
732
+ export function parseAstro(source) {
733
+ const root = createRoot();
734
+ const document = parseMarkup(astroAsHtml(source), { selfClosing: true, original: source });
735
+ readHtmlChildren(liftAstro(document.children), root, {});
736
+ return [root];
737
+ }
738
+
393
739
  /**
394
740
  * Which text in an element Markdown writes a paragraph around. Raw HTML in Markdown
395
741
  * runs to the first blank line, and what follows is Markdown again. In MDX, an
@@ -880,6 +1226,7 @@ const PARSERS = {
880
1226
  '.jinja': parseHtml,
881
1227
  '.jinja2': parseHtml,
882
1228
  '.vue': parseVue,
1229
+ '.astro': parseAstro,
883
1230
  '.md': parseMarkdown,
884
1231
  '.mdx': parseMarkdown,
885
1232
  '.jsx': parseJsx,
package/lint/linter.js CHANGED
@@ -193,7 +193,7 @@ function createPositions(source) {
193
193
 
194
194
 
195
195
  /** Files where `//` is no comment: in markup it starts a url, and a built page is one line. */
196
- const MARKUP_FILE = /\.(html?|j2|jinja2?|tmpl|gohtml|vue|md)$/;
196
+ const MARKUP_FILE = /\.(html?|j2|jinja2?|tmpl|gohtml|vue|astro|md)$/;
197
197
 
198
198
  /**
199
199
  * A stylesheet a page links to, on disk next to it: relative to the page, or from the
package/lint/main.js CHANGED
@@ -164,6 +164,7 @@ async function runLint(data, paths, options) {
164
164
  const context = {
165
165
  root,
166
166
  files: session.files,
167
+ unread: session.unread,
167
168
  ms: Math.round(performance.now() - started),
168
169
  skipped,
169
170
  loose: looseInBaseline(results, baseline, root, ran),
package/lint/project.js CHANGED
@@ -7,7 +7,14 @@ import { declarations, TOKEN_PREFIX } from './css.js';
7
7
 
8
8
  export const IGNORED_DIRECTORIES = new Set(['node_modules', 'dist', 'build', 'coverage', '.git', '.next', '.nuxt']);
9
9
  /** Markdown is linted on request: documentation is full of deliberately wrong examples. */
10
- export const DEFAULT_EXTENSIONS = ['.html', '.htm', '.j2', '.jinja', '.jinja2', '.tmpl', '.gohtml', '.vue', '.jsx', '.tsx', '.js'];
10
+ export const DEFAULT_EXTENSIONS = ['.html', '.htm', '.j2', '.jinja', '.jinja2', '.tmpl', '.gohtml', '.vue', '.astro', '.jsx', '.tsx', '.js'];
11
+
12
+ /**
13
+ * Templates the linter has no parser for. A scan of a directory still opens them:
14
+ * one with `nldd-*` markup gets `file-not-read`, so a project in such a language
15
+ * does not read as checked and clean.
16
+ */
17
+ export const UNREAD_EXTENSIONS = ['.svelte', '.php', '.twig', '.erb', '.ejs', '.hbs', '.handlebars', '.mustache', '.njk', '.liquid', '.cshtml', '.razor'];
11
18
 
12
19
  /** An app's own stylesheets: read for the tokens they name, and in full when the group pure is on. */
13
20
  export const STYLESHEET_EXTENSIONS = ['.css', '.scss', '.sass', '.less'];
package/lint/session.js CHANGED
@@ -6,11 +6,11 @@
6
6
  * corpus measures the linter consumers run.
7
7
  */
8
8
 
9
- import { readFileSync, writeFileSync } from 'node:fs';
9
+ import { readFileSync, statSync, writeFileSync } from 'node:fs';
10
10
  import { extname, relative, resolve, sep } from 'node:path';
11
11
  import { applyFixes, linesNaming, renameReferences } from './fix.js';
12
12
  import { BUILT_IN_RULES, GROUPS, OPT_IN_GROUPS } from './rule-data.js';
13
- import { DEFAULT_EXTENSIONS, findFiles, IGNORED_DIRECTORIES, isBundle, isRelevant, projectTokens, REFERENCE_EXTENSIONS, STYLESHEET_EXTENSIONS } from './project.js';
13
+ import { DEFAULT_EXTENSIONS, findFiles, IGNORED_DIRECTORIES, isBundle, isRelevant, projectTokens, REFERENCE_EXTENSIONS, STYLESHEET_EXTENSIONS, UNREAD_EXTENSIONS } from './project.js';
14
14
 
15
15
  /** Every name `--select`, `--ignore` and .nldd-lint.json may use: rule ids, aliases and groups. */
16
16
  export function knownKeys(data) {
@@ -46,9 +46,21 @@ async function fixUntilStable(linter, original, filename) {
46
46
  return { source, fixed, renamedTags, findings: (await linter.lintSource(source, filename)).findings };
47
47
  }
48
48
 
49
+ const isUnread = (filename) => UNREAD_EXTENSIONS.includes(extname(filename));
50
+ const hasOurMarkup = (source) => /<nldd-[a-z]/.test(source);
51
+
52
+ /** In a directory a build writes to, such as `dist`: output, not the app's own source. */
53
+ const isBuilt = (file, root) => relative(root, file).split(sep).some((part) => IGNORED_DIRECTORIES.has(part));
54
+
55
+ /**
56
+ * A script a bundler wrote. Its chunks hold the design system's own component
57
+ * styles and markup in strings, which read as an app overriding them. The pages
58
+ * and stylesheets next to it are what a build has to show.
59
+ */
60
+ const isBuiltScript = (file, root) => /\.[cm]?js$/.test(file) && isBuilt(file, root);
61
+
49
62
  /** The tag is gone from the markup; what still names it would break or stop matching. */
50
63
  function fixReferences(renamedTags, paths, root, exclude) {
51
- const isBuilt = (file) => relative(root, file).split(sep).some((part) => IGNORED_DIRECTORIES.has(part));
52
64
  const inMarkup = findFiles(paths, root, exclude);
53
65
  const elsewhere = findFiles(paths, root, exclude, REFERENCE_EXTENSIONS).filter((file) => REFERENCE_EXTENSIONS.includes(extname(file)) && !inMarkup.includes(file));
54
66
  let fixed = 0;
@@ -58,7 +70,7 @@ function fixReferences(renamedTags, paths, root, exclude) {
58
70
  for (const list of [inMarkup, elsewhere]) {
59
71
  for (const filename of list.filter((file) => !/\.min\.[cm]?js$/.test(file))) {
60
72
  const source = readFileSync(filename, 'utf8');
61
- const change = isBuilt(filename) ? { source, fixed: 0 } : renameReferences(source, renamedTags, kindOf(filename));
73
+ const change = isBuilt(filename, root) ? { source, fixed: 0 } : renameReferences(source, renamedTags, kindOf(filename));
62
74
  if (change.fixed > 0 && isUtf8(filename)) {
63
75
  writeFileSync(filename, change.source);
64
76
  fixed += change.fixed;
@@ -80,22 +92,29 @@ function fixReferences(renamedTags, paths, root, exclude) {
80
92
  * @param {{ filename: string, source: string }} [options.input] - one snippet instead of files
81
93
  * @param {boolean} [options.fix] - write the fixes that are certain
82
94
  * @param {(filename: string) => boolean} [options.keep] - read this file even without a component
83
- * @returns {Promise<{ results: object[], files: number, fixed: number, fixedFiles: number,
95
+ * @returns {Promise<{ results: object[], files: number, unread: number, fixed: number, fixedFiles: number,
84
96
  * notUtf8: string[], references?: { fixed: number, files: number, remaining: string[] } }>}
85
97
  */
86
98
  export async function lintProject(data, { root, paths = [], config = {}, severities, input, fix = false, keep = () => false }) {
87
99
  const everything = readsEverything(data, severities);
100
+ // A script named on the command line is read, also in `dist`: only a scan skips it.
101
+ const named = new Set(paths.map((path) => resolve(root, path)).filter((path) => statSync(path, { throwIfNoEntry: false })?.isFile()));
88
102
  const inputs = input
89
103
  ? [{ filename: resolve(root, input.filename), source: input.source }]
90
- : findFiles(paths, root, config.exclude, [...DEFAULT_EXTENSIONS, ...STYLESHEET_EXTENSIONS])
104
+ : findFiles(paths, root, config.exclude, [...DEFAULT_EXTENSIONS, ...STYLESHEET_EXTENSIONS, ...UNREAD_EXTENSIONS])
105
+ .filter((filename) => named.has(resolve(filename)) || !isBuiltScript(filename, root))
91
106
  .map((filename) => ({ filename, source: readFileSync(filename, 'utf8') }))
107
+ // A template the linter cannot read matters only with our markup; the rest is let go.
108
+ .filter(({ filename, source }) => !isUnread(filename) || hasOurMarkup(source))
92
109
  .filter(({ filename, source }) => !isBundle(filename, source));
93
110
 
94
111
  // Most files in an app use no component at all, and those need no parser either.
95
112
  // A stylesheet is still read for the tokens it declares.
96
113
  const isStylesheet = (filename) => STYLESHEET_EXTENSIONS.includes(extname(filename));
97
114
  const relevant = everything ? inputs : inputs.filter((one) => isRelevant(one, { wrappers: config.wrappers, keep }));
98
- const files = everything ? inputs.length : inputs.filter(({ filename }) => !isStylesheet(filename)).length + relevant.filter(({ filename }) => isStylesheet(filename)).length;
115
+ // A file without a parser was opened and not checked, so it does not count as one.
116
+ const checked = inputs.filter(({ filename }) => !isUnread(filename));
117
+ const files = everything ? checked.length : checked.filter(({ filename }) => !isStylesheet(filename)).length + relevant.filter(({ filename }) => isStylesheet(filename)).length;
99
118
 
100
119
  const results = [];
101
120
  const notUtf8 = [];
@@ -123,5 +142,8 @@ export async function lintProject(data, { root, paths = [], config = {}, severit
123
142
  }
124
143
  }
125
144
  const references = renamedTags.size > 0 ? fixReferences(renamedTags, paths, root, config.exclude) : undefined;
126
- return { results, files, fixed, fixedFiles, notUtf8, references };
145
+ // Not in `files`: what has our markup and was not read, so the summary can say so.
146
+ // Counted on the markup, so a suppressed `file-not-read` does not make it read.
147
+ const unread = inputs.filter(({ filename, source }) => isUnread(filename) && hasOurMarkup(source)).length;
148
+ return { results, files, unread, fixed, fixedFiles, notUtf8, references };
127
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nldd/design-system",
3
- "version": "0.26.4",
3
+ "version": "0.27.0",
4
4
  "description": "Designsysteem voor de Nederlandse Digitale Dienst",
5
5
  "type": "module",
6
6
  "main": "dist/components/index.js",
@@ -1,42 +0,0 @@
1
- // src/utilities/scroll-mode-controller.ts
2
- var e = "nldd-single-column-change", t = "nldd-shell, nldd-sheet, nldd-modal-dialog";
3
- function n(e) {
4
- let n = e.closest?.(t);
5
- return n && "registerScrollConsumer" in n ? n : null;
6
- }
7
- function r(e, r) {
8
- let i = e.closest?.(t);
9
- !i || "registerScrollConsumer" in i || customElements.whenDefined(i.localName).then(() => {
10
- if (!e.isConnected) return;
11
- let t = n(e);
12
- t && t === i && r(t);
13
- });
14
- }
15
- var i = class {
16
- constructor(e, t) {
17
- this.mode = "nested", this._raf = 0, this._provider = null, this._adopt = (e) => {
18
- this._provider || (window.removeEventListener("resize", this._onResize), this._provider = e, e.registerScrollConsumer(this));
19
- }, this._onResize = () => {
20
- this._raf || (this._raf = requestAnimationFrame(() => {
21
- this._raf = 0, this.read();
22
- }));
23
- }, this._host = e, this._onChange = t, e.addController(this);
24
- }
25
- hostConnected() {
26
- this._provider = n(this._host), this._provider ? this._provider.registerScrollConsumer(this) : (window.addEventListener("resize", this._onResize, { passive: !0 }), this.read(), r(this._host, this._adopt));
27
- }
28
- hostDisconnected() {
29
- this._provider ? (this._provider.unregisterScrollConsumer(this), this._provider = null) : window.removeEventListener("resize", this._onResize), this._raf && cancelAnimationFrame(this._raf);
30
- }
31
- readScrollMode(e) {
32
- let t = e ?? this._readVar();
33
- t !== this.mode && (this.mode = t, this._host.dataset.scroll = t, this._onChange?.(t));
34
- }
35
- _readVar() {
36
- return getComputedStyle(this._host).getPropertyValue("--context-scroll-mode").trim() === "root" ? "root" : "nested";
37
- }
38
- read() {
39
- this.readScrollMode();
40
- }
41
- };
42
- export { r as i, i as n, n as r, e as t };