@webquark/browser 1.1.0-dev.9 → 1.1.1-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (489) hide show
  1. package/dist/cjs/{action.props-N0urQtdP.js → action.props-CNe2JXR5.js} +1 -1
  2. package/dist/cjs/{dom-Dk77oFF6.js → dom-BYrqRYna.js} +1 -1
  3. package/dist/cjs/{field-CsrQGhG-.js → field-BRAR56Ex.js} +1 -1
  4. package/dist/cjs/{form-control-validity-D1ukC0_e.js → form-control-validity-BkilGb3E.js} +3 -3
  5. package/dist/cjs/{index-DWXhKHCB.js → index-BN-WdOQM.js} +17 -1
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/q-accordion.cjs.entry.js +2 -2
  8. package/dist/cjs/q-alert.cjs.entry.js +2 -2
  9. package/dist/cjs/q-avatar.cjs.entry.js +2 -2
  10. package/dist/cjs/q-banner.cjs.entry.js +1 -1
  11. package/dist/cjs/q-button_3.cjs.entry.js +907 -0
  12. package/dist/cjs/q-card.cjs.entry.js +3 -3
  13. package/dist/cjs/q-carousel.cjs.entry.js +120 -18
  14. package/dist/cjs/q-chip.cjs.entry.js +2 -2
  15. package/dist/cjs/q-control-group.cjs.entry.js +64 -0
  16. package/dist/cjs/q-conversation-bubble.cjs.entry.js +1 -1
  17. package/dist/cjs/q-data-table.cjs.entry.js +4 -4
  18. package/dist/cjs/q-dialog.cjs.entry.js +4 -4
  19. package/dist/cjs/q-divider.cjs.entry.js +26 -0
  20. package/dist/cjs/q-dropdown.cjs.entry.js +320 -104
  21. package/dist/cjs/q-form.cjs.entry.js +17 -7
  22. package/dist/cjs/q-grid.cjs.entry.js +3 -3
  23. package/dist/cjs/q-icon.cjs.entry.js +1 -1
  24. package/dist/cjs/q-image-comparison.cjs.entry.js +2 -2
  25. package/dist/cjs/q-inline.cjs.entry.js +3 -3
  26. package/dist/cjs/q-input_2.cjs.entry.js +10 -8
  27. package/dist/cjs/q-link.cjs.entry.js +2 -2
  28. package/dist/cjs/q-map.cjs.entry.js +2 -2
  29. package/dist/cjs/q-media.cjs.entry.js +2 -2
  30. package/dist/cjs/q-navbar.cjs.entry.js +3 -3
  31. package/dist/cjs/q-pagination.cjs.entry.js +2 -2
  32. package/dist/cjs/q-panel.cjs.entry.js +7 -7
  33. package/dist/cjs/q-quantity-selector.cjs.entry.js +6 -6
  34. package/dist/cjs/q-radio-group.cjs.entry.js +4 -4
  35. package/dist/cjs/q-reel.cjs.entry.js +24 -24
  36. package/dist/cjs/q-section.cjs.entry.js +2 -2
  37. package/dist/cjs/q-sidepanel.cjs.entry.js +5 -4
  38. package/dist/cjs/q-slider.cjs.entry.js +122 -0
  39. package/dist/cjs/q-stack.cjs.entry.js +3 -3
  40. package/dist/cjs/q-step-diagram-item.cjs.entry.js +2 -2
  41. package/dist/cjs/q-step-diagram.cjs.entry.js +4 -4
  42. package/dist/cjs/q-syntax-box.cjs.entry.js +180 -719
  43. package/dist/cjs/q-syntax-view.cjs.entry.js +65 -0
  44. package/dist/cjs/q-tabs.cjs.entry.js +2 -2
  45. package/dist/cjs/q-textarea.cjs.entry.js +8 -6
  46. package/dist/cjs/q-thumbnail.cjs.entry.js +3 -3
  47. package/dist/cjs/q-toast.cjs.entry.js +1 -1
  48. package/dist/cjs/q-toggle.cjs.entry.js +7 -7
  49. package/dist/cjs/q-toolbar.cjs.entry.js +4 -4
  50. package/dist/cjs/syntax-content-BmSExDiW.js +910 -0
  51. package/dist/cjs/{tokens-RMRaIOqv.js → tokens-BMrfol_M.js} +4 -1
  52. package/dist/cjs/webquark.cjs.js +2 -2
  53. package/dist/collection/collection-manifest.json +6 -1
  54. package/dist/collection/components/actions/button/button.css +49 -9
  55. package/dist/collection/components/actions/button/{button.utils.unit.test.js → test/button.utils.unit.test.js} +1 -1
  56. package/dist/collection/components/communication/alert/alert.css +4 -1
  57. package/dist/collection/components/content/carousel/carousel.css +7 -0
  58. package/dist/collection/components/content/carousel/carousel.js +256 -10
  59. package/dist/collection/components/content/carousel/internals/autoplay.js +31 -6
  60. package/dist/collection/components/content/carousel/test/transitions.cmp.test.js +122 -0
  61. package/dist/collection/components/data-display/accordion/accordion.js +1 -1
  62. package/dist/collection/components/data-display/data-table/data-table.js +3 -3
  63. package/dist/collection/components/data-display/map/map.js +1 -1
  64. package/dist/collection/components/data-display/map/test/map.cmp.test.js +1 -1
  65. package/dist/collection/components/data-display/pagination/pagination.js +1 -1
  66. package/dist/collection/components/data-display/syntax-box/internals/formatters/css.js +4 -0
  67. package/dist/collection/components/data-display/syntax-box/internals/formatters/formatter.js +20 -0
  68. package/dist/collection/{utils → components/data-display/syntax-box/internals/formatters}/formatter.unit.test.js +38 -11
  69. package/dist/collection/components/data-display/syntax-box/internals/formatters/html.js +4 -0
  70. package/dist/collection/components/data-display/syntax-box/internals/formatters/javascript.js +4 -0
  71. package/dist/collection/{utils/formatter.js → components/data-display/syntax-box/internals/formatters/json.js} +2 -20
  72. package/dist/collection/components/data-display/syntax-box/internals/formatters/languages.js +15 -0
  73. package/dist/collection/components/data-display/syntax-box/internals/formatters/util/prettier.js +17 -0
  74. package/dist/collection/{utils → components/data-display/syntax-box/internals}/syntax.unit.test.js +1 -1
  75. package/dist/collection/components/data-display/syntax-box/internals/views.js +29 -0
  76. package/dist/collection/components/data-display/syntax-box/internals/views.unit.test.js +19 -0
  77. package/dist/collection/components/data-display/syntax-box/syntax-box.css +107 -36
  78. package/dist/collection/components/data-display/syntax-box/syntax-box.js +179 -637
  79. package/dist/collection/components/data-display/syntax-box/syntax-content.js +748 -0
  80. package/dist/collection/components/data-display/syntax-box/syntax-ui.js +8 -0
  81. package/dist/collection/components/data-display/syntax-box/test/format-fixtures.js +2 -2
  82. package/dist/collection/components/data-display/syntax-box/test/syntax-box.cmp.test.js +1 -1
  83. package/dist/collection/components/data-display/syntax-box/test/syntax-format.cmp.test.js +20 -20
  84. package/dist/collection/components/data-display/syntax-box/test/syntax-views.cmp.test.js +228 -0
  85. package/dist/collection/components/data-display/syntax-view/syntax-view.js +64 -0
  86. package/dist/collection/components/indicators/step-diagram/step-diagram.js +2 -2
  87. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +1 -1
  88. package/dist/collection/components/inputs/dropdown/dropdown.css +148 -0
  89. package/dist/collection/components/inputs/dropdown/dropdown.js +422 -104
  90. package/dist/collection/components/inputs/dropdown/test/dropdown.cmp.test.js +28 -0
  91. package/dist/collection/components/inputs/dropdown/test/fit-options.cmp.test.js +120 -0
  92. package/dist/collection/components/inputs/dropdown/test/multiple.cmp.test.js +124 -0
  93. package/dist/collection/components/inputs/dropdown/test/search-mode.cmp.test.js +186 -0
  94. package/dist/collection/components/inputs/form/form.js +2 -2
  95. package/dist/collection/components/inputs/form/internals/controls.js +2 -2
  96. package/dist/collection/components/inputs/form/internals/field-state.js +6 -1
  97. package/dist/collection/components/inputs/form/internals/values.js +5 -0
  98. package/dist/collection/components/inputs/form/test/form-submit.cmp.test.js +14 -8
  99. package/dist/collection/components/inputs/input/input.css +42 -0
  100. package/dist/collection/components/inputs/input/input.js +31 -3
  101. package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +22 -0
  102. package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +4 -4
  103. package/dist/collection/components/inputs/radio-group/radio-group.js +2 -2
  104. package/dist/collection/components/inputs/slider/slider.css +44 -0
  105. package/dist/collection/components/inputs/slider/slider.js +383 -0
  106. package/dist/collection/components/inputs/slider/test/slider.cmp.test.js +45 -0
  107. package/dist/collection/components/inputs/textarea/textarea.css +20 -0
  108. package/dist/collection/components/inputs/textarea/textarea.js +30 -2
  109. package/dist/collection/components/inputs/toggle/test/toggle-layout.cmp.test.js +69 -0
  110. package/dist/collection/components/inputs/toggle/toggle.css +27 -0
  111. package/dist/collection/components/inputs/toggle/toggle.js +3 -3
  112. package/dist/collection/components/layout/control-group/control-group.css +108 -0
  113. package/dist/collection/components/layout/control-group/control-group.js +142 -0
  114. package/dist/collection/components/layout/control-group/test/control-group.cmp.test.js +163 -0
  115. package/dist/collection/components/layout/divider/divider.css +40 -0
  116. package/dist/collection/components/layout/divider/divider.js +121 -0
  117. package/dist/collection/components/layout/divider/test/divider.cmp.test.js +105 -0
  118. package/dist/collection/components/layout/grid/grid.js +1 -1
  119. package/dist/collection/components/layout/inline/inline.js +1 -1
  120. package/dist/collection/components/layout/navbar/navbar.js +2 -2
  121. package/dist/collection/components/layout/panel/panel.js +4 -4
  122. package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
  123. package/dist/collection/components/layout/section/section.js +1 -1
  124. package/dist/collection/components/layout/sidepanel/internals/nav-items.js +2 -2
  125. package/dist/collection/components/layout/sidepanel/sidepanel.js +3 -0
  126. package/dist/collection/components/layout/stack/stack.js +1 -1
  127. package/dist/collection/components/layout/tabs/tabs.js +1 -1
  128. package/dist/collection/components/layout/toolbar/toolbar.js +2 -2
  129. package/dist/collection/components/media/avatar/avatar.js +1 -1
  130. package/dist/collection/components/media/image-comparison/image-comparison.js +1 -1
  131. package/dist/collection/components/media/media/media.js +1 -1
  132. package/dist/collection/components/media/reel/reel.js +23 -23
  133. package/dist/collection/components/media/reel/test/focus.cmp.test.js +33 -0
  134. package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
  135. package/dist/collection/components/overlays/dialog/dialog.js +2 -2
  136. package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
  137. package/dist/collection/theme/test/input-width.cmp.test.js +117 -0
  138. package/dist/collection/theme/test/presets.unit.test.js +58 -0
  139. package/dist/collection/theme/tokens.js +4 -1
  140. package/dist/collection/utils/dom.js +1 -1
  141. package/dist/collection/utils/form-control-validity.js +3 -3
  142. package/dist/components/index.js +1 -1
  143. package/dist/components/p-B610wOGe.js +1 -0
  144. package/dist/components/p-BGlbV43y.js +13 -0
  145. package/dist/components/{p-Dfp_If-_.js → p-BKWL9zOn.js} +1 -1
  146. package/dist/components/p-BxxU73QQ.js +1 -0
  147. package/dist/components/{p-Cg0Mv7Vb.js → p-CVEQfA-v.js} +1 -1
  148. package/dist/components/p-CpbWWDiY.js +1 -0
  149. package/dist/{webquark/p-Dhsn99q4.js → components/p-D2fczi8m.js} +1 -1
  150. package/dist/components/{p-6PPZ2sIO.js → p-D5vpGqZ9.js} +1 -1
  151. package/dist/components/p-DQIYo8zC.js +1 -0
  152. package/dist/components/p-DX6PCIPS.js +1 -0
  153. package/dist/components/p-DY9D4z7Z.js +1 -0
  154. package/dist/components/p-DbzjRzhu.js +1 -0
  155. package/dist/components/{p-DQhiqYeq.js → p-DkanItP3.js} +1 -1
  156. package/dist/components/{p-CKuPOxKN.js → p-RX4DjgmV.js} +1 -1
  157. package/dist/components/{p-DlIn_ZWk.js → p-Ts5oOvg8.js} +1 -1
  158. package/dist/components/p-u1Qz6OcP.js +1 -0
  159. package/dist/components/q-accordion.js +1 -1
  160. package/dist/components/q-alert.js +1 -1
  161. package/dist/components/q-avatar.js +1 -1
  162. package/dist/components/q-banner.js +1 -1
  163. package/dist/components/q-button.js +1 -1
  164. package/dist/components/q-card.js +1 -1
  165. package/dist/components/q-carousel.js +1 -1
  166. package/dist/components/q-chip.js +1 -1
  167. package/dist/components/q-control-group.d.ts +11 -0
  168. package/dist/components/q-control-group.js +1 -0
  169. package/dist/components/q-conversation-bubble.js +1 -1
  170. package/dist/components/q-data-table.js +1 -1
  171. package/dist/components/q-dialog.js +1 -1
  172. package/dist/components/q-divider.d.ts +11 -0
  173. package/dist/components/q-divider.js +1 -0
  174. package/dist/components/q-dropdown.js +1 -1
  175. package/dist/components/q-form.js +1 -1
  176. package/dist/components/q-grid.js +1 -1
  177. package/dist/components/q-icon.js +1 -1
  178. package/dist/components/q-image-comparison.js +1 -1
  179. package/dist/components/q-inline.js +1 -1
  180. package/dist/components/q-input.js +1 -1
  181. package/dist/components/q-link.js +1 -1
  182. package/dist/components/q-map.js +1 -1
  183. package/dist/components/q-media.js +1 -1
  184. package/dist/components/q-navbar.js +1 -1
  185. package/dist/components/q-pagination.js +1 -1
  186. package/dist/components/q-panel.js +1 -1
  187. package/dist/components/q-progress.js +1 -1
  188. package/dist/components/q-quantity-selector.js +1 -1
  189. package/dist/components/q-radio-group.js +1 -1
  190. package/dist/components/q-reel.js +1 -1
  191. package/dist/components/q-scrollable.js +1 -1
  192. package/dist/components/q-section.js +1 -1
  193. package/dist/components/q-sidepanel.js +2 -2
  194. package/dist/components/q-slider.d.ts +11 -0
  195. package/dist/components/q-slider.js +1 -0
  196. package/dist/components/q-stack.js +1 -1
  197. package/dist/components/q-step-diagram-item.js +1 -1
  198. package/dist/components/q-step-diagram.js +1 -1
  199. package/dist/components/q-syntax-box.js +1 -13
  200. package/dist/components/q-syntax-view.d.ts +11 -0
  201. package/dist/components/q-syntax-view.js +1 -0
  202. package/dist/components/q-tabs.js +1 -1
  203. package/dist/components/q-textarea.js +1 -1
  204. package/dist/components/q-thumbnail.js +1 -1
  205. package/dist/components/q-toast.js +1 -1
  206. package/dist/components/q-toggle.js +1 -1
  207. package/dist/components/q-toolbar.js +1 -1
  208. package/dist/components/q-tooltip.js +1 -1
  209. package/dist/esm/{action.props-CpnGza8z.js → action.props-CbSH7c-q.js} +1 -1
  210. package/dist/esm/{dom-ByfrUWx1.js → dom-B610wOGe.js} +2 -2
  211. package/dist/esm/{field-zfD6OQ02.js → field-D5xUxo11.js} +1 -1
  212. package/dist/esm/{form-control-validity-Bj2RJb2E.js → form-control-validity-BxxU73QQ.js} +3 -3
  213. package/dist/esm/{form-submit-action-CoEIvDqE.js → form-submit-action-BjjfVWyu.js} +1 -1
  214. package/dist/esm/{index-B5ElFlHv.js → index-CIMzZPQO.js} +16 -2
  215. package/dist/esm/loader.js +3 -3
  216. package/dist/esm/q-accordion.entry.js +2 -2
  217. package/dist/esm/q-alert.entry.js +2 -2
  218. package/dist/esm/q-avatar.entry.js +2 -2
  219. package/dist/esm/q-banner.entry.js +1 -1
  220. package/dist/esm/q-button_3.entry.js +903 -0
  221. package/dist/esm/q-card.entry.js +3 -3
  222. package/dist/esm/q-carousel.entry.js +120 -18
  223. package/dist/esm/q-chip.entry.js +2 -2
  224. package/dist/esm/q-control-group.entry.js +62 -0
  225. package/dist/esm/q-conversation-bubble.entry.js +1 -1
  226. package/dist/esm/q-data-table.entry.js +4 -4
  227. package/dist/esm/q-dialog.entry.js +4 -4
  228. package/dist/esm/q-divider.entry.js +24 -0
  229. package/dist/esm/q-dropdown.entry.js +320 -104
  230. package/dist/esm/q-form.entry.js +18 -8
  231. package/dist/esm/q-grid.entry.js +3 -3
  232. package/dist/esm/q-icon.entry.js +1 -1
  233. package/dist/esm/q-image-comparison.entry.js +2 -2
  234. package/dist/esm/q-inline.entry.js +3 -3
  235. package/dist/esm/q-input_2.entry.js +10 -8
  236. package/dist/esm/q-link.entry.js +2 -2
  237. package/dist/esm/q-map.entry.js +2 -2
  238. package/dist/esm/q-media.entry.js +2 -2
  239. package/dist/esm/q-navbar.entry.js +3 -3
  240. package/dist/esm/q-pagination.entry.js +2 -2
  241. package/dist/esm/q-panel.entry.js +7 -7
  242. package/dist/esm/q-quantity-selector.entry.js +6 -6
  243. package/dist/esm/q-radio-group.entry.js +4 -4
  244. package/dist/esm/q-reel.entry.js +24 -24
  245. package/dist/esm/q-section.entry.js +2 -2
  246. package/dist/esm/q-sidepanel.entry.js +5 -4
  247. package/dist/esm/q-slider.entry.js +120 -0
  248. package/dist/esm/q-stack.entry.js +3 -3
  249. package/dist/esm/q-step-diagram-item.entry.js +2 -2
  250. package/dist/esm/q-step-diagram.entry.js +4 -4
  251. package/dist/esm/q-syntax-box.entry.js +180 -719
  252. package/dist/esm/q-syntax-view.entry.js +63 -0
  253. package/dist/esm/q-tabs.entry.js +2 -2
  254. package/dist/esm/q-textarea.entry.js +8 -6
  255. package/dist/esm/q-thumbnail.entry.js +3 -3
  256. package/dist/esm/q-toast.entry.js +1 -1
  257. package/dist/esm/q-toggle.entry.js +7 -7
  258. package/dist/esm/q-toolbar.entry.js +4 -4
  259. package/dist/esm/syntax-content-Cr9kSbmA.js +903 -0
  260. package/dist/esm/{tokens-B4Mg1xEw.js → tokens-DbzjRzhu.js} +4 -1
  261. package/dist/esm/webquark.js +3 -3
  262. package/dist/formatters/prettier/LICENSE +7 -0
  263. package/dist/formatters/prettier/THIRD-PARTY-NOTICES.md +7941 -0
  264. package/dist/formatters/prettier/html-fragment.mjs +1 -0
  265. package/dist/formatters/prettier/html-fragment.mjs.gz +0 -0
  266. package/dist/formatters/prettier/languages/angular.mjs +1 -0
  267. package/dist/formatters/prettier/languages/angular.mjs.gz +0 -0
  268. package/dist/formatters/prettier/languages/css.mjs +1 -0
  269. package/dist/formatters/prettier/languages/css.mjs.gz +0 -0
  270. package/dist/formatters/prettier/languages/flow.mjs +1 -0
  271. package/dist/formatters/prettier/languages/flow.mjs.gz +0 -0
  272. package/dist/formatters/prettier/languages/graphql.mjs +1 -0
  273. package/dist/formatters/prettier/languages/graphql.mjs.gz +0 -0
  274. package/dist/formatters/prettier/languages/handlebars.mjs +1 -0
  275. package/dist/formatters/prettier/languages/handlebars.mjs.gz +0 -0
  276. package/dist/formatters/prettier/languages/html.mjs +1 -0
  277. package/dist/formatters/prettier/languages/html.mjs.gz +0 -0
  278. package/dist/formatters/prettier/languages/javascript.mjs +1 -0
  279. package/dist/formatters/prettier/languages/javascript.mjs.gz +0 -0
  280. package/dist/formatters/prettier/languages/json-stringify.mjs +1 -0
  281. package/dist/formatters/prettier/languages/json-stringify.mjs.gz +0 -0
  282. package/dist/formatters/prettier/languages/json.mjs +1 -0
  283. package/dist/formatters/prettier/languages/json.mjs.gz +0 -0
  284. package/dist/formatters/prettier/languages/json5.mjs +1 -0
  285. package/dist/formatters/prettier/languages/json5.mjs.gz +0 -0
  286. package/dist/formatters/prettier/languages/jsonc.mjs +1 -0
  287. package/dist/formatters/prettier/languages/jsonc.mjs.gz +0 -0
  288. package/dist/formatters/prettier/languages/jsx.mjs +1 -0
  289. package/dist/formatters/prettier/languages/jsx.mjs.gz +0 -0
  290. package/dist/formatters/prettier/languages/less.mjs +1 -0
  291. package/dist/formatters/prettier/languages/less.mjs.gz +0 -0
  292. package/dist/formatters/prettier/languages/lwc.mjs +1 -0
  293. package/dist/formatters/prettier/languages/lwc.mjs.gz +0 -0
  294. package/dist/formatters/prettier/languages/markdown.mjs +1 -0
  295. package/dist/formatters/prettier/languages/markdown.mjs.gz +0 -0
  296. package/dist/formatters/prettier/languages/mdx.mjs +1 -0
  297. package/dist/formatters/prettier/languages/mdx.mjs.gz +0 -0
  298. package/dist/formatters/prettier/languages/mjml.mjs +1 -0
  299. package/dist/formatters/prettier/languages/mjml.mjs.gz +0 -0
  300. package/dist/formatters/prettier/languages/postcss.mjs +1 -0
  301. package/dist/formatters/prettier/languages/postcss.mjs.gz +0 -0
  302. package/dist/formatters/prettier/languages/scss.mjs +1 -0
  303. package/dist/formatters/prettier/languages/scss.mjs.gz +0 -0
  304. package/dist/formatters/prettier/languages/tsx.mjs +1 -0
  305. package/dist/formatters/prettier/languages/tsx.mjs.gz +0 -0
  306. package/dist/formatters/prettier/languages/typescript.mjs +1 -0
  307. package/dist/formatters/prettier/languages/typescript.mjs.gz +0 -0
  308. package/dist/formatters/prettier/languages/vue.mjs +1 -0
  309. package/dist/formatters/prettier/languages/vue.mjs.gz +0 -0
  310. package/dist/formatters/prettier/languages/yaml.mjs +1 -0
  311. package/dist/formatters/prettier/languages/yaml.mjs.gz +0 -0
  312. package/dist/formatters/prettier/manifest.json +87 -0
  313. package/dist/formatters/prettier/plugins/acorn.mjs +17 -0
  314. package/dist/formatters/prettier/plugins/acorn.mjs.gz +0 -0
  315. package/dist/formatters/prettier/plugins/angular.mjs +7 -0
  316. package/dist/formatters/prettier/plugins/angular.mjs.gz +0 -0
  317. package/dist/formatters/prettier/plugins/babel.mjs +16 -0
  318. package/dist/formatters/prettier/plugins/babel.mjs.gz +0 -0
  319. package/dist/formatters/prettier/plugins/estree.mjs +44 -0
  320. package/dist/formatters/prettier/plugins/estree.mjs.gz +0 -0
  321. package/dist/formatters/prettier/plugins/flow.mjs +7 -0
  322. package/dist/formatters/prettier/plugins/flow.mjs.gz +0 -0
  323. package/dist/formatters/prettier/plugins/glimmer.mjs +37 -0
  324. package/dist/formatters/prettier/plugins/glimmer.mjs.gz +0 -0
  325. package/dist/formatters/prettier/plugins/graphql.mjs +17 -0
  326. package/dist/formatters/prettier/plugins/graphql.mjs.gz +0 -0
  327. package/dist/formatters/prettier/plugins/html.mjs +25 -0
  328. package/dist/formatters/prettier/plugins/html.mjs.gz +0 -0
  329. package/dist/formatters/prettier/plugins/markdown.mjs +70 -0
  330. package/dist/formatters/prettier/plugins/markdown.mjs.gz +0 -0
  331. package/dist/formatters/prettier/plugins/meriyah.mjs +9 -0
  332. package/dist/formatters/prettier/plugins/meriyah.mjs.gz +0 -0
  333. package/dist/formatters/prettier/plugins/postcss.mjs +62 -0
  334. package/dist/formatters/prettier/plugins/postcss.mjs.gz +0 -0
  335. package/dist/formatters/prettier/plugins/typescript.mjs +22 -0
  336. package/dist/formatters/prettier/plugins/typescript.mjs.gz +0 -0
  337. package/dist/formatters/prettier/plugins/yaml.mjs +150 -0
  338. package/dist/formatters/prettier/plugins/yaml.mjs.gz +0 -0
  339. package/dist/formatters/prettier/runtime.d.mts +2 -0
  340. package/dist/formatters/prettier/runtime.mjs +1 -0
  341. package/dist/formatters/prettier/runtime.mjs.gz +0 -0
  342. package/dist/formatters/prettier/standalone.mjs +29 -0
  343. package/dist/formatters/prettier/standalone.mjs.gz +0 -0
  344. package/dist/playground/components/theme-designer/dimension-tokens.js +9 -0
  345. package/dist/playground/components/theme-designer/token-row.js +60 -0
  346. package/dist/playground/dom-factory.js +76 -0
  347. package/dist/playground/utils/color.js +15 -0
  348. package/dist/playground/utils/dom.js +38 -0
  349. package/dist/playground/utils/index.js +2 -0
  350. package/dist/types/components/content/carousel/carousel.d.ts +23 -2
  351. package/dist/types/components/content/carousel/carousel.types.d.ts +6 -0
  352. package/dist/types/components/content/carousel/internals/autoplay.d.ts +5 -0
  353. package/dist/types/components/data-display/syntax-box/internals/formatters/css.d.ts +1 -0
  354. package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.d.ts +10 -0
  355. package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.types.d.ts +4 -0
  356. package/dist/types/components/data-display/syntax-box/internals/formatters/html.d.ts +1 -0
  357. package/dist/types/components/data-display/syntax-box/internals/formatters/javascript.d.ts +1 -0
  358. package/dist/types/components/data-display/syntax-box/internals/formatters/json.d.ts +6 -0
  359. package/dist/types/components/data-display/syntax-box/internals/formatters/languages.d.ts +27 -0
  360. package/dist/types/components/data-display/syntax-box/internals/formatters/util/prettier.d.ts +3 -0
  361. package/dist/types/{utils → components/data-display/syntax-box/internals}/syntax.d.ts +1 -1
  362. package/dist/types/components/data-display/syntax-box/internals/syntax.unit.test.d.ts +1 -0
  363. package/dist/types/components/data-display/syntax-box/internals/views.d.ts +11 -0
  364. package/dist/types/components/data-display/syntax-box/internals/views.unit.test.d.ts +1 -0
  365. package/dist/types/components/data-display/syntax-box/syntax-box.d.ts +66 -63
  366. package/dist/types/components/data-display/syntax-box/syntax-box.types.d.ts +1 -1
  367. package/dist/types/components/data-display/syntax-box/syntax-content.d.ts +41 -0
  368. package/dist/types/components/data-display/syntax-box/syntax-ui.d.ts +15 -0
  369. package/dist/types/components/data-display/syntax-box/test/format-fixtures.d.ts +1 -1
  370. package/dist/types/components/data-display/syntax-box/test/syntax-views.cmp.test.d.ts +1 -0
  371. package/dist/types/components/data-display/syntax-view/syntax-view.d.ts +48 -0
  372. package/dist/types/components/inputs/dropdown/dropdown.d.ts +45 -1
  373. package/dist/types/components/inputs/dropdown/test/fit-options.cmp.test.d.ts +3 -0
  374. package/dist/types/components/inputs/dropdown/test/multiple.cmp.test.d.ts +1 -0
  375. package/dist/types/components/inputs/dropdown/test/search-mode.cmp.test.d.ts +1 -0
  376. package/dist/types/components/inputs/form/internals/field-state.d.ts +1 -1
  377. package/dist/types/components/inputs/input/input.d.ts +3 -0
  378. package/dist/types/components/inputs/slider/slider.d.ts +45 -0
  379. package/dist/types/components/inputs/slider/test/slider.cmp.test.d.ts +1 -0
  380. package/dist/types/components/inputs/textarea/textarea.d.ts +3 -1
  381. package/dist/types/components/inputs/toggle/test/toggle-layout.cmp.test.d.ts +1 -0
  382. package/dist/types/components/layout/control-group/control-group.d.ts +20 -0
  383. package/dist/types/components/layout/control-group/test/control-group.cmp.test.d.ts +7 -0
  384. package/dist/types/components/layout/divider/divider.d.ts +15 -0
  385. package/dist/types/components/layout/divider/test/divider.cmp.test.d.ts +1 -0
  386. package/dist/types/components/layout/sidepanel/sidepanel.d.ts +2 -0
  387. package/dist/types/components/layout/sidepanel/sidepanel.types.d.ts +1 -0
  388. package/dist/types/components/media/reel/reel.d.ts +3 -3
  389. package/dist/types/components/media/reel/test/focus.cmp.test.d.ts +1 -0
  390. package/dist/types/components.d.ts +591 -13
  391. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/dimension-tokens.d.ts +3 -0
  392. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/token-row.d.ts +14 -0
  393. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/dom-factory.d.ts +13 -0
  394. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/color.d.ts +2 -0
  395. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/dom.d.ts +15 -0
  396. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/index.d.ts +2 -0
  397. package/dist/types/index.d.ts +2 -2
  398. package/dist/types/theme/test/input-width.cmp.test.d.ts +3 -0
  399. package/dist/types/theme/test/presets.unit.test.d.ts +1 -0
  400. package/dist/types/theme/tokens.d.ts +9 -0
  401. package/dist/types/utils/form-control-validity.d.ts +2 -1
  402. package/dist/types/utils/form-field-adapter.d.ts +3 -3
  403. package/dist/webquark/p-014c2f4a.entry.js +1 -0
  404. package/dist/webquark/p-0389577c.entry.js +1 -0
  405. package/dist/webquark/p-041e17c1.entry.js +1 -0
  406. package/dist/webquark/p-0479c571.entry.js +1 -0
  407. package/dist/webquark/p-0ebca9be.entry.js +1 -0
  408. package/dist/webquark/{p-fe8c634a.entry.js → p-1bf375f7.entry.js} +2 -2
  409. package/dist/webquark/{p-6bfffa79.entry.js → p-20dc3ab5.entry.js} +1 -1
  410. package/dist/webquark/p-28d3348f.entry.js +1 -0
  411. package/dist/webquark/p-35c177d3.entry.js +1 -0
  412. package/dist/webquark/{p-99d785ca.entry.js → p-3a60086d.entry.js} +1 -1
  413. package/dist/webquark/{p-3bc4629c.entry.js → p-3ab798aa.entry.js} +1 -1
  414. package/dist/webquark/{p-9e78b796.entry.js → p-3b580baf.entry.js} +1 -1
  415. package/dist/webquark/{p-888e46a8.entry.js → p-3b65f787.entry.js} +1 -1
  416. package/dist/webquark/p-4bf610f8.entry.js +1 -0
  417. package/dist/webquark/{p-4d61b70d.entry.js → p-4d30227e.entry.js} +1 -1
  418. package/dist/webquark/{p-70d9ffde.entry.js → p-4de536ae.entry.js} +1 -1
  419. package/dist/webquark/{p-90b0858c.entry.js → p-4e4d70c9.entry.js} +1 -1
  420. package/dist/webquark/p-4efeb7c9.entry.js +1 -0
  421. package/dist/webquark/{p-dd115868.entry.js → p-51b3d71b.entry.js} +1 -1
  422. package/dist/webquark/p-778b6bbb.entry.js +1 -0
  423. package/dist/webquark/{p-f63b7214.entry.js → p-7da78b2f.entry.js} +1 -1
  424. package/dist/webquark/{p-9ff7e5a4.entry.js → p-7f8f986b.entry.js} +1 -1
  425. package/dist/webquark/p-8253c742.entry.js +1 -0
  426. package/dist/webquark/{p-059daa8a.entry.js → p-9a1ddeb7.entry.js} +1 -1
  427. package/dist/webquark/p-B610wOGe.js +1 -0
  428. package/dist/webquark/p-BxxU73QQ.js +1 -0
  429. package/dist/webquark/p-CIMzZPQO.js +3 -0
  430. package/dist/webquark/p-CfR85WgM.js +13 -0
  431. package/dist/{components/p-BofcK-7Z.js → webquark/p-D8p28N9s.js} +1 -1
  432. package/dist/webquark/p-DbzjRzhu.js +1 -0
  433. package/dist/webquark/{p-BOdNg0jc.js → p-DeOEN0si.js} +1 -1
  434. package/dist/webquark/{p-d0fbd2b1.entry.js → p-a2b1de23.entry.js} +1 -1
  435. package/dist/webquark/{p-48fb5228.entry.js → p-a55edc17.entry.js} +1 -1
  436. package/dist/webquark/p-a8808020.entry.js +1 -0
  437. package/dist/webquark/{p-f4f97e74.entry.js → p-b1084b3c.entry.js} +1 -1
  438. package/dist/webquark/{p-36118d90.entry.js → p-b6c4dff4.entry.js} +1 -1
  439. package/dist/webquark/p-b962e950.entry.js +1 -0
  440. package/dist/webquark/{p-023f8437.entry.js → p-bc369cd6.entry.js} +1 -1
  441. package/dist/webquark/p-c119a8ea.entry.js +1 -0
  442. package/dist/webquark/p-c6b77e9a.entry.js +1 -0
  443. package/dist/webquark/{p-030ecde3.entry.js → p-ca1c03b4.entry.js} +1 -1
  444. package/dist/webquark/{p-8ece2c62.entry.js → p-ce436162.entry.js} +1 -1
  445. package/dist/webquark/{p-0aa74ad6.entry.js → p-d0a47a7c.entry.js} +1 -1
  446. package/dist/webquark/{p-fec6fe0a.entry.js → p-e1fbc8fc.entry.js} +1 -1
  447. package/dist/webquark/{p-09cca7b9.entry.js → p-e32833ce.entry.js} +1 -1
  448. package/dist/webquark/p-e369a4aa.entry.js +1 -0
  449. package/dist/webquark/p-e4430c61.entry.js +1 -0
  450. package/dist/webquark/{p-f9ad63ff.entry.js → p-e9c0052b.entry.js} +1 -1
  451. package/dist/webquark/{p-f1bac94c.entry.js → p-f5c4ca18.entry.js} +1 -1
  452. package/dist/webquark/{p-64096386.entry.js → p-f6683126.entry.js} +1 -1
  453. package/dist/webquark/{p-DWO-pleQ.js → p-ojSDiptZ.js} +1 -1
  454. package/dist/webquark/webquark.css +1 -1
  455. package/dist/webquark/webquark.esm.js +1 -1
  456. package/package.json +6 -2
  457. package/dist/cjs/q-button_2.cjs.entry.js +0 -462
  458. package/dist/cjs/q-scrollable.cjs.entry.js +0 -449
  459. package/dist/components/p-B4Mg1xEw.js +0 -1
  460. package/dist/components/p-BH4gQWub.js +0 -1
  461. package/dist/components/p-Bj2RJb2E.js +0 -1
  462. package/dist/components/p-ByfrUWx1.js +0 -1
  463. package/dist/components/p-CN1ut2Lb.js +0 -1
  464. package/dist/components/p-ye27qtRo.js +0 -1
  465. package/dist/esm/q-button_2.entry.js +0 -459
  466. package/dist/esm/q-scrollable.entry.js +0 -447
  467. package/dist/types/utils/formatter.d.ts +0 -15
  468. package/dist/webquark/p-04c8cb9e.entry.js +0 -1
  469. package/dist/webquark/p-0ae43d6c.entry.js +0 -1
  470. package/dist/webquark/p-0c3aac3f.entry.js +0 -1
  471. package/dist/webquark/p-144ef339.entry.js +0 -1
  472. package/dist/webquark/p-296fbdb1.entry.js +0 -1
  473. package/dist/webquark/p-5f232b44.entry.js +0 -13
  474. package/dist/webquark/p-6e28cfe2.entry.js +0 -1
  475. package/dist/webquark/p-91fff6b6.entry.js +0 -1
  476. package/dist/webquark/p-923dac41.entry.js +0 -1
  477. package/dist/webquark/p-97a89cae.entry.js +0 -1
  478. package/dist/webquark/p-B4Mg1xEw.js +0 -1
  479. package/dist/webquark/p-B5ElFlHv.js +0 -3
  480. package/dist/webquark/p-Bj2RJb2E.js +0 -1
  481. package/dist/webquark/p-ByfrUWx1.js +0 -1
  482. package/dist/webquark/p-c523ec6f.entry.js +0 -1
  483. package/dist/webquark/p-d0253d64.entry.js +0 -1
  484. package/dist/webquark/p-f98f9439.entry.js +0 -1
  485. package/dist/webquark/p-fe200f68.entry.js +0 -1
  486. /package/dist/{types/components/actions/button/button.utils.unit.test.d.ts → collection/components/data-display/syntax-box/internals/formatters/formatter.types.js} +0 -0
  487. /package/dist/collection/{utils → components/data-display/syntax-box/internals}/syntax.js +0 -0
  488. /package/dist/types/{utils/formatter.unit.test.d.ts → components/actions/button/test/button.utils.unit.test.d.ts} +0 -0
  489. /package/dist/types/{utils/syntax.unit.test.d.ts → components/data-display/syntax-box/internals/formatters/formatter.unit.test.d.ts} +0 -0
