@nldd/design-system 0.19.0 → 0.21.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 (576) hide show
  1. package/custom-elements.json +521 -57
  2. package/dist/cdn/autoloader.js +181 -0
  3. package/dist/cdn/chunks/activity-indicator-JglZJ8dh.js +356 -0
  4. package/dist/cdn/chunks/activity-indicator.i18n-D7mCy6d2.js +3 -0
  5. package/dist/cdn/chunks/avatar-ASqePVhU.js +308 -0
  6. package/dist/cdn/chunks/avatar-group-rknt4FBO.js +338 -0
  7. package/dist/cdn/chunks/avatar-group.i18n-BYw_9wt_.js +7 -0
  8. package/dist/cdn/chunks/avatar.i18n-CMwQjBkS.js +7 -0
  9. package/dist/cdn/chunks/badge-Cc2Nufoc.js +323 -0
  10. package/dist/cdn/chunks/badge.i18n-DqW7hLQj.js +3 -0
  11. package/dist/cdn/chunks/banner-BLVKM07M.js +325 -0
  12. package/dist/cdn/chunks/banner.i18n-BOCM9rGN.js +3 -0
  13. package/dist/cdn/chunks/bar-split-view-Clbg-p9H.js +259 -0
  14. package/dist/cdn/chunks/base-CfuoYRhN.js +3 -0
  15. package/dist/cdn/chunks/blockquote-BoOqbGdm.js +189 -0
  16. package/dist/cdn/chunks/box-WkhyjQVy.js +88 -0
  17. package/dist/cdn/chunks/breadcrumbs-D9YxZzRj.js +162 -0
  18. package/dist/cdn/chunks/breadcrumbs.i18n-zmO8jaTO.js +3 -0
  19. package/dist/cdn/chunks/breakpoints-Cwor8TRP.js +15 -0
  20. package/dist/cdn/chunks/button-DO90Lo6q.js +863 -0
  21. package/dist/cdn/chunks/button-bar-Bxgdbyh3.js +225 -0
  22. package/dist/cdn/chunks/button-group-BYGPPLmZ.js +205 -0
  23. package/dist/{components/button.i18n-DiDGynnq.js → cdn/chunks/button.i18n-BGFt7Z9u.js} +2 -2
  24. package/dist/cdn/chunks/card-BP0jfOkS.js +262 -0
  25. package/dist/cdn/chunks/card.i18n-CpafLm3i.js +8 -0
  26. package/dist/cdn/chunks/carried-context-DlMSujiJ.js +37 -0
  27. package/dist/cdn/chunks/cell-BRD2ilQh.js +144 -0
  28. package/dist/cdn/chunks/checkbox-Cazx8CQn.js +296 -0
  29. package/dist/cdn/chunks/checkbox-field-DDZ-B6vH.js +157 -0
  30. package/dist/cdn/chunks/class-map-CXSdNjt8.js +26 -0
  31. package/dist/cdn/chunks/code-editor-D6Q55oaY.js +286 -0
  32. package/dist/cdn/chunks/code-viewer-DspLH2T1.js +766 -0
  33. package/dist/cdn/chunks/code-viewer.i18n-BHfSDRbK.js +13 -0
  34. package/dist/cdn/chunks/codemirror-input-Db65x22n.js +1232 -0
  35. package/dist/cdn/chunks/collection-NVtkvDls.js +396 -0
  36. package/dist/cdn/chunks/collection.i18n-DqWPGnZO.js +8 -0
  37. package/dist/cdn/chunks/combo-box-DyBQSaQl.js +512 -0
  38. package/dist/cdn/chunks/combo-box.i18n-BorzYnJ2.js +6 -0
  39. package/dist/cdn/chunks/container-rrbwk0z4.js +602 -0
  40. package/dist/cdn/chunks/custom-element-BW8Ua4c7.js +7 -0
  41. package/dist/cdn/chunks/custom-element-q6NzoL5b.js +301 -0
  42. package/dist/cdn/chunks/custom-font-size-D7KNr84p.js +57 -0
  43. package/dist/cdn/chunks/date-field-Clti_wKN.js +654 -0
  44. package/dist/cdn/chunks/date-field.i18n-BTzc0E9a.js +15 -0
  45. package/dist/cdn/chunks/date-picker-2TCQLd5D.js +993 -0
  46. package/dist/cdn/chunks/date-picker.i18n-Dsc_M5QK.js +82 -0
  47. package/dist/cdn/chunks/decorate-TduJMFD_.js +280 -0
  48. package/dist/cdn/chunks/defer-focus-F73ud2D9.js +9 -0
  49. package/dist/cdn/chunks/described-by-mixin-daRE7orX.js +32 -0
  50. package/dist/cdn/chunks/description-cell-CQwOj_rN.js +166 -0
  51. package/dist/cdn/chunks/dev-checks-zW_W-hnh.js +2695 -0
  52. package/dist/cdn/chunks/directive-CwRgozUW.js +27 -0
  53. package/dist/cdn/chunks/dismiss-from-title-bar-C6mP7sWP.js +5 -0
  54. package/dist/cdn/chunks/dist-3C80SZN9.js +849 -0
  55. package/dist/cdn/chunks/dist-A7_1pHX0.js +379 -0
  56. package/dist/cdn/chunks/dist-BEfLdOvy.js +1346 -0
  57. package/dist/cdn/chunks/dist-BTUxFM2V.js +268 -0
  58. package/dist/cdn/chunks/dist-CP3G1pSK.js +1037 -0
  59. package/dist/cdn/chunks/dist-C_dGY6zR.js +468 -0
  60. package/dist/{components/dist-B9YBOGFW.js → cdn/chunks/dist-ChmCRv39.js} +109 -153
  61. package/dist/{components/dist-CJm4tkNC.js → cdn/chunks/dist-D2qap2OY.js} +23 -31
  62. package/dist/cdn/chunks/dist-DPUBF0MZ.js +1593 -0
  63. package/dist/{components/dist-4g23YHP0.js → cdn/chunks/dist-DrTzvgE7.js} +291 -404
  64. package/dist/cdn/chunks/dist-EM4MWLQq.js +385 -0
  65. package/dist/cdn/chunks/dist-EgIBI-FG.js +293 -0
  66. package/dist/{components/dist-Bf823YyL.js → cdn/chunks/dist-Rm6FvrSR.js} +272 -551
  67. package/dist/cdn/chunks/divider-CCNbnplA.js +53 -0
  68. package/dist/cdn/chunks/document-tab-bar-CUc4WWY3.js +973 -0
  69. package/dist/cdn/chunks/document-tab-bar.i18n-DKrA9TnB.js +9 -0
  70. package/dist/cdn/chunks/drag-handle-cell-CbzDYebG.js +206 -0
  71. package/dist/cdn/chunks/drag-handle-cell.i18n-CKUrbm2q.js +3 -0
  72. package/dist/cdn/chunks/dropdown-DZTZtkm5.js +350 -0
  73. package/dist/cdn/chunks/element-state-B-44fVqq.js +20 -0
  74. package/dist/cdn/chunks/file-field-Bff6_1pp.js +1484 -0
  75. package/dist/cdn/chunks/file-field.i18n-pDM7Utud.js +40 -0
  76. package/dist/cdn/chunks/floating-ui.dom-B8J1rV2c.js +753 -0
  77. package/dist/cdn/chunks/focus-target-DSLGcCWq.js +24 -0
  78. package/dist/cdn/chunks/form-actions-C_7hINq-.js +90 -0
  79. package/dist/cdn/chunks/form-associated-mixin--GIbl98p.js +62 -0
  80. package/dist/cdn/chunks/form-field--4nWJ_DK.js +364 -0
  81. package/dist/cdn/chunks/form-hXLgy_tY.js +84 -0
  82. package/dist/cdn/chunks/form-section-By-D4un0.js +64 -0
  83. package/dist/cdn/chunks/full-bleed-section-Dg4sIJG1.js +161 -0
  84. package/dist/cdn/chunks/gherkin-eseYvsxh.js +29 -0
  85. package/dist/cdn/chunks/hero-CQQMNCT_.js +761 -0
  86. package/dist/{components/icon-CrBk3W-t.js → cdn/chunks/icon-BORlalt0.js} +298 -309
  87. package/dist/cdn/chunks/icon-button-rKiIHs7A.js +632 -0
  88. package/dist/{components/icon-button.i18n-1_N-wN6x.js → cdn/chunks/icon-button.i18n-DpZOfIS4.js} +2 -4
  89. package/dist/cdn/chunks/icon-cell-rk4NQid2.js +156 -0
  90. package/dist/cdn/chunks/identity-Cg1l0HhB.js +187 -0
  91. package/dist/cdn/chunks/if-defined-CaKKERku.js +4 -0
  92. package/dist/cdn/chunks/image-DZMW6JgL.js +659 -0
  93. package/dist/cdn/chunks/image.i18n-ONcm1h7o.js +3 -0
  94. package/dist/cdn/chunks/implicit-submission-Csbcor_E.js +27 -0
  95. package/dist/cdn/chunks/inline-dialog-WlqtPBPJ.js +259 -0
  96. package/dist/cdn/chunks/input-modality-XE0B7yCn.js +42 -0
  97. package/dist/cdn/chunks/just-in-time-education-DRcb5g7x.js +611 -0
  98. package/dist/cdn/chunks/just-in-time-education.i18n-CW_dsaxf.js +6 -0
  99. package/dist/cdn/chunks/kanban-Ca_mfqsA.js +400 -0
  100. package/dist/cdn/chunks/kanban-column-fgIMc7pw.js +375 -0
  101. package/dist/cdn/chunks/kanban.i18n-CWqc3e0B.js +11 -0
  102. package/dist/cdn/chunks/keyboard-shortcut-EknnW7Ub.js +267 -0
  103. package/dist/cdn/chunks/languages-yKikVFv_.js +8893 -0
  104. package/dist/cdn/chunks/link-FBSAJ3UC.js +229 -0
  105. package/dist/cdn/chunks/link-group-90qVfKa0.js +111 -0
  106. package/dist/cdn/chunks/link-hint-KFhgr5Ng.js +24 -0
  107. package/dist/cdn/chunks/link-rel-DvrTEfVT.js +8 -0
  108. package/dist/cdn/chunks/link.i18n-DJPobGmu.js +8 -0
  109. package/dist/cdn/chunks/list-CaWl3q0Z.js +880 -0
  110. package/dist/cdn/chunks/list-item-Cagnf6eG.js +802 -0
  111. package/dist/cdn/chunks/list-item-segment-BRzBF1y_.js +315 -0
  112. package/dist/cdn/chunks/list-item-segment.i18n-DHnrQL4V.js +8 -0
  113. package/dist/{components/list-item.i18n-89uqlBMK.js → cdn/chunks/list-item.i18n-Br6J5Ev9.js} +2 -2
  114. package/dist/cdn/chunks/list-items-Du0RCWsY.js +6 -0
  115. package/dist/{components/list.i18n-CKqbhFQ_.js → cdn/chunks/list.i18n-C40ltgdI.js} +2 -2
  116. package/dist/cdn/chunks/loading-tags-DtUr-DR7.js +3 -0
  117. package/dist/cdn/chunks/menu-BOu_pD1Q.js +719 -0
  118. package/dist/cdn/chunks/menu-bar-0NFXvq-v.js +253 -0
  119. package/dist/cdn/chunks/menu-bar-item-DGSC_ETi.js +365 -0
  120. package/dist/cdn/chunks/menu-bar.i18n-BoMu4Eoz.js +3 -0
  121. package/dist/cdn/chunks/menu-divider-CLLRgMll.js +15 -0
  122. package/dist/cdn/chunks/menu-group-BL24ChpR.js +23 -0
  123. package/dist/cdn/chunks/menu-item-CooKfrFa.js +140 -0
  124. package/dist/cdn/chunks/menu.i18n-C6uYJsG3.js +10 -0
  125. package/dist/cdn/chunks/menu.template-C6rbfI-u.js +642 -0
  126. package/dist/cdn/chunks/modal-dialog-BrUMP4Jm.js +240 -0
  127. package/dist/cdn/chunks/multi-line-text-field-D7hXhyOn.js +318 -0
  128. package/dist/cdn/chunks/navigation-split-view-B2ZQhxEb.js +621 -0
  129. package/dist/cdn/chunks/nl.generated-D6T41jG3.js +112 -0
  130. package/dist/cdn/chunks/notification-DSGP14d1.js +492 -0
  131. package/dist/cdn/chunks/notification.i18n-BKUSLN5c.js +6 -0
  132. package/dist/cdn/chunks/number-field-B8op14Y_.js +301 -0
  133. package/dist/cdn/chunks/number-field.i18n-BS0bINWY.js +7 -0
  134. package/dist/cdn/chunks/one-half-one-half-section-ZYmHYf4Q.js +213 -0
  135. package/dist/cdn/chunks/one-third-two-thirds-section-Ds10K6AS.js +213 -0
  136. package/dist/cdn/chunks/one-time-code-field-Cgy_tTS4.js +693 -0
  137. package/dist/cdn/chunks/open-when-rendered-CW_2_WUZ.js +20 -0
  138. package/dist/cdn/chunks/owned-attribute-x9OCTy_4.js +6 -0
  139. package/dist/cdn/chunks/owner-form-Cq8tT7ac.js +7 -0
  140. package/dist/cdn/chunks/page-CBf_Decp.js +431 -0
  141. package/dist/cdn/chunks/page-footer-CSv1dU7M.js +396 -0
  142. package/dist/cdn/chunks/page-footer.i18n-pbdr4lN3.js +3 -0
  143. package/dist/cdn/chunks/page-section-mixin-Dp6X8GKd.js +132 -0
  144. package/dist/cdn/chunks/pagination-CMUcFB53.js +485 -0
  145. package/dist/cdn/chunks/pagination.i18n-QQMx14CQ.js +9 -0
  146. package/dist/cdn/chunks/password-field-C76Vm3rm.js +368 -0
  147. package/dist/cdn/chunks/password-field.i18n-CzdBn-1b.js +8 -0
  148. package/dist/cdn/chunks/popover-C-CVVtfl.js +334 -0
  149. package/dist/cdn/chunks/popover-target-B25dxnmt.js +10 -0
  150. package/dist/cdn/chunks/popover.i18n-DmFBHUvB.js +3 -0
  151. package/dist/cdn/chunks/popup-anchor-controller-VZw0bXf2.js +30 -0
  152. package/dist/cdn/chunks/progress-bar-BLiHaRUS.js +674 -0
  153. package/dist/cdn/chunks/progress-bar.i18n-Cr5miGTx.js +8 -0
  154. package/dist/cdn/chunks/progress-circle-CjkovRbL.js +667 -0
  155. package/dist/cdn/chunks/progress-circle.i18n-CRrXuY4V.js +8 -0
  156. package/dist/cdn/chunks/query-ChDzi9FQ.js +28 -0
  157. package/dist/cdn/chunks/radio-button-GHyO-GQB.js +338 -0
  158. package/dist/cdn/chunks/radio-button-field-C-Z6Lnd4.js +192 -0
  159. package/dist/cdn/chunks/radio-button-group-ChTqBCnQ.js +118 -0
  160. package/dist/cdn/chunks/radio-position-CXWYAjaz.js +10 -0
  161. package/dist/cdn/chunks/reflect-non-default-Bu3rpCvg.js +9 -0
  162. package/dist/cdn/chunks/render-marked-DX_5ISZE.js +37 -0
  163. package/dist/cdn/chunks/repeat-Ch_5OsXE.js +76 -0
  164. package/dist/cdn/chunks/return-focus-Xmagtk6r.js +52 -0
  165. package/dist/cdn/chunks/rich-text-CQ2uwMSp.js +47 -0
  166. package/dist/cdn/chunks/rich-text.i18n-BlJ68YuU.js +3 -0
  167. package/dist/cdn/chunks/row-header-mixin-CgqvREoV.js +16 -0
  168. package/dist/cdn/chunks/sanitize-url-CBuGmY0W.js +7 -0
  169. package/dist/cdn/chunks/scroll-mode-controller-COUD1-3P.js +42 -0
  170. package/dist/cdn/chunks/search-field-BGNfERhn.js +396 -0
  171. package/dist/cdn/chunks/search-field.i18n-B_Oc7hc-.js +6 -0
  172. package/dist/cdn/chunks/segmented-control-BYAG4VRp.js +671 -0
  173. package/dist/cdn/chunks/shadow-resets-6SToDsPu.js +12 -0
  174. package/dist/cdn/chunks/sheet-BdVCqm2H.js +340 -0
  175. package/dist/cdn/chunks/shell-C9rds_D9.js +146 -0
  176. package/dist/cdn/chunks/shell-DmJOYhyF.js +108 -0
  177. package/dist/cdn/chunks/side-by-side-split-view-C5oX4c6Z.js +166 -0
  178. package/dist/cdn/chunks/sidebar-section-DP4jnS7g.js +353 -0
  179. package/dist/cdn/chunks/sidebar-section.i18n-BuGfRMpD.js +6 -0
  180. package/dist/cdn/chunks/simple-section-qrCqXeBa.js +192 -0
  181. package/dist/cdn/chunks/skip-link-DWh4W6-J.js +161 -0
  182. package/dist/cdn/chunks/skip-link.i18n--PbEdAmJ.js +3 -0
  183. package/dist/cdn/chunks/slider--hODfOwh.js +772 -0
  184. package/dist/cdn/chunks/slider.i18n-DVw0c8AG.js +6 -0
  185. package/dist/cdn/chunks/slot-content-BLuPqVXw.js +13 -0
  186. package/dist/cdn/chunks/spacer-CFzq_JCh.js +237 -0
  187. package/dist/cdn/chunks/spacer-cell-DuVOgIj8.js +68 -0
  188. package/dist/cdn/chunks/spacing-scale-SufIjHeN.js +28 -0
  189. package/dist/cdn/chunks/split-button-BeXnOUTt.js +268 -0
  190. package/dist/cdn/chunks/split-button.i18n-DtClSMga.js +3 -0
  191. package/dist/cdn/chunks/split-view-divider-jzcPmnMh.js +100 -0
  192. package/dist/cdn/chunks/split-view-pane-BLsZz263.js +128 -0
  193. package/dist/cdn/chunks/stacked-split-view-CcOR8LrJ.js +157 -0
  194. package/dist/cdn/chunks/static-html-Cf4ccUIg.js +26 -0
  195. package/dist/cdn/chunks/status-bar-CINbOihq.js +284 -0
  196. package/dist/cdn/chunks/status-bar-change-CR9l0Gyk.js +3 -0
  197. package/dist/cdn/chunks/step-bar-6FvZL1Ti.js +474 -0
  198. package/dist/cdn/chunks/step-bar.i18n-DocExlD7.js +9 -0
  199. package/dist/cdn/chunks/step-cell-CejRisgS.js +287 -0
  200. package/dist/cdn/chunks/stepper-CY2rJWOJ.js +223 -0
  201. package/dist/cdn/chunks/stepper.i18n-COOAkaBl.js +7 -0
  202. package/dist/cdn/chunks/style-map-DsIw6lkq.js +29 -0
  203. package/dist/cdn/chunks/style-mod-DGMhzWuk.js +1583 -0
  204. package/dist/cdn/chunks/swatch-picker-BY3DBIl6.js +430 -0
  205. package/dist/cdn/chunks/swatch-picker.i18n-_G0nmnGe.js +22 -0
  206. package/dist/cdn/chunks/switch-DDSsZFwK.js +275 -0
  207. package/dist/cdn/chunks/switch-field-CMoM9I38.js +137 -0
  208. package/dist/cdn/chunks/tab-bar-DmslEoPD.js +697 -0
  209. package/dist/cdn/chunks/tab-bar.i18n-Crsc7ShA.js +3 -0
  210. package/dist/cdn/chunks/table-DwXjCSD5.js +308 -0
  211. package/dist/cdn/chunks/table.i18n-Bmb_uw_w.js +3 -0
  212. package/dist/cdn/chunks/tag-DM3APy3B.js +306 -0
  213. package/dist/cdn/chunks/text-B1CatNR1.js +421 -0
  214. package/dist/cdn/chunks/text-cell-BkEsGI3g.js +299 -0
  215. package/dist/cdn/chunks/text-editor-BvTiMeNV.js +3743 -0
  216. package/dist/cdn/chunks/text-editor.i18n-sJKiRQ4i.js +17 -0
  217. package/dist/cdn/chunks/text-field-CUyh1-V8.js +398 -0
  218. package/dist/cdn/chunks/time-field-Cj5WojfO.js +597 -0
  219. package/dist/cdn/chunks/time-field.i18n-CLH5vmS7.js +11 -0
  220. package/dist/cdn/chunks/time-picker-W0xYXLy8.js +508 -0
  221. package/dist/cdn/chunks/time-picker.i18n-BilOCXlS.js +7 -0
  222. package/dist/cdn/chunks/title-BuT7tWqN.js +437 -0
  223. package/dist/cdn/chunks/title-bar-label-controller-DSxdKZOg.js +24 -0
  224. package/dist/cdn/chunks/title-cell-8d8psUBX.js +327 -0
  225. package/dist/cdn/chunks/toggle-button-DNXWXZpE.js +528 -0
  226. package/dist/cdn/chunks/toggle-button-group-ByowJYgs.js +156 -0
  227. package/dist/cdn/chunks/token-CnkEB3hB.js +266 -0
  228. package/dist/cdn/chunks/token-field-hvDB3l6O.js +664 -0
  229. package/dist/cdn/chunks/token-field.i18n-BclzoR8F.js +9 -0
  230. package/dist/cdn/chunks/token.i18n-RGD5zAtl.js +7 -0
  231. package/dist/cdn/chunks/toml-w97zZfFO.js +27 -0
  232. package/dist/cdn/chunks/toolbar-iNd1VmuG.js +408 -0
  233. package/dist/cdn/chunks/toolbar-item-DpPfPxCi.js +50 -0
  234. package/dist/cdn/chunks/toolbar-title-KBMpfL9d.js +84 -0
  235. package/dist/cdn/chunks/toolbar.i18n-QwS37CBC.js +8 -0
  236. package/dist/cdn/chunks/toolbar.styles-BQkG4gVc.js +383 -0
  237. package/dist/cdn/chunks/tooltip-BsAHJjci.js +325 -0
  238. package/dist/cdn/chunks/top-navigation-bar-D1hjWIF3.js +925 -0
  239. package/dist/cdn/chunks/top-navigation-bar.i18n-C-lcH1nB.js +10 -0
  240. package/dist/cdn/chunks/top-title-bar-iNFB2zQL.js +344 -0
  241. package/dist/cdn/chunks/translations-wxBSz213.js +8 -0
  242. package/dist/cdn/chunks/two-thirds-one-third-section-D-UANbHC.js +213 -0
  243. package/dist/cdn/chunks/validation-list-C5BhHZIG.js +202 -0
  244. package/dist/cdn/chunks/validation-list.i18n-CM6In8zD.js +12 -0
  245. package/dist/cdn/chunks/visibility-mixin-COAZ9pON.js +74 -0
  246. package/dist/cdn/chunks/visually-hidden-BPgATaH0.js +43 -0
  247. package/dist/cdn/chunks/window-t5iFkMLY.js +227 -0
  248. package/dist/cdn/chunks/window.i18n-CsEnUPAk.js +3 -0
  249. package/dist/cdn/chunks/with-translations-XX14GKFh.js +16 -0
  250. package/dist/components/actions/button/button.d.ts +5 -5
  251. package/dist/components/actions/button/button.d.ts.map +1 -1
  252. package/dist/components/actions/button/button.js +6 -6
  253. package/dist/components/actions/button/button.js.map +1 -1
  254. package/dist/components/actions/button/button.template.d.ts.map +1 -1
  255. package/dist/components/actions/button/button.template.js +6 -8
  256. package/dist/components/actions/button/button.template.js.map +1 -1
  257. package/dist/components/actions/button-bar/button-bar.d.ts.map +1 -1
  258. package/dist/components/actions/button-bar/button-bar.js +15 -4
  259. package/dist/components/actions/button-bar/button-bar.js.map +1 -1
  260. package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
  261. package/dist/components/actions/button-group/button-group.js +7 -1
  262. package/dist/components/actions/button-group/button-group.js.map +1 -1
  263. package/dist/components/actions/button-group/button-group.styles.js +2 -2
  264. package/dist/components/actions/icon-button/icon-button.d.ts +3 -3
  265. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  266. package/dist/components/actions/icon-button/icon-button.js +4 -4
  267. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  268. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  269. package/dist/components/actions/icon-button/icon-button.template.js +2 -4
  270. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  271. package/dist/components/actions/menu/menu-item.d.ts +12 -3
  272. package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
  273. package/dist/components/actions/menu/menu-item.js +27 -6
  274. package/dist/components/actions/menu/menu-item.js.map +1 -1
  275. package/dist/components/actions/menu/menu.d.ts +31 -8
  276. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  277. package/dist/components/actions/menu/menu.js +108 -32
  278. package/dist/components/actions/menu/menu.js.map +1 -1
  279. package/dist/components/actions/menu/menu.pointer.d.ts +7 -0
  280. package/dist/components/actions/menu/menu.pointer.d.ts.map +1 -1
  281. package/dist/components/actions/menu/menu.pointer.js +17 -0
  282. package/dist/components/actions/menu/menu.pointer.js.map +1 -1
  283. package/dist/components/actions/menu/menu.safe-triangle.d.ts +6 -5
  284. package/dist/components/actions/menu/menu.safe-triangle.d.ts.map +1 -1
  285. package/dist/components/actions/menu/menu.safe-triangle.js +3 -3
  286. package/dist/components/actions/menu/menu.safe-triangle.js.map +1 -1
  287. package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
  288. package/dist/components/actions/menu/menu.styles.js +6 -0
  289. package/dist/components/actions/menu/menu.styles.js.map +1 -1
  290. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  291. package/dist/components/actions/menu/menu.template.js +17 -9
  292. package/dist/components/actions/menu/menu.template.js.map +1 -1
  293. package/dist/components/actions/toolbar/toolbar-title.js +2 -2
  294. package/dist/components/actions/toolbar/toolbar-title.js.map +1 -1
  295. package/dist/components/content/avatar/avatar.js +1 -1
  296. package/dist/components/content/avatar/avatar.js.map +1 -1
  297. package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
  298. package/dist/components/content/avatar-group/avatar-group.js +2 -1
  299. package/dist/components/content/avatar-group/avatar-group.js.map +1 -1
  300. package/dist/components/content/image/image.js +1 -1
  301. package/dist/components/content/image/image.js.map +1 -1
  302. package/dist/components/content/tag/tag.d.ts +3 -3
  303. package/dist/components/content/tag/tag.js +3 -3
  304. package/dist/components/content/tag/tag.template.js +3 -3
  305. package/dist/components/content/tag/tag.template.js.map +1 -1
  306. package/dist/components/content/title/title.js +1 -1
  307. package/dist/components/content/title/title.js.map +1 -1
  308. package/dist/components/content/token/token.d.ts +6 -4
  309. package/dist/components/content/token/token.d.ts.map +1 -1
  310. package/dist/components/content/token/token.js +6 -4
  311. package/dist/components/content/token/token.js.map +1 -1
  312. package/dist/components/content/token/token.template.js +1 -1
  313. package/dist/components/content/token/token.template.js.map +1 -1
  314. package/dist/components/inputs/dropdown/dropdown.d.ts +22 -2
  315. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  316. package/dist/components/inputs/dropdown/dropdown.js +67 -11
  317. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  318. package/dist/components/inputs/file-field/file-field.js +1 -1
  319. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  320. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.d.ts.map +1 -1
  321. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js +4 -2
  322. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js.map +1 -1
  323. package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js +2 -2
  324. package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js.map +1 -1
  325. package/dist/components/inputs/segmented-control/segmented-control.d.ts +2 -2
  326. package/dist/components/inputs/segmented-control/segmented-control.js +4 -4
  327. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  328. package/dist/components/inputs/segmented-control/segmented-control.template.js +2 -2
  329. package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
  330. package/dist/components/inputs/swatch-picker/swatch-picker.js +1 -1
  331. package/dist/components/inputs/swatch-picker/swatch-picker.js.map +1 -1
  332. package/dist/components/inputs/time-picker/time-picker.js +1 -1
  333. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  334. package/dist/components/inputs/toggle-button/toggle-button.d.ts +2 -2
  335. package/dist/components/inputs/toggle-button/toggle-button.js +3 -3
  336. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  337. package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
  338. package/dist/components/inputs/toggle-button/toggle-button.template.js +7 -10
  339. package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
  340. package/dist/components/inputs/toggle-button-group/toggle-button-group.js +1 -1
  341. package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
  342. package/dist/components/inputs/toggle-button-group/toggle-button-group.styles.js +3 -3
  343. package/dist/components/layout/card/card.js +1 -1
  344. package/dist/components/layout/card/card.js.map +1 -1
  345. package/dist/components/layout/card/card.styles.d.ts.map +1 -1
  346. package/dist/components/layout/card/card.styles.js +3 -1
  347. package/dist/components/layout/card/card.styles.js.map +1 -1
  348. package/dist/components/layout/container/container.d.ts +15 -2
  349. package/dist/components/layout/container/container.d.ts.map +1 -1
  350. package/dist/components/layout/container/container.js +38 -3
  351. package/dist/components/layout/container/container.js.map +1 -1
  352. package/dist/components/layout/container/container.styles.js +1 -1
  353. package/dist/components/layout/container/container.template.js +1 -1
  354. package/dist/components/layout/container/container.template.js.map +1 -1
  355. package/dist/components/layout/kanban/kanban.d.ts.map +1 -1
  356. package/dist/components/layout/kanban/kanban.js +2 -1
  357. package/dist/components/layout/kanban/kanban.js.map +1 -1
  358. package/dist/components/layout/page/page.d.ts.map +1 -1
  359. package/dist/components/layout/page/page.js +3 -2
  360. package/dist/components/layout/page/page.js.map +1 -1
  361. package/dist/components/layout/page/page.styles.d.ts.map +1 -1
  362. package/dist/components/layout/page/page.styles.js +3 -2
  363. package/dist/components/layout/page/page.styles.js.map +1 -1
  364. package/dist/components/layout/page-footer/page-footer.d.ts +5 -2
  365. package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
  366. package/dist/components/layout/page-footer/page-footer.js +5 -2
  367. package/dist/components/layout/page-footer/page-footer.js.map +1 -1
  368. package/dist/components/layout/page-footer/page-footer.template.d.ts.map +1 -1
  369. package/dist/components/layout/page-footer/page-footer.template.js +2 -4
  370. package/dist/components/layout/page-footer/page-footer.template.js.map +1 -1
  371. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +1 -1
  372. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
  373. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +2 -2
  374. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
  375. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  376. package/dist/components/layout/page-sections/hero/hero.js +2 -2
  377. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  378. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +1 -1
  379. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
  380. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +2 -2
  381. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
  382. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +1 -1
  383. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
  384. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +2 -2
  385. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
  386. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +1 -1
  387. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
  388. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +4 -4
  389. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
  390. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +1 -1
  391. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  392. package/dist/components/layout/page-sections/simple-section/simple-section.js +2 -2
  393. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  394. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +1 -1
  395. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
  396. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +2 -2
  397. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
  398. package/dist/components/layout/popover/popover.d.ts +1 -2
  399. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  400. package/dist/components/layout/popover/popover.js +10 -12
  401. package/dist/components/layout/popover/popover.js.map +1 -1
  402. package/dist/components/layout/sheet/sheet.d.ts +1 -0
  403. package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
  404. package/dist/components/layout/sheet/sheet.js +6 -1
  405. package/dist/components/layout/sheet/sheet.js.map +1 -1
  406. package/dist/components/layout/spacer/spacer.js +1 -1
  407. package/dist/components/layout/spacer/spacer.js.map +1 -1
  408. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
  409. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +2 -1
  410. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
  411. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
  412. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +3 -2
  413. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
  414. package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts.map +1 -1
  415. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +2 -1
  416. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
  417. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
  418. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +3 -2
  419. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
  420. package/dist/components/layout/window/window.d.ts +1 -0
  421. package/dist/components/layout/window/window.d.ts.map +1 -1
  422. package/dist/components/layout/window/window.js +7 -1
  423. package/dist/components/layout/window/window.js.map +1 -1
  424. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts +5 -2
  425. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts.map +1 -1
  426. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js +7 -4
  427. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js.map +1 -1
  428. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.template.js +3 -3
  429. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.template.js.map +1 -1
  430. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
  431. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js +2 -1
  432. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js.map +1 -1
  433. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +2 -2
  434. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +2 -2
  435. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +2 -2
  436. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +2 -2
  437. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  438. package/dist/components/lists-and-tables/list/list.js +4 -1
  439. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  440. package/dist/components/lists-and-tables/list-item/list-item.d.ts +19 -9
  441. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  442. package/dist/components/lists-and-tables/list-item/list-item.js +30 -14
  443. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  444. package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
  445. package/dist/components/lists-and-tables/list-item/list-item.styles.js +20 -0
  446. package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
  447. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +11 -1
  448. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
  449. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +19 -3
  450. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
  451. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
  452. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +6 -0
  453. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
  454. package/dist/components/lists-and-tables/table/table.js +5 -5
  455. package/dist/components/lists-and-tables/table/table.js.map +1 -1
  456. package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts +5 -2
  457. package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  458. package/dist/components/navigation/breadcrumbs/breadcrumbs.js +5 -2
  459. package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -1
  460. package/dist/components/navigation/breadcrumbs/breadcrumbs.template.d.ts.map +1 -1
  461. package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js +2 -4
  462. package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js.map +1 -1
  463. package/dist/components/navigation/link/link.d.ts +7 -4
  464. package/dist/components/navigation/link/link.d.ts.map +1 -1
  465. package/dist/components/navigation/link/link.js +7 -4
  466. package/dist/components/navigation/link/link.js.map +1 -1
  467. package/dist/components/navigation/link/link.template.js +5 -5
  468. package/dist/components/navigation/link/link.template.js.map +1 -1
  469. package/dist/components/navigation/menu-bar-item/menu-bar-item.js +1 -1
  470. package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
  471. package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
  472. package/dist/components/navigation/pagination/pagination.js +3 -2
  473. package/dist/components/navigation/pagination/pagination.js.map +1 -1
  474. package/dist/components/navigation/tab-bar/tab-bar.d.ts +18 -2
  475. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  476. package/dist/components/navigation/tab-bar/tab-bar.js +51 -3
  477. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  478. package/dist/components/navigation/tab-bar/tab-bar.template.d.ts.map +1 -1
  479. package/dist/components/navigation/tab-bar/tab-bar.template.js +5 -3
  480. package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
  481. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +2 -2
  482. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  483. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts +4 -0
  484. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts.map +1 -1
  485. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js +26 -2
  486. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js.map +1 -1
  487. package/dist/components/status-and-feedback/banner/banner.js +1 -1
  488. package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
  489. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +2 -2
  490. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js.map +1 -1
  491. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js +1 -1
  492. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js.map +1 -1
  493. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +1 -1
  494. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
  495. package/dist/components/status-and-feedback/notification/notification.js +2 -2
  496. package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
  497. package/dist/components/status-and-feedback/progress-bar/progress-bar.js +4 -4
  498. package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
  499. package/dist/components/status-and-feedback/progress-circle/progress-circle.js +4 -4
  500. package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
  501. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +5 -2
  502. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts.map +1 -1
  503. package/dist/components/status-and-feedback/step-bar/step-bar.js +6 -3
  504. package/dist/components/status-and-feedback/step-bar/step-bar.js.map +1 -1
  505. package/dist/components/status-and-feedback/step-bar/step-bar.template.js +1 -1
  506. package/dist/components/status-and-feedback/step-bar/step-bar.template.js.map +1 -1
  507. package/dist/css/variables.css +6 -0
  508. package/dist/nldd.min.js +784 -728
  509. package/dist/types/react.d.ts +3323 -0
  510. package/dist/types/vue.d.ts +26 -14
  511. package/dist/utilities/autoloader.d.ts +33 -0
  512. package/dist/utilities/autoloader.d.ts.map +1 -0
  513. package/dist/utilities/autoloader.generated.d.ts +3 -0
  514. package/dist/utilities/autoloader.generated.d.ts.map +1 -0
  515. package/dist/utilities/autoloader.generated.js +141 -0
  516. package/dist/utilities/autoloader.generated.js.map +1 -0
  517. package/dist/utilities/autoloader.js +94 -0
  518. package/dist/utilities/autoloader.js.map +1 -0
  519. package/dist/utilities/dev-checks.d.ts +9 -0
  520. package/dist/utilities/dev-checks.d.ts.map +1 -1
  521. package/dist/utilities/dev-checks.js +45 -3
  522. package/dist/utilities/dev-checks.js.map +1 -1
  523. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  524. package/dist/utilities/dev-rules.generated.js +17 -2
  525. package/dist/utilities/dev-rules.generated.js.map +1 -1
  526. package/dist/utilities/input-modality.d.ts.map +1 -1
  527. package/dist/utilities/input-modality.js +4 -2
  528. package/dist/utilities/input-modality.js.map +1 -1
  529. package/dist/utilities/loading-tags.d.ts +7 -0
  530. package/dist/utilities/loading-tags.d.ts.map +1 -0
  531. package/dist/utilities/loading-tags.js +7 -0
  532. package/dist/utilities/loading-tags.js.map +1 -0
  533. package/dist/utilities/owner-form.d.ts +3 -3
  534. package/dist/utilities/owner-form.d.ts.map +1 -1
  535. package/dist/utilities/owner-form.js +6 -3
  536. package/dist/utilities/owner-form.js.map +1 -1
  537. package/dist/utilities/page-section-mixin.d.ts +10 -4
  538. package/dist/utilities/page-section-mixin.d.ts.map +1 -1
  539. package/dist/utilities/page-section-mixin.js +29 -23
  540. package/dist/utilities/page-section-mixin.js.map +1 -1
  541. package/dist/utilities/return-focus.d.ts +44 -0
  542. package/dist/utilities/return-focus.d.ts.map +1 -0
  543. package/dist/utilities/return-focus.js +99 -0
  544. package/dist/utilities/return-focus.js.map +1 -0
  545. package/dist/utilities/slot-content.d.ts +30 -0
  546. package/dist/utilities/slot-content.d.ts.map +1 -0
  547. package/dist/utilities/slot-content.js +38 -0
  548. package/dist/utilities/slot-content.js.map +1 -0
  549. package/lint/data.generated.json +1 -1
  550. package/package.json +50 -11
  551. package/dist/components/breakpoints-DtL62nLI.js +0 -45
  552. package/dist/components/components.js +0 -67895
  553. package/dist/components/decorate-C7khEuc7.js +0 -16
  554. package/dist/components/defer-focus-BQ3c4mzj.js +0 -176
  555. package/dist/components/dev-checks-lQ-gHUjV.js +0 -2706
  556. package/dist/components/dist-245LaK9m.js +0 -1479
  557. package/dist/components/dist-BFZM0YsR.js +0 -15772
  558. package/dist/components/dist-BNkeFjc3.js +0 -1180
  559. package/dist/components/dist-CSC1dG3L.js +0 -365
  560. package/dist/components/dist-CeMOOqgP.js +0 -1509
  561. package/dist/components/dist-DFjwTlJV.js +0 -624
  562. package/dist/components/dist-DHhnz3Gv.js +0 -381
  563. package/dist/components/dist-PeUX4vPq.js +0 -2857
  564. package/dist/components/dist-m70B83qb.js +0 -463
  565. package/dist/components/element-state-BnarBv0M.js +0 -42
  566. package/dist/components/gherkin-DzYbEwDO.js +0 -107
  567. package/dist/components/icon-button-CfpnGzYQ.js +0 -2308
  568. package/dist/components/input-modality-CiPLYYMN.js +0 -42
  569. package/dist/components/just-in-time-education.i18n-BqU1ImP4.js +0 -423
  570. package/dist/components/nl.generated-DzZkOgnP.js +0 -64
  571. package/dist/components/reflect-non-default-B9wQcnne.js +0 -36
  572. package/dist/components/rolldown-runtime-D8jQpDG7.js +0 -12
  573. package/dist/components/shadow-resets-BwOyyZFH.js +0 -60
  574. package/dist/components/shell-Dh5IwHd-.js +0 -222
  575. package/dist/components/toml-D0Pix_8Q.js +0 -58
  576. package/dist/components/visibility-mixin-BMtETgjk.js +0 -153
