@maggioli-design-system/magma 2.9.0 → 2.11.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 (2067) hide show
  1. package/AGENTS.md +10 -7
  2. package/CHANGELOG.md +109 -0
  3. package/README.md +56 -0
  4. package/agents/assets.md +2 -2
  5. package/agents/color.md +7 -5
  6. package/agents/components.md +2 -2
  7. package/agents/conventions.md +1 -1
  8. package/agents/mcp.md +78 -8
  9. package/agents/mistakes.md +42 -0
  10. package/agents/patterns/actions.md +393 -0
  11. package/agents/patterns/app-shell.md +223 -0
  12. package/agents/patterns/choose-items.md +18 -0
  13. package/agents/patterns/concurrent-editing.md +17 -0
  14. package/agents/patterns/confirm-action.md +216 -0
  15. package/agents/patterns/consent-and-legal.md +16 -0
  16. package/agents/patterns/density.md +236 -0
  17. package/agents/patterns/empty-state.md +201 -0
  18. package/agents/patterns/error-recovery.md +237 -0
  19. package/agents/patterns/form-and-validation.md +16 -0
  20. package/agents/patterns/item-list.md +214 -0
  21. package/agents/patterns/labels-and-values.md +184 -0
  22. package/agents/patterns/list-with-filters.md +282 -0
  23. package/agents/patterns/loading.md +221 -0
  24. package/agents/patterns/message-placement.md +304 -0
  25. package/agents/patterns/notification-center.md +18 -0
  26. package/agents/patterns/page-header.md +201 -0
  27. package/agents/patterns/permissions.md +17 -0
  28. package/agents/patterns/previews/actions/banner.dark.webp +0 -0
  29. package/agents/patterns/previews/actions/banner.html +21 -0
  30. package/agents/patterns/previews/actions/banner.light.webp +0 -0
  31. package/agents/patterns/previews/actions/confirm.dark.webp +0 -0
  32. package/agents/patterns/previews/actions/confirm.html +11 -0
  33. package/agents/patterns/previews/actions/confirm.light.webp +0 -0
  34. package/agents/patterns/previews/actions/danger-zone.dark.webp +0 -0
  35. package/agents/patterns/previews/actions/danger-zone.html +22 -0
  36. package/agents/patterns/previews/actions/danger-zone.light.webp +0 -0
  37. package/agents/patterns/previews/actions/destructive-in-menu.dark.webp +0 -0
  38. package/agents/patterns/previews/actions/destructive-in-menu.html +19 -0
  39. package/agents/patterns/previews/actions/destructive-in-menu.light.webp +0 -0
  40. package/agents/patterns/previews/actions/dismiss-message.dark.webp +0 -0
  41. package/agents/patterns/previews/actions/dismiss-message.html +15 -0
  42. package/agents/patterns/previews/actions/dismiss-message.light.webp +0 -0
  43. package/agents/patterns/previews/actions/dismiss.dark.webp +0 -0
  44. package/agents/patterns/previews/actions/dismiss.html +25 -0
  45. package/agents/patterns/previews/actions/dismiss.light.webp +0 -0
  46. package/agents/patterns/previews/actions/more-in-menu.dark.webp +0 -0
  47. package/agents/patterns/previews/actions/more-in-menu.html +21 -0
  48. package/agents/patterns/previews/actions/more-in-menu.light.webp +0 -0
  49. package/agents/patterns/previews/actions/part-primary.dark.webp +0 -0
  50. package/agents/patterns/previews/actions/part-primary.html +28 -0
  51. package/agents/patterns/previews/actions/part-primary.light.webp +0 -0
  52. package/agents/patterns/previews/actions/primary.dark.webp +0 -0
  53. package/agents/patterns/previews/actions/primary.html +20 -0
  54. package/agents/patterns/previews/actions/primary.light.webp +0 -0
  55. package/agents/patterns/previews/actions/remove.dark.webp +0 -0
  56. package/agents/patterns/previews/actions/remove.html +44 -0
  57. package/agents/patterns/previews/actions/remove.light.webp +0 -0
  58. package/agents/patterns/previews/actions/secondary.dark.webp +0 -0
  59. package/agents/patterns/previews/actions/secondary.html +20 -0
  60. package/agents/patterns/previews/actions/secondary.light.webp +0 -0
  61. package/agents/patterns/previews/actions/stacked.dark.webp +0 -0
  62. package/agents/patterns/previews/actions/stacked.html +17 -0
  63. package/agents/patterns/previews/actions/stacked.light.webp +0 -0
  64. package/agents/patterns/previews/actions/toast.dark.webp +0 -0
  65. package/agents/patterns/previews/actions/toast.html +10 -0
  66. package/agents/patterns/previews/actions/toast.light.webp +0 -0
  67. package/agents/patterns/previews/app-shell/back-office.dark.webp +0 -0
  68. package/agents/patterns/previews/app-shell/back-office.html +41 -0
  69. package/agents/patterns/previews/app-shell/back-office.light.webp +0 -0
  70. package/agents/patterns/previews/app-shell/many-sections.dark.webp +0 -0
  71. package/agents/patterns/previews/app-shell/many-sections.html +45 -0
  72. package/agents/patterns/previews/app-shell/many-sections.light.webp +0 -0
  73. package/agents/patterns/previews/app-shell/public-service.dark.webp +0 -0
  74. package/agents/patterns/previews/app-shell/public-service.html +31 -0
  75. package/agents/patterns/previews/app-shell/public-service.light.webp +0 -0
  76. package/agents/patterns/previews/confirm-action/act-then-undo.dark.webp +0 -0
  77. package/agents/patterns/previews/confirm-action/act-then-undo.html +44 -0
  78. package/agents/patterns/previews/confirm-action/act-then-undo.light.webp +0 -0
  79. package/agents/patterns/previews/confirm-action/ask-before-sending.dark.webp +0 -0
  80. package/agents/patterns/previews/confirm-action/ask-before-sending.html +25 -0
  81. package/agents/patterns/previews/confirm-action/ask-before-sending.light.webp +0 -0
  82. package/agents/patterns/previews/confirm-action/ask-first-many.dark.webp +0 -0
  83. package/agents/patterns/previews/confirm-action/ask-first-many.html +11 -0
  84. package/agents/patterns/previews/confirm-action/ask-first-many.light.webp +0 -0
  85. package/agents/patterns/previews/confirm-action/ask-first.dark.webp +0 -0
  86. package/agents/patterns/previews/confirm-action/ask-first.html +14 -0
  87. package/agents/patterns/previews/confirm-action/ask-first.light.webp +0 -0
  88. package/agents/patterns/previews/confirm-action/make-reversible.dark.webp +0 -0
  89. package/agents/patterns/previews/confirm-action/make-reversible.html +54 -0
  90. package/agents/patterns/previews/confirm-action/make-reversible.light.webp +0 -0
  91. package/agents/patterns/previews/confirm-action/send-as-shown.dark.webp +0 -0
  92. package/agents/patterns/previews/confirm-action/send-as-shown.html +57 -0
  93. package/agents/patterns/previews/confirm-action/send-as-shown.light.webp +0 -0
  94. package/agents/patterns/previews/empty-state/add-the-first.dark.webp +0 -0
  95. package/agents/patterns/previews/empty-state/add-the-first.html +19 -0
  96. package/agents/patterns/previews/empty-state/add-the-first.light.webp +0 -0
  97. package/agents/patterns/previews/empty-state/all-done.dark.webp +0 -0
  98. package/agents/patterns/previews/empty-state/all-done.html +15 -0
  99. package/agents/patterns/previews/empty-state/all-done.light.webp +0 -0
  100. package/agents/patterns/previews/empty-state/clear-filters.dark.webp +0 -0
  101. package/agents/patterns/previews/empty-state/clear-filters.html +35 -0
  102. package/agents/patterns/previews/empty-state/clear-filters.light.webp +0 -0
  103. package/agents/patterns/previews/empty-state/filled-by-others.dark.webp +0 -0
  104. package/agents/patterns/previews/empty-state/filled-by-others.html +15 -0
  105. package/agents/patterns/previews/empty-state/filled-by-others.light.webp +0 -0
  106. package/agents/patterns/previews/empty-state/not-found.dark.webp +0 -0
  107. package/agents/patterns/previews/empty-state/not-found.html +38 -0
  108. package/agents/patterns/previews/empty-state/not-found.light.webp +0 -0
  109. package/agents/patterns/previews/empty-state/one-line.dark.webp +0 -0
  110. package/agents/patterns/previews/empty-state/one-line.html +12 -0
  111. package/agents/patterns/previews/empty-state/one-line.light.webp +0 -0
  112. package/agents/patterns/previews/error-recovery/action-another-way.dark.webp +0 -0
  113. package/agents/patterns/previews/error-recovery/action-another-way.html +35 -0
  114. package/agents/patterns/previews/error-recovery/action-another-way.light.webp +0 -0
  115. package/agents/patterns/previews/error-recovery/changed-meanwhile.dark.webp +0 -0
  116. package/agents/patterns/previews/error-recovery/changed-meanwhile.html +26 -0
  117. package/agents/patterns/previews/error-recovery/changed-meanwhile.light.webp +0 -0
  118. package/agents/patterns/previews/error-recovery/check-or-repeat.dark.webp +0 -0
  119. package/agents/patterns/previews/error-recovery/check-or-repeat.html +38 -0
  120. package/agents/patterns/previews/error-recovery/check-or-repeat.light.webp +0 -0
  121. package/agents/patterns/previews/error-recovery/content-another-way.dark.webp +0 -0
  122. package/agents/patterns/previews/error-recovery/content-another-way.html +12 -0
  123. package/agents/patterns/previews/error-recovery/content-another-way.light.webp +0 -0
  124. package/agents/patterns/previews/error-recovery/partial.dark.webp +0 -0
  125. package/agents/patterns/previews/error-recovery/partial.html +29 -0
  126. package/agents/patterns/previews/error-recovery/partial.light.webp +0 -0
  127. package/agents/patterns/previews/error-recovery/retry-action.dark.webp +0 -0
  128. package/agents/patterns/previews/error-recovery/retry-action.html +35 -0
  129. package/agents/patterns/previews/error-recovery/retry-action.light.webp +0 -0
  130. package/agents/patterns/previews/error-recovery/retry-content.dark.webp +0 -0
  131. package/agents/patterns/previews/error-recovery/retry-content.html +40 -0
  132. package/agents/patterns/previews/error-recovery/retry-content.light.webp +0 -0
  133. package/agents/patterns/previews/error-recovery/sign-in-again.dark.webp +0 -0
  134. package/agents/patterns/previews/error-recovery/sign-in-again.html +44 -0
  135. package/agents/patterns/previews/error-recovery/sign-in-again.light.webp +0 -0
  136. package/agents/patterns/previews/item-list/documents-of-a-request.dark.webp +0 -0
  137. package/agents/patterns/previews/item-list/documents-of-a-request.html +12 -0
  138. package/agents/patterns/previews/item-list/documents-of-a-request.light.webp +0 -0
  139. package/agents/patterns/previews/item-list/queue-of-a-desk.dark.webp +0 -0
  140. package/agents/patterns/previews/item-list/queue-of-a-desk.html +109 -0
  141. package/agents/patterns/previews/item-list/queue-of-a-desk.light.webp +0 -0
  142. package/agents/patterns/previews/item-list/requests-of-an-office.dark.webp +0 -0
  143. package/agents/patterns/previews/item-list/requests-of-an-office.html +74 -0
  144. package/agents/patterns/previews/item-list/requests-of-an-office.light.webp +0 -0
  145. package/agents/patterns/previews/item-list/requests-to-assign.dark.webp +0 -0
  146. package/agents/patterns/previews/item-list/requests-to-assign.html +80 -0
  147. package/agents/patterns/previews/item-list/requests-to-assign.light.webp +0 -0
  148. package/agents/patterns/previews/labels-and-values/data-of-a-contact.dark.webp +0 -0
  149. package/agents/patterns/previews/labels-and-values/data-of-a-contact.html +31 -0
  150. package/agents/patterns/previews/labels-and-values/data-of-a-contact.light.webp +0 -0
  151. package/agents/patterns/previews/labels-and-values/payment-before-paying.dark.webp +0 -0
  152. package/agents/patterns/previews/labels-and-values/payment-before-paying.html +21 -0
  153. package/agents/patterns/previews/labels-and-values/payment-before-paying.light.webp +0 -0
  154. package/agents/patterns/previews/labels-and-values/what-is-sent.dark.webp +0 -0
  155. package/agents/patterns/previews/labels-and-values/what-is-sent.html +25 -0
  156. package/agents/patterns/previews/labels-and-values/what-is-sent.light.webp +0 -0
  157. package/agents/patterns/previews/list-with-filters/act-on-many.dark.webp +0 -0
  158. package/agents/patterns/previews/list-with-filters/act-on-many.html +121 -0
  159. package/agents/patterns/previews/list-with-filters/act-on-many.light.webp +0 -0
  160. package/agents/patterns/previews/list-with-filters/find-and-open.dark.webp +0 -0
  161. package/agents/patterns/previews/list-with-filters/find-and-open.html +109 -0
  162. package/agents/patterns/previews/list-with-filters/find-and-open.light.webp +0 -0
  163. package/agents/patterns/previews/list-with-filters/show-new-items.dark.webp +0 -0
  164. package/agents/patterns/previews/list-with-filters/show-new-items.html +132 -0
  165. package/agents/patterns/previews/list-with-filters/show-new-items.light.webp +0 -0
  166. package/agents/patterns/previews/loading/await-and-say.dark.webp +0 -0
  167. package/agents/patterns/previews/loading/await-and-say.html +41 -0
  168. package/agents/patterns/previews/loading/await-and-say.light.webp +0 -0
  169. package/agents/patterns/previews/loading/await-the-control.dark.webp +0 -0
  170. package/agents/patterns/previews/loading/await-the-control.html +28 -0
  171. package/agents/patterns/previews/loading/await-the-control.light.webp +0 -0
  172. package/agents/patterns/previews/loading/first-load.dark.webp +0 -0
  173. package/agents/patterns/previews/loading/first-load.html +10 -0
  174. package/agents/patterns/previews/loading/first-load.light.webp +0 -0
  175. package/agents/patterns/previews/loading/keep-while-reloading.dark.webp +0 -0
  176. package/agents/patterns/previews/loading/keep-while-reloading.html +80 -0
  177. package/agents/patterns/previews/loading/keep-while-reloading.light.webp +0 -0
  178. package/agents/patterns/previews/loading/long-load-measured.dark.webp +0 -0
  179. package/agents/patterns/previews/loading/long-load-measured.html +16 -0
  180. package/agents/patterns/previews/loading/long-load-measured.light.webp +0 -0
  181. package/agents/patterns/previews/loading/long-load.dark.webp +0 -0
  182. package/agents/patterns/previews/loading/long-load.html +12 -0
  183. package/agents/patterns/previews/loading/long-load.light.webp +0 -0
  184. package/agents/patterns/previews/loading/progress-in-place.dark.webp +0 -0
  185. package/agents/patterns/previews/loading/progress-in-place.html +52 -0
  186. package/agents/patterns/previews/loading/progress-in-place.light.webp +0 -0
  187. package/agents/patterns/previews/loading/run-in-background.dark.webp +0 -0
  188. package/agents/patterns/previews/loading/run-in-background.html +24 -0
  189. package/agents/patterns/previews/loading/run-in-background.light.webp +0 -0
  190. package/agents/patterns/previews/message-placement/action-done-elsewhere.dark.webp +0 -0
  191. package/agents/patterns/previews/message-placement/action-done-elsewhere.html +38 -0
  192. package/agents/patterns/previews/message-placement/action-done-elsewhere.light.webp +0 -0
  193. package/agents/patterns/previews/message-placement/action-done-in-page.dark.webp +0 -0
  194. package/agents/patterns/previews/message-placement/action-done-in-page.html +53 -0
  195. package/agents/patterns/previews/message-placement/action-done-in-page.light.webp +0 -0
  196. package/agents/patterns/previews/message-placement/action-done-in-part.dark.webp +0 -0
  197. package/agents/patterns/previews/message-placement/action-done-in-part.html +42 -0
  198. package/agents/patterns/previews/message-placement/action-done-in-part.light.webp +0 -0
  199. package/agents/patterns/previews/message-placement/action-failed-elsewhere.dark.webp +0 -0
  200. package/agents/patterns/previews/message-placement/action-failed-elsewhere.html +40 -0
  201. package/agents/patterns/previews/message-placement/action-failed-elsewhere.light.webp +0 -0
  202. package/agents/patterns/previews/message-placement/action-failed-in-place.dark.webp +0 -0
  203. package/agents/patterns/previews/message-placement/action-failed-in-place.html +31 -0
  204. package/agents/patterns/previews/message-placement/action-failed-in-place.light.webp +0 -0
  205. package/agents/patterns/previews/message-placement/action-later.dark.webp +0 -0
  206. package/agents/patterns/previews/message-placement/action-later.html +24 -0
  207. package/agents/patterns/previews/message-placement/action-later.light.webp +0 -0
  208. package/agents/patterns/previews/message-placement/action-partial-elsewhere.dark.webp +0 -0
  209. package/agents/patterns/previews/message-placement/action-partial-elsewhere.html +33 -0
  210. package/agents/patterns/previews/message-placement/action-partial-elsewhere.light.webp +0 -0
  211. package/agents/patterns/previews/message-placement/action-partial-in-place.dark.webp +0 -0
  212. package/agents/patterns/previews/message-placement/action-partial-in-place.html +51 -0
  213. package/agents/patterns/previews/message-placement/action-partial-in-place.light.webp +0 -0
  214. package/agents/patterns/previews/message-placement/action-taken.dark.webp +0 -0
  215. package/agents/patterns/previews/message-placement/action-taken.html +25 -0
  216. package/agents/patterns/previews/message-placement/action-taken.light.webp +0 -0
  217. package/agents/patterns/previews/message-placement/app-deadline.dark.webp +0 -0
  218. package/agents/patterns/previews/message-placement/app-deadline.html +20 -0
  219. package/agents/patterns/previews/message-placement/app-deadline.light.webp +0 -0
  220. package/agents/patterns/previews/message-placement/app-failed.dark.webp +0 -0
  221. package/agents/patterns/previews/message-placement/app-failed.html +48 -0
  222. package/agents/patterns/previews/message-placement/app-failed.light.webp +0 -0
  223. package/agents/patterns/previews/message-placement/app-info.dark.webp +0 -0
  224. package/agents/patterns/previews/message-placement/app-info.html +39 -0
  225. package/agents/patterns/previews/message-placement/app-info.light.webp +0 -0
  226. package/agents/patterns/previews/message-placement/decision.dark.webp +0 -0
  227. package/agents/patterns/previews/message-placement/decision.html +49 -0
  228. package/agents/patterns/previews/message-placement/decision.light.webp +0 -0
  229. package/agents/patterns/previews/message-placement/field-error.dark.webp +0 -0
  230. package/agents/patterns/previews/message-placement/field-error.html +28 -0
  231. package/agents/patterns/previews/message-placement/field-error.light.webp +0 -0
  232. package/agents/patterns/previews/message-placement/field-hint.dark.webp +0 -0
  233. package/agents/patterns/previews/message-placement/field-hint.html +30 -0
  234. package/agents/patterns/previews/message-placement/field-hint.light.webp +0 -0
  235. package/agents/patterns/previews/message-placement/field-valid.dark.webp +0 -0
  236. package/agents/patterns/previews/message-placement/field-valid.html +11 -0
  237. package/agents/patterns/previews/message-placement/field-valid.light.webp +0 -0
  238. package/agents/patterns/previews/message-placement/region-failed.dark.webp +0 -0
  239. package/agents/patterns/previews/message-placement/region-failed.html +31 -0
  240. package/agents/patterns/previews/message-placement/region-failed.light.webp +0 -0
  241. package/agents/patterns/previews/message-placement/region-info.dark.webp +0 -0
  242. package/agents/patterns/previews/message-placement/region-info.html +16 -0
  243. package/agents/patterns/previews/message-placement/region-info.light.webp +0 -0
  244. package/agents/patterns/previews/page-header/contact-being-edited.dark.webp +0 -0
  245. package/agents/patterns/previews/page-header/contact-being-edited.html +25 -0
  246. package/agents/patterns/previews/page-header/contact-being-edited.light.webp +0 -0
  247. package/agents/patterns/previews/page-header/members-of-a-group.dark.webp +0 -0
  248. package/agents/patterns/previews/page-header/members-of-a-group.html +18 -0
  249. package/agents/patterns/previews/page-header/members-of-a-group.light.webp +0 -0
  250. package/agents/patterns/previews/page-header/own-profile.dark.webp +0 -0
  251. package/agents/patterns/previews/page-header/own-profile.html +17 -0
  252. package/agents/patterns/previews/page-header/own-profile.light.webp +0 -0
  253. package/agents/patterns/previews/page-header/request-from-the-list.dark.webp +0 -0
  254. package/agents/patterns/previews/page-header/request-from-the-list.html +33 -0
  255. package/agents/patterns/previews/page-header/request-from-the-list.light.webp +0 -0
  256. package/agents/patterns/previews/page-header/requests-of-an-office.dark.webp +0 -0
  257. package/agents/patterns/previews/page-header/requests-of-an-office.html +16 -0
  258. package/agents/patterns/previews/page-header/requests-of-an-office.light.webp +0 -0
  259. package/agents/patterns/previews/record-detail/ask-for-words.dark.webp +0 -0
  260. package/agents/patterns/previews/record-detail/ask-for-words.html +72 -0
  261. package/agents/patterns/previews/record-detail/ask-for-words.light.webp +0 -0
  262. package/agents/patterns/previews/record-detail/edit-data.dark.webp +0 -0
  263. package/agents/patterns/previews/record-detail/edit-data.html +104 -0
  264. package/agents/patterns/previews/record-detail/edit-data.light.webp +0 -0
  265. package/agents/patterns/previews/record-detail/read-the-data.dark.webp +0 -0
  266. package/agents/patterns/previews/record-detail/read-the-data.html +80 -0
  267. package/agents/patterns/previews/record-detail/read-the-data.light.webp +0 -0
  268. package/agents/patterns/previews/record-detail/record-changed.dark.webp +0 -0
  269. package/agents/patterns/previews/record-detail/record-changed.html +87 -0
  270. package/agents/patterns/previews/record-detail/record-changed.light.webp +0 -0
  271. package/agents/patterns/previews/record-detail/run-at-once.dark.webp +0 -0
  272. package/agents/patterns/previews/record-detail/run-at-once.html +88 -0
  273. package/agents/patterns/previews/record-detail/run-at-once.light.webp +0 -0
  274. package/agents/patterns/previews/record-detail/work-on-it.dark.webp +0 -0
  275. package/agents/patterns/previews/record-detail/work-on-it.html +106 -0
  276. package/agents/patterns/previews/record-detail/work-on-it.light.webp +0 -0
  277. package/agents/patterns/previews/rhythm/between-containers.dark.webp +0 -0
  278. package/agents/patterns/previews/rhythm/between-containers.html +29 -0
  279. package/agents/patterns/previews/rhythm/between-containers.light.webp +0 -0
  280. package/agents/patterns/previews/rhythm/between-fields.dark.webp +0 -0
  281. package/agents/patterns/previews/rhythm/between-fields.html +14 -0
  282. package/agents/patterns/previews/rhythm/between-fields.light.webp +0 -0
  283. package/agents/patterns/previews/rhythm/between-groups.dark.webp +0 -0
  284. package/agents/patterns/previews/rhythm/between-groups.html +23 -0
  285. package/agents/patterns/previews/rhythm/between-groups.light.webp +0 -0
  286. package/agents/patterns/previews/rhythm/between-sections.dark.webp +0 -0
  287. package/agents/patterns/previews/rhythm/between-sections.html +17 -0
  288. package/agents/patterns/previews/rhythm/between-sections.light.webp +0 -0
  289. package/agents/patterns/previews/rhythm/content-actions.dark.webp +0 -0
  290. package/agents/patterns/previews/rhythm/content-actions.html +14 -0
  291. package/agents/patterns/previews/rhythm/content-actions.light.webp +0 -0
  292. package/agents/patterns/previews/rhythm/inline.dark.webp +0 -0
  293. package/agents/patterns/previews/rhythm/inline.html +12 -0
  294. package/agents/patterns/previews/rhythm/inline.light.webp +0 -0
  295. package/agents/patterns/previews/rhythm/inset.dark.webp +0 -0
  296. package/agents/patterns/previews/rhythm/inset.html +11 -0
  297. package/agents/patterns/previews/rhythm/inset.light.webp +0 -0
  298. package/agents/patterns/previews/rhythm/label-control.dark.webp +0 -0
  299. package/agents/patterns/previews/rhythm/label-control.html +8 -0
  300. package/agents/patterns/previews/rhythm/label-control.light.webp +0 -0
  301. package/agents/patterns/previews/rhythm/title-content.dark.webp +0 -0
  302. package/agents/patterns/previews/rhythm/title-content.html +10 -0
  303. package/agents/patterns/previews/rhythm/title-content.light.webp +0 -0
  304. package/agents/patterns/previews/surfaces/band.dark.webp +0 -0
  305. package/agents/patterns/previews/surfaces/band.html +73 -0
  306. package/agents/patterns/previews/surfaces/band.light.webp +0 -0
  307. package/agents/patterns/previews/surfaces/canvas.dark.webp +0 -0
  308. package/agents/patterns/previews/surfaces/canvas.html +66 -0
  309. package/agents/patterns/previews/surfaces/canvas.light.webp +0 -0
  310. package/agents/patterns/previews/surfaces/card.dark.webp +0 -0
  311. package/agents/patterns/previews/surfaces/card.html +30 -0
  312. package/agents/patterns/previews/surfaces/card.light.webp +0 -0
  313. package/agents/patterns/previews/surfaces/dialog.dark.webp +0 -0
  314. package/agents/patterns/previews/surfaces/dialog.html +28 -0
  315. package/agents/patterns/previews/surfaces/dialog.light.webp +0 -0
  316. package/agents/patterns/previews/surfaces/edit-actions.dark.webp +0 -0
  317. package/agents/patterns/previews/surfaces/edit-actions.html +35 -0
  318. package/agents/patterns/previews/surfaces/edit-actions.light.webp +0 -0
  319. package/agents/patterns/previews/surfaces/section.dark.webp +0 -0
  320. package/agents/patterns/previews/surfaces/section.html +35 -0
  321. package/agents/patterns/previews/surfaces/section.light.webp +0 -0
  322. package/agents/patterns/previews/titles/dialog.dark.webp +0 -0
  323. package/agents/patterns/previews/titles/dialog.html +18 -0
  324. package/agents/patterns/previews/titles/dialog.light.webp +0 -0
  325. package/agents/patterns/previews/titles/group.dark.webp +0 -0
  326. package/agents/patterns/previews/titles/group.html +14 -0
  327. package/agents/patterns/previews/titles/group.light.webp +0 -0
  328. package/agents/patterns/previews/titles/page.dark.webp +0 -0
  329. package/agents/patterns/previews/titles/page.html +25 -0
  330. package/agents/patterns/previews/titles/page.light.webp +0 -0
  331. package/agents/patterns/previews/titles/part.dark.webp +0 -0
  332. package/agents/patterns/previews/titles/part.html +24 -0
  333. package/agents/patterns/previews/titles/part.light.webp +0 -0
  334. package/agents/patterns/previews/titles/section.dark.webp +0 -0
  335. package/agents/patterns/previews/titles/section.html +14 -0
  336. package/agents/patterns/previews/titles/section.light.webp +0 -0
  337. package/agents/patterns/previews/widths/dialog.dark.webp +0 -0
  338. package/agents/patterns/previews/widths/dialog.html +33 -0
  339. package/agents/patterns/previews/widths/dialog.light.webp +0 -0
  340. package/agents/patterns/previews/widths/field.dark.webp +0 -0
  341. package/agents/patterns/previews/widths/field.html +20 -0
  342. package/agents/patterns/previews/widths/field.light.webp +0 -0
  343. package/agents/patterns/previews/widths/form.dark.webp +0 -0
  344. package/agents/patterns/previews/widths/form.html +27 -0
  345. package/agents/patterns/previews/widths/form.light.webp +0 -0
  346. package/agents/patterns/previews/widths/page.dark.webp +0 -0
  347. package/agents/patterns/previews/widths/page.html +49 -0
  348. package/agents/patterns/previews/widths/page.light.webp +0 -0
  349. package/agents/patterns/previews/widths/reading.dark.webp +0 -0
  350. package/agents/patterns/previews/widths/reading.html +15 -0
  351. package/agents/patterns/previews/widths/reading.light.webp +0 -0
  352. package/agents/patterns/record-detail.md +268 -0
  353. package/agents/patterns/rhythm.md +212 -0
  354. package/agents/patterns/surfaces.md +212 -0
  355. package/agents/patterns/titles.md +208 -0
  356. package/agents/patterns/widths.md +202 -0
  357. package/agents/patterns.md +121 -0
  358. package/agents/reporting.md +6 -3
  359. package/agents/theming.md +36 -12
  360. package/agents/typography.md +27 -2
  361. package/agents/variants.md +1 -1
  362. package/dist/cjs/loader.cjs.js +1 -1
  363. package/dist/cjs/magma-components.cjs.js +1 -1
  364. package/dist/cjs/mds-accordion-item.cjs.entry.js +6 -3
  365. package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +5 -2
  366. package/dist/cjs/mds-avatar.cjs.entry.js +1 -1
  367. package/dist/cjs/mds-banner_3.cjs.entry.js +3 -3
  368. package/dist/cjs/mds-book.cjs.entry.js +25 -9
  369. package/dist/cjs/mds-button_3.cjs.entry.js +4 -4
  370. package/dist/cjs/mds-card-content.cjs.entry.js +1 -1
  371. package/dist/cjs/mds-card-footer.cjs.entry.js +2 -2
  372. package/dist/cjs/mds-card-header.cjs.entry.js +2 -2
  373. package/dist/cjs/mds-card-media.cjs.entry.js +1 -1
  374. package/dist/cjs/mds-card.cjs.entry.js +1 -1
  375. package/dist/cjs/mds-details.cjs.entry.js +1 -1
  376. package/dist/cjs/mds-dropdown.cjs.entry.js +3 -3
  377. package/dist/cjs/mds-emoji.cjs.entry.js +40 -11
  378. package/dist/cjs/mds-entity.cjs.entry.js +1 -1
  379. package/dist/cjs/mds-file-preview.cjs.entry.js +2 -2
  380. package/dist/cjs/mds-file.cjs.entry.js +1 -1
  381. package/dist/cjs/mds-filter-item.cjs.entry.js +1 -1
  382. package/dist/cjs/mds-filter.cjs.entry.js +1 -1
  383. package/dist/cjs/mds-header-bar.cjs.entry.js +2 -2
  384. package/dist/cjs/mds-header.cjs.entry.js +2 -2
  385. package/dist/cjs/mds-horizontal-scroll.cjs.entry.js +1 -1
  386. package/dist/cjs/mds-hr.cjs.entry.js +1 -1
  387. package/dist/cjs/mds-input-date-range-preselection.cjs.entry.js +1 -1
  388. package/dist/cjs/mds-input-date-range.cjs.entry.js +1 -1
  389. package/dist/cjs/mds-input-date.cjs.entry.js +3 -3
  390. package/dist/cjs/mds-input-field.cjs.entry.js +8 -2
  391. package/dist/cjs/mds-input-otp.cjs.entry.js +1 -1
  392. package/dist/cjs/mds-input-range.cjs.entry.js +1 -1
  393. package/dist/cjs/mds-input-select.cjs.entry.js +3 -3
  394. package/dist/cjs/mds-input-switch_2.cjs.entry.js +4 -4
  395. package/dist/cjs/mds-input-tip_2.cjs.entry.js +3 -3
  396. package/dist/cjs/mds-input-upload.cjs.entry.js +13 -14
  397. package/dist/cjs/mds-input.cjs.entry.js +3 -3
  398. package/dist/cjs/mds-keyboard-key.cjs.entry.js +1 -1
  399. package/dist/cjs/mds-keyboard.cjs.entry.js +1 -1
  400. package/dist/cjs/mds-kpi-item.cjs.entry.js +2 -2
  401. package/dist/cjs/mds-kpi.cjs.entry.js +1 -1
  402. package/dist/cjs/mds-label.cjs.entry.js +1 -1
  403. package/dist/cjs/mds-link.cjs.entry.js +3 -3
  404. package/dist/cjs/mds-list-item.cjs.entry.js +1 -1
  405. package/dist/cjs/mds-list.cjs.entry.js +1 -1
  406. package/dist/cjs/mds-mention.cjs.entry.js +1 -1
  407. package/dist/cjs/mds-modal.cjs.entry.js +4 -4
  408. package/dist/cjs/mds-note.cjs.entry.js +2 -2
  409. package/dist/cjs/mds-notification.cjs.entry.js +45 -2
  410. package/dist/cjs/mds-paginator-item.cjs.entry.js +2 -2
  411. package/dist/cjs/mds-paginator.cjs.entry.js +2 -2
  412. package/dist/cjs/mds-policy-ai.cjs.entry.js +1 -1
  413. package/dist/cjs/mds-pref-animation.cjs.entry.js +1 -1
  414. package/dist/cjs/mds-pref-consumption.cjs.entry.js +1 -1
  415. package/dist/cjs/mds-pref-contrast.cjs.entry.js +1 -1
  416. package/dist/cjs/mds-pref-language-item.cjs.entry.js +1 -1
  417. package/dist/cjs/mds-pref-language.cjs.entry.js +1 -1
  418. package/dist/cjs/mds-pref-mode.cjs.entry.js +1 -1
  419. package/dist/cjs/mds-pref-theme-item.cjs.entry.js +18 -4
  420. package/dist/cjs/mds-pref-theme.cjs.entry.js +12 -3
  421. package/dist/cjs/mds-pref.cjs.entry.js +1 -1
  422. package/dist/cjs/mds-price-table-features-cell.cjs.entry.js +2 -2
  423. package/dist/cjs/mds-price-table-features-row.cjs.entry.js +2 -2
  424. package/dist/cjs/mds-price-table-features.cjs.entry.js +2 -2
  425. package/dist/cjs/mds-price-table-header.cjs.entry.js +1 -1
  426. package/dist/cjs/mds-price-table-list-item.cjs.entry.js +2 -2
  427. package/dist/cjs/mds-price-table-list.cjs.entry.js +2 -2
  428. package/dist/cjs/mds-price-table.cjs.entry.js +1 -1
  429. package/dist/cjs/mds-progress_2.cjs.entry.js +3 -3
  430. package/dist/cjs/mds-push-notification-item.cjs.entry.js +2 -2
  431. package/dist/cjs/mds-push-notification.cjs.entry.js +2 -2
  432. package/dist/cjs/mds-quote.cjs.entry.js +1 -1
  433. package/dist/cjs/mds-radial-menu-item.cjs.entry.js +1 -1
  434. package/dist/cjs/mds-radial-menu.cjs.entry.js +1 -1
  435. package/dist/cjs/mds-separator.cjs.entry.js +1 -1
  436. package/dist/cjs/mds-status-bar.cjs.entry.js +2 -2
  437. package/dist/cjs/mds-stepper-bar-item.cjs.entry.js +2 -2
  438. package/dist/cjs/mds-stepper-bar.cjs.entry.js +1 -1
  439. package/dist/cjs/mds-tab-bar-item.cjs.entry.js +2 -2
  440. package/dist/cjs/mds-tab-bar.cjs.entry.js +2 -2
  441. package/dist/cjs/mds-tab_2.cjs.entry.js +3 -3
  442. package/dist/cjs/mds-table-body.cjs.entry.js +2 -2
  443. package/dist/cjs/mds-table-footer.cjs.entry.js +2 -2
  444. package/dist/cjs/mds-table-header-cell.cjs.entry.js +2 -2
  445. package/dist/cjs/mds-table-header.cjs.entry.js +2 -2
  446. package/dist/cjs/mds-table-row.cjs.entry.js +3 -3
  447. package/dist/cjs/mds-table.cjs.entry.js +2 -2
  448. package/dist/cjs/mds-text.cjs.entry.js +45 -5
  449. package/dist/cjs/mds-toast-region.cjs.entry.js +1 -1
  450. package/dist/cjs/mds-toast.cjs.entry.js +2 -2
  451. package/dist/cjs/mds-tooltip.cjs.entry.js +2 -2
  452. package/dist/cjs/mds-tree-item.cjs.entry.js +1 -1
  453. package/dist/cjs/mds-tree.cjs.entry.js +2 -2
  454. package/dist/cjs/mds-url-view.cjs.entry.js +2 -2
  455. package/dist/cjs/mds-usage.cjs.entry.js +2 -2
  456. package/dist/cjs/mds-video-wall.cjs.entry.js +1 -1
  457. package/dist/cjs/mds-zero.cjs.entry.js +2 -2
  458. package/dist/collection/components/mds-accordion/AGENTS.md +5 -5
  459. package/dist/collection/components/mds-accordion/documentation.json +4 -4
  460. package/dist/collection/components/mds-accordion/examples.md +148 -0
  461. package/dist/collection/components/mds-accordion/mistakes.md +122 -0
  462. package/dist/collection/components/mds-accordion-item/AGENTS.md +6 -6
  463. package/dist/collection/components/mds-accordion-item/documentation.json +5 -5
  464. package/dist/collection/components/mds-accordion-item/examples.md +154 -0
  465. package/dist/collection/components/mds-accordion-item/mds-accordion-item.js +6 -3
  466. package/dist/collection/components/mds-accordion-item/mistakes.md +137 -0
  467. package/dist/collection/components/mds-accordion-timer/AGENTS.md +4 -4
  468. package/dist/collection/components/mds-accordion-timer/documentation.json +3 -3
  469. package/dist/collection/components/mds-accordion-timer/examples.md +137 -0
  470. package/dist/collection/components/mds-accordion-timer/mistakes.md +135 -0
  471. package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +6 -6
  472. package/dist/collection/components/mds-accordion-timer-item/documentation.json +5 -5
  473. package/dist/collection/components/mds-accordion-timer-item/examples.md +133 -0
  474. package/dist/collection/components/mds-accordion-timer-item/mds-accordion-timer-item.js +6 -3
  475. package/dist/collection/components/mds-accordion-timer-item/mistakes.md +142 -0
  476. package/dist/collection/components/mds-author/AGENTS.md +4 -4
  477. package/dist/collection/components/mds-author/documentation.json +3 -3
  478. package/dist/collection/components/mds-author/examples.md +101 -0
  479. package/dist/collection/components/mds-author/mistakes.md +106 -0
  480. package/dist/collection/components/mds-avatar/AGENTS.md +4 -4
  481. package/dist/collection/components/mds-avatar/documentation.json +3 -3
  482. package/dist/collection/components/mds-avatar/examples.md +118 -0
  483. package/dist/collection/components/mds-avatar/mistakes.md +96 -0
  484. package/dist/collection/components/mds-avatar-stack/AGENTS.md +4 -4
  485. package/dist/collection/components/mds-avatar-stack/documentation.json +3 -3
  486. package/dist/collection/components/mds-avatar-stack/examples.md +122 -0
  487. package/dist/collection/components/mds-avatar-stack/mistakes.md +121 -0
  488. package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +4 -4
  489. package/dist/collection/components/mds-avatar-stack-item/documentation.json +3 -3
  490. package/dist/collection/components/mds-avatar-stack-item/examples.md +104 -0
  491. package/dist/collection/components/mds-avatar-stack-item/mistakes.md +113 -0
  492. package/dist/collection/components/mds-badge/AGENTS.md +4 -4
  493. package/dist/collection/components/mds-badge/documentation.json +3 -3
  494. package/dist/collection/components/mds-badge/examples.md +126 -0
  495. package/dist/collection/components/mds-badge/mistakes.md +103 -0
  496. package/dist/collection/components/mds-banner/AGENTS.md +7 -4
  497. package/dist/collection/components/mds-banner/documentation.json +4 -4
  498. package/dist/collection/components/mds-banner/examples.md +175 -0
  499. package/dist/collection/components/mds-banner/mds-banner.css +19 -0
  500. package/dist/collection/components/mds-banner/mistakes.md +140 -0
  501. package/dist/collection/components/mds-benchmark-bar/AGENTS.md +4 -4
  502. package/dist/collection/components/mds-benchmark-bar/documentation.json +3 -3
  503. package/dist/collection/components/mds-benchmark-bar/examples.md +102 -0
  504. package/dist/collection/components/mds-benchmark-bar/mistakes.md +77 -0
  505. package/dist/collection/components/mds-bibliography/AGENTS.md +4 -4
  506. package/dist/collection/components/mds-bibliography/documentation.json +3 -3
  507. package/dist/collection/components/mds-bibliography/examples.md +140 -0
  508. package/dist/collection/components/mds-bibliography/mistakes.md +128 -0
  509. package/dist/collection/components/mds-book/AGENTS.md +10 -9
  510. package/dist/collection/components/mds-book/documentation.json +13 -9
  511. package/dist/collection/components/mds-book/examples.md +139 -0
  512. package/dist/collection/components/mds-book/mds-book.css +49 -9
  513. package/dist/collection/components/mds-book/mds-book.js +26 -10
  514. package/dist/collection/components/mds-book/meta/dictionary.js +1 -1
  515. package/dist/collection/components/mds-book/mistakes.md +88 -0
  516. package/dist/collection/components/mds-breadcrumb/AGENTS.md +4 -4
  517. package/dist/collection/components/mds-breadcrumb/documentation.json +3 -3
  518. package/dist/collection/components/mds-breadcrumb/examples.md +100 -0
  519. package/dist/collection/components/mds-breadcrumb/mistakes.md +112 -0
  520. package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +4 -4
  521. package/dist/collection/components/mds-breadcrumb-item/documentation.json +3 -3
  522. package/dist/collection/components/mds-breadcrumb-item/examples.md +83 -0
  523. package/dist/collection/components/mds-breadcrumb-item/mistakes.md +109 -0
  524. package/dist/collection/components/mds-button/AGENTS.md +4 -4
  525. package/dist/collection/components/mds-button/documentation.json +3 -3
  526. package/dist/collection/components/mds-button/examples.md +211 -0
  527. package/dist/collection/components/mds-button/mistakes.md +160 -0
  528. package/dist/collection/components/mds-button-dropdown/AGENTS.md +4 -4
  529. package/dist/collection/components/mds-button-dropdown/documentation.json +3 -3
  530. package/dist/collection/components/mds-button-dropdown/examples.md +171 -0
  531. package/dist/collection/components/mds-button-dropdown/mistakes.md +158 -0
  532. package/dist/collection/components/mds-button-group/AGENTS.md +4 -4
  533. package/dist/collection/components/mds-button-group/documentation.json +3 -3
  534. package/dist/collection/components/mds-button-group/examples.md +89 -0
  535. package/dist/collection/components/mds-button-group/mistakes.md +105 -0
  536. package/dist/collection/components/mds-calendar/AGENTS.md +4 -4
  537. package/dist/collection/components/mds-calendar/documentation.json +3 -3
  538. package/dist/collection/components/mds-calendar/examples.md +127 -0
  539. package/dist/collection/components/mds-calendar/mistakes.md +113 -0
  540. package/dist/collection/components/mds-calendar-cell/AGENTS.md +4 -4
  541. package/dist/collection/components/mds-calendar-cell/documentation.json +3 -3
  542. package/dist/collection/components/mds-calendar-cell/examples.md +83 -0
  543. package/dist/collection/components/mds-calendar-cell/mistakes.md +58 -0
  544. package/dist/collection/components/mds-card/AGENTS.md +10 -7
  545. package/dist/collection/components/mds-card/documentation.json +6 -6
  546. package/dist/collection/components/mds-card/examples.md +160 -0
  547. package/dist/collection/components/mds-card/mds-card.css +50 -9
  548. package/dist/collection/components/mds-card/mistakes.md +157 -0
  549. package/dist/collection/components/mds-card-content/AGENTS.md +4 -4
  550. package/dist/collection/components/mds-card-content/documentation.json +3 -3
  551. package/dist/collection/components/mds-card-content/examples.md +90 -0
  552. package/dist/collection/components/mds-card-content/mds-card-content.css +5 -2
  553. package/dist/collection/components/mds-card-content/mistakes.md +109 -0
  554. package/dist/collection/components/mds-card-footer/AGENTS.md +5 -4
  555. package/dist/collection/components/mds-card-footer/documentation.json +4 -4
  556. package/dist/collection/components/mds-card-footer/examples.md +95 -0
  557. package/dist/collection/components/mds-card-footer/mds-card-footer.css +28 -5
  558. package/dist/collection/components/mds-card-footer/mds-card-footer.js +1 -1
  559. package/dist/collection/components/mds-card-footer/mistakes.md +112 -0
  560. package/dist/collection/components/mds-card-header/AGENTS.md +4 -4
  561. package/dist/collection/components/mds-card-header/documentation.json +3 -3
  562. package/dist/collection/components/mds-card-header/examples.md +143 -0
  563. package/dist/collection/components/mds-card-header/mds-card-header.css +4 -2
  564. package/dist/collection/components/mds-card-header/mds-card-header.js +1 -1
  565. package/dist/collection/components/mds-card-header/mistakes.md +114 -0
  566. package/dist/collection/components/mds-card-media/AGENTS.md +4 -4
  567. package/dist/collection/components/mds-card-media/documentation.json +3 -3
  568. package/dist/collection/components/mds-card-media/examples.md +93 -0
  569. package/dist/collection/components/mds-card-media/mds-card-media.js +1 -1
  570. package/dist/collection/components/mds-card-media/mistakes.md +128 -0
  571. package/dist/collection/components/mds-chip/AGENTS.md +4 -4
  572. package/dist/collection/components/mds-chip/documentation.json +3 -3
  573. package/dist/collection/components/mds-chip/examples.md +164 -0
  574. package/dist/collection/components/mds-chip/mds-chip.js +1 -1
  575. package/dist/collection/components/mds-chip/mistakes.md +118 -0
  576. package/dist/collection/components/mds-details/AGENTS.md +4 -4
  577. package/dist/collection/components/mds-details/documentation.json +3 -3
  578. package/dist/collection/components/mds-details/examples.md +136 -0
  579. package/dist/collection/components/mds-details/mds-details.js +1 -1
  580. package/dist/collection/components/mds-details/mistakes.md +124 -0
  581. package/dist/collection/components/mds-dropdown/AGENTS.md +4 -4
  582. package/dist/collection/components/mds-dropdown/documentation.json +3 -3
  583. package/dist/collection/components/mds-dropdown/examples.md +201 -0
  584. package/dist/collection/components/mds-dropdown/mds-dropdown.css +3 -0
  585. package/dist/collection/components/mds-dropdown/mds-dropdown.js +2 -2
  586. package/dist/collection/components/mds-dropdown/mistakes.md +137 -0
  587. package/dist/collection/components/mds-emoji/AGENTS.md +4 -4
  588. package/dist/collection/components/mds-emoji/documentation.json +3 -3
  589. package/dist/collection/components/mds-emoji/examples.md +203 -0
  590. package/dist/collection/components/mds-emoji/mds-emoji.js +1 -1
  591. package/dist/collection/components/mds-emoji/mistakes.md +116 -0
  592. package/dist/collection/components/mds-entity/AGENTS.md +4 -4
  593. package/dist/collection/components/mds-entity/documentation.json +3 -3
  594. package/dist/collection/components/mds-entity/examples.md +132 -0
  595. package/dist/collection/components/mds-entity/mds-entity.js +1 -1
  596. package/dist/collection/components/mds-entity/mistakes.md +119 -0
  597. package/dist/collection/components/mds-file/AGENTS.md +4 -4
  598. package/dist/collection/components/mds-file/documentation.json +3 -3
  599. package/dist/collection/components/mds-file/examples.md +107 -0
  600. package/dist/collection/components/mds-file/mds-file.js +1 -1
  601. package/dist/collection/components/mds-file/mistakes.md +91 -0
  602. package/dist/collection/components/mds-file-preview/AGENTS.md +4 -4
  603. package/dist/collection/components/mds-file-preview/documentation.json +3 -3
  604. package/dist/collection/components/mds-file-preview/examples.md +163 -0
  605. package/dist/collection/components/mds-file-preview/mds-file-preview.js +2 -2
  606. package/dist/collection/components/mds-file-preview/mistakes.md +129 -0
  607. package/dist/collection/components/mds-filter/AGENTS.md +4 -4
  608. package/dist/collection/components/mds-filter/documentation.json +3 -3
  609. package/dist/collection/components/mds-filter/examples.md +156 -0
  610. package/dist/collection/components/mds-filter/mds-filter.js +1 -1
  611. package/dist/collection/components/mds-filter/mistakes.md +140 -0
  612. package/dist/collection/components/mds-filter-item/AGENTS.md +4 -4
  613. package/dist/collection/components/mds-filter-item/documentation.json +3 -3
  614. package/dist/collection/components/mds-filter-item/examples.md +123 -0
  615. package/dist/collection/components/mds-filter-item/mds-filter-item.js +1 -1
  616. package/dist/collection/components/mds-filter-item/mistakes.md +127 -0
  617. package/dist/collection/components/mds-header/AGENTS.md +8 -5
  618. package/dist/collection/components/mds-header/documentation.json +4 -4
  619. package/dist/collection/components/mds-header/examples.md +180 -0
  620. package/dist/collection/components/mds-header/mds-header.css +27 -4
  621. package/dist/collection/components/mds-header/mds-header.js +1 -1
  622. package/dist/collection/components/mds-header/mistakes.md +162 -0
  623. package/dist/collection/components/mds-header-bar/AGENTS.md +5 -4
  624. package/dist/collection/components/mds-header-bar/documentation.json +4 -4
  625. package/dist/collection/components/mds-header-bar/examples.md +153 -0
  626. package/dist/collection/components/mds-header-bar/mds-header-bar.css +9 -4
  627. package/dist/collection/components/mds-header-bar/mds-header-bar.js +1 -1
  628. package/dist/collection/components/mds-header-bar/mistakes.md +117 -0
  629. package/dist/collection/components/mds-help/AGENTS.md +4 -4
  630. package/dist/collection/components/mds-help/documentation.json +3 -3
  631. package/dist/collection/components/mds-help/examples.md +106 -0
  632. package/dist/collection/components/mds-help/mds-help.js +1 -1
  633. package/dist/collection/components/mds-help/mistakes.md +73 -0
  634. package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +4 -4
  635. package/dist/collection/components/mds-horizontal-scroll/documentation.json +3 -3
  636. package/dist/collection/components/mds-horizontal-scroll/examples.md +143 -0
  637. package/dist/collection/components/mds-horizontal-scroll/mds-horizontal-scroll.js +1 -1
  638. package/dist/collection/components/mds-horizontal-scroll/mistakes.md +120 -0
  639. package/dist/collection/components/mds-hr/AGENTS.md +4 -4
  640. package/dist/collection/components/mds-hr/documentation.json +3 -3
  641. package/dist/collection/components/mds-hr/examples.md +88 -0
  642. package/dist/collection/components/mds-hr/mds-hr.js +1 -1
  643. package/dist/collection/components/mds-hr/mistakes.md +84 -0
  644. package/dist/collection/components/mds-icon/AGENTS.md +4 -4
  645. package/dist/collection/components/mds-icon/documentation.json +3 -3
  646. package/dist/collection/components/mds-icon/examples.md +135 -0
  647. package/dist/collection/components/mds-icon/mds-icon.js +1 -1
  648. package/dist/collection/components/mds-icon/mistakes.md +118 -0
  649. package/dist/collection/components/mds-img/AGENTS.md +4 -4
  650. package/dist/collection/components/mds-img/documentation.json +3 -3
  651. package/dist/collection/components/mds-img/examples.md +125 -0
  652. package/dist/collection/components/mds-img/mistakes.md +106 -0
  653. package/dist/collection/components/mds-input/AGENTS.md +5 -4
  654. package/dist/collection/components/mds-input/documentation.json +4 -4
  655. package/dist/collection/components/mds-input/examples.md +265 -0
  656. package/dist/collection/components/mds-input/mds-input.css +4 -1
  657. package/dist/collection/components/mds-input/mds-input.js +2 -2
  658. package/dist/collection/components/mds-input/mistakes.md +128 -0
  659. package/dist/collection/components/mds-input-date/AGENTS.md +4 -4
  660. package/dist/collection/components/mds-input-date/documentation.json +3 -3
  661. package/dist/collection/components/mds-input-date/examples.md +157 -0
  662. package/dist/collection/components/mds-input-date/mds-input-date.css +34 -4
  663. package/dist/collection/components/mds-input-date/mds-input-date.js +2 -2
  664. package/dist/collection/components/mds-input-date/mistakes.md +107 -0
  665. package/dist/collection/components/mds-input-date-range/AGENTS.md +4 -4
  666. package/dist/collection/components/mds-input-date-range/documentation.json +3 -3
  667. package/dist/collection/components/mds-input-date-range/examples.md +121 -0
  668. package/dist/collection/components/mds-input-date-range/mds-input-date-range.css +7 -6
  669. package/dist/collection/components/mds-input-date-range/mistakes.md +168 -0
  670. package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +4 -4
  671. package/dist/collection/components/mds-input-date-range-preselection/documentation.json +3 -3
  672. package/dist/collection/components/mds-input-date-range-preselection/examples.md +91 -0
  673. package/dist/collection/components/mds-input-date-range-preselection/mds-input-date-range-preselection.js +1 -1
  674. package/dist/collection/components/mds-input-date-range-preselection/mistakes.md +152 -0
  675. package/dist/collection/components/mds-input-field/AGENTS.md +6 -4
  676. package/dist/collection/components/mds-input-field/documentation.json +36 -4
  677. package/dist/collection/components/mds-input-field/examples.md +116 -0
  678. package/dist/collection/components/mds-input-field/mds-input-field.css +3 -1
  679. package/dist/collection/components/mds-input-field/mds-input-field.js +27 -1
  680. package/dist/collection/components/mds-input-field/mistakes.md +142 -0
  681. package/dist/collection/components/mds-input-otp/AGENTS.md +4 -4
  682. package/dist/collection/components/mds-input-otp/documentation.json +3 -3
  683. package/dist/collection/components/mds-input-otp/examples.md +107 -0
  684. package/dist/collection/components/mds-input-otp/mds-input-otp.js +1 -1
  685. package/dist/collection/components/mds-input-otp/mistakes.md +105 -0
  686. package/dist/collection/components/mds-input-range/AGENTS.md +4 -4
  687. package/dist/collection/components/mds-input-range/documentation.json +3 -3
  688. package/dist/collection/components/mds-input-range/examples.md +100 -0
  689. package/dist/collection/components/mds-input-range/mds-input-range.js +1 -1
  690. package/dist/collection/components/mds-input-range/mistakes.md +123 -0
  691. package/dist/collection/components/mds-input-select/AGENTS.md +4 -4
  692. package/dist/collection/components/mds-input-select/documentation.json +3 -3
  693. package/dist/collection/components/mds-input-select/examples.md +166 -0
  694. package/dist/collection/components/mds-input-select/mds-input-select.css +4 -1
  695. package/dist/collection/components/mds-input-select/mds-input-select.js +2 -2
  696. package/dist/collection/components/mds-input-select/mistakes.md +126 -0
  697. package/dist/collection/components/mds-input-switch/AGENTS.md +4 -4
  698. package/dist/collection/components/mds-input-switch/documentation.json +3 -3
  699. package/dist/collection/components/mds-input-switch/examples.md +124 -0
  700. package/dist/collection/components/mds-input-switch/mds-input-switch.js +1 -1
  701. package/dist/collection/components/mds-input-switch/mistakes.md +116 -0
  702. package/dist/collection/components/mds-input-tip/AGENTS.md +4 -4
  703. package/dist/collection/components/mds-input-tip/documentation.json +3 -3
  704. package/dist/collection/components/mds-input-tip/examples.md +122 -0
  705. package/dist/collection/components/mds-input-tip/mds-input-tip.js +1 -1
  706. package/dist/collection/components/mds-input-tip/mistakes.md +112 -0
  707. package/dist/collection/components/mds-input-tip-item/AGENTS.md +4 -4
  708. package/dist/collection/components/mds-input-tip-item/documentation.json +3 -3
  709. package/dist/collection/components/mds-input-tip-item/examples.md +106 -0
  710. package/dist/collection/components/mds-input-tip-item/mds-input-tip-item.js +2 -2
  711. package/dist/collection/components/mds-input-tip-item/mistakes.md +98 -0
  712. package/dist/collection/components/mds-input-upload/AGENTS.md +4 -4
  713. package/dist/collection/components/mds-input-upload/documentation.json +3 -3
  714. package/dist/collection/components/mds-input-upload/examples.md +161 -0
  715. package/dist/collection/components/mds-input-upload/mds-input-upload.css +4 -1
  716. package/dist/collection/components/mds-input-upload/mds-input-upload.js +5 -5
  717. package/dist/collection/components/mds-input-upload/mistakes.md +143 -0
  718. package/dist/collection/components/mds-keyboard/AGENTS.md +4 -4
  719. package/dist/collection/components/mds-keyboard/documentation.json +3 -3
  720. package/dist/collection/components/mds-keyboard/examples.md +128 -0
  721. package/dist/collection/components/mds-keyboard/mds-keyboard.js +1 -1
  722. package/dist/collection/components/mds-keyboard/mistakes.md +111 -0
  723. package/dist/collection/components/mds-keyboard-key/AGENTS.md +4 -4
  724. package/dist/collection/components/mds-keyboard-key/documentation.json +3 -3
  725. package/dist/collection/components/mds-keyboard-key/examples.md +87 -0
  726. package/dist/collection/components/mds-keyboard-key/mds-keyboard-key.js +1 -1
  727. package/dist/collection/components/mds-keyboard-key/mistakes.md +116 -0
  728. package/dist/collection/components/mds-kpi/AGENTS.md +4 -4
  729. package/dist/collection/components/mds-kpi/documentation.json +3 -3
  730. package/dist/collection/components/mds-kpi/examples.md +112 -0
  731. package/dist/collection/components/mds-kpi/mds-kpi.js +1 -1
  732. package/dist/collection/components/mds-kpi/mistakes.md +93 -0
  733. package/dist/collection/components/mds-kpi-item/AGENTS.md +4 -4
  734. package/dist/collection/components/mds-kpi-item/documentation.json +3 -3
  735. package/dist/collection/components/mds-kpi-item/examples.md +117 -0
  736. package/dist/collection/components/mds-kpi-item/mds-kpi-item.js +1 -1
  737. package/dist/collection/components/mds-kpi-item/mistakes.md +117 -0
  738. package/dist/collection/components/mds-label/AGENTS.md +4 -4
  739. package/dist/collection/components/mds-label/documentation.json +3 -3
  740. package/dist/collection/components/mds-label/examples.md +109 -0
  741. package/dist/collection/components/mds-label/mistakes.md +92 -0
  742. package/dist/collection/components/mds-link/AGENTS.md +4 -4
  743. package/dist/collection/components/mds-link/documentation.json +3 -3
  744. package/dist/collection/components/mds-link/examples.md +100 -0
  745. package/dist/collection/components/mds-link/mds-link.js +3 -3
  746. package/dist/collection/components/mds-link/mistakes.md +96 -0
  747. package/dist/collection/components/mds-list/AGENTS.md +4 -4
  748. package/dist/collection/components/mds-list/documentation.json +3 -3
  749. package/dist/collection/components/mds-list/examples.md +104 -0
  750. package/dist/collection/components/mds-list/mds-list.js +1 -1
  751. package/dist/collection/components/mds-list/mistakes.md +117 -0
  752. package/dist/collection/components/mds-list-item/AGENTS.md +4 -4
  753. package/dist/collection/components/mds-list-item/documentation.json +3 -3
  754. package/dist/collection/components/mds-list-item/examples.md +112 -0
  755. package/dist/collection/components/mds-list-item/mds-list-item.js +1 -1
  756. package/dist/collection/components/mds-list-item/mistakes.md +118 -0
  757. package/dist/collection/components/mds-mention/AGENTS.md +4 -4
  758. package/dist/collection/components/mds-mention/documentation.json +3 -3
  759. package/dist/collection/components/mds-mention/examples.md +89 -0
  760. package/dist/collection/components/mds-mention/mds-mention.js +1 -1
  761. package/dist/collection/components/mds-mention/mistakes.md +86 -0
  762. package/dist/collection/components/mds-modal/AGENTS.md +5 -4
  763. package/dist/collection/components/mds-modal/documentation.json +4 -4
  764. package/dist/collection/components/mds-modal/examples.md +230 -0
  765. package/dist/collection/components/mds-modal/mds-modal.css +10 -0
  766. package/dist/collection/components/mds-modal/mds-modal.js +3 -3
  767. package/dist/collection/components/mds-modal/mistakes.md +114 -0
  768. package/dist/collection/components/mds-note/AGENTS.md +4 -4
  769. package/dist/collection/components/mds-note/documentation.json +3 -3
  770. package/dist/collection/components/mds-note/examples.md +107 -0
  771. package/dist/collection/components/mds-note/mds-note.js +1 -1
  772. package/dist/collection/components/mds-note/mistakes.md +99 -0
  773. package/dist/collection/components/mds-notification/AGENTS.md +10 -5
  774. package/dist/collection/components/mds-notification/documentation.json +94 -4
  775. package/dist/collection/components/mds-notification/examples.md +115 -0
  776. package/dist/collection/components/mds-notification/mds-notification.css +67 -1
  777. package/dist/collection/components/mds-notification/mds-notification.js +94 -3
  778. package/dist/collection/components/mds-notification/mistakes.md +98 -0
  779. package/dist/collection/components/mds-paginator/AGENTS.md +4 -4
  780. package/dist/collection/components/mds-paginator/documentation.json +3 -3
  781. package/dist/collection/components/mds-paginator/examples.md +98 -0
  782. package/dist/collection/components/mds-paginator/mds-paginator.js +1 -1
  783. package/dist/collection/components/mds-paginator/mistakes.md +96 -0
  784. package/dist/collection/components/mds-paginator-item/AGENTS.md +4 -4
  785. package/dist/collection/components/mds-paginator-item/documentation.json +3 -3
  786. package/dist/collection/components/mds-paginator-item/examples.md +76 -0
  787. package/dist/collection/components/mds-paginator-item/mds-paginator-item.js +1 -1
  788. package/dist/collection/components/mds-paginator-item/mistakes.md +96 -0
  789. package/dist/collection/components/mds-policy-ai/AGENTS.md +4 -4
  790. package/dist/collection/components/mds-policy-ai/documentation.json +3 -3
  791. package/dist/collection/components/mds-policy-ai/examples.md +107 -0
  792. package/dist/collection/components/mds-policy-ai/mds-policy-ai.js +1 -1
  793. package/dist/collection/components/mds-policy-ai/mistakes.md +97 -0
  794. package/dist/collection/components/mds-pref/AGENTS.md +4 -4
  795. package/dist/collection/components/mds-pref/documentation.json +3 -3
  796. package/dist/collection/components/mds-pref/examples.md +93 -0
  797. package/dist/collection/components/mds-pref/mds-pref.js +1 -1
  798. package/dist/collection/components/mds-pref/mistakes.md +85 -0
  799. package/dist/collection/components/mds-pref-animation/AGENTS.md +4 -4
  800. package/dist/collection/components/mds-pref-animation/documentation.json +3 -3
  801. package/dist/collection/components/mds-pref-animation/examples.md +86 -0
  802. package/dist/collection/components/mds-pref-animation/mds-pref-animation.js +1 -1
  803. package/dist/collection/components/mds-pref-animation/mistakes.md +67 -0
  804. package/dist/collection/components/mds-pref-consumption/AGENTS.md +4 -4
  805. package/dist/collection/components/mds-pref-consumption/documentation.json +3 -3
  806. package/dist/collection/components/mds-pref-consumption/examples.md +69 -0
  807. package/dist/collection/components/mds-pref-consumption/mds-pref-consumption.js +1 -1
  808. package/dist/collection/components/mds-pref-consumption/mistakes.md +84 -0
  809. package/dist/collection/components/mds-pref-contrast/AGENTS.md +4 -4
  810. package/dist/collection/components/mds-pref-contrast/documentation.json +3 -3
  811. package/dist/collection/components/mds-pref-contrast/examples.md +82 -0
  812. package/dist/collection/components/mds-pref-contrast/mds-pref-contrast.js +1 -1
  813. package/dist/collection/components/mds-pref-contrast/mistakes.md +71 -0
  814. package/dist/collection/components/mds-pref-language/AGENTS.md +5 -5
  815. package/dist/collection/components/mds-pref-language/documentation.json +4 -4
  816. package/dist/collection/components/mds-pref-language/examples.md +104 -0
  817. package/dist/collection/components/mds-pref-language/mds-pref-language.js +1 -1
  818. package/dist/collection/components/mds-pref-language/mistakes.md +130 -0
  819. package/dist/collection/components/mds-pref-language-item/AGENTS.md +4 -4
  820. package/dist/collection/components/mds-pref-language-item/documentation.json +3 -3
  821. package/dist/collection/components/mds-pref-language-item/examples.md +85 -0
  822. package/dist/collection/components/mds-pref-language-item/mds-pref-language-item.js +1 -1
  823. package/dist/collection/components/mds-pref-language-item/mistakes.md +99 -0
  824. package/dist/collection/components/mds-pref-mode/AGENTS.md +5 -5
  825. package/dist/collection/components/mds-pref-mode/documentation.json +4 -4
  826. package/dist/collection/components/mds-pref-mode/examples.md +92 -0
  827. package/dist/collection/components/mds-pref-mode/mds-pref-mode.js +1 -1
  828. package/dist/collection/components/mds-pref-mode/mistakes.md +103 -0
  829. package/dist/collection/components/mds-pref-theme/AGENTS.md +6 -6
  830. package/dist/collection/components/mds-pref-theme/documentation.json +4 -4
  831. package/dist/collection/components/mds-pref-theme/examples.md +93 -0
  832. package/dist/collection/components/mds-pref-theme/mds-pref-theme.js +12 -3
  833. package/dist/collection/components/mds-pref-theme/mistakes.md +104 -0
  834. package/dist/collection/components/mds-pref-theme-item/AGENTS.md +8 -8
  835. package/dist/collection/components/mds-pref-theme-item/documentation.json +8 -8
  836. package/dist/collection/components/mds-pref-theme-item/examples.md +88 -0
  837. package/dist/collection/components/mds-pref-theme-item/mds-pref-theme-item.css +13 -7
  838. package/dist/collection/components/mds-pref-theme-item/mds-pref-theme-item.js +19 -5
  839. package/dist/collection/components/mds-pref-theme-item/mistakes.md +95 -0
  840. package/dist/collection/components/mds-price-table/AGENTS.md +4 -4
  841. package/dist/collection/components/mds-price-table/documentation.json +3 -3
  842. package/dist/collection/components/mds-price-table/examples.md +182 -0
  843. package/dist/collection/components/mds-price-table/mds-price-table.js +1 -1
  844. package/dist/collection/components/mds-price-table/mistakes.md +131 -0
  845. package/dist/collection/components/mds-price-table-features/AGENTS.md +4 -4
  846. package/dist/collection/components/mds-price-table-features/documentation.json +3 -3
  847. package/dist/collection/components/mds-price-table-features/examples.md +156 -0
  848. package/dist/collection/components/mds-price-table-features/mds-price-table-features.js +1 -1
  849. package/dist/collection/components/mds-price-table-features/mistakes.md +151 -0
  850. package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +4 -4
  851. package/dist/collection/components/mds-price-table-features-cell/documentation.json +3 -3
  852. package/dist/collection/components/mds-price-table-features-cell/examples.md +123 -0
  853. package/dist/collection/components/mds-price-table-features-cell/mds-price-table-features-cell.js +1 -1
  854. package/dist/collection/components/mds-price-table-features-cell/mistakes.md +105 -0
  855. package/dist/collection/components/mds-price-table-features-row/AGENTS.md +4 -4
  856. package/dist/collection/components/mds-price-table-features-row/documentation.json +3 -3
  857. package/dist/collection/components/mds-price-table-features-row/examples.md +123 -0
  858. package/dist/collection/components/mds-price-table-features-row/mds-price-table-features-row.js +1 -1
  859. package/dist/collection/components/mds-price-table-features-row/mistakes.md +135 -0
  860. package/dist/collection/components/mds-price-table-header/AGENTS.md +4 -4
  861. package/dist/collection/components/mds-price-table-header/documentation.json +3 -3
  862. package/dist/collection/components/mds-price-table-header/examples.md +176 -0
  863. package/dist/collection/components/mds-price-table-header/mds-price-table-header.js +1 -1
  864. package/dist/collection/components/mds-price-table-header/mistakes.md +133 -0
  865. package/dist/collection/components/mds-price-table-list/AGENTS.md +4 -4
  866. package/dist/collection/components/mds-price-table-list/documentation.json +3 -3
  867. package/dist/collection/components/mds-price-table-list/examples.md +139 -0
  868. package/dist/collection/components/mds-price-table-list/mds-price-table-list.js +1 -1
  869. package/dist/collection/components/mds-price-table-list/mistakes.md +130 -0
  870. package/dist/collection/components/mds-price-table-list-item/AGENTS.md +4 -4
  871. package/dist/collection/components/mds-price-table-list-item/documentation.json +3 -3
  872. package/dist/collection/components/mds-price-table-list-item/examples.md +108 -0
  873. package/dist/collection/components/mds-price-table-list-item/mds-price-table-list-item.js +1 -1
  874. package/dist/collection/components/mds-price-table-list-item/mistakes.md +86 -0
  875. package/dist/collection/components/mds-progress/AGENTS.md +4 -4
  876. package/dist/collection/components/mds-progress/documentation.json +3 -3
  877. package/dist/collection/components/mds-progress/examples.md +140 -0
  878. package/dist/collection/components/mds-progress/mds-progress.js +1 -1
  879. package/dist/collection/components/mds-progress/mistakes.md +94 -0
  880. package/dist/collection/components/mds-push-notification/AGENTS.md +4 -4
  881. package/dist/collection/components/mds-push-notification/documentation.json +3 -3
  882. package/dist/collection/components/mds-push-notification/examples.md +200 -0
  883. package/dist/collection/components/mds-push-notification/mds-push-notification.js +1 -1
  884. package/dist/collection/components/mds-push-notification/mistakes.md +154 -0
  885. package/dist/collection/components/mds-push-notification-item/AGENTS.md +4 -4
  886. package/dist/collection/components/mds-push-notification-item/documentation.json +3 -3
  887. package/dist/collection/components/mds-push-notification-item/examples.md +198 -0
  888. package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.js +2 -2
  889. package/dist/collection/components/mds-push-notification-item/mistakes.md +129 -0
  890. package/dist/collection/components/mds-quote/AGENTS.md +4 -4
  891. package/dist/collection/components/mds-quote/documentation.json +3 -3
  892. package/dist/collection/components/mds-quote/examples.md +108 -0
  893. package/dist/collection/components/mds-quote/mds-quote.js +1 -1
  894. package/dist/collection/components/mds-quote/mistakes.md +122 -0
  895. package/dist/collection/components/mds-radial-menu/AGENTS.md +4 -4
  896. package/dist/collection/components/mds-radial-menu/documentation.json +3 -3
  897. package/dist/collection/components/mds-radial-menu/examples.md +159 -0
  898. package/dist/collection/components/mds-radial-menu/mds-radial-menu.js +1 -1
  899. package/dist/collection/components/mds-radial-menu/mistakes.md +104 -0
  900. package/dist/collection/components/mds-radial-menu-item/AGENTS.md +4 -4
  901. package/dist/collection/components/mds-radial-menu-item/documentation.json +3 -3
  902. package/dist/collection/components/mds-radial-menu-item/examples.md +96 -0
  903. package/dist/collection/components/mds-radial-menu-item/mds-radial-menu-item.js +1 -1
  904. package/dist/collection/components/mds-radial-menu-item/mistakes.md +108 -0
  905. package/dist/collection/components/mds-radial-progress/AGENTS.md +4 -4
  906. package/dist/collection/components/mds-radial-progress/documentation.json +3 -3
  907. package/dist/collection/components/mds-radial-progress/examples.md +144 -0
  908. package/dist/collection/components/mds-radial-progress/mds-radial-progress.js +1 -1
  909. package/dist/collection/components/mds-radial-progress/mistakes.md +106 -0
  910. package/dist/collection/components/mds-separator/AGENTS.md +4 -4
  911. package/dist/collection/components/mds-separator/documentation.json +3 -3
  912. package/dist/collection/components/mds-separator/examples.md +82 -0
  913. package/dist/collection/components/mds-separator/mds-separator.js +1 -1
  914. package/dist/collection/components/mds-separator/mistakes.md +98 -0
  915. package/dist/collection/components/mds-spinner/AGENTS.md +4 -4
  916. package/dist/collection/components/mds-spinner/documentation.json +3 -3
  917. package/dist/collection/components/mds-spinner/examples.md +105 -0
  918. package/dist/collection/components/mds-spinner/mds-spinner.js +1 -1
  919. package/dist/collection/components/mds-spinner/mistakes.md +93 -0
  920. package/dist/collection/components/mds-status-bar/AGENTS.md +6 -4
  921. package/dist/collection/components/mds-status-bar/documentation.json +4 -4
  922. package/dist/collection/components/mds-status-bar/examples.md +128 -0
  923. package/dist/collection/components/mds-status-bar/mds-status-bar.css +29 -3
  924. package/dist/collection/components/mds-status-bar/mds-status-bar.js +1 -1
  925. package/dist/collection/components/mds-status-bar/mistakes.md +127 -0
  926. package/dist/collection/components/mds-stepper-bar/AGENTS.md +4 -4
  927. package/dist/collection/components/mds-stepper-bar/documentation.json +3 -3
  928. package/dist/collection/components/mds-stepper-bar/examples.md +178 -0
  929. package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.js +1 -1
  930. package/dist/collection/components/mds-stepper-bar/mistakes.md +123 -0
  931. package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +4 -4
  932. package/dist/collection/components/mds-stepper-bar-item/documentation.json +3 -3
  933. package/dist/collection/components/mds-stepper-bar-item/examples.md +200 -0
  934. package/dist/collection/components/mds-stepper-bar-item/mds-stepper-bar-item.js +1 -1
  935. package/dist/collection/components/mds-stepper-bar-item/mistakes.md +115 -0
  936. package/dist/collection/components/mds-tab/AGENTS.md +4 -4
  937. package/dist/collection/components/mds-tab/documentation.json +3 -3
  938. package/dist/collection/components/mds-tab/examples.md +232 -0
  939. package/dist/collection/components/mds-tab/mds-tab.js +2 -2
  940. package/dist/collection/components/mds-tab/mistakes.md +189 -0
  941. package/dist/collection/components/mds-tab-bar/AGENTS.md +4 -4
  942. package/dist/collection/components/mds-tab-bar/documentation.json +3 -3
  943. package/dist/collection/components/mds-tab-bar/examples.md +87 -0
  944. package/dist/collection/components/mds-tab-bar/mds-tab-bar.js +1 -1
  945. package/dist/collection/components/mds-tab-bar/mistakes.md +105 -0
  946. package/dist/collection/components/mds-tab-bar-item/AGENTS.md +4 -4
  947. package/dist/collection/components/mds-tab-bar-item/documentation.json +3 -3
  948. package/dist/collection/components/mds-tab-bar-item/examples.md +108 -0
  949. package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.js +1 -1
  950. package/dist/collection/components/mds-tab-bar-item/mistakes.md +116 -0
  951. package/dist/collection/components/mds-tab-item/AGENTS.md +4 -4
  952. package/dist/collection/components/mds-tab-item/documentation.json +3 -3
  953. package/dist/collection/components/mds-tab-item/examples.md +174 -0
  954. package/dist/collection/components/mds-tab-item/mds-tab-item.js +1 -1
  955. package/dist/collection/components/mds-tab-item/mistakes.md +159 -0
  956. package/dist/collection/components/mds-table/AGENTS.md +4 -4
  957. package/dist/collection/components/mds-table/documentation.json +3 -3
  958. package/dist/collection/components/mds-table/examples.md +317 -0
  959. package/dist/collection/components/mds-table/mds-table.css +3 -0
  960. package/dist/collection/components/mds-table/mds-table.js +1 -1
  961. package/dist/collection/components/mds-table/mistakes.md +169 -0
  962. package/dist/collection/components/mds-table-body/AGENTS.md +4 -4
  963. package/dist/collection/components/mds-table-body/documentation.json +3 -3
  964. package/dist/collection/components/mds-table-body/examples.md +151 -0
  965. package/dist/collection/components/mds-table-body/mds-table-body.js +1 -1
  966. package/dist/collection/components/mds-table-body/mistakes.md +117 -0
  967. package/dist/collection/components/mds-table-cell/AGENTS.md +4 -4
  968. package/dist/collection/components/mds-table-cell/documentation.json +3 -3
  969. package/dist/collection/components/mds-table-cell/examples.md +168 -0
  970. package/dist/collection/components/mds-table-cell/mds-table-cell.js +1 -1
  971. package/dist/collection/components/mds-table-cell/mistakes.md +100 -0
  972. package/dist/collection/components/mds-table-footer/AGENTS.md +4 -4
  973. package/dist/collection/components/mds-table-footer/documentation.json +3 -3
  974. package/dist/collection/components/mds-table-footer/examples.md +115 -0
  975. package/dist/collection/components/mds-table-footer/mds-table-footer.js +1 -1
  976. package/dist/collection/components/mds-table-footer/mistakes.md +114 -0
  977. package/dist/collection/components/mds-table-header/AGENTS.md +4 -4
  978. package/dist/collection/components/mds-table-header/documentation.json +3 -3
  979. package/dist/collection/components/mds-table-header/examples.md +158 -0
  980. package/dist/collection/components/mds-table-header/mds-table-header.js +1 -1
  981. package/dist/collection/components/mds-table-header/mistakes.md +157 -0
  982. package/dist/collection/components/mds-table-header-cell/AGENTS.md +4 -4
  983. package/dist/collection/components/mds-table-header-cell/documentation.json +3 -3
  984. package/dist/collection/components/mds-table-header-cell/examples.md +166 -0
  985. package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.js +1 -1
  986. package/dist/collection/components/mds-table-header-cell/mistakes.md +115 -0
  987. package/dist/collection/components/mds-table-row/AGENTS.md +4 -4
  988. package/dist/collection/components/mds-table-row/documentation.json +3 -3
  989. package/dist/collection/components/mds-table-row/examples.md +166 -0
  990. package/dist/collection/components/mds-table-row/mds-table-row.js +2 -2
  991. package/dist/collection/components/mds-table-row/mistakes.md +141 -0
  992. package/dist/collection/components/mds-text/AGENTS.md +9 -7
  993. package/dist/collection/components/mds-text/documentation.json +33 -13
  994. package/dist/collection/components/mds-text/examples.md +148 -0
  995. package/dist/collection/components/mds-text/mds-text.css +38 -1
  996. package/dist/collection/components/mds-text/mds-text.js +14 -12
  997. package/dist/collection/components/mds-text/meta/dictionary.js +3 -1
  998. package/dist/collection/components/mds-text/meta/variants.js +38 -0
  999. package/dist/collection/components/mds-text/mistakes.md +141 -0
  1000. package/dist/collection/components/mds-toast/AGENTS.md +4 -4
  1001. package/dist/collection/components/mds-toast/documentation.json +3 -3
  1002. package/dist/collection/components/mds-toast/examples.md +174 -0
  1003. package/dist/collection/components/mds-toast/mds-toast.js +1 -1
  1004. package/dist/collection/components/mds-toast/mistakes.md +149 -0
  1005. package/dist/collection/components/mds-toast-region/AGENTS.md +4 -4
  1006. package/dist/collection/components/mds-toast-region/documentation.json +3 -3
  1007. package/dist/collection/components/mds-toast-region/examples.md +90 -0
  1008. package/dist/collection/components/mds-toast-region/mds-toast-region.js +1 -1
  1009. package/dist/collection/components/mds-toast-region/mistakes.md +62 -0
  1010. package/dist/collection/components/mds-tooltip/AGENTS.md +4 -4
  1011. package/dist/collection/components/mds-tooltip/documentation.json +3 -3
  1012. package/dist/collection/components/mds-tooltip/examples.md +135 -0
  1013. package/dist/collection/components/mds-tooltip/mds-tooltip.js +1 -1
  1014. package/dist/collection/components/mds-tooltip/mistakes.md +122 -0
  1015. package/dist/collection/components/mds-tree/AGENTS.md +4 -4
  1016. package/dist/collection/components/mds-tree/documentation.json +3 -3
  1017. package/dist/collection/components/mds-tree/examples.md +196 -0
  1018. package/dist/collection/components/mds-tree/mds-tree.js +1 -1
  1019. package/dist/collection/components/mds-tree/mistakes.md +152 -0
  1020. package/dist/collection/components/mds-tree-item/AGENTS.md +4 -4
  1021. package/dist/collection/components/mds-tree-item/documentation.json +3 -3
  1022. package/dist/collection/components/mds-tree-item/examples.md +197 -0
  1023. package/dist/collection/components/mds-tree-item/mds-tree-item.js +1 -1
  1024. package/dist/collection/components/mds-tree-item/mistakes.md +148 -0
  1025. package/dist/collection/components/mds-url-view/AGENTS.md +4 -4
  1026. package/dist/collection/components/mds-url-view/documentation.json +3 -3
  1027. package/dist/collection/components/mds-url-view/examples.md +105 -0
  1028. package/dist/collection/components/mds-url-view/mds-url-view.js +1 -1
  1029. package/dist/collection/components/mds-url-view/mistakes.md +106 -0
  1030. package/dist/collection/components/mds-usage/AGENTS.md +4 -4
  1031. package/dist/collection/components/mds-usage/documentation.json +3 -3
  1032. package/dist/collection/components/mds-usage/examples.md +131 -0
  1033. package/dist/collection/components/mds-usage/mds-usage.js +1 -1
  1034. package/dist/collection/components/mds-usage/mistakes.md +105 -0
  1035. package/dist/collection/components/mds-video-wall/AGENTS.md +4 -4
  1036. package/dist/collection/components/mds-video-wall/documentation.json +3 -3
  1037. package/dist/collection/components/mds-video-wall/examples.md +99 -0
  1038. package/dist/collection/components/mds-video-wall/mds-video-wall.js +1 -1
  1039. package/dist/collection/components/mds-video-wall/mistakes.md +97 -0
  1040. package/dist/collection/components/mds-zero/AGENTS.md +4 -4
  1041. package/dist/collection/components/mds-zero/documentation.json +3 -3
  1042. package/dist/collection/components/mds-zero/examples.md +118 -0
  1043. package/dist/collection/components/mds-zero/mds-zero.js +1 -1
  1044. package/dist/collection/components/mds-zero/mistakes.md +106 -0
  1045. package/dist/components/index.js +1 -1
  1046. package/dist/components/mds-accordion-item.js +1 -1
  1047. package/dist/components/mds-accordion-timer-item.js +1 -1
  1048. package/dist/components/mds-avatar-stack-item.js +1 -1
  1049. package/dist/components/mds-avatar-stack.js +1 -1
  1050. package/dist/components/mds-avatar.js +1 -1
  1051. package/dist/components/mds-badge.js +1 -1
  1052. package/dist/components/mds-banner.js +1 -1
  1053. package/dist/components/mds-benchmark-bar.js +1 -1
  1054. package/dist/components/mds-bibliography.js +1 -1
  1055. package/dist/components/mds-book.js +1 -1
  1056. package/dist/components/mds-breadcrumb-item.js +1 -1
  1057. package/dist/components/mds-breadcrumb.js +1 -1
  1058. package/dist/components/mds-button-dropdown.js +1 -1
  1059. package/dist/components/mds-button.js +1 -1
  1060. package/dist/components/mds-calendar-cell.js +1 -1
  1061. package/dist/components/mds-calendar.js +1 -1
  1062. package/dist/components/mds-card-content.js +1 -1
  1063. package/dist/components/mds-card-footer.js +1 -1
  1064. package/dist/components/mds-card-header.js +1 -1
  1065. package/dist/components/mds-card-media.js +1 -1
  1066. package/dist/components/mds-card.js +1 -1
  1067. package/dist/components/mds-chip.js +1 -1
  1068. package/dist/components/mds-details.js +1 -1
  1069. package/dist/components/mds-dropdown.js +1 -1
  1070. package/dist/components/mds-emoji.js +4 -4
  1071. package/dist/components/mds-entity.js +1 -1
  1072. package/dist/components/mds-file-preview.js +1 -1
  1073. package/dist/components/mds-file.js +1 -1
  1074. package/dist/components/mds-filter-item.js +1 -1
  1075. package/dist/components/mds-filter.js +1 -1
  1076. package/dist/components/mds-header-bar.js +1 -1
  1077. package/dist/components/mds-header.js +1 -1
  1078. package/dist/components/mds-help.js +1 -1
  1079. package/dist/components/mds-horizontal-scroll.js +1 -1
  1080. package/dist/components/mds-hr.js +1 -1
  1081. package/dist/components/mds-icon.js +1 -1
  1082. package/dist/components/mds-img.js +1 -1
  1083. package/dist/components/mds-input-date-range-preselection.js +1 -1
  1084. package/dist/components/mds-input-date-range.js +1 -1
  1085. package/dist/components/mds-input-date.js +1 -1
  1086. package/dist/components/mds-input-field.js +1 -1
  1087. package/dist/components/mds-input-otp.js +1 -1
  1088. package/dist/components/mds-input-range.js +1 -1
  1089. package/dist/components/mds-input-select.js +1 -1
  1090. package/dist/components/mds-input-switch.js +1 -1
  1091. package/dist/components/mds-input-tip-item.js +1 -1
  1092. package/dist/components/mds-input-tip.js +1 -1
  1093. package/dist/components/mds-input-upload.js +1 -1
  1094. package/dist/components/mds-input.js +1 -1
  1095. package/dist/components/mds-keyboard-key.js +1 -1
  1096. package/dist/components/mds-keyboard.js +1 -1
  1097. package/dist/components/mds-kpi-item.js +1 -1
  1098. package/dist/components/mds-kpi.js +1 -1
  1099. package/dist/components/mds-label.js +1 -1
  1100. package/dist/components/mds-link.js +1 -1
  1101. package/dist/components/mds-list-item.js +1 -1
  1102. package/dist/components/mds-list.js +1 -1
  1103. package/dist/components/mds-mention.js +1 -1
  1104. package/dist/components/mds-modal.js +1 -1
  1105. package/dist/components/mds-note.js +1 -1
  1106. package/dist/components/mds-notification.js +1 -1
  1107. package/dist/components/mds-paginator-item.js +1 -1
  1108. package/dist/components/mds-paginator.js +1 -1
  1109. package/dist/components/mds-policy-ai.js +1 -1
  1110. package/dist/components/mds-pref-animation.js +1 -1
  1111. package/dist/components/mds-pref-consumption.js +1 -1
  1112. package/dist/components/mds-pref-contrast.js +1 -1
  1113. package/dist/components/mds-pref-language-item.js +1 -1
  1114. package/dist/components/mds-pref-language.js +1 -1
  1115. package/dist/components/mds-pref-mode.js +1 -1
  1116. package/dist/components/mds-pref-theme-item.js +1 -1
  1117. package/dist/components/mds-pref-theme.js +1 -1
  1118. package/dist/components/mds-pref.js +1 -1
  1119. package/dist/components/mds-price-table-features-cell.js +1 -1
  1120. package/dist/components/mds-price-table-features-row.js +1 -1
  1121. package/dist/components/mds-price-table-features.js +1 -1
  1122. package/dist/components/mds-price-table-header.js +1 -1
  1123. package/dist/components/mds-price-table-list-item.js +1 -1
  1124. package/dist/components/mds-price-table-list.js +1 -1
  1125. package/dist/components/mds-price-table.js +1 -1
  1126. package/dist/components/mds-progress.js +1 -1
  1127. package/dist/components/mds-push-notification-item.js +1 -1
  1128. package/dist/components/mds-push-notification.js +1 -1
  1129. package/dist/components/mds-quote.js +1 -1
  1130. package/dist/components/mds-radial-menu-item.js +1 -1
  1131. package/dist/components/mds-radial-menu.js +1 -1
  1132. package/dist/components/mds-radial-progress.js +1 -1
  1133. package/dist/components/mds-separator.js +1 -1
  1134. package/dist/components/mds-spinner.js +1 -1
  1135. package/dist/components/mds-status-bar.js +1 -1
  1136. package/dist/components/mds-stepper-bar-item.js +1 -1
  1137. package/dist/components/mds-stepper-bar.js +1 -1
  1138. package/dist/components/mds-tab-bar-item.js +1 -1
  1139. package/dist/components/mds-tab-bar.js +1 -1
  1140. package/dist/components/mds-tab-item.js +1 -1
  1141. package/dist/components/mds-tab.js +1 -1
  1142. package/dist/components/mds-table-body.js +1 -1
  1143. package/dist/components/mds-table-cell.js +1 -1
  1144. package/dist/components/mds-table-footer.js +1 -1
  1145. package/dist/components/mds-table-header-cell.js +1 -1
  1146. package/dist/components/mds-table-header.js +1 -1
  1147. package/dist/components/mds-table-row.js +1 -1
  1148. package/dist/components/mds-table.js +1 -1
  1149. package/dist/components/mds-text.js +1 -1
  1150. package/dist/components/mds-toast-region.js +1 -1
  1151. package/dist/components/mds-toast.js +1 -1
  1152. package/dist/components/mds-tooltip.js +1 -1
  1153. package/dist/components/mds-tree-item.js +1 -1
  1154. package/dist/components/mds-tree.js +1 -1
  1155. package/dist/components/mds-url-view.js +1 -1
  1156. package/dist/components/mds-usage.js +1 -1
  1157. package/dist/components/mds-video-wall.js +1 -1
  1158. package/dist/components/mds-zero.js +1 -1
  1159. package/dist/components/p-4LbHmDXv.js +1 -0
  1160. package/dist/components/p-B6AFku7a.js +1 -0
  1161. package/dist/components/p-BFDRt7-n.js +1 -0
  1162. package/dist/components/p-BaynxVRZ.js +1 -0
  1163. package/dist/components/p-BiW6luA5.js +1 -0
  1164. package/dist/components/p-Br6-kva-.js +1 -0
  1165. package/dist/components/p-BwT0RJip.js +1 -0
  1166. package/dist/components/p-C7rDjrH4.js +1 -0
  1167. package/dist/components/p-CKnbQQUb.js +1 -0
  1168. package/dist/components/p-COUgBzJ4.js +1 -0
  1169. package/dist/components/p-COkn4Vtq.js +1 -0
  1170. package/dist/components/p-CP5Qw9_T.js +1 -0
  1171. package/dist/components/p-C_Pc94vn.js +1 -0
  1172. package/dist/components/p-D8CloC8I.js +1 -0
  1173. package/dist/components/p-DGhzWuCS.js +1 -0
  1174. package/dist/components/p-DJd8f8dz.js +1 -0
  1175. package/dist/components/p-DOdUioZq.js +1 -0
  1176. package/dist/components/p-DW6ie49j.js +1 -0
  1177. package/dist/components/p-D_RIY063.js +1 -0
  1178. package/dist/components/p-DdzJfsw7.js +1 -0
  1179. package/dist/components/p-DhpcFZrc.js +1 -0
  1180. package/dist/components/p-DlglisEn.js +1 -0
  1181. package/dist/components/p-DqdlT4UG.js +1 -0
  1182. package/dist/components/p-DvDB_L_5.js +1 -0
  1183. package/dist/components/p-FsctOap9.js +1 -0
  1184. package/dist/components/p-G7Udw5H5.js +1 -0
  1185. package/dist/components/p-Ic8cYsgt.js +1 -0
  1186. package/dist/components/p-gLo3t_qO.js +8 -0
  1187. package/dist/components/p-ikNX7XDH.js +1 -0
  1188. package/dist/components/p-l0KS6hTQ.js +1 -0
  1189. package/dist/documentation.json +429 -278
  1190. package/dist/esm/loader.js +1 -1
  1191. package/dist/esm/magma-components.js +1 -1
  1192. package/dist/esm/mds-accordion-item.entry.js +6 -3
  1193. package/dist/esm/mds-accordion-timer-item.entry.js +5 -2
  1194. package/dist/esm/mds-avatar.entry.js +1 -1
  1195. package/dist/esm/mds-banner_3.entry.js +3 -3
  1196. package/dist/esm/mds-book.entry.js +25 -9
  1197. package/dist/esm/mds-button_3.entry.js +4 -4
  1198. package/dist/esm/mds-card-content.entry.js +1 -1
  1199. package/dist/esm/mds-card-footer.entry.js +2 -2
  1200. package/dist/esm/mds-card-header.entry.js +2 -2
  1201. package/dist/esm/mds-card-media.entry.js +1 -1
  1202. package/dist/esm/mds-card.entry.js +1 -1
  1203. package/dist/esm/mds-details.entry.js +1 -1
  1204. package/dist/esm/mds-dropdown.entry.js +3 -3
  1205. package/dist/esm/mds-emoji.entry.js +40 -11
  1206. package/dist/esm/mds-entity.entry.js +1 -1
  1207. package/dist/esm/mds-file-preview.entry.js +2 -2
  1208. package/dist/esm/mds-file.entry.js +1 -1
  1209. package/dist/esm/mds-filter-item.entry.js +1 -1
  1210. package/dist/esm/mds-filter.entry.js +1 -1
  1211. package/dist/esm/mds-header-bar.entry.js +2 -2
  1212. package/dist/esm/mds-header.entry.js +2 -2
  1213. package/dist/esm/mds-horizontal-scroll.entry.js +1 -1
  1214. package/dist/esm/mds-hr.entry.js +1 -1
  1215. package/dist/esm/mds-input-date-range-preselection.entry.js +1 -1
  1216. package/dist/esm/mds-input-date-range.entry.js +1 -1
  1217. package/dist/esm/mds-input-date.entry.js +3 -3
  1218. package/dist/esm/mds-input-field.entry.js +8 -2
  1219. package/dist/esm/mds-input-otp.entry.js +1 -1
  1220. package/dist/esm/mds-input-range.entry.js +1 -1
  1221. package/dist/esm/mds-input-select.entry.js +3 -3
  1222. package/dist/esm/mds-input-switch_2.entry.js +4 -4
  1223. package/dist/esm/mds-input-tip_2.entry.js +3 -3
  1224. package/dist/esm/mds-input-upload.entry.js +13 -14
  1225. package/dist/esm/mds-input.entry.js +3 -3
  1226. package/dist/esm/mds-keyboard-key.entry.js +1 -1
  1227. package/dist/esm/mds-keyboard.entry.js +1 -1
  1228. package/dist/esm/mds-kpi-item.entry.js +2 -2
  1229. package/dist/esm/mds-kpi.entry.js +1 -1
  1230. package/dist/esm/mds-label.entry.js +1 -1
  1231. package/dist/esm/mds-link.entry.js +3 -3
  1232. package/dist/esm/mds-list-item.entry.js +1 -1
  1233. package/dist/esm/mds-list.entry.js +1 -1
  1234. package/dist/esm/mds-mention.entry.js +1 -1
  1235. package/dist/esm/mds-modal.entry.js +4 -4
  1236. package/dist/esm/mds-note.entry.js +2 -2
  1237. package/dist/esm/mds-notification.entry.js +46 -3
  1238. package/dist/esm/mds-paginator-item.entry.js +2 -2
  1239. package/dist/esm/mds-paginator.entry.js +2 -2
  1240. package/dist/esm/mds-policy-ai.entry.js +1 -1
  1241. package/dist/esm/mds-pref-animation.entry.js +1 -1
  1242. package/dist/esm/mds-pref-consumption.entry.js +1 -1
  1243. package/dist/esm/mds-pref-contrast.entry.js +1 -1
  1244. package/dist/esm/mds-pref-language-item.entry.js +1 -1
  1245. package/dist/esm/mds-pref-language.entry.js +1 -1
  1246. package/dist/esm/mds-pref-mode.entry.js +1 -1
  1247. package/dist/esm/mds-pref-theme-item.entry.js +18 -4
  1248. package/dist/esm/mds-pref-theme.entry.js +12 -3
  1249. package/dist/esm/mds-pref.entry.js +1 -1
  1250. package/dist/esm/mds-price-table-features-cell.entry.js +2 -2
  1251. package/dist/esm/mds-price-table-features-row.entry.js +2 -2
  1252. package/dist/esm/mds-price-table-features.entry.js +2 -2
  1253. package/dist/esm/mds-price-table-header.entry.js +1 -1
  1254. package/dist/esm/mds-price-table-list-item.entry.js +2 -2
  1255. package/dist/esm/mds-price-table-list.entry.js +2 -2
  1256. package/dist/esm/mds-price-table.entry.js +1 -1
  1257. package/dist/esm/mds-progress_2.entry.js +3 -3
  1258. package/dist/esm/mds-push-notification-item.entry.js +2 -2
  1259. package/dist/esm/mds-push-notification.entry.js +2 -2
  1260. package/dist/esm/mds-quote.entry.js +1 -1
  1261. package/dist/esm/mds-radial-menu-item.entry.js +1 -1
  1262. package/dist/esm/mds-radial-menu.entry.js +1 -1
  1263. package/dist/esm/mds-separator.entry.js +1 -1
  1264. package/dist/esm/mds-status-bar.entry.js +2 -2
  1265. package/dist/esm/mds-stepper-bar-item.entry.js +2 -2
  1266. package/dist/esm/mds-stepper-bar.entry.js +1 -1
  1267. package/dist/esm/mds-tab-bar-item.entry.js +2 -2
  1268. package/dist/esm/mds-tab-bar.entry.js +2 -2
  1269. package/dist/esm/mds-tab_2.entry.js +3 -3
  1270. package/dist/esm/mds-table-body.entry.js +2 -2
  1271. package/dist/esm/mds-table-footer.entry.js +2 -2
  1272. package/dist/esm/mds-table-header-cell.entry.js +2 -2
  1273. package/dist/esm/mds-table-header.entry.js +2 -2
  1274. package/dist/esm/mds-table-row.entry.js +3 -3
  1275. package/dist/esm/mds-table.entry.js +2 -2
  1276. package/dist/esm/mds-text.entry.js +45 -5
  1277. package/dist/esm/mds-toast-region.entry.js +1 -1
  1278. package/dist/esm/mds-toast.entry.js +2 -2
  1279. package/dist/esm/mds-tooltip.entry.js +2 -2
  1280. package/dist/esm/mds-tree-item.entry.js +1 -1
  1281. package/dist/esm/mds-tree.entry.js +2 -2
  1282. package/dist/esm/mds-url-view.entry.js +2 -2
  1283. package/dist/esm/mds-usage.entry.js +2 -2
  1284. package/dist/esm/mds-video-wall.entry.js +1 -1
  1285. package/dist/esm/mds-zero.entry.js +2 -2
  1286. package/dist/esm-es5/loader.js +1 -1
  1287. package/dist/esm-es5/magma-components.js +1 -1
  1288. package/dist/esm-es5/mds-accordion-item.entry.js +6 -3
  1289. package/dist/esm-es5/mds-accordion-timer-item.entry.js +5 -2
  1290. package/dist/esm-es5/mds-avatar.entry.js +1 -1
  1291. package/dist/esm-es5/mds-banner_3.entry.js +3 -3
  1292. package/dist/esm-es5/mds-book.entry.js +49 -44
  1293. package/dist/esm-es5/mds-button_3.entry.js +3 -3
  1294. package/dist/esm-es5/mds-card-content.entry.js +1 -1
  1295. package/dist/esm-es5/mds-card-footer.entry.js +1 -1
  1296. package/dist/esm-es5/mds-card-header.entry.js +1 -1
  1297. package/dist/esm-es5/mds-card-media.entry.js +1 -1
  1298. package/dist/esm-es5/mds-card.entry.js +3 -3
  1299. package/dist/esm-es5/mds-details.entry.js +1 -1
  1300. package/dist/esm-es5/mds-dropdown.entry.js +2 -2
  1301. package/dist/esm-es5/mds-emoji.entry.js +110 -108
  1302. package/dist/esm-es5/mds-entity.entry.js +1 -1
  1303. package/dist/esm-es5/mds-file-preview.entry.js +1 -1
  1304. package/dist/esm-es5/mds-file.entry.js +1 -1
  1305. package/dist/esm-es5/mds-filter-item.entry.js +1 -1
  1306. package/dist/esm-es5/mds-filter.entry.js +1 -1
  1307. package/dist/esm-es5/mds-header-bar.entry.js +2 -2
  1308. package/dist/esm-es5/mds-header.entry.js +3 -3
  1309. package/dist/esm-es5/mds-horizontal-scroll.entry.js +1 -1
  1310. package/dist/esm-es5/mds-hr.entry.js +1 -1
  1311. package/dist/esm-es5/mds-input-date-range-preselection.entry.js +1 -1
  1312. package/dist/esm-es5/mds-input-date-range.entry.js +15 -15
  1313. package/dist/esm-es5/mds-input-date.entry.js +3 -3
  1314. package/dist/esm-es5/mds-input-field.entry.js +7 -2
  1315. package/dist/esm-es5/mds-input-otp.entry.js +1 -1
  1316. package/dist/esm-es5/mds-input-range.entry.js +1 -1
  1317. package/dist/esm-es5/mds-input-select.entry.js +2 -2
  1318. package/dist/esm-es5/mds-input-switch_2.entry.js +2 -2
  1319. package/dist/esm-es5/mds-input-tip_2.entry.js +2 -2
  1320. package/dist/esm-es5/mds-input-upload.entry.js +2 -2
  1321. package/dist/esm-es5/mds-input.entry.js +2 -2
  1322. package/dist/esm-es5/mds-keyboard-key.entry.js +1 -1
  1323. package/dist/esm-es5/mds-keyboard.entry.js +1 -1
  1324. package/dist/esm-es5/mds-kpi-item.entry.js +3 -3
  1325. package/dist/esm-es5/mds-kpi.entry.js +1 -1
  1326. package/dist/esm-es5/mds-label.entry.js +1 -1
  1327. package/dist/esm-es5/mds-link.entry.js +1 -1
  1328. package/dist/esm-es5/mds-list-item.entry.js +1 -1
  1329. package/dist/esm-es5/mds-list.entry.js +1 -1
  1330. package/dist/esm-es5/mds-mention.entry.js +2 -2
  1331. package/dist/esm-es5/mds-modal.entry.js +15 -15
  1332. package/dist/esm-es5/mds-note.entry.js +2 -2
  1333. package/dist/esm-es5/mds-notification.entry.js +32 -6
  1334. package/dist/esm-es5/mds-paginator-item.entry.js +2 -2
  1335. package/dist/esm-es5/mds-paginator.entry.js +3 -3
  1336. package/dist/esm-es5/mds-policy-ai.entry.js +1 -1
  1337. package/dist/esm-es5/mds-pref-animation.entry.js +1 -1
  1338. package/dist/esm-es5/mds-pref-consumption.entry.js +1 -1
  1339. package/dist/esm-es5/mds-pref-contrast.entry.js +2 -2
  1340. package/dist/esm-es5/mds-pref-language-item.entry.js +1 -1
  1341. package/dist/esm-es5/mds-pref-language.entry.js +1 -1
  1342. package/dist/esm-es5/mds-pref-mode.entry.js +1 -1
  1343. package/dist/esm-es5/mds-pref-theme-item.entry.js +12 -5
  1344. package/dist/esm-es5/mds-pref-theme.entry.js +13 -8
  1345. package/dist/esm-es5/mds-pref.entry.js +1 -1
  1346. package/dist/esm-es5/mds-price-table-features-cell.entry.js +2 -2
  1347. package/dist/esm-es5/mds-price-table-features-row.entry.js +1 -1
  1348. package/dist/esm-es5/mds-price-table-features.entry.js +1 -1
  1349. package/dist/esm-es5/mds-price-table-header.entry.js +1 -1
  1350. package/dist/esm-es5/mds-price-table-list-item.entry.js +2 -2
  1351. package/dist/esm-es5/mds-price-table-list.entry.js +2 -2
  1352. package/dist/esm-es5/mds-price-table.entry.js +1 -1
  1353. package/dist/esm-es5/mds-progress_2.entry.js +3 -3
  1354. package/dist/esm-es5/mds-push-notification-item.entry.js +2 -2
  1355. package/dist/esm-es5/mds-push-notification.entry.js +2 -2
  1356. package/dist/esm-es5/mds-quote.entry.js +1 -1
  1357. package/dist/esm-es5/mds-radial-menu-item.entry.js +1 -1
  1358. package/dist/esm-es5/mds-radial-menu.entry.js +1 -1
  1359. package/dist/esm-es5/mds-separator.entry.js +1 -1
  1360. package/dist/esm-es5/mds-status-bar.entry.js +2 -2
  1361. package/dist/esm-es5/mds-stepper-bar-item.entry.js +2 -2
  1362. package/dist/esm-es5/mds-stepper-bar.entry.js +1 -1
  1363. package/dist/esm-es5/mds-tab-bar-item.entry.js +2 -2
  1364. package/dist/esm-es5/mds-tab-bar.entry.js +2 -2
  1365. package/dist/esm-es5/mds-tab_2.entry.js +2 -2
  1366. package/dist/esm-es5/mds-table-body.entry.js +1 -1
  1367. package/dist/esm-es5/mds-table-footer.entry.js +2 -2
  1368. package/dist/esm-es5/mds-table-header-cell.entry.js +2 -2
  1369. package/dist/esm-es5/mds-table-header.entry.js +4 -4
  1370. package/dist/esm-es5/mds-table-row.entry.js +2 -2
  1371. package/dist/esm-es5/mds-table.entry.js +2 -2
  1372. package/dist/esm-es5/mds-text.entry.js +12 -6
  1373. package/dist/esm-es5/mds-toast-region.entry.js +2 -2
  1374. package/dist/esm-es5/mds-toast.entry.js +2 -2
  1375. package/dist/esm-es5/mds-tooltip.entry.js +2 -2
  1376. package/dist/esm-es5/mds-tree-item.entry.js +1 -1
  1377. package/dist/esm-es5/mds-tree.entry.js +2 -2
  1378. package/dist/esm-es5/mds-url-view.entry.js +2 -2
  1379. package/dist/esm-es5/mds-usage.entry.js +2 -2
  1380. package/dist/esm-es5/mds-video-wall.entry.js +1 -1
  1381. package/dist/esm-es5/mds-zero.entry.js +1 -1
  1382. package/dist/hydrate/index.js +368 -202
  1383. package/dist/hydrate/index.mjs +368 -202
  1384. package/dist/lint/core/data.d.ts +23 -0
  1385. package/dist/lint/core/data.js +57 -0
  1386. package/dist/lint/core/patterns.d.ts +497 -0
  1387. package/dist/lint/core/patterns.js +1711 -0
  1388. package/dist/lint/index.d.ts +1 -0
  1389. package/dist/lint/index.js +1 -0
  1390. package/dist/lint/mcp/checks.d.ts +17 -3
  1391. package/dist/lint/mcp/checks.js +62 -12
  1392. package/dist/lint/mcp/cli.js +6 -3
  1393. package/dist/lint/mcp/components.js +11 -4
  1394. package/dist/lint/mcp/context.d.ts +11 -2
  1395. package/dist/lint/mcp/context.js +17 -3
  1396. package/dist/lint/mcp/guides.js +58 -7
  1397. package/dist/lint/mcp/icons.d.ts +6 -0
  1398. package/dist/lint/mcp/icons.js +4 -4
  1399. package/dist/lint/mcp/patterns.d.ts +75 -0
  1400. package/dist/lint/mcp/patterns.js +347 -0
  1401. package/dist/lint/mcp/protocol.d.ts +19 -1
  1402. package/dist/lint/mcp/protocol.js +16 -3
  1403. package/dist/lint/mcp/render-page.d.ts +40 -0
  1404. package/dist/lint/mcp/render-page.js +360 -0
  1405. package/dist/lint/mcp/render.d.ts +130 -0
  1406. package/dist/lint/mcp/render.js +693 -0
  1407. package/dist/lint/mcp/server.d.ts +2 -0
  1408. package/dist/lint/mcp/server.js +9 -2
  1409. package/dist/lint/mcp/tools.json +418 -6
  1410. package/dist/magma-components/magma-components.esm.js +1 -1
  1411. package/dist/magma-components/p-0384db44.system.entry.js +26 -0
  1412. package/dist/magma-components/p-03fb86a6.system.entry.js +7 -0
  1413. package/dist/magma-components/p-05455645.system.entry.js +6 -0
  1414. package/dist/magma-components/p-06691ab3.system.entry.js +27 -0
  1415. package/dist/magma-components/p-074d7b75.entry.js +1 -0
  1416. package/dist/magma-components/p-08da465d.entry.js +1 -0
  1417. package/dist/magma-components/p-0a0dfdf4.system.entry.js +4 -0
  1418. package/dist/magma-components/p-0c8f22dc.system.entry.js +5 -0
  1419. package/dist/magma-components/p-0d3da482.system.entry.js +1 -0
  1420. package/dist/magma-components/p-0d42ac4a.entry.js +1 -0
  1421. package/dist/magma-components/p-0fc41e34.system.entry.js +1 -0
  1422. package/dist/magma-components/p-10d52280.entry.js +1 -0
  1423. package/dist/magma-components/p-11210b60.system.entry.js +24 -0
  1424. package/dist/magma-components/p-12be0f43.system.entry.js +91 -0
  1425. package/dist/magma-components/p-13cfc01a.entry.js +1 -0
  1426. package/dist/magma-components/p-14122f2d.entry.js +1 -0
  1427. package/dist/magma-components/p-1467ded5.system.entry.js +7 -0
  1428. package/dist/magma-components/p-18244fd7.system.entry.js +35 -0
  1429. package/dist/magma-components/p-18b27217.entry.js +1 -0
  1430. package/dist/magma-components/p-1a20f239.system.entry.js +1 -0
  1431. package/dist/magma-components/p-1f746ad1.system.entry.js +82 -0
  1432. package/dist/magma-components/p-2111aa67.system.entry.js +1 -0
  1433. package/dist/magma-components/p-21345ecc.entry.js +1 -0
  1434. package/dist/magma-components/p-25dcbf22.entry.js +1 -0
  1435. package/dist/magma-components/p-27254fbd.entry.js +1 -0
  1436. package/dist/magma-components/p-299dab17.entry.js +1 -0
  1437. package/dist/magma-components/p-29dd6d94.entry.js +1 -0
  1438. package/dist/magma-components/p-2a445b98.system.entry.js +977 -0
  1439. package/dist/magma-components/p-2d199db0.system.entry.js +25 -0
  1440. package/dist/magma-components/p-2d2cdf0d.entry.js +1 -0
  1441. package/dist/magma-components/p-2e68180d.system.entry.js +32 -0
  1442. package/dist/magma-components/p-308a4ae5.system.entry.js +1 -0
  1443. package/dist/magma-components/p-30f95d10.entry.js +1 -0
  1444. package/dist/magma-components/p-34421ef2.system.entry.js +77 -0
  1445. package/dist/magma-components/p-35c170ba.system.entry.js +17 -0
  1446. package/dist/magma-components/p-37881115.system.entry.js +14 -0
  1447. package/dist/magma-components/p-384d93dc.system.entry.js +1 -0
  1448. package/dist/magma-components/p-387fa36d.system.entry.js +1 -0
  1449. package/dist/magma-components/p-3af8a86a.system.entry.js +111 -0
  1450. package/dist/magma-components/p-3b494de7.entry.js +1 -0
  1451. package/dist/magma-components/p-3b578659.system.entry.js +48 -0
  1452. package/dist/magma-components/p-3be9b384.system.entry.js +34 -0
  1453. package/dist/magma-components/p-445198a1.entry.js +1 -0
  1454. package/dist/magma-components/p-445bc62a.system.entry.js +1 -0
  1455. package/dist/magma-components/p-45a3e7eb.entry.js +1 -0
  1456. package/dist/magma-components/p-45b19935.system.entry.js +54 -0
  1457. package/dist/magma-components/p-4606d11f.entry.js +1 -0
  1458. package/dist/magma-components/p-4646cdc0.system.entry.js +17 -0
  1459. package/dist/magma-components/p-4669334a.system.entry.js +3 -0
  1460. package/dist/magma-components/p-46a928c3.entry.js +1 -0
  1461. package/dist/magma-components/p-4748378e.system.entry.js +220 -0
  1462. package/dist/magma-components/p-4da1c089.entry.js +1 -0
  1463. package/dist/magma-components/p-4e5b8618.system.entry.js +1 -0
  1464. package/dist/magma-components/p-4e8c5b68.entry.js +1 -0
  1465. package/dist/magma-components/p-4f0153cd.entry.js +1 -0
  1466. package/dist/magma-components/p-4f48c171.system.entry.js +1 -0
  1467. package/dist/magma-components/p-4fc0e294.entry.js +1 -0
  1468. package/dist/magma-components/p-4fd0fdb8.system.entry.js +61 -0
  1469. package/dist/magma-components/p-5575f198.entry.js +1 -0
  1470. package/dist/magma-components/p-5686da49.system.entry.js +13 -0
  1471. package/dist/magma-components/p-56a25ec6.entry.js +1 -0
  1472. package/dist/magma-components/p-57ee6e32.entry.js +1 -0
  1473. package/dist/magma-components/p-5931fdfc.system.entry.js +41 -0
  1474. package/dist/magma-components/p-5a8fa2d0.entry.js +1 -0
  1475. package/dist/magma-components/p-5aa8f150.entry.js +1 -0
  1476. package/dist/magma-components/p-5c8f408e.entry.js +1 -0
  1477. package/dist/magma-components/p-5d1cba9c.system.entry.js +1 -0
  1478. package/dist/magma-components/p-5d56a7cd.system.entry.js +47 -0
  1479. package/dist/magma-components/p-60acbc5f.system.entry.js +31 -0
  1480. package/dist/magma-components/p-60b21db7.entry.js +1 -0
  1481. package/dist/magma-components/p-60d6e60f.entry.js +1 -0
  1482. package/dist/magma-components/p-6129954d.system.entry.js +22 -0
  1483. package/dist/magma-components/p-61e11cd0.system.entry.js +16 -0
  1484. package/dist/magma-components/p-625de2e6.system.entry.js +24 -0
  1485. package/dist/magma-components/p-627c2780.entry.js +1 -0
  1486. package/dist/magma-components/p-6896786e.entry.js +1 -0
  1487. package/dist/magma-components/p-69319301.system.entry.js +10 -0
  1488. package/dist/magma-components/p-6a994dc1.entry.js +1 -0
  1489. package/dist/magma-components/p-6c73689a.system.entry.js +25 -0
  1490. package/dist/magma-components/p-6d009b42.system.entry.js +8 -0
  1491. package/dist/magma-components/p-72971cf7.system.entry.js +7 -0
  1492. package/dist/magma-components/p-741f8f45.system.entry.js +13 -0
  1493. package/dist/magma-components/p-7837856f.entry.js +1 -0
  1494. package/dist/magma-components/p-797c64f4.system.entry.js +19 -0
  1495. package/dist/magma-components/p-7a920b70.entry.js +1 -0
  1496. package/dist/magma-components/p-7b06b2f2.entry.js +1 -0
  1497. package/dist/magma-components/p-7c055074.entry.js +1 -0
  1498. package/dist/magma-components/p-7c3a7521.entry.js +1 -0
  1499. package/dist/magma-components/p-7d61f442.entry.js +1 -0
  1500. package/dist/magma-components/p-7ee31f2e.entry.js +1 -0
  1501. package/dist/magma-components/p-7f418ae1.entry.js +1 -0
  1502. package/dist/magma-components/p-7ff5552f.entry.js +1 -0
  1503. package/dist/magma-components/p-81d2582a.entry.js +1 -0
  1504. package/dist/magma-components/p-8239e526.system.entry.js +10 -0
  1505. package/dist/magma-components/p-844bce77.entry.js +1 -0
  1506. package/dist/magma-components/p-84aac233.entry.js +1 -0
  1507. package/dist/magma-components/p-85376ff5.entry.js +1 -0
  1508. package/dist/magma-components/p-85bf9c93.entry.js +1 -0
  1509. package/dist/magma-components/p-86f11a5a.entry.js +1 -0
  1510. package/dist/magma-components/p-8a8cad6c.system.entry.js +1 -0
  1511. package/dist/magma-components/p-8aa4cd10.entry.js +1 -0
  1512. package/dist/magma-components/p-8b8cd213.system.entry.js +49 -0
  1513. package/dist/magma-components/p-8bf8e032.entry.js +1 -0
  1514. package/dist/magma-components/p-8feba226.entry.js +1 -0
  1515. package/dist/magma-components/p-90d50492.system.entry.js +4 -0
  1516. package/dist/magma-components/p-9303fb16.system.entry.js +39 -0
  1517. package/dist/magma-components/p-948ecde4.entry.js +8 -0
  1518. package/dist/magma-components/p-95ddc950.system.entry.js +11 -0
  1519. package/dist/magma-components/p-97217527.system.entry.js +1 -0
  1520. package/dist/magma-components/p-97c6e10a.entry.js +1 -0
  1521. package/dist/magma-components/p-98e167e8.system.entry.js +23 -0
  1522. package/dist/magma-components/p-9a0f8eb1.entry.js +1 -0
  1523. package/dist/magma-components/p-9c2b67fc.system.entry.js +40 -0
  1524. package/dist/magma-components/p-9c784173.entry.js +1 -0
  1525. package/dist/magma-components/p-9e07535e.system.entry.js +78 -0
  1526. package/dist/magma-components/p-9e2b1a29.entry.js +1 -0
  1527. package/dist/magma-components/p-9ed54db1.entry.js +1 -0
  1528. package/dist/magma-components/p-9ef0d4e5.system.entry.js +7 -0
  1529. package/dist/magma-components/p-9ef64212.entry.js +18 -0
  1530. package/dist/magma-components/p-9f55fa7a.system.entry.js +51 -0
  1531. package/dist/magma-components/p-B8zYiZQY.system.js +1 -1
  1532. package/dist/magma-components/p-a2e3a545.entry.js +1 -0
  1533. package/dist/magma-components/p-a3156523.system.entry.js +98 -0
  1534. package/dist/magma-components/p-a3d09996.entry.js +1 -0
  1535. package/dist/magma-components/p-a65ce11a.system.entry.js +17 -0
  1536. package/dist/magma-components/p-a8206d9c.entry.js +1 -0
  1537. package/dist/magma-components/p-a9caed77.entry.js +1 -0
  1538. package/dist/magma-components/p-aac622ef.system.entry.js +1 -0
  1539. package/dist/magma-components/p-ac099ed6.entry.js +1 -0
  1540. package/dist/magma-components/p-ac161cb5.entry.js +1 -0
  1541. package/dist/magma-components/p-ad13ade5.system.entry.js +13 -0
  1542. package/dist/magma-components/p-adab176e.system.entry.js +13 -0
  1543. package/dist/magma-components/p-ae9735e4.system.entry.js +22 -0
  1544. package/dist/magma-components/p-b0749f83.system.entry.js +10 -0
  1545. package/dist/magma-components/p-b0850daa.entry.js +1 -0
  1546. package/dist/magma-components/p-b2763352.entry.js +1 -0
  1547. package/dist/magma-components/p-b30b487c.system.entry.js +55 -0
  1548. package/dist/magma-components/p-b464668b.system.entry.js +105 -0
  1549. package/dist/magma-components/p-b523fabe.system.entry.js +46 -0
  1550. package/dist/magma-components/p-b61546fd.entry.js +1 -0
  1551. package/dist/magma-components/p-b6412ddd.system.entry.js +1 -0
  1552. package/dist/magma-components/p-b781c932.system.entry.js +7 -0
  1553. package/dist/magma-components/p-b85f56d7.entry.js +1 -0
  1554. package/dist/magma-components/p-b8f4938a.entry.js +1 -0
  1555. package/dist/magma-components/p-bba4f1f0.system.entry.js +46 -0
  1556. package/dist/magma-components/p-bc054ffa.system.entry.js +19 -0
  1557. package/dist/magma-components/p-be2ca282.entry.js +1 -0
  1558. package/dist/magma-components/p-c35ea44d.system.entry.js +12 -0
  1559. package/dist/magma-components/p-c683cd13.entry.js +1 -0
  1560. package/dist/magma-components/p-c7dc17f8.entry.js +1 -0
  1561. package/dist/magma-components/p-c915fba5.system.entry.js +21 -0
  1562. package/dist/magma-components/p-c9553777.entry.js +1 -0
  1563. package/dist/magma-components/p-c9bd81c5.system.entry.js +225 -0
  1564. package/dist/magma-components/p-ccffdf0b.system.entry.js +80 -0
  1565. package/dist/magma-components/p-cd6dd836.entry.js +1 -0
  1566. package/dist/magma-components/p-cf42d6ea.system.entry.js +9 -0
  1567. package/dist/magma-components/p-cfbf3a76.system.entry.js +23 -0
  1568. package/dist/magma-components/p-d29c959d.entry.js +1 -0
  1569. package/dist/magma-components/p-d360e4c5.entry.js +1 -0
  1570. package/dist/magma-components/p-d43e2a9a.entry.js +1 -0
  1571. package/dist/magma-components/p-d50d4023.entry.js +1 -0
  1572. package/dist/magma-components/p-d81fcbde.system.entry.js +20 -0
  1573. package/dist/magma-components/p-d85f3e5e.system.entry.js +16 -0
  1574. package/dist/magma-components/p-dcb5f965.entry.js +1 -0
  1575. package/dist/magma-components/p-ddfb4da3.entry.js +1 -0
  1576. package/dist/magma-components/p-e0049e96.system.entry.js +33 -0
  1577. package/dist/magma-components/p-e059aaa9.entry.js +1 -0
  1578. package/dist/magma-components/p-e428490d.system.entry.js +5 -0
  1579. package/dist/magma-components/p-e79eb427.system.entry.js +7 -0
  1580. package/dist/magma-components/p-e7f717ab.entry.js +1 -0
  1581. package/dist/magma-components/p-e92327a2.entry.js +1 -0
  1582. package/dist/magma-components/p-ecc2893d.system.entry.js +24 -0
  1583. package/dist/magma-components/p-ed4fd7a4.entry.js +1 -0
  1584. package/dist/magma-components/p-ef1bdd44.entry.js +1 -0
  1585. package/dist/magma-components/p-efe27253.system.entry.js +27 -0
  1586. package/dist/magma-components/p-f09f3fe1.system.entry.js +52 -0
  1587. package/dist/magma-components/p-f181c679.system.entry.js +16 -0
  1588. package/dist/magma-components/p-f22b8091.entry.js +1 -0
  1589. package/dist/magma-components/p-f493fdc3.entry.js +1 -0
  1590. package/dist/magma-components/p-f5d9f625.entry.js +1 -0
  1591. package/dist/magma-components/p-f7426a75.entry.js +1 -0
  1592. package/dist/magma-components/p-fa387b74.system.entry.js +5 -0
  1593. package/dist/magma-components/p-fae9612b.system.entry.js +27 -0
  1594. package/dist/magma-components/p-fbf563c8.entry.js +1 -0
  1595. package/dist/magma-components/p-fd81c4ef.system.entry.js +29 -0
  1596. package/dist/magma-components/p-fdedc0ba.entry.js +1 -0
  1597. package/dist/magma-components/p-ff65fc97.entry.js +1 -0
  1598. package/dist/magma-components/p-ff82edad.entry.js +1 -0
  1599. package/dist/magma-components/p-fff26731.system.entry.js +15 -0
  1600. package/dist/stats.json +1292 -1091
  1601. package/dist/types/components/mds-accordion-item/mds-accordion-item.d.ts +4 -1
  1602. package/dist/types/components/mds-accordion-timer-item/mds-accordion-timer-item.d.ts +4 -1
  1603. package/dist/types/components/mds-book/mds-book.d.ts +6 -2
  1604. package/dist/types/components/mds-book/meta/types.d.ts +1 -1
  1605. package/dist/types/components/mds-input-field/mds-input-field.d.ts +6 -0
  1606. package/dist/types/components/mds-keyboard-key/meta/icons.d.ts +1 -1
  1607. package/dist/types/components/mds-notification/mds-notification.d.ts +23 -0
  1608. package/dist/types/components/mds-pref-theme-item/mds-pref-theme-item.d.ts +9 -2
  1609. package/dist/types/components/mds-text/mds-text.d.ts +8 -5
  1610. package/dist/types/components/mds-text/meta/dictionary.d.ts +2 -1
  1611. package/dist/types/components/mds-text/meta/types.d.ts +5 -0
  1612. package/dist/types/components/mds-text/meta/variants.d.ts +35 -0
  1613. package/dist/types/components.d.ts +52 -19
  1614. package/package.json +27 -18
  1615. package/agents/anti-patterns.md +0 -42
  1616. package/dist/collection/components/mds-accordion/antipattern.md +0 -122
  1617. package/dist/collection/components/mds-accordion/pattern.md +0 -147
  1618. package/dist/collection/components/mds-accordion-item/antipattern.md +0 -137
  1619. package/dist/collection/components/mds-accordion-item/pattern.md +0 -154
  1620. package/dist/collection/components/mds-accordion-timer/antipattern.md +0 -135
  1621. package/dist/collection/components/mds-accordion-timer/pattern.md +0 -137
  1622. package/dist/collection/components/mds-accordion-timer-item/antipattern.md +0 -142
  1623. package/dist/collection/components/mds-accordion-timer-item/pattern.md +0 -132
  1624. package/dist/collection/components/mds-author/antipattern.md +0 -106
  1625. package/dist/collection/components/mds-author/pattern.md +0 -101
  1626. package/dist/collection/components/mds-avatar/antipattern.md +0 -96
  1627. package/dist/collection/components/mds-avatar/pattern.md +0 -118
  1628. package/dist/collection/components/mds-avatar-stack/antipattern.md +0 -121
  1629. package/dist/collection/components/mds-avatar-stack/pattern.md +0 -122
  1630. package/dist/collection/components/mds-avatar-stack-item/antipattern.md +0 -113
  1631. package/dist/collection/components/mds-avatar-stack-item/pattern.md +0 -104
  1632. package/dist/collection/components/mds-badge/antipattern.md +0 -103
  1633. package/dist/collection/components/mds-badge/pattern.md +0 -126
  1634. package/dist/collection/components/mds-banner/antipattern.md +0 -140
  1635. package/dist/collection/components/mds-banner/pattern.md +0 -175
  1636. package/dist/collection/components/mds-benchmark-bar/antipattern.md +0 -77
  1637. package/dist/collection/components/mds-benchmark-bar/pattern.md +0 -102
  1638. package/dist/collection/components/mds-bibliography/antipattern.md +0 -128
  1639. package/dist/collection/components/mds-bibliography/pattern.md +0 -140
  1640. package/dist/collection/components/mds-book/antipattern.md +0 -88
  1641. package/dist/collection/components/mds-book/pattern.md +0 -125
  1642. package/dist/collection/components/mds-breadcrumb/antipattern.md +0 -112
  1643. package/dist/collection/components/mds-breadcrumb/pattern.md +0 -100
  1644. package/dist/collection/components/mds-breadcrumb-item/antipattern.md +0 -109
  1645. package/dist/collection/components/mds-breadcrumb-item/pattern.md +0 -83
  1646. package/dist/collection/components/mds-button/antipattern.md +0 -160
  1647. package/dist/collection/components/mds-button/pattern.md +0 -211
  1648. package/dist/collection/components/mds-button-dropdown/antipattern.md +0 -158
  1649. package/dist/collection/components/mds-button-dropdown/pattern.md +0 -171
  1650. package/dist/collection/components/mds-button-group/antipattern.md +0 -105
  1651. package/dist/collection/components/mds-button-group/pattern.md +0 -89
  1652. package/dist/collection/components/mds-calendar/antipattern.md +0 -113
  1653. package/dist/collection/components/mds-calendar/pattern.md +0 -127
  1654. package/dist/collection/components/mds-calendar-cell/antipattern.md +0 -58
  1655. package/dist/collection/components/mds-calendar-cell/pattern.md +0 -83
  1656. package/dist/collection/components/mds-card/antipattern.md +0 -133
  1657. package/dist/collection/components/mds-card/pattern.md +0 -161
  1658. package/dist/collection/components/mds-card-content/antipattern.md +0 -110
  1659. package/dist/collection/components/mds-card-content/pattern.md +0 -91
  1660. package/dist/collection/components/mds-card-footer/antipattern.md +0 -112
  1661. package/dist/collection/components/mds-card-footer/pattern.md +0 -95
  1662. package/dist/collection/components/mds-card-header/antipattern.md +0 -114
  1663. package/dist/collection/components/mds-card-header/pattern.md +0 -143
  1664. package/dist/collection/components/mds-card-media/antipattern.md +0 -128
  1665. package/dist/collection/components/mds-card-media/pattern.md +0 -93
  1666. package/dist/collection/components/mds-chip/antipattern.md +0 -118
  1667. package/dist/collection/components/mds-chip/pattern.md +0 -164
  1668. package/dist/collection/components/mds-details/antipattern.md +0 -124
  1669. package/dist/collection/components/mds-details/pattern.md +0 -136
  1670. package/dist/collection/components/mds-dropdown/antipattern.md +0 -137
  1671. package/dist/collection/components/mds-dropdown/pattern.md +0 -201
  1672. package/dist/collection/components/mds-emoji/antipattern.md +0 -116
  1673. package/dist/collection/components/mds-emoji/pattern.md +0 -203
  1674. package/dist/collection/components/mds-entity/antipattern.md +0 -119
  1675. package/dist/collection/components/mds-entity/pattern.md +0 -132
  1676. package/dist/collection/components/mds-file/antipattern.md +0 -91
  1677. package/dist/collection/components/mds-file/pattern.md +0 -107
  1678. package/dist/collection/components/mds-file-preview/antipattern.md +0 -129
  1679. package/dist/collection/components/mds-file-preview/pattern.md +0 -163
  1680. package/dist/collection/components/mds-filter/antipattern.md +0 -140
  1681. package/dist/collection/components/mds-filter/pattern.md +0 -156
  1682. package/dist/collection/components/mds-filter-item/antipattern.md +0 -127
  1683. package/dist/collection/components/mds-filter-item/pattern.md +0 -123
  1684. package/dist/collection/components/mds-header/antipattern.md +0 -120
  1685. package/dist/collection/components/mds-header/pattern.md +0 -180
  1686. package/dist/collection/components/mds-header-bar/antipattern.md +0 -117
  1687. package/dist/collection/components/mds-header-bar/pattern.md +0 -138
  1688. package/dist/collection/components/mds-help/antipattern.md +0 -73
  1689. package/dist/collection/components/mds-help/pattern.md +0 -106
  1690. package/dist/collection/components/mds-horizontal-scroll/antipattern.md +0 -120
  1691. package/dist/collection/components/mds-horizontal-scroll/pattern.md +0 -143
  1692. package/dist/collection/components/mds-hr/antipattern.md +0 -84
  1693. package/dist/collection/components/mds-hr/pattern.md +0 -88
  1694. package/dist/collection/components/mds-icon/antipattern.md +0 -118
  1695. package/dist/collection/components/mds-icon/pattern.md +0 -135
  1696. package/dist/collection/components/mds-img/antipattern.md +0 -106
  1697. package/dist/collection/components/mds-img/pattern.md +0 -125
  1698. package/dist/collection/components/mds-input/antipattern.md +0 -128
  1699. package/dist/collection/components/mds-input/pattern.md +0 -265
  1700. package/dist/collection/components/mds-input-date/antipattern.md +0 -107
  1701. package/dist/collection/components/mds-input-date/pattern.md +0 -157
  1702. package/dist/collection/components/mds-input-date-range/antipattern.md +0 -168
  1703. package/dist/collection/components/mds-input-date-range/pattern.md +0 -121
  1704. package/dist/collection/components/mds-input-date-range-preselection/antipattern.md +0 -152
  1705. package/dist/collection/components/mds-input-date-range-preselection/pattern.md +0 -91
  1706. package/dist/collection/components/mds-input-field/antipattern.md +0 -115
  1707. package/dist/collection/components/mds-input-field/pattern.md +0 -95
  1708. package/dist/collection/components/mds-input-otp/antipattern.md +0 -105
  1709. package/dist/collection/components/mds-input-otp/pattern.md +0 -107
  1710. package/dist/collection/components/mds-input-range/antipattern.md +0 -123
  1711. package/dist/collection/components/mds-input-range/pattern.md +0 -100
  1712. package/dist/collection/components/mds-input-select/antipattern.md +0 -126
  1713. package/dist/collection/components/mds-input-select/pattern.md +0 -166
  1714. package/dist/collection/components/mds-input-switch/antipattern.md +0 -116
  1715. package/dist/collection/components/mds-input-switch/pattern.md +0 -124
  1716. package/dist/collection/components/mds-input-tip/antipattern.md +0 -112
  1717. package/dist/collection/components/mds-input-tip/pattern.md +0 -122
  1718. package/dist/collection/components/mds-input-tip-item/antipattern.md +0 -98
  1719. package/dist/collection/components/mds-input-tip-item/pattern.md +0 -106
  1720. package/dist/collection/components/mds-input-upload/antipattern.md +0 -143
  1721. package/dist/collection/components/mds-input-upload/pattern.md +0 -161
  1722. package/dist/collection/components/mds-keyboard/antipattern.md +0 -111
  1723. package/dist/collection/components/mds-keyboard/pattern.md +0 -128
  1724. package/dist/collection/components/mds-keyboard-key/antipattern.md +0 -116
  1725. package/dist/collection/components/mds-keyboard-key/pattern.md +0 -87
  1726. package/dist/collection/components/mds-kpi/antipattern.md +0 -93
  1727. package/dist/collection/components/mds-kpi/pattern.md +0 -112
  1728. package/dist/collection/components/mds-kpi-item/antipattern.md +0 -117
  1729. package/dist/collection/components/mds-kpi-item/pattern.md +0 -117
  1730. package/dist/collection/components/mds-label/antipattern.md +0 -92
  1731. package/dist/collection/components/mds-label/pattern.md +0 -109
  1732. package/dist/collection/components/mds-link/antipattern.md +0 -96
  1733. package/dist/collection/components/mds-link/pattern.md +0 -100
  1734. package/dist/collection/components/mds-list/antipattern.md +0 -117
  1735. package/dist/collection/components/mds-list/pattern.md +0 -104
  1736. package/dist/collection/components/mds-list-item/antipattern.md +0 -118
  1737. package/dist/collection/components/mds-list-item/pattern.md +0 -112
  1738. package/dist/collection/components/mds-mention/antipattern.md +0 -86
  1739. package/dist/collection/components/mds-mention/pattern.md +0 -89
  1740. package/dist/collection/components/mds-modal/antipattern.md +0 -94
  1741. package/dist/collection/components/mds-modal/pattern.md +0 -224
  1742. package/dist/collection/components/mds-note/antipattern.md +0 -99
  1743. package/dist/collection/components/mds-note/pattern.md +0 -107
  1744. package/dist/collection/components/mds-notification/antipattern.md +0 -86
  1745. package/dist/collection/components/mds-notification/pattern.md +0 -96
  1746. package/dist/collection/components/mds-paginator/antipattern.md +0 -96
  1747. package/dist/collection/components/mds-paginator/pattern.md +0 -98
  1748. package/dist/collection/components/mds-paginator-item/antipattern.md +0 -96
  1749. package/dist/collection/components/mds-paginator-item/pattern.md +0 -76
  1750. package/dist/collection/components/mds-policy-ai/antipattern.md +0 -97
  1751. package/dist/collection/components/mds-policy-ai/pattern.md +0 -107
  1752. package/dist/collection/components/mds-pref/antipattern.md +0 -85
  1753. package/dist/collection/components/mds-pref/pattern.md +0 -93
  1754. package/dist/collection/components/mds-pref-animation/antipattern.md +0 -67
  1755. package/dist/collection/components/mds-pref-animation/pattern.md +0 -86
  1756. package/dist/collection/components/mds-pref-consumption/antipattern.md +0 -84
  1757. package/dist/collection/components/mds-pref-consumption/pattern.md +0 -69
  1758. package/dist/collection/components/mds-pref-contrast/antipattern.md +0 -71
  1759. package/dist/collection/components/mds-pref-contrast/pattern.md +0 -82
  1760. package/dist/collection/components/mds-pref-language/antipattern.md +0 -130
  1761. package/dist/collection/components/mds-pref-language/pattern.md +0 -104
  1762. package/dist/collection/components/mds-pref-language-item/antipattern.md +0 -99
  1763. package/dist/collection/components/mds-pref-language-item/pattern.md +0 -85
  1764. package/dist/collection/components/mds-pref-mode/antipattern.md +0 -103
  1765. package/dist/collection/components/mds-pref-mode/pattern.md +0 -92
  1766. package/dist/collection/components/mds-pref-theme/antipattern.md +0 -104
  1767. package/dist/collection/components/mds-pref-theme/pattern.md +0 -96
  1768. package/dist/collection/components/mds-pref-theme-item/antipattern.md +0 -97
  1769. package/dist/collection/components/mds-pref-theme-item/pattern.md +0 -94
  1770. package/dist/collection/components/mds-price-table/antipattern.md +0 -131
  1771. package/dist/collection/components/mds-price-table/pattern.md +0 -182
  1772. package/dist/collection/components/mds-price-table-features/antipattern.md +0 -151
  1773. package/dist/collection/components/mds-price-table-features/pattern.md +0 -156
  1774. package/dist/collection/components/mds-price-table-features-cell/antipattern.md +0 -105
  1775. package/dist/collection/components/mds-price-table-features-cell/pattern.md +0 -123
  1776. package/dist/collection/components/mds-price-table-features-row/antipattern.md +0 -135
  1777. package/dist/collection/components/mds-price-table-features-row/pattern.md +0 -123
  1778. package/dist/collection/components/mds-price-table-header/antipattern.md +0 -133
  1779. package/dist/collection/components/mds-price-table-header/pattern.md +0 -176
  1780. package/dist/collection/components/mds-price-table-list/antipattern.md +0 -130
  1781. package/dist/collection/components/mds-price-table-list/pattern.md +0 -139
  1782. package/dist/collection/components/mds-price-table-list-item/antipattern.md +0 -86
  1783. package/dist/collection/components/mds-price-table-list-item/pattern.md +0 -108
  1784. package/dist/collection/components/mds-progress/antipattern.md +0 -94
  1785. package/dist/collection/components/mds-progress/pattern.md +0 -140
  1786. package/dist/collection/components/mds-push-notification/antipattern.md +0 -154
  1787. package/dist/collection/components/mds-push-notification/pattern.md +0 -200
  1788. package/dist/collection/components/mds-push-notification-item/antipattern.md +0 -129
  1789. package/dist/collection/components/mds-push-notification-item/pattern.md +0 -198
  1790. package/dist/collection/components/mds-quote/antipattern.md +0 -122
  1791. package/dist/collection/components/mds-quote/pattern.md +0 -108
  1792. package/dist/collection/components/mds-radial-menu/antipattern.md +0 -104
  1793. package/dist/collection/components/mds-radial-menu/pattern.md +0 -159
  1794. package/dist/collection/components/mds-radial-menu-item/antipattern.md +0 -108
  1795. package/dist/collection/components/mds-radial-menu-item/pattern.md +0 -96
  1796. package/dist/collection/components/mds-radial-progress/antipattern.md +0 -106
  1797. package/dist/collection/components/mds-radial-progress/pattern.md +0 -144
  1798. package/dist/collection/components/mds-separator/antipattern.md +0 -98
  1799. package/dist/collection/components/mds-separator/pattern.md +0 -82
  1800. package/dist/collection/components/mds-spinner/antipattern.md +0 -93
  1801. package/dist/collection/components/mds-spinner/pattern.md +0 -105
  1802. package/dist/collection/components/mds-status-bar/antipattern.md +0 -127
  1803. package/dist/collection/components/mds-status-bar/pattern.md +0 -121
  1804. package/dist/collection/components/mds-stepper-bar/antipattern.md +0 -123
  1805. package/dist/collection/components/mds-stepper-bar/pattern.md +0 -178
  1806. package/dist/collection/components/mds-stepper-bar-item/antipattern.md +0 -115
  1807. package/dist/collection/components/mds-stepper-bar-item/pattern.md +0 -200
  1808. package/dist/collection/components/mds-tab/antipattern.md +0 -189
  1809. package/dist/collection/components/mds-tab/pattern.md +0 -232
  1810. package/dist/collection/components/mds-tab-bar/antipattern.md +0 -105
  1811. package/dist/collection/components/mds-tab-bar/pattern.md +0 -87
  1812. package/dist/collection/components/mds-tab-bar-item/antipattern.md +0 -116
  1813. package/dist/collection/components/mds-tab-bar-item/pattern.md +0 -108
  1814. package/dist/collection/components/mds-tab-item/antipattern.md +0 -159
  1815. package/dist/collection/components/mds-tab-item/pattern.md +0 -174
  1816. package/dist/collection/components/mds-table/antipattern.md +0 -169
  1817. package/dist/collection/components/mds-table/pattern.md +0 -317
  1818. package/dist/collection/components/mds-table-body/antipattern.md +0 -117
  1819. package/dist/collection/components/mds-table-body/pattern.md +0 -151
  1820. package/dist/collection/components/mds-table-cell/antipattern.md +0 -100
  1821. package/dist/collection/components/mds-table-cell/pattern.md +0 -168
  1822. package/dist/collection/components/mds-table-footer/antipattern.md +0 -114
  1823. package/dist/collection/components/mds-table-footer/pattern.md +0 -115
  1824. package/dist/collection/components/mds-table-header/antipattern.md +0 -157
  1825. package/dist/collection/components/mds-table-header/pattern.md +0 -158
  1826. package/dist/collection/components/mds-table-header-cell/antipattern.md +0 -115
  1827. package/dist/collection/components/mds-table-header-cell/pattern.md +0 -166
  1828. package/dist/collection/components/mds-table-row/antipattern.md +0 -141
  1829. package/dist/collection/components/mds-table-row/pattern.md +0 -166
  1830. package/dist/collection/components/mds-text/antipattern.md +0 -112
  1831. package/dist/collection/components/mds-text/pattern.md +0 -138
  1832. package/dist/collection/components/mds-toast/antipattern.md +0 -149
  1833. package/dist/collection/components/mds-toast/pattern.md +0 -174
  1834. package/dist/collection/components/mds-toast-region/antipattern.md +0 -62
  1835. package/dist/collection/components/mds-toast-region/pattern.md +0 -90
  1836. package/dist/collection/components/mds-tooltip/antipattern.md +0 -122
  1837. package/dist/collection/components/mds-tooltip/pattern.md +0 -135
  1838. package/dist/collection/components/mds-tree/antipattern.md +0 -152
  1839. package/dist/collection/components/mds-tree/pattern.md +0 -196
  1840. package/dist/collection/components/mds-tree-item/antipattern.md +0 -148
  1841. package/dist/collection/components/mds-tree-item/pattern.md +0 -197
  1842. package/dist/collection/components/mds-url-view/antipattern.md +0 -106
  1843. package/dist/collection/components/mds-url-view/pattern.md +0 -105
  1844. package/dist/collection/components/mds-usage/antipattern.md +0 -105
  1845. package/dist/collection/components/mds-usage/pattern.md +0 -131
  1846. package/dist/collection/components/mds-video-wall/antipattern.md +0 -97
  1847. package/dist/collection/components/mds-video-wall/pattern.md +0 -99
  1848. package/dist/collection/components/mds-zero/antipattern.md +0 -106
  1849. package/dist/collection/components/mds-zero/pattern.md +0 -118
  1850. package/dist/components/p-BBO_llcO.js +0 -1
  1851. package/dist/components/p-BM7joOdq.js +0 -1
  1852. package/dist/components/p-BMIaZ4HY.js +0 -1
  1853. package/dist/components/p-BOJQ3tkp.js +0 -1
  1854. package/dist/components/p-BU1O2DcC.js +0 -1
  1855. package/dist/components/p-BeZGLnJJ.js +0 -1
  1856. package/dist/components/p-Bo6ezD1p.js +0 -1
  1857. package/dist/components/p-C0H8bZpf.js +0 -1
  1858. package/dist/components/p-C1YH20BL.js +0 -1
  1859. package/dist/components/p-CEw7GvM-.js +0 -1
  1860. package/dist/components/p-CNUWS_Mg.js +0 -1
  1861. package/dist/components/p-CV7wjM1c.js +0 -1
  1862. package/dist/components/p-CWSIl1jl.js +0 -1
  1863. package/dist/components/p-Chk4rI7N.js +0 -1
  1864. package/dist/components/p-Cwg4vtOr.js +0 -1
  1865. package/dist/components/p-Czqtt8kO.js +0 -1
  1866. package/dist/components/p-DD2muCqG.js +0 -1
  1867. package/dist/components/p-DDTJwlAd.js +0 -1
  1868. package/dist/components/p-DJ401QTd.js +0 -1
  1869. package/dist/components/p-DMyL4CYh.js +0 -1
  1870. package/dist/components/p-DccBbfK8.js +0 -1
  1871. package/dist/components/p-Dzkiu-es.js +0 -1
  1872. package/dist/components/p-H0YXZ5fD.js +0 -8
  1873. package/dist/components/p-IaXq1Xsc.js +0 -1
  1874. package/dist/components/p-M8dGB4KH.js +0 -1
  1875. package/dist/components/p-TNn_HE5x.js +0 -1
  1876. package/dist/components/p-aujz-VM9.js +0 -1
  1877. package/dist/components/p-e9NGNm7d.js +0 -1
  1878. package/dist/components/p-kZBPId_x.js +0 -1
  1879. package/dist/components/p-qnCVkeGX.js +0 -1
  1880. package/dist/magma-components/p-00aa9a51.entry.js +0 -1
  1881. package/dist/magma-components/p-00acb2e1.system.entry.js +0 -10
  1882. package/dist/magma-components/p-037126b7.system.entry.js +0 -21
  1883. package/dist/magma-components/p-03da0376.system.entry.js +0 -1
  1884. package/dist/magma-components/p-05ef91a5.entry.js +0 -1
  1885. package/dist/magma-components/p-09c80fdb.entry.js +0 -1
  1886. package/dist/magma-components/p-0b0ca53c.entry.js +0 -1
  1887. package/dist/magma-components/p-0babf674.system.entry.js +0 -98
  1888. package/dist/magma-components/p-0d90c991.entry.js +0 -1
  1889. package/dist/magma-components/p-103465cf.entry.js +0 -1
  1890. package/dist/magma-components/p-10983da0.entry.js +0 -1
  1891. package/dist/magma-components/p-154ba354.system.entry.js +0 -29
  1892. package/dist/magma-components/p-1685e74c.system.entry.js +0 -33
  1893. package/dist/magma-components/p-1748ca8b.system.entry.js +0 -1
  1894. package/dist/magma-components/p-17a43cb6.system.entry.js +0 -16
  1895. package/dist/magma-components/p-1b415625.system.entry.js +0 -46
  1896. package/dist/magma-components/p-1c00d0f7.entry.js +0 -1
  1897. package/dist/magma-components/p-1cd75adf.system.entry.js +0 -14
  1898. package/dist/magma-components/p-2006cfeb.entry.js +0 -1
  1899. package/dist/magma-components/p-2216f207.system.entry.js +0 -35
  1900. package/dist/magma-components/p-25c07b67.system.entry.js +0 -4
  1901. package/dist/magma-components/p-29fbb7cf.entry.js +0 -1
  1902. package/dist/magma-components/p-2a26b614.entry.js +0 -1
  1903. package/dist/magma-components/p-2a6c2a41.entry.js +0 -1
  1904. package/dist/magma-components/p-2c28056d.entry.js +0 -1
  1905. package/dist/magma-components/p-2c5e5cd1.entry.js +0 -1
  1906. package/dist/magma-components/p-2c7d091e.system.entry.js +0 -14
  1907. package/dist/magma-components/p-2c997b47.entry.js +0 -1
  1908. package/dist/magma-components/p-2f39f4e4.entry.js +0 -1
  1909. package/dist/magma-components/p-31370fdb.system.entry.js +0 -22
  1910. package/dist/magma-components/p-32418266.entry.js +0 -1
  1911. package/dist/magma-components/p-33c80de3.system.entry.js +0 -1
  1912. package/dist/magma-components/p-34c0e63c.system.entry.js +0 -6
  1913. package/dist/magma-components/p-35c6341a.system.entry.js +0 -17
  1914. package/dist/magma-components/p-379f51a6.entry.js +0 -1
  1915. package/dist/magma-components/p-381f49ea.entry.js +0 -1
  1916. package/dist/magma-components/p-384ab014.entry.js +0 -1
  1917. package/dist/magma-components/p-39a2df98.system.entry.js +0 -4
  1918. package/dist/magma-components/p-3a9a75e5.entry.js +0 -1
  1919. package/dist/magma-components/p-3b691cc3.entry.js +0 -1
  1920. package/dist/magma-components/p-3bc65166.system.entry.js +0 -215
  1921. package/dist/magma-components/p-3bdb541f.system.entry.js +0 -46
  1922. package/dist/magma-components/p-3ca004c3.entry.js +0 -1
  1923. package/dist/magma-components/p-3caf6a26.entry.js +0 -1
  1924. package/dist/magma-components/p-3dccd446.entry.js +0 -1
  1925. package/dist/magma-components/p-3dde41b0.system.entry.js +0 -27
  1926. package/dist/magma-components/p-3e8e0003.system.entry.js +0 -7
  1927. package/dist/magma-components/p-425ca155.entry.js +0 -1
  1928. package/dist/magma-components/p-42ab27de.entry.js +0 -1
  1929. package/dist/magma-components/p-430a4c4b.system.entry.js +0 -19
  1930. package/dist/magma-components/p-47b05fa1.system.entry.js +0 -8
  1931. package/dist/magma-components/p-47db3155.entry.js +0 -1
  1932. package/dist/magma-components/p-48f86057.system.entry.js +0 -1
  1933. package/dist/magma-components/p-4aa94380.entry.js +0 -1
  1934. package/dist/magma-components/p-4ab2eb7e.entry.js +0 -1
  1935. package/dist/magma-components/p-4bea91e1.system.entry.js +0 -1
  1936. package/dist/magma-components/p-4de89d1b.entry.js +0 -1
  1937. package/dist/magma-components/p-50c8f36c.system.entry.js +0 -1
  1938. package/dist/magma-components/p-5200ab23.system.entry.js +0 -5
  1939. package/dist/magma-components/p-523f0c30.system.entry.js +0 -80
  1940. package/dist/magma-components/p-5306606b.entry.js +0 -1
  1941. package/dist/magma-components/p-53981624.system.entry.js +0 -13
  1942. package/dist/magma-components/p-53acdc6b.entry.js +0 -1
  1943. package/dist/magma-components/p-5660182a.system.entry.js +0 -1
  1944. package/dist/magma-components/p-56c5ca6f.entry.js +0 -1
  1945. package/dist/magma-components/p-57e92942.system.entry.js +0 -20
  1946. package/dist/magma-components/p-59f06b9c.entry.js +0 -1
  1947. package/dist/magma-components/p-5aa78075.system.entry.js +0 -111
  1948. package/dist/magma-components/p-5cf87a7f.entry.js +0 -1
  1949. package/dist/magma-components/p-5e8df58d.entry.js +0 -1
  1950. package/dist/magma-components/p-5ed74216.system.entry.js +0 -1
  1951. package/dist/magma-components/p-5f064376.system.entry.js +0 -7
  1952. package/dist/magma-components/p-60727165.entry.js +0 -8
  1953. package/dist/magma-components/p-6093aa8e.entry.js +0 -1
  1954. package/dist/magma-components/p-62d9eaca.entry.js +0 -1
  1955. package/dist/magma-components/p-6b402a09.system.entry.js +0 -73
  1956. package/dist/magma-components/p-6b55c5fe.system.entry.js +0 -1
  1957. package/dist/magma-components/p-6d57674c.system.entry.js +0 -52
  1958. package/dist/magma-components/p-6df7da52.system.entry.js +0 -24
  1959. package/dist/magma-components/p-6e751bcc.system.entry.js +0 -7
  1960. package/dist/magma-components/p-718d6384.system.entry.js +0 -34
  1961. package/dist/magma-components/p-71dab494.system.entry.js +0 -40
  1962. package/dist/magma-components/p-732d09b6.entry.js +0 -1
  1963. package/dist/magma-components/p-73f4f67e.entry.js +0 -1
  1964. package/dist/magma-components/p-785fa112.entry.js +0 -1
  1965. package/dist/magma-components/p-798f460b.system.entry.js +0 -31
  1966. package/dist/magma-components/p-7acbc6ea.system.entry.js +0 -45
  1967. package/dist/magma-components/p-7db14777.system.entry.js +0 -32
  1968. package/dist/magma-components/p-7dd0364b.entry.js +0 -1
  1969. package/dist/magma-components/p-7ec28ff1.system.entry.js +0 -48
  1970. package/dist/magma-components/p-7f74ec99.entry.js +0 -1
  1971. package/dist/magma-components/p-7ffce9e8.system.entry.js +0 -22
  1972. package/dist/magma-components/p-8219e58f.system.entry.js +0 -9
  1973. package/dist/magma-components/p-84711ab6.system.entry.js +0 -11
  1974. package/dist/magma-components/p-84bf333b.entry.js +0 -1
  1975. package/dist/magma-components/p-857ae762.entry.js +0 -1
  1976. package/dist/magma-components/p-8641b7b2.entry.js +0 -1
  1977. package/dist/magma-components/p-87395a4d.system.entry.js +0 -35
  1978. package/dist/magma-components/p-896310aa.system.entry.js +0 -5
  1979. package/dist/magma-components/p-8d7093af.entry.js +0 -1
  1980. package/dist/magma-components/p-8e15c151.system.entry.js +0 -1
  1981. package/dist/magma-components/p-8f1c529f.entry.js +0 -1
  1982. package/dist/magma-components/p-8f1e9021.system.entry.js +0 -91
  1983. package/dist/magma-components/p-904c1222.entry.js +0 -1
  1984. package/dist/magma-components/p-907f06cd.system.entry.js +0 -105
  1985. package/dist/magma-components/p-9332358d.entry.js +0 -1
  1986. package/dist/magma-components/p-93b9d39d.system.entry.js +0 -19
  1987. package/dist/magma-components/p-95ccf46d.system.entry.js +0 -54
  1988. package/dist/magma-components/p-965e7a82.system.entry.js +0 -15
  1989. package/dist/magma-components/p-968a2237.entry.js +0 -1
  1990. package/dist/magma-components/p-96dfb60e.system.entry.js +0 -1
  1991. package/dist/magma-components/p-9c408768.system.entry.js +0 -1
  1992. package/dist/magma-components/p-9dd9eadd.entry.js +0 -1
  1993. package/dist/magma-components/p-9e792bed.system.entry.js +0 -1
  1994. package/dist/magma-components/p-9fdd477a.entry.js +0 -1
  1995. package/dist/magma-components/p-9fefa077.system.entry.js +0 -1
  1996. package/dist/magma-components/p-a0d637b6.system.entry.js +0 -17
  1997. package/dist/magma-components/p-a25327a1.entry.js +0 -18
  1998. package/dist/magma-components/p-a26c05b6.entry.js +0 -1
  1999. package/dist/magma-components/p-a67381bf.entry.js +0 -1
  2000. package/dist/magma-components/p-a7baf451.system.entry.js +0 -7
  2001. package/dist/magma-components/p-ac9feb04.entry.js +0 -1
  2002. package/dist/magma-components/p-ad383f92.entry.js +0 -1
  2003. package/dist/magma-components/p-ae4736a0.system.entry.js +0 -55
  2004. package/dist/magma-components/p-b27cb1ac.system.entry.js +0 -975
  2005. package/dist/magma-components/p-b3332c5f.entry.js +0 -1
  2006. package/dist/magma-components/p-b3e2b68a.system.entry.js +0 -10
  2007. package/dist/magma-components/p-b86144d4.entry.js +0 -1
  2008. package/dist/magma-components/p-bbde5701.system.entry.js +0 -13
  2009. package/dist/magma-components/p-bc075b3b.system.entry.js +0 -22
  2010. package/dist/magma-components/p-bc19b136.entry.js +0 -1
  2011. package/dist/magma-components/p-bcca26d9.entry.js +0 -1
  2012. package/dist/magma-components/p-bf35627d.entry.js +0 -1
  2013. package/dist/magma-components/p-c086a5a4.system.entry.js +0 -23
  2014. package/dist/magma-components/p-c27206ca.entry.js +0 -1
  2015. package/dist/magma-components/p-c4a5ab6e.system.entry.js +0 -23
  2016. package/dist/magma-components/p-c58157cf.entry.js +0 -1
  2017. package/dist/magma-components/p-c597ad47.entry.js +0 -1
  2018. package/dist/magma-components/p-c7b2ebb5.entry.js +0 -1
  2019. package/dist/magma-components/p-c89060ec.system.entry.js +0 -41
  2020. package/dist/magma-components/p-c8b06821.system.entry.js +0 -12
  2021. package/dist/magma-components/p-ca1143bc.entry.js +0 -1
  2022. package/dist/magma-components/p-cb88fa71.entry.js +0 -1
  2023. package/dist/magma-components/p-cd783f9e.system.entry.js +0 -27
  2024. package/dist/magma-components/p-cd955bc7.system.entry.js +0 -16
  2025. package/dist/magma-components/p-ce42e251.entry.js +0 -1
  2026. package/dist/magma-components/p-cf4f4561.entry.js +0 -1
  2027. package/dist/magma-components/p-d0a15a3a.system.entry.js +0 -82
  2028. package/dist/magma-components/p-d218ae47.entry.js +0 -1
  2029. package/dist/magma-components/p-d331ff5c.entry.js +0 -1
  2030. package/dist/magma-components/p-d3844c9a.system.entry.js +0 -25
  2031. package/dist/magma-components/p-d3ac9a1a.entry.js +0 -1
  2032. package/dist/magma-components/p-d4c3250f.system.entry.js +0 -47
  2033. package/dist/magma-components/p-d638bbb0.entry.js +0 -1
  2034. package/dist/magma-components/p-d65e9f0a.system.entry.js +0 -10
  2035. package/dist/magma-components/p-d87ecd68.entry.js +0 -1
  2036. package/dist/magma-components/p-d93b48b4.system.entry.js +0 -4
  2037. package/dist/magma-components/p-d94281cb.entry.js +0 -1
  2038. package/dist/magma-components/p-d9f92ff8.entry.js +0 -1
  2039. package/dist/magma-components/p-da9bc02a.entry.js +0 -1
  2040. package/dist/magma-components/p-dc618cae.entry.js +0 -1
  2041. package/dist/magma-components/p-de38f745.entry.js +0 -1
  2042. package/dist/magma-components/p-dee123c7.system.entry.js +0 -39
  2043. package/dist/magma-components/p-e30d0684.system.entry.js +0 -16
  2044. package/dist/magma-components/p-e371f9e1.system.entry.js +0 -5
  2045. package/dist/magma-components/p-e3d262d9.system.entry.js +0 -13
  2046. package/dist/magma-components/p-e54587e7.system.entry.js +0 -49
  2047. package/dist/magma-components/p-e709a52e.system.entry.js +0 -25
  2048. package/dist/magma-components/p-ea503851.entry.js +0 -1
  2049. package/dist/magma-components/p-eb12be86.system.entry.js +0 -24
  2050. package/dist/magma-components/p-ebeb3fff.entry.js +0 -1
  2051. package/dist/magma-components/p-ec44a4ea.system.entry.js +0 -77
  2052. package/dist/magma-components/p-ed133270.entry.js +0 -1
  2053. package/dist/magma-components/p-ef4ee9ca.entry.js +0 -1
  2054. package/dist/magma-components/p-f267ff68.entry.js +0 -1
  2055. package/dist/magma-components/p-f27de6cb.system.entry.js +0 -26
  2056. package/dist/magma-components/p-f2ef884c.entry.js +0 -1
  2057. package/dist/magma-components/p-f3f88f32.entry.js +0 -1
  2058. package/dist/magma-components/p-f4181b35.entry.js +0 -1
  2059. package/dist/magma-components/p-f4351160.entry.js +0 -1
  2060. package/dist/magma-components/p-f5c7b147.system.entry.js +0 -17
  2061. package/dist/magma-components/p-f7d5445c.system.entry.js +0 -7
  2062. package/dist/magma-components/p-f8c85ad7.system.entry.js +0 -1
  2063. package/dist/magma-components/p-f9b601de.entry.js +0 -1
  2064. package/dist/magma-components/p-fa44d0d2.entry.js +0 -1
  2065. package/dist/magma-components/p-fe8e3721.system.entry.js +0 -225
  2066. package/dist/magma-components/p-fe98a77e.system.entry.js +0 -13
  2067. package/dist/magma-components/p-ff7fc1f6.system.entry.js +0 -3