@@ -226,14 +226,14 @@ export class QDataTable {
226
226
  sortColumn: this.sortColumn,
227
227
  sortDirection: this.sortDirection,
228
228
  });
229
- return (h("div", { key: '81ad964a4062b0a1a6e943f74638460be6a20adb', class: "table-container", role: "grid", "aria-label": this.ariaLabel?.trim() || this.toolbarTitle?.trim() || 'Data table' }, renderDataTableToolbar({
229
+ return (h("div", { key: '9c73c6d30d081e5519af9ae93a465eac2181fcde', class: "table-container", role: "grid", "aria-label": this.ariaLabel?.trim() || this.toolbarTitle?.trim() || 'Data table' }, renderDataTableToolbar({
230
230
  showToolbar: this.showToolbar,
231
231
  toolbarTitle: this.toolbarTitle,
232
232
  showSearch: this.showSearch,
233
233
  searchPlaceholder: this.searchPlaceholder,
234
234
  searchValue: this.searchValue,
235
235
  onSearchInput: this.handleSearchInput,
236
- }), h("div", { key: '515649da948dc76b980ad7c005ce4accef87e8c6', class: "table-scroll-area" }, h("table", { key: '88262634f0cc6468537cb5d8b3c5d847e06fadfd', class: "table-el", style: this.twoLineRows ? { '--q-table-action-count': String(model.rowActions.length) } : undefined }, renderDataTableHead({
236
+ }), h("div", { key: '4b1b1059c2bfd59aefb048188563f3effc8dbf72', class: "table-scroll-area" }, h("table", { key: '790c6909a3ecfd66cd452e5314d1f5a2cd2b70ae', class: "table-el", style: this.twoLineRows ? { '--q-table-action-count': String(model.rowActions.length) } : undefined }, renderDataTableHead({
237
237
  model,
238
238
  onSelectAllChange: event => this.handleSelectAllChange(event),
239
239
  onSortToggle: column => this.handleSortToggle(column),
@@ -246,7 +246,7 @@ export class QDataTable {
246
246
  onRowCheckboxChange: (item, index, event) => this.handleRowCheckboxChange(item, index, event),
247
247
  onRowAction: (item, index, action, event) => this.handleRowAction(item, index, action, event),
248
248
  renderCell: (item, column) => this.renderCell(item, column),
249
- }))), h("slot", { key: '921e7384470d2f12fe78a43d6cf28e8d48ce3780', name: "footer" })));
249
+ }))), h("slot", { key: '570258218b4c63d2d48b29d58135e89ffee70add', name: "footer" })));
250
250
  }