@@ -1,1509 +0,0 @@
1
- import { A as syntaxTree, I as ViewPlugin, L as WidgetType, M as Direction, N as EditorView, T as indentUnit, V as getTooltip, W as keymap, Y as showTooltip, Z as Annotation, at as Prec, ct as RangeValue, dt as Text, ft as Transaction, ht as combineConfig, it as MapMode, j as Decoration, lt as StateEffect, mt as codePointSize, pt as codePointAt, q as logException, rt as Facet, tt as EditorSelection, ut as StateField, vt as fromCodePoint } from "./dist-BFZM0YsR.js";
2
- // node_modules/@codemirror/autocomplete/dist/index.js
3
- /**
4
- An instance of this is passed to completion source functions.
5
- */
6
- var CompletionContext = class {
7
- /**
8
- Create a new completion context. (Mostly useful for testing
9
- completion sources—in the editor, the extension will create
10
- these for you.)
11
- */
12
- constructor(state, pos, explicit, view) {
13
- this.state = state;
14
- this.pos = pos;
15
- this.explicit = explicit;
16
- this.view = view;
17
- /**
18
- @internal
19
- */
20
- this.abortListeners = [];
21
- /**
22
- @internal
23
- */
24
- this.abortOnDocChange = false;
25
- }
26
- /**
27
- Get the extent, content, and (if there is a token) type of the
28
- token before `this.pos`.
29
- */
30
- tokenBefore(types) {
31
- let token = syntaxTree(this.state).resolveInner(this.pos, -1);
32
- while (token && types.indexOf(token.name) < 0) token = token.parent;
33
- return token ? {
34
- from: token.from,
35
- to: this.pos,
36
- text: this.state.sliceDoc(token.from, this.pos),
37
- type: token.type
38
- } : null;
39
- }
40
- /**
41
- Get the match of the given expression directly before the
42
- cursor.
43
- */
44
- matchBefore(expr) {
45
- let line = this.state.doc.lineAt(this.pos);
46
- let start = Math.max(line.from, this.pos - 250);
47
- let str = line.text.slice(start - line.from, this.pos - line.from);
48
- let found = str.search(ensureAnchor(expr, false));
49
- return found < 0 ? null : {
50
- from: start + found,
51
- to: this.pos,
52
- text: str.slice(found)
53
- };
54
- }
55
- /**
56
- Yields true when the query has been aborted. Can be useful in
57
- asynchronous queries to avoid doing work that will be ignored.
58
- */
59
- get aborted() {
60
- return this.abortListeners == null;
61
- }
62
- /**
63
- Allows you to register abort handlers, which will be called when
64
- the query is
65
- [aborted](https://codemirror.net/6/docs/ref/#autocomplete.CompletionContext.aborted).
66
-
67
- By default, running queries will not be aborted for regular
68
- typing or backspacing, on the assumption that they are likely to
69
- return a result with a
70
- [`validFor`](https://codemirror.net/6/docs/ref/#autocomplete.CompletionResult.validFor) field that
71
- allows the result to be used after all. Passing `onDocChange:
72
- true` will cause this query to be aborted for any document
73
- change.
74
- */
75
- addEventListener(type, listener, options) {
76
- if (type == "abort" && this.abortListeners) {
77
- this.abortListeners.push(listener);
78
- if (options && options.onDocChange) this.abortOnDocChange = true;
79
- }
80
- }
81
- };
82
- function toSet(chars) {
83
- let flat = Object.keys(chars).join("");
84
- let words = /\w/.test(flat);
85
- if (words) flat = flat.replace(/\w/g, "");
86
- return `[${words ? "\\w" : ""}${flat.replace(/[^\w\s]/g, "\\$&")}]`;
87
- }
88
- function prefixMatch(options) {
89
- let first = Object.create(null), rest = Object.create(null);
90
- for (let { label } of options) {
91
- first[label[0]] = true;
92
- for (let i = 1; i < label.length; i++) rest[label[i]] = true;
93
- }
94
- let source = toSet(first) + toSet(rest) + "*$";
95
- return [new RegExp("^" + source), new RegExp(source)];
96
- }
97
- /**
98
- Given a a fixed array of options, return an autocompleter that
99
- completes them.
100
- */
101
- function completeFromList(list) {
102
- let options = list.map((o) => typeof o == "string" ? { label: o } : o);
103
- let [validFor, match] = options.every((o) => /^\w+$/.test(o.label)) ? [/\w*$/, /\w+$/] : prefixMatch(options);
104
- return (context) => {
105
- let token = context.matchBefore(match);
106
- return token || context.explicit ? {
107
- from: token ? token.from : context.pos,
108
- options,
109
- validFor
110
- } : null;
111
- };
112
- }
113
- /**
114
- Wrap the given completion source so that it will not fire when the
115
- cursor is in a syntax node with one of the given names.
116
- */
117
- function ifNotIn(nodes, source) {
118
- return (context) => {
119
- for (let pos = syntaxTree(context.state).resolveInner(context.pos, -1); pos; pos = pos.parent) {
120
- if (nodes.indexOf(pos.name) > -1) return null;
121
- if (pos.type.isTop) break;
122
- }
123
- return source(context);
124
- };
125
- }
126
- var Option = class {
127
- constructor(completion, source, match, score) {
128
- this.completion = completion;
129
- this.source = source;
130
- this.match = match;
131
- this.score = score;
132
- }
133
- };
134
- function cur(state) {
135
- return state.selection.main.from;
136
- }
137
- function ensureAnchor(expr, start) {
138
- var _a;
139
- let { source } = expr;
140
- let addStart = start && source[0] != "^", addEnd = source[source.length - 1] != "$";
141
- if (!addStart && !addEnd) return expr;
142
- return new RegExp(`${addStart ? "^" : ""}(?:${source})${addEnd ? "$" : ""}`, (_a = expr.flags) !== null && _a !== void 0 ? _a : expr.ignoreCase ? "i" : "");
143
- }
144
- /**
145
- This annotation is added to transactions that are produced by
146
- picking a completion.
147
- */
148
- var pickedCompletion = /*@__PURE__*/ Annotation.define();
149
- /**
150
- Helper function that returns a transaction spec which inserts a
151
- completion's text in the main selection range, and any other
152
- selection range that has the same text in front of it.
153
- */
154
- function insertCompletionText(state, text, from, to) {
155
- let { main } = state.selection, fromOff = from - main.from, toOff = to - main.from;
156
- return {
157
- ...state.changeByRange((range) => {
158
- if (range != main && from != to && state.sliceDoc(range.from + fromOff, range.from + toOff) != state.sliceDoc(from, to)) return { range };
159
- let lines = state.toText(text);
160
- return {
161
- changes: {
162
- from: range.from + fromOff,
163
- to: to == main.from ? range.to : range.from + toOff,
164
- insert: lines
165
- },
166
- range: EditorSelection.cursor(range.from + fromOff + lines.length)
167
- };
168
- }),
169
- scrollIntoView: true,
170
- userEvent: "input.complete"
171
- };
172
- }
173
- var SourceCache = /*@__PURE__*/ new WeakMap();
174
- function asSource(source) {
175
- if (!Array.isArray(source)) return source;
176
- let known = SourceCache.get(source);
177
- if (!known) SourceCache.set(source, known = completeFromList(source));
178
- return known;
179
- }
180
- var startCompletionEffect = /*@__PURE__*/ StateEffect.define();
181
- var closeCompletionEffect = /*@__PURE__*/ StateEffect.define();
182
- var FuzzyMatcher = class {
183
- constructor(pattern) {
184
- this.pattern = pattern;
185
- this.chars = [];
186
- this.folded = [];
187
- this.any = [];
188
- this.precise = [];
189
- this.byWord = [];
190
- this.score = 0;
191
- this.matched = [];
192
- for (let p = 0; p < pattern.length;) {
193
- let char = codePointAt(pattern, p), size = codePointSize(char);
194
- this.chars.push(char);
195
- let part = pattern.slice(p, p + size), upper = part.toUpperCase();
196
- this.folded.push(codePointAt(upper == part ? part.toLowerCase() : upper, 0));
197
- p += size;
198
- }
199
- this.astral = pattern.length != this.chars.length;
200
- }
201
- ret(score, matched) {
202
- this.score = score;
203
- this.matched = matched;
204
- return this;
205
- }
206
- match(word) {
207
- if (this.pattern.length == 0) return this.ret(-100, []);
208
- if (word.length < this.pattern.length) return null;
209
- let { chars, folded, any, precise, byWord } = this;
210
- if (chars.length == 1) {
211
- let first = codePointAt(word, 0), firstSize = codePointSize(first);
212
- let score = firstSize == word.length ? 0 : -100;
213
- if (first == chars[0]);
214
- else if (first == folded[0]) score += -200;
215
- else return null;
216
- return this.ret(score, [0, firstSize]);
217
- }
218
- let direct = word.indexOf(this.pattern);
219
- if (direct == 0) return this.ret(word.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
220
- let len = chars.length, anyTo = 0;
221
- if (direct < 0) {
222
- for (let i = 0, e = Math.min(word.length, 200); i < e && anyTo < len;) {
223
- let next = codePointAt(word, i);
224
- if (next == chars[anyTo] || next == folded[anyTo]) any[anyTo++] = i;
225
- i += codePointSize(next);
226
- }
227
- if (anyTo < len) return null;
228
- }
229
- let preciseTo = 0;
230
- let byWordTo = 0, byWordFolded = false;
231
- let adjacentTo = 0, adjacentStart = -1, adjacentEnd = -1;
232
- let hasLower = /[a-z]/.test(word), wordAdjacent = true;
233
- for (let i = 0, e = Math.min(word.length, 200), prevType = 0; i < e && byWordTo < len;) {
234
- let next = codePointAt(word, i);
235
- if (direct < 0) {
236
- if (preciseTo < len && next == chars[preciseTo]) precise[preciseTo++] = i;
237
- if (adjacentTo < len) {
238
- if (next == chars[adjacentTo] || next == folded[adjacentTo]) {
239
- if (adjacentTo == 0) adjacentStart = i;
240
- adjacentEnd = i + 1;
241
- adjacentTo++;
242
- } else adjacentTo = 0;
243
- }
244
- }
245
- let ch, type = next < 255 ? next >= 48 && next <= 57 || next >= 97 && next <= 122 ? 2 : next >= 65 && next <= 90 ? 1 : 0 : (ch = fromCodePoint(next)) != ch.toLowerCase() ? 1 : ch != ch.toUpperCase() ? 2 : 0;
246
- if (!i || type == 1 && hasLower || prevType == 0 && type != 0) {
247
- if (chars[byWordTo] == next || folded[byWordTo] == next && (byWordFolded = true)) byWord[byWordTo++] = i;
248
- else if (byWord.length) wordAdjacent = false;
249
- }
250
- prevType = type;
251
- i += codePointSize(next);
252
- }
253
- if (byWordTo == len && byWord[0] == 0 && wordAdjacent) return this.result(-100 + (byWordFolded ? -200 : 0), byWord, word);
254
- if (adjacentTo == len && adjacentStart == 0) return this.ret(-200 - word.length + (adjacentEnd == word.length ? 0 : -100), [0, adjacentEnd]);
255
- if (direct > -1) return this.ret(-700 - word.length, [direct, direct + this.pattern.length]);
256
- if (adjacentTo == len) return this.ret(-900 - word.length, [adjacentStart, adjacentEnd]);
257
- if (byWordTo == len) return this.result(-100 + (byWordFolded ? -200 : 0) + -700 + (wordAdjacent ? 0 : -1100), byWord, word);
258
- return chars.length == 2 ? null : this.result((any[0] ? -700 : 0) + -200 + -1100, any, word);
259
- }
260
- result(score, positions, word) {
261
- let result = [], i = 0;
262
- for (let pos of positions) {
263
- let to = pos + (this.astral ? codePointSize(codePointAt(word, pos)) : 1);
264
- if (i && result[i - 1] == pos) result[i - 1] = to;
265
- else {
266
- result[i++] = pos;
267
- result[i++] = to;
268
- }
269
- }
270
- return this.ret(score - word.length, result);
271
- }
272
- };
273
- var StrictMatcher = class {
274
- constructor(pattern) {
275
- this.pattern = pattern;
276
- this.matched = [];
277
- this.score = 0;
278
- this.folded = pattern.toLowerCase();
279
- }
280
- match(word) {
281
- if (word.length < this.pattern.length) return null;
282
- let start = word.slice(0, this.pattern.length);
283
- let match = start == this.pattern ? 0 : start.toLowerCase() == this.folded ? -200 : null;
284
- if (match == null) return null;
285
- this.matched = [0, start.length];
286
- this.score = match + (word.length == this.pattern.length ? 0 : -100);
287
- return this;
288
- }
289
- };
290
- var completionConfig = /*@__PURE__*/ Facet.define({ combine(configs) {
291
- return combineConfig(configs, {
292
- activateOnTyping: true,
293
- activateOnCompletion: () => false,
294
- activateOnTypingDelay: 100,
295
- selectOnOpen: true,
296
- override: null,
297
- closeOnBlur: true,
298
- maxRenderedOptions: 100,
299
- defaultKeymap: true,
300
- tooltipClass: () => "",
301
- optionClass: () => "",
302
- aboveCursor: false,
303
- icons: true,
304
- addToOptions: [],
305
- positionInfo: defaultPositionInfo,
306
- filterStrict: false,
307
- compareCompletions: (a, b) => (a.sortText || a.label).localeCompare(b.sortText || b.label),
308
- interactionDelay: 75,
309
- updateSyncTime: 100
310
- }, {
311
- defaultKeymap: (a, b) => a && b,
312
- closeOnBlur: (a, b) => a && b,
313
- icons: (a, b) => a && b,
314
- tooltipClass: (a, b) => (c) => joinClass(a(c), b(c)),
315
- optionClass: (a, b) => (c) => joinClass(a(c), b(c)),
316
- addToOptions: (a, b) => a.concat(b),
317
- filterStrict: (a, b) => a || b
318
- });
319
- } });
320
- function joinClass(a, b) {
321
- return a ? b ? a + " " + b : a : b;
322
- }
323
- function defaultPositionInfo(view, list, option, info, space, tooltip) {
324
- let rtl = view.textDirection == Direction.RTL, left = rtl, narrow = false;
325
- let side = "top", offset, maxWidth;
326
- let spaceLeft = list.left - space.left, spaceRight = space.right - list.right;
327
- let infoWidth = info.right - info.left, infoHeight = info.bottom - info.top;
328
- if (left && spaceLeft < Math.min(infoWidth, spaceRight)) left = false;
329
- else if (!left && spaceRight < Math.min(infoWidth, spaceLeft)) left = true;
330
- if (infoWidth <= (left ? spaceLeft : spaceRight)) {
331
- offset = Math.max(space.top, Math.min(option.top, space.bottom - infoHeight)) - list.top;
332
- maxWidth = Math.min(400, left ? spaceLeft : spaceRight);
333
- } else {
334
- narrow = true;
335
- maxWidth = Math.min(400, (rtl ? list.right : space.right - list.left) - 30);
336
- let spaceBelow = space.bottom - list.bottom;
337
- if (spaceBelow >= infoHeight || spaceBelow > list.top) offset = option.bottom - list.top;
338
- else {
339
- side = "bottom";
340
- offset = list.bottom - option.top;
341
- }
342
- }
343
- let scaleY = (list.bottom - list.top) / tooltip.offsetHeight;
344
- let scaleX = (list.right - list.left) / tooltip.offsetWidth;
345
- return {
346
- style: `${side}: ${offset / scaleY}px; max-width: ${maxWidth / scaleX}px`,
347
- class: "cm-completionInfo-" + (narrow ? rtl ? "left-narrow" : "right-narrow" : left ? "left" : "right")
348
- };
349
- }
350
- var setSelectedEffect = /*@__PURE__*/ StateEffect.define();
351
- function optionContent(config) {
352
- let content = config.addToOptions.slice();
353
- if (config.icons) content.push({
354
- render(completion) {
355
- let icon = document.createElement("div");
356
- icon.classList.add("cm-completionIcon");
357
- if (completion.type) icon.classList.add(...completion.type.split(/\s+/g).map((cls) => "cm-completionIcon-" + cls));
358
- icon.setAttribute("aria-hidden", "true");
359
- return icon;
360
- },
361
- position: 20
362
- });
363
- content.push({
364
- render(completion, _s, _v, match) {
365
- let labelElt = document.createElement("span");
366
- labelElt.className = "cm-completionLabel";
367
- let label = completion.displayLabel || completion.label, off = 0;
368
- for (let j = 0; j < match.length;) {
369
- let from = match[j++], to = match[j++];
370
- if (from > off) labelElt.appendChild(document.createTextNode(label.slice(off, from)));
371
- let span = labelElt.appendChild(document.createElement("span"));
372
- span.appendChild(document.createTextNode(label.slice(from, to)));
373
- span.className = "cm-completionMatchedText";
374
- off = to;
375
- }
376
- if (off < label.length) labelElt.appendChild(document.createTextNode(label.slice(off)));
377
- return labelElt;
378
- },
379
- position: 50
380
- }, {
381
- render(completion) {
382
- if (!completion.detail) return null;
383
- let detailElt = document.createElement("span");
384
- detailElt.className = "cm-completionDetail";
385
- detailElt.textContent = completion.detail;
386
- return detailElt;
387
- },
388
- position: 80
389
- });
390
- return content.sort((a, b) => a.position - b.position).map((a) => a.render);
391
- }
392
- function rangeAroundSelected(total, selected, max) {
393
- if (total <= max) return {
394
- from: 0,
395
- to: total
396
- };
397
- if (selected < 0) selected = 0;
398
- if (selected <= total >> 1) {
399
- let off = Math.floor(selected / max);
400
- return {
401
- from: off * max,
402
- to: (off + 1) * max
403
- };
404
- }
405
- let off = Math.ceil((total - selected) / max);
406
- return {
407
- from: total - off * max,
408
- to: total - (off - 1) * max
409
- };
410
- }
411
- var CompletionTooltip = class {
412
- constructor(view, stateField, applyCompletion) {
413
- this.view = view;
414
- this.stateField = stateField;
415
- this.applyCompletion = applyCompletion;
416
- this.info = null;
417
- this.infoDestroy = null;
418
- this.placeInfoReq = {
419
- read: () => this.measureInfo(),
420
- write: (pos) => this.placeInfo(pos),
421
- key: this
422
- };
423
- this.space = null;
424
- this.currentClass = "";
425
- let cState = view.state.field(stateField);
426
- let { options, selected } = cState.open;
427
- let config = view.state.facet(completionConfig);
428
- this.optionContent = optionContent(config);
429
- this.optionClass = config.optionClass;
430
- this.tooltipClass = config.tooltipClass;
431
- this.range = rangeAroundSelected(options.length, selected, config.maxRenderedOptions);
432
- this.dom = document.createElement("div");
433
- this.dom.className = "cm-tooltip-autocomplete";
434
- this.updateTooltipClass(view.state);
435
- this.dom.addEventListener("mousedown", (e) => {
436
- let { options } = view.state.field(stateField).open;
437
- for (let dom = e.target, match; dom && dom != this.dom; dom = dom.parentNode) if (dom.nodeName == "LI" && (match = /-(\d+)$/.exec(dom.id)) && +match[1] < options.length) {
438
- this.applyCompletion(view, options[+match[1]]);
439
- e.preventDefault();
440
- return;
441
- }
442
- if (e.target == this.list) {
443
- let move = this.list.classList.contains("cm-completionListIncompleteTop") && e.clientY < this.list.firstChild.getBoundingClientRect().top ? this.range.from - 1 : this.list.classList.contains("cm-completionListIncompleteBottom") && e.clientY > this.list.lastChild.getBoundingClientRect().bottom ? this.range.to : null;
444
- if (move != null) {
445
- view.dispatch({ effects: setSelectedEffect.of(move) });
446
- e.preventDefault();
447
- }
448
- }
449
- });
450
- this.dom.addEventListener("focusout", (e) => {
451
- let state = view.state.field(this.stateField, false);
452
- if (state && state.tooltip && view.state.facet(completionConfig).closeOnBlur && e.relatedTarget != view.contentDOM) view.dispatch({ effects: closeCompletionEffect.of(null) });
453
- });
454
- this.showOptions(options, cState.id);
455
- }
456
- mount() {
457
- this.updateSel();
458
- }
459
- showOptions(options, id) {
460
- if (this.list) this.list.remove();
461
- this.list = this.dom.appendChild(this.createListBox(options, id, this.range));
462
- this.list.addEventListener("scroll", () => {
463
- if (this.info) this.view.requestMeasure(this.placeInfoReq);
464
- });
465
- }
466
- update(update) {
467
- var _a;
468
- let cState = update.state.field(this.stateField);
469
- let prevState = update.startState.field(this.stateField);
470
- this.updateTooltipClass(update.state);
471
- if (cState != prevState) {
472
- let { options, selected, disabled } = cState.open;
473
- if (!prevState.open || prevState.open.options != options) {
474
- this.range = rangeAroundSelected(options.length, selected, update.state.facet(completionConfig).maxRenderedOptions);
475
- this.showOptions(options, cState.id);
476
- }
477
- this.updateSel();
478
- if (disabled != ((_a = prevState.open) === null || _a === void 0 ? void 0 : _a.disabled)) this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!disabled);
479
- }
480
- }
481
- updateTooltipClass(state) {
482
- let cls = this.tooltipClass(state);
483
- if (cls != this.currentClass) {
484
- for (let c of this.currentClass.split(" ")) if (c) this.dom.classList.remove(c);
485
- for (let c of cls.split(" ")) if (c) this.dom.classList.add(c);
486
- this.currentClass = cls;
487
- }
488
- }
489
- positioned(space) {
490
- this.space = space;
491
- if (this.info) this.view.requestMeasure(this.placeInfoReq);
492
- }
493
- updateSel() {
494
- let cState = this.view.state.field(this.stateField), open = cState.open;
495
- if (open.selected > -1 && open.selected < this.range.from || open.selected >= this.range.to) {
496
- this.range = rangeAroundSelected(open.options.length, open.selected, this.view.state.facet(completionConfig).maxRenderedOptions);
497
- this.showOptions(open.options, cState.id);
498
- }
499
- let newSel = this.updateSelectedOption(open.selected);
500
- if (newSel) {
501
- this.destroyInfo();
502
- let { completion } = open.options[open.selected];
503
- let { info } = completion;
504
- if (!info) return;
505
- let infoResult = typeof info === "string" ? document.createTextNode(info) : info(completion);
506
- if (!infoResult) return;
507
- if ("then" in infoResult) infoResult.then((obj) => {
508
- if (obj && this.view.state.field(this.stateField, false) == cState) this.addInfoPane(obj, completion);
509
- }).catch((e) => logException(this.view.state, e, "completion info"));
510
- else {
511
- this.addInfoPane(infoResult, completion);
512
- newSel.setAttribute("aria-describedby", this.info.id);
513
- }
514
- }
515
- }
516
- addInfoPane(content, completion) {
517
- this.destroyInfo();
518
- let wrap = this.info = document.createElement("div");
519
- wrap.className = "cm-tooltip cm-completionInfo";
520
- wrap.id = "cm-completionInfo-" + Math.floor(Math.random() * 65535).toString(16);
521
- if (content.nodeType != null) {
522
- wrap.appendChild(content);
523
- this.infoDestroy = null;
524
- } else {
525
- let { dom, destroy } = content;
526
- wrap.appendChild(dom);
527
- this.infoDestroy = destroy || null;
528
- }
529
- this.dom.appendChild(wrap);
530
- this.view.requestMeasure(this.placeInfoReq);
531
- }
532
- updateSelectedOption(selected) {
533
- let set = null;
534
- for (let opt = this.list.firstChild, i = this.range.from; opt; opt = opt.nextSibling, i++) if (opt.nodeName != "LI" || !opt.id) i--;
535
- else if (i == selected) {
536
- if (!opt.hasAttribute("aria-selected")) {
537
- opt.setAttribute("aria-selected", "true");
538
- set = opt;
539
- }
540
- } else if (opt.hasAttribute("aria-selected")) {
541
- opt.removeAttribute("aria-selected");
542
- opt.removeAttribute("aria-describedby");
543
- }
544
- if (set) scrollIntoView(this.list, set);
545
- return set;
546
- }
547
- measureInfo() {
548
- let sel = this.dom.querySelector("[aria-selected]");
549
- if (!sel || !this.info) return null;
550
- let listRect = this.dom.getBoundingClientRect();
551
- let infoRect = this.info.getBoundingClientRect();
552
- let selRect = sel.getBoundingClientRect();
553
- let space = this.space;
554
- if (!space) {
555
- let docElt = this.dom.ownerDocument.documentElement;
556
- space = {
557
- left: 0,
558
- top: 0,
559
- right: docElt.clientWidth,
560
- bottom: docElt.clientHeight
561
- };
562
- }
563
- if (selRect.top > Math.min(space.bottom, listRect.bottom) - 10 || selRect.bottom < Math.max(space.top, listRect.top) + 10) return null;
564
- return this.view.state.facet(completionConfig).positionInfo(this.view, listRect, selRect, infoRect, space, this.dom);
565
- }
566
- placeInfo(pos) {
567
- if (this.info) {
568
- if (pos) {
569
- if (pos.style) this.info.style.cssText = pos.style;
570
- this.info.className = "cm-tooltip cm-completionInfo " + (pos.class || "");
571
- } else this.info.style.cssText = "top: -1e6px";
572
- }
573
- }
574
- createListBox(options, id, range) {
575
- const ul = document.createElement("ul");
576
- ul.id = id;
577
- ul.setAttribute("role", "listbox");
578
- ul.setAttribute("aria-expanded", "true");
579
- ul.setAttribute("aria-label", this.view.state.phrase("Completions"));
580
- ul.addEventListener("mousedown", (e) => {
581
- if (e.target == ul) e.preventDefault();
582
- });
583
- let curSection = null;
584
- for (let i = range.from; i < range.to; i++) {
585
- let { completion, match } = options[i], { section } = completion;
586
- if (section) {
587
- let name = typeof section == "string" ? section : section.name;
588
- if (name != curSection && (i > range.from || range.from == 0)) {
589
- curSection = name;
590
- if (typeof section != "string" && section.header) ul.appendChild(section.header(section));
591
- else {
592
- let header = ul.appendChild(document.createElement("completion-section"));
593
- header.textContent = name;
594
- }
595
- }
596
- }
597
- const li = ul.appendChild(document.createElement("li"));
598
- li.id = id + "-" + i;
599
- li.setAttribute("role", "option");
600
- let cls = this.optionClass(completion);
601
- if (cls) li.className = cls;
602
- for (let source of this.optionContent) {
603
- let node = source(completion, this.view.state, this.view, match);
604
- if (node) li.appendChild(node);
605
- }
606
- }
607
- if (range.from) ul.classList.add("cm-completionListIncompleteTop");
608
- if (range.to < options.length) ul.classList.add("cm-completionListIncompleteBottom");
609
- return ul;
610
- }
611
- destroyInfo() {
612
- if (this.info) {
613
- if (this.infoDestroy) this.infoDestroy();
614
- this.info.remove();
615
- this.info = null;
616
- }
617
- }
618
- destroy() {
619
- this.destroyInfo();
620
- }
621
- };
622
- function completionTooltip(stateField, applyCompletion) {
623
- return (view) => new CompletionTooltip(view, stateField, applyCompletion);
624
- }
625
- function scrollIntoView(container, element) {
626
- let parent = container.getBoundingClientRect();
627
- let self = element.getBoundingClientRect();
628
- let scaleY = parent.height / container.offsetHeight;
629
- if (self.top < parent.top) container.scrollTop -= (parent.top - self.top) / scaleY;
630
- else if (self.bottom > parent.bottom) container.scrollTop += (self.bottom - parent.bottom) / scaleY;
631
- }
632
- function score(option) {
633
- return (option.boost || 0) * 100 + (option.apply ? 10 : 0) + (option.info ? 5 : 0) + (option.type ? 1 : 0);
634
- }
635
- function sortOptions(active, state) {
636
- let options = [];
637
- let sections = null, dynamicSectionScore = null;
638
- let addOption = (option) => {
639
- options.push(option);
640
- let { section } = option.completion;
641
- if (section) {
642
- if (!sections) sections = [];
643
- let name = typeof section == "string" ? section : section.name;
644
- if (!sections.some((s) => s.name == name)) sections.push(typeof section == "string" ? { name } : section);
645
- }
646
- };
647
- let conf = state.facet(completionConfig);
648
- for (let a of active) if (a.hasResult()) {
649
- let getMatch = a.result.getMatch;
650
- if (a.result.filter === false) for (let option of a.result.options) addOption(new Option(option, a.source, getMatch ? getMatch(option) : [], 1e9 - options.length));
651
- else {
652
- let pattern = state.sliceDoc(a.from, a.to), match;
653
- let matcher = conf.filterStrict ? new StrictMatcher(pattern) : new FuzzyMatcher(pattern);
654
- for (let option of a.result.options) if (match = matcher.match(option.label)) {
655
- let matched = !option.displayLabel ? match.matched : getMatch ? getMatch(option, match.matched) : [];
656
- let score = match.score + (option.boost || 0);
657
- addOption(new Option(option, a.source, matched, score));
658
- if (typeof option.section == "object" && option.section.rank === "dynamic") {
659
- let { name } = option.section;
660
- if (!dynamicSectionScore) dynamicSectionScore = Object.create(null);
661
- dynamicSectionScore[name] = Math.max(score, dynamicSectionScore[name] || -1e9);
662
- }
663
- }
664
- }
665
- }
666
- if (sections) {
667
- let sectionOrder = Object.create(null), pos = 0;
668
- let cmp = (a, b) => {
669
- return (a.rank === "dynamic" && b.rank === "dynamic" ? dynamicSectionScore[b.name] - dynamicSectionScore[a.name] : 0) || (typeof a.rank == "number" ? a.rank : 1e9) - (typeof b.rank == "number" ? b.rank : 1e9) || (a.name < b.name ? -1 : 1);
670
- };
671
- for (let s of sections.sort(cmp)) {
672
- pos -= 1e5;
673
- sectionOrder[s.name] = pos;
674
- }
675
- for (let option of options) {
676
- let { section } = option.completion;
677
- if (section) option.score += sectionOrder[typeof section == "string" ? section : section.name];
678
- }
679
- }
680
- let result = [], prev = null;
681
- let compare = conf.compareCompletions;
682
- for (let opt of options.sort((a, b) => b.score - a.score || compare(a.completion, b.completion))) {
683
- let cur = opt.completion;
684
- if (!prev || prev.label != cur.label || prev.detail != cur.detail || prev.type != null && cur.type != null && prev.type != cur.type || prev.apply != cur.apply || prev.boost != cur.boost) result.push(opt);
685
- else if (score(opt.completion) > score(prev)) result[result.length - 1] = opt;
686
- prev = opt.completion;
687
- }
688
- return result;
689
- }
690
- var CompletionDialog = class CompletionDialog {
691
- constructor(options, attrs, tooltip, timestamp, selected, disabled) {
692
- this.options = options;
693
- this.attrs = attrs;
694
- this.tooltip = tooltip;
695
- this.timestamp = timestamp;
696
- this.selected = selected;
697
- this.disabled = disabled;
698
- }
699
- setSelected(selected, id) {
700
- return selected == this.selected || selected >= this.options.length ? this : new CompletionDialog(this.options, makeAttrs(id, selected), this.tooltip, this.timestamp, selected, this.disabled);
701
- }
702
- static build(active, state, id, prev, conf, didSetActive) {
703
- if (prev && !didSetActive && active.some((s) => s.isPending)) return prev.setDisabled();
704
- let options = sortOptions(active, state);
705
- if (!options.length) return prev && active.some((a) => a.isPending) ? prev.setDisabled() : null;
706
- let selected = state.facet(completionConfig).selectOnOpen ? 0 : -1;
707
- if (prev && prev.selected != selected && prev.selected != -1) {
708
- let selectedValue = prev.options[prev.selected].completion;
709
- for (let i = 0; i < options.length; i++) if (options[i].completion == selectedValue) {
710
- selected = i;
711
- break;
712
- }
713
- }
714
- return new CompletionDialog(options, makeAttrs(id, selected), {
715
- pos: active.reduce((a, b) => b.hasResult() ? Math.min(a, b.from) : a, 1e8),
716
- create: createTooltip,
717
- above: conf.aboveCursor
718
- }, prev ? prev.timestamp : Date.now(), selected, false);
719
- }
720
- map(changes) {
721
- return new CompletionDialog(this.options, this.attrs, {
722
- ...this.tooltip,
723
- pos: changes.mapPos(this.tooltip.pos)
724
- }, this.timestamp, this.selected, this.disabled);
725
- }
726
- setDisabled() {
727
- return new CompletionDialog(this.options, this.attrs, this.tooltip, this.timestamp, this.selected, true);
728
- }
729
- };
730
- var CompletionState = class CompletionState {
731
- constructor(active, id, open) {
732
- this.active = active;
733
- this.id = id;
734
- this.open = open;
735
- }
736
- static start() {
737
- return new CompletionState(none, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null);
738
- }
739
- update(tr) {
740
- let { state } = tr, conf = state.facet(completionConfig);
741
- let active = (conf.override || state.languageDataAt("autocomplete", cur(state)).map(asSource)).map((source) => {
742
- return (this.active.find((s) => s.source == source) || new ActiveSource(source, this.active.some((a) => a.state != 0) ? 1 : 0)).update(tr, conf);
743
- });
744
- if (active.length == this.active.length && active.every((a, i) => a == this.active[i])) active = this.active;
745
- let open = this.open, didSet = tr.effects.some((e) => e.is(setActiveEffect));
746
- if (open && tr.docChanged) open = open.map(tr.changes);
747
- if (tr.selection || active.some((a) => a.hasResult() && tr.changes.touchesRange(a.from, a.to)) || !sameResults(active, this.active) || didSet) open = CompletionDialog.build(active, state, this.id, open, conf, didSet);
748
- else if (open && open.disabled && !active.some((a) => a.isPending)) open = null;
749
- if (!open && active.every((a) => !a.isPending) && active.some((a) => a.hasResult())) active = active.map((a) => a.hasResult() ? new ActiveSource(a.source, 0) : a);
750
- for (let effect of tr.effects) if (effect.is(setSelectedEffect)) open = open && open.setSelected(effect.value, this.id);
751
- return active == this.active && open == this.open ? this : new CompletionState(active, this.id, open);
752
- }
753
- get tooltip() {
754
- return this.open ? this.open.tooltip : null;
755
- }
756
- get attrs() {
757
- return this.open ? this.open.attrs : this.active.length ? baseAttrs : noAttrs;
758
- }
759
- };
760
- function sameResults(a, b) {
761
- if (a == b) return true;
762
- for (let iA = 0, iB = 0;;) {
763
- while (iA < a.length && !a[iA].hasResult()) iA++;
764
- while (iB < b.length && !b[iB].hasResult()) iB++;
765
- let endA = iA == a.length, endB = iB == b.length;
766
- if (endA || endB) return endA == endB;
767
- if (a[iA++].result != b[iB++].result) return false;
768
- }
769
- }
770
- var baseAttrs = { "aria-autocomplete": "list" };
771
- var noAttrs = {};
772
- function makeAttrs(id, selected) {
773
- let result = {
774
- "aria-autocomplete": "list",
775
- "aria-haspopup": "listbox",
776
- "aria-controls": id
777
- };
778
- if (selected > -1) result["aria-activedescendant"] = id + "-" + selected;
779
- return result;
780
- }
781
- var none = [];
782
- function getUpdateType(tr, conf) {
783
- if (tr.isUserEvent("input.complete")) {
784
- let completion = tr.annotation(pickedCompletion);
785
- if (completion && conf.activateOnCompletion(completion)) return 12;
786
- }
787
- let typing = tr.isUserEvent("input.type");
788
- return typing && conf.activateOnTyping ? 5 : typing ? 1 : tr.isUserEvent("delete.backward") ? 2 : tr.selection ? 8 : tr.docChanged ? 16 : 0;
789
- }
790
- var ActiveSource = class ActiveSource {
791
- constructor(source, state, explicit = false) {
792
- this.source = source;
793
- this.state = state;
794
- this.explicit = explicit;
795
- }
796
- hasResult() {
797
- return false;
798
- }
799
- get isPending() {
800
- return this.state == 1;
801
- }
802
- update(tr, conf) {
803
- let type = getUpdateType(tr, conf), value = this;
804
- if (type & 8 || type & 16 && this.touches(tr)) value = new ActiveSource(value.source, 0);
805
- if (type & 4 && value.state == 0) value = new ActiveSource(this.source, 1);
806
- value = value.updateFor(tr, type);
807
- for (let effect of tr.effects) if (effect.is(startCompletionEffect)) value = new ActiveSource(value.source, 1, effect.value);
808
- else if (effect.is(closeCompletionEffect)) value = new ActiveSource(value.source, 0);
809
- else if (effect.is(setActiveEffect)) {
810
- for (let active of effect.value) if (active.source == value.source) value = active;
811
- }
812
- return value;
813
- }
814
- updateFor(tr, type) {
815
- return this.map(tr.changes);
816
- }
817
- map(changes) {
818
- return this;
819
- }
820
- touches(tr) {
821
- return tr.changes.touchesRange(cur(tr.state));
822
- }
823
- };
824
- var ActiveResult = class ActiveResult extends ActiveSource {
825
- constructor(source, explicit, limit, result, from, to) {
826
- super(source, 3, explicit);
827
- this.limit = limit;
828
- this.result = result;
829
- this.from = from;
830
- this.to = to;
831
- }
832
- hasResult() {
833
- return true;
834
- }
835
- updateFor(tr, type) {
836
- var _a;
837
- if (!(type & 3)) return this.map(tr.changes);
838
- let result = this.result;
839
- if (result.map && !tr.changes.empty) result = result.map(result, tr.changes);
840
- let from = tr.changes.mapPos(this.from), to = tr.changes.mapPos(this.to, 1);
841
- let pos = cur(tr.state);
842
- if (pos > to || !result || type & 2 && (cur(tr.startState) == this.from || pos < this.limit)) return new ActiveSource(this.source, type & 4 ? 1 : 0);
843
- let limit = tr.changes.mapPos(this.limit);
844
- if (checkValid(result.validFor, tr.state, from, to)) return new ActiveResult(this.source, this.explicit, limit, result, from, to);
845
- if (result.update && (result = result.update(result, from, to, new CompletionContext(tr.state, pos, false)))) return new ActiveResult(this.source, this.explicit, limit, result, result.from, (_a = result.to) !== null && _a !== void 0 ? _a : cur(tr.state));
846
- return new ActiveSource(this.source, 1, this.explicit);
847
- }
848
- map(mapping) {
849
- if (mapping.empty) return this;
850
- let result = this.result.map ? this.result.map(this.result, mapping) : this.result;
851
- if (!result) return new ActiveSource(this.source, 0);
852
- return new ActiveResult(this.source, this.explicit, mapping.mapPos(this.limit), result, mapping.mapPos(this.from), mapping.mapPos(this.to, 1));
853
- }
854
- touches(tr) {
855
- return tr.changes.touchesRange(this.from, this.to);
856
- }
857
- };
858
- function checkValid(validFor, state, from, to) {
859
- if (!validFor) return false;
860
- let text = state.sliceDoc(from, to);
861
- return typeof validFor == "function" ? validFor(text, from, to, state) : ensureAnchor(validFor, true).test(text);
862
- }
863
- var setActiveEffect = /*@__PURE__*/ StateEffect.define({ map(sources, mapping) {
864
- return sources.map((s) => s.map(mapping));
865
- } });
866
- var completionState = /*@__PURE__*/ StateField.define({
867
- create() {
868
- return CompletionState.start();
869
- },
870
- update(value, tr) {
871
- return value.update(tr);
872
- },
873
- provide: (f) => [showTooltip.from(f, (val) => val.tooltip), EditorView.contentAttributes.from(f, (state) => state.attrs)]
874
- });
875
- function applyCompletion(view, option) {
876
- const apply = option.completion.apply || option.completion.label;
877
- let result = view.state.field(completionState).active.find((a) => a.source == option.source);
878
- if (!(result instanceof ActiveResult)) return false;
879
- if (typeof apply == "string") view.dispatch({
880
- ...insertCompletionText(view.state, apply, result.from, result.to),
881
- annotations: pickedCompletion.of(option.completion)
882
- });
883
- else apply(view, option.completion, result.from, result.to);
884
- return true;
885
- }
886
- var createTooltip = /*@__PURE__*/ completionTooltip(completionState, applyCompletion);
887
- /**
888
- Returns a command that moves the completion selection forward or
889
- backward by the given amount.
890
- */
891
- function moveCompletionSelection(forward, by = "option") {
892
- return (view) => {
893
- let cState = view.state.field(completionState, false);
894
- if (!cState || !cState.open || cState.open.disabled || Date.now() - cState.open.timestamp < view.state.facet(completionConfig).interactionDelay) return false;
895
- let step = 1, tooltip;
896
- if (by == "page" && (tooltip = getTooltip(view, cState.open.tooltip))) step = Math.max(2, Math.floor(tooltip.dom.offsetHeight / tooltip.dom.querySelector("li").offsetHeight) - 1);
897
- let { length } = cState.open.options;
898
- let selected = cState.open.selected > -1 ? cState.open.selected + step * (forward ? 1 : -1) : forward ? 0 : length - 1;
899
- if (selected < 0) selected = by == "page" ? 0 : length - 1;
900
- else if (selected >= length) selected = by == "page" ? length - 1 : 0;
901
- view.dispatch({ effects: setSelectedEffect.of(selected) });
902
- return true;
903
- };
904
- }
905
- /**
906
- Accept the current completion.
907
- */
908
- var acceptCompletion = (view) => {
909
- let cState = view.state.field(completionState, false);
910
- if (view.state.readOnly || !cState || !cState.open || cState.open.selected < 0 || cState.open.disabled || Date.now() - cState.open.timestamp < view.state.facet(completionConfig).interactionDelay) return false;
911
- return applyCompletion(view, cState.open.options[cState.open.selected]);
912
- };
913
- /**
914
- Explicitly start autocompletion.
915
- */
916
- var startCompletion = (view) => {
917
- if (!view.state.field(completionState, false)) return false;
918
- view.dispatch({ effects: startCompletionEffect.of(true) });
919
- return true;
920
- };
921
- /**
922
- Close the currently active completion.
923
- */
924
- var closeCompletion = (view) => {
925
- let cState = view.state.field(completionState, false);
926
- if (!cState || !cState.active.some((a) => a.state != 0)) return false;
927
- view.dispatch({ effects: closeCompletionEffect.of(null) });
928
- return true;
929
- };
930
- var RunningQuery = class {
931
- constructor(active, context) {
932
- this.active = active;
933
- this.context = context;
934
- this.time = Date.now();
935
- this.updates = [];
936
- this.done = void 0;
937
- }
938
- };
939
- var MaxUpdateCount = 50;
940
- var MinAbortTime = 1e3;
941
- var completionPlugin = /*@__PURE__*/ ViewPlugin.fromClass(class {
942
- constructor(view) {
943
- this.view = view;
944
- this.debounceUpdate = -1;
945
- this.running = [];
946
- this.debounceAccept = -1;
947
- this.pendingStart = false;
948
- this.composing = 0;
949
- for (let active of view.state.field(completionState).active) if (active.isPending) this.startQuery(active);
950
- }
951
- update(update) {
952
- let cState = update.state.field(completionState);
953
- let conf = update.state.facet(completionConfig);
954
- if (!update.selectionSet && !update.docChanged && update.startState.field(completionState) == cState) return;
955
- let doesReset = update.transactions.some((tr) => {
956
- let type = getUpdateType(tr, conf);
957
- return type & 8 || (tr.selection || tr.docChanged) && !(type & 3);
958
- });
959
- for (let i = 0; i < this.running.length; i++) {
960
- let query = this.running[i];
961
- if (doesReset || query.context.abortOnDocChange && update.docChanged || query.updates.length + update.transactions.length > MaxUpdateCount && Date.now() - query.time > MinAbortTime) {
962
- for (let handler of query.context.abortListeners) try {
963
- handler();
964
- } catch (e) {
965
- logException(this.view.state, e);
966
- }
967
- query.context.abortListeners = null;
968
- this.running.splice(i--, 1);
969
- } else query.updates.push(...update.transactions);
970
- }
971
- if (this.debounceUpdate > -1) clearTimeout(this.debounceUpdate);
972
- if (update.transactions.some((tr) => tr.effects.some((e) => e.is(startCompletionEffect)))) this.pendingStart = true;
973
- let delay = this.pendingStart ? 50 : conf.activateOnTypingDelay;
974
- this.debounceUpdate = cState.active.some((a) => a.isPending && !this.running.some((q) => q.active.source == a.source)) ? setTimeout(() => this.startUpdate(), delay) : -1;
975
- if (this.composing != 0) {
976
- for (let tr of update.transactions) if (tr.isUserEvent("input.type")) this.composing = 2;
977
- else if (this.composing == 2 && tr.selection) this.composing = 3;
978
- }
979
- }
980
- startUpdate() {
981
- this.debounceUpdate = -1;
982
- this.pendingStart = false;
983
- let { state } = this.view, cState = state.field(completionState);
984
- for (let active of cState.active) if (active.isPending && !this.running.some((r) => r.active.source == active.source)) this.startQuery(active);
985
- if (this.running.length && cState.open && cState.open.disabled) this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(completionConfig).updateSyncTime);
986
- }
987
- startQuery(active) {
988
- let { state } = this.view;
989
- let context = new CompletionContext(state, cur(state), active.explicit, this.view);
990
- let pending = new RunningQuery(active, context);
991
- this.running.push(pending);
992
- Promise.resolve(active.source(context)).then((result) => {
993
- if (!pending.context.aborted) {
994
- pending.done = result || null;
995
- this.scheduleAccept();
996
- }
997
- }, (err) => {
998
- this.view.dispatch({ effects: closeCompletionEffect.of(null) });
999
- logException(this.view.state, err);
1000
- });
1001
- }
1002
- scheduleAccept() {
1003
- if (this.running.every((q) => q.done !== void 0)) this.accept();
1004
- else if (this.debounceAccept < 0) this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(completionConfig).updateSyncTime);
1005
- }
1006
- accept() {
1007
- var _a;
1008
- if (this.debounceAccept > -1) clearTimeout(this.debounceAccept);
1009
- this.debounceAccept = -1;
1010
- let updated = [];
1011
- let conf = this.view.state.facet(completionConfig), cState = this.view.state.field(completionState);
1012
- for (let i = 0; i < this.running.length; i++) {
1013
- let query = this.running[i];
1014
- if (query.done === void 0) continue;
1015
- this.running.splice(i--, 1);
1016
- if (query.done) {
1017
- let pos = cur(query.updates.length ? query.updates[0].startState : this.view.state);
1018
- let limit = Math.min(pos, query.done.from + (query.active.explicit ? 0 : 1));
1019
- let active = new ActiveResult(query.active.source, query.active.explicit, limit, query.done, query.done.from, (_a = query.done.to) !== null && _a !== void 0 ? _a : pos);
1020
- for (let tr of query.updates) active = active.update(tr, conf);
1021
- if (active.hasResult()) {
1022
- updated.push(active);
1023
- continue;
1024
- }
1025
- }
1026
- let current = cState.active.find((a) => a.source == query.active.source);
1027
- if (current && current.isPending) {
1028
- if (query.done == null) {
1029
- let active = new ActiveSource(query.active.source, 0);
1030
- for (let tr of query.updates) active = active.update(tr, conf);
1031
- if (!active.isPending) updated.push(active);
1032
- } else this.startQuery(current);
1033
- }
1034
- }
1035
- if (updated.length || cState.open && cState.open.disabled) this.view.dispatch({ effects: setActiveEffect.of(updated) });
1036
- }
1037
- }, { eventHandlers: {
1038
- blur(event) {
1039
- let state = this.view.state.field(completionState, false);
1040
- if (state && state.tooltip && this.view.state.facet(completionConfig).closeOnBlur) {
1041
- let dialog = state.open && getTooltip(this.view, state.open.tooltip);
1042
- if (!dialog || !dialog.dom.contains(event.relatedTarget)) setTimeout(() => this.view.dispatch({ effects: closeCompletionEffect.of(null) }), 10);
1043
- }
1044
- },
1045
- compositionstart() {
1046
- this.composing = 1;
1047
- },
1048
- compositionend() {
1049
- if (this.composing == 3) setTimeout(() => this.view.dispatch({ effects: startCompletionEffect.of(false) }), 20);
1050
- this.composing = 0;
1051
- }
1052
- } });
1053
- var windows = typeof navigator == "object" && /*@__PURE__*/ /Win/.test(navigator.platform);
1054
- var commitCharacters = /*@__PURE__*/ Prec.highest(/*@__PURE__*/ EditorView.domEventHandlers({ keydown(event, view) {
1055
- let field = view.state.field(completionState, false);
1056
- if (!field || !field.open || field.open.disabled || field.open.selected < 0 || !event.key || event.key.length > 1 || event.ctrlKey && !(windows && event.altKey) || event.metaKey) return false;
1057
- let option = field.open.options[field.open.selected];
1058
- let result = field.active.find((a) => a.source == option.source);
1059
- let commitChars = option.completion.commitCharacters || result.result.commitCharacters;
1060
- if (commitChars && commitChars.indexOf(event.key) > -1) applyCompletion(view, option);
1061
- return false;
1062
- } }));
1063
- var baseTheme = /*@__PURE__*/ EditorView.baseTheme({
1064
- ".cm-tooltip.cm-tooltip-autocomplete": { "& > ul": {
1065
- fontFamily: "monospace",
1066
- whiteSpace: "nowrap",
1067
- overflow: "hidden auto",
1068
- maxWidth_fallback: "700px",
1069
- maxWidth: "min(700px, 95vw)",
1070
- minWidth: "250px",
1071
- maxHeight: "10em",
1072
- height: "100%",
1073
- listStyle: "none",
1074
- margin: 0,
1075
- padding: 0,
1076
- "& > li, & > completion-section": {
1077
- padding: "1px 3px",
1078
- lineHeight: 1.2
1079
- },
1080
- "& > li": {
1081
- overflowX: "hidden",
1082
- textOverflow: "ellipsis",
1083
- cursor: "pointer"
1084
- },
1085
- "& > completion-section": {
1086
- display: "list-item",
1087
- borderBottom: "1px solid silver",
1088
- paddingLeft: "0.5em",
1089
- opacity: .7
1090
- }
1091
- } },
1092
- "&light .cm-tooltip-autocomplete ul li[aria-selected]": {
1093
- background: "#17c",
1094
- color: "white"
1095
- },
1096
- "&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": { background: "#777" },
1097
- "&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
1098
- background: "#347",
1099
- color: "white"
1100
- },
1101
- "&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": { background: "#444" },
1102
- ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
1103
- content: "\"···\"",
1104
- opacity: .5,
1105
- display: "block",
1106
- textAlign: "center",
1107
- cursor: "pointer"
1108
- },
1109
- ".cm-tooltip.cm-completionInfo": {
1110
- position: "absolute",
1111
- padding: "3px 9px",
1112
- width: "max-content",
1113
- maxWidth: `400px`,
1114
- boxSizing: "border-box",
1115
- whiteSpace: "pre-line"
1116
- },
1117
- ".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
1118
- ".cm-completionInfo.cm-completionInfo-right": { left: "100%" },
1119
- ".cm-completionInfo.cm-completionInfo-left-narrow": { right: `30px` },
1120
- ".cm-completionInfo.cm-completionInfo-right-narrow": { left: `30px` },
1121
- "&light .cm-snippetField": { backgroundColor: "#00000022" },
1122
- "&dark .cm-snippetField": { backgroundColor: "#ffffff22" },
1123
- ".cm-snippetFieldPosition": {
1124
- verticalAlign: "text-top",
1125
- width: 0,
1126
- height: "1.15em",
1127
- display: "inline-block",
1128
- margin: "0 -0.7px -.7em",
1129
- borderLeft: "1.4px dotted #888"
1130
- },
1131
- ".cm-completionMatchedText": { textDecoration: "underline" },
1132
- ".cm-completionDetail": {
1133
- marginLeft: "0.5em",
1134
- fontStyle: "italic"
1135
- },
1136
- ".cm-completionIcon": {
1137
- fontSize: "90%",
1138
- width: ".8em",
1139
- display: "inline-block",
1140
- textAlign: "center",
1141
- paddingRight: ".6em",
1142
- opacity: "0.6",
1143
- boxSizing: "content-box"
1144
- },
1145
- ".cm-completionIcon-function, .cm-completionIcon-method": { "&:after": { content: "'ƒ'" } },
1146
- ".cm-completionIcon-class": { "&:after": { content: "'○'" } },
1147
- ".cm-completionIcon-interface": { "&:after": { content: "'◌'" } },
1148
- ".cm-completionIcon-variable": { "&:after": { content: "'𝑥'" } },
1149
- ".cm-completionIcon-constant": { "&:after": { content: "'𝐶'" } },
1150
- ".cm-completionIcon-type": { "&:after": { content: "'𝑡'" } },
1151
- ".cm-completionIcon-enum": { "&:after": { content: "'∪'" } },
1152
- ".cm-completionIcon-property": { "&:after": { content: "'□'" } },
1153
- ".cm-completionIcon-keyword": { "&:after": { content: "'🔑︎'" } },
1154
- ".cm-completionIcon-namespace": { "&:after": { content: "'▢'" } },
1155
- ".cm-completionIcon-text": { "&:after": {
1156
- content: "'abc'",
1157
- fontSize: "50%",
1158
- verticalAlign: "middle"
1159
- } }
1160
- });
1161
- var FieldPos = class {
1162
- constructor(field, line, from, to) {
1163
- this.field = field;
1164
- this.line = line;
1165
- this.from = from;
1166
- this.to = to;
1167
- }
1168
- };
1169
- var FieldRange = class FieldRange {
1170
- constructor(field, from, to) {
1171
- this.field = field;
1172
- this.from = from;
1173
- this.to = to;
1174
- }
1175
- map(changes) {
1176
- let from = changes.mapPos(this.from, -1, MapMode.TrackDel);
1177
- let to = changes.mapPos(this.to, 1, MapMode.TrackDel);
1178
- return from == null || to == null ? null : new FieldRange(this.field, from, to);
1179
- }
1180
- };
1181
- var Snippet = class Snippet {
1182
- constructor(lines, fieldPositions) {
1183
- this.lines = lines;
1184
- this.fieldPositions = fieldPositions;
1185
- }
1186
- instantiate(state, pos) {
1187
- let text = [], lineStart = [pos];
1188
- let lineObj = state.doc.lineAt(pos), baseIndent = /^\s*/.exec(lineObj.text)[0];
1189
- for (let line of this.lines) {
1190
- if (text.length) {
1191
- let indent = baseIndent, tabs = /^\t*/.exec(line)[0].length;
1192
- for (let i = 0; i < tabs; i++) indent += state.facet(indentUnit);
1193
- lineStart.push(pos + indent.length - tabs);
1194
- line = indent + line.slice(tabs);
1195
- }
1196
- text.push(line);
1197
- pos += line.length + 1;
1198
- }
1199
- return {
1200
- text,
1201
- ranges: this.fieldPositions.map((pos) => new FieldRange(pos.field, lineStart[pos.line] + pos.from, lineStart[pos.line] + pos.to))
1202
- };
1203
- }
1204
- static parse(template) {
1205
- let fields = [];
1206
- let lines = [], positions = [], m;
1207
- for (let line of template.split(/\r\n?|\n/)) {
1208
- while (m = /[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(line)) {
1209
- let seq = m[1] ? +m[1] : null, rawName = m[2] || m[3] || "", found = -1;
1210
- if (seq === 0) seq = 1e9;
1211
- let name = rawName.replace(/\\[{}]/g, (m) => m[1]);
1212
- for (let i = 0; i < fields.length; i++) if (seq != null ? fields[i].seq == seq : name ? fields[i].name == name : false) found = i;
1213
- if (found < 0) {
1214
- let i = 0;
1215
- while (i < fields.length && (seq == null || fields[i].seq != null && fields[i].seq < seq)) i++;
1216
- fields.splice(i, 0, {
1217
- seq,
1218
- name
1219
- });
1220
- found = i;
1221
- for (let pos of positions) if (pos.field >= found) pos.field++;
1222
- }
1223
- for (let pos of positions) if (pos.line == lines.length && pos.from > m.index) {
1224
- let snip = m[2] ? 3 + (m[1] || "").length : 2;
1225
- pos.from -= snip;
1226
- pos.to -= snip;
1227
- }
1228
- positions.push(new FieldPos(found, lines.length, m.index, m.index + name.length));
1229
- line = line.slice(0, m.index) + rawName + line.slice(m.index + m[0].length);
1230
- }
1231
- line = line.replace(/\\([{}])/g, (_, brace, index) => {
1232
- for (let pos of positions) if (pos.line == lines.length && pos.from > index) {
1233
- pos.from--;
1234
- pos.to--;
1235
- }
1236
- return brace;
1237
- });
1238
- lines.push(line);
1239
- }
1240
- return new Snippet(lines, positions);
1241
- }
1242
- };
1243
- var fieldMarker = /*@__PURE__*/ Decoration.widget({ widget: /*@__PURE__*/ new class extends WidgetType {
1244
- toDOM() {
1245
- let span = document.createElement("span");
1246
- span.className = "cm-snippetFieldPosition";
1247
- return span;
1248
- }
1249
- ignoreEvent() {
1250
- return false;
1251
- }
1252
- }() });
1253
- var fieldRange = /*@__PURE__*/ Decoration.mark({ class: "cm-snippetField" });
1254
- var ActiveSnippet = class ActiveSnippet {
1255
- constructor(ranges, active) {
1256
- this.ranges = ranges;
1257
- this.active = active;
1258
- this.deco = Decoration.set(ranges.map((r) => (r.from == r.to ? fieldMarker : fieldRange).range(r.from, r.to)), true);
1259
- }
1260
- map(changes) {
1261
- let ranges = [];
1262
- for (let r of this.ranges) {
1263
- let mapped = r.map(changes);
1264
- if (!mapped) return null;
1265
- ranges.push(mapped);
1266
- }
1267
- return new ActiveSnippet(ranges, this.active);
1268
- }
1269
- selectionInsideField(sel) {
1270
- return sel.ranges.every((range) => this.ranges.some((r) => r.field == this.active && r.from <= range.from && r.to >= range.to));
1271
- }
1272
- };
1273
- var setActive = /*@__PURE__*/ StateEffect.define({ map(value, changes) {
1274
- return value && value.map(changes);
1275
- } });
1276
- var moveToField = /*@__PURE__*/ StateEffect.define();
1277
- var snippetState = /*@__PURE__*/ StateField.define({
1278
- create() {
1279
- return null;
1280
- },
1281
- update(value, tr) {
1282
- for (let effect of tr.effects) {
1283
- if (effect.is(setActive)) return effect.value;
1284
- if (effect.is(moveToField) && value) return new ActiveSnippet(value.ranges, effect.value);
1285
- }
1286
- if (value && tr.docChanged) value = value.map(tr.changes);
1287
- if (value && tr.selection && !value.selectionInsideField(tr.selection)) value = null;
1288
- return value;
1289
- },
1290
- provide: (f) => EditorView.decorations.from(f, (val) => val ? val.deco : Decoration.none)
1291
- });
1292
- function fieldSelection(ranges, field) {
1293
- return EditorSelection.create(ranges.filter((r) => r.field == field).map((r) => EditorSelection.range(r.from, r.to)));
1294
- }
1295
- /**
1296
- Convert a snippet template to a function that can
1297
- [apply](https://codemirror.net/6/docs/ref/#autocomplete.Completion.apply) it. Snippets are written
1298
- using syntax like this:
1299
-
1300
- "for (let ${index} = 0; ${index} < ${end}; ${index}++) {\n\t${}\n}"
1301
-
1302
- Each `${}` placeholder (you may also use `#{}`) indicates a field
1303
- that the user can fill in. Its name, if any, will be the default
1304
- content for the field.
1305
-
1306
- When the snippet is activated by calling the returned function,
1307
- the code is inserted at the given position. Newlines in the
1308
- template are indented by the indentation of the start line, plus
1309
- one [indent unit](https://codemirror.net/6/docs/ref/#language.indentUnit) per tab character after
1310
- the newline.
1311
-
1312
- On activation, (all instances of) the first field are selected.
1313
- The user can move between fields with Tab and Shift-Tab as long as
1314
- the fields are active. Moving to the last field or moving the
1315
- cursor out of the current field deactivates the fields.
1316
-
1317
- The order of fields defaults to textual order, but you can add
1318
- numbers to placeholders (`${1}` or `${1:defaultText}`) to provide
1319
- a custom order. `${0}` is special—it is always the last stop, where
1320
- the cursor ends up after tabbing through the other fields.
1321
-
1322
- To include a literal `{` or `}` in your template, put a backslash
1323
- in front of it. This will be removed and the brace will not be
1324
- interpreted as indicating a placeholder.
1325
- */
1326
- function snippet(template) {
1327
- let snippet = Snippet.parse(template);
1328
- return (editor, completion, from, to) => {
1329
- let { text, ranges } = snippet.instantiate(editor.state, from);
1330
- let { main } = editor.state.selection;
1331
- let spec = {
1332
- changes: {
1333
- from,
1334
- to: to == main.from ? main.to : to,
1335
- insert: Text.of(text)
1336
- },
1337
- scrollIntoView: true,
1338
- annotations: completion ? [pickedCompletion.of(completion), Transaction.userEvent.of("input.complete")] : void 0
1339
- };
1340
- if (ranges.length) spec.selection = fieldSelection(ranges, 0);
1341
- if (ranges.some((r) => r.field > 0)) {
1342
- let active = new ActiveSnippet(ranges, 0);
1343
- let effects = spec.effects = [setActive.of(active)];
1344
- if (editor.state.field(snippetState, false) === void 0) effects.push(StateEffect.appendConfig.of([
1345
- snippetState,
1346
- addSnippetKeymap,
1347
- snippetPointerHandler,
1348
- baseTheme
1349
- ]));
1350
- }
1351
- editor.dispatch(editor.state.update(spec));
1352
- };
1353
- }
1354
- function moveField(dir) {
1355
- return ({ state, dispatch }) => {
1356
- let active = state.field(snippetState, false);
1357
- if (!active || dir < 0 && active.active == 0) return false;
1358
- let next = active.active + dir, last = dir > 0 && !active.ranges.some((r) => r.field == next + dir);
1359
- dispatch(state.update({
1360
- selection: fieldSelection(active.ranges, next),
1361
- effects: setActive.of(last ? null : new ActiveSnippet(active.ranges, next)),
1362
- scrollIntoView: true
1363
- }));
1364
- return true;
1365
- };
1366
- }
1367
- /**
1368
- A command that clears the active snippet, if any.
1369
- */
1370
- var clearSnippet = ({ state, dispatch }) => {
1371
- if (!state.field(snippetState, false)) return false;
1372
- dispatch(state.update({ effects: setActive.of(null) }));
1373
- return true;
1374
- };
1375
- var defaultSnippetKeymap = [{
1376
- key: "Tab",
1377
- run: /* @__PURE__ */ moveField(1),
1378
- shift: /* @__PURE__ */ moveField(-1)
1379
- }, {
1380
- key: "Escape",
1381
- run: clearSnippet
1382
- }];
1383
- /**
1384
- A facet that can be used to configure the key bindings used by
1385
- snippets. The default binds Tab to
1386
- [`nextSnippetField`](https://codemirror.net/6/docs/ref/#autocomplete.nextSnippetField), Shift-Tab to
1387
- [`prevSnippetField`](https://codemirror.net/6/docs/ref/#autocomplete.prevSnippetField), and Escape
1388
- to [`clearSnippet`](https://codemirror.net/6/docs/ref/#autocomplete.clearSnippet).
1389
- */
1390
- var snippetKeymap = /*@__PURE__*/ Facet.define({ combine(maps) {
1391
- return maps.length ? maps[0] : defaultSnippetKeymap;
1392
- } });
1393
- var addSnippetKeymap = /*@__PURE__*/ Prec.highest(/*@__PURE__*/ keymap.compute([snippetKeymap], (state) => state.facet(snippetKeymap)));
1394
- /**
1395
- Create a completion from a snippet. Returns an object with the
1396
- properties from `completion`, plus an `apply` function that
1397
- applies the snippet.
1398
- */
1399
- function snippetCompletion(template, completion) {
1400
- return {
1401
- ...completion,
1402
- apply: snippet(template)
1403
- };
1404
- }
1405
- var snippetPointerHandler = /*@__PURE__*/ EditorView.domEventHandlers({ mousedown(event, view) {
1406
- let active = view.state.field(snippetState, false), pos;
1407
- if (!active || (pos = view.posAtCoords({
1408
- x: event.clientX,
1409
- y: event.clientY
1410
- })) == null) return false;
1411
- let match = active.ranges.find((r) => r.from <= pos && r.to >= pos);
1412
- if (!match || match.field == active.active) return false;
1413
- view.dispatch({
1414
- selection: fieldSelection(active.ranges, match.field),
1415
- effects: setActive.of(active.ranges.some((r) => r.field > match.field) ? new ActiveSnippet(active.ranges, match.field) : null),
1416
- scrollIntoView: true
1417
- });
1418
- return true;
1419
- } });
1420
- var closedBracket = /*@__PURE__*/ new class extends RangeValue {}();
1421
- closedBracket.startSide = 1;
1422
- closedBracket.endSide = -1;
1423
- typeof navigator == "object" && navigator.userAgent;
1424
- /**
1425
- Returns an extension that enables autocompletion.
1426
- */
1427
- function autocompletion(config = {}) {
1428
- return [
1429
- commitCharacters,
1430
- completionState,
1431
- completionConfig.of(config),
1432
- completionPlugin,
1433
- completionKeymapExt,
1434
- baseTheme
1435
- ];
1436
- }
1437
- /**
1438
- Basic keybindings for autocompletion.
1439
-
1440
- - Ctrl-Space (and Alt-\` or Alt-i on macOS): [`startCompletion`](https://codemirror.net/6/docs/ref/#autocomplete.startCompletion)
1441
- - Escape: [`closeCompletion`](https://codemirror.net/6/docs/ref/#autocomplete.closeCompletion)
1442
- - ArrowDown: [`moveCompletionSelection`](https://codemirror.net/6/docs/ref/#autocomplete.moveCompletionSelection)`(true)`
1443
- - ArrowUp: [`moveCompletionSelection`](https://codemirror.net/6/docs/ref/#autocomplete.moveCompletionSelection)`(false)`
1444
- - PageDown: [`moveCompletionSelection`](https://codemirror.net/6/docs/ref/#autocomplete.moveCompletionSelection)`(true, "page")`
1445
- - PageUp: [`moveCompletionSelection`](https://codemirror.net/6/docs/ref/#autocomplete.moveCompletionSelection)`(false, "page")`
1446
- - Enter: [`acceptCompletion`](https://codemirror.net/6/docs/ref/#autocomplete.acceptCompletion)
1447
- */
1448
- var completionKeymap = [
1449
- {
1450
- key: "Ctrl-Space",
1451
- run: startCompletion
1452
- },
1453
- {
1454
- mac: "Alt-`",
1455
- run: startCompletion
1456
- },
1457
- {
1458
- mac: "Alt-i",
1459
- run: startCompletion
1460
- },
1461
- {
1462
- key: "Escape",
1463
- run: closeCompletion
1464
- },
1465
- {
1466
- key: "ArrowDown",
1467
- run: /*@__PURE__*/ moveCompletionSelection(true)
1468
- },
1469
- {
1470
- key: "ArrowUp",
1471
- run: /*@__PURE__*/ moveCompletionSelection(false)
1472
- },
1473
- {
1474
- key: "PageDown",
1475
- run: /*@__PURE__*/ moveCompletionSelection(true, "page")
1476
- },
1477
- {
1478
- key: "PageUp",
1479
- run: /*@__PURE__*/ moveCompletionSelection(false, "page")
1480
- },
1481
- {
1482
- key: "Enter",
1483
- run: acceptCompletion
1484
- }
1485
- ];
1486
- var completionKeymapExt = /*@__PURE__*/ Prec.highest(/*@__PURE__*/ keymap.computeN([completionConfig], (state) => state.facet(completionConfig).defaultKeymap ? [completionKeymap] : []));
1487
- /**
1488
- Get the current completion status. When completions are available,
1489
- this will return `"active"`. When completions are pending (in the
1490
- process of being queried), this returns `"pending"`. Otherwise, it
1491
- returns `null`.
1492
- */
1493
- function completionStatus(state) {
1494
- let cState = state.field(completionState, false);
1495
- return cState && cState.active.some((a) => a.isPending) ? "pending" : cState && cState.active.some((a) => a.state != 0) ? "active" : null;
1496
- }
1497
- var completionArrayCache = /*@__PURE__*/ new WeakMap();
1498
- /**
1499
- Returns the available completions as an array.
1500
- */
1501
- function currentCompletions(state) {
1502
- var _a;
1503
- let open = (_a = state.field(completionState, false)) === null || _a === void 0 ? void 0 : _a.open;
1504
- if (!open || open.disabled) return [];
1505
- let completions = completionArrayCache.get(open.options);
1506
- if (!completions) completionArrayCache.set(open.options, completions = open.options.map((o) => o.completion));
1507
- return completions;
1508
- }
1509
- export { currentCompletions as a, startCompletion as c, completionStatus as i, autocompletion as n, ifNotIn as o, completeFromList as r, snippetCompletion as s, CompletionContext as t };