@@ -0,0 +1,1711 @@
1
+ /*
2
+ The patterns Magma ships for agents (#1174, phase 5 of #1083): the solution to a task that
3
+ spans components, written as data an agent can query. Their sources are
4
+ docs/agents/patterns/<id>.md in the monorepo; the build ships them as agents/patterns/<id>.md
5
+ in the entry packages, where the MCP server reads them (get_pattern). A product layer has the
6
+ same shape, lives in the product's own repository (magma/patterns/<id>.md) and may add and
7
+ narrow, never contradict an "Always true" rule.
8
+
9
+ The domains of the design language (#1189: rhythm, density, actions, titles, surfaces,
10
+ widths) are files of the same format, of a third kind, `foundation`: the rules of composition
11
+ the patterns and blocks stand on. Their relations are the cases, the principle each rule
12
+ serves is `serves`, where a rule lives is `carried-by` (and `carried-by-planned`, for a
13
+ carrier not built yet), and a pattern cites them as it cites the rules of another pattern;
14
+ a case names the ones it and its preview rely on in `rules` (#1198).
15
+
16
+ A building block (`block`, #1210) is a section of a page that comes back in the same
17
+ arrangement in two patterns or more: about space, not time. It has the base of a pattern with
18
+ `regions` in the order of the page instead of `cases`, each saying when it shows, and
19
+ `used-by`, the patterns it comes back in; each of its situations has an id, the name of its
20
+ preview (2026-11-03).
21
+
22
+ The format is written in docs/PATTERNS.md, "The format"; the decisions behind it are on
23
+ #1174 and, for the domains, on #1189 and #1196. This module holds what every reader shares: parsing a file, the checks that need no
24
+ other data (the format, the coverage of the cases, the links, the layers), the answer for a
25
+ situation, and the sections of the body generated from the frontmatter. What needs the
26
+ installed data (the components, the lint rules) takes it as an argument.
27
+ */
28
+ import { existsSync, readdirSync, readFileSync } from 'node:fs';
29
+ import path from 'node:path';
30
+ import { parse } from 'yaml';
31
+ /** Where a pattern stands: a known need with no definition yet, being written, every case decided. */
32
+ export const PATTERN_STATUSES = ['candidate', 'draft', 'decided'];
33
+ /**
34
+ * A pattern is a flow of components over time; a building block, a section of the page that
35
+ * comes back in two patterns or more (#1210); a foundation file, a domain of the design
36
+ * language, the rules of composition both stand on (#1189), named after the Foundation item of
37
+ * the docs site, where the domains go.
38
+ */
39
+ export const PATTERN_KINDS = ['pattern', 'block', 'foundation'];
40
+ /** The kind of a domain of the design language: it has no group, Foundation is its place. */
41
+ export const FOUNDATION = 'foundation';
42
+ /**
43
+ * The kind of a building block: regions in the order of the page instead of cases, and the
44
+ * patterns it comes back in (#1210). A section becomes a block when it comes back in two or
45
+ * three patterns (plan/DIRECTION.md of magma-design-system/docs, "Building blocks section").
46
+ */
47
+ export const BLOCK = 'block';
48
+ /** The least number of patterns a block comes back in: two, the threshold of the docs site. */
49
+ export const BLOCK_USED_BY = 2;
50
+ /**
51
+ * The principles a rule of a domain serves (`serves`): the four of Magma, as the docs site
52
+ * writes them (src/content/docs/foundation/principles.md of magma-design-system/docs), which
53
+ * asks every decision of Foundation to say the one it serves.
54
+ */
55
+ export const PRINCIPLES = ['inclusive', 'enabling', 'intuitive', 'flexible'];
56
+ /**
57
+ * The groups of the patterns, as the docs site names them (plan/DIRECTION.md of
58
+ * magma-design-system/docs, "Patterns section"; Feedback became Messages and states on
59
+ * 2026-10-27).
60
+ */
61
+ export const PATTERN_GROUPS = {
62
+ navigation: 'Navigation',
63
+ data: 'Data',
64
+ input: 'Input',
65
+ 'messages-and-states': 'Messages and states',
66
+ ai: 'AI',
67
+ };
68
+ /** The layer of the patterns Magma ships; a product layer names its product instead. */
69
+ export const MAGMA_LAYER = 'magma';
70
+ /**
71
+ * The one variable that a case leaves out to mean a single value instead of any: a case that
72
+ * does not say `decision` holds when the person has no decision to make (#1174, "How a pattern
73
+ * is defined"). Every other variable left out means any of its values.
74
+ */
75
+ export const NONE_WHEN_LEFT_OUT = 'decision';
76
+ /** The keys only the cases and the rules of a domain have: the principle, where it lives. */
77
+ const FOUNDATION_KEYS = ['serves', 'carried-by', 'carried-by-planned'];
78
+ /** The keys of each kind of entry that are not variables: no variable may take their names. */
79
+ const ENTRY_KEYS = {
80
+ case: ['id', 'where', 'use', 'see', 'magma-gap', 'rules', ...FOUNDATION_KEYS],
81
+ gap: ['note'],
82
+ 'not-applicable': ['why'],
83
+ };
84
+ const RESERVED = new Set(Object.values(ENTRY_KEYS).flat());
85
+ const PATTERN_KEYS = new Set([
86
+ 'id',
87
+ 'aliases',
88
+ 'kind',
89
+ 'title',
90
+ 'group',
91
+ 'layer',
92
+ 'status',
93
+ 'need',
94
+ 'principle',
95
+ 'keywords',
96
+ 'not-for',
97
+ 'assumptions',
98
+ 'high-stakes',
99
+ 'components',
100
+ 'related',
101
+ 'validated-on',
102
+ 'variables',
103
+ 'cases',
104
+ 'gaps',
105
+ 'not-applicable',
106
+ 'always-true',
107
+ 'open-choices',
108
+ 'situations',
109
+ 'regions',
110
+ 'used-by',
111
+ ]);
112
+ /** The fields only a building block has, and the ones it has in their place. */
113
+ const BLOCK_KEYS = ['regions', 'used-by'];
114
+ const NOT_IN_BLOCK = ['cases', 'gaps', 'not-applicable'];
115
+ const REGION_KEYS = new Set(['id', 'when', 'required', 'what', 'use']);
116
+ const LAYER_KEYS = new Set(['id', 'extends', 'layer', 'narrows', 'situations']);
117
+ const RULE_KEYS = new Set([
118
+ 'id',
119
+ 'rule',
120
+ 'checked-by',
121
+ 'lint',
122
+ 'lint-planned',
123
+ 'note',
124
+ 'from',
125
+ ...FOUNDATION_KEYS,
126
+ ]);
127
+ const CHOICE_KEYS = new Set(['id', 'default', 'may']);
128
+ /** The keys of a situation; `id` only in a block, where it names the preview of the situation. */
129
+ const SITUATION_KEYS = new Set(['id', 'situation', 'case', 'use', 'note']);
130
+ /* ---- reading ------------------------------------------------------------------------ */
131
+ /** The frontmatter and the body of a Markdown file; throws when it has no frontmatter. */
132
+ export const splitFrontmatter = (text) => {
133
+ const match = /^---\n([\s\S]*?)\n---\n?([\s\S]*)$/.exec(text.replace(/\r\n/g, '\n'));
134
+ if (!match)
135
+ throw new Error('no frontmatter between two --- lines at the top');
136
+ return { front: match[1], body: match[2] };
137
+ };
138
+ /** A pattern or a layer file, parsed. Throws on a file whose frontmatter is not YAML. */
139
+ export const parsePatternFile = (text, file = '') => {
140
+ const { front, body } = splitFrontmatter(text);
141
+ const data = parse(front);
142
+ if (!data || typeof data !== 'object' || Array.isArray(data))
143
+ throw new Error(`${file}: the frontmatter is not a mapping`);
144
+ return { file, data: data, body };
145
+ };
146
+ /** Every `<id>.md` of a folder, parsed, by file name; none when the folder does not exist. */
147
+ export const readPatternDir = (dir) => existsSync(dir)
148
+ ? readdirSync(dir)
149
+ .filter((name) => name.endsWith('.md'))
150
+ .sort()
151
+ .map((name) => {
152
+ const file = path.join(dir, name);
153
+ return parsePatternFile(readFileSync(file, 'utf8'), file);
154
+ })
155
+ : [];
156
+ export const isLayer = (data) => 'extends' in data;
157
+ /* ---- the cases ---------------------------------------------------------------------- */
158
+ const variableNames = (pattern) => Object.keys(pattern.variables ?? {});
159
+ /** Does an entry hold for a combination: a variable it gives, any of its values; one it leaves out, any value (none for `decision`). */
160
+ export const entryMatches = (entry, combo, names) => names.every((name) => name in entry
161
+ ? [entry[name]].flat().includes(combo[name])
162
+ : name === NONE_WHEN_LEFT_OUT
163
+ ? combo[name] === 'none'
164
+ : true);
165
+ /** Every combination of the values of the variables, the given ones fixed. */
166
+ export const combinations = (variables, fixed = {}) => {
167
+ let combos = [{}];
168
+ for (const [name, { values }] of Object.entries(variables))
169
+ combos = combos.flatMap((combo) => (name in fixed ? [fixed[name]] : values).map((value) => ({ ...combo, [name]: value })));
170
+ return combos;
171
+ };
172
+ const entriesOf = (pattern) => [
173
+ ...(pattern.cases ?? []).map((entry) => ({ kind: 'case', entry })),
174
+ ...(pattern.gaps ?? []).map((entry) => ({ kind: 'gap', entry })),
175
+ ...(pattern['not-applicable'] ?? []).map((entry) => ({ kind: 'not-applicable', entry })),
176
+ ];
177
+ /** Does a region show for a combination: every variable of its `when` has one of its values. */
178
+ export const regionShows = (region, combo) => Object.entries(region.when ?? {}).every(([name, value]) => [value].flat().includes(combo[name]));
179
+ /**
180
+ * The check of #1174: every combination in exactly one case, or in a gap or a not-applicable
181
+ * entry. In a building block (#1210), every combination shows a required region at least: the
182
+ * block is never left with nothing that makes it the block.
183
+ */
184
+ export const coverage = (pattern) => {
185
+ if (pattern.kind === BLOCK) {
186
+ const combos = variableNames(pattern).length ? combinations(pattern.variables) : [];
187
+ const required = (pattern.regions ?? []).filter((one) => one.required === true);
188
+ return {
189
+ total: combos.length,
190
+ none: combos.filter((combo) => !required.some((one) => regionShows(one, combo))),
191
+ conflicts: [],
192
+ of: 'regions',
193
+ };
194
+ }
195
+ const names = variableNames(pattern);
196
+ const entries = entriesOf(pattern);
197
+ const combos = names.length ? combinations(pattern.variables) : [];
198
+ const result = { total: combos.length, none: [], conflicts: [] };
199
+ for (const combo of combos) {
200
+ const hits = entries.filter(({ entry }) => entryMatches(entry, combo, names));
201
+ if (!hits.length)
202
+ result.none.push(combo);
203
+ const cases = hits.filter((hit) => hit.kind === 'case');
204
+ if (cases.length > 1)
205
+ result.conflicts.push({ combo, cases: cases.map(({ entry }) => String(entry.id)) });
206
+ }
207
+ return result;
208
+ };
209
+ /** The coverage as the check reports it: the combinations with no entry and the ones two cases hold for, five of each at most. */
210
+ export const coverageErrors = ({ total, none, conflicts, of }) => {
211
+ const pairs = (combo) => Object.entries(combo)
212
+ .map(([name, value]) => `${name}=${value}`)
213
+ .join(' ');
214
+ const errors = [];
215
+ if (none.length)
216
+ errors.push(`${none.length} of ${total} combinations ${of === 'regions' ? 'show no required region' : 'have no case, gap or not-applicable entry'}, such as:\n${none
217
+ .slice(0, 5)
218
+ .map((combo) => ` ${pairs(combo)}`)
219
+ .join('\n')}`);
220
+ for (const { combo, cases } of conflicts.slice(0, 5))
221
+ errors.push(`two cases on one combination, ${cases.join(' and ')}: ${pairs(combo)}`);
222
+ return errors;
223
+ };
224
+ /**
225
+ * The case for a situation: the values the agent knows, the others open (`decision` left out
226
+ * means none, as in a case). Throws on a variable or a value the pattern does not have.
227
+ */
228
+ export const answer = (pattern, known) => {
229
+ const variables = pattern.variables ?? {};
230
+ const names = Object.keys(variables);
231
+ assertKnown(pattern, known);
232
+ const fixed = NONE_WHEN_LEFT_OUT in variables && !(NONE_WHEN_LEFT_OUT in known)
233
+ ? { ...known, [NONE_WHEN_LEFT_OUT]: 'none' }
234
+ : known;
235
+ const entries = entriesOf(pattern);
236
+ const combos = combinations(variables, fixed);
237
+ // what answers a combination: its cases; with none, its first gap; else its first
238
+ // not-applicable entry (two reasons for the same "not applicable" make no difference)
239
+ const found = combos.map((combo) => {
240
+ const matching = entries.flatMap((hit, index) => entryMatches(hit.entry, combo, names) ? [index] : []);
241
+ const cases = matching.filter((index) => entries[index].kind === 'case');
242
+ if (cases.length)
243
+ return cases;
244
+ const gap = matching.find((index) => entries[index].kind === 'gap');
245
+ return gap !== undefined ? [gap] : matching.slice(0, 1);
246
+ });
247
+ // a variable is still missing when, the others equal, two of its values lead to different entries
248
+ const missing = names.filter((name) => {
249
+ if (name in fixed)
250
+ return false;
251
+ const byRest = new Map();
252
+ combos.forEach((combo, index) => {
253
+ const rest = names
254
+ .filter((one) => one !== name)
255
+ .map((one) => combo[one])
256
+ .join('|');
257
+ byRest.set(rest, (byRest.get(rest) ?? new Set()).add(found[index].join(',')));
258
+ });
259
+ return [...byRest.values()].some((keys) => keys.size > 1);
260
+ });
261
+ const hits = [...new Set(found.flat())].sort((a, b) => a - b).map((index) => entries[index]);
262
+ return { hits, missing };
263
+ };
264
+ /** Throws on a variable or a value the pattern does not have. */
265
+ const assertKnown = (pattern, known) => {
266
+ const variables = pattern.variables ?? {};
267
+ for (const [name, value] of Object.entries(known)) {
268
+ if (!(name in variables))
269
+ throw new Error(`${pattern.id} has no variable ${name}: its variables are ${Object.keys(variables).join(', ')}.`);
270
+ if (!variables[name].values.includes(value))
271
+ throw new Error(`${name} of ${pattern.id} is one of ${variables[name].values.join(', ')}, not ${value}.`);
272
+ }
273
+ };
274
+ /**
275
+ * The regions of a building block for a situation (#1210): the values the agent knows, the
276
+ * others open. A region shows when its `when` holds; one that holds for some of the open values
277
+ * only waits on them. Throws on a variable or a value the block does not have.
278
+ */
279
+ export const regionsFor = (pattern, known) => {
280
+ assertKnown(pattern, known);
281
+ const combos = combinations(pattern.variables ?? {}, known);
282
+ const regions = [];
283
+ const depends = [];
284
+ for (const region of pattern.regions ?? []) {
285
+ const shown = combos.filter((combo) => regionShows(region, combo)).length;
286
+ if (shown === combos.length)
287
+ regions.push(region);
288
+ else if (shown)
289
+ depends.push(region);
290
+ }
291
+ const missing = variableNames(pattern).filter((name) => !(name in known) && depends.some((one) => name in (one.when ?? {})));
292
+ return { regions, depends, missing };
293
+ };
294
+ /**
295
+ * The situations of a building block that have an id, the name of their preview
296
+ * (previews/<block>/<id>.html), in the order of the file; one that names another pattern
297
+ * (`use`) has none (#1210, the maintainer's choice on 2026-11-03).
298
+ */
299
+ export const situationsWithId = (pattern) => pattern.kind === BLOCK
300
+ ? (pattern.situations ?? []).filter((one) => isString(one?.id) && one.use === undefined)
301
+ : [];
302
+ /** The ids of the situations of a building block, in the order of the file. */
303
+ export const situationIds = (pattern) => situationsWithId(pattern).map((one) => one.id);
304
+ /**
305
+ * The situations of a building block the values match exactly, in the order of the file: every
306
+ * variable of the block given, each equal to the value the situation gives. None while a
307
+ * variable is still unknown: a preview shows one situation, with every region decided.
308
+ */
309
+ export const situationsMatching = (pattern, known) => {
310
+ const names = variableNames(pattern);
311
+ if (!names.length || names.some((name) => !(name in known)))
312
+ return [];
313
+ return situationsWithId(pattern).filter((one) => names.every((name) => one[name] === known[name]));
314
+ };
315
+ /* ---- the format --------------------------------------------------------------------- */
316
+ const ID = /^[a-z0-9]+(-[a-z0-9]+)*$/;
317
+ const isString = (value) => typeof value === 'string' && value !== '';
318
+ const isStringList = (value) => Array.isArray(value) && value.every(isString);
319
+ export const parseUse = (use) => {
320
+ const [tag, ...rest] = use.trim().split(/\s+/);
321
+ if (!tag || !/^mds-[a-z0-9-]+$/.test(tag))
322
+ return undefined;
323
+ const attributes = [];
324
+ for (const part of rest) {
325
+ const match = /^([a-z][a-z0-9-]*)(?:=(\S+))?$/.exec(part);
326
+ if (!match)
327
+ return undefined;
328
+ attributes.push(match[2] === undefined ? { name: match[1] } : { name: match[1], value: match[2] });
329
+ }
330
+ return { tag, attributes };
331
+ };
332
+ export const parseCarrier = (text) => {
333
+ const value = text.trim();
334
+ if (value.startsWith('mds-')) {
335
+ const use = parseUse(value);
336
+ return use && { kind: 'component', text: value, use };
337
+ }
338
+ if (/^--[a-z0-9-]+$/.test(value))
339
+ return { kind: 'token', text: value };
340
+ if (/^magma\/[a-z0-9-]+$/.test(value))
341
+ return { kind: 'lint', text: value };
342
+ if (/^[a-z][a-z0-9-]*$/.test(value))
343
+ return { kind: 'utility', text: value };
344
+ return undefined;
345
+ };
346
+ /**
347
+ * A rule a case relies on (`rules`, #1198): `<domain>/<id>`, the short form of `{ id, from }`
348
+ * the rhythm decided on #1189 ("The ids"), as the docs and the decisions write a citation.
349
+ */
350
+ export const parseRuleRef = (text) => {
351
+ const [from, id, ...rest] = text.trim().split('/');
352
+ return from && id && !rest.length && ID.test(from) && ID.test(id) ? { from, id } : undefined;
353
+ };
354
+ /** What is wrong in the format of a Magma pattern or a product's own one: complete, typed, its entries on its own variables. */
355
+ export const formatErrors = ({ file, data }) => {
356
+ const errors = [];
357
+ const say = (message) => errors.push(message);
358
+ for (const key of Object.keys(data))
359
+ if (!PATTERN_KEYS.has(key))
360
+ say(`unknown field ${key}`);
361
+ const isDomain = data.kind === FOUNDATION;
362
+ for (const key of ['id', 'title', 'group', 'layer', 'status', 'need', 'kind'])
363
+ if (key === 'group' && isDomain) {
364
+ if (data.group !== undefined)
365
+ say('a domain of Foundation has no group: Foundation is its place');
366
+ }
367
+ else if (!isString(data[key]))
368
+ say(`${key} is required, as text`);
369
+ if (isString(data.id) && !ID.test(data.id))
370
+ say(`id ${data.id} is not kebab-case`);
371
+ if (file && isString(data.id) && path.basename(file) !== `${data.id}.md`)
372
+ say(`the file of ${data.id} is ${data.id}.md`);
373
+ if (isString(data.kind) && !PATTERN_KINDS.includes(data.kind))
374
+ say(`kind is one of ${PATTERN_KINDS.join(', ')}`);
375
+ if (isString(data.status) && !PATTERN_STATUSES.includes(data.status))
376
+ say(`status is one of ${PATTERN_STATUSES.join(', ')}`);
377
+ if (!isDomain && isString(data.group) && !(data.group in PATTERN_GROUPS))
378
+ say(`group is one of ${Object.keys(PATTERN_GROUPS).join(', ')}`);
379
+ if (data.aliases !== undefined && !isStringList(data.aliases))
380
+ say('aliases is a list of ids');
381
+ for (const key of ['keywords', 'assumptions', 'components', 'related', 'validated-on'])
382
+ if (data[key] !== undefined && !Array.isArray(data[key]))
383
+ say(`${key} is a list`);
384
+ if (data['high-stakes'] !== undefined && typeof data['high-stakes'] !== 'boolean')
385
+ say('high-stakes is true or false');
386
+ for (const [index, one] of (data['not-for'] ?? []).entries())
387
+ if (!isString(one?.need) || !isString(one?.use))
388
+ say(`not-for ${index + 1} has a need and the pattern to use`);
389
+ // a building block lays out regions where a pattern and a domain have cases (#1210)
390
+ const isBlock = data.kind === BLOCK;
391
+ if (isBlock) {
392
+ for (const key of NOT_IN_BLOCK)
393
+ if (data[key] !== undefined)
394
+ say(`${key} belongs to a pattern: a building block has regions, each saying when it shows`);
395
+ }
396
+ else
397
+ for (const key of BLOCK_KEYS)
398
+ if (data[key] !== undefined)
399
+ say(`${key} belongs to a building block (kind ${BLOCK})`);
400
+ if (data.status === 'candidate')
401
+ return errors;
402
+ // a draft or a decided pattern answers its need
403
+ for (const key of ['principle'])
404
+ if (!isString(data[key]))
405
+ say(`${key} is required, as text`);
406
+ const lists = [
407
+ 'keywords',
408
+ ...(isBlock ? ['regions', 'used-by'] : ['cases']),
409
+ 'always-true',
410
+ 'situations',
411
+ 'validated-on',
412
+ ];
413
+ for (const key of lists)
414
+ if (!Array.isArray(data[key]))
415
+ say(`${key} is required, as a list`);
416
+ if (isBlock && Array.isArray(data['used-by'])) {
417
+ if (!isStringList(data['used-by']))
418
+ say('used-by is a list of the ids of patterns');
419
+ else if (new Set(data['used-by']).size < BLOCK_USED_BY)
420
+ say(`used-by names the patterns the block comes back in, ${BLOCK_USED_BY} at least: a section becomes a block when it comes back`);
421
+ }
422
+ const variables = data.variables;
423
+ if (!variables || typeof variables !== 'object' || !Object.keys(variables).length) {
424
+ say('variables is required: what decides the case');
425
+ return errors;
426
+ }
427
+ for (const [name, variable] of Object.entries(variables)) {
428
+ if (RESERVED.has(name))
429
+ say(`no variable may be named ${name}: it is a key of the entries`);
430
+ else if (isBlock && SITUATION_KEYS.has(name))
431
+ say(`no variable of a block may be named ${name}: it is a key of its situations`);
432
+ if (!ID.test(name))
433
+ say(`variable ${name} is not kebab-case`);
434
+ if (!variable || !isStringList(variable.values) || !variable.values.length)
435
+ say(`variable ${name} has its values, a list of text (quote yes, no and numbers)`);
436
+ else if (new Set(variable.values).size !== variable.values.length)
437
+ say(`variable ${name} repeats a value`);
438
+ if (!isString(variable?.means))
439
+ say(`variable ${name} says what it means`);
440
+ for (const key of Object.keys(variable ?? {}))
441
+ if (key !== 'values' && key !== 'means')
442
+ say(`variable ${name} has an unknown field ${key}`);
443
+ }
444
+ if (NONE_WHEN_LEFT_OUT in variables && !variables[NONE_WHEN_LEFT_OUT]?.values?.includes('none'))
445
+ say(`variable ${NONE_WHEN_LEFT_OUT} has the value none: a case that leaves it out means none`);
446
+ const entry = (kind, one, label) => {
447
+ for (const [key, value] of Object.entries(one)) {
448
+ if (ENTRY_KEYS[kind].includes(key))
449
+ continue;
450
+ const variable = variables[key];
451
+ if (!variable) {
452
+ say(`${label}: ${key} is neither a variable nor a field of a ${kind}`);
453
+ continue;
454
+ }
455
+ const values = [value].flat();
456
+ for (const each of values)
457
+ if (typeof each !== 'string' || !variable.values?.includes(each))
458
+ say(`${label}: ${key} is one of ${variable.values?.join(', ')}, not ${String(each)}`);
459
+ }
460
+ };
461
+ // the principle and the carriers of a case or a rule of a domain; a pattern has neither
462
+ const grounded = (one, label, rule = false) => {
463
+ if (!isDomain) {
464
+ for (const key of FOUNDATION_KEYS)
465
+ if (one?.[key] !== undefined)
466
+ say(`${label}: ${key} belongs to a domain of Foundation (kind ${FOUNDATION})`);
467
+ return;
468
+ }
469
+ const serves = [one?.serves ?? []].flat();
470
+ if (!serves.length)
471
+ say(`${label}: serves is required: the principle it serves, ${PRINCIPLES.join(', ')}`);
472
+ for (const each of serves)
473
+ if (!PRINCIPLES.includes(each))
474
+ say(`${label}: serves is one of ${PRINCIPLES.join(', ')}, not ${String(each)}`);
475
+ const named = new Set();
476
+ for (const key of ['carried-by', 'carried-by-planned']) {
477
+ const list = one?.[key];
478
+ if (list === undefined)
479
+ continue;
480
+ if (!isStringList(list)) {
481
+ say(`${label}: ${key} is a list of carriers`);
482
+ continue;
483
+ }
484
+ for (const text of list) {
485
+ const carrier = parseCarrier(text);
486
+ if (!carrier)
487
+ say(`${label}: ${key} "${text}" is not a component (mds-tag attribute=value), a custom property (--name), a lint rule (magma/<rule>) or a utility (one class)`);
488
+ else if (rule && carrier.kind === 'lint')
489
+ say(`${label}: the lint rule of an always-true rule goes in lint or lint-planned`);
490
+ if (named.has(text))
491
+ say(`${label}: ${text} is named twice in its carriers`);
492
+ named.add(text);
493
+ }
494
+ }
495
+ };
496
+ const caseIds = new Set();
497
+ for (const [index, one] of (data.cases ?? []).entries()) {
498
+ const label = `case ${isString(one?.id) ? one.id : index + 1}`;
499
+ if (!isString(one?.id) || !ID.test(one.id))
500
+ say(`${label}: id is required, kebab-case`);
501
+ else if (caseIds.has(one.id))
502
+ say(`${label}: the id is used twice`);
503
+ else
504
+ caseIds.add(one.id);
505
+ if (!isString(one?.where))
506
+ say(`${label}: where is required`);
507
+ if (one?.use !== undefined) {
508
+ if (!isStringList(one.use))
509
+ say(`${label}: use is a list of "tag attribute=value"`);
510
+ else
511
+ for (const use of one.use)
512
+ if (!parseUse(use))
513
+ say(`${label}: use "${use}" is not "mds-tag attribute=value ..."`);
514
+ }
515
+ for (const key of ['see', 'magma-gap'])
516
+ if (one?.[key] !== undefined && !isString(one[key]))
517
+ say(`${label}: ${key} is text`);
518
+ if (one?.rules !== undefined) {
519
+ if (!isStringList(one.rules))
520
+ say(`${label}: rules is a list of <domain>/<id>, such as rhythm/inline`);
521
+ else
522
+ for (const [index, text] of one.rules.entries()) {
523
+ if (!parseRuleRef(text))
524
+ say(`${label}: rules "${text}" is not <domain>/<id>, such as rhythm/inline`);
525
+ if (one.rules.indexOf(text) !== index)
526
+ say(`${label}: ${text} is named twice in its rules`);
527
+ }
528
+ }
529
+ entry('case', one, label);
530
+ grounded(one, label);
531
+ }
532
+ for (const [index, one] of (data.gaps ?? []).entries()) {
533
+ if (!isString(one?.note))
534
+ say(`gap ${index + 1}: note is required: the question left open`);
535
+ entry('gap', one, `gap ${index + 1}`);
536
+ }
537
+ for (const [index, one] of (data['not-applicable'] ?? []).entries()) {
538
+ if (!isString(one?.why))
539
+ say(`not-applicable ${index + 1}: why is required`);
540
+ entry('not-applicable', one, `not-applicable ${index + 1}`);
541
+ }
542
+ if (data.status === 'decided' && data.gaps?.length)
543
+ say('a decided pattern has no gaps: decide them, or set the status to draft');
544
+ const regionIds = new Set();
545
+ for (const [index, one] of (data.regions ?? []).entries()) {
546
+ const label = `region ${isString(one?.id) ? one.id : index + 1}`;
547
+ for (const key of Object.keys(one ?? {}))
548
+ if (!REGION_KEYS.has(key))
549
+ say(`${label}: unknown field ${key}`);
550
+ if (!isString(one?.id) || !ID.test(one.id))
551
+ say(`${label}: id is required, kebab-case`);
552
+ else if (regionIds.has(one.id))
553
+ say(`${label}: the id is used twice`);
554
+ else
555
+ regionIds.add(one.id);
556
+ if (!isString(one?.what))
557
+ say(`${label}: what is required: what goes in it`);
558
+ if (one?.required !== undefined && typeof one.required !== 'boolean')
559
+ say(`${label}: required is true or false`);
560
+ if (one?.use !== undefined) {
561
+ if (!isStringList(one.use))
562
+ say(`${label}: use is a list of "tag attribute=value"`);
563
+ else
564
+ for (const use of one.use)
565
+ if (!parseUse(use))
566
+ say(`${label}: use "${use}" is not "mds-tag attribute=value ..."`);
567
+ }
568
+ if (one?.when === undefined)
569
+ continue;
570
+ if (!one.when || typeof one.when !== 'object' || Array.isArray(one.when)) {
571
+ say(`${label}: when maps variables to the values it shows for`);
572
+ continue;
573
+ }
574
+ for (const [key, value] of Object.entries(one.when)) {
575
+ const variable = variables[key];
576
+ if (!variable)
577
+ say(`${label}: when names ${key}, which is not a variable`);
578
+ else
579
+ for (const each of [value].flat())
580
+ if (typeof each !== 'string' || !variable.values?.includes(each))
581
+ say(`${label}: ${key} is one of ${variable.values?.join(', ')}, not ${String(each)}`);
582
+ }
583
+ }
584
+ if (isBlock && data.regions?.length && !data.regions.some((one) => one?.required === true))
585
+ say('a building block has a required region at least: what makes it the block');
586
+ const ruleIds = new Set();
587
+ for (const [index, rule] of (data['always-true'] ?? []).entries()) {
588
+ const label = `always-true ${isString(rule?.id) ? rule.id : index + 1}`;
589
+ if (!isString(rule?.id) || !ID.test(rule.id))
590
+ say(`${label}: id is required, kebab-case`);
591
+ else if (ruleIds.has(rule.id))
592
+ say(`${label}: the id is used twice`);
593
+ else if (isDomain && caseIds.has(rule.id))
594
+ say(`${label}: a case of the domain has this id: a citation would name both`);
595
+ else
596
+ ruleIds.add(rule.id);
597
+ for (const key of Object.keys(rule ?? {}))
598
+ if (!RULE_KEYS.has(key))
599
+ say(`${label}: unknown field ${key}`);
600
+ if (rule?.from !== undefined) {
601
+ if (Object.keys(rule).some((key) => key !== 'id' && key !== 'from'))
602
+ say(`${label}: a rule cited from another pattern has only its id and from`);
603
+ continue;
604
+ }
605
+ if (!isString(rule?.rule))
606
+ say(`${label}: rule is required`);
607
+ if (rule?.['checked-by'] === 'lint') {
608
+ if (!isString(rule.lint))
609
+ say(`${label}: checked by lint names the rule in lint`);
610
+ }
611
+ else if (rule?.['checked-by'] === 'review') {
612
+ if (rule.lint !== undefined)
613
+ say(`${label}: checked by review names no lint (lint-planned for one to write)`);
614
+ }
615
+ else
616
+ say(`${label}: checked-by is review or lint`);
617
+ for (const key of ['lint', 'lint-planned'])
618
+ if (rule?.[key] !== undefined && !/^magma\/[a-z0-9-]+$/.test(String(rule[key])))
619
+ say(`${label}: ${key} is magma/<rule>`);
620
+ grounded(rule, label, true);
621
+ }
622
+ for (const [index, choice] of (data['open-choices'] ?? []).entries()) {
623
+ const label = `open-choices ${isString(choice?.id) ? choice.id : index + 1}`;
624
+ if (!isString(choice?.id) || !ID.test(choice.id))
625
+ say(`${label}: id is required, kebab-case`);
626
+ else if (ruleIds.has(choice.id))
627
+ say(`${label}: the id is used twice`);
628
+ else
629
+ ruleIds.add(choice.id);
630
+ for (const key of Object.keys(choice ?? {}))
631
+ if (!CHOICE_KEYS.has(key))
632
+ say(`${label}: unknown field ${key}`);
633
+ if (choice?.default === undefined || choice.default === null)
634
+ say(`${label}: default is required`);
635
+ if (!isString(choice?.may))
636
+ say(`${label}: may is required: what a product may choose`);
637
+ }
638
+ // the id of a situation of a block names its preview: required once a Magma block is decided
639
+ situationErrors(data.situations ?? [], 'situation', say, isBlock
640
+ ? { variables, idRequired: data.layer === MAGMA_LAYER && data.status === 'decided' }
641
+ : undefined);
642
+ return errors;
643
+ };
644
+ /**
645
+ * What is wrong in the situations of a pattern or a layer. A building block has no cases: its
646
+ * situations give a value of every variable, so the regions they show are known, or name the
647
+ * pattern to use instead. A situation of a block that gives the variables has an id, the name
648
+ * of its preview (previews/<block>/<id>.html, the maintainer's choice on 2026-11-03: a situation
649
+ * gives every variable and the words, as a case does): kebab-case, unique in the block,
650
+ * required in a decided block of Magma, optional in a draft and in the situations a product
651
+ * adds, never on one that names another pattern (that pattern shows it). A situation of a
652
+ * pattern names its case, so it has no id.
653
+ */
654
+ const situationErrors = (situations, label, say, block) => {
655
+ const ids = new Set();
656
+ for (const [index, one] of situations.entries()) {
657
+ const at = `${label} ${index + 1}`;
658
+ if (!isString(one?.situation))
659
+ say(`${at}: situation is required`);
660
+ if (block) {
661
+ const { variables } = block;
662
+ for (const [key, value] of Object.entries(one ?? {})) {
663
+ if (key === 'case')
664
+ say(`${at}: a block has no cases: give the values of its variables`);
665
+ else if (key in variables) {
666
+ if (typeof value !== 'string' || !variables[key].values?.includes(value))
667
+ say(`${at}: ${key} is one of ${variables[key].values?.join(', ')}, not ${String(value)}`);
668
+ }
669
+ else if (!SITUATION_KEYS.has(key))
670
+ say(`${at}: unknown field ${key}`);
671
+ }
672
+ if (one?.use !== undefined) {
673
+ if (one.id !== undefined)
674
+ say(`${at}: a situation another pattern answers has no id: its previews are that pattern's`);
675
+ continue;
676
+ }
677
+ const left = Object.keys(variables).filter((name) => !(name in (one ?? {})));
678
+ if (left.length)
679
+ say(`${at}: a situation of a block gives every variable; ${left.join(', ')} missing`);
680
+ const id = one?.id;
681
+ if (id === undefined) {
682
+ if (block.idRequired)
683
+ say(`${at}: id is required, kebab-case: it names the preview of the situation`);
684
+ }
685
+ else if (!isString(id) || !ID.test(id))
686
+ say(`${at}: id is kebab-case, not ${String(id)}`);
687
+ else if (ids.has(id))
688
+ say(`${at}: the id ${id} is used twice`);
689
+ else if (block.taken?.has(id))
690
+ say(`${at}: the id ${id} is a situation of the block already`);
691
+ else
692
+ ids.add(id);
693
+ continue;
694
+ }
695
+ for (const key of Object.keys(one ?? {}))
696
+ if (!SITUATION_KEYS.has(key))
697
+ say(`${at}: unknown field ${key}`);
698
+ if (one?.id !== undefined)
699
+ say(`${at}: id belongs to a situation of a building block (kind ${BLOCK}): a situation of a pattern names its case`);
700
+ if ((one?.case === undefined) === (one?.use === undefined))
701
+ say(`${at}: a situation has a case, or the pattern to use instead`);
702
+ if (one?.case !== undefined && !isString(one.case) && !isStringList(one.case))
703
+ say(`${at}: case is a case id or a list of them`);
704
+ }
705
+ };
706
+ /* ---- the data of the release -------------------------------------------------------- */
707
+ /** Global attributes a `use` may set on any component. */
708
+ const GLOBAL_ATTRIBUTE = /^(slot|role|id|title|lang|dir|hidden|tabindex|aria-[a-z]+|data-[a-z-]+)$/;
709
+ /** What a component and its attributes lack in the release: the tag, an attribute, a value it takes; a deprecated attribute. */
710
+ const useErrors = (use, components) => {
711
+ const component = components.get(use.tag);
712
+ if (!component)
713
+ return [`${use.tag} is not a component of this release`];
714
+ const errors = [];
715
+ for (const { name, value } of use.attributes) {
716
+ if (GLOBAL_ATTRIBUTE.test(name))
717
+ continue;
718
+ const prop = component.props.get(name);
719
+ if (!prop) {
720
+ errors.push(`${use.tag} has no attribute ${name}`);
721
+ continue;
722
+ }
723
+ if (prop.deprecation !== undefined)
724
+ errors.push(`${name} of ${use.tag} is deprecated: ${prop.deprecation}`);
725
+ if (value === undefined)
726
+ continue;
727
+ if (prop.boolean && !prop.values?.length)
728
+ errors.push(`${name} of ${use.tag} is a boolean: write it bare`);
729
+ else if (prop.values && !prop.values.includes(value))
730
+ errors.push(`${name} of ${use.tag} is one of ${prop.values.join(', ')}, not ${value}`);
731
+ }
732
+ return errors;
733
+ };
734
+ /** Every component and attribute a pattern names exists in the release, with a value it takes. */
735
+ export const componentErrors = (pattern, components) => {
736
+ const errors = [];
737
+ const listed = new Set(pattern.components ?? []);
738
+ for (const tag of listed)
739
+ if (!components.has(tag))
740
+ errors.push(`components: ${tag} is not a component of this release`);
741
+ // the cases of a pattern, the regions of a block
742
+ const uses = [
743
+ ...(pattern.cases ?? []).map((one) => [`case ${one.id}`, one.use]),
744
+ ...(pattern.regions ?? []).map((one) => [`region ${one.id}`, one.use]),
745
+ ];
746
+ for (const [label, list] of uses)
747
+ for (const text of list ?? []) {
748
+ const use = parseUse(text);
749
+ if (!use)
750
+ continue;
751
+ if (components.has(use.tag) && !listed.has(use.tag))
752
+ errors.push(`${label}: ${use.tag} is missing from components`);
753
+ errors.push(...useErrors(use, components).map((error) => `${label}: ${error}`));
754
+ }
755
+ return errors;
756
+ };
757
+ /** Why the release lacks a carrier, or undefined when it has it. */
758
+ const carrierMissing = (carrier, release) => {
759
+ switch (carrier.kind) {
760
+ case 'component':
761
+ return useErrors(carrier.use, release.components).join('; ') || undefined;
762
+ case 'token': {
763
+ if (release.theme.properties.has(carrier.text) || release.tokens.has(carrier.text))
764
+ return undefined;
765
+ const style = release.styles.get(carrier.text);
766
+ if (!style)
767
+ return `the release has no custom property ${carrier.text}`;
768
+ return style.visibility === 'internal'
769
+ ? `${carrier.text} is internal to ${style.tags.join(', ')}: a carrier is public`
770
+ : undefined;
771
+ }
772
+ case 'utility':
773
+ return release.theme.classes.has(carrier.text)
774
+ ? undefined
775
+ : `the theme makes no class ${carrier.text}`;
776
+ case 'lint':
777
+ return release.lintRules.has(carrier.text)
778
+ ? undefined
779
+ : `the lint has no rule ${carrier.text}`;
780
+ }
781
+ };
782
+ /**
783
+ * Every carrier of a domain is in the release; a planned one is not yet, and once it is, the
784
+ * check asks to move it to carried-by, as a planned lint rule (#1196).
785
+ */
786
+ export const carrierErrors = (pattern, release) => {
787
+ const errors = [];
788
+ const entries = [
789
+ ...(pattern.cases ?? []).map((one) => [`case ${one.id}`, one]),
790
+ ...(pattern['always-true'] ?? []).map((one) => [`always-true ${one.id}`, one]),
791
+ ];
792
+ for (const [label, one] of entries) {
793
+ for (const text of one['carried-by'] ?? []) {
794
+ const carrier = parseCarrier(text);
795
+ const missing = carrier && carrierMissing(carrier, release);
796
+ if (missing)
797
+ errors.push(`${label}: carried by ${text}, but ${missing}`);
798
+ }
799
+ for (const text of one['carried-by-planned'] ?? []) {
800
+ const carrier = parseCarrier(text);
801
+ if (carrier && !carrierMissing(carrier, release))
802
+ errors.push(`${label}: ${text} exists now: move it from carried-by-planned to carried-by`);
803
+ }
804
+ }
805
+ return errors;
806
+ };
807
+ /** Every rule checked by lint names a rule the lint has; a planned one, a rule it does not have yet. */
808
+ export const lintErrors = (pattern, lintRules) => {
809
+ const errors = [];
810
+ for (const rule of pattern['always-true'] ?? []) {
811
+ if (rule.lint && !lintRules.has(rule.lint))
812
+ errors.push(`always-true ${rule.id}: the lint has no rule ${rule.lint}`);
813
+ if (rule['lint-planned'] && lintRules.has(rule['lint-planned']))
814
+ errors.push(`always-true ${rule.id}: ${rule['lint-planned']} exists now: checked-by lint, lint ${rule['lint-planned']}`);
815
+ }
816
+ return errors;
817
+ };
818
+ /* ---- the links ---------------------------------------------------------------------- */
819
+ /** The patterns by id, and the ids a rename left behind. */
820
+ export const indexPatterns = (patterns) => {
821
+ const byId = new Map();
822
+ const aliases = new Map();
823
+ for (const pattern of patterns) {
824
+ byId.set(pattern.id, pattern);
825
+ for (const alias of pattern.aliases ?? [])
826
+ aliases.set(alias, pattern.id);
827
+ }
828
+ return { byId, aliases };
829
+ };
830
+ /** The rule or the relation `id` of the domain `from`, of its own (never one it cites); none when `from` is no domain. */
831
+ export const domainRule = (patterns, from, id) => {
832
+ const source = patterns.get(from);
833
+ if (source?.kind !== FOUNDATION)
834
+ return undefined;
835
+ const own = source['always-true']?.find((one) => one.id === id && !one.from);
836
+ if (own)
837
+ return { ...own, rule: own.rule ?? '', from };
838
+ const relation = source.cases?.find((one) => one.id === id);
839
+ if (!relation)
840
+ return undefined;
841
+ return {
842
+ id,
843
+ from,
844
+ rule: relation.where,
845
+ ...(relation.use ? { use: relation.use } : {}),
846
+ ...(relation.serves !== undefined ? { serves: relation.serves } : {}),
847
+ ...(relation['carried-by'] ? { 'carried-by': relation['carried-by'] } : {}),
848
+ ...(relation['carried-by-planned']
849
+ ? { 'carried-by-planned': relation['carried-by-planned'] }
850
+ : {}),
851
+ };
852
+ };
853
+ /**
854
+ * The rules of the domains a case relies on, as the answer for a situation gives them (#1198):
855
+ * those its `rules` name, then those its pattern cites from a domain in always-true, which
856
+ * hold for every case; each once, with its text. A citation that names nothing is left out:
857
+ * check.patterns, and for a product's own pattern get_pattern's layerErrors, say why. A
858
+ * building block has no cases: `{}` gives the rules its always-true cites (#1210).
859
+ */
860
+ export const rulesOfCase = (pattern, one, patterns) => {
861
+ const { byId } = indexPatterns(patterns);
862
+ const refs = [
863
+ ...(isStringList(one.rules) ? one.rules : []).map(parseRuleRef),
864
+ ...(pattern['always-true'] ?? []).map((rule) => rule.from ? { from: rule.from, id: rule.id } : undefined),
865
+ ];
866
+ const found = new Map();
867
+ for (const ref of refs) {
868
+ const rule = ref && domainRule(byId, ref.from, ref.id);
869
+ if (rule && rule.from !== pattern.id)
870
+ found.set(`${rule.from}/${rule.id}`, rule);
871
+ }
872
+ return [...found.values()];
873
+ };
874
+ /**
875
+ * The rules of the domains that govern a component, as get_component names them (#1198): a
876
+ * relation or a rule that the component carries, now or once built (`carried-by`,
877
+ * `carried-by-planned`, whatever its attributes), and a relation whose `use` writes it; by
878
+ * domain, then in the order of its file. The `components` of a domain are not read: they name
879
+ * what the domain speaks of, a component it says lacks the rule among them (mds-card in the
880
+ * rhythm), not what each rule governs.
881
+ */
882
+ export const rulesOfComponent = (patterns, tag) => {
883
+ const { byId } = indexPatterns(patterns);
884
+ const carries = (one) => [...(one['carried-by'] ?? []), ...(one['carried-by-planned'] ?? [])].some((text) => {
885
+ const carrier = parseCarrier(text);
886
+ return carrier?.kind === 'component' && carrier.use.tag === tag;
887
+ });
888
+ const writes = (one) => (one.use ?? []).some((text) => parseUse(text)?.tag === tag);
889
+ return patterns
890
+ .filter((one) => one.kind === FOUNDATION && one.status !== 'candidate')
891
+ .sort((a, b) => a.id.localeCompare(b.id))
892
+ .flatMap((domain) => [
893
+ ...(domain.cases ?? []).filter((one) => carries(one) || writes(one)),
894
+ ...(domain['always-true'] ?? []).filter((one) => !one.from && carries(one)),
895
+ ].flatMap((one) => domainRule(byId, domain.id, one.id) ?? []));
896
+ };
897
+ /** Every id a pattern cites names a pattern, a case or a rule that exists, never an old id. */
898
+ export const linkErrors = (patterns) => {
899
+ const { byId, aliases } = indexPatterns(patterns);
900
+ const found = new Map();
901
+ const ids = new Map();
902
+ for (const id of [...patterns.map((one) => one.id), ...aliases.keys()])
903
+ ids.set(id, (ids.get(id) ?? 0) + 1);
904
+ for (const pattern of patterns) {
905
+ const errors = [];
906
+ const say = (message) => errors.push(message);
907
+ if ((ids.get(pattern.id) ?? 0) > 1)
908
+ say(`the id ${pattern.id} is used twice, as an id or an alias`);
909
+ const toPattern = (where, id) => {
910
+ if (byId.has(id))
911
+ return;
912
+ if (aliases.has(id))
913
+ say(`${where}: ${id} was renamed ${aliases.get(id)}`);
914
+ else
915
+ say(`${where}: no pattern ${id}`);
916
+ };
917
+ const caseIds = new Set((pattern.cases ?? []).map((one) => one.id));
918
+ for (const id of pattern.related ?? [])
919
+ toPattern('related', id);
920
+ for (const one of pattern['not-for'] ?? [])
921
+ toPattern('not-for', one.use);
922
+ for (const one of pattern.cases ?? []) {
923
+ if (!one.see)
924
+ continue;
925
+ const isCase = caseIds.has(one.see);
926
+ const isPattern = byId.has(one.see) || aliases.has(one.see);
927
+ if (isCase && isPattern)
928
+ say(`case ${one.id}: see ${one.see} is both a case and a pattern`);
929
+ else if (!isCase)
930
+ toPattern(`case ${one.id}: see`, one.see);
931
+ }
932
+ // the rules a case relies on are those of a domain, its relations among them (#1198)
933
+ for (const one of pattern.cases ?? [])
934
+ for (const text of isStringList(one.rules) ? one.rules : []) {
935
+ const ref = parseRuleRef(text);
936
+ if (!ref)
937
+ continue;
938
+ const where = `case ${one.id}: rules ${text}`;
939
+ const source = byId.get(ref.from);
940
+ if (!source)
941
+ toPattern(where, ref.from);
942
+ else if (source.kind !== FOUNDATION)
943
+ say(`${where}: ${ref.from} is not a domain of Foundation (kind ${FOUNDATION})`);
944
+ else if (source === pattern)
945
+ say(`${where}: a domain does not cite its own rules`);
946
+ else if (!domainRule(byId, ref.from, ref.id))
947
+ say(`${where}: ${ref.from} has no rule nor case ${ref.id} of its own`);
948
+ }
949
+ for (const one of pattern.situations ?? []) {
950
+ for (const id of [one.case ?? []].flat())
951
+ if (!caseIds.has(id))
952
+ say(`situation "${one.situation}": no case ${id}`);
953
+ if (one.use)
954
+ toPattern(`situation "${one.situation}"`, one.use);
955
+ }
956
+ // a block comes back in patterns that name it among their related (#1210)
957
+ for (const id of pattern['used-by'] ?? []) {
958
+ const user = byId.get(id);
959
+ if (!user)
960
+ toPattern('used-by', id);
961
+ else if (user.kind !== 'pattern')
962
+ say(`used-by: ${id} is not a pattern (kind ${user.kind})`);
963
+ else if (user.status === 'candidate')
964
+ say(`used-by: ${id} is a candidate: it has no cases to use the block in`);
965
+ else if (!(user.related ?? []).includes(pattern.id))
966
+ say(`used-by: ${id} does not name ${pattern.id} among its related`);
967
+ }
968
+ for (const rule of pattern['always-true'] ?? []) {
969
+ if (!rule.from)
970
+ continue;
971
+ toPattern(`always-true ${rule.id}: from`, rule.from);
972
+ // a domain is cited by its rules and by its relations, its cases (#1189)
973
+ const source = byId.get(rule.from);
974
+ const cited = source?.['always-true']?.find((one) => one.id === rule.id);
975
+ const relation = source?.kind === FOUNDATION && (source.cases ?? []).some((one) => one.id === rule.id);
976
+ if (source && !relation && (!cited || cited.from))
977
+ say(source.kind === FOUNDATION
978
+ ? `always-true ${rule.id}: ${rule.from} has no rule nor case ${rule.id} of its own`
979
+ : `always-true ${rule.id}: ${rule.from} has no rule ${rule.id} of its own`);
980
+ }
981
+ if (errors.length)
982
+ found.set(pattern.id, errors);
983
+ }
984
+ return found;
985
+ };
986
+ /* ---- the layers --------------------------------------------------------------------- */
987
+ /** `magma:message-placement` -> `message-placement`. */
988
+ export const extendedId = (layer) => /^magma:([a-z0-9-]+)$/.exec(layer.extends ?? '')?.[1];
989
+ /** What a product layer may not do: name a pattern Magma lacks, narrow what is not an open choice, above all an "Always true" rule. */
990
+ export const layerErrors = ({ data }, patterns) => {
991
+ const errors = [];
992
+ const say = (message) => errors.push(message);
993
+ for (const key of Object.keys(data))
994
+ if (!LAYER_KEYS.has(key))
995
+ say(`unknown field ${key}: a layer narrows and adds situations`);
996
+ if (!isString(data.layer) || data.layer === MAGMA_LAYER)
997
+ say('layer is the name of the product');
998
+ const id = extendedId(data);
999
+ if (!id) {
1000
+ say('extends is magma:<id>');
1001
+ return errors;
1002
+ }
1003
+ const { byId, aliases } = indexPatterns(patterns);
1004
+ const base = byId.get(id);
1005
+ if (!base) {
1006
+ say(aliases.has(id) ? `${id} was renamed ${aliases.get(id)}` : `Magma has no pattern ${id}`);
1007
+ return errors;
1008
+ }
1009
+ if (base.status === 'candidate')
1010
+ say(`${id} is a candidate: there is nothing to narrow yet`);
1011
+ if (data.id !== id)
1012
+ say(`the id of the layer is the id it extends, ${id}`);
1013
+ const rules = new Set((base['always-true'] ?? []).map((one) => one.id));
1014
+ const choices = new Set((base['open-choices'] ?? []).map((one) => one.id));
1015
+ for (const key of Object.keys(data.narrows ?? {})) {
1016
+ if (rules.has(key))
1017
+ say(`narrows ${key}: an "Always true" rule holds in every product, a layer cannot change it`);
1018
+ else if (!choices.has(key))
1019
+ say(`narrows ${key}: ${id} has no open choice ${key} (${[...choices].join(', ') || 'none'})`);
1020
+ }
1021
+ const caseIds = new Set((base.cases ?? []).map((one) => one.id));
1022
+ // the situations of a layer of a block give the values of its variables, as the block's do;
1023
+ // their id is optional, and never one of the block's own, since the two lists are merged
1024
+ const isBlock = base.kind === BLOCK;
1025
+ situationErrors(data.situations ?? [], 'situation', say, isBlock && base.variables
1026
+ ? { variables: base.variables, idRequired: false, taken: new Set(situationIds(base)) }
1027
+ : undefined);
1028
+ for (const one of data.situations ?? []) {
1029
+ if (!isBlock)
1030
+ for (const each of [one.case ?? []].flat())
1031
+ if (!caseIds.has(each))
1032
+ say(`situation "${one.situation}": ${id} has no case ${each}`);
1033
+ if (one.use && !byId.has(one.use))
1034
+ say(`situation "${one.situation}": no pattern ${one.use}`);
1035
+ }
1036
+ return errors;
1037
+ };
1038
+ /** A Magma pattern with a product layer applied: its open choices narrowed, its situations added. */
1039
+ export const resolveLayer = (base, layer) => {
1040
+ if (!layer)
1041
+ return { ...base, layers: [base.layer] };
1042
+ const narrows = layer.narrows ?? {};
1043
+ return {
1044
+ ...base,
1045
+ layers: [base.layer, layer.layer],
1046
+ 'open-choices': (base['open-choices'] ?? []).map((choice) => choice.id in narrows
1047
+ ? { ...choice, value: narrows[choice.id], 'narrowed-by': layer.layer }
1048
+ : choice),
1049
+ situations: [
1050
+ ...(base.situations ?? []),
1051
+ ...(layer.situations ?? []).map((one) => ({ ...one, layer: layer.layer })),
1052
+ ],
1053
+ };
1054
+ };
1055
+ /* ---- a product's folder ------------------------------------------------------------- */
1056
+ /**
1057
+ * The files of a product's folder (magma/patterns/), its layers and its own patterns, read one
1058
+ * by one: a file that does not parse is kept with why, so one broken file leaves the others
1059
+ * readable.
1060
+ */
1061
+ export const readProjectDir = (dir) => {
1062
+ const files = [];
1063
+ const unreadable = new Map();
1064
+ if (!existsSync(dir))
1065
+ return { files, unreadable };
1066
+ for (const name of readdirSync(dir)
1067
+ .filter((one) => one.endsWith('.md'))
1068
+ .sort()) {
1069
+ const file = path.join(dir, name);
1070
+ try {
1071
+ files.push(parsePatternFile(readFileSync(file, 'utf8'), file));
1072
+ }
1073
+ catch (error) {
1074
+ // the first line of the message: the YAML parser adds the lines around the error
1075
+ const [why] = error.message.replace(`${file}: `, '').split('\n');
1076
+ unreadable.set(file, `not read: ${why.replace(/:$/, '')}`);
1077
+ }
1078
+ }
1079
+ return { files, unreadable };
1080
+ };
1081
+ /**
1082
+ * What is wrong in a product's folder, by file. A layer: what layerErrors says, and one layer
1083
+ * per pattern (the first file by name is the one applied). A pattern of the product's own: the
1084
+ * format, the cases and the components as check.patterns holds Magma's, never an id Magma has,
1085
+ * its links against Magma's patterns and the product's; not its lint rules (a product may name
1086
+ * rules of its own, which Magma cannot see) nor its body (the generator of the sections does not
1087
+ * ship).
1088
+ */
1089
+ export const projectErrors = (files, patterns, components) => {
1090
+ const found = new Map();
1091
+ const add = (file, errors) => {
1092
+ if (errors.length)
1093
+ found.set(file, [...(found.get(file) ?? []), ...errors]);
1094
+ };
1095
+ const { byId, aliases } = indexPatterns(patterns);
1096
+ const extended = new Map();
1097
+ const own = [];
1098
+ for (const file of files) {
1099
+ if (isLayer(file.data)) {
1100
+ const layer = file;
1101
+ const errors = layerErrors(layer, patterns);
1102
+ const id = extendedId(layer.data);
1103
+ const first = id && extended.get(id);
1104
+ if (first)
1105
+ errors.push(`${path.basename(first)} extends ${id} too: one layer per pattern`);
1106
+ else if (id)
1107
+ extended.set(id, file.file);
1108
+ add(file.file, errors);
1109
+ continue;
1110
+ }
1111
+ const pattern = file;
1112
+ const { data } = pattern;
1113
+ const errors = formatErrors(pattern);
1114
+ const magmaId = byId.has(data.id) ? data.id : aliases.get(data.id);
1115
+ if (magmaId)
1116
+ errors.push(`Magma has a pattern ${data.id}: extend it (extends: magma:${magmaId})`);
1117
+ if (data.layer === MAGMA_LAYER)
1118
+ errors.push('layer is the name of the product');
1119
+ if (!errors.length) {
1120
+ own.push(pattern);
1121
+ if (data.status !== 'candidate') {
1122
+ errors.push(...coverageErrors(coverage(data)));
1123
+ if (components)
1124
+ errors.push(...componentErrors(data, components));
1125
+ }
1126
+ }
1127
+ add(file.file, errors);
1128
+ }
1129
+ const links = linkErrors([...patterns, ...own.map((one) => one.data)]);
1130
+ for (const one of own)
1131
+ add(one.file, links.get(one.data.id) ?? []);
1132
+ return found;
1133
+ };
1134
+ /** The kinds in the order of the rail of the docs site: Foundation, Building blocks, Patterns. */
1135
+ const KIND_ORDER = [FOUNDATION, BLOCK, 'pattern'];
1136
+ /**
1137
+ * One line per file: the domains of Foundation first, then the building blocks, then the
1138
+ * patterns, as the rail of the docs site puts Foundation before Building blocks and Patterns;
1139
+ * within a kind by group in the order of PATTERN_GROUPS, then by id.
1140
+ */
1141
+ export const listPatterns = (patterns) => {
1142
+ const order = Object.keys(PATTERN_GROUPS);
1143
+ // a domain has no group (-1): each kind takes one more rank than there are groups
1144
+ const rank = (one) => KIND_ORDER.indexOf(one.kind) * (order.length + 1) + order.indexOf(one.group ?? '');
1145
+ return [...patterns]
1146
+ .sort((a, b) => rank(a) - rank(b) || a.id.localeCompare(b.id))
1147
+ .map((one) => ({
1148
+ id: one.id,
1149
+ title: one.title,
1150
+ ...(one.group !== undefined ? { group: one.group } : {}),
1151
+ kind: one.kind,
1152
+ status: one.status,
1153
+ layer: one.layer,
1154
+ need: String(one.need ?? '')
1155
+ .replace(/\s+/g, ' ')
1156
+ .trim(),
1157
+ validatedOn: one['validated-on'] ?? [],
1158
+ }));
1159
+ };
1160
+ /* ---- the body ----------------------------------------------------------------------- */
1161
+ /**
1162
+ * The sections of the body, in order. The generated ones are written from the frontmatter. A
1163
+ * building block has Regions and Layout where a pattern has Cases, Parts and Behaviour over time
1164
+ * (#1210): space, not time.
1165
+ */
1166
+ export const SECTION_ORDER = [
1167
+ 'When to use it',
1168
+ 'What decides it',
1169
+ 'Cases',
1170
+ 'Regions',
1171
+ 'Parts',
1172
+ 'Layout',
1173
+ 'Behaviour over time',
1174
+ 'Always true',
1175
+ 'Open choices',
1176
+ 'Situations',
1177
+ 'Accessibility',
1178
+ 'Content',
1179
+ 'Magma gaps',
1180
+ 'Decisions',
1181
+ ];
1182
+ export const GENERATED_SECTIONS = [
1183
+ 'Cases',
1184
+ 'Regions',
1185
+ 'Always true',
1186
+ 'Open choices',
1187
+ 'Situations',
1188
+ ];
1189
+ /** The sections a draft or a decided pattern must have besides the generated ones. */
1190
+ export const REQUIRED_SECTIONS = ['When to use it', 'What decides it', 'Decisions'];
1191
+ const ONLY_BLOCK = ['Regions', 'Layout'];
1192
+ const NOT_BLOCK = ['Cases', 'Parts', 'Behaviour over time'];
1193
+ /** The sections of a kind, in order: a block lays out its regions, the others tell their cases. */
1194
+ export const sectionsOf = (kind) => SECTION_ORDER.filter((one) => !(kind === BLOCK ? NOT_BLOCK : ONLY_BLOCK).includes(one));
1195
+ /** The sections a kind must have besides the generated ones: a block, its Layout too. */
1196
+ export const requiredSectionsOf = (kind) => kind === BLOCK
1197
+ ? [...REQUIRED_SECTIONS.slice(0, 2), 'Layout', 'Decisions']
1198
+ : [...REQUIRED_SECTIONS];
1199
+ export const GENERATED_NOTE = '<!-- Generated from the frontmatter: edit it there, then run nx run stencil:generate.pattern -- --sync. -->';
1200
+ const cell = (text) => String(text).replace(/\s+/g, ' ').trim().replace(/\|/g, '\\|');
1201
+ const code = (text) => `\`${text}\``;
1202
+ const table = (head, rows) => [
1203
+ `| ${head.join(' | ')} |`,
1204
+ `| ${head.map(() => '---').join(' | ')} |`,
1205
+ ...rows.map((row) => `| ${row.join(' | ')} |`),
1206
+ ].join('\n');
1207
+ /** `about: field; outcome: failure` - the values an entry gives, in the order of the variables. */
1208
+ const whenOf = (pattern, entry) => variableNames(pattern)
1209
+ .filter((name) => name in entry)
1210
+ .map((name) => `${name}: ${[entry[name]].flat().join(' or ')}`)
1211
+ .join('; ') || 'any';
1212
+ /** A rule as the table shows it: a cited one with the text of its source, a relation of a domain with its answer. */
1213
+ const ruleOf = (rule, patterns) => {
1214
+ if (!rule.from)
1215
+ return rule;
1216
+ const source = patterns.get(rule.from);
1217
+ const own = source?.['always-true']?.find((one) => one.id === rule.id);
1218
+ if (own)
1219
+ return { ...own, from: rule.from };
1220
+ const relation = source?.kind === FOUNDATION ? source.cases?.find((one) => one.id === rule.id) : undefined;
1221
+ return relation ? { id: rule.id, rule: relation.where, from: rule.from } : rule;
1222
+ };
1223
+ /** `serves` as a cell: the principles, in the order written. */
1224
+ const servesOf = (one) => [one.serves ?? []].flat().join(', ');
1225
+ /**
1226
+ * The carriers as a cell: the built ones as code, then the planned ones as plain text, since
1227
+ * they cannot be written yet (check.usage-docs holds every name in code to the release).
1228
+ */
1229
+ const carriersOf = (one) => [
1230
+ (one['carried-by'] ?? []).map(code).join(', '),
1231
+ one['carried-by-planned']?.length ? `planned: ${one['carried-by-planned'].join(', ')}` : '',
1232
+ ]
1233
+ .filter(Boolean)
1234
+ .join('; ') || 'the guide';
1235
+ /** The text of each generated section, from the frontmatter. */
1236
+ export const renderSections = (pattern, patterns = [pattern]) => {
1237
+ const { byId } = indexPatterns(patterns);
1238
+ const variables = pattern.variables ?? {};
1239
+ // a domain says of each rule the principle it serves and where it lives
1240
+ const isDomain = pattern.kind === FOUNDATION;
1241
+ const grounded = (one) => (isDomain ? [cell(servesOf(one)), carriersOf(one)] : []);
1242
+ const groundedHead = isDomain ? ['Serves', 'Carried by'] : [];
1243
+ // the rules of the domains a case relies on, once one case names them (#1198)
1244
+ const cites = (pattern.cases ?? []).some((one) => one.rules?.length);
1245
+ const rulesOf = (one) => (cites ? [(one.rules ?? []).map(code).join(', ')] : []);
1246
+ const variablesTable = table(['Variable', 'Values', 'Means'], Object.entries(variables).map(([name, variable]) => [
1247
+ code(name),
1248
+ variable.values.map(code).join(', '),
1249
+ cell(variable.means),
1250
+ ]));
1251
+ const isBlock = pattern.kind === BLOCK;
1252
+ // a building block: its regions in the order of the page, each with when it shows (#1210)
1253
+ const regions = [
1254
+ variablesTable,
1255
+ 'A region shows where its When holds, in this order: a required one always, the others when there is something to put in them.',
1256
+ table(['Region', 'When', 'Required', 'What', 'Use'], (pattern.regions ?? []).map((one) => [
1257
+ code(one.id),
1258
+ cell(whenOf(pattern, one.when ?? {})),
1259
+ one.required ? 'yes' : '',
1260
+ cell(one.what),
1261
+ (one.use ?? []).map(code).join(', '),
1262
+ ])),
1263
+ ];
1264
+ // the regions a situation of a block shows: none when its values do not hold (the check says why)
1265
+ const regionsOfSituation = (one) => {
1266
+ const known = Object.fromEntries(Object.keys(variables).flatMap((name) => {
1267
+ const value = one[name];
1268
+ return typeof value === 'string' ? [[name, value]] : [];
1269
+ }));
1270
+ try {
1271
+ return regionsFor(pattern, known)
1272
+ .regions.map((region) => code(region.id))
1273
+ .join(', ');
1274
+ }
1275
+ catch {
1276
+ return '';
1277
+ }
1278
+ };
1279
+ const cases = [
1280
+ variablesTable,
1281
+ `A case that leaves a variable out holds for any of its values${NONE_WHEN_LEFT_OUT in variables ? `, except \`${NONE_WHEN_LEFT_OUT}\`, which then means \`none\`` : ''}.`,
1282
+ table(['Case', 'When', 'Where', 'Use', ...(cites ? ['Rules'] : []), ...groundedHead], (pattern.cases ?? []).map((one) => [
1283
+ code(one.id),
1284
+ cell(whenOf(pattern, one)),
1285
+ cell([
1286
+ one.where,
1287
+ one.see ? `see \`${one.see}\`` : '',
1288
+ one['magma-gap'] ? `Magma gap: ${one['magma-gap']}` : '',
1289
+ ]
1290
+ .filter(Boolean)
1291
+ .join('; ')),
1292
+ (one.use ?? []).map(code).join(', '),
1293
+ ...rulesOf(one),
1294
+ ...grounded(one),
1295
+ ])),
1296
+ ];
1297
+ if (pattern.gaps?.length)
1298
+ cases.push('Still open:', table(['When', 'Question'], pattern.gaps.map((one) => [cell(whenOf(pattern, one)), cell(one.note)])));
1299
+ if (pattern['not-applicable']?.length)
1300
+ cases.push('Not applicable:', table(['When', 'Why'], pattern['not-applicable'].map((one) => [cell(whenOf(pattern, one)), cell(one.why)])));
1301
+ if (!pattern.gaps?.length)
1302
+ cases.push('No gaps: every combination has a case or is not applicable.');
1303
+ const rules = (pattern['always-true'] ?? []).map((one) => ruleOf(one, byId));
1304
+ const checkedBy = (rule) => [
1305
+ rule['checked-by'] === 'lint' ? `lint \`${rule.lint}\`` : rule['checked-by'],
1306
+ rule['lint-planned'] ? `lint \`${rule['lint-planned']}\` to write` : '',
1307
+ rule.note ?? '',
1308
+ ]
1309
+ .filter(Boolean)
1310
+ .join('; ');
1311
+ const choices = pattern['open-choices'] ?? [];
1312
+ // the id of a situation of a block, the name of its preview, once one situation has one
1313
+ const named = isBlock && situationIds(pattern).length > 0;
1314
+ return {
1315
+ Cases: isBlock ? undefined : cases.join('\n\n'),
1316
+ Regions: isBlock ? regions.join('\n\n') : undefined,
1317
+ 'Always true': [
1318
+ 'These hold in every product: a product layer cannot change them.',
1319
+ table(['Id', 'Rule', ...groundedHead, 'Checked by'], rules.map((rule) => [
1320
+ code(rule.id),
1321
+ cell(`${rule.rule ?? ''}${rule.from ? ` (from \`${rule.from}\`)` : ''}`),
1322
+ ...grounded(rule),
1323
+ cell(checkedBy(rule)),
1324
+ ])),
1325
+ ].join('\n\n'),
1326
+ 'Open choices': choices.length
1327
+ ? [
1328
+ 'The default decides these; a product layer may narrow them.',
1329
+ table(['Id', 'Default', 'A product may'], choices.map((one) => [code(one.id), cell(one.default), cell(one.may)])),
1330
+ ].join('\n\n')
1331
+ : undefined,
1332
+ Situations: [
1333
+ isBlock
1334
+ ? "Situations every application has, each with the regions it shows: they give the examples, the texts and the keywords. The situations of a product's own domain go in its layer."
1335
+ : "Situations every application has, each with its case: they give the examples, the texts and the keywords. The situations of a product's own domain go in its layer.",
1336
+ table([...(named ? ['Id'] : []), 'Situation', isBlock ? 'Regions' : 'Case'], (pattern.situations ?? []).map((one) => [
1337
+ ...(named ? [isString(one.id) ? code(one.id) : ''] : []),
1338
+ cell(one.situation),
1339
+ cell([
1340
+ one.use
1341
+ ? `not here: \`${one.use}\``
1342
+ : isBlock
1343
+ ? regionsOfSituation(one)
1344
+ : [one.case ?? []].flat().map(code).join(', '),
1345
+ one.note ?? '',
1346
+ ]
1347
+ .filter(Boolean)
1348
+ .join(': ')),
1349
+ ])),
1350
+ ].join('\n\n'),
1351
+ };
1352
+ };
1353
+ /** The body as its head (the title and the principle) and its `##` sections. */
1354
+ export const splitBody = (body) => {
1355
+ const lines = body.split('\n');
1356
+ const sections = [];
1357
+ const head = [];
1358
+ let fence = false;
1359
+ for (const line of lines) {
1360
+ if (/^(```|~~~)/.test(line))
1361
+ fence = !fence;
1362
+ const match = !fence && /^## (.+?)\s*$/.exec(line);
1363
+ if (match)
1364
+ sections.push({ heading: match[1], text: '' });
1365
+ else if (sections.length)
1366
+ sections[sections.length - 1].text += `${line}\n`;
1367
+ else
1368
+ head.push(line);
1369
+ }
1370
+ return { head: head.join('\n'), sections };
1371
+ };
1372
+ /** The body with its head and its generated sections written from the frontmatter, the others as they are. */
1373
+ export const syncBody = (pattern, body, patterns = [pattern]) => {
1374
+ if (pattern.status === 'candidate')
1375
+ return body;
1376
+ const { head, sections } = splitBody(body);
1377
+ const rendered = renderSections(pattern, patterns);
1378
+ const out = sections.filter((one) => !GENERATED_SECTIONS.includes(one.heading) ||
1379
+ rendered[one.heading] !== undefined);
1380
+ for (const heading of GENERATED_SECTIONS) {
1381
+ const text = rendered[heading];
1382
+ if (text === undefined)
1383
+ continue;
1384
+ const full = `\n${GENERATED_NOTE}\n\n${text}\n\n`;
1385
+ const existing = out.find((one) => one.heading === heading);
1386
+ if (existing) {
1387
+ existing.text = full;
1388
+ continue;
1389
+ }
1390
+ // in the order of SECTION_ORDER, before the first section that comes after it
1391
+ const rank = (name) => {
1392
+ const index = SECTION_ORDER.indexOf(name);
1393
+ return index < 0 ? SECTION_ORDER.length : index;
1394
+ };
1395
+ const at = out.findIndex((one) => rank(one.heading) > rank(heading));
1396
+ out.splice(at < 0 ? out.length : at, 0, { heading, text: full });
1397
+ }
1398
+ const title = `# ${pattern.title}\n\n**${String(pattern.principle ?? '')
1399
+ .replace(/\s+/g, ' ')
1400
+ .trim()}**\n\n`;
1401
+ const rest = head.replace(/^\s*#\s.*\n+(\*\*[\s\S]*?\*\*\n*)?/, '');
1402
+ // a blank line between the frontmatter and the title
1403
+ return ('\n' +
1404
+ title +
1405
+ (rest.trim() ? `${rest.trim()}\n\n` : '') +
1406
+ out
1407
+ .map((one) => `## ${one.heading}\n${one.text.replace(/\n*$/, '\n\n')}`)
1408
+ .join('')
1409
+ .replace(/\n+$/, '\n'));
1410
+ };
1411
+ /** What is wrong in the body: a section missing, out of order, or a generated one out of date. */
1412
+ export const bodyErrors = (pattern, body, patterns = [pattern]) => {
1413
+ if (pattern.status === 'candidate')
1414
+ return [];
1415
+ const errors = [];
1416
+ const { sections } = splitBody(body);
1417
+ const headings = sections.map((one) => one.heading);
1418
+ const order = sectionsOf(pattern.kind);
1419
+ const of = pattern.kind === BLOCK ? 'a building block' : 'the template';
1420
+ for (const heading of requiredSectionsOf(pattern.kind))
1421
+ if (!headings.includes(heading))
1422
+ errors.push(`the body has no section ${heading}`);
1423
+ for (const heading of headings)
1424
+ if (!order.includes(heading))
1425
+ errors.push(`section ${heading} is not one of ${of}: ${order.join(', ')}`);
1426
+ const known = headings.filter((one) => order.includes(one));
1427
+ const sorted = [...known].sort((a, b) => order.indexOf(a) - order.indexOf(b));
1428
+ if (known.join() !== sorted.join())
1429
+ errors.push(`the sections are in the order ${order.join(', ')}`);
1430
+ if (syncBody(pattern, body, patterns) !== body)
1431
+ errors.push(`the title, the principle or a generated section (${GENERATED_SECTIONS.filter((one) => order.includes(one)).join(', ')}) is out of date: nx run stencil:generate.pattern -- --sync`);
1432
+ return errors;
1433
+ };
1434
+ /*
1435
+ The previews of the cases (#1186): one file per case, previews/<pattern>/<case>.html beside
1436
+ the patterns, the stage the docs site, a decision and render_preview show; a rule of a domain
1437
+ of Foundation may have one too, previews/<domain>/<rule>.html, and a case or a rule more
1438
+ examples, <id>.2.html, <id>.3.html, with no gap (the choices of the maintainer on #1221: a
1439
+ rule that an example chosen live shows, actions/stacked, and another context or another length
1440
+ of the words, to show what the case keeps the same and what it lets vary). A building block
1441
+ has one per situation, previews/<block>/<situation>.html, named after the id of the situation,
1442
+ with its examples as a case (the maintainer's choice on 2026-11-03: a situation gives every
1443
+ variable and the words, as a case does, and one preview of the whole block would not show what
1444
+ goes when a variable changes). Only the stage: the
1445
+ Magma markup of the case and its own small script, never a page; whoever shows it adds the
1446
+ stylesheets of agents/assets.md and the loader of the installed magma. It opens with a comment
1447
+ of keys, as a pattern opens with its frontmatter:
1448
+
1449
+ <!--
1450
+ try: Press Salva: the error shows above the form and stays until it is solved.
1451
+ height: 260
1452
+ -->
1453
+
1454
+ `try`, required: what to do in the preview, or what to look at when there is nothing to do;
1455
+ the page shows it under the stage (a live preview with nothing said is a still form: the
1456
+ maintainer's call on #1186, a line and no animation). `height`, optional: the stage is a page
1457
+ of its own that tall, as an overlay needs (mds-modal is a <dialog> in the top layer, sized on
1458
+ the viewport, so inline it covers the page around the stage). `whole-page: true`, optional:
1459
+ the stage is a whole page that lays out its own frame (widths/page, its bar and its gutter), so
1460
+ whoever shows it gives it no inset of its own, where every other stage gets one.
1461
+ */
1462
+ /** The folder of the previews, inside the folder of the patterns. */
1463
+ export const PREVIEWS_DIR = 'previews';
1464
+ /** The keys of the opening comment of a preview. */
1465
+ export const PREVIEW_KEYS = ['try', 'height', 'whole-page'];
1466
+ /** The height of a stage that is a page of its own, in pixels: up to the side of an image of render_preview (#1180). */
1467
+ export const PREVIEW_HEIGHT = { min: 120, max: 2000 };
1468
+ const PREVIEW_HEAD = /^\s*<!--([\s\S]*?)-->[ \t]*\n?/;
1469
+ /** What makes a page, not a stage: the page around the preview has it once. */
1470
+ const PAGE_ELEMENT = /<(!doctype|html|head|body|meta|base|link|style|iframe)\b/gi;
1471
+ /** An address outside the preview, in an attribute or a script: a stage loads nothing. */
1472
+ const OUTSIDE_URL = /(?:\b(?:src|href|srcset|action|poster)\s*=\s*["']?|\burl\(\s*["']?|\bimport\s*\(?\s*["'])((?:[a-z][a-z0-9+.-]*:)?\/\/[^\s"')]+)/gi;
1473
+ /** The name of the file of an example after the first: <id>.<n>.html. */
1474
+ const EXAMPLE_NAME = /^(.+)\.(\d+)$/;
1475
+ /** A preview, read from its text; the pattern, the case or rule and the example are in its path. */
1476
+ export const parsePreview = (text, file) => {
1477
+ const pattern = path.basename(path.dirname(file));
1478
+ const name = path.basename(file, '.html');
1479
+ const numbered = EXAMPLE_NAME.exec(name);
1480
+ const id = numbered ? numbered[1] : name;
1481
+ const example = numbered ? Number(numbered[2]) : 1;
1482
+ const errors = [];
1483
+ if (numbered && example < 2)
1484
+ errors.push(`the first example of ${id} is ${id}.html, the next ones ${id}.2.html, ${id}.3.html`);
1485
+ const source = text.replace(/\r\n/g, '\n');
1486
+ const head = PREVIEW_HEAD.exec(source);
1487
+ const keys = {};
1488
+ if (!head)
1489
+ errors.push(`it opens with a comment of keys: ${PREVIEW_KEYS.join(', ')} (docs/PATTERNS.md)`);
1490
+ else
1491
+ for (const line of head[1].split('\n')) {
1492
+ if (!line.trim())
1493
+ continue;
1494
+ const match = /^\s*([a-z-]+):\s*(.*?)\s*$/.exec(line);
1495
+ if (!match) {
1496
+ errors.push(`"${line.trim()}" in the opening comment is not a key: value line`);
1497
+ continue;
1498
+ }
1499
+ if (!PREVIEW_KEYS.includes(match[1]))
1500
+ errors.push(`${match[1]} is not a key of a preview: ${PREVIEW_KEYS.join(', ')}`);
1501
+ else
1502
+ keys[match[1]] = match[2];
1503
+ }
1504
+ if (head && !keys.try)
1505
+ errors.push('try is required: what to do in the preview, or what to look at');
1506
+ let height;
1507
+ if (keys.height !== undefined) {
1508
+ const value = Number(keys.height);
1509
+ if (!Number.isInteger(value) || value < PREVIEW_HEIGHT.min || value > PREVIEW_HEIGHT.max)
1510
+ errors.push(`height is a whole number of pixels, ${PREVIEW_HEIGHT.min} to ${PREVIEW_HEIGHT.max}`);
1511
+ else
1512
+ height = value;
1513
+ }
1514
+ if (keys['whole-page'] !== undefined && keys['whole-page'] !== 'true')
1515
+ errors.push('whole-page is true, or left out');
1516
+ const markup = head ? source.slice(head[0].length) : source;
1517
+ if (!markup.trim())
1518
+ errors.push('the stage is empty');
1519
+ for (const [, tag] of markup.matchAll(PAGE_ELEMENT))
1520
+ errors.push(`<${tag.toLowerCase()}> belongs to the page around the stage: a preview is only the stage`);
1521
+ if (/<script\b[^>]*\bsrc\s*=/i.test(markup))
1522
+ errors.push('a script with src: the page around the stage loads Magma, a preview loads nothing');
1523
+ for (const [, url] of markup.matchAll(OUTSIDE_URL))
1524
+ errors.push(`${url} is outside the preview: a stage loads nothing`);
1525
+ return {
1526
+ file,
1527
+ pattern,
1528
+ id,
1529
+ example,
1530
+ ...(keys.try ? { try: keys.try } : {}),
1531
+ ...(height !== undefined ? { height } : {}),
1532
+ ...(keys['whole-page'] === 'true' ? { wholePage: true } : {}),
1533
+ markup,
1534
+ errors,
1535
+ };
1536
+ };
1537
+ /**
1538
+ * Every preview of a folder of patterns (previews/<pattern>/<id>.html and <id>.<n>.html), by
1539
+ * pattern, id and example; none when it has none.
1540
+ */
1541
+ export const readPreviews = (patternsDir) => {
1542
+ const root = path.join(patternsDir, PREVIEWS_DIR);
1543
+ if (!existsSync(root))
1544
+ return [];
1545
+ return readdirSync(root, { withFileTypes: true })
1546
+ .filter((one) => one.isDirectory())
1547
+ .map((one) => one.name)
1548
+ .sort()
1549
+ .flatMap((pattern) => readdirSync(path.join(root, pattern))
1550
+ .filter((name) => name.endsWith('.html'))
1551
+ .map((name) => {
1552
+ const file = path.join(root, pattern, name);
1553
+ return parsePreview(readFileSync(file, 'utf8'), file);
1554
+ })
1555
+ // by id as code units, as a plain sort orders the names, then by example
1556
+ .sort((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : a.example - b.example)));
1557
+ };
1558
+ /** The preview of a case or a rule, its first example unless another is asked, when it has one. */
1559
+ export const previewOf = (previews, pattern, id, example = 1) => previews.find((one) => one.pattern === pattern && one.id === id && one.example === example);
1560
+ /** Every example of a case or a rule, the first one first. */
1561
+ export const examplesOf = (previews, pattern, id) => previews
1562
+ .filter((one) => one.pattern === pattern && one.id === id)
1563
+ .sort((a, b) => a.example - b.example);
1564
+ /*
1565
+ The images of the previews (#1243): in the entry package each preview has two beside it,
1566
+ <id>.light.webp and <id>.dark.webp (<id>.<n>.light.webp for an example), for the readers that
1567
+ cannot run the stage: the cards of the docs site, an agent whose client has no browser, a
1568
+ decision that cannot run live. The build of magma makes them with the render that checks the
1569
+ preview (projects/stencil/scripts/preview-images.ts), so an image never differs from its stage
1570
+ in that version; the repository keeps the stages only.
1571
+
1572
+ The maintainer's choices on #1243 (2026-11-04), from three frames rendered side by side: one
1573
+ frame for every image, a whole page included, so a gallery lines them up without cropping
1574
+ each one; 8:5, the ratio of the cards of the docs site; a layout 960 CSS pixels wide, in the
1575
+ tablet range of the Magma breakpoints (768-1023), where the bar of an app shell keeps its items
1576
+ (at 720 they collapse into the menu) and the words still read in a card 320 pixels wide (at
1577
+ 1440 they do not); 1.5 device pixels per CSS pixel, 1440 x 900 pixels, enough for a card of
1578
+ 720 CSS pixels on a screen of 2; every preview, not only the first of each pattern, since an
1579
+ agent and a decision show the case they are about; the default theme, light and dark, as the
1580
+ page around them is. The quality, 0.8 of the WebP encoder of Chrome, is measured on the same
1581
+ captures: the text at twice its size shows no difference from 0.9, and the 216 images of 2.10.0
1582
+ weigh a fifth less (about 15 KB each).
1583
+ */
1584
+ /** The frame of every image: the viewport, in CSS pixels, the device pixels per CSS pixel and the WebP quality. */
1585
+ export const PREVIEW_IMAGE = { width: 960, height: 600, scale: 1.5, quality: 0.8 };
1586
+ /** The modes an image is made in, each the mode the browser emulates. */
1587
+ export const PREVIEW_IMAGE_MODES = ['light', 'dark'];
1588
+ /**
1589
+ * The image of a preview in a mode, beside it: <id>.html -> <id>.<mode>.webp; with the folder
1590
+ * of the patterns of a package, the one in that package.
1591
+ */
1592
+ export const previewImageFile = (file, mode, patternsDir) => {
1593
+ const image = file.replace(/\.html$/, `.${mode}.webp`);
1594
+ return patternsDir
1595
+ ? path.join(patternsDir, PREVIEWS_DIR, path.basename(path.dirname(image)), path.basename(image))
1596
+ : image;
1597
+ };
1598
+ /**
1599
+ * The size of a WebP image in pixels, from the header of its first chunk (RFC 9649: the lossy
1600
+ * VP8 frame, the lossless VP8L bitstream or the extended VP8X canvas), or undefined when the
1601
+ * bytes are not WebP.
1602
+ */
1603
+ export const webpSize = (bytes) => {
1604
+ if (bytes.length < 30 ||
1605
+ bytes.toString('latin1', 0, 4) !== 'RIFF' ||
1606
+ bytes.toString('latin1', 8, 12) !== 'WEBP')
1607
+ return undefined;
1608
+ const chunk = bytes.toString('latin1', 12, 16);
1609
+ if (chunk === 'VP8 ')
1610
+ return { width: bytes.readUInt16LE(26) & 0x3fff, height: bytes.readUInt16LE(28) & 0x3fff };
1611
+ if (chunk === 'VP8L') {
1612
+ const bits = bytes.readUInt32LE(21);
1613
+ return { width: (bits & 0x3fff) + 1, height: ((bits >>> 14) & 0x3fff) + 1 };
1614
+ }
1615
+ if (chunk === 'VP8X')
1616
+ return { width: bytes.readUIntLE(24, 3) + 1, height: bytes.readUIntLE(27, 3) + 1 };
1617
+ return undefined;
1618
+ };
1619
+ /**
1620
+ * What is wrong in the images of the previews in the folder of the patterns of a package, by
1621
+ * file: a preview without its image in a mode (the preview, by its file), an image that is not
1622
+ * WebP or not of the frame, an image of no preview.
1623
+ */
1624
+ export const previewImageErrors = (previews, patternsDir) => {
1625
+ const found = new Map();
1626
+ const add = (file, error) => found.set(file, [...(found.get(file) ?? []), error]);
1627
+ const width = PREVIEW_IMAGE.width * PREVIEW_IMAGE.scale;
1628
+ const height = PREVIEW_IMAGE.height * PREVIEW_IMAGE.scale;
1629
+ const expected = new Set();
1630
+ for (const preview of previews)
1631
+ for (const mode of PREVIEW_IMAGE_MODES) {
1632
+ const file = previewImageFile(preview.file, mode, patternsDir);
1633
+ expected.add(file);
1634
+ if (!existsSync(file)) {
1635
+ add(preview.file, `no ${mode} image in ${file}: build magma`);
1636
+ continue;
1637
+ }
1638
+ const size = webpSize(readFileSync(file));
1639
+ if (!size)
1640
+ add(file, 'it is not WebP');
1641
+ else if (size.width !== width || size.height !== height)
1642
+ add(file, `it is ${size.width}x${size.height}, the frame is ${width}x${height}`);
1643
+ }
1644
+ const root = path.join(patternsDir, PREVIEWS_DIR);
1645
+ if (existsSync(root))
1646
+ for (const folder of readdirSync(root, { withFileTypes: true }).filter((one) => one.isDirectory()))
1647
+ for (const name of readdirSync(path.join(root, folder.name)).filter((one) => one.endsWith('.webp'))) {
1648
+ const file = path.join(root, folder.name, name);
1649
+ if (!expected.has(file))
1650
+ add(file, 'it is the image of no preview');
1651
+ }
1652
+ return found;
1653
+ };
1654
+ /** The rules of a domain of Foundation that may have a preview: its own, never one it cites (#1221). */
1655
+ export const ownRules = (pattern) => pattern.kind === FOUNDATION
1656
+ ? (pattern['always-true'] ?? []).filter((one) => !one.from).map((one) => one.id)
1657
+ : [];
1658
+ /**
1659
+ * A preview that shows nothing that exists, by file: a pattern Magma does not have, a candidate,
1660
+ * a case it does not have, for a domain a rule of its own it does not have, for a building block
1661
+ * a situation it does not have, by its id (2026-11-03); an example whose previous one is missing,
1662
+ * since the examples of a case or a situation follow one another from <id>.html.
1663
+ */
1664
+ export const previewLinkErrors = (previews, patterns) => {
1665
+ const { byId, aliases } = indexPatterns(patterns);
1666
+ const found = new Map();
1667
+ for (const one of previews) {
1668
+ const pattern = byId.get(one.pattern);
1669
+ let error;
1670
+ if (!pattern)
1671
+ error = aliases.has(one.pattern)
1672
+ ? `${one.pattern} is an old id of ${aliases.get(one.pattern)}: move the folder`
1673
+ : `there is no pattern ${one.pattern}`;
1674
+ else if (pattern.status === 'candidate')
1675
+ error = `${one.pattern} is a candidate: it has no ${pattern.kind === BLOCK ? 'situations' : 'cases'} to show`;
1676
+ else {
1677
+ const cases = (pattern.cases ?? []).map((entry) => entry.id);
1678
+ const rules = ownRules(pattern);
1679
+ const situations = situationIds(pattern);
1680
+ if (pattern.kind === BLOCK) {
1681
+ if (!situations.includes(one.id))
1682
+ error = `${one.pattern} has no situation ${one.id}: its situations are ${situations.join(', ') || 'none with an id'}`;
1683
+ }
1684
+ else if (!cases.includes(one.id) && !rules.includes(one.id))
1685
+ error =
1686
+ pattern.kind === FOUNDATION
1687
+ ? `${one.pattern} has no case nor rule ${one.id}: its cases are ${cases.join(', ')}, its rules ${rules.join(', ') || 'none'}`
1688
+ : `${one.pattern} has no case ${one.id}: its cases are ${cases.join(', ')}`;
1689
+ if (!error && one.example > 1 && !previewOf(previews, one.pattern, one.id, one.example - 1))
1690
+ error = `example ${one.example} of ${one.id} follows ${one.example === 2 ? `${one.id}.html` : `${one.id}.${one.example - 1}.html`}, which is missing`;
1691
+ }
1692
+ if (error)
1693
+ found.set(one.file, [error]);
1694
+ }
1695
+ return found;
1696
+ };
1697
+ /**
1698
+ * What has no preview yet, the candidates aside: each case of a pattern, as <pattern>/<case>,
1699
+ * and each situation of a decided building block, as <block>/<situation> (the maintainer's
1700
+ * choice on 2026-11-03; a draft block may still change its situations), in the order of the
1701
+ * files. Not the domains of Foundation: a case of a domain may have a preview, and widths is
1702
+ * the pilot (#1189), so the ones a domain lacks are not listed until it is weighed.
1703
+ */
1704
+ export const missingPreviews = (patterns, previews) => patterns.flatMap((one) => {
1705
+ const ids = one.kind === 'pattern' && one.status !== 'candidate'
1706
+ ? (one.cases ?? []).map((entry) => entry.id)
1707
+ : one.kind === BLOCK && one.status === 'decided'
1708
+ ? situationIds(one)
1709
+ : [];
1710
+ return ids.filter((id) => !previewOf(previews, one.id, id)).map((id) => `${one.id}/${id}`);
1711
+ });