@webquark/browser 1.1.0 → 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 (411) hide show
  1. package/dist/cjs/{action.props-B6vl_1p5.js → action.props-CNe2JXR5.js} +1 -1
  2. package/dist/cjs/{field-B5nxD8Kc.js → field-BRAR56Ex.js} +1 -1
  3. package/dist/cjs/{form-control-validity-D1ukC0_e.js → form-control-validity-BkilGb3E.js} +3 -3
  4. package/dist/cjs/{index-BD6Jjssb.js → index-BN-WdOQM.js} +13 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/q-accordion.cjs.entry.js +1 -1
  7. package/dist/cjs/q-alert.cjs.entry.js +2 -2
  8. package/dist/cjs/q-avatar.cjs.entry.js +2 -2
  9. package/dist/cjs/q-banner.cjs.entry.js +1 -1
  10. package/dist/cjs/q-button_3.cjs.entry.js +907 -0
  11. package/dist/cjs/q-card.cjs.entry.js +2 -2
  12. package/dist/cjs/q-carousel.cjs.entry.js +1 -1
  13. package/dist/cjs/q-chip.cjs.entry.js +2 -2
  14. package/dist/cjs/q-control-group.cjs.entry.js +3 -3
  15. package/dist/cjs/q-conversation-bubble.cjs.entry.js +1 -1
  16. package/dist/cjs/q-data-table.cjs.entry.js +1 -1
  17. package/dist/cjs/q-dialog.cjs.entry.js +3 -3
  18. package/dist/cjs/q-divider.cjs.entry.js +3 -3
  19. package/dist/cjs/q-dropdown.cjs.entry.js +4 -4
  20. package/dist/cjs/q-form.cjs.entry.js +6 -6
  21. package/dist/cjs/q-grid.cjs.entry.js +3 -3
  22. package/dist/cjs/q-icon.cjs.entry.js +1 -1
  23. package/dist/cjs/q-image-comparison.cjs.entry.js +2 -2
  24. package/dist/cjs/q-inline.cjs.entry.js +3 -3
  25. package/dist/cjs/q-input_2.cjs.entry.js +6 -6
  26. package/dist/cjs/q-link.cjs.entry.js +2 -2
  27. package/dist/cjs/q-map.cjs.entry.js +1 -1
  28. package/dist/cjs/q-media.cjs.entry.js +2 -2
  29. package/dist/cjs/q-navbar.cjs.entry.js +3 -3
  30. package/dist/cjs/q-pagination.cjs.entry.js +1 -1
  31. package/dist/cjs/q-panel.cjs.entry.js +6 -6
  32. package/dist/cjs/q-quantity-selector.cjs.entry.js +5 -5
  33. package/dist/cjs/q-radio-group.cjs.entry.js +4 -4
  34. package/dist/cjs/q-reel.cjs.entry.js +23 -23
  35. package/dist/cjs/q-section.cjs.entry.js +2 -2
  36. package/dist/cjs/q-sidepanel.cjs.entry.js +4 -3
  37. package/dist/cjs/q-slider.cjs.entry.js +2 -2
  38. package/dist/cjs/q-stack.cjs.entry.js +3 -3
  39. package/dist/cjs/q-step-diagram-item.cjs.entry.js +2 -2
  40. package/dist/cjs/q-step-diagram.cjs.entry.js +3 -3
  41. package/dist/cjs/q-syntax-box.cjs.entry.js +180 -719
  42. package/dist/cjs/q-syntax-view.cjs.entry.js +65 -0
  43. package/dist/cjs/q-tabs.cjs.entry.js +2 -2
  44. package/dist/cjs/q-textarea.cjs.entry.js +5 -5
  45. package/dist/cjs/q-thumbnail.cjs.entry.js +3 -3
  46. package/dist/cjs/q-toast.cjs.entry.js +1 -1
  47. package/dist/cjs/q-toggle.cjs.entry.js +6 -6
  48. package/dist/cjs/q-toolbar.cjs.entry.js +4 -4
  49. package/dist/cjs/syntax-content-BmSExDiW.js +910 -0
  50. package/dist/cjs/{tokens-Cd7g-VMz.js → tokens-BMrfol_M.js} +1 -1
  51. package/dist/cjs/webquark.cjs.js +2 -2
  52. package/dist/collection/collection-manifest.json +3 -1
  53. package/dist/collection/components/actions/button/button.css +27 -9
  54. package/dist/collection/components/communication/alert/alert.css +4 -1
  55. package/dist/collection/components/data-display/syntax-box/internals/formatters/css.js +4 -0
  56. package/dist/collection/components/data-display/syntax-box/internals/formatters/formatter.js +20 -0
  57. package/dist/collection/components/data-display/syntax-box/internals/{formatter.unit.test.js → formatters/formatter.unit.test.js} +38 -11
  58. package/dist/collection/components/data-display/syntax-box/internals/formatters/html.js +4 -0
  59. package/dist/collection/components/data-display/syntax-box/internals/formatters/javascript.js +4 -0
  60. package/dist/collection/components/data-display/syntax-box/internals/{formatter.js → formatters/json.js} +2 -20
  61. package/dist/collection/components/data-display/syntax-box/internals/formatters/languages.js +15 -0
  62. package/dist/collection/components/data-display/syntax-box/internals/formatters/util/prettier.js +17 -0
  63. package/dist/collection/components/data-display/syntax-box/internals/views.js +29 -0
  64. package/dist/collection/components/data-display/syntax-box/internals/views.unit.test.js +19 -0
  65. package/dist/collection/components/data-display/syntax-box/syntax-box.css +107 -36
  66. package/dist/collection/components/data-display/syntax-box/syntax-box.js +179 -637
  67. package/dist/collection/components/data-display/syntax-box/syntax-content.js +748 -0
  68. package/dist/collection/components/data-display/syntax-box/syntax-ui.js +8 -0
  69. package/dist/collection/components/data-display/syntax-box/test/format-fixtures.js +2 -2
  70. package/dist/collection/components/data-display/syntax-box/test/syntax-format.cmp.test.js +20 -20
  71. package/dist/collection/components/data-display/syntax-box/test/syntax-views.cmp.test.js +228 -0
  72. package/dist/collection/components/data-display/syntax-view/syntax-view.js +64 -0
  73. package/dist/collection/components/indicators/step-diagram/step-diagram.js +2 -2
  74. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +1 -1
  75. package/dist/collection/components/inputs/dropdown/dropdown.js +2 -2
  76. package/dist/collection/components/inputs/form/form.js +2 -2
  77. package/dist/collection/components/inputs/form/internals/controls.js +2 -2
  78. package/dist/collection/components/inputs/input/input.js +3 -3
  79. package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +4 -4
  80. package/dist/collection/components/inputs/radio-group/radio-group.js +2 -2
  81. package/dist/collection/components/inputs/slider/slider.js +1 -1
  82. package/dist/collection/components/inputs/textarea/textarea.js +2 -2
  83. package/dist/collection/components/inputs/toggle/toggle.js +3 -3
  84. package/dist/collection/components/layout/control-group/control-group.js +1 -1
  85. package/dist/collection/components/layout/divider/divider.js +1 -1
  86. package/dist/collection/components/layout/grid/grid.js +1 -1
  87. package/dist/collection/components/layout/inline/inline.js +1 -1
  88. package/dist/collection/components/layout/navbar/navbar.js +2 -2
  89. package/dist/collection/components/layout/panel/panel.js +4 -4
  90. package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
  91. package/dist/collection/components/layout/section/section.js +1 -1
  92. package/dist/collection/components/layout/sidepanel/internals/nav-items.js +2 -2
  93. package/dist/collection/components/layout/sidepanel/sidepanel.js +3 -0
  94. package/dist/collection/components/layout/stack/stack.js +1 -1
  95. package/dist/collection/components/layout/tabs/tabs.js +1 -1
  96. package/dist/collection/components/layout/toolbar/toolbar.js +2 -2
  97. package/dist/collection/components/media/avatar/avatar.js +1 -1
  98. package/dist/collection/components/media/image-comparison/image-comparison.js +1 -1
  99. package/dist/collection/components/media/media/media.js +1 -1
  100. package/dist/collection/components/media/reel/reel.js +23 -23
  101. package/dist/collection/components/media/reel/test/focus.cmp.test.js +33 -0
  102. package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
  103. package/dist/collection/components/overlays/dialog/dialog.js +2 -2
  104. package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
  105. package/dist/collection/theme/tokens.js +1 -1
  106. package/dist/collection/utils/form-control-validity.js +3 -3
  107. package/dist/components/index.js +1 -1
  108. package/dist/components/{p-CArIPzJU.js → p-B610wOGe.js} +1 -1
  109. package/dist/components/p-BGlbV43y.js +13 -0
  110. package/dist/components/{p-BZXIeEKC.js → p-BKWL9zOn.js} +1 -1
  111. package/dist/components/p-BxxU73QQ.js +1 -0
  112. package/dist/components/{p-kfrqZyfJ.js → p-CVEQfA-v.js} +1 -1
  113. package/dist/components/p-CpbWWDiY.js +1 -0
  114. package/dist/components/{p-BwPMm43W.js → p-D2fczi8m.js} +1 -1
  115. package/dist/components/{p-BGHNFaaC.js → p-D5vpGqZ9.js} +1 -1
  116. package/dist/components/p-DQIYo8zC.js +1 -0
  117. package/dist/components/{p-IwIJb0Mc.js → p-DX6PCIPS.js} +1 -1
  118. package/dist/components/{p-CpkX9YAW.js → p-DY9D4z7Z.js} +1 -1
  119. package/dist/{webquark/p-BDsIecIx.js → components/p-DbzjRzhu.js} +1 -1
  120. package/dist/components/{p-Bp6Xr92S.js → p-RX4DjgmV.js} +1 -1
  121. package/dist/components/{p-Bc2_QcLn.js → p-Ts5oOvg8.js} +1 -1
  122. package/dist/components/p-u1Qz6OcP.js +1 -0
  123. package/dist/components/q-accordion.js +1 -1
  124. package/dist/components/q-alert.js +1 -1
  125. package/dist/components/q-avatar.js +1 -1
  126. package/dist/components/q-banner.js +1 -1
  127. package/dist/components/q-button.js +1 -1
  128. package/dist/components/q-card.js +1 -1
  129. package/dist/components/q-carousel.js +1 -1
  130. package/dist/components/q-chip.js +1 -1
  131. package/dist/components/q-control-group.js +1 -1
  132. package/dist/components/q-conversation-bubble.js +1 -1
  133. package/dist/components/q-data-table.js +1 -1
  134. package/dist/components/q-dialog.js +1 -1
  135. package/dist/components/q-divider.js +1 -1
  136. package/dist/components/q-dropdown.js +1 -1
  137. package/dist/components/q-form.js +1 -1
  138. package/dist/components/q-grid.js +1 -1
  139. package/dist/components/q-icon.js +1 -1
  140. package/dist/components/q-image-comparison.js +1 -1
  141. package/dist/components/q-inline.js +1 -1
  142. package/dist/components/q-input.js +1 -1
  143. package/dist/components/q-link.js +1 -1
  144. package/dist/components/q-map.js +1 -1
  145. package/dist/components/q-media.js +1 -1
  146. package/dist/components/q-navbar.js +1 -1
  147. package/dist/components/q-pagination.js +1 -1
  148. package/dist/components/q-panel.js +1 -1
  149. package/dist/components/q-progress.js +1 -1
  150. package/dist/components/q-quantity-selector.js +1 -1
  151. package/dist/components/q-radio-group.js +1 -1
  152. package/dist/components/q-reel.js +1 -1
  153. package/dist/components/q-scrollable.js +1 -1
  154. package/dist/components/q-section.js +1 -1
  155. package/dist/components/q-sidepanel.js +2 -2
  156. package/dist/components/q-slider.js +1 -1
  157. package/dist/components/q-stack.js +1 -1
  158. package/dist/components/q-step-diagram-item.js +1 -1
  159. package/dist/components/q-step-diagram.js +1 -1
  160. package/dist/components/q-syntax-box.js +1 -13
  161. package/dist/components/q-syntax-view.d.ts +11 -0
  162. package/dist/components/q-syntax-view.js +1 -0
  163. package/dist/components/q-tabs.js +1 -1
  164. package/dist/components/q-textarea.js +1 -1
  165. package/dist/components/q-thumbnail.js +1 -1
  166. package/dist/components/q-toast.js +1 -1
  167. package/dist/components/q-toggle.js +1 -1
  168. package/dist/components/q-toolbar.js +1 -1
  169. package/dist/components/q-tooltip.js +1 -1
  170. package/dist/esm/{action.props-Di_LpF5H.js → action.props-CbSH7c-q.js} +1 -1
  171. package/dist/esm/{dom-CArIPzJU.js → dom-B610wOGe.js} +1 -1
  172. package/dist/esm/{field-C4Iilew6.js → field-D5xUxo11.js} +1 -1
  173. package/dist/esm/{form-control-validity-Bj2RJb2E.js → form-control-validity-BxxU73QQ.js} +3 -3
  174. package/dist/esm/{form-submit-action-CoEIvDqE.js → form-submit-action-BjjfVWyu.js} +1 -1
  175. package/dist/esm/{index-DoGM9gsC.js → index-CIMzZPQO.js} +13 -2
  176. package/dist/esm/loader.js +3 -3
  177. package/dist/esm/q-accordion.entry.js +1 -1
  178. package/dist/esm/q-alert.entry.js +2 -2
  179. package/dist/esm/q-avatar.entry.js +2 -2
  180. package/dist/esm/q-banner.entry.js +1 -1
  181. package/dist/esm/q-button_3.entry.js +903 -0
  182. package/dist/esm/q-card.entry.js +3 -3
  183. package/dist/esm/q-carousel.entry.js +2 -2
  184. package/dist/esm/q-chip.entry.js +2 -2
  185. package/dist/esm/q-control-group.entry.js +3 -3
  186. package/dist/esm/q-conversation-bubble.entry.js +1 -1
  187. package/dist/esm/q-data-table.entry.js +1 -1
  188. package/dist/esm/q-dialog.entry.js +4 -4
  189. package/dist/esm/q-divider.entry.js +3 -3
  190. package/dist/esm/q-dropdown.entry.js +4 -4
  191. package/dist/esm/q-form.entry.js +7 -7
  192. package/dist/esm/q-grid.entry.js +3 -3
  193. package/dist/esm/q-icon.entry.js +1 -1
  194. package/dist/esm/q-image-comparison.entry.js +2 -2
  195. package/dist/esm/q-inline.entry.js +3 -3
  196. package/dist/esm/q-input_2.entry.js +7 -7
  197. package/dist/esm/q-link.entry.js +2 -2
  198. package/dist/esm/q-map.entry.js +1 -1
  199. package/dist/esm/q-media.entry.js +2 -2
  200. package/dist/esm/q-navbar.entry.js +3 -3
  201. package/dist/esm/q-pagination.entry.js +1 -1
  202. package/dist/esm/q-panel.entry.js +7 -7
  203. package/dist/esm/q-quantity-selector.entry.js +5 -5
  204. package/dist/esm/q-radio-group.entry.js +4 -4
  205. package/dist/esm/q-reel.entry.js +24 -24
  206. package/dist/esm/q-section.entry.js +2 -2
  207. package/dist/esm/q-sidepanel.entry.js +5 -4
  208. package/dist/esm/q-slider.entry.js +2 -2
  209. package/dist/esm/q-stack.entry.js +3 -3
  210. package/dist/esm/q-step-diagram-item.entry.js +2 -2
  211. package/dist/esm/q-step-diagram.entry.js +4 -4
  212. package/dist/esm/q-syntax-box.entry.js +180 -719
  213. package/dist/esm/q-syntax-view.entry.js +63 -0
  214. package/dist/esm/q-tabs.entry.js +2 -2
  215. package/dist/esm/q-textarea.entry.js +5 -5
  216. package/dist/esm/q-thumbnail.entry.js +3 -3
  217. package/dist/esm/q-toast.entry.js +1 -1
  218. package/dist/esm/q-toggle.entry.js +6 -6
  219. package/dist/esm/q-toolbar.entry.js +4 -4
  220. package/dist/esm/syntax-content-Cr9kSbmA.js +903 -0
  221. package/dist/esm/{tokens-BDsIecIx.js → tokens-DbzjRzhu.js} +1 -1
  222. package/dist/esm/webquark.js +3 -3
  223. package/dist/formatters/prettier/LICENSE +7 -0
  224. package/dist/formatters/prettier/THIRD-PARTY-NOTICES.md +7941 -0
  225. package/dist/formatters/prettier/html-fragment.mjs +1 -0
  226. package/dist/formatters/prettier/html-fragment.mjs.gz +0 -0
  227. package/dist/formatters/prettier/languages/angular.mjs +1 -0
  228. package/dist/formatters/prettier/languages/angular.mjs.gz +0 -0
  229. package/dist/formatters/prettier/languages/css.mjs +1 -0
  230. package/dist/formatters/prettier/languages/css.mjs.gz +0 -0
  231. package/dist/formatters/prettier/languages/flow.mjs +1 -0
  232. package/dist/formatters/prettier/languages/flow.mjs.gz +0 -0
  233. package/dist/formatters/prettier/languages/graphql.mjs +1 -0
  234. package/dist/formatters/prettier/languages/graphql.mjs.gz +0 -0
  235. package/dist/formatters/prettier/languages/handlebars.mjs +1 -0
  236. package/dist/formatters/prettier/languages/handlebars.mjs.gz +0 -0
  237. package/dist/formatters/prettier/languages/html.mjs +1 -0
  238. package/dist/formatters/prettier/languages/html.mjs.gz +0 -0
  239. package/dist/formatters/prettier/languages/javascript.mjs +1 -0
  240. package/dist/formatters/prettier/languages/javascript.mjs.gz +0 -0
  241. package/dist/formatters/prettier/languages/json-stringify.mjs +1 -0
  242. package/dist/formatters/prettier/languages/json-stringify.mjs.gz +0 -0
  243. package/dist/formatters/prettier/languages/json.mjs +1 -0
  244. package/dist/formatters/prettier/languages/json.mjs.gz +0 -0
  245. package/dist/formatters/prettier/languages/json5.mjs +1 -0
  246. package/dist/formatters/prettier/languages/json5.mjs.gz +0 -0
  247. package/dist/formatters/prettier/languages/jsonc.mjs +1 -0
  248. package/dist/formatters/prettier/languages/jsonc.mjs.gz +0 -0
  249. package/dist/formatters/prettier/languages/jsx.mjs +1 -0
  250. package/dist/formatters/prettier/languages/jsx.mjs.gz +0 -0
  251. package/dist/formatters/prettier/languages/less.mjs +1 -0
  252. package/dist/formatters/prettier/languages/less.mjs.gz +0 -0
  253. package/dist/formatters/prettier/languages/lwc.mjs +1 -0
  254. package/dist/formatters/prettier/languages/lwc.mjs.gz +0 -0
  255. package/dist/formatters/prettier/languages/markdown.mjs +1 -0
  256. package/dist/formatters/prettier/languages/markdown.mjs.gz +0 -0
  257. package/dist/formatters/prettier/languages/mdx.mjs +1 -0
  258. package/dist/formatters/prettier/languages/mdx.mjs.gz +0 -0
  259. package/dist/formatters/prettier/languages/mjml.mjs +1 -0
  260. package/dist/formatters/prettier/languages/mjml.mjs.gz +0 -0
  261. package/dist/formatters/prettier/languages/postcss.mjs +1 -0
  262. package/dist/formatters/prettier/languages/postcss.mjs.gz +0 -0
  263. package/dist/formatters/prettier/languages/scss.mjs +1 -0
  264. package/dist/formatters/prettier/languages/scss.mjs.gz +0 -0
  265. package/dist/formatters/prettier/languages/tsx.mjs +1 -0
  266. package/dist/formatters/prettier/languages/tsx.mjs.gz +0 -0
  267. package/dist/formatters/prettier/languages/typescript.mjs +1 -0
  268. package/dist/formatters/prettier/languages/typescript.mjs.gz +0 -0
  269. package/dist/formatters/prettier/languages/vue.mjs +1 -0
  270. package/dist/formatters/prettier/languages/vue.mjs.gz +0 -0
  271. package/dist/formatters/prettier/languages/yaml.mjs +1 -0
  272. package/dist/formatters/prettier/languages/yaml.mjs.gz +0 -0
  273. package/dist/formatters/prettier/manifest.json +87 -0
  274. package/dist/formatters/prettier/plugins/acorn.mjs +17 -0
  275. package/dist/formatters/prettier/plugins/acorn.mjs.gz +0 -0
  276. package/dist/formatters/prettier/plugins/angular.mjs +7 -0
  277. package/dist/formatters/prettier/plugins/angular.mjs.gz +0 -0
  278. package/dist/formatters/prettier/plugins/babel.mjs +16 -0
  279. package/dist/formatters/prettier/plugins/babel.mjs.gz +0 -0
  280. package/dist/formatters/prettier/plugins/estree.mjs +44 -0
  281. package/dist/formatters/prettier/plugins/estree.mjs.gz +0 -0
  282. package/dist/formatters/prettier/plugins/flow.mjs +7 -0
  283. package/dist/formatters/prettier/plugins/flow.mjs.gz +0 -0
  284. package/dist/formatters/prettier/plugins/glimmer.mjs +37 -0
  285. package/dist/formatters/prettier/plugins/glimmer.mjs.gz +0 -0
  286. package/dist/formatters/prettier/plugins/graphql.mjs +17 -0
  287. package/dist/formatters/prettier/plugins/graphql.mjs.gz +0 -0
  288. package/dist/formatters/prettier/plugins/html.mjs +25 -0
  289. package/dist/formatters/prettier/plugins/html.mjs.gz +0 -0
  290. package/dist/formatters/prettier/plugins/markdown.mjs +70 -0
  291. package/dist/formatters/prettier/plugins/markdown.mjs.gz +0 -0
  292. package/dist/formatters/prettier/plugins/meriyah.mjs +9 -0
  293. package/dist/formatters/prettier/plugins/meriyah.mjs.gz +0 -0
  294. package/dist/formatters/prettier/plugins/postcss.mjs +62 -0
  295. package/dist/formatters/prettier/plugins/postcss.mjs.gz +0 -0
  296. package/dist/formatters/prettier/plugins/typescript.mjs +22 -0
  297. package/dist/formatters/prettier/plugins/typescript.mjs.gz +0 -0
  298. package/dist/formatters/prettier/plugins/yaml.mjs +150 -0
  299. package/dist/formatters/prettier/plugins/yaml.mjs.gz +0 -0
  300. package/dist/formatters/prettier/runtime.d.mts +2 -0
  301. package/dist/formatters/prettier/runtime.mjs +1 -0
  302. package/dist/formatters/prettier/runtime.mjs.gz +0 -0
  303. package/dist/formatters/prettier/standalone.mjs +29 -0
  304. package/dist/formatters/prettier/standalone.mjs.gz +0 -0
  305. package/dist/playground/components/theme-designer/token-row.js +45 -74
  306. package/dist/playground/utils/color.js +14 -25
  307. package/dist/types/components/data-display/syntax-box/internals/formatters/css.d.ts +1 -0
  308. package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.d.ts +10 -0
  309. package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.types.d.ts +4 -0
  310. package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.unit.test.d.ts +1 -0
  311. package/dist/types/components/data-display/syntax-box/internals/formatters/html.d.ts +1 -0
  312. package/dist/types/components/data-display/syntax-box/internals/formatters/javascript.d.ts +1 -0
  313. package/dist/types/components/data-display/syntax-box/internals/formatters/json.d.ts +6 -0
  314. package/dist/types/components/data-display/syntax-box/internals/formatters/languages.d.ts +27 -0
  315. package/dist/types/components/data-display/syntax-box/internals/formatters/util/prettier.d.ts +3 -0
  316. package/dist/types/components/data-display/syntax-box/internals/syntax.d.ts +1 -1
  317. package/dist/types/components/data-display/syntax-box/internals/views.d.ts +11 -0
  318. package/dist/types/components/data-display/syntax-box/internals/views.unit.test.d.ts +1 -0
  319. package/dist/types/components/data-display/syntax-box/syntax-box.d.ts +66 -63
  320. package/dist/types/components/data-display/syntax-box/syntax-box.types.d.ts +1 -1
  321. package/dist/types/components/data-display/syntax-box/syntax-content.d.ts +41 -0
  322. package/dist/types/components/data-display/syntax-box/syntax-ui.d.ts +15 -0
  323. package/dist/types/components/data-display/syntax-box/test/format-fixtures.d.ts +1 -1
  324. package/dist/types/components/data-display/syntax-box/test/syntax-views.cmp.test.d.ts +1 -0
  325. package/dist/types/components/data-display/syntax-view/syntax-view.d.ts +48 -0
  326. package/dist/types/components/layout/sidepanel/sidepanel.d.ts +2 -0
  327. package/dist/types/components/layout/sidepanel/sidepanel.types.d.ts +1 -0
  328. package/dist/types/components/media/reel/reel.d.ts +3 -3
  329. package/dist/types/components/media/reel/test/focus.cmp.test.d.ts +1 -0
  330. package/dist/types/components.d.ts +201 -7
  331. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/token-row.d.ts +1 -1
  332. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/dom-factory.d.ts +1 -0
  333. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/color.d.ts +2 -8
  334. package/dist/types/utils/form-control-validity.d.ts +2 -1
  335. package/dist/webquark/{p-846dc838.entry.js → p-014c2f4a.entry.js} +1 -1
  336. package/dist/webquark/{p-0182e114.entry.js → p-0389577c.entry.js} +1 -1
  337. package/dist/webquark/p-041e17c1.entry.js +1 -0
  338. package/dist/webquark/p-0479c571.entry.js +1 -0
  339. package/dist/webquark/{p-17b9713f.entry.js → p-0ebca9be.entry.js} +1 -1
  340. package/dist/webquark/{p-0a2c52de.entry.js → p-1bf375f7.entry.js} +2 -2
  341. package/dist/webquark/{p-e2721e77.entry.js → p-20dc3ab5.entry.js} +1 -1
  342. package/dist/webquark/p-28d3348f.entry.js +1 -0
  343. package/dist/webquark/p-35c177d3.entry.js +1 -0
  344. package/dist/webquark/{p-f4d23ffe.entry.js → p-3a60086d.entry.js} +1 -1
  345. package/dist/webquark/{p-e723a7ae.entry.js → p-3ab798aa.entry.js} +1 -1
  346. package/dist/webquark/{p-15bad9ef.entry.js → p-3b580baf.entry.js} +1 -1
  347. package/dist/webquark/{p-4609c362.entry.js → p-3b65f787.entry.js} +1 -1
  348. package/dist/webquark/p-4bf610f8.entry.js +1 -0
  349. package/dist/webquark/{p-f51e1098.entry.js → p-4d30227e.entry.js} +1 -1
  350. package/dist/webquark/p-4de536ae.entry.js +1 -0
  351. package/dist/webquark/{p-3daafc56.entry.js → p-4e4d70c9.entry.js} +1 -1
  352. package/dist/webquark/p-4efeb7c9.entry.js +1 -0
  353. package/dist/webquark/{p-a314bc21.entry.js → p-51b3d71b.entry.js} +1 -1
  354. package/dist/webquark/p-778b6bbb.entry.js +1 -0
  355. package/dist/webquark/{p-a66550da.entry.js → p-7da78b2f.entry.js} +1 -1
  356. package/dist/webquark/{p-fe14f038.entry.js → p-7f8f986b.entry.js} +1 -1
  357. package/dist/webquark/{p-e0943d41.entry.js → p-8253c742.entry.js} +1 -1
  358. package/dist/webquark/{p-a2334abe.entry.js → p-9a1ddeb7.entry.js} +1 -1
  359. package/dist/webquark/{p-CArIPzJU.js → p-B610wOGe.js} +1 -1
  360. package/dist/webquark/p-BxxU73QQ.js +1 -0
  361. package/dist/webquark/p-CIMzZPQO.js +3 -0
  362. package/dist/webquark/p-CfR85WgM.js +13 -0
  363. package/dist/webquark/{p-DDUED8LT.js → p-D8p28N9s.js} +1 -1
  364. package/dist/{components/p-BDsIecIx.js → webquark/p-DbzjRzhu.js} +1 -1
  365. package/dist/webquark/{p-BOdNg0jc.js → p-DeOEN0si.js} +1 -1
  366. package/dist/webquark/p-a2b1de23.entry.js +1 -0
  367. package/dist/webquark/{p-dbcf7592.entry.js → p-a55edc17.entry.js} +1 -1
  368. package/dist/webquark/p-a8808020.entry.js +1 -0
  369. package/dist/webquark/{p-9a76cd71.entry.js → p-b1084b3c.entry.js} +1 -1
  370. package/dist/webquark/{p-a2ff1b64.entry.js → p-b6c4dff4.entry.js} +1 -1
  371. package/dist/webquark/{p-b21ad707.entry.js → p-b962e950.entry.js} +1 -1
  372. package/dist/webquark/{p-5b584d3c.entry.js → p-bc369cd6.entry.js} +1 -1
  373. package/dist/webquark/p-c119a8ea.entry.js +1 -0
  374. package/dist/webquark/{p-85131314.entry.js → p-c6b77e9a.entry.js} +1 -1
  375. package/dist/webquark/{p-84b350a3.entry.js → p-ca1c03b4.entry.js} +1 -1
  376. package/dist/webquark/{p-b8fdef4f.entry.js → p-ce436162.entry.js} +1 -1
  377. package/dist/webquark/{p-86c05afd.entry.js → p-d0a47a7c.entry.js} +1 -1
  378. package/dist/webquark/{p-222405b8.entry.js → p-e1fbc8fc.entry.js} +1 -1
  379. package/dist/webquark/{p-44bbe12f.entry.js → p-e32833ce.entry.js} +1 -1
  380. package/dist/webquark/{p-d86bd51d.entry.js → p-e369a4aa.entry.js} +1 -1
  381. package/dist/webquark/p-e4430c61.entry.js +1 -0
  382. package/dist/webquark/{p-aa342e81.entry.js → p-e9c0052b.entry.js} +1 -1
  383. package/dist/webquark/{p-852e88ae.entry.js → p-f5c4ca18.entry.js} +1 -1
  384. package/dist/webquark/{p-d4788321.entry.js → p-f6683126.entry.js} +1 -1
  385. package/dist/webquark/{p-Dnz3WmdX.js → p-ojSDiptZ.js} +1 -1
  386. package/dist/webquark/webquark.css +1 -1
  387. package/dist/webquark/webquark.esm.js +1 -1
  388. package/package.json +5 -1
  389. package/dist/cjs/q-button_2.cjs.entry.js +0 -462
  390. package/dist/cjs/q-scrollable.cjs.entry.js +0 -449
  391. package/dist/components/p-Bj2RJb2E.js +0 -1
  392. package/dist/components/p-D2nxHd1b.js +0 -1
  393. package/dist/components/p-x3C-wjU9.js +0 -1
  394. package/dist/esm/q-button_2.entry.js +0 -459
  395. package/dist/esm/q-scrollable.entry.js +0 -447
  396. package/dist/types/components/data-display/syntax-box/internals/formatter.d.ts +0 -15
  397. package/dist/webquark/p-048103e0.entry.js +0 -1
  398. package/dist/webquark/p-0baf478a.entry.js +0 -1
  399. package/dist/webquark/p-2eaa3a9f.entry.js +0 -1
  400. package/dist/webquark/p-65fe9cac.entry.js +0 -1
  401. package/dist/webquark/p-8c5b2706.entry.js +0 -1
  402. package/dist/webquark/p-923527f0.entry.js +0 -1
  403. package/dist/webquark/p-Bj2RJb2E.js +0 -1
  404. package/dist/webquark/p-DoGM9gsC.js +0 -3
  405. package/dist/webquark/p-a0d97367.entry.js +0 -1
  406. package/dist/webquark/p-a16bd8d5.entry.js +0 -13
  407. package/dist/webquark/p-a3e1096d.entry.js +0 -1
  408. package/dist/webquark/p-b1c771fb.entry.js +0 -1
  409. package/dist/webquark/p-b45ca926.entry.js +0 -1
  410. package/dist/webquark/p-eb800d1e.entry.js +0 -1
  411. /package/dist/{types/components/data-display/syntax-box/internals/formatter.unit.test.d.ts → collection/components/data-display/syntax-box/internals/formatters/formatter.types.js} +0 -0