251
251
  static get is() { return "q-data-table"; }
252
252
  static get encapsulation() { return "shadow"; }
@@ -729,7 +729,7 @@ export class QMap {
729
729
  }
730
730
  }
731
731
  render() {
732
- return (h("div", { key: '033fd7a2d32834e77a2558c65534977586ceedeb', class: "map-surface", part: "surface" }, h("div", { key: 'e478148f947ed36790471bb2fbf793de05aa8c85', class: "map-canvas", part: "canvas", role: "region", "aria-label": this.ariaLabel, "aria-busy": this.providerStatus === 'initializing' ? 'true' : undefined, ref: this.setCanvas }), h("q-icon", { key: 'f2257ff57c557e82e0373fed177892c37190cbeb', class: "map-icon-registration", "aria-hidden": "true" }), this.providerStatus === 'empty' && (h("div", { key: '1473bd03ecda753ae602340396a342a9f36d0869', class: "map-empty", part: "empty", role: "status" }, h("slot", { key: '3459312eb6bf78f542c6bd3f700304097dc1add8', name: "empty" }, "Map provider is not configured."))), this.providerStatus === 'error' && (h("div", { key: '7477ce15ffad0b72381973c7ffd6e3dc64557159', class: "map-empty map-error", part: "error", role: "alert" }, h("slot", { key: 'ae647a72990bde7889aed466fdb005088c47e83d', name: "error" }, this.errorMessage ?? 'Map imagery is unavailable.'))), this.renderAttribution()));
732
+ return (h("div", { key: 'cc1311b01c382e8fb9fa56dfe106df28d0f53284', class: "map-surface", part: "surface" }, h("div", { key: '7a045981dcf9ef74d1b56044c9cccedb136b5fe3', class: "map-canvas", part: "canvas", role: "region", "aria-label": this.ariaLabel, "aria-busy": this.providerStatus === 'initializing' ? 'true' : undefined, ref: this.setCanvas }), h("q-icon", { key: 'afc8b162325d4773a204337439787a3c8b4d4618', class: "map-icon-registration", "aria-hidden": "true" }), this.providerStatus === 'empty' && (h("div", { key: '5cd6e3499fa313b8674d270c3b603bf4f99b3f82', class: "map-empty", part: "empty", role: "status" }, h("slot", { key: '208a04301474df21413c9ecd088964071199c8b2', name: "empty" }, "Map provider is not configured."))), this.providerStatus === 'error' && (h("div", { key: 'fa3e8abf20064b642bbe81ed4cae631cb005e95e', class: "map-empty map-error", part: "error", role: "alert" }, h("slot", { key: 'f2920a6e59a7dadd0585a3c3e0f8a017749477fd', name: "error" }, this.errorMessage ?? 'Map imagery is unavailable.'))), this.renderAttribution()));
733
733
  }