@@ -0,0 +1,748 @@
1
+ import { h } from "@stencil/core";
2
+ import { renderSyntaxActions, renderSyntaxScroller } from "./syntax-ui";
3
+ import { registerFormField } from "../../../utils/form-field-adapter";
4
+ import { isFieldDisabled, syncFieldHost } from "../../../utils/form-field-state";
5
+ import { syncNativeControlValidity } from "../../../utils/form-control-validity";
6
+ import { getSyntaxBoxCopyText, writeClipboardText } from "./internals/clipboard";
7
+ import { getSyntaxBoxEditorKeyAction } from "./internals/editor-key-action";
8
+ import { formatSource } from "./internals/formatters/formatter";
9
+ import { formatterLanguage, formatterLanguages } from "./internals/formatters/languages";
10
+ import { tokenizeSyntax } from "./internals/syntax";
11
+ import { normalizeSyntaxBoxValue, resolveInitialSyntaxBoxValue } from "./internals/value-sync";
12
+ import { ownContentNodes, revealSyntaxEditor, syntaxOwner, syntaxScrollRestorers, syntaxVisibility } from "./internals/views";
13
+ export const withSyntaxContent = (Base) => {
14
+ class SyntaxContent extends Base {
15
+ constructor() {
16
+ super();
17
+ }
18
+ /** Mirrored with `value`; prefer `code` for domain usage. */
19
+ code;
20
+ /** Form-value alias mirrored with `code` for compatibility. */
21
+ value;
22
+ /** Title in panel mode and tab label for a composed view. */
23
+ heading;
24
+ /** Accessible name for the editor; falls back to `heading`, then the language. */
25
+ ariaLabel = null;
26
+ variant = 'panel';
27
+ /** Explicit content height. Panel mode defaults to 110px; plain mode defaults to auto. */
28
+ height;
29
+ copyable = false;
30
+ editable = false;
31
+ /** Form field name used when the component is editable. */
32
+ name;
33
+ /** Marks the editable textarea as required for form validation. */
34
+ required = false;
35
+ /** Selects the formatter. HTML, JavaScript, CSS, and JSON also receive syntax highlighting. */
36
+ language = 'html';
37
+ /** Disables editing and panel actions. */
38
+ disabled = false;
39
+ /** Emitted when editable content is committed by the native change event or by formatting. */
40
+ qChange;
41
+ /** Emitted on each editable content input and after formatting. */
42
+ qInput;
43
+ // ======================== [2] INTERNAL STATE & REFS ========================
44
+ disabledState = false;
45
+ get isDisabled() {
46
+ return isFieldDisabled(this.el, this.disabled);
47
+ }
48
+ copied = false;
49
+ copyFailed = false;
50
+ formatMessage;
51
+ initialValue;
52
+ scrollPending = false;
53
+ copyRevision = 0;
54
+ formatRevision = 0;
55
+ copiedTimeoutId;
56
+ scrollableEl;
57
+ preEl;
58
+ contentEl;
59
+ actionsEl;
60
+ validationAnchor;
61
+ // ========================= [3] LIFECYCLE & WATCHERS =========================
62
+ watchCode(newCode) {
63
+ this.formatRevision++;
64
+ this.formatMessage = undefined;
65
+ const finalCode = normalizeSyntaxBoxValue(newCode, {
66
+ editable: this.editable,
67
+ });
68
+ if (finalCode !== newCode) {
69
+ this.code = finalCode;
70
+ }
71
+ if (this.value !== finalCode) {
72
+ this.value = finalCode;
73
+ }
74
+ this.syncFormValue(finalCode);
75
+ }
76
+ watchValue(newValue) {
77
+ this.formatRevision++;
78
+ this.formatMessage = undefined;
79
+ const finalVal = normalizeSyntaxBoxValue(newValue, {
80
+ editable: this.editable,
81
+ });
82
+ if (finalVal !== newValue) {
83
+ this.value = finalVal;
84
+ }
85
+ if (this.code !== finalVal) {
86
+ this.code = finalVal;
87
+ }
88
+ this.syncFormValue(finalVal);
89
+ }
90
+ watchLanguage() {
91
+ this.formatRevision++;
92
+ this.formatMessage = undefined;
93
+ }
94
+ watchConstraints() {
95
+ this.syncValidity();
96
+ }
97
+ watchEditable() {
98
+ this.formatRevision++;
99
+ if (this.editable)
100
+ this.watchCode(this.code);
101
+ this.syncFormValue(this.code);
102
+ }
103
+ componentWillLoad() {
104
+ const initial = resolveInitialSyntaxBoxValue({
105
+ code: this.code,
106
+ value: this.value,
107
+ editable: this.editable,
108
+ });
109
+ this.code = initial.code;
110
+ this.value = initial.value;
111
+ this.initialValue = initial.code;
112
+ this.syncFormValue(this.code);
113
+ }
114
+ formDisabledCallback() {
115
+ this.syncValidity();
116
+ }
117
+ componentDidLoad() {
118
+ syntaxScrollRestorers.set(this.el, () => this.resumeScroll());
119
+ syntaxVisibility.set(this.el, () => this.syncVisibility());
120
+ registerFormField(this.el, {
121
+ kind: 'text',
122
+ owner: () => this.internals?.form ?? null,
123
+ active: () => this.editable,
124
+ value: () => this.code ?? '',
125
+ assign: value => { this.value = value; },
126
+ reconcile: () => {
127
+ const textarea = this.el.shadowRoot?.querySelector('textarea');
128
+ if (textarea && textarea.value !== (this.code ?? ''))
129
+ textarea.value = this.code ?? '';
130
+ this.syncFormValue(this.code);
131
+ this.syncValidity();
132
+ },
133
+ reset: () => this.formResetCallback(),
134
+ validate: report => this.validate(report),
135
+ });
136
+ }
137
+ componentDidRender() {
138
+ this.syncVisibility();
139
+ this.syncLogSpacing();
140
+ }
141
+ syncLogSpacing = () => {
142
+ const slot = this.el.shadowRoot?.querySelector('.slotted-body > slot');
143
+ const hasLog = slot?.assignedElements().some(element => element.getAttribute('role') === 'log');
144
+ this.el.classList.toggle('q-syntax-log-content', Boolean(hasLog));
145
+ };
146
+ syncVisibility() {
147
+ const inactive = syntaxOwner(this.el)?.visible(this.el) === false;
148
+ if (inactive)
149
+ this.formatRevision++;
150
+ if (this.contentEl)
151
+ this.contentEl.inert = inactive;
152
+ if (this.actionsEl)
153
+ this.actionsEl.inert = inactive;
154
+ if (this.validationAnchor)
155
+ this.validationAnchor.hidden = !inactive;
156
+ this.syncValidity();
157
+ }
158
+ disconnectedCallback() {
159
+ this.formatRevision++;
160
+ this.copyRevision++;
161
+ this.clearCopiedTimeout();
162
+ }
163
+ formResetCallback() {
164
+ this.formatRevision++;
165
+ this.formatMessage = undefined;
166
+ this.code = this.initialValue;
167
+ this.value = this.initialValue;
168
+ this.syncFormValue(this.code);
169
+ this.syncValidity();
170
+ }
171
+ // ========================== [4] EXPOSED METHODS ==========================
172
+ /** Programmatically scrolls the read-only code body to the bottom when it is wrapped by q-scrollable. */
173
+ async scrollToBottom() {
174
+ const owner = syntaxOwner(this.el);
175
+ this.scrollPending = Boolean(owner && !owner.visible(this.el));
176
+ if (!this.scrollPending)
177
+ await this.scrollableEl?.scrollToBottom();
178
+ }
179
+ resumeScroll() {
180
+ if (this.scrollPending)
181
+ void this.scrollToBottom();
182
+ }
183
+ /** Returns whether editable content satisfies native constraints. */
184
+ async checkValidity() {
185
+ return this.validate(false);
186
+ }
187
+ /** Reports editable constraint violations and reveals the editor in its owning box. */
188
+ async reportValidity() {
189
+ return this.validate(true);
190
+ }
191
+ validate(report) {
192
+ this.syncValidity();
193
+ const textarea = this.el.shadowRoot?.querySelector('textarea');
194
+ if (report && this.editable && textarea?.validity.valid === false) {
195
+ revealSyntaxEditor(this.el);
196
+ textarea.focus({ preventScroll: true });
197
+ }
198
+ return report
199
+ ? this.internals?.reportValidity?.() ?? textarea?.reportValidity?.() ?? true
200
+ : this.internals?.checkValidity?.() ?? textarea?.checkValidity?.() ?? true;
201
+ }
202
+ // =================== [5] EVENT HANDLERS & INTERNAL METHODS ===================
203
+ syncFormValue(value) {
204
+ if (!this.internals || typeof this.internals.setFormValue !== 'function')
205
+ return;
206
+ this.internals.setFormValue(this.editable ? value || '' : null);
207
+ this.syncValidity();
208
+ }
209
+ syncValidity() {
210
+ const disabled = syncFieldHost(this.el, this.disabled, this.name, this.required);
211
+ if (this.disabledState !== disabled)
212
+ this.disabledState = disabled;
213
+ const textarea = this.el.shadowRoot?.querySelector('textarea');
214
+ if (textarea) {
215
+ textarea.disabled = disabled;
216
+ textarea.required = this.required;
217
+ textarea.readOnly = this.el.hasAttribute('readonly');
218
+ if (textarea.value !== (this.code ?? ''))
219
+ textarea.value = this.code ?? '';
220
+ }
221
+ this.internals?.setFormValue?.(this.editable && !disabled ? this.code ?? '' : null);
222
+ if (!this.internals || !textarea || !this.editable) {
223
+ if (typeof this.internals?.setValidity === 'function') {
224
+ this.internals.setValidity({});
225
+ }
226
+ return;
227
+ }
228
+ syncNativeControlValidity({
229
+ internals: this.internals,
230
+ control: textarea,
231
+ anchor: this.validationAnchor && !this.validationAnchor.hidden ? this.validationAnchor : textarea,
232
+ disabled: this.isDisabled,
233
+ });
234
+ }
235
+ clearCopiedTimeout() {
236
+ if (this.copiedTimeoutId !== undefined) {
237
+ clearTimeout(this.copiedTimeoutId);
238
+ this.copiedTimeoutId = undefined;
239
+ }
240
+ }
241
+ scheduleCopyStateReset() {
242
+ this.clearCopiedTimeout();
243
+ this.copiedTimeoutId = setTimeout(() => {
244
+ this.copied = false;
245
+ this.copyFailed = false;
246
+ this.copiedTimeoutId = undefined;
247
+ }, 1500);
248
+ }
249
+ copyCode = async () => {
250
+ if (this.isDisabled)
251
+ return;
252
+ const revision = ++this.copyRevision;
253
+ const fallback = ownContentNodes(this.el).map(node => node.textContent ?? '').join('');
254
+ const codeToCopy = getSyntaxBoxCopyText(this.code, fallback);
255
+ try {
256
+ await writeClipboardText(codeToCopy);
257
+ if (!this.el.isConnected || revision !== this.copyRevision)
258
+ return;
259
+ this.copied = true;
260
+ this.copyFailed = false;
261
+ }
262
+ catch {
263
+ if (!this.el.isConnected || revision !== this.copyRevision)
264
+ return;
265
+ this.copied = false;
266
+ this.copyFailed = true;
267
+ }
268
+ this.scheduleCopyStateReset();
269
+ };
270
+ handleScroll = (e) => {
271
+ const textarea = e.target;
272
+ if (this.preEl) {
273
+ this.preEl.scrollLeft = textarea.scrollLeft;
274
+ this.preEl.scrollTop = textarea.scrollTop;
275
+ }
276
+ };
277
+ handleInput = (ev) => {
278
+ const target = ev.target;
279
+ this.code = target.value;
280
+ this.value = target.value;
281
+ this.qInput.emit(this.code);
282
+ };
283
+ handleChange = (ev) => {
284
+ const target = ev.target;
285
+ this.code = target.value;
286
+ this.value = target.value;
287
+ this.qChange.emit(this.code);
288
+ };
289
+ handleKeyDown = (ev) => {
290
+ const textarea = ev.target;
291
+ const action = getSyntaxBoxEditorKeyAction(ev, textarea.value, textarea.selectionStart, textarea.selectionEnd);
292
+ if (action.type === 'none') {
293
+ return;
294
+ }
295
+ if (action.type === 'blur') {
296
+ textarea.blur();
297
+ return;
298
+ }
299
+ ev.preventDefault();
300
+ this.code = action.value;
301
+ this.value = action.value;
302
+ this.qInput.emit(this.code);
303
+ requestAnimationFrame(() => {
304
+ textarea.selectionStart = textarea.selectionEnd = action.caret;
305
+ });
306
+ };
307
+ handleFormat = async () => {
308
+ const language = formatterLanguage(this.language);
309
+ if (this.isDisabled || !this.editable || !language || !this.code)
310
+ return;
311
+ const revision = ++this.formatRevision;
312
+ const source = this.code;
313
+ const pending = formatSource(source, language);
314
+ const result = pending instanceof Promise ? await pending : pending;
315
+ if (revision !== this.formatRevision || this.code !== source || !this.el.isConnected || this.isDisabled)
316
+ return;
317
+ const label = formatterLanguages[language];
318
+ if (result.status === 'unavailable') {
319
+ this.formatMessage = `Could not load the ${label} formatter. Reload and try again.`;
320
+ return;
321
+ }
322
+ if (result.status === 'failed') {
323
+ this.formatMessage = `Could not format this ${label} source.`;
324
+ return;
325
+ }
326
+ this.code = result.code;
327
+ this.value = result.code;
328
+ this.formatMessage = result.status === 'invalid' ? `Invalid ${label}; source unchanged.`
329
+ : result.status === 'unsupported' ? `${label} formatting limit reached; source unchanged.` : undefined;
330
+ this.qInput.emit(result.code);
331
+ this.qChange.emit(result.code);
332
+ };
333
+ getCopyTooltipContent() {
334
+ if (this.copyFailed)
335
+ return 'Copy failed';
336
+ if (this.copied)
337
+ return 'Copied!';
338
+ return 'Copy';
339
+ }
340
+ // ===================== [6] RENDER (Visual Template Only) =====================
341
+ renderContent(variant) {
342
+ const resolvedHeight = this.height !== undefined ? this.height : variant === 'panel' ? '110px' : 'auto';
343
+ const isScrollable = resolvedHeight !== 'auto' && resolvedHeight !== '';
344
+ const formatFeedback = this.editable ? this.formatMessage : undefined;
345
+ const highlighted = tokenizeSyntax(this.code ?? '', this.language).map(token => token.className ? h("span", { class: token.className }, token.text) : token.text);
346
+ const content = this.editable || this.code !== undefined ? (this.editable ? (h("div", { class: "editor-area", style: { height: resolvedHeight } }, h("span", { id: "syntax-box-keyboard-help", class: "visually-hidden" }, "Press Escape to leave the code editor. Press Tab to insert two spaces."), h("textarea", { class: "editor-textarea", value: this.code ?? '', name: this.name, disabled: this.isDisabled, required: this.required, "aria-label": this.ariaLabel?.trim() || this.heading?.trim() || `${this.language.toUpperCase()} code editor`, "aria-describedby": "syntax-box-keyboard-help", onInput: this.handleInput, onChange: this.handleChange, onScroll: this.handleScroll, onKeyDown: this.handleKeyDown }), h("pre", { class: "code-body", ref: el => (this.preEl = el) }, h("code", null, highlighted)))) : (h("pre", { class: "code-body" }, h("code", null, highlighted)))) : (h("div", { class: "slotted-body" }, h("slot", { onSlotchange: this.syncLogSpacing })));
347
+ const bodyContent = isScrollable && !this.editable
348
+ ? renderSyntaxScroller(content, resolvedHeight, el => { this.scrollableEl = el; })
349
+ : content;
350
+ return [
351
+ this.editable && h("span", { class: "validation-anchor", tabindex: -1, ref: el => { this.validationAnchor = el; }, onFocus: () => {
352
+ revealSyntaxEditor(this.el);
353
+ this.el.shadowRoot?.querySelector('textarea')?.focus({ preventScroll: true });
354
+ } }),
355
+ h("div", { class: "view-content", ref: el => { this.contentEl = el; } }, variant === 'panel' && formatFeedback && h("div", { class: "format-feedback", role: "status" }, formatFeedback), bodyContent),
356
+ ];
357
+ }
358
+ renderActions() {
359
+ const language = formatterLanguage(this.language);
360
+ return renderSyntaxActions({
361
+ editable: this.editable,
362
+ copyable: this.copyable,
363
+ disabled: this.isDisabled,
364
+ formatLabel: language && `Format ${formatterLanguages[language]}`,
365
+ copied: this.copied,
366
+ copyFeedback: this.getCopyTooltipContent(),
367
+ onFormat: this.handleFormat,
368
+ onCopy: this.copyCode,
369
+ ref: el => { this.actionsEl = el; },
370
+ });
371
+ }
372
+ static get properties() {
373
+ return {
374
+ "code": {
375
+ "type": "string",
376
+ "mutable": true,
377
+ "complexType": {
378
+ "original": "string",
379
+ "resolved": "string",
380
+ "references": {}
381
+ },
382
+ "required": false,
383
+ "optional": true,
384
+ "docs": {
385
+ "tags": [],
386
+ "text": "Mirrored with `value`; prefer `code` for domain usage."
387
+ },
388
+ "getter": false,
389
+ "setter": false,
390
+ "reflect": false,
391
+ "attribute": "code"
392
+ },
393
+ "value": {
394
+ "type": "string",
395
+ "mutable": true,
396
+ "complexType": {
397
+ "original": "string",
398
+ "resolved": "string",
399
+ "references": {}
400
+ },
401
+ "required": false,
402
+ "optional": true,
403
+ "docs": {
404
+ "tags": [],
405
+ "text": "Form-value alias mirrored with `code` for compatibility."
406
+ },
407
+ "getter": false,
408
+ "setter": false,
409
+ "reflect": false,
410
+ "attribute": "value"
411
+ },
412
+ "heading": {
413
+ "type": "string",
414
+ "mutable": false,
415
+ "complexType": {
416
+ "original": "string",
417
+ "resolved": "string",
418
+ "references": {}
419
+ },
420
+ "required": false,
421
+ "optional": true,
422
+ "docs": {
423
+ "tags": [],
424
+ "text": "Title in panel mode and tab label for a composed view."
425
+ },
426
+ "getter": false,
427
+ "setter": false,
428
+ "reflect": true,
429
+ "attribute": "heading"
430
+ },
431
+ "ariaLabel": {
432
+ "type": "string",
433
+ "mutable": false,
434
+ "complexType": {
435
+ "original": "string | null",
436
+ "resolved": "string",
437
+ "references": {}
438
+ },
439
+ "required": false,
440
+ "optional": false,
441
+ "docs": {
442
+ "tags": [],
443
+ "text": "Accessible name for the editor; falls back to `heading`, then the language."
444
+ },
445
+ "getter": false,
446
+ "setter": false,
447
+ "reflect": false,
448
+ "attribute": "aria-label",
449
+ "defaultValue": "null"
450
+ },
451
+ "variant": {
452
+ "type": "string",
453
+ "mutable": false,
454
+ "complexType": {
455
+ "original": "QSyntaxBoxVariant",
456
+ "resolved": "\"panel\" | \"plain\"",
457
+ "references": {
458
+ "QSyntaxBoxVariant": {
459
+ "location": "import",
460
+ "path": "./syntax-box.types",
461
+ "id": "../../../src/browser/components/data-display/syntax-box/syntax-box.types.ts::QSyntaxBoxVariant",
462
+ "referenceLocation": "QSyntaxBoxVariant"
463
+ }
464
+ }
465
+ },
466
+ "required": false,
467
+ "optional": false,
468
+ "docs": {
469
+ "tags": [],
470
+ "text": ""
471
+ },
472
+ "getter": false,
473
+ "setter": false,
474
+ "reflect": false,
475
+ "attribute": "variant",
476
+ "defaultValue": "'panel'"
477
+ },
478
+ "height": {
479
+ "type": "string",
480
+ "mutable": false,
481
+ "complexType": {
482
+ "original": "string",
483
+ "resolved": "string",
484
+ "references": {}
485
+ },
486
+ "required": false,
487
+ "optional": true,
488
+ "docs": {
489
+ "tags": [],
490
+ "text": "Explicit content height. Panel mode defaults to 110px; plain mode defaults to auto."
491
+ },
492
+ "getter": false,
493
+ "setter": false,
494
+ "reflect": false,
495
+ "attribute": "height"
496
+ },
497
+ "copyable": {
498
+ "type": "boolean",
499
+ "mutable": false,
500
+ "complexType": {
501
+ "original": "boolean",
502
+ "resolved": "boolean",
503
+ "references": {}
504
+ },
505
+ "required": false,
506
+ "optional": false,
507
+ "docs": {
508
+ "tags": [],
509
+ "text": ""
510
+ },
511
+ "getter": false,
512
+ "setter": false,
513
+ "reflect": false,
514
+ "attribute": "copyable",
515
+ "defaultValue": "false"
516
+ },
517
+ "editable": {
518
+ "type": "boolean",
519
+ "mutable": false,
520
+ "complexType": {
521
+ "original": "boolean",
522
+ "resolved": "boolean",
523
+ "references": {}
524
+ },
525
+ "required": false,
526
+ "optional": false,
527
+ "docs": {
528
+ "tags": [],
529
+ "text": ""
530
+ },
531
+ "getter": false,
532
+ "setter": false,
533
+ "reflect": true,
534
+ "attribute": "editable",
535
+ "defaultValue": "false"
536
+ },
537
+ "name": {
538
+ "type": "string",
539
+ "mutable": false,
540
+ "complexType": {
541
+ "original": "string",
542
+ "resolved": "string",
543
+ "references": {}
544
+ },
545
+ "required": false,
546
+ "optional": true,
547
+ "docs": {
548
+ "tags": [],
549
+ "text": "Form field name used when the component is editable."
550
+ },
551
+ "getter": false,
552
+ "setter": false,
553
+ "reflect": true,
554
+ "attribute": "name"
555
+ },
556
+ "required": {
557
+ "type": "boolean",
558
+ "mutable": false,
559
+ "complexType": {
560
+ "original": "boolean",
561
+ "resolved": "boolean",
562
+ "references": {}
563
+ },
564
+ "required": false,
565
+ "optional": false,
566
+ "docs": {
567
+ "tags": [],
568
+ "text": "Marks the editable textarea as required for form validation."
569
+ },
570
+ "getter": false,
571
+ "setter": false,
572
+ "reflect": true,
573
+ "attribute": "required",
574
+ "defaultValue": "false"
575
+ },
576
+ "language": {
577
+ "type": "string",
578
+ "mutable": false,
579
+ "complexType": {
580
+ "original": "QSyntaxBoxLanguage",
581
+ "resolved": "\"angular\" | \"css\" | \"flow\" | \"graphql\" | \"handlebars\" | \"html\" | \"javascript\" | \"json\" | \"json-stringify\" | \"json5\" | \"jsonc\" | \"jsx\" | \"less\" | \"lwc\" | \"markdown\" | \"mdx\" | \"mjml\" | \"postcss\" | \"scss\" | \"tsx\" | \"typescript\" | \"vue\" | \"yaml\"",
582
+ "references": {
583
+ "QSyntaxBoxLanguage": {
584
+ "location": "import",
585
+ "path": "./syntax-box.types",
586
+ "id": "../../../src/browser/components/data-display/syntax-box/syntax-box.types.ts::FormatterLanguage",
587
+ "referenceLocation": "QSyntaxBoxLanguage"
588
+ }
589
+ }
590
+ },
591
+ "required": false,
592
+ "optional": false,
593
+ "docs": {
594
+ "tags": [],
595
+ "text": "Selects the formatter. HTML, JavaScript, CSS, and JSON also receive syntax highlighting."
596
+ },
597
+ "getter": false,
598
+ "setter": false,
599
+ "reflect": false,
600
+ "attribute": "language",
601
+ "defaultValue": "'html'"
602
+ },
603
+ "disabled": {
604
+ "type": "boolean",
605
+ "mutable": false,
606
+ "complexType": {
607
+ "original": "boolean",
608
+ "resolved": "boolean",
609
+ "references": {}
610
+ },
611
+ "required": false,
612
+ "optional": false,
613
+ "docs": {
614
+ "tags": [],
615
+ "text": "Disables editing and panel actions."
616
+ },
617
+ "getter": false,
618
+ "setter": false,
619
+ "reflect": true,
620
+ "attribute": "disabled",
621
+ "defaultValue": "false"
622
+ }
623
+ };
624
+ }
625
+ static get states() {
626
+ return {
627
+ "disabledState": {},
628
+ "copied": {},
629
+ "copyFailed": {},
630
+ "formatMessage": {}
631
+ };
632
+ }
633
+ static get events() {
634
+ return [{
635
+ "method": "qChange",
636
+ "name": "qChange",
637
+ "bubbles": true,
638
+ "cancelable": true,
639
+ "composed": true,
640
+ "docs": {
641
+ "tags": [],
642
+ "text": "Emitted when editable content is committed by the native change event or by formatting."
643
+ },
644
+ "complexType": {
645
+ "original": "string",
646
+ "resolved": "string",
647
+ "references": {}
648
+ }
649
+ }, {
650
+ "method": "qInput",
651
+ "name": "qInput",
652
+ "bubbles": true,
653
+ "cancelable": true,
654
+ "composed": true,
655
+ "docs": {
656
+ "tags": [],
657
+ "text": "Emitted on each editable content input and after formatting."
658
+ },
659
+ "complexType": {
660
+ "original": "string",
661
+ "resolved": "string",
662
+ "references": {}
663
+ }
664
+ }];
665
+ }
666
+ static get methods() {
667
+ return {
668
+ "scrollToBottom": {
669
+ "complexType": {
670
+ "signature": "() => Promise<void>",
671
+ "parameters": [],
672
+ "references": {
673
+ "Promise": {
674
+ "location": "global",
675
+ "id": "global::Promise"
676
+ }
677
+ },
678
+ "return": "Promise<void>"
679
+ },
680
+ "docs": {
681
+ "text": "Programmatically scrolls the read-only code body to the bottom when it is wrapped by q-scrollable.",
682
+ "tags": []
683
+ }
684
+ },
685
+ "checkValidity": {
686
+ "complexType": {
687
+ "signature": "() => Promise<boolean>",
688
+ "parameters": [],
689
+ "references": {
690
+ "Promise": {
691
+ "location": "global",
692
+ "id": "global::Promise"
693
+ }
694
+ },
695
+ "return": "Promise<boolean>"
696
+ },
697
+ "docs": {
698
+ "text": "Returns whether editable content satisfies native constraints.",
699
+ "tags": []
700
+ }
701
+ },
702
+ "reportValidity": {
703
+ "complexType": {
704
+ "signature": "() => Promise<boolean>",
705
+ "parameters": [],
706
+ "references": {
707
+ "Promise": {
708
+ "location": "global",
709
+ "id": "global::Promise"
710
+ }
711
+ },
712
+ "return": "Promise<boolean>"
713
+ },
714
+ "docs": {
715
+ "text": "Reports editable constraint violations and reveals the editor in its owning box.",
716
+ "tags": []
717
+ }
718
+ }
719
+ };
720
+ }
721
+ static get watchers() {
722
+ return [{
723
+ "propName": "code",
724
+ "methodName": "watchCode"
725
+ }, {
726
+ "propName": "value",
727
+ "methodName": "watchValue"
728
+ }, {
729
+ "propName": "language",
730
+ "methodName": "watchLanguage"
731
+ }, {
732
+ "propName": "disabled",
733
+ "methodName": "watchConstraints"
734
+ }, {
735
+ "propName": "required",
736
+ "methodName": "watchConstraints"
737
+ }, {
738
+ "propName": "name",
739
+ "methodName": "watchConstraints"
740
+ }, {
741
+ "propName": "editable",
742
+ "methodName": "watchEditable"
743
+ }];
744
+ }
745
+ }
746
+ // An exported anonymous mixin cannot include private fields in its emitted declaration.
747
+ return SyntaxContent;
748
+ };