734
734
  static get is() { return "q-map"; }
735
735
  static get encapsulation() { return "shadow"; }
@@ -187,7 +187,7 @@ describe('q-map in Chromium', () => {
187
187
  style.textContent = mapStyles;
188
188
  element.shadowRoot.prepend(style);
189
189
  element.markers = [
190
- { id: 'darling', latitude: -33.3745084, longitude: 18.3883346, label: 'Darling' },
190
+ { id: 'north', latitude: -33.5, longitude: 18.5, label: 'North marker' },
191
191
  { id: 'cape', latitude: -33.9249, longitude: 18.4241, label: 'Cape Town' },
192
192
  { id: 'invalid', latitude: 200, longitude: 0, label: 'Invalid' },
193
193
  ];
@@ -55,7 +55,7 @@ export class QPagination {
55
55
  const itemLabel = this.itemLabel.trim() || 'items';
56
56
  const previousDisabled = this.disabled || totalItems === 0 || page <= 1;
57
57
  const nextDisabled = this.disabled || totalItems === 0 || page >= pageCount;
58
- return (h("nav", { key: '399d0bb980b9a615ac629a74ab73f75e2e684d4f', class: "pagination", part: "container", "aria-label": this.ariaLabel?.trim() || 'Pagination' }, this.showSummary && (h("span", { key: 'bbbaec3c55dbf031752426d28c9532d13c145cc8', class: "summary", part: "summary", "aria-live": "polite" }, "Showing ", pageStart, "-", pageEnd, " of ", totalItems, " ", itemLabel)), h("div", { key: 'b5e6bc3d904c0d6a21e8cede9e9d9fb690f218e5', class: "controls", part: "controls" }, h("button", { key: '89addeec085c242fe96f6cdcdd8978296e8f4e94', class: "page-button", part: "previous-button", type: "button", disabled: previousDisabled, "aria-label": "Previous page", onClick: () => this.requestPage(page - 1) }, "Previous"), h("span", { key: '053432568de326a0689d6906bc9f5799cb91b55b', class: "page-count", part: "page-count", "aria-label": `Page ${page} of ${pageCount}` }, page, " / ", pageCount), h("button", { key: '95ff9bca2ebf5bf8b46f2884553fcff1b55019c0', class: "page-button", part: "next-button", type: "button", disabled: nextDisabled, "aria-label": "Next page", onClick: () => this.requestPage(page + 1) }, "Next"))));
58
+ return (h("nav", { key: '29cfb956b6c7c1e4b962496f2711dc2fb05a27ed', class: "pagination", part: "container", "aria-label": this.ariaLabel?.trim() || 'Pagination' }, this.showSummary && (h("span", { key: '4ad6cbdeb1bc6019bc794a3150b167a0664a111d', class: "summary", part: "summary", "aria-live": "polite" }, "Showing ", pageStart, "-", pageEnd, " of ", totalItems, " ", itemLabel)), h("div", { key: 'f0935b57c18c9f91600f0b9b953d24a895dc6359', class: "controls", part: "controls" }, h("button", { key: '209ac953359ca06ce51d7a92288993c476696c3c', class: "page-button", part: "previous-button", type: "button", disabled: previousDisabled, "aria-label": "Previous page", onClick: () => this.requestPage(page - 1) }, "Previous"), h("span", { key: 'd092e6c1998326189e2fba31a18a8f17ccce40b8', class: "page-count", part: "page-count", "aria-label": `Page ${page} of ${pageCount}` }, page, " / ", pageCount), h("button", { key: '3e3ffa0e201b07248cad027cb4c50345dd9f035d', class: "page-button", part: "next-button", type: "button", disabled: nextDisabled, "aria-label": "Next page", onClick: () => this.requestPage(page + 1) }, "Next"))));
59
59
  }
60
60
  static get is() { return "q-pagination"; }
61
61
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,4 @@
1
+ import { formatPrettierSource } from "./util/prettier";
2
+ export async function formatCss(code) {
3
+ return (await formatPrettierSource(code, 'css')).code;
4
+ }
@@ -0,0 +1,20 @@
1
+ import { formatJsonSource } from "./json";
2
+ import { formatterLanguage } from "./languages";
3
+ import { formatPrettierSource } from "./util/prettier";
4
+ export { formatHtml } from './html';
5
+ export { formatJs } from './javascript';
6
+ export { formatCss } from './css';
7
+ export { formatJson } from './json';
8
+ export function isFormatSupported(language) {
9
+ return formatterLanguage(language) !== undefined;
10
+ }
11
+ export function formatSource(code, language) {
12
+ const selected = formatterLanguage(language);
13
+ if (!selected)
14
+ return { code, status: 'unsupported' };
15
+ return selected === 'json' ? formatJsonSource(code) : formatPrettierSource(code, selected);
16
+ }
17
+ export function formatCode(code, language) {
18
+ const result = formatSource(code, language);
19
+ return result instanceof Promise ? result.then(value => value.code) : result.code;
20
+ }
@@ -1,6 +1,7 @@
1
1
  import { describe, expect, it, vi } from "vitest";
2
- import { formatCode, formatCss, formatHtml, formatJs, formatJson, formatSource, isFormatSupported, MAX_JSON_FORMAT_DEPTH, MAX_JSON_FORMAT_INPUT, MAX_JSON_FORMAT_OUTPUT } from "./formatter";
3
- import { INVALID_JSON, JSON_EXPECTED, JSON_SOURCE, jsonTokens, UNSUPPORTED_SOURCE } from "../components/data-display/syntax-box/test/format-fixtures";
2
+ import { formatCode, formatCss, formatHtml, formatJs, formatJson, formatSource, isFormatSupported } from "./formatter";
3
+ import { MAX_JSON_FORMAT_DEPTH, MAX_JSON_FORMAT_INPUT, MAX_JSON_FORMAT_OUTPUT } from "./json";
4
+ import { INVALID_JSON, JSON_EXPECTED, JSON_SOURCE, jsonTokens, NON_JSON_SOURCE } from "../../test/format-fixtures";
4
5
  describe('explicit token-preserving formatter', () => {
5
6
  it('formats JSON with two-space/LF indentation', () => {
6
7
  expect(formatCode('{"a":1,"b":[2,3]}', 'json')).toBe('{\n "a": 1,\n "b": [\n 2,\n 3\n ]\n}');
@@ -19,20 +20,46 @@ describe('explicit token-preserving formatter', () => {
19
20
  expect(formatSource(source, 'json')).toEqual({ code: source, status: 'invalid' });
20
21
  expect(formatCode(source, 'json')).toBe(source);
21
22
  });
22
- it.each(UNSUPPORTED_SOURCE)('keeps whitespace-sensitive %s source intact', (language, source) => {
23
- expect(isFormatSupported(language)).toBe(false);
24
- expect(formatSource(source, language)).toEqual({ code: source, status: 'unsupported' });
25
- expect(formatCode(source, language)).toBe(source);
23
+ it.each(NON_JSON_SOURCE)('routes %s through its embedded formatter', async (language, source) => {
24
+ expect(isFormatSupported(language)).toBe(true);
25
+ const result = await formatSource(source, language);
26
+ expect(result.status).toBe('formatted');
27
+ expect(await formatCode(result.code, language)).toBe(result.code);
26
28
  });
27
- it('retains named helper signatures and the js alias as conservative unchanged-source routes', () => {
28
- expect(formatHtml(UNSUPPORTED_SOURCE[0][1])).toBe(UNSUPPORTED_SOURCE[0][1]);
29
- expect(formatJs(UNSUPPORTED_SOURCE[1][1])).toBe(UNSUPPORTED_SOURCE[1][1]);
30
- expect(formatCss(UNSUPPORTED_SOURCE[2][1])).toBe(UNSUPPORTED_SOURCE[2][1]);
31
- expect(formatCode(UNSUPPORTED_SOURCE[1][1], 'js')).toBe(UNSUPPORTED_SOURCE[1][1]);
29
+ it('retains named helpers and the JavaScript alias', async () => {
30
+ expect(await formatHtml('Hello <b>world</b>!')).toContain('Hello <b>world</b>!');
31
+ expect(await formatJs('const x=1')).toBe(await formatCode('const x=1', 'js'));
32
+ expect(await formatCss('p{color:red}')).toContain('color: red;');
32
33
  expect(formatCode('literal', 'unknown')).toBe('literal');
33
34
  expect(formatCode('', 'json')).toBe('');
34
35
  expect(isFormatSupported('JSON')).toBe(true);
35
36
  });
37
+ it.each(['<q-button>', '<div><b>x</b>', '<q-button label="'])('keeps an incomplete HTML draft intact: %s', async (code) => {
38
+ expect(await formatSource(code, 'html')).toEqual({ code, status: 'invalid' });
39
+ });
40
+ it('preserves text-only slots, outer spacing and literal element contents', async () => {
41
+ const label = ' Save changes\r\n';
42
+ expect(await formatSource(label, 'html')).toEqual({ code: label, status: 'unchanged' });
43
+ const raw = ['pre', 'textarea', 'script', 'style'].map(name => `<${name}>\r\n x \r\n</${name}>`).join('');
44
+ const source = '\t<div id="log">' + raw + '</div> ';
45
+ const result = await formatSource(source, 'html');
46
+ expect(result.status).toBe('formatted');
47
+ expect(result.code.startsWith('\t<div id="log">')).toBe(true);
48
+ expect(result.code.match(/\s+$/)?.[0]).toBe(' ');
49
+ for (const tag of ['pre', 'textarea', 'script', 'style']) {
50
+ expect(result.code).toContain(`<${tag}>\r\n x \r\n</${tag}`);
51
+ }
52
+ expect(await formatHtml(result.code)).toBe(result.code);
53
+ });
54
+ it('accepts HTML with optional end tags', async () => {
55
+ expect((await formatSource('<ul><li>one<li>two</ul>', 'html')).status).toBe('formatted');
56
+ });
57
+ it('distinguishes a rejected Vue draft from a missing formatter', async () => {
58
+ const source = '<template></bad>';
59
+ const result = await formatSource(source, 'vue');
60
+ expect(result.code).toBe(source);
61
+ expect(['invalid', 'failed']).toContain(result.status);
62
+ });
36
63
  it('never parses JSON through JavaScript values or stringifies values', () => {
37
64
  const parse = vi.spyOn(JSON, 'parse');
38
65
  const stringify = vi.spyOn(JSON, 'stringify');
@@ -0,0 +1,4 @@
1
+ import { formatPrettierSource } from "./util/prettier";
2
+ export async function formatHtml(code) {
3
+ return (await formatPrettierSource(code, 'html')).code;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { formatPrettierSource } from "./util/prettier";
2
+ export async function formatJs(code) {
3
+ return (await formatPrettierSource(code, 'javascript')).code;
4
+ }
@@ -3,9 +3,6 @@ export const MAX_JSON_FORMAT_OUTPUT = 2_097_152;
3
3
  export const MAX_JSON_FORMAT_DEPTH = 128;
4
4
  class FormatLimitError extends Error {
5
5
  }
6
- export function isFormatSupported(language) {
7
- return typeof language === 'string' && language.toLowerCase() === 'json';
8
- }
9
6
  /** Validates JSON grammar while emitting original tokens, never JavaScript values. */
10
7
  function layoutJson(source) {
11
8
  if (source.length > MAX_JSON_FORMAT_INPUT) {
@@ -127,10 +124,7 @@ function layoutJson(source) {
127
124
  }
128
125
  return parts.join('');
129
126
  }
130
- export function formatSource(code, language) {
131
- if (!isFormatSupported(language)) {
132
- return { code, status: 'unsupported' };
133
- }
127
+ export function formatJsonSource(code) {
134
128
  try {
135
129
  const formatted = layoutJson(code);
136
130
  return { code: formatted, status: formatted === code ? 'unchanged' : 'formatted' };
@@ -140,17 +134,5 @@ export function formatSource(code, language) {
140
134
  }
141
135
  }
142
136
  export function formatJson(code) {
143
- return formatSource(code, 'json').code;
144
- }
145
- export function formatCss(code) {
146
- return code;
147
- }
148
- export function formatHtml(code) {
149
- return code;
150
- }
151
- export function formatJs(code) {
152
- return code;
153
- }
154
- export function formatCode(code, language) {
155
- return formatSource(code, language).code;
137
+ return formatJsonSource(code).code;
156
138
  }
@@ -0,0 +1,15 @@
1
+ // The keys are the language values accepted by both Syntax Box and Syntax View.
2
+ export const formatterLanguages = {
3
+ html: 'HTML', javascript: 'JavaScript', css: 'CSS', json: 'JSON',
4
+ typescript: 'TypeScript', jsx: 'JSX', tsx: 'TSX', flow: 'Flow',
5
+ json5: 'JSON5', jsonc: 'JSON with Comments', 'json-stringify': 'JSON.stringify',
6
+ postcss: 'PostCSS', less: 'Less', scss: 'SCSS',
7
+ angular: 'Angular', vue: 'Vue', lwc: 'Lightning Web Components', mjml: 'MJML',
8
+ handlebars: 'Handlebars', graphql: 'GraphQL', markdown: 'Markdown', mdx: 'MDX', yaml: 'YAML',
9
+ };
10
+ export function formatterLanguage(value) {
11
+ const key = typeof value === 'string' ? value.toLowerCase() : '';
12
+ if (key === 'js')
13
+ return 'javascript';
14
+ return Object.prototype.hasOwnProperty.call(formatterLanguages, key) ? key : undefined;
15
+ }
@@ -0,0 +1,17 @@
1
+ export async function formatPrettierSource(code, language) {
2
+ let format;
3
+ try {
4
+ const formatter = await import('@webquark/browser/formatters/runtime');
5
+ format = await formatter.loadFormatter(language);
6
+ }
7
+ catch {
8
+ return { code, status: 'unavailable' };
9
+ }
10
+ try {
11
+ const formatted = await format(code);
12
+ return { code: formatted, status: formatted === code ? 'unchanged' : 'formatted' };
13
+ }
14
+ catch (error) {
15
+ return { code, status: error instanceof SyntaxError ? 'invalid' : 'failed' };
16
+ }
17
+ }
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it, vi } from "vitest";
2
2
  import { escapeHtml, highlight, tokenizeSyntax } from "./syntax";
3
- import { LANGUAGE_SOURCE, LITERAL_SOURCES, SYNTAX_LANGUAGES } from "../components/data-display/syntax-box/test/syntax-fixtures";
3
+ import { LANGUAGE_SOURCE, LITERAL_SOURCES, SYNTAX_LANGUAGES } from "../test/syntax-fixtures";
4
4
  describe('literal syntax helpers', () => {
5
5
  it('highlights HTML names, values and comments without scanning quoted markup as tags', () => {
6
6
  const source = '<x-card data-note = "<b>&lt; 雪" disabled><!-- <i key=\'x\'> -->🐦</x-card>';
@@ -0,0 +1,29 @@
1
+ // Stencil can load the box and its child views from independently bundled entry points.
2
+ const registryKey = Symbol.for('@webquark/browser:syntax-views:v1');
3
+ const runtime = globalThis;
4
+ export const { syntaxBoxes, syntaxScrollRestorers, syntaxVisibility } = runtime[registryKey] ??= {
5
+ syntaxBoxes: new WeakMap(),
6
+ syntaxScrollRestorers: new WeakMap(),
7
+ syntaxVisibility: new WeakMap(),
8
+ };
9
+ export function syntaxOwner(view) {
10
+ return syntaxBoxes.get(view) ?? (view.localName === 'q-syntax-view' && view.parentElement
11
+ ? syntaxBoxes.get(view.parentElement)
12
+ : undefined);
13
+ }
14
+ export function revealSyntaxEditor(editor) {
15
+ const ancestors = [];
16
+ for (let node = editor; node; node = node.parentElement) {
17
+ if (node === editor || node.localName === 'q-syntax-view')
18
+ ancestors.push(node);
19
+ }
20
+ for (const view of ancestors.reverse())
21
+ syntaxOwner(view)?.select(view);
22
+ }
23
+ export function ownContentNodes(host) {
24
+ return Array.from(host.childNodes).filter(node => node.nodeType === 3 ||
25
+ (node instanceof Element && !node.slot && node.localName !== 'q-syntax-view'));
26
+ }
27
+ export function hasSlottedSource(host) {
28
+ return ownContentNodes(host).some(node => node.nodeType === 1 || Boolean(node.textContent?.trim()));
29
+ }
@@ -0,0 +1,19 @@
1
+ import { expect, it, vi } from "vitest";
2
+ it('connects a box and its views across independently loaded modules', async () => {
3
+ const parentModule = await import('./views');
4
+ vi.resetModules();
5
+ const childModule = await import('./views');
6
+ expect(childModule.syntaxOwner).not.toBe(parentModule.syntaxOwner);
7
+ const box = document.createElement('q-syntax-box');
8
+ const view = document.createElement('q-syntax-view');
9
+ box.append(view);
10
+ const owner = { variant: 'panel', visible: () => true, select: vi.fn() };
11
+ parentModule.syntaxBoxes.set(box, owner);
12
+ expect(childModule.syntaxOwner(view)).toBe(owner);
13
+ const syncVisibility = vi.fn();
14
+ const restoreScroll = vi.fn();
15
+ childModule.syntaxVisibility.set(view, syncVisibility);
16
+ childModule.syntaxScrollRestorers.set(view, restoreScroll);
17
+ expect(parentModule.syntaxVisibility.get(view)).toBe(syncVisibility);
18
+ expect(parentModule.syntaxScrollRestorers.get(view)).toBe(restoreScroll);
19
+ });
@@ -20,44 +20,111 @@
20
20
 
21
21
  /* Panel Layout */
22
22
  .panel-container {
23
- position: relative;
24
23
  border-radius: var(--q-radius-lg, 12px);
25
24
  background: var(--q-syntax-bg);
26
25
  border: 1px solid var(--q-syntax-border);
27
26
  overflow: hidden;
28
27
  height: 100%;
29
- display: flex;
30
- flex-direction: column;
31
28
  box-sizing: border-box;
32
29
  }
33
30
 
34
31
  .panel-header {
35
- display: flex;
36
- justify-content: space-between;
32
+ display: grid;
33
+ grid-area: 1 / 1 / 2 / 3;
34
+ grid-template-columns: subgrid;
37
35
  align-items: center;
38
- gap: 16px;
39
- padding: var(--q-syntax-header-padding, 4px 16px);
40
36
  background: var(--q-syntax-header-bg);
41
37
  border-bottom: 1px solid var(--q-syntax-border);
42
38
  font-size: var(--q-syntax-header-font-size);
43
39
  color: var(--q-syntax-comment);
44
40
  box-sizing: border-box;
45
- flex-shrink: 0;
46
41
  }
47
42
 
48
- .panel-header > span {
49
- flex-shrink: 1;
43
+ .syntax-layout {
44
+ position: relative;
45
+ display: grid;
46
+ grid-template-columns: minmax(0, 1fr) auto;
47
+ grid-template-rows: auto auto;
48
+ min-width: 0;
49
+ }
50
+
51
+ .view-panel,
52
+ :host(.embedded-view) {
53
+ display: grid;
54
+ grid-area: 1 / 1 / 3 / 3;
55
+ grid-template-columns: subgrid;
56
+ grid-template-rows: subgrid;
50
57
  min-width: 0;
58
+ }
59
+
60
+ .view-panel[data-inactive],
61
+ .validation-anchor {
62
+ position: absolute;
51
63
  overflow: hidden;
52
- text-overflow: ellipsis;
53
- white-space: nowrap;
64
+ clip-path: inset(50%);
65
+ pointer-events: none;
66
+ }
67
+
68
+ /* Interactive native form validation can focus this anchor to reveal an inactive editor. */
69
+ .view-panel[data-inactive] {
70
+ inset-inline: 0;
71
+ inset-block-start: 0;
72
+ visibility: hidden;
73
+ }
74
+
75
+ .validation-anchor {
76
+ width: 1px;
77
+ height: 1px;
78
+ visibility: visible;
79
+ }
80
+
81
+ .panel-header > span,
82
+ .panel-header > q-tabs {
83
+ z-index: 1;
84
+ grid-column: 1;
85
+ min-width: 0;
86
+ margin: var(--q-syntax-header-padding, 4px 16px);
87
+ align-self: center;
88
+ }
89
+
90
+ .panel-header > q-tabs {
91
+ --q-tabs-border: 0;
92
+ --q-tabs-tab-max-width: 100%;
93
+ display: grid;
94
+ align-self: stretch;
95
+ margin-block: 0;
96
+ }
97
+
98
+ .panel-container > .panel-header > q-tabs {
99
+ /* Let the active underline paint over the header's one-pixel divider. */
100
+ margin-block-end: -1px;
54
101
  }
55
102
 
56
103
  .panel-actions {
57
104
  display: flex;
58
105
  align-items: center;
59
106
  gap: 8px;
60
- flex-shrink: 0;
107
+ z-index: 1;
108
+ grid-area: 1 / 2 / 2 / 3;
109
+ justify-self: end;
110
+ align-self: center;
111
+ padding: var(--q-syntax-header-padding, 4px 16px);
112
+ }
113
+
114
+ .view-content {
115
+ grid-area: 2 / 1 / 3 / 3;
116
+ min-width: 0;
117
+ }
118
+
119
+ .plain-container .panel-header {
120
+ border: 0;
121
+ background: transparent;
122
+ }
123
+
124
+ .panel-header > span {
125
+ overflow: hidden;
126
+ text-overflow: ellipsis;
127
+ white-space: nowrap;
61
128
  }
62
129
 
63
130
  /* Plain Layout */
@@ -75,19 +142,37 @@
75
142
  }
76
143
 
77
144
  /* Code Typography and Style */
78
- .code-body {
79
- margin: 0;
80
- padding: var(--q-syntax-padding, 16px);
81
- overflow-x: hidden;
82
- overflow-y: auto;
145
+ .code-body,
146
+ .slotted-body,
147
+ .editor-textarea {
148
+ padding: var(--q-syntax-padding, var(--q-padding-lg, 1rem));
83
149
  font-family: var(--q-syntax-font-mono);
84
150
  font-size: var(--q-syntax-code-font-size);
85
151
  line-height: 1.5;
152
+ }
153
+
154
+ .code-body,
155
+ .slotted-body {
86
156
  color: var(--q-syntax-text);
157
+ }
158
+
159
+ .slotted-body {
160
+ overflow-wrap: anywhere;
161
+ }
162
+
163
+ .code-body {
164
+ margin: 0;
165
+ overflow-x: hidden;
166
+ overflow-y: auto;
87
167
  white-space: pre-wrap;
88
168
  word-wrap: break-word;
89
169
  }
90
170
 
171
+ :host([role='log']),
172
+ :host(.q-syntax-log-content) {
173
+ --q-syntax-padding: var(--q-padding-md, .75rem) var(--q-padding-lg, 1rem);
174
+ }
175
+
91
176
  /* For plain variant custom classes if needed */
92
177
  :host(.variant-card-code) .code-body {
93
178
  padding: var(--q-syntax-compact-padding, 10px);
@@ -134,11 +219,7 @@
134
219
  width: 100%;
135
220
  height: 100%;
136
221
  margin: 0;
137
- padding: var(--q-syntax-padding, 16px);
138
222
  box-sizing: border-box;
139
- font-family: var(--q-syntax-font-mono);
140
- font-size: var(--q-syntax-code-font-size);
141
- line-height: 1.5;
142
223
  white-space: pre-wrap;
143
224
  word-wrap: break-word;
144
225
  overflow-x: hidden;
@@ -157,29 +238,20 @@
157
238
  color: transparent;
158
239
  }
159
240
 
241
+ .editor-textarea:focus-visible {
242
+ border-block-end: var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));
243
+ }
244
+
160
245
  .editor-area .code-body {
161
246
  position: relative;
162
247
  width: 100%;
163
248
  height: 100%;
164
249
  margin: 0;
165
- padding: var(--q-syntax-padding, 16px);
166
250
  box-sizing: border-box;
167
251
  overflow: hidden;
168
252
  pointer-events: none;
169
253
  }
170
254
 
171
- /* Panel focus and active state styling */
172
- .panel-container:focus-within {
173
- outline: var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));
174
- outline-offset: -1px;
175
- }
176
-
177
- /* Plain variant editor styles */
178
- :host([editable]) .plain-container:focus-within {
179
- outline: var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));
180
- border-radius: var(--q-radius-md, 8px);
181
- }
182
-
183
255
  /* Disabled State Visual Styling */
184
256
  :host([disabled]) {
185
257
  opacity: 0.6;
@@ -206,4 +278,3 @@
206
278
  white-space: nowrap;
207
279
  border: 0;
208
280
  }
209
-