@webquark/core 1.1.0-dev.1 → 1.1.0-dev.10

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 (877) hide show
  1. package/README.md +10 -104
  2. package/dist/browser/components/index.d.ts +1 -0
  3. package/dist/browser/components/index.js +1 -0
  4. package/dist/browser/components/q-accordion.d.ts +1 -0
  5. package/dist/browser/components/q-accordion.js +1 -0
  6. package/dist/browser/components/q-alert.d.ts +1 -0
  7. package/dist/browser/components/q-alert.js +1 -0
  8. package/dist/browser/components/q-avatar.d.ts +1 -0
  9. package/dist/browser/components/q-avatar.js +1 -0
  10. package/dist/browser/components/q-banner.d.ts +1 -0
  11. package/dist/browser/components/q-banner.js +1 -0
  12. package/dist/browser/components/q-button.d.ts +1 -0
  13. package/dist/browser/components/q-button.js +1 -0
  14. package/dist/browser/components/q-card.d.ts +1 -0
  15. package/dist/browser/components/q-card.js +1 -0
  16. package/dist/browser/components/q-carousel.d.ts +1 -0
  17. package/dist/browser/components/q-carousel.js +1 -0
  18. package/dist/browser/components/q-chip.d.ts +1 -0
  19. package/dist/browser/components/q-chip.js +1 -0
  20. package/dist/browser/components/q-conversation-bubble.d.ts +1 -0
  21. package/dist/browser/components/q-conversation-bubble.js +1 -0
  22. package/dist/browser/components/q-data-table.d.ts +1 -0
  23. package/dist/browser/components/q-data-table.js +1 -0
  24. package/dist/browser/components/q-dialog.d.ts +1 -0
  25. package/dist/browser/components/q-dialog.js +1 -0
  26. package/dist/browser/components/q-dropdown.d.ts +1 -0
  27. package/dist/browser/components/q-dropdown.js +1 -0
  28. package/dist/browser/components/q-form.d.ts +1 -0
  29. package/dist/browser/components/q-form.js +1 -0
  30. package/dist/browser/components/q-grid.d.ts +1 -0
  31. package/dist/browser/components/q-grid.js +1 -0
  32. package/dist/browser/components/q-icon.d.ts +1 -0
  33. package/dist/browser/components/q-icon.js +1 -0
  34. package/dist/browser/components/q-image-comparison.d.ts +1 -0
  35. package/dist/browser/components/q-image-comparison.js +1 -0
  36. package/dist/browser/components/q-inline.d.ts +1 -0
  37. package/dist/browser/components/q-inline.js +1 -0
  38. package/dist/browser/components/q-input.d.ts +1 -0
  39. package/dist/browser/components/q-input.js +1 -0
  40. package/dist/browser/components/q-link.d.ts +1 -0
  41. package/dist/browser/components/q-link.js +1 -0
  42. package/dist/browser/components/q-map.d.ts +1 -0
  43. package/dist/browser/components/q-map.js +1 -0
  44. package/dist/browser/components/q-media.d.ts +1 -0
  45. package/dist/browser/components/q-media.js +1 -0
  46. package/dist/browser/components/q-navbar.d.ts +1 -0
  47. package/dist/browser/components/q-navbar.js +1 -0
  48. package/dist/browser/components/q-pagination.d.ts +1 -0
  49. package/dist/browser/components/q-pagination.js +1 -0
  50. package/dist/browser/components/q-panel.d.ts +1 -0
  51. package/dist/browser/components/q-panel.js +1 -0
  52. package/dist/browser/components/q-progress.d.ts +1 -0
  53. package/dist/browser/components/q-progress.js +1 -0
  54. package/dist/browser/components/q-quantity-selector.d.ts +1 -0
  55. package/dist/browser/components/q-quantity-selector.js +1 -0
  56. package/dist/browser/components/q-radio-group.d.ts +1 -0
  57. package/dist/browser/components/q-radio-group.js +1 -0
  58. package/dist/browser/components/q-reel.d.ts +1 -0
  59. package/dist/browser/components/q-reel.js +1 -0
  60. package/dist/browser/components/q-scrollable.d.ts +1 -0
  61. package/dist/browser/components/q-scrollable.js +1 -0
  62. package/dist/browser/components/q-section.d.ts +1 -0
  63. package/dist/browser/components/q-section.js +1 -0
  64. package/dist/browser/components/q-sidepanel.d.ts +1 -0
  65. package/dist/browser/components/q-sidepanel.js +1 -0
  66. package/dist/browser/components/q-stack.d.ts +1 -0
  67. package/dist/browser/components/q-stack.js +1 -0
  68. package/dist/browser/components/q-step-diagram-item.d.ts +1 -0
  69. package/dist/browser/components/q-step-diagram-item.js +1 -0
  70. package/dist/browser/components/q-step-diagram.d.ts +1 -0
  71. package/dist/browser/components/q-step-diagram.js +1 -0
  72. package/dist/browser/components/q-syntax-box.d.ts +1 -0
  73. package/dist/browser/components/q-syntax-box.js +1 -0
  74. package/dist/browser/components/q-tabs.d.ts +1 -0
  75. package/dist/browser/components/q-tabs.js +1 -0
  76. package/dist/browser/components/q-textarea.d.ts +1 -0
  77. package/dist/browser/components/q-textarea.js +1 -0
  78. package/dist/browser/components/q-thumbnail.d.ts +1 -0
  79. package/dist/browser/components/q-thumbnail.js +1 -0
  80. package/dist/browser/components/q-toast.d.ts +1 -0
  81. package/dist/browser/components/q-toast.js +1 -0
  82. package/dist/browser/components/q-toggle.d.ts +1 -0
  83. package/dist/browser/components/q-toggle.js +1 -0
  84. package/dist/browser/components/q-toolbar.d.ts +1 -0
  85. package/dist/browser/components/q-toolbar.js +1 -0
  86. package/dist/browser/components/q-tooltip.d.ts +1 -0
  87. package/dist/browser/components/q-tooltip.js +1 -0
  88. package/dist/browser/index.cjs +1 -0
  89. package/dist/browser/index.d.ts +1 -0
  90. package/dist/browser/index.js +1 -0
  91. package/dist/browser/loader/index.cjs +1 -0
  92. package/dist/browser/loader/index.d.ts +1 -0
  93. package/dist/browser/loader/index.js +1 -0
  94. package/dist/browser/native-content.css +24 -0
  95. package/dist/browser/webquark.css +1 -0
  96. package/dist/playground/assets/comparison-after.svg +1 -0
  97. package/dist/playground/assets/comparison-before.svg +1 -0
  98. package/dist/playground/assets/icons/check-preview.png +0 -0
  99. package/dist/playground/assets/icons/spinner.svg +1 -1
  100. package/dist/playground/build/index.esm.js +1 -1
  101. package/dist/playground/build/p-023f8437.entry.js +1 -0
  102. package/dist/playground/build/{p-f51a7a3c.entry.js → p-030ecde3.entry.js} +1 -1
  103. package/dist/playground/build/p-04c8cb9e.entry.js +1 -0
  104. package/dist/playground/build/p-059daa8a.entry.js +1 -0
  105. package/dist/playground/build/p-09cca7b9.entry.js +1 -0
  106. package/dist/playground/build/p-0aa74ad6.entry.js +1 -0
  107. package/dist/playground/build/p-0ae43d6c.entry.js +1 -0
  108. package/dist/playground/build/p-0c3aac3f.entry.js +1 -0
  109. package/dist/playground/build/p-144ef339.entry.js +1 -0
  110. package/dist/playground/build/p-296fbdb1.entry.js +1 -0
  111. package/dist/playground/build/p-36118d90.entry.js +1 -0
  112. package/dist/playground/build/{p-33a45980.entry.js → p-3bc4629c.entry.js} +1 -1
  113. package/dist/{webquark/p-c2032ee1.entry.js → playground/build/p-48fb5228.entry.js} +1 -1
  114. package/dist/playground/build/p-4d61b70d.entry.js +1 -0
  115. package/dist/playground/build/p-5f232b44.entry.js +13 -0
  116. package/dist/playground/build/p-64096386.entry.js +1 -0
  117. package/dist/{webquark/p-6f1b98c2.entry.js → playground/build/p-6bfffa79.entry.js} +1 -1
  118. package/dist/playground/build/{p-cddadb39.entry.js → p-6e28cfe2.entry.js} +1 -1
  119. package/dist/playground/build/p-70d9ffde.entry.js +1 -0
  120. package/dist/playground/build/p-888e46a8.entry.js +1 -0
  121. package/dist/playground/build/p-8ece2c62.entry.js +1 -0
  122. package/dist/playground/build/p-90b0858c.entry.js +1 -0
  123. package/dist/playground/build/p-91fff6b6.entry.js +1 -0
  124. package/dist/playground/build/p-923dac41.entry.js +1 -0
  125. package/dist/playground/build/p-97a89cae.entry.js +1 -0
  126. package/dist/playground/build/{p-b8a75199.entry.js → p-99d785ca.entry.js} +1 -1
  127. package/dist/playground/build/p-9e78b796.entry.js +1 -0
  128. package/dist/{webquark/p-0aeed0be.entry.js → playground/build/p-9ff7e5a4.entry.js} +1 -1
  129. package/dist/playground/build/p-B4Mg1xEw.js +1 -0
  130. package/dist/playground/build/p-B5ElFlHv.js +3 -0
  131. package/dist/playground/build/p-BOdNg0jc.js +1 -0
  132. package/dist/playground/build/p-BcL0NVv0.js +1 -0
  133. package/dist/playground/build/p-CGml_DQ8.js +1 -0
  134. package/dist/playground/build/p-C_RztzNv.js +5 -0
  135. package/dist/playground/build/p-CoIMrUb3.js +1 -0
  136. package/dist/playground/build/p-CpI3m4_T.js +1 -0
  137. package/dist/playground/build/p-DKrPmn2y.js +13 -0
  138. package/dist/playground/build/{p-DD6AOr35.js → p-DWO-pleQ.js} +1 -1
  139. package/dist/playground/build/p-DYMWBqU1.js +5 -0
  140. package/dist/playground/build/p-Dhsn99q4.js +1 -0
  141. package/dist/playground/build/p-DstNl_WY.js +1 -0
  142. package/dist/{components/p-DH-PVHhr.js → playground/build/p-DuX-9GOi.js} +1 -1
  143. package/dist/playground/build/p-SzKf4WZF.js +1 -0
  144. package/dist/playground/build/p-c523ec6f.entry.js +1 -0
  145. package/dist/playground/build/p-c923c9c0.js +1 -0
  146. package/dist/playground/build/p-d0253d64.entry.js +1 -0
  147. package/dist/playground/build/p-d0fbd2b1.entry.js +1 -0
  148. package/dist/playground/build/p-dd115868.entry.js +1 -0
  149. package/dist/playground/build/p-e0bb74ae.css +1 -0
  150. package/dist/playground/build/{p-6deac326.entry.js → p-f1bac94c.entry.js} +1 -1
  151. package/dist/playground/build/p-f4f97e74.entry.js +1 -0
  152. package/dist/playground/build/p-f63b7214.entry.js +1 -0
  153. package/dist/{webquark/p-dda5be3e.entry.js → playground/build/p-f98f9439.entry.js} +1 -1
  154. package/dist/playground/build/{p-09e29cf9.entry.js → p-f9ad63ff.entry.js} +1 -1
  155. package/dist/playground/build/p-fe200f68.entry.js +1 -0
  156. package/dist/playground/build/p-fe8c634a.entry.js +13 -0
  157. package/dist/playground/build/p-fec6fe0a.entry.js +1 -0
  158. package/dist/playground/build/webquark.css +1 -1
  159. package/dist/playground/build/webquark.esm.js +1 -1
  160. package/dist/playground/index.html +1 -29
  161. package/dist/playground/native-content.css +24 -0
  162. package/dist/playground/playground/components.manifest.json +41 -35
  163. package/dist/playground/playground/specs/q-button.sandbox.json +3 -2
  164. package/dist/playground/playground/specs/q-card.sandbox.json +37 -3
  165. package/dist/playground/playground/specs/q-carousel.sandbox.json +15 -0
  166. package/dist/playground/playground/specs/q-data-table.sandbox.json +24 -0
  167. package/dist/playground/playground/specs/q-dialog.sandbox.json +16 -6
  168. package/dist/playground/playground/specs/q-dropdown.sandbox.json +12 -2
  169. package/dist/playground/playground/specs/q-form.sandbox.json +88 -10
  170. package/dist/playground/playground/specs/q-grid.sandbox.json +56 -0
  171. package/dist/playground/playground/specs/q-icon.sandbox.json +28 -12
  172. package/dist/playground/playground/specs/q-image-comparison.sandbox.json +24 -0
  173. package/dist/playground/playground/specs/q-inline.sandbox.json +60 -0
  174. package/dist/playground/playground/specs/q-input.sandbox.json +12 -2
  175. package/dist/playground/playground/specs/q-navbar.sandbox.json +11 -3
  176. package/dist/playground/playground/specs/q-panel.sandbox.json +138 -17
  177. package/dist/playground/playground/specs/q-quantity-selector.sandbox.json +13 -2
  178. package/dist/playground/playground/specs/q-radio-group.sandbox.json +46 -10
  179. package/dist/playground/playground/specs/q-sidepanel.sandbox.json +7 -7
  180. package/dist/playground/playground/specs/q-stack.sandbox.json +56 -0
  181. package/dist/playground/playground/specs/q-step-diagram.sandbox.json +5 -5
  182. package/dist/playground/playground/specs/q-syntax-box.sandbox.json +68 -24
  183. package/dist/playground/playground/specs/q-textarea.sandbox.json +20 -0
  184. package/dist/playground/playground/specs/q-toggle.sandbox.json +12 -2
  185. package/dist/playground/playground/specs/q-toolbar.sandbox.json +99 -14
  186. package/dist/playground/playground.js +1019 -39
  187. package/dist/playground/presets.html +47 -0
  188. package/dist/playground/views/tooling/sample-feed.json +13 -0
  189. package/dist/playground/views/tooling/sample-notes.md +14 -0
  190. package/dist/playground/views/tooling/tooling.html +69 -0
  191. package/dist/tooling/changelog/index.d.ts +1 -0
  192. package/dist/tooling/changelog/index.js +1 -0
  193. package/package.json +50 -87
  194. package/scripts/package.json +1 -0
  195. package/scripts/webquark-serve.js +3 -80
  196. package/scripts/wq-changelog.js +4 -0
  197. package/scripts/wq-switch/README.md +208 -0
  198. package/scripts/wq-switch/dist/index.js +2 -0
  199. package/scripts/wq-switch/dist/setup.js +2 -0
  200. package/dist/cjs/Leaflet.GoogleMutant-BCs2oiE0.js +0 -769
  201. package/dist/cjs/action.props-Bxf6g2CW.js +0 -35
  202. package/dist/cjs/collection-identity-CV5HLD9Z.js +0 -141
  203. package/dist/cjs/data-table-cell-BAv6IIYx.js +0 -46
  204. package/dist/cjs/dom-Dk77oFF6.js +0 -247
  205. package/dist/cjs/form-control-validity-D1ukC0_e.js +0 -49
  206. package/dist/cjs/index-D5SQkd__.js +0 -1792
  207. package/dist/cjs/index.cjs.js +0 -26
  208. package/dist/cjs/leaflet-maplibre-gl-RCEffFEM.js +0 -434
  209. package/dist/cjs/leaflet-src-B0ls4IKq.js +0 -14522
  210. package/dist/cjs/leaflet-src-BX4jwTf5.js +0 -33
  211. package/dist/cjs/loader.cjs.js +0 -12
  212. package/dist/cjs/map.types-DNrz8rJh.js +0 -24
  213. package/dist/cjs/q-alert.cjs.entry.js +0 -52
  214. package/dist/cjs/q-avatar.cjs.entry.js +0 -101
  215. package/dist/cjs/q-button_2.cjs.entry.js +0 -375
  216. package/dist/cjs/q-card.cjs.entry.js +0 -77
  217. package/dist/cjs/q-carousel.cjs.entry.js +0 -331
  218. package/dist/cjs/q-chip.cjs.entry.js +0 -124
  219. package/dist/cjs/q-conversation-bubble.cjs.entry.js +0 -70
  220. package/dist/cjs/q-data-table.cjs.entry.js +0 -548
  221. package/dist/cjs/q-dialog.cjs.entry.js +0 -257
  222. package/dist/cjs/q-dropdown.cjs.entry.js +0 -602
  223. package/dist/cjs/q-form.cjs.entry.js +0 -509
  224. package/dist/cjs/q-icon.cjs.entry.js +0 -316
  225. package/dist/cjs/q-input_2.cjs.entry.js +0 -363
  226. package/dist/cjs/q-link.cjs.entry.js +0 -80
  227. package/dist/cjs/q-map.cjs.entry.js +0 -3328
  228. package/dist/cjs/q-navbar.cjs.entry.js +0 -194
  229. package/dist/cjs/q-pagination.cjs.entry.js +0 -68
  230. package/dist/cjs/q-panel.cjs.entry.js +0 -67
  231. package/dist/cjs/q-quantity-selector.cjs.entry.js +0 -197
  232. package/dist/cjs/q-radio-group.cjs.entry.js +0 -217
  233. package/dist/cjs/q-reel.cjs.entry.js +0 -170
  234. package/dist/cjs/q-scrollable.cjs.entry.js +0 -449
  235. package/dist/cjs/q-sidepanel.cjs.entry.js +0 -481
  236. package/dist/cjs/q-step-diagram-item.cjs.entry.js +0 -42
  237. package/dist/cjs/q-step-diagram.cjs.entry.js +0 -46
  238. package/dist/cjs/q-syntax-box.cjs.entry.js +0 -610
  239. package/dist/cjs/q-tabs.cjs.entry.js +0 -155
  240. package/dist/cjs/q-textarea.cjs.entry.js +0 -196
  241. package/dist/cjs/q-thumbnail.cjs.entry.js +0 -51
  242. package/dist/cjs/q-toast.cjs.entry.js +0 -400
  243. package/dist/cjs/q-toggle.cjs.entry.js +0 -179
  244. package/dist/cjs/q-toolbar.cjs.entry.js +0 -29
  245. package/dist/cjs/toast-controller-CIXagxbV.js +0 -111
  246. package/dist/cjs/utils-DGQOjEwT.js +0 -33
  247. package/dist/cjs/webquark.cjs.js +0 -24
  248. package/dist/collection/assets/icons/braces.svg +0 -14
  249. package/dist/collection/assets/icons/check.svg +0 -1
  250. package/dist/collection/assets/icons/chevron-down.svg +0 -1
  251. package/dist/collection/assets/icons/chevron-left.svg +0 -1
  252. package/dist/collection/assets/icons/chevron-right.svg +0 -1
  253. package/dist/collection/assets/icons/chevron-up.svg +0 -1
  254. package/dist/collection/assets/icons/copy.svg +0 -4
  255. package/dist/collection/assets/icons/eye-off.svg +0 -1
  256. package/dist/collection/assets/icons/eye.svg +0 -1
  257. package/dist/collection/assets/icons/minus.svg +0 -1
  258. package/dist/collection/assets/icons/play.svg +0 -1
  259. package/dist/collection/assets/icons/plus.svg +0 -1
  260. package/dist/collection/assets/icons/search.svg +0 -1
  261. package/dist/collection/assets/icons/spinner.svg +0 -1
  262. package/dist/collection/assets/icons/trash-2.svg +0 -1
  263. package/dist/collection/assets/icons/x.svg +0 -1
  264. package/dist/collection/collection-manifest.json +0 -48
  265. package/dist/collection/components/actions/action.props.js +0 -130
  266. package/dist/collection/components/actions/button/button.css +0 -191
  267. package/dist/collection/components/actions/button/button.js +0 -512
  268. package/dist/collection/components/actions/button/button.types.js +0 -1
  269. package/dist/collection/components/actions/button/button.utils.js +0 -9
  270. package/dist/collection/components/actions/button/button.utils.unit.test.js +0 -44
  271. package/dist/collection/components/actions/chip/chip.css +0 -219
  272. package/dist/collection/components/actions/chip/chip.js +0 -381
  273. package/dist/collection/components/actions/chip/chip.types.js +0 -1
  274. package/dist/collection/components/actions/link/link.css +0 -102
  275. package/dist/collection/components/actions/link/link.js +0 -313
  276. package/dist/collection/components/actions/link/link.types.js +0 -1
  277. package/dist/collection/components/data-display/alert/alert.css +0 -118
  278. package/dist/collection/components/data-display/alert/alert.js +0 -208
  279. package/dist/collection/components/data-display/alert/alert.types.js +0 -1
  280. package/dist/collection/components/data-display/conversation-bubble/conversation-bubble.css +0 -154
  281. package/dist/collection/components/data-display/conversation-bubble/conversation-bubble.js +0 -207
  282. package/dist/collection/components/data-display/conversation-bubble/conversation-bubble.types.js +0 -1
  283. package/dist/collection/components/data-display/data-table/data-table-cell.js +0 -40
  284. package/dist/collection/components/data-display/data-table/data-table.css +0 -356
  285. package/dist/collection/components/data-display/data-table/data-table.js +0 -748
  286. package/dist/collection/components/data-display/data-table/data-table.types.js +0 -1
  287. package/dist/collection/components/data-display/data-table/internals/data-access.js +0 -43
  288. package/dist/collection/components/data-display/data-table/internals/render-row-actions.js +0 -22
  289. package/dist/collection/components/data-display/data-table/internals/render-sort-indicator.js +0 -4
  290. package/dist/collection/components/data-display/data-table/internals/render-table-body.js +0 -47
  291. package/dist/collection/components/data-display/data-table/internals/render-table-head.js +0 -42
  292. package/dist/collection/components/data-display/data-table/internals/render-toolbar.js +0 -6
  293. package/dist/collection/components/data-display/data-table/internals/row-events.js +0 -27
  294. package/dist/collection/components/data-display/data-table/internals/selection.js +0 -31
  295. package/dist/collection/components/data-display/data-table/internals/sort.js +0 -57
  296. package/dist/collection/components/data-display/data-table/internals/table-model.js +0 -84
  297. package/dist/collection/components/data-display/map/internals/base-layer.js +0 -140
  298. package/dist/collection/components/data-display/map/internals/bounds.js +0 -66
  299. package/dist/collection/components/data-display/map/internals/buffered-tile-layer.js +0 -128
  300. package/dist/collection/components/data-display/map/internals/cluster-collision.js +0 -73
  301. package/dist/collection/components/data-display/map/internals/google-maps.js +0 -117
  302. package/dist/collection/components/data-display/map/internals/google-mutant.js +0 -51
  303. package/dist/collection/components/data-display/map/internals/maplibre.js +0 -50
  304. package/dist/collection/components/data-display/map/internals/marker-cluster-index.js +0 -136
  305. package/dist/collection/components/data-display/map/internals/marker-controller.js +0 -403
  306. package/dist/collection/components/data-display/map/internals/marker-presentation.js +0 -217
  307. package/dist/collection/components/data-display/map/internals/marker-visibility.js +0 -158
  308. package/dist/collection/components/data-display/map/internals/markers.js +0 -176
  309. package/dist/collection/components/data-display/map/internals/tile-layer-readiness.js +0 -67
  310. package/dist/collection/components/data-display/map/internals/tile-preload-buffer.js +0 -8
  311. package/dist/collection/components/data-display/map/internals/vector-padding.js +0 -8
  312. package/dist/collection/components/data-display/map/map.css +0 -711
  313. package/dist/collection/components/data-display/map/map.js +0 -1514
  314. package/dist/collection/components/data-display/map/map.types.js +0 -12
  315. package/dist/collection/components/data-display/map/test/map.cmp.test.js +0 -748
  316. package/dist/collection/components/data-display/pagination/pagination.css +0 -81
  317. package/dist/collection/components/data-display/pagination/pagination.js +0 -240
  318. package/dist/collection/components/data-display/pagination/test/pagination.cmp.test.js +0 -57
  319. package/dist/collection/components/data-display/syntax-box/internals/clipboard.js +0 -9
  320. package/dist/collection/components/data-display/syntax-box/internals/editor-key-action.js +0 -14
  321. package/dist/collection/components/data-display/syntax-box/internals/value-sync.js +0 -27
  322. package/dist/collection/components/data-display/syntax-box/syntax-box.css +0 -202
  323. package/dist/collection/components/data-display/syntax-box/syntax-box.js +0 -622
  324. package/dist/collection/components/data-display/syntax-box/syntax-box.types.js +0 -1
  325. package/dist/collection/components/data-display/syntax-box/syntax-box.utils.js +0 -1
  326. package/dist/collection/components/indicators/progress/progress.css +0 -223
  327. package/dist/collection/components/indicators/progress/progress.js +0 -275
  328. package/dist/collection/components/indicators/progress/progress.types.js +0 -1
  329. package/dist/collection/components/indicators/step-diagram/step-diagram.css +0 -21
  330. package/dist/collection/components/indicators/step-diagram/step-diagram.js +0 -104
  331. package/dist/collection/components/indicators/step-diagram/step-diagram.types.js +0 -1
  332. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.css +0 -252
  333. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +0 -153
  334. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.types.js +0 -1
  335. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.utils.js +0 -3
  336. package/dist/collection/components/inputs/dropdown/dropdown.css +0 -344
  337. package/dist/collection/components/inputs/dropdown/dropdown.js +0 -986
  338. package/dist/collection/components/inputs/dropdown/dropdown.types.js +0 -1
  339. package/dist/collection/components/inputs/dropdown/internals/options.js +0 -30
  340. package/dist/collection/components/inputs/dropdown/internals/position.js +0 -35
  341. package/dist/collection/components/inputs/dropdown/test/dropdown.cmp.test.js +0 -62
  342. package/dist/collection/components/inputs/input/input.css +0 -264
  343. package/dist/collection/components/inputs/input/input.js +0 -768
  344. package/dist/collection/components/inputs/input/input.types.js +0 -1
  345. package/dist/collection/components/inputs/input/input.utils.js +0 -3
  346. package/dist/collection/components/inputs/quantity-selector/internals/number-value.js +0 -64
  347. package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +0 -131
  348. package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +0 -327
  349. package/dist/collection/components/inputs/quantity-selector/quantity-selector.types.js +0 -1
  350. package/dist/collection/components/inputs/radio-group/radio-group.css +0 -177
  351. package/dist/collection/components/inputs/radio-group/radio-group.js +0 -558
  352. package/dist/collection/components/inputs/radio-group/radio-group.types.js +0 -1
  353. package/dist/collection/components/inputs/radio-group/radio-group.utils.js +0 -18
  354. package/dist/collection/components/inputs/textarea/textarea.css +0 -88
  355. package/dist/collection/components/inputs/textarea/textarea.js +0 -605
  356. package/dist/collection/components/inputs/textarea/textarea.types.js +0 -1
  357. package/dist/collection/components/inputs/toggle/toggle.css +0 -220
  358. package/dist/collection/components/inputs/toggle/toggle.js +0 -497
  359. package/dist/collection/components/inputs/toggle/toggle.types.js +0 -1
  360. package/dist/collection/components/inputs/toggle/toggle.utils.js +0 -3
  361. package/dist/collection/components/layout/card/card.css +0 -93
  362. package/dist/collection/components/layout/card/card.js +0 -168
  363. package/dist/collection/components/layout/card/card.types.js +0 -1
  364. package/dist/collection/components/layout/card/card.utils.js +0 -15
  365. package/dist/collection/components/layout/carousel/carousel.css +0 -168
  366. package/dist/collection/components/layout/carousel/carousel.js +0 -465
  367. package/dist/collection/components/layout/carousel/carousel.types.js +0 -1
  368. package/dist/collection/components/layout/carousel/carousel.utils.js +0 -1
  369. package/dist/collection/components/layout/carousel/internals/metrics.js +0 -59
  370. package/dist/collection/components/layout/form/form.css +0 -49
  371. package/dist/collection/components/layout/form/form.js +0 -613
  372. package/dist/collection/components/layout/form/form.types.js +0 -1
  373. package/dist/collection/components/layout/form/internals/controls.js +0 -79
  374. package/dist/collection/components/layout/form/internals/enter-behavior.js +0 -36
  375. package/dist/collection/components/layout/form/internals/values.js +0 -176
  376. package/dist/collection/components/layout/form/test/form.cmp.test.js +0 -157
  377. package/dist/collection/components/layout/navbar/navbar.css +0 -465
  378. package/dist/collection/components/layout/navbar/navbar.js +0 -547
  379. package/dist/collection/components/layout/navbar/navbar.types.js +0 -1
  380. package/dist/collection/components/layout/navbar/navbar.utils.js +0 -13
  381. package/dist/collection/components/layout/navbar/test/navbar.cmp.test.js +0 -53
  382. package/dist/collection/components/layout/panel/panel.css +0 -113
  383. package/dist/collection/components/layout/panel/panel.js +0 -265
  384. package/dist/collection/components/layout/panel/panel.types.js +0 -1
  385. package/dist/collection/components/layout/scrollable/internals/metrics.js +0 -61
  386. package/dist/collection/components/layout/scrollable/internals/native-scrollbar.js +0 -41
  387. package/dist/collection/components/layout/scrollable/scrollable.css +0 -123
  388. package/dist/collection/components/layout/scrollable/scrollable.js +0 -565
  389. package/dist/collection/components/layout/scrollable/scrollable.types.js +0 -1
  390. package/dist/collection/components/layout/sidepanel/internals/drawer.js +0 -60
  391. package/dist/collection/components/layout/sidepanel/internals/groups.js +0 -56
  392. package/dist/collection/components/layout/sidepanel/internals/nav-items.js +0 -26
  393. package/dist/collection/components/layout/sidepanel/sidepanel.css +0 -881
  394. package/dist/collection/components/layout/sidepanel/sidepanel.js +0 -813
  395. package/dist/collection/components/layout/sidepanel/sidepanel.types.js +0 -1
  396. package/dist/collection/components/layout/sidepanel/sidepanel.utils.js +0 -17
  397. package/dist/collection/components/layout/tabs/tabs.css +0 -248
  398. package/dist/collection/components/layout/tabs/tabs.js +0 -322
  399. package/dist/collection/components/layout/tabs/tabs.types.js +0 -1
  400. package/dist/collection/components/layout/tabs/tabs.utils.js +0 -31
  401. package/dist/collection/components/layout/tabs/test/tabs.cmp.test.js +0 -165
  402. package/dist/collection/components/layout/toolbar/toolbar.css +0 -145
  403. package/dist/collection/components/layout/toolbar/toolbar.js +0 -173
  404. package/dist/collection/components/layout/toolbar/toolbar.types.js +0 -1
  405. package/dist/collection/components/media/avatar/avatar.css +0 -71
  406. package/dist/collection/components/media/avatar/avatar.js +0 -302
  407. package/dist/collection/components/media/avatar/avatar.types.js +0 -1
  408. package/dist/collection/components/media/icon/icon.css +0 -42
  409. package/dist/collection/components/media/icon/icon.js +0 -388
  410. package/dist/collection/components/media/icon/icon.types.js +0 -1
  411. package/dist/collection/components/media/icon/internals/constants.js +0 -3
  412. package/dist/collection/components/media/icon/internals/fetch-icon.js +0 -18
  413. package/dist/collection/components/media/icon/internals/sanitize-svg.js +0 -63
  414. package/dist/collection/components/media/icon/internals/size.js +0 -12
  415. package/dist/collection/components/media/icon/internals/url.js +0 -48
  416. package/dist/collection/components/media/reel/reel.css +0 -193
  417. package/dist/collection/components/media/reel/reel.js +0 -279
  418. package/dist/collection/components/media/reel/reel.types.js +0 -1
  419. package/dist/collection/components/media/thumbnail/thumbnail.css +0 -111
  420. package/dist/collection/components/media/thumbnail/thumbnail.js +0 -184
  421. package/dist/collection/components/media/thumbnail/thumbnail.types.js +0 -1
  422. package/dist/collection/components/overlays/dialog/dialog.css +0 -248
  423. package/dist/collection/components/overlays/dialog/dialog.js +0 -613
  424. package/dist/collection/components/overlays/dialog/dialog.types.js +0 -1
  425. package/dist/collection/components/overlays/dialog/internals/backdrop.js +0 -9
  426. package/dist/collection/components/overlays/dialog/internals/lifecycle.js +0 -53
  427. package/dist/collection/components/overlays/toast/internals/icons.js +0 -25
  428. package/dist/collection/components/overlays/toast/internals/queue.js +0 -64
  429. package/dist/collection/components/overlays/toast/internals/timers.js +0 -75
  430. package/dist/collection/components/overlays/toast/test/toast.cmp.test.js +0 -38
  431. package/dist/collection/components/overlays/toast/test/toast.unit.test.js +0 -104
  432. package/dist/collection/components/overlays/toast/toast-controller.js +0 -105
  433. package/dist/collection/components/overlays/toast/toast.css +0 -141
  434. package/dist/collection/components/overlays/toast/toast.js +0 -556
  435. package/dist/collection/components/overlays/toast/toast.types.js +0 -1
  436. package/dist/collection/components/overlays/tooltip/internals/aria.js +0 -27
  437. package/dist/collection/components/overlays/tooltip/internals/positioning.js +0 -69
  438. package/dist/collection/components/overlays/tooltip/internals/scroll-listeners.js +0 -18
  439. package/dist/collection/components/overlays/tooltip/tooltip.css +0 -65
  440. package/dist/collection/components/overlays/tooltip/tooltip.js +0 -190
  441. package/dist/collection/components/overlays/tooltip/tooltip.types.js +0 -1
  442. package/dist/collection/index.js +0 -14
  443. package/dist/collection/playground/components/playground-code-preview/playground-code-preview.js +0 -48
  444. package/dist/collection/playground/components/playground-event-log/playground-event-log.js +0 -63
  445. package/dist/collection/playground/components/playground-header/playground-header.js +0 -65
  446. package/dist/collection/playground/components/playground-sidebar/playground-sidebar.js +0 -110
  447. package/dist/collection/playground/components/properties-panel/properties-panel.js +0 -146
  448. package/dist/collection/playground/components/properties-panel/property-row.js +0 -31
  449. package/dist/collection/playground/components/properties-panel/slot-row.js +0 -27
  450. package/dist/collection/playground/components/sandbox-viewport/sandbox-panel.js +0 -338
  451. package/dist/collection/playground/components/sandbox-viewport/sandbox-viewport.js +0 -159
  452. package/dist/collection/playground/components/sandbox-viewport/variant-card.js +0 -86
  453. package/dist/collection/playground/components/sandbox-viewport/viewport-tabs.js +0 -39
  454. package/dist/collection/playground/components/theme-designer/theme-designer.js +0 -91
  455. package/dist/collection/playground/components/theme-designer/token-row.js +0 -70
  456. package/dist/collection/playground/components/theme-designer/token-section.js +0 -19
  457. package/dist/collection/playground/dom-factory.js +0 -76
  458. package/dist/collection/playground/events.js +0 -37
  459. package/dist/collection/playground/logo.svg +0 -8
  460. package/dist/collection/playground/playground.bundled.js +0 -2893
  461. package/dist/collection/playground/playground.js +0 -10
  462. package/dist/collection/playground/state.js +0 -158
  463. package/dist/collection/playground/utils/color.js +0 -26
  464. package/dist/collection/playground/utils/dom.js +0 -38
  465. package/dist/collection/playground/utils/index.js +0 -2
  466. package/dist/collection/playground/views/q-button-view/q-button-view.js +0 -6
  467. package/dist/collection/playground/views/q-input-view/q-input-view.js +0 -6
  468. package/dist/collection/utils/collection-identity.js +0 -136
  469. package/dist/collection/utils/collection-identity.unit.test.js +0 -107
  470. package/dist/collection/utils/dom.js +0 -236
  471. package/dist/collection/utils/form-control-validity.js +0 -44
  472. package/dist/collection/utils/formatter.js +0 -177
  473. package/dist/collection/utils/formatter.unit.test.js +0 -53
  474. package/dist/collection/utils/math.js +0 -19
  475. package/dist/collection/utils/syntax.js +0 -110
  476. package/dist/collection/utils/utils.js +0 -28
  477. package/dist/collection/utils/utils.unit.test.js +0 -16
  478. package/dist/components/index.d.ts +0 -35
  479. package/dist/components/index.js +0 -1
  480. package/dist/components/p-2bWqVyTo.js +0 -1
  481. package/dist/components/p-BEBDDqVT.js +0 -1
  482. package/dist/components/p-BIIQL66b.js +0 -1
  483. package/dist/components/p-BJiYCN3i.js +0 -1
  484. package/dist/components/p-BeeM-7Ku.js +0 -5
  485. package/dist/components/p-Bj2RJb2E.js +0 -1
  486. package/dist/components/p-ByfrUWx1.js +0 -1
  487. package/dist/components/p-CBVOdtO_.js +0 -1
  488. package/dist/components/p-CGZPmEUB.js +0 -1
  489. package/dist/components/p-CXcle-2Q.js +0 -1
  490. package/dist/components/p-Ccj0labf.js +0 -1
  491. package/dist/components/p-D-SCwJg6.js +0 -1
  492. package/dist/components/p-DCICQbw4.js +0 -1
  493. package/dist/components/p-DQhiqYeq.js +0 -1
  494. package/dist/components/p-Dd8ZWrLX.js +0 -1
  495. package/dist/components/p-DiOrwkX8.js +0 -1
  496. package/dist/components/p-DmqVhVoj.js +0 -1
  497. package/dist/components/p-WJHaLJS_.js +0 -1
  498. package/dist/components/p-xNd-aY2K.js +0 -1
  499. package/dist/components/q-alert.d.ts +0 -11
  500. package/dist/components/q-alert.js +0 -1
  501. package/dist/components/q-avatar.d.ts +0 -11
  502. package/dist/components/q-avatar.js +0 -1
  503. package/dist/components/q-button.d.ts +0 -11
  504. package/dist/components/q-button.js +0 -1
  505. package/dist/components/q-card.d.ts +0 -11
  506. package/dist/components/q-card.js +0 -1
  507. package/dist/components/q-carousel.d.ts +0 -11
  508. package/dist/components/q-carousel.js +0 -1
  509. package/dist/components/q-chip.d.ts +0 -11
  510. package/dist/components/q-chip.js +0 -1
  511. package/dist/components/q-conversation-bubble.d.ts +0 -11
  512. package/dist/components/q-conversation-bubble.js +0 -1
  513. package/dist/components/q-data-table.d.ts +0 -11
  514. package/dist/components/q-data-table.js +0 -1
  515. package/dist/components/q-dialog.d.ts +0 -11
  516. package/dist/components/q-dialog.js +0 -1
  517. package/dist/components/q-dropdown.d.ts +0 -11
  518. package/dist/components/q-dropdown.js +0 -1
  519. package/dist/components/q-form.d.ts +0 -11
  520. package/dist/components/q-form.js +0 -1
  521. package/dist/components/q-icon.d.ts +0 -11
  522. package/dist/components/q-icon.js +0 -1
  523. package/dist/components/q-input.d.ts +0 -11
  524. package/dist/components/q-input.js +0 -1
  525. package/dist/components/q-link.d.ts +0 -11
  526. package/dist/components/q-link.js +0 -1
  527. package/dist/components/q-map.d.ts +0 -11
  528. package/dist/components/q-map.js +0 -1
  529. package/dist/components/q-navbar.d.ts +0 -11
  530. package/dist/components/q-navbar.js +0 -1
  531. package/dist/components/q-pagination.d.ts +0 -11
  532. package/dist/components/q-pagination.js +0 -1
  533. package/dist/components/q-panel.d.ts +0 -11
  534. package/dist/components/q-panel.js +0 -1
  535. package/dist/components/q-progress.d.ts +0 -11
  536. package/dist/components/q-progress.js +0 -1
  537. package/dist/components/q-quantity-selector.d.ts +0 -11
  538. package/dist/components/q-quantity-selector.js +0 -1
  539. package/dist/components/q-radio-group.d.ts +0 -11
  540. package/dist/components/q-radio-group.js +0 -1
  541. package/dist/components/q-reel.d.ts +0 -11
  542. package/dist/components/q-reel.js +0 -1
  543. package/dist/components/q-scrollable.d.ts +0 -11
  544. package/dist/components/q-scrollable.js +0 -1
  545. package/dist/components/q-sidepanel.d.ts +0 -11
  546. package/dist/components/q-sidepanel.js +0 -1
  547. package/dist/components/q-step-diagram-item.d.ts +0 -11
  548. package/dist/components/q-step-diagram-item.js +0 -1
  549. package/dist/components/q-step-diagram.d.ts +0 -11
  550. package/dist/components/q-step-diagram.js +0 -1
  551. package/dist/components/q-syntax-box.d.ts +0 -11
  552. package/dist/components/q-syntax-box.js +0 -1
  553. package/dist/components/q-tabs.d.ts +0 -11
  554. package/dist/components/q-tabs.js +0 -1
  555. package/dist/components/q-textarea.d.ts +0 -11
  556. package/dist/components/q-textarea.js +0 -1
  557. package/dist/components/q-thumbnail.d.ts +0 -11
  558. package/dist/components/q-thumbnail.js +0 -1
  559. package/dist/components/q-toast.d.ts +0 -11
  560. package/dist/components/q-toast.js +0 -1
  561. package/dist/components/q-toggle.d.ts +0 -11
  562. package/dist/components/q-toggle.js +0 -1
  563. package/dist/components/q-toolbar.d.ts +0 -11
  564. package/dist/components/q-toolbar.js +0 -1
  565. package/dist/components/q-tooltip.d.ts +0 -11
  566. package/dist/components/q-tooltip.js +0 -1
  567. package/dist/esm/Leaflet.GoogleMutant-BlvymWLE.js +0 -767
  568. package/dist/esm/action.props-CzaBbbcQ.js +0 -32
  569. package/dist/esm/collection-identity-CGZPmEUB.js +0 -138
  570. package/dist/esm/data-table-cell-DmqVhVoj.js +0 -42
  571. package/dist/esm/dom-ByfrUWx1.js +0 -238
  572. package/dist/esm/form-control-validity-Bj2RJb2E.js +0 -46
  573. package/dist/esm/index-DOk7gYkf.js +0 -1781
  574. package/dist/esm/index.js +0 -5
  575. package/dist/esm/leaflet-maplibre-gl-Cgb-1z8Q.js +0 -432
  576. package/dist/esm/leaflet-src-BR13bdVA.js +0 -30
  577. package/dist/esm/leaflet-src-BeeM-7Ku.js +0 -14520
  578. package/dist/esm/loader.js +0 -10
  579. package/dist/esm/map.types-WJHaLJS_.js +0 -14
  580. package/dist/esm/q-alert.entry.js +0 -50
  581. package/dist/esm/q-avatar.entry.js +0 -99
  582. package/dist/esm/q-button_2.entry.js +0 -372
  583. package/dist/esm/q-card.entry.js +0 -75
  584. package/dist/esm/q-carousel.entry.js +0 -329
  585. package/dist/esm/q-chip.entry.js +0 -122
  586. package/dist/esm/q-conversation-bubble.entry.js +0 -68
  587. package/dist/esm/q-data-table.entry.js +0 -546
  588. package/dist/esm/q-dialog.entry.js +0 -255
  589. package/dist/esm/q-dropdown.entry.js +0 -600
  590. package/dist/esm/q-form.entry.js +0 -507
  591. package/dist/esm/q-icon.entry.js +0 -314
  592. package/dist/esm/q-input_2.entry.js +0 -360
  593. package/dist/esm/q-link.entry.js +0 -78
  594. package/dist/esm/q-map.entry.js +0 -3326
  595. package/dist/esm/q-navbar.entry.js +0 -192
  596. package/dist/esm/q-pagination.entry.js +0 -66
  597. package/dist/esm/q-panel.entry.js +0 -65
  598. package/dist/esm/q-quantity-selector.entry.js +0 -195
  599. package/dist/esm/q-radio-group.entry.js +0 -215
  600. package/dist/esm/q-reel.entry.js +0 -168
  601. package/dist/esm/q-scrollable.entry.js +0 -447
  602. package/dist/esm/q-sidepanel.entry.js +0 -479
  603. package/dist/esm/q-step-diagram-item.entry.js +0 -40
  604. package/dist/esm/q-step-diagram.entry.js +0 -44
  605. package/dist/esm/q-syntax-box.entry.js +0 -608
  606. package/dist/esm/q-tabs.entry.js +0 -153
  607. package/dist/esm/q-textarea.entry.js +0 -194
  608. package/dist/esm/q-thumbnail.entry.js +0 -49
  609. package/dist/esm/q-toast.entry.js +0 -398
  610. package/dist/esm/q-toggle.entry.js +0 -177
  611. package/dist/esm/q-toolbar.entry.js +0 -27
  612. package/dist/esm/toast-controller-BIIQL66b.js +0 -107
  613. package/dist/esm/utils-BJiYCN3i.js +0 -30
  614. package/dist/esm/webquark.js +0 -20
  615. package/dist/index.cjs.js +0 -1
  616. package/dist/index.js +0 -1
  617. package/dist/loader/cdn.js +0 -1
  618. package/dist/loader/index.cjs.js +0 -1
  619. package/dist/loader/index.d.ts +0 -24
  620. package/dist/loader/index.es2017.js +0 -1
  621. package/dist/loader/index.js +0 -2
  622. package/dist/playground/build/p-011bab4c.entry.js +0 -1
  623. package/dist/playground/build/p-0571c3ae.entry.js +0 -1
  624. package/dist/playground/build/p-0aeed0be.entry.js +0 -1
  625. package/dist/playground/build/p-13b7bd40.entry.js +0 -1
  626. package/dist/playground/build/p-1d1ec52e.entry.js +0 -1
  627. package/dist/playground/build/p-254555b1.entry.js +0 -1
  628. package/dist/playground/build/p-28cc0172.entry.js +0 -1
  629. package/dist/playground/build/p-2bWqVyTo.js +0 -1
  630. package/dist/playground/build/p-33cfbd33.entry.js +0 -1
  631. package/dist/playground/build/p-4557f558.entry.js +0 -1
  632. package/dist/playground/build/p-48a8413d.entry.js +0 -1
  633. package/dist/playground/build/p-4d5d0313.entry.js +0 -1
  634. package/dist/playground/build/p-56644a7b.entry.js +0 -1
  635. package/dist/playground/build/p-58724642.entry.js +0 -1
  636. package/dist/playground/build/p-590cde02.entry.js +0 -1
  637. package/dist/playground/build/p-6cf356da.entry.js +0 -1
  638. package/dist/playground/build/p-6f1b98c2.entry.js +0 -1
  639. package/dist/playground/build/p-711576c8.entry.js +0 -1
  640. package/dist/playground/build/p-93ffb8ab.entry.js +0 -1
  641. package/dist/playground/build/p-94413975.entry.js +0 -1
  642. package/dist/playground/build/p-9d14b8ec.entry.js +0 -1
  643. package/dist/playground/build/p-BEBDDqVT.js +0 -1
  644. package/dist/playground/build/p-BeeM-7Ku.js +0 -5
  645. package/dist/playground/build/p-DNFGt02p.js +0 -1
  646. package/dist/playground/build/p-DOk7gYkf.js +0 -2
  647. package/dist/playground/build/p-DmqVhVoj.js +0 -1
  648. package/dist/playground/build/p-WJHaLJS_.js +0 -1
  649. package/dist/playground/build/p-a054f314.entry.js +0 -1
  650. package/dist/playground/build/p-ad1c341c.entry.js +0 -1
  651. package/dist/playground/build/p-b8aa6763.entry.js +0 -1
  652. package/dist/playground/build/p-c2032ee1.entry.js +0 -1
  653. package/dist/playground/build/p-cfaffa33.entry.js +0 -1
  654. package/dist/playground/build/p-dda5be3e.entry.js +0 -1
  655. package/dist/types/components/actions/action.props.d.ts +0 -19
  656. package/dist/types/components/actions/button/button.d.ts +0 -61
  657. package/dist/types/components/actions/button/button.types.d.ts +0 -5
  658. package/dist/types/components/actions/button/button.utils.d.ts +0 -8
  659. package/dist/types/components/actions/button/button.utils.unit.test.d.ts +0 -1
  660. package/dist/types/components/actions/chip/chip.d.ts +0 -55
  661. package/dist/types/components/actions/chip/chip.types.d.ts +0 -13
  662. package/dist/types/components/actions/link/link.d.ts +0 -43
  663. package/dist/types/components/actions/link/link.types.d.ts +0 -3
  664. package/dist/types/components/data-display/alert/alert.d.ts +0 -32
  665. package/dist/types/components/data-display/alert/alert.types.d.ts +0 -2
  666. package/dist/types/components/data-display/conversation-bubble/conversation-bubble.d.ts +0 -38
  667. package/dist/types/components/data-display/conversation-bubble/conversation-bubble.types.d.ts +0 -1
  668. package/dist/types/components/data-display/data-table/data-table-cell.d.ts +0 -5
  669. package/dist/types/components/data-display/data-table/data-table.d.ts +0 -78
  670. package/dist/types/components/data-display/data-table/data-table.types.d.ts +0 -53
  671. package/dist/types/components/data-display/data-table/internals/data-access.d.ts +0 -9
  672. package/dist/types/components/data-display/data-table/internals/render-row-actions.d.ts +0 -9
  673. package/dist/types/components/data-display/data-table/internals/render-sort-indicator.d.ts +0 -5
  674. package/dist/types/components/data-display/data-table/internals/render-table-body.d.ts +0 -12
  675. package/dist/types/components/data-display/data-table/internals/render-table-head.d.ts +0 -8
  676. package/dist/types/components/data-display/data-table/internals/render-toolbar.d.ts +0 -9
  677. package/dist/types/components/data-display/data-table/internals/row-events.d.ts +0 -1
  678. package/dist/types/components/data-display/data-table/internals/selection.d.ts +0 -10
  679. package/dist/types/components/data-display/data-table/internals/sort.d.ts +0 -3
  680. package/dist/types/components/data-display/data-table/internals/table-model.d.ts +0 -52
  681. package/dist/types/components/data-display/map/internals/base-layer.d.ts +0 -63
  682. package/dist/types/components/data-display/map/internals/bounds.d.ts +0 -23
  683. package/dist/types/components/data-display/map/internals/buffered-tile-layer.d.ts +0 -10
  684. package/dist/types/components/data-display/map/internals/cluster-collision.d.ts +0 -15
  685. package/dist/types/components/data-display/map/internals/google-maps.d.ts +0 -9
  686. package/dist/types/components/data-display/map/internals/google-mutant-module.d.ts +0 -11
  687. package/dist/types/components/data-display/map/internals/google-mutant.d.ts +0 -18
  688. package/dist/types/components/data-display/map/internals/maplibre.d.ts +0 -14
  689. package/dist/types/components/data-display/map/internals/marker-cluster-index.d.ts +0 -36
  690. package/dist/types/components/data-display/map/internals/marker-controller.d.ts +0 -55
  691. package/dist/types/components/data-display/map/internals/marker-presentation.d.ts +0 -8
  692. package/dist/types/components/data-display/map/internals/marker-visibility.d.ts +0 -10
  693. package/dist/types/components/data-display/map/internals/markers.d.ts +0 -4
  694. package/dist/types/components/data-display/map/internals/tile-layer-readiness.d.ts +0 -11
  695. package/dist/types/components/data-display/map/internals/tile-preload-buffer.d.ts +0 -4
  696. package/dist/types/components/data-display/map/internals/vector-padding.d.ts +0 -4
  697. package/dist/types/components/data-display/map/map.d.ts +0 -171
  698. package/dist/types/components/data-display/map/map.types.d.ts +0 -122
  699. package/dist/types/components/data-display/map/test/map.cmp.test.d.ts +0 -1
  700. package/dist/types/components/data-display/pagination/pagination.d.ts +0 -33
  701. package/dist/types/components/data-display/pagination/test/pagination.cmp.test.d.ts +0 -2
  702. package/dist/types/components/data-display/syntax-box/internals/clipboard.d.ts +0 -2
  703. package/dist/types/components/data-display/syntax-box/internals/editor-key-action.d.ts +0 -12
  704. package/dist/types/components/data-display/syntax-box/internals/value-sync.d.ts +0 -18
  705. package/dist/types/components/data-display/syntax-box/syntax-box.d.ts +0 -66
  706. package/dist/types/components/data-display/syntax-box/syntax-box.types.d.ts +0 -2
  707. package/dist/types/components/data-display/syntax-box/syntax-box.utils.d.ts +0 -1
  708. package/dist/types/components/indicators/progress/progress.d.ts +0 -30
  709. package/dist/types/components/indicators/progress/progress.types.d.ts +0 -3
  710. package/dist/types/components/indicators/step-diagram/step-diagram.d.ts +0 -16
  711. package/dist/types/components/indicators/step-diagram/step-diagram.types.d.ts +0 -1
  712. package/dist/types/components/indicators/step-diagram-item/step-diagram-item.d.ts +0 -24
  713. package/dist/types/components/indicators/step-diagram-item/step-diagram-item.types.d.ts +0 -3
  714. package/dist/types/components/indicators/step-diagram-item/step-diagram-item.utils.d.ts +0 -1
  715. package/dist/types/components/inputs/dropdown/dropdown.d.ts +0 -90
  716. package/dist/types/components/inputs/dropdown/dropdown.types.d.ts +0 -8
  717. package/dist/types/components/inputs/dropdown/internals/options.d.ts +0 -6
  718. package/dist/types/components/inputs/dropdown/internals/position.d.ts +0 -26
  719. package/dist/types/components/inputs/dropdown/test/dropdown.cmp.test.d.ts +0 -1
  720. package/dist/types/components/inputs/input/input.d.ts +0 -77
  721. package/dist/types/components/inputs/input/input.types.d.ts +0 -2
  722. package/dist/types/components/inputs/input/input.utils.d.ts +0 -1
  723. package/dist/types/components/inputs/quantity-selector/internals/number-value.d.ts +0 -13
  724. package/dist/types/components/inputs/quantity-selector/quantity-selector.d.ts +0 -32
  725. package/dist/types/components/inputs/quantity-selector/quantity-selector.types.d.ts +0 -1
  726. package/dist/types/components/inputs/radio-group/radio-group.d.ts +0 -60
  727. package/dist/types/components/inputs/radio-group/radio-group.types.d.ts +0 -11
  728. package/dist/types/components/inputs/radio-group/radio-group.utils.d.ts +0 -2
  729. package/dist/types/components/inputs/textarea/textarea.d.ts +0 -59
  730. package/dist/types/components/inputs/textarea/textarea.types.d.ts +0 -1
  731. package/dist/types/components/inputs/toggle/toggle.d.ts +0 -56
  732. package/dist/types/components/inputs/toggle/toggle.types.d.ts +0 -2
  733. package/dist/types/components/inputs/toggle/toggle.utils.d.ts +0 -1
  734. package/dist/types/components/layout/card/card.d.ts +0 -24
  735. package/dist/types/components/layout/card/card.types.d.ts +0 -1
  736. package/dist/types/components/layout/card/card.utils.d.ts +0 -5
  737. package/dist/types/components/layout/carousel/carousel.d.ts +0 -56
  738. package/dist/types/components/layout/carousel/carousel.types.d.ts +0 -5
  739. package/dist/types/components/layout/carousel/carousel.utils.d.ts +0 -1
  740. package/dist/types/components/layout/carousel/internals/metrics.d.ts +0 -23
  741. package/dist/types/components/layout/form/form.d.ts +0 -69
  742. package/dist/types/components/layout/form/form.types.d.ts +0 -38
  743. package/dist/types/components/layout/form/internals/controls.d.ts +0 -5
  744. package/dist/types/components/layout/form/internals/enter-behavior.d.ts +0 -2
  745. package/dist/types/components/layout/form/internals/values.d.ts +0 -5
  746. package/dist/types/components/layout/form/test/form.cmp.test.d.ts +0 -4
  747. package/dist/types/components/layout/navbar/navbar.d.ts +0 -66
  748. package/dist/types/components/layout/navbar/navbar.types.d.ts +0 -31
  749. package/dist/types/components/layout/navbar/navbar.utils.d.ts +0 -2
  750. package/dist/types/components/layout/navbar/test/navbar.cmp.test.d.ts +0 -1
  751. package/dist/types/components/layout/panel/panel.d.ts +0 -33
  752. package/dist/types/components/layout/panel/panel.types.d.ts +0 -2
  753. package/dist/types/components/layout/scrollable/internals/metrics.d.ts +0 -26
  754. package/dist/types/components/layout/scrollable/internals/native-scrollbar.d.ts +0 -4
  755. package/dist/types/components/layout/scrollable/scrollable.d.ts +0 -67
  756. package/dist/types/components/layout/scrollable/scrollable.types.d.ts +0 -6
  757. package/dist/types/components/layout/sidepanel/internals/drawer.d.ts +0 -2
  758. package/dist/types/components/layout/sidepanel/internals/groups.d.ts +0 -7
  759. package/dist/types/components/layout/sidepanel/internals/nav-items.d.ts +0 -2
  760. package/dist/types/components/layout/sidepanel/sidepanel.d.ts +0 -92
  761. package/dist/types/components/layout/sidepanel/sidepanel.types.d.ts +0 -39
  762. package/dist/types/components/layout/sidepanel/sidepanel.utils.d.ts +0 -2
  763. package/dist/types/components/layout/tabs/tabs.d.ts +0 -29
  764. package/dist/types/components/layout/tabs/tabs.types.d.ts +0 -14
  765. package/dist/types/components/layout/tabs/tabs.utils.d.ts +0 -4
  766. package/dist/types/components/layout/tabs/test/tabs.cmp.test.d.ts +0 -1
  767. package/dist/types/components/layout/toolbar/toolbar.d.ts +0 -23
  768. package/dist/types/components/layout/toolbar/toolbar.types.d.ts +0 -1
  769. package/dist/types/components/media/avatar/avatar.d.ts +0 -37
  770. package/dist/types/components/media/avatar/avatar.types.d.ts +0 -2
  771. package/dist/types/components/media/icon/icon.d.ts +0 -41
  772. package/dist/types/components/media/icon/icon.types.d.ts +0 -5
  773. package/dist/types/components/media/icon/internals/constants.d.ts +0 -3
  774. package/dist/types/components/media/icon/internals/fetch-icon.d.ts +0 -1
  775. package/dist/types/components/media/icon/internals/sanitize-svg.d.ts +0 -2
  776. package/dist/types/components/media/icon/internals/size.d.ts +0 -2
  777. package/dist/types/components/media/icon/internals/url.d.ts +0 -11
  778. package/dist/types/components/media/reel/reel.d.ts +0 -34
  779. package/dist/types/components/media/reel/reel.types.d.ts +0 -3
  780. package/dist/types/components/media/thumbnail/thumbnail.d.ts +0 -21
  781. package/dist/types/components/media/thumbnail/thumbnail.types.d.ts +0 -7
  782. package/dist/types/components/overlays/dialog/dialog.d.ts +0 -71
  783. package/dist/types/components/overlays/dialog/dialog.types.d.ts +0 -1
  784. package/dist/types/components/overlays/dialog/internals/backdrop.d.ts +0 -2
  785. package/dist/types/components/overlays/dialog/internals/lifecycle.d.ts +0 -21
  786. package/dist/types/components/overlays/toast/internals/icons.d.ts +0 -2
  787. package/dist/types/components/overlays/toast/internals/queue.d.ts +0 -19
  788. package/dist/types/components/overlays/toast/internals/timers.d.ts +0 -12
  789. package/dist/types/components/overlays/toast/test/toast.cmp.test.d.ts +0 -2
  790. package/dist/types/components/overlays/toast/test/toast.unit.test.d.ts +0 -1
  791. package/dist/types/components/overlays/toast/toast-controller.d.ts +0 -9
  792. package/dist/types/components/overlays/toast/toast.d.ts +0 -44
  793. package/dist/types/components/overlays/toast/toast.types.d.ts +0 -30
  794. package/dist/types/components/overlays/tooltip/internals/aria.d.ts +0 -13
  795. package/dist/types/components/overlays/tooltip/internals/positioning.d.ts +0 -7
  796. package/dist/types/components/overlays/tooltip/internals/scroll-listeners.d.ts +0 -2
  797. package/dist/types/components/overlays/tooltip/tooltip.d.ts +0 -28
  798. package/dist/types/components/overlays/tooltip/tooltip.types.d.ts +0 -1
  799. package/dist/types/components.d.ts +0 -4783
  800. package/dist/types/declarations.d.ts +0 -14
  801. package/dist/types/index.d.ts +0 -21
  802. package/dist/types/playground/components/playground-code-preview/playground-code-preview.d.ts +0 -9
  803. package/dist/types/playground/components/playground-event-log/playground-event-log.d.ts +0 -11
  804. package/dist/types/playground/components/playground-header/playground-header.d.ts +0 -10
  805. package/dist/types/playground/components/playground-sidebar/playground-sidebar.d.ts +0 -13
  806. package/dist/types/playground/components/properties-panel/properties-panel.d.ts +0 -15
  807. package/dist/types/playground/components/properties-panel/property-row.d.ts +0 -6
  808. package/dist/types/playground/components/properties-panel/slot-row.d.ts +0 -7
  809. package/dist/types/playground/components/sandbox-viewport/sandbox-panel.d.ts +0 -15
  810. package/dist/types/playground/components/sandbox-viewport/sandbox-viewport.d.ts +0 -14
  811. package/dist/types/playground/components/sandbox-viewport/variant-card.d.ts +0 -7
  812. package/dist/types/playground/components/sandbox-viewport/viewport-tabs.d.ts +0 -5
  813. package/dist/types/playground/components/theme-designer/theme-designer.d.ts +0 -15
  814. package/dist/types/playground/components/theme-designer/token-row.d.ts +0 -13
  815. package/dist/types/playground/components/theme-designer/token-section.d.ts +0 -7
  816. package/dist/types/playground/dom-factory.d.ts +0 -12
  817. package/dist/types/playground/events.d.ts +0 -24
  818. package/dist/types/playground/playground.d.ts +0 -7
  819. package/dist/types/playground/state.d.ts +0 -44
  820. package/dist/types/playground/utils/color.d.ts +0 -8
  821. package/dist/types/playground/utils/dom.d.ts +0 -15
  822. package/dist/types/playground/utils/index.d.ts +0 -2
  823. package/dist/types/stencil-public-runtime.d.ts +0 -1861
  824. package/dist/types/utils/collection-identity.d.ts +0 -55
  825. package/dist/types/utils/collection-identity.unit.test.d.ts +0 -1
  826. package/dist/types/utils/dom.d.ts +0 -68
  827. package/dist/types/utils/form-control-validity.d.ts +0 -14
  828. package/dist/types/utils/formatter.d.ts +0 -24
  829. package/dist/types/utils/formatter.unit.test.d.ts +0 -1
  830. package/dist/types/utils/math.d.ts +0 -10
  831. package/dist/types/utils/syntax.d.ts +0 -9
  832. package/dist/types/utils/utils.d.ts +0 -11
  833. package/dist/types/utils/utils.unit.test.d.ts +0 -1
  834. package/dist/webquark/index.esm.js +0 -1
  835. package/dist/webquark/p-011bab4c.entry.js +0 -1
  836. package/dist/webquark/p-0571c3ae.entry.js +0 -1
  837. package/dist/webquark/p-09e29cf9.entry.js +0 -1
  838. package/dist/webquark/p-13b7bd40.entry.js +0 -1
  839. package/dist/webquark/p-1d1ec52e.entry.js +0 -1
  840. package/dist/webquark/p-254555b1.entry.js +0 -1
  841. package/dist/webquark/p-28cc0172.entry.js +0 -1
  842. package/dist/webquark/p-2bWqVyTo.js +0 -1
  843. package/dist/webquark/p-33a45980.entry.js +0 -1
  844. package/dist/webquark/p-33cfbd33.entry.js +0 -1
  845. package/dist/webquark/p-4557f558.entry.js +0 -1
  846. package/dist/webquark/p-48a8413d.entry.js +0 -1
  847. package/dist/webquark/p-4d5d0313.entry.js +0 -1
  848. package/dist/webquark/p-56644a7b.entry.js +0 -1
  849. package/dist/webquark/p-58724642.entry.js +0 -1
  850. package/dist/webquark/p-590cde02.entry.js +0 -1
  851. package/dist/webquark/p-6cf356da.entry.js +0 -1
  852. package/dist/webquark/p-6deac326.entry.js +0 -1
  853. package/dist/webquark/p-711576c8.entry.js +0 -1
  854. package/dist/webquark/p-93ffb8ab.entry.js +0 -1
  855. package/dist/webquark/p-94413975.entry.js +0 -1
  856. package/dist/webquark/p-9d14b8ec.entry.js +0 -1
  857. package/dist/webquark/p-BEBDDqVT.js +0 -1
  858. package/dist/webquark/p-BIIQL66b.js +0 -1
  859. package/dist/webquark/p-BJiYCN3i.js +0 -1
  860. package/dist/webquark/p-BeeM-7Ku.js +0 -5
  861. package/dist/webquark/p-Bj2RJb2E.js +0 -1
  862. package/dist/webquark/p-ByfrUWx1.js +0 -1
  863. package/dist/webquark/p-CGZPmEUB.js +0 -1
  864. package/dist/webquark/p-DD6AOr35.js +0 -1
  865. package/dist/webquark/p-DNFGt02p.js +0 -1
  866. package/dist/webquark/p-DOk7gYkf.js +0 -2
  867. package/dist/webquark/p-DmqVhVoj.js +0 -1
  868. package/dist/webquark/p-WJHaLJS_.js +0 -1
  869. package/dist/webquark/p-a054f314.entry.js +0 -1
  870. package/dist/webquark/p-ad1c341c.entry.js +0 -1
  871. package/dist/webquark/p-b8a75199.entry.js +0 -1
  872. package/dist/webquark/p-b8aa6763.entry.js +0 -1
  873. package/dist/webquark/p-cddadb39.entry.js +0 -1
  874. package/dist/webquark/p-cfaffa33.entry.js +0 -1
  875. package/dist/webquark/p-f51a7a3c.entry.js +0 -1
  876. package/dist/webquark/webquark.css +0 -1
  877. package/dist/webquark/webquark.esm.js +0 -1
@@ -1,2893 +0,0 @@
1
- // src/playground/state.ts
2
- var activeEffect = null;
3
- var registeredEffects = new Set;
4
- function signal(initialValue) {
5
- let value = initialValue;
6
- const subscribers = new Set;
7
- const getter = () => {
8
- if (activeEffect) {
9
- subscribers.add(activeEffect);
10
- }
11
- return value;
12
- };
13
- getter.set = (newValue) => {
14
- if (value !== newValue) {
15
- value = newValue;
16
- [...subscribers].filter((fn) => registeredEffects.has(fn)).forEach((run) => run());
17
- }
18
- };
19
- getter.update = (fn) => {
20
- getter.set(fn(value));
21
- };
22
- return getter;
23
- }
24
- function effect(fn) {
25
- const run = () => {
26
- activeEffect = run;
27
- try {
28
- fn();
29
- } finally {
30
- activeEffect = null;
31
- }
32
- };
33
- registeredEffects.add(run);
34
- run();
35
- return () => registeredEffects.delete(run);
36
- }
37
- function computed(fn) {
38
- const derived = signal();
39
- effect(() => {
40
- derived.set(fn());
41
- });
42
- return derived;
43
- }
44
- var SPEC_BASE_URL = "/playground/specs";
45
- var activeComponent = signal("q-button");
46
- var activeTab = signal("sandbox");
47
- var theme = signal(document.documentElement.getAttribute("data-theme") || "dark");
48
- var componentRegistry = signal({});
49
- var activeSpec = computed(() => {
50
- const registry = componentRegistry();
51
- const active = activeComponent();
52
- return registry[active] || null;
53
- });
54
- async function fetchComponentSpec(tag) {
55
- const registry = { ...componentRegistry() };
56
- if (registry[tag])
57
- return;
58
- try {
59
- const res = await fetch(`${SPEC_BASE_URL}/${tag}.sandbox.json`);
60
- if (!res.ok)
61
- throw new Error(`HTTP ${res.status}`);
62
- const spec = await res.json();
63
- if (spec.props) {
64
- Object.keys(spec.props).forEach((p) => {
65
- if (spec.props) {
66
- spec.props[p].currentValue = spec.props[p].default;
67
- }
68
- });
69
- }
70
- if (spec.slots) {
71
- Object.keys(spec.slots).forEach((s) => {
72
- if (spec.slots) {
73
- spec.slots[s].currentValue = spec.slots[s].default || "";
74
- }
75
- });
76
- }
77
- registry[tag] = spec;
78
- componentRegistry.set(registry);
79
- } catch (err) {
80
- console.error(`Failed to fetch spec for ${tag}:`, err);
81
- }
82
- }
83
- function updateKnobValue(type, name, value) {
84
- const registry = { ...componentRegistry() };
85
- const spec = registry[activeComponent()];
86
- if (!spec)
87
- return;
88
- if (type === "prop" && spec.props) {
89
- spec.props[name].currentValue = value;
90
- } else if (type === "slot" && spec.slots) {
91
- spec.slots[name].currentValue = value;
92
- }
93
- componentRegistry.set(registry);
94
- }
95
- function serializeComponentCode(tag, props, slots, appendScript = null) {
96
- let code = `<${tag}`;
97
- if (props) {
98
- Object.keys(props).forEach((k) => {
99
- const p = props[k];
100
- const val = p && typeof p === "object" && "currentValue" in p ? p.currentValue : p;
101
- if (val === true) {
102
- code += ` ${k}`;
103
- } else if (val !== undefined && val !== null && val !== "") {
104
- code += ` ${k}="${val}"`;
105
- }
106
- });
107
- }
108
- code += ">";
109
- let slotContent = "";
110
- if (slots) {
111
- if (typeof slots === "string") {
112
- if (slots) {
113
- slotContent += `
114
- ${slots.replace(/\n/g, `
115
- `)}
116
- `;
117
- }
118
- } else {
119
- Object.keys(slots).forEach((slotName) => {
120
- const s = slots[slotName];
121
- const val = s && typeof s === "object" && "currentValue" in s ? s.currentValue : s;
122
- if (val) {
123
- if (slotName === "default") {
124
- slotContent += `
125
- ${val.replace(/\n/g, `
126
- `)}
127
- `;
128
- } else {
129
- if (typeof val === "string" && val.includes(`slot="${slotName}"`)) {
130
- slotContent += `
131
- ${val.replace(/\n/g, `
132
- `)}
133
- `;
134
- } else {
135
- slotContent += `
136
- <span slot="${slotName}">${val.replace(/\n/g, `
137
- `)}</span>
138
- `;
139
- }
140
- }
141
- }
142
- });
143
- }
144
- }
145
- if (slotContent) {
146
- code += slotContent + `</${tag}>`;
147
- } else {
148
- code += `</${tag}>`;
149
- }
150
- if (appendScript) {
151
- code += appendScript;
152
- }
153
- return code;
154
- }
155
-
156
- // src/playground/dom-factory.ts
157
- function h(tag, attrs, ...children) {
158
- if (typeof tag === "function") {
159
- return tag(attrs || {});
160
- }
161
- const el = document.createElement(tag);
162
- if (attrs) {
163
- Object.keys(attrs).forEach((key) => {
164
- const val = attrs[key];
165
- if (val === undefined || val === null || val === false) {
166
- return;
167
- }
168
- if (key.startsWith("on") && typeof val === "function") {
169
- const rawEventName = key.slice(2);
170
- const nativeEvents = ["click", "input", "change", "focus", "blur", "keydown", "keyup", "keypress", "submit", "scroll"];
171
- const lowerEvent = rawEventName.toLowerCase();
172
- const eventName = nativeEvents.includes(lowerEvent) ? lowerEvent : rawEventName.charAt(0).toLowerCase() + rawEventName.slice(1);
173
- el.addEventListener(eventName, val);
174
- } else if (key === "className" || key === "class") {
175
- if (typeof val === "object") {
176
- const classes = Object.keys(val).filter((k) => !!val[k]).join(" ");
177
- el.setAttribute("class", classes);
178
- } else {
179
- el.setAttribute("class", String(val));
180
- }
181
- } else if (key.startsWith("data-")) {
182
- el.setAttribute(key, String(val));
183
- } else if (key in el && key !== "style") {
184
- try {
185
- el[key] = val;
186
- } catch {
187
- el.setAttribute(key, String(val));
188
- }
189
- } else {
190
- el.setAttribute(key, String(val));
191
- }
192
- });
193
- }
194
- const appendChildren = (childList) => {
195
- childList.forEach((child) => {
196
- if (child === undefined || child === null || child === false) {
197
- return;
198
- }
199
- if (Array.isArray(child)) {
200
- appendChildren(child);
201
- } else if (child instanceof Node) {
202
- el.appendChild(child);
203
- } else {
204
- el.appendChild(document.createTextNode(String(child)));
205
- }
206
- });
207
- };
208
- appendChildren(children);
209
- return el;
210
- }
211
-
212
- // src/playground/components/playground-header/playground-header.css
213
- var playground_header_default = `.app-header {
214
- display: flex;
215
- align-items: center;
216
- justify-content: space-between;
217
- padding: 8px 16px;
218
- min-height: 56px;
219
- background: var(--q-bg-surface-2);
220
- border-bottom: var(--q-border);
221
- flex-shrink: 0;
222
- box-sizing: border-box;
223
- gap: 16px;
224
- }
225
-
226
- .header-logo {
227
- display: flex;
228
- align-items: center;
229
- gap: 12px;
230
- flex-shrink: 0;
231
- }
232
-
233
- .logo-image {
234
- height: 28px;
235
- width: auto;
236
- display: block;
237
- }
238
-
239
- .logo-text {
240
- font-size: 1.15rem;
241
- font-weight: 700;
242
- background: linear-gradient(135deg, var(--q-fg-base) 30%, var(--q-fg-muted) 100%);
243
- -webkit-background-clip: text;
244
- -webkit-text-fill-color: transparent;
245
- }
246
-
247
- .header-actions {
248
- display: flex;
249
- align-items: center;
250
- gap: 20px;
251
- flex-shrink: 0;
252
- }
253
-
254
- .action-btn {
255
- background: var(--q-bg-surface-2);
256
- border: var(--q-border);
257
- color: var(--q-fg-base);
258
- padding: 6px 12px;
259
- border-radius: var(--q-radius-md);
260
- font-size: 0.85rem;
261
- font-weight: 500;
262
- cursor: pointer;
263
- transition:
264
- background-color 0.2s,
265
- color 0.2s,
266
- border-color 0.2s;
267
- }
268
-
269
- .action-btn:hover {
270
- background: var(--q-color-primary);
271
- color: var(--q-bg-base);
272
- border-color: var(--q-color-primary);
273
- }
274
-
275
- /* Hamburger Menu Toggle styles */
276
- .hamburger-menu {
277
- display: none;
278
- background: transparent;
279
- border: none;
280
- cursor: pointer;
281
- padding: 8px;
282
- flex-direction: column;
283
- gap: 5px;
284
- z-index: 1001;
285
- justify-content: center;
286
- align-items: center;
287
- height: 40px;
288
- width: 40px;
289
- border-radius: var(--q-radius-md);
290
- margin-right: 8px;
291
- }
292
-
293
- .hamburger-menu:hover {
294
- background: var(--q-btn-hover-overlay);
295
- }
296
-
297
- .hamburger-line {
298
- display: block;
299
- width: 20px;
300
- height: 2px;
301
- background-color: var(--q-fg-base);
302
- transition:
303
- transform 0.3s ease,
304
- opacity 0.3s ease;
305
- }
306
-
307
- /* Mobile responsive menu overrides */
308
- @media (max-width: 900px) {
309
- .hamburger-menu {
310
- display: flex;
311
- }
312
-
313
- .hamburger-menu.open .hamburger-line:nth-child(1) {
314
- transform: translateY(7px) rotate(45deg);
315
- }
316
-
317
- .hamburger-menu.open .hamburger-line:nth-child(2) {
318
- opacity: 0;
319
- }
320
-
321
- .hamburger-menu.open .hamburger-line:nth-child(3) {
322
- transform: translateY(-7px) rotate(-45deg);
323
- }
324
-
325
- .app-header {
326
- padding: 8px 10px;
327
- min-height: 52px;
328
- gap: 12px;
329
- }
330
-
331
- .logo-text {
332
- font-size: 1rem;
333
- }
334
-
335
- .header-actions {
336
- gap: 10px;
337
- }
338
- }
339
- `;
340
-
341
- // src/playground/components/playground-header/playground-header.tsx
342
- class PlaygroundHeader extends HTMLElement {
343
- cleanupThemeEffect;
344
- hamburgerBtn = null;
345
- connectedCallback() {
346
- this.innerHTML = "";
347
- this.appendChild(/* @__PURE__ */ h("header", {
348
- class: "app-header"
349
- }, /* @__PURE__ */ h("button", {
350
- class: "hamburger-menu",
351
- id: "hamburgerMenu",
352
- "aria-label": "Toggle Menu",
353
- type: "button",
354
- onClick: () => this.toggleSidebar()
355
- }, /* @__PURE__ */ h("span", {
356
- class: "hamburger-line"
357
- }), /* @__PURE__ */ h("span", {
358
- class: "hamburger-line"
359
- }), /* @__PURE__ */ h("span", {
360
- class: "hamburger-line"
361
- })), /* @__PURE__ */ h("div", {
362
- class: "header-logo"
363
- }, /* @__PURE__ */ h("img", {
364
- src: "/logo.svg",
365
- class: "logo-image",
366
- alt: "WebQuark Logo"
367
- }), /* @__PURE__ */ h("div", {
368
- class: "logo-text"
369
- }, "WebQuark")), /* @__PURE__ */ h("div", {
370
- class: "header-actions"
371
- }, /* @__PURE__ */ h("q-button", {
372
- id: "themeToggle",
373
- variant: "ghost",
374
- onClick: () => this.toggleTheme()
375
- }, /* @__PURE__ */ h("q-icon", {
376
- id: "themeIcon",
377
- slot: "icon-left",
378
- name: "sun"
379
- })))));
380
- const styleId = "playground-header-style";
381
- if (!document.getElementById(styleId)) {
382
- const style = document.createElement("style");
383
- style.id = styleId;
384
- style.textContent = playground_header_default;
385
- document.head.appendChild(style);
386
- }
387
- this.init();
388
- }
389
- init() {
390
- this.hamburgerBtn = this.querySelector("#hamburgerMenu");
391
- const backdrop = document.getElementById("sidebarBackdrop");
392
- this.cleanupThemeEffect = effect(() => {
393
- const currentTheme = theme();
394
- document.documentElement.setAttribute("data-theme", currentTheme);
395
- const iconEl = this.querySelector("#themeIcon");
396
- if (iconEl) {
397
- iconEl.setAttribute("name", currentTheme === "dark" ? "sun" : "moon");
398
- }
399
- });
400
- if (backdrop) {
401
- backdrop.addEventListener("click", () => {
402
- const sidebar = document.querySelector("playground-sidebar");
403
- if (sidebar)
404
- sidebar.classList.remove("open");
405
- backdrop.classList.remove("active");
406
- if (this.hamburgerBtn)
407
- this.hamburgerBtn.classList.remove("open");
408
- });
409
- }
410
- }
411
- toggleTheme() {
412
- const newTheme = theme() === "dark" ? "light" : "dark";
413
- theme.set(newTheme);
414
- }
415
- toggleSidebar() {
416
- const sidebar = document.querySelector("playground-sidebar");
417
- const backdrop = document.getElementById("sidebarBackdrop");
418
- if (sidebar)
419
- sidebar.classList.toggle("open");
420
- if (backdrop)
421
- backdrop.classList.toggle("active");
422
- if (this.hamburgerBtn)
423
- this.hamburgerBtn.classList.toggle("open");
424
- }
425
- disconnectedCallback() {
426
- if (this.cleanupThemeEffect) {
427
- this.cleanupThemeEffect();
428
- }
429
- }
430
- }
431
- customElements.define("playground-header", PlaygroundHeader);
432
-
433
- // src/playground/components/playground-sidebar/playground-sidebar.css
434
- var playground_sidebar_default = `/* playground-sidebar.css
435
- All nav item rendering is handled by q-sidepanel variant="nav".
436
- This file only styles the host element layout, the Global Styling footer
437
- button (slotted light DOM), and mobile responsive overrides. */
438
-
439
- playground-sidebar {
440
- display: flex;
441
- flex-direction: column;
442
- flex-shrink: 0;
443
- height: 100%;
444
- }
445
-
446
- playground-sidebar q-sidepanel {
447
- --q-sidepanel-bg: var(--q-bg-surface-2);
448
- }
449
-
450
- /* Global Styling footer button — lives in q-sidepanel's footer slot (light DOM) */
451
- .global-styling-btn {
452
- display: flex;
453
- align-items: center;
454
- justify-content: center;
455
- gap: 8px;
456
- width: calc(100% - 24px);
457
- margin: 4px 12px;
458
- background: var(--q-bg-surface-2);
459
- border: var(--q-border);
460
- color: var(--q-fg-base);
461
- padding: 10px 16px;
462
- border-radius: var(--q-radius-md, 8px);
463
- font-size: 0.9rem;
464
- font-weight: 600;
465
- cursor: pointer;
466
- transition: all 0.2s ease;
467
- box-sizing: border-box;
468
- }
469
-
470
- .global-styling-btn:hover {
471
- background: color-mix(in srgb, var(--q-fg-base) 5%, var(--q-bg-surface-2));
472
- color: var(--q-fg-base);
473
- }
474
-
475
- .global-styling-btn.active {
476
- background: color-mix(in srgb, var(--q-color-primary) 12%, transparent);
477
- color: var(--q-color-primary);
478
- border-color: var(--q-color-primary);
479
- }
480
-
481
- .global-styling-btn:focus-visible {
482
- outline: var(--q-focus-ring);
483
- outline-offset: -2px;
484
- }
485
-
486
- /* Mobile responsive: q-sidepanel handles its own internal layout,
487
- we just control the host element position on small screens */
488
- @media (max-width: 900px) {
489
- playground-sidebar {
490
- position: fixed;
491
- top: 64px;
492
- left: 0;
493
- bottom: 0;
494
- width: 280px;
495
- height: calc(100vh - 64px);
496
- z-index: 1000;
497
- transform: translateX(-100%);
498
- transition: transform 220ms ease-out;
499
- box-shadow: var(--q-shadow-high);
500
- }
501
-
502
- playground-sidebar.open {
503
- transform: translateX(0);
504
- }
505
- }
506
- `;
507
-
508
- // src/playground/components/playground-sidebar/playground-sidebar.tsx
509
- var CATEGORY_LABELS = {
510
- actions: "Actions",
511
- "data-display": "Data Display",
512
- indicators: "Indicators",
513
- inputs: "Inputs",
514
- layout: "Layout",
515
- media: "Media",
516
- overlays: "Overlays"
517
- };
518
- var CATEGORY_ORDER = Object.keys(CATEGORY_LABELS);
519
-
520
- class PlaygroundSidebar extends HTMLElement {
521
- components = [];
522
- navPanel = null;
523
- globalStylingBtn = null;
524
- handleNavSelect;
525
- cleanupActiveEffect;
526
- async connectedCallback() {
527
- try {
528
- const res = await fetch("/playground/components.manifest.json");
529
- if (!res.ok)
530
- throw new Error(`HTTP ${res.status}`);
531
- this.components = await res.json();
532
- } catch (err) {
533
- console.error("[playground-sidebar] Failed to load components.manifest.json:", err);
534
- this.components = [];
535
- }
536
- this.innerHTML = "";
537
- this.appendChild(/* @__PURE__ */ h("q-sidepanel", {
538
- id: "sidebarNav",
539
- variant: "nav",
540
- mode: "tree"
541
- }, /* @__PURE__ */ h("div", {
542
- slot: "footer"
543
- }, /* @__PURE__ */ h("button", {
544
- id: "globalStylingBtn",
545
- class: "global-styling-btn",
546
- type: "button",
547
- onClick: () => activeComponent.set("global-styling")
548
- }, /* @__PURE__ */ h("q-icon", {
549
- name: "globe",
550
- lib: "lucide",
551
- size: "16"
552
- }), /* @__PURE__ */ h("span", null, "Global Styling")))));
553
- const styleId = "playground-sidebar-style";
554
- if (!document.getElementById(styleId)) {
555
- const style = document.createElement("style");
556
- style.id = styleId;
557
- style.textContent = playground_sidebar_default;
558
- document.head.appendChild(style);
559
- }
560
- this.init();
561
- }
562
- init() {
563
- this.navPanel = this.querySelector("#sidebarNav");
564
- this.globalStylingBtn = this.querySelector("#globalStylingBtn");
565
- if (!this.navPanel)
566
- return;
567
- this.navPanel.items = this.buildNavItems();
568
- this.handleNavSelect = (e) => {
569
- const { value } = e.detail;
570
- activeTab.set("sandbox");
571
- activeComponent.set(value);
572
- fetchComponentSpec(value);
573
- };
574
- this.navPanel.addEventListener("qSelect", this.handleNavSelect);
575
- this.cleanupActiveEffect = effect(() => {
576
- const active = activeComponent();
577
- if (this.navPanel) {
578
- this.navPanel.value = active;
579
- }
580
- if (this.globalStylingBtn) {
581
- this.globalStylingBtn.classList.toggle("active", active === "global-styling");
582
- }
583
- });
584
- }
585
- buildNavItems() {
586
- const grouped = new Map;
587
- this.components.forEach((component) => {
588
- const category = component.category || "other";
589
- const components = grouped.get(category) ?? [];
590
- components.push(component);
591
- grouped.set(category, components);
592
- });
593
- const orderedCategories = [
594
- ...CATEGORY_ORDER,
595
- ...Array.from(grouped.keys()).filter((category) => !CATEGORY_LABELS[category]).sort()
596
- ];
597
- return orderedCategories.filter((category) => grouped.has(category)).map((category) => ({
598
- label: CATEGORY_LABELS[category] ?? this.toTitleCase(category),
599
- value: `category:${category}`,
600
- children: grouped.get(category).map((component) => ({
601
- label: component.name,
602
- value: component.tag
603
- }))
604
- }));
605
- }
606
- toTitleCase(value) {
607
- return value.split(/[-_\s]+/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
608
- }
609
- disconnectedCallback() {
610
- if (this.cleanupActiveEffect) {
611
- this.cleanupActiveEffect();
612
- }
613
- if (this.navPanel && this.handleNavSelect) {
614
- this.navPanel.removeEventListener("qSelect", this.handleNavSelect);
615
- }
616
- }
617
- }
618
- customElements.define("playground-sidebar", PlaygroundSidebar);
619
-
620
- // src/playground/components/sandbox-viewport/viewport-tabs.tsx
621
- class ViewportTabs extends HTMLElement {
622
- cleanupEffect;
623
- connectedCallback() {
624
- this.innerHTML = "";
625
- this.appendChild(/* @__PURE__ */ h("div", {
626
- class: "tabs-bar",
627
- id: "tabsBar"
628
- }, /* @__PURE__ */ h("div", {
629
- class: "tab-buttons"
630
- }, /* @__PURE__ */ h("button", {
631
- class: "tab-btn",
632
- "data-tab": "sandbox"
633
- }, "Sandbox"), /* @__PURE__ */ h("button", {
634
- class: "tab-btn",
635
- "data-tab": "variants"
636
- }, "Variants"), /* @__PURE__ */ h("button", {
637
- class: "tab-btn",
638
- "data-tab": "edgecases"
639
- }, "Edge Cases")), /* @__PURE__ */ h("div", {
640
- class: "active-component-badge",
641
- id: "activeCompBadge"
642
- }, "q-button")));
643
- const tabsBar = this.querySelector("#tabsBar");
644
- const activeCompBadge = this.querySelector("#activeCompBadge");
645
- const tabBtns = this.querySelectorAll(".tab-btn");
646
- tabBtns.forEach((btn) => {
647
- btn.addEventListener("click", () => {
648
- const nextTab = btn.dataset.tab;
649
- if (nextTab) {
650
- activeTab.set(nextTab);
651
- }
652
- });
653
- });
654
- this.cleanupEffect = effect(() => {
655
- const active = activeComponent();
656
- const tab = activeTab();
657
- if (activeCompBadge) {
658
- activeCompBadge.innerText = active === "global-styling" ? "Global Styling" : active;
659
- }
660
- if (tabsBar) {
661
- tabsBar.style.display = active === "global-styling" ? "none" : "";
662
- }
663
- tabBtns.forEach((btn) => {
664
- btn.classList.toggle("active", btn.dataset.tab === tab);
665
- });
666
- });
667
- }
668
- disconnectedCallback() {
669
- if (this.cleanupEffect) {
670
- this.cleanupEffect();
671
- }
672
- }
673
- }
674
- customElements.define("viewport-tabs", ViewportTabs);
675
-
676
- // src/playground/events.ts
677
- class TypedEventBus {
678
- listeners = {};
679
- on(event, callback) {
680
- if (!this.listeners[event]) {
681
- this.listeners[event] = new Set;
682
- }
683
- this.listeners[event].add(callback);
684
- return () => this.off(event, callback);
685
- }
686
- off(event, callback) {
687
- if (this.listeners[event]) {
688
- this.listeners[event].delete(callback);
689
- }
690
- }
691
- emit(event, data) {
692
- if (this.listeners[event]) {
693
- this.listeners[event].forEach((callback) => {
694
- try {
695
- callback(data);
696
- } catch (err) {
697
- console.error(`Error in event listener for event "${String(event)}":`, err);
698
- }
699
- });
700
- }
701
- }
702
- }
703
- var playgroundBus = new TypedEventBus;
704
-
705
- // src/playground/utils/color.ts
706
- function convertToHex(rgbVal) {
707
- if (!rgbVal)
708
- return "#000000";
709
- rgbVal = rgbVal.trim();
710
- if (rgbVal.startsWith("#")) {
711
- return rgbVal;
712
- }
713
- const match = rgbVal.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i);
714
- if (match) {
715
- const r = parseInt(match[1], 10);
716
- const g = parseInt(match[2], 10);
717
- const b = parseInt(match[3], 10);
718
- return "#" + [r, g, b].map((x) => {
719
- const hex = x.toString(16);
720
- return hex.length === 1 ? "0" + hex : hex;
721
- }).join("");
722
- }
723
- return rgbVal;
724
- }
725
- // src/playground/utils/dom.ts
726
- function setElementProperties(el, props) {
727
- if (!el || !props)
728
- return;
729
- const tag = el.tagName?.toLowerCase();
730
- Object.keys(props).forEach((pName) => {
731
- const val = props[pName];
732
- const isBoolean = typeof val === "boolean" || val === "true" || val === "false";
733
- if (isBoolean) {
734
- const boolVal = val === true || val === "true";
735
- if (tag === "q-toggle" && pName === "checked" && typeof el.setChecked === "function") {
736
- el.setChecked(boolVal);
737
- return;
738
- }
739
- el[pName] = boolVal;
740
- if (boolVal)
741
- el.setAttribute(pName, "");
742
- else
743
- el.removeAttribute(pName);
744
- } else {
745
- el[pName] = val;
746
- if (val !== undefined && val !== null && val !== "") {
747
- el.setAttribute(pName, val);
748
- } else {
749
- el.removeAttribute(pName);
750
- }
751
- }
752
- });
753
- }
754
- // src/playground/components/sandbox-viewport/sandbox-panel.tsx
755
- var SYNCBACK_MAP = {
756
- "q-sidepanel": { qClose: (cfg, _det) => {
757
- if (cfg.props)
758
- cfg.props.open.currentValue = false;
759
- } },
760
- "q-dialog": { qClose: (cfg, _det) => {
761
- if (cfg.props)
762
- cfg.props.open.currentValue = false;
763
- } },
764
- "q-dropdown": { qChange: (cfg, det) => {
765
- if (cfg.props)
766
- cfg.props.value.currentValue = det;
767
- } },
768
- "q-input": { qChange: (cfg, det) => {
769
- if (cfg.props)
770
- cfg.props.value.currentValue = det;
771
- } },
772
- "q-radio-group": { qChange: (cfg, det) => {
773
- if (cfg.props)
774
- cfg.props.value.currentValue = det;
775
- } },
776
- "q-textarea": { qChange: (cfg, det) => {
777
- if (cfg.props)
778
- cfg.props.value.currentValue = det;
779
- } },
780
- "q-toggle": { qChange: (cfg, det) => {
781
- if (cfg.props)
782
- cfg.props.checked.currentValue = det;
783
- } }
784
- };
785
-
786
- class SandboxPanel extends HTMLElement {
787
- stageContainer = null;
788
- activeModule = null;
789
- loadedTag = null;
790
- syncedComponents = new Set;
791
- previousSlotValues = new WeakMap;
792
- cleanupEffect;
793
- connectedCallback() {
794
- this.innerHTML = "";
795
- this.appendChild(/* @__PURE__ */ h("div", {
796
- class: "sandbox-layout"
797
- }, /* @__PURE__ */ h("div", {
798
- class: "sandbox-main"
799
- }, /* @__PURE__ */ h("div", {
800
- class: "stage-container",
801
- id: "stageContainer"
802
- }), /* @__PURE__ */ h("div", {
803
- class: "sandbox-bottom-panels"
804
- }, /* @__PURE__ */ h("playground-event-log", null), /* @__PURE__ */ h("playground-code-preview", null)))));
805
- this.stageContainer = this.querySelector("#stageContainer");
806
- this.activeModule = null;
807
- this.loadedTag = null;
808
- this.syncedComponents = new Set;
809
- this.cleanupEffect = effect(async () => {
810
- const active = activeComponent();
811
- const tab = activeTab();
812
- const registry = componentRegistry();
813
- const spec = registry[active];
814
- if (active === "global-styling" || tab !== "sandbox" || !spec || !this.stageContainer) {
815
- this.loadedTag = null;
816
- return;
817
- }
818
- if (this.loadedTag !== active) {
819
- this.loadedTag = active;
820
- const CUSTOM_VIEW_TAGS = ["q-button", "q-input"];
821
- if (CUSTOM_VIEW_TAGS.includes(active)) {
822
- await this.loadComponentSandboxView(active, spec, registry);
823
- } else {
824
- this.renderFallback(active, spec);
825
- }
826
- } else {
827
- const activeEl = this.stageContainer.querySelector(active);
828
- if (activeEl) {
829
- const STRUCTURAL_PROPS = ["type", "variant"];
830
- const hasStructuralChange = STRUCTURAL_PROPS.some((propName) => {
831
- if (!spec.props?.[propName])
832
- return false;
833
- const currentVal = activeEl.getAttribute(propName) ?? "";
834
- const newVal = String(spec.props[propName].currentValue ?? "");
835
- return currentVal !== newVal;
836
- });
837
- if (hasStructuralChange) {
838
- this.loadedTag = null;
839
- const CUSTOM_VIEW_TAGS = ["q-button", "q-input"];
840
- if (CUSTOM_VIEW_TAGS.includes(active)) {
841
- await this.loadComponentSandboxView(active, spec, registry);
842
- } else {
843
- this.renderFallback(active, spec);
844
- }
845
- this.loadedTag = active;
846
- } else {
847
- this.updateElementFromSpec(activeEl, spec);
848
- }
849
- }
850
- }
851
- });
852
- }
853
- async loadComponentSandboxView(tag, spec, registry) {
854
- if (!this.stageContainer)
855
- return;
856
- const isFirstLoad = !this.syncedComponents.has(tag);
857
- if (isFirstLoad) {
858
- this.syncedComponents.add(tag);
859
- }
860
- if (this.activeModule && typeof this.activeModule.destroy === "function") {
861
- try {
862
- this.activeModule.destroy(this.stageContainer);
863
- } catch (err) {
864
- console.error(`Error destroying previous module:`, err);
865
- }
866
- }
867
- this.activeModule = null;
868
- const existingStyle = document.getElementById("custom-view-style");
869
- if (existingStyle) {
870
- existingStyle.remove();
871
- }
872
- let customHtmlLoaded = false;
873
- const timestamp = Date.now();
874
- const htmlUrl = `/views/${tag}-view/${tag}-view.html?t=${timestamp}`;
875
- try {
876
- const htmlRes = await fetch(htmlUrl);
877
- if (htmlRes.ok) {
878
- const htmlText = await htmlRes.text();
879
- if (htmlText.trim().startsWith("<!DOCTYPE") || htmlText.includes("<html")) {
880
- throw new Error("SPA fallback page returned instead of view fragment");
881
- }
882
- this.stageContainer.innerHTML = htmlText;
883
- const el = this.stageContainer.querySelector(tag);
884
- if (el) {
885
- customHtmlLoaded = true;
886
- if (isFirstLoad) {
887
- if (spec.props) {
888
- Object.keys(spec.props).forEach((propName) => {
889
- if (spec.props) {
890
- const prop = spec.props[propName];
891
- if (prop.type === "boolean") {
892
- prop.currentValue = el.hasAttribute(propName);
893
- } else {
894
- const attrVal = el.getAttribute(propName);
895
- if (attrVal !== null) {
896
- prop.currentValue = attrVal;
897
- }
898
- }
899
- }
900
- });
901
- }
902
- if (spec.slots) {
903
- Object.keys(spec.slots).forEach((slotName) => {
904
- if (spec.slots) {
905
- const slot = spec.slots[slotName];
906
- if (slotName === "default") {
907
- const clone = el.cloneNode(true);
908
- Array.from(clone.children).forEach((child) => {
909
- if (child.hasAttribute("slot"))
910
- child.remove();
911
- });
912
- slot.currentValue = clone.innerHTML.trim();
913
- } else {
914
- const slotEl = el.querySelector(`[slot="${slotName}"]`);
915
- if (slotEl) {
916
- slot.currentValue = slotEl.innerHTML.trim();
917
- }
918
- }
919
- }
920
- });
921
- }
922
- componentRegistry.set({ ...registry });
923
- } else {
924
- this.updateElementFromSpec(el, spec);
925
- }
926
- }
927
- }
928
- } catch (err) {
929
- console.warn(`Error fetching custom view for ${tag}:`, err);
930
- }
931
- if (!customHtmlLoaded) {
932
- this.renderFallback(tag, spec);
933
- }
934
- const activeEl = this.stageContainer.querySelector(tag);
935
- if (activeEl) {
936
- this.bindEvents(activeEl, tag);
937
- }
938
- if (spec.options && activeEl) {
939
- activeEl.options = spec.options;
940
- }
941
- if (spec.hasOwnProperty("stageHelper") && spec.stageHelper && activeEl) {
942
- const stageHelper = spec.stageHelper;
943
- const helper = document.createElement("div");
944
- helper.className = "stage-helper-bar";
945
- helper.innerHTML = `
946
- <span class="stage-helper-text">${stageHelper.label}</span>
947
- <q-button variant="secondary" size="sm" id="${stageHelper.buttonId}">${stageHelper.buttonLabel}</q-button>
948
- `;
949
- this.stageContainer.appendChild(helper);
950
- }
951
- const cssUrl = `/views/${tag}-view/${tag}-view.css`;
952
- const cssUrlWithTimestamp = `${cssUrl}?t=${timestamp}`;
953
- try {
954
- const cssRes = await fetch(cssUrlWithTimestamp, { method: "HEAD" });
955
- if (cssRes.ok) {
956
- const link = document.createElement("link");
957
- link.id = "custom-view-style";
958
- link.rel = "stylesheet";
959
- link.href = cssUrlWithTimestamp;
960
- document.head.appendChild(link);
961
- }
962
- } catch (err) {}
963
- const jsUrl = `/views/${tag}-view/${tag}-view.js`;
964
- const jsUrlWithTimestamp = `${jsUrl}?t=${timestamp}`;
965
- try {
966
- const jsRes = await fetch(jsUrlWithTimestamp, { method: "HEAD" });
967
- if (jsRes.ok) {
968
- const mod = await import(jsUrlWithTimestamp);
969
- this.activeModule = mod;
970
- if (mod && typeof mod.init === "function") {
971
- mod.init(this.stageContainer);
972
- }
973
- }
974
- } catch (err) {
975
- console.warn(`Could not initialize custom JS module for ${tag}:`, err);
976
- }
977
- }
978
- renderFallback(tag, spec) {
979
- if (!this.stageContainer)
980
- return;
981
- const el = document.createElement(tag);
982
- this.updateElementFromSpec(el, spec);
983
- this.stageContainer.innerHTML = "";
984
- this.stageContainer.appendChild(el);
985
- }
986
- bindEvents(activeEl, tag) {
987
- const eventsToLog = ["qChange", "qSelect", "qClose", "qSlideChange", "qLightboxOpen", "qLightboxClose", "qItemClick", "qScroll", "qClick", "qFocus", "qBlur"];
988
- eventsToLog.forEach((eventName) => {
989
- activeEl.addEventListener(eventName, (e) => {
990
- const customEvent = e;
991
- playgroundBus.emit("event-dispatched", {
992
- name: eventName,
993
- detail: customEvent.detail
994
- });
995
- let changed = false;
996
- const registry = componentRegistry();
997
- const config = registry[tag];
998
- if (!config)
999
- return;
1000
- const handler = SYNCBACK_MAP[tag]?.[eventName];
1001
- if (handler) {
1002
- handler(config, customEvent.detail);
1003
- changed = true;
1004
- }
1005
- if (changed) {
1006
- componentRegistry.set({ ...registry });
1007
- }
1008
- });
1009
- });
1010
- }
1011
- updateElementFromSpec(el, spec) {
1012
- if (!el || !spec)
1013
- return;
1014
- if (spec.props) {
1015
- const flatProps = {};
1016
- Object.keys(spec.props).forEach((pName) => {
1017
- if (spec.props) {
1018
- flatProps[pName] = spec.props[pName].currentValue;
1019
- }
1020
- });
1021
- setElementProperties(el, flatProps);
1022
- }
1023
- if (spec.slots) {
1024
- this.updateElementSlots(el, spec);
1025
- }
1026
- if (spec.options) {
1027
- el.options = spec.options;
1028
- }
1029
- }
1030
- updateElementSlots(el, config) {
1031
- if (!config.slots)
1032
- return;
1033
- let cachedSlots = this.previousSlotValues.get(el);
1034
- if (!cachedSlots) {
1035
- cachedSlots = {};
1036
- this.previousSlotValues.set(el, cachedSlots);
1037
- }
1038
- let hasAnySlotChanged = false;
1039
- Object.keys(config.slots).forEach((slotName) => {
1040
- const currentVal = config.slots[slotName]?.currentValue ?? "";
1041
- if (cachedSlots[slotName] !== currentVal) {
1042
- hasAnySlotChanged = true;
1043
- cachedSlots[slotName] = currentVal;
1044
- }
1045
- });
1046
- if (!hasAnySlotChanged && Object.keys(cachedSlots).length > 0) {
1047
- return;
1048
- }
1049
- const namedSlots = {};
1050
- Array.from(el.children).forEach((child) => {
1051
- const slotName = child.getAttribute("slot");
1052
- if (slotName) {
1053
- namedSlots[slotName] = child;
1054
- }
1055
- });
1056
- el.innerHTML = "";
1057
- const defaultSlot = config.slots.default;
1058
- if (defaultSlot && defaultSlot.currentValue) {
1059
- el.innerHTML = defaultSlot.currentValue;
1060
- }
1061
- Object.keys(config.slots).forEach((slotName) => {
1062
- if (slotName === "default")
1063
- return;
1064
- if (config.slots) {
1065
- const slot = config.slots[slotName];
1066
- if (slot.currentValue) {
1067
- const wrapper = document.createElement("span");
1068
- wrapper.setAttribute("slot", slotName);
1069
- wrapper.innerHTML = slot.currentValue;
1070
- el.appendChild(wrapper);
1071
- }
1072
- }
1073
- });
1074
- }
1075
- disconnectedCallback() {
1076
- if (this.cleanupEffect) {
1077
- this.cleanupEffect();
1078
- }
1079
- if (this.activeModule && typeof this.activeModule.destroy === "function") {
1080
- try {
1081
- this.activeModule.destroy(this.stageContainer);
1082
- } catch (err) {}
1083
- }
1084
- }
1085
- }
1086
- customElements.define("sandbox-panel", SandboxPanel);
1087
-
1088
- // src/playground/components/sandbox-viewport/variant-card.tsx
1089
- class VariantCard extends HTMLElement {
1090
- tag;
1091
- item;
1092
- resizeObserver;
1093
- connectedCallback() {
1094
- if (!this.tag || !this.item)
1095
- return;
1096
- const tag = this.tag;
1097
- const item = this.item;
1098
- const registry = componentRegistry();
1099
- const config = registry[tag];
1100
- if (!config)
1101
- return;
1102
- this.className = "variant-card";
1103
- this.innerHTML = "";
1104
- const titleRow = /* @__PURE__ */ h("div", {
1105
- class: "variant-title-row"
1106
- }, /* @__PURE__ */ h("h4", {
1107
- class: "variant-card-title"
1108
- }, item.name));
1109
- this.appendChild(titleRow);
1110
- const stage = /* @__PURE__ */ h("div", {
1111
- class: "variant-card-stage"
1112
- }, /* @__PURE__ */ h("span", {
1113
- class: "variant-card-dimensions"
1114
- }, "0px × 0px"));
1115
- const el = document.createElement(tag);
1116
- setElementProperties(el, item.props);
1117
- const defaultSlot = item.slot !== undefined ? item.slot : config.slots?.default?.default || "";
1118
- if (defaultSlot !== undefined && defaultSlot !== "") {
1119
- el.innerHTML = defaultSlot;
1120
- }
1121
- if (item.slots) {
1122
- Object.keys(item.slots).forEach((slotName) => {
1123
- const wrapper = document.createElement("span");
1124
- wrapper.setAttribute("slot", slotName);
1125
- wrapper.innerHTML = item.slots[slotName];
1126
- el.appendChild(wrapper);
1127
- });
1128
- } else if (config.slots) {
1129
- Object.keys(config.slots).forEach((slotName) => {
1130
- if (slotName !== "default" && config.slots[slotName].default) {
1131
- const wrapper = document.createElement("span");
1132
- wrapper.setAttribute("slot", slotName);
1133
- wrapper.innerHTML = config.slots[slotName].default;
1134
- el.appendChild(wrapper);
1135
- }
1136
- });
1137
- }
1138
- stage.appendChild(el);
1139
- this.appendChild(stage);
1140
- const dimensionsBadge = stage.querySelector(".variant-card-dimensions");
1141
- if (typeof ResizeObserver !== "undefined" && dimensionsBadge) {
1142
- this.resizeObserver = new ResizeObserver(() => {
1143
- const rect = el.getBoundingClientRect();
1144
- const width = Math.round(rect.width);
1145
- const height = Math.round(rect.height);
1146
- dimensionsBadge.innerText = `${width}px × ${height}px`;
1147
- });
1148
- this.resizeObserver.observe(el);
1149
- }
1150
- if (config.options) {
1151
- el.options = config.options;
1152
- }
1153
- if (tag === "q-sidepanel") {
1154
- const btn = /* @__PURE__ */ h("q-button", {
1155
- variant: "secondary",
1156
- size: "sm",
1157
- class: "var-open-panel-btn"
1158
- }, "Trigger Drawer Panel");
1159
- this.appendChild(btn);
1160
- }
1161
- if (tag === "q-dialog") {
1162
- const btn = /* @__PURE__ */ h("q-button", {
1163
- variant: "secondary",
1164
- size: "sm",
1165
- class: "var-open-dialog-btn"
1166
- }, "Trigger Dialog Overlay");
1167
- this.appendChild(btn);
1168
- }
1169
- const slots = { default: defaultSlot };
1170
- if (item.slots) {
1171
- Object.assign(slots, item.slots);
1172
- }
1173
- const appendScript = tag === "q-dropdown" && config.options ? `
1174
-
1175
- <!-- Programmatic dropdown options population script -->
1176
- <script>
1177
- const dropdown = document.querySelector('q-dropdown');
1178
- dropdown.options = ${JSON.stringify(config.options, null, 2).replace(/\n/g, `
1179
- `)};
1180
- </script>` : null;
1181
- const codeText = serializeComponentCode(tag, item.props, slots, appendScript);
1182
- const syntaxBox = /* @__PURE__ */ h("q-syntax-box", {
1183
- variant: "plain",
1184
- code: codeText,
1185
- class: "variant-card-code"
1186
- });
1187
- this.appendChild(syntaxBox);
1188
- }
1189
- disconnectedCallback() {
1190
- if (this.resizeObserver) {
1191
- this.resizeObserver.disconnect();
1192
- }
1193
- }
1194
- }
1195
- customElements.define("variant-card", VariantCard);
1196
-
1197
- // src/playground/components/sandbox-viewport/sandbox-viewport.css
1198
- var sandbox_viewport_default = `.main-panel {
1199
- flex: 1;
1200
- display: flex;
1201
- flex-direction: column;
1202
- min-width: 0;
1203
- background: var(--q-bg-base);
1204
- overflow: hidden;
1205
- height: 100%;
1206
- }
1207
-
1208
- .tabs-bar {
1209
- display: flex;
1210
- align-items: center;
1211
- justify-content: space-between;
1212
- padding: 0 24px;
1213
- height: 43px;
1214
- background: var(--q-bg-surface-1);
1215
- border-bottom: var(--q-border);
1216
- flex-shrink: 0;
1217
- gap: 16px;
1218
- }
1219
-
1220
- .tab-buttons {
1221
- display: flex;
1222
- height: 100%;
1223
- flex-shrink: 0;
1224
- }
1225
-
1226
- .tab-btn {
1227
- background: transparent;
1228
- border: none;
1229
- color: var(--q-fg-muted);
1230
- padding: 0 20px;
1231
- font-size: 0.9rem;
1232
- font-weight: 600;
1233
- cursor: pointer;
1234
- height: 100%;
1235
- display: flex;
1236
- align-items: center;
1237
- border-bottom: 2px solid transparent;
1238
- transition: all 0.2s ease;
1239
- }
1240
-
1241
- .tab-btn:hover {
1242
- color: var(--q-fg-base);
1243
- }
1244
-
1245
- .tab-btn.active {
1246
- color: var(--q-color-primary);
1247
- border-bottom-color: var(--q-color-primary);
1248
- }
1249
-
1250
- .active-component-badge {
1251
- font-family: monospace;
1252
- background: var(--q-bg-surface-2);
1253
- border: var(--q-border);
1254
- padding: 4px 8px;
1255
- border-radius: var(--q-radius-md);
1256
- font-size: 0.8rem;
1257
- color: var(--q-color-primary);
1258
- flex-shrink: 0;
1259
- }
1260
-
1261
- .stage-content-wrapper {
1262
- flex: 1;
1263
- min-height: 0;
1264
- position: relative;
1265
- display: flex;
1266
- flex-direction: column;
1267
- }
1268
-
1269
- .tab-content {
1270
- display: none;
1271
- flex: 1;
1272
- min-height: 0;
1273
- flex-direction: column;
1274
- }
1275
-
1276
- .tab-content.active {
1277
- display: flex;
1278
- }
1279
-
1280
- .sandbox-layout {
1281
- display: flex;
1282
- flex-direction: column;
1283
- flex: 1;
1284
- min-height: 0;
1285
- box-sizing: border-box;
1286
- }
1287
-
1288
- .sandbox-main {
1289
- flex: 1;
1290
- display: flex;
1291
- flex-direction: column;
1292
- padding: 24px;
1293
- gap: 20px;
1294
- min-height: 0;
1295
- }
1296
-
1297
- .sandbox-bottom-panels {
1298
- display: flex;
1299
- gap: 20px;
1300
- height: 150px;
1301
- flex-shrink: 0;
1302
- }
1303
-
1304
- playground-event-log,
1305
- playground-code-preview {
1306
- flex: 1;
1307
- min-width: 0;
1308
- height: 100%;
1309
- }
1310
-
1311
-
1312
- .stage-container {
1313
- flex: 1;
1314
- min-height: 0;
1315
- background-color: var(--q-bg-base);
1316
- background-image: radial-gradient(var(--q-bg-surface-2) 1.5px, transparent 1.5px);
1317
- background-size: 20px 20px;
1318
- border: var(--q-border);
1319
- border-radius: var(--q-radius-lg);
1320
- padding: 40px;
1321
- display: flex;
1322
- align-items: center;
1323
- justify-content: center;
1324
- position: relative;
1325
- transition:
1326
- background-color 0.3s ease,
1327
- border-color 0.3s ease;
1328
- transform: translate(0, 0); /* Bounded mode by default */
1329
- overflow: hidden;
1330
- }
1331
-
1332
- /* Helpers Panel inside stage */
1333
- .stage-helper-bar {
1334
- position: absolute;
1335
- bottom: 16px;
1336
- left: 50%;
1337
- transform: translateX(-50%);
1338
- background: color-mix(in srgb, var(--q-bg-surface-1) 95%, transparent);
1339
- padding: 8px 16px;
1340
- border-radius: 30px;
1341
- border: var(--q-border);
1342
- display: flex;
1343
- align-items: center;
1344
- gap: 10px;
1345
- z-index: 100;
1346
- }
1347
-
1348
- .stage-helper-text {
1349
- font-size: 0.8rem;
1350
- color: var(--q-fg-muted);
1351
- }
1352
-
1353
- /* Grid Visual Matrix styling */
1354
- .variants-grid {
1355
- display: grid;
1356
- grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
1357
- gap: 24px;
1358
- padding: 24px;
1359
- }
1360
-
1361
- .variant-card {
1362
- background: var(--q-bg-surface-1);
1363
- border: var(--q-border);
1364
- border-radius: var(--q-radius-lg);
1365
- padding: 20px;
1366
- display: flex;
1367
- flex-direction: column;
1368
- gap: 16px;
1369
- min-width: 0;
1370
- }
1371
-
1372
- .variant-title-row {
1373
- display: flex;
1374
- justify-content: space-between;
1375
- align-items: center;
1376
- border-bottom: var(--q-border);
1377
- padding-bottom: 8px;
1378
- gap: 16px;
1379
- }
1380
-
1381
- .variant-card-title {
1382
- font-size: 0.9rem;
1383
- font-weight: 600;
1384
- color: var(--q-color-primary);
1385
- margin: 0;
1386
- flex-shrink: 1;
1387
- min-width: 0;
1388
- overflow: hidden;
1389
- text-overflow: ellipsis;
1390
- white-space: nowrap;
1391
- }
1392
-
1393
- .variant-card-stage {
1394
- display: flex;
1395
- align-items: center;
1396
- justify-content: center;
1397
- min-height: 160px;
1398
- min-width: 280px;
1399
- background: var(--q-bg-base);
1400
- border-radius: var(--q-radius-md);
1401
- padding: 20px;
1402
- position: relative;
1403
- overflow: auto;
1404
- border: var(--q-border);
1405
- }
1406
-
1407
- .variant-card-dimensions {
1408
- position: absolute;
1409
- top: 8px;
1410
- right: 8px;
1411
- background: color-mix(in srgb, var(--q-bg-surface-1) 85%, transparent);
1412
- border: var(--q-border);
1413
- color: var(--q-fg-muted);
1414
- font-family: monospace;
1415
- font-size: 0.7rem;
1416
- padding: 2px 6px;
1417
- border-radius: 4px;
1418
- pointer-events: none;
1419
- z-index: 5;
1420
- user-select: none;
1421
- }
1422
-
1423
- .variant-card-desc {
1424
- font-size: 0.8rem;
1425
- color: var(--q-fg-muted);
1426
- margin: 0;
1427
- }
1428
-
1429
- .variant-card-code {
1430
- margin: 0;
1431
- padding: 10px;
1432
- background: var(--q-bg-surface-1);
1433
- border-radius: var(--q-radius-md);
1434
- border: var(--q-border);
1435
- font-family: monospace;
1436
- font-size: 0.75rem;
1437
- overflow-x: auto;
1438
- color: var(--q-fg-base);
1439
- }
1440
-
1441
- /* Responsive mobile view styles */
1442
- @media (max-width: 900px) {
1443
- .sandbox-layout {
1444
- flex-direction: column;
1445
- }
1446
-
1447
- .sandbox-main {
1448
- padding: 16px;
1449
- gap: 16px;
1450
- overflow-y: auto;
1451
- height: auto;
1452
- min-height: 100%;
1453
- }
1454
-
1455
- .stage-container {
1456
- min-height: 320px;
1457
- padding: 20px;
1458
- }
1459
-
1460
- .variants-grid {
1461
- grid-template-columns: 1fr;
1462
- padding: 16px;
1463
- gap: 16px;
1464
- }
1465
-
1466
- .tabs-bar {
1467
- flex-direction: column;
1468
- height: auto;
1469
- padding: 10px 16px;
1470
- align-items: stretch;
1471
- gap: 8px;
1472
- }
1473
-
1474
- .tab-buttons {
1475
- overflow-x: auto;
1476
- white-space: nowrap;
1477
- height: auto;
1478
- padding: 4px 0;
1479
- -webkit-overflow-scrolling: touch;
1480
- }
1481
-
1482
- .tab-buttons::-webkit-scrollbar {
1483
- display: none;
1484
- }
1485
-
1486
- .tab-btn {
1487
- flex-shrink: 0;
1488
- }
1489
-
1490
- .active-component-badge {
1491
- align-self: flex-start;
1492
- }
1493
-
1494
- .sandbox-bottom-panels {
1495
- flex-direction: column;
1496
- height: auto;
1497
- }
1498
- }
1499
-
1500
- .grid-empty-state {
1501
- grid-column: span 3;
1502
- padding: 40px;
1503
- text-align: center;
1504
- color: var(--q-fg-muted);
1505
- }
1506
-
1507
- /* Wide components full-width layouts */
1508
- sandbox-viewport[active-component="q-data-table"] .variants-grid,
1509
- sandbox-viewport[active-component="q-data-table"] .edgecases-grid,
1510
- sandbox-viewport[active-component="q-step-diagram"] .variants-grid,
1511
- sandbox-viewport[active-component="q-step-diagram"] .edgecases-grid {
1512
- grid-template-columns: 1fr;
1513
- }
1514
-
1515
- .variant-card-stage > q-data-table,
1516
- .variant-card-stage > q-step-diagram {
1517
- width: 100%;
1518
- flex: 1;
1519
- }
1520
- `;
1521
-
1522
- // src/playground/components/sandbox-viewport/sandbox-viewport.tsx
1523
- function emptyState(msg) {
1524
- return `<div class="grid-empty-state">${msg}</div>`;
1525
- }
1526
-
1527
- class SandboxViewport extends HTMLElement {
1528
- variantsGrid = null;
1529
- edgecasesGrid = null;
1530
- cleanupEffect;
1531
- connectedCallback() {
1532
- this.innerHTML = "";
1533
- this.appendChild(/* @__PURE__ */ h("viewport-tabs", null));
1534
- this.appendChild(/* @__PURE__ */ h("div", {
1535
- class: "stage-content-wrapper"
1536
- }, /* @__PURE__ */ h("sandbox-panel", {
1537
- class: "tab-content active",
1538
- id: "content-sandbox"
1539
- }), /* @__PURE__ */ h("div", {
1540
- class: "tab-content",
1541
- id: "content-variants"
1542
- }, /* @__PURE__ */ h("q-scrollable", {
1543
- height: "100%"
1544
- }, /* @__PURE__ */ h("div", {
1545
- class: "variants-grid",
1546
- id: "variantsGrid"
1547
- }))), /* @__PURE__ */ h("div", {
1548
- class: "tab-content",
1549
- id: "content-edgecases"
1550
- }, /* @__PURE__ */ h("q-scrollable", {
1551
- height: "100%"
1552
- }, /* @__PURE__ */ h("div", {
1553
- class: "variants-grid",
1554
- id: "edgecasesGrid"
1555
- }))), /* @__PURE__ */ h("div", {
1556
- class: "tab-content",
1557
- id: "content-global-styling"
1558
- }, /* @__PURE__ */ h("q-scrollable", {
1559
- height: "100%"
1560
- }, /* @__PURE__ */ h("theme-designer", null)))));
1561
- const styleId = "sandbox-viewport-style";
1562
- if (!document.getElementById(styleId)) {
1563
- const style = document.createElement("style");
1564
- style.id = styleId;
1565
- style.textContent = sandbox_viewport_default;
1566
- document.head.appendChild(style);
1567
- }
1568
- this.init();
1569
- }
1570
- init() {
1571
- this.variantsGrid = this.querySelector("#variantsGrid");
1572
- this.edgecasesGrid = this.querySelector("#edgecasesGrid");
1573
- this.addEventListener("click", (e) => {
1574
- const target = e.target;
1575
- if (!target)
1576
- return;
1577
- if (target.id === "closePanelBtn") {
1578
- const panel = this.querySelector("q-sidepanel");
1579
- if (panel) {
1580
- panel.open = false;
1581
- const registry = componentRegistry();
1582
- if (registry["q-sidepanel"] && registry["q-sidepanel"].props) {
1583
- registry["q-sidepanel"].props.open.currentValue = false;
1584
- componentRegistry.set({ ...registry });
1585
- }
1586
- }
1587
- }
1588
- if (target.id === "stageOpenPanelBtn") {
1589
- const panel = this.querySelector("q-sidepanel");
1590
- if (panel) {
1591
- panel.open = true;
1592
- const registry = componentRegistry();
1593
- if (registry["q-sidepanel"] && registry["q-sidepanel"].props) {
1594
- registry["q-sidepanel"].props.open.currentValue = true;
1595
- componentRegistry.set({ ...registry });
1596
- }
1597
- }
1598
- }
1599
- if (target.id === "stageOpenDialogBtn") {
1600
- const dialog = this.querySelector("q-dialog");
1601
- if (dialog) {
1602
- dialog.open = true;
1603
- const registry = componentRegistry();
1604
- if (registry["q-dialog"] && registry["q-dialog"].props) {
1605
- registry["q-dialog"].props.open.currentValue = true;
1606
- componentRegistry.set({ ...registry });
1607
- }
1608
- }
1609
- }
1610
- if (target.id === "stageShowToastBtn") {
1611
- const toastHost = this.querySelector("q-toast");
1612
- toastHost?.error("Couldn't delete user", "System-protected accounts cannot be deleted.");
1613
- }
1614
- if (target.classList.contains("var-open-panel-btn")) {
1615
- const card = target.closest(".variant-card");
1616
- if (card) {
1617
- const panel = card.querySelector("q-sidepanel");
1618
- if (panel)
1619
- panel.open = true;
1620
- }
1621
- }
1622
- if (target.classList.contains("var-open-dialog-btn")) {
1623
- const card = target.closest(".variant-card");
1624
- if (card) {
1625
- const dialog = card.querySelector("q-dialog");
1626
- if (dialog)
1627
- dialog.open = true;
1628
- }
1629
- }
1630
- });
1631
- this.cleanupEffect = effect(() => {
1632
- const active = activeComponent();
1633
- const tab = activeTab();
1634
- const registry = componentRegistry();
1635
- const spec = registry[active];
1636
- this.setAttribute("active-component", active);
1637
- this.querySelectorAll(".stage-content-wrapper > .tab-content").forEach((c) => {
1638
- if (active === "global-styling") {
1639
- c.classList.toggle("active", c.id === "content-global-styling");
1640
- } else {
1641
- c.classList.toggle("active", c.id === `content-${tab}`);
1642
- }
1643
- });
1644
- if (active !== "global-styling" && spec) {
1645
- if (tab === "variants") {
1646
- this.renderVariantsMatrix(active, spec);
1647
- } else if (tab === "edgecases") {
1648
- this.renderEdgeCases(active, spec);
1649
- }
1650
- }
1651
- });
1652
- }
1653
- renderVariantsMatrix(tag, config) {
1654
- if (!this.variantsGrid)
1655
- return;
1656
- this.variantsGrid.innerHTML = "";
1657
- const variants = config.variants;
1658
- if (!variants || variants.length === 0) {
1659
- this.variantsGrid.innerHTML = emptyState("No variant matrix defined for this component.");
1660
- return;
1661
- }
1662
- variants.forEach((variant) => {
1663
- const card = document.createElement("variant-card");
1664
- card.tag = tag;
1665
- card.item = variant;
1666
- this.variantsGrid.appendChild(card);
1667
- });
1668
- }
1669
- renderEdgeCases(tag, config) {
1670
- if (!this.edgecasesGrid)
1671
- return;
1672
- this.edgecasesGrid.innerHTML = "";
1673
- const edgeCases = config.edgeCases;
1674
- if (!edgeCases || edgeCases.length === 0) {
1675
- this.edgecasesGrid.innerHTML = emptyState("No stress-test layout edge cases defined for this component.");
1676
- return;
1677
- }
1678
- edgeCases.forEach((edge) => {
1679
- const card = document.createElement("variant-card");
1680
- card.tag = tag;
1681
- card.item = edge;
1682
- this.edgecasesGrid.appendChild(card);
1683
- });
1684
- }
1685
- disconnectedCallback() {
1686
- if (this.cleanupEffect) {
1687
- this.cleanupEffect();
1688
- }
1689
- }
1690
- }
1691
- customElements.define("sandbox-viewport", SandboxViewport);
1692
-
1693
- // src/playground/components/playground-event-log/playground-event-log.css
1694
- var playground_event_log_default = `.event-log-container {
1695
- background: var(--q-bg-surface-1);
1696
- border: var(--q-border);
1697
- border-radius: var(--q-radius-lg);
1698
- overflow: hidden;
1699
- height: 100%;
1700
- box-sizing: border-box;
1701
- }
1702
-
1703
- .event-log-header {
1704
- display: flex;
1705
- justify-content: space-between;
1706
- align-items: center;
1707
- padding: 8px 16px;
1708
- background: var(--q-bg-surface-2);
1709
- border-bottom: var(--q-border);
1710
- font-size: 0.8rem;
1711
- color: var(--q-fg-muted);
1712
- }
1713
-
1714
- .clear-log-btn {
1715
- background: transparent;
1716
- border: var(--q-border);
1717
- color: var(--q-fg-base);
1718
- border-radius: 4px;
1719
- padding: 2px 6px;
1720
- font-size: 0.75rem;
1721
- cursor: pointer;
1722
- }
1723
-
1724
- .clear-log-btn:hover {
1725
- background: var(--q-btn-hover-overlay);
1726
- }
1727
-
1728
- .event-log-body {
1729
- padding: 12px 16px;
1730
- font-family: monospace;
1731
- font-size: 0.8rem;
1732
- display: flex;
1733
- flex-direction: column;
1734
- gap: 4px;
1735
- min-height: 50px;
1736
- }
1737
-
1738
- .log-placeholder {
1739
- color: var(--q-fg-muted);
1740
- font-style: italic;
1741
- }
1742
-
1743
- .log-item {
1744
- color: var(--q-color-success);
1745
- word-break: break-all;
1746
- }
1747
-
1748
- .log-item-time {
1749
- color: var(--q-fg-muted);
1750
- margin-right: 8px;
1751
- }
1752
- `;
1753
-
1754
- // src/playground/components/playground-event-log/playground-event-log.tsx
1755
- class PlaygroundEventLog extends HTMLElement {
1756
- logBody = null;
1757
- syntaxBox = null;
1758
- unsubscribeBus;
1759
- connectedCallback() {
1760
- this.innerHTML = "";
1761
- this.appendChild(/* @__PURE__ */ h("q-syntax-box", {
1762
- variant: "panel",
1763
- heading: "Event Dispatches Log",
1764
- id: "eventLogBox"
1765
- }, /* @__PURE__ */ h("q-button", {
1766
- slot: "actions",
1767
- variant: "ghost",
1768
- size: "sm",
1769
- id: "clearLogBtn",
1770
- onClick: () => this.clearLog()
1771
- }, /* @__PURE__ */ h("q-icon", {
1772
- slot: "icon-left",
1773
- lib: "local",
1774
- name: "trash-2",
1775
- size: "sm"
1776
- }), /* @__PURE__ */ h("q-tooltip", {
1777
- slot: "icon-left",
1778
- position: "bottom",
1779
- content: "Clear Log"
1780
- })), /* @__PURE__ */ h("div", {
1781
- id: "eventLogBody",
1782
- class: "event-log-body"
1783
- }, /* @__PURE__ */ h("span", {
1784
- class: "log-placeholder"
1785
- }, "Interactive events will appear here in real-time..."))));
1786
- const styleId = "playground-event-log-style";
1787
- if (!document.getElementById(styleId)) {
1788
- const style = document.createElement("style");
1789
- style.id = styleId;
1790
- style.textContent = playground_event_log_default;
1791
- document.head.appendChild(style);
1792
- }
1793
- this.init();
1794
- }
1795
- init() {
1796
- this.logBody = this.querySelector("#eventLogBody");
1797
- this.syntaxBox = this.querySelector("#eventLogBox");
1798
- this.unsubscribeBus = playgroundBus.on("event-dispatched", (data) => {
1799
- this.logEvent(data.name, data.detail);
1800
- });
1801
- }
1802
- logEvent(name, detail) {
1803
- if (!this.logBody)
1804
- return;
1805
- const placeholder = this.logBody.querySelector(".log-placeholder");
1806
- if (placeholder)
1807
- placeholder.remove();
1808
- const now = new Date;
1809
- const ms = String(now.getMilliseconds()).padStart(3, "0");
1810
- const timeStr = now.toTimeString().split(" ")[0] + "." + ms;
1811
- const line = document.createElement("div");
1812
- line.className = "log-item";
1813
- line.innerHTML = `
1814
- <span class="log-item-time">[${timeStr}]</span>
1815
- <strong>${name}</strong>: ${detail !== undefined ? JSON.stringify(detail) : "<em>(void detail)</em>"}
1816
- `;
1817
- this.logBody.appendChild(line);
1818
- if (this.syntaxBox && typeof this.syntaxBox.scrollToBottom === "function") {
1819
- this.syntaxBox.scrollToBottom();
1820
- }
1821
- }
1822
- clearLog() {
1823
- if (this.logBody) {
1824
- this.logBody.innerHTML = '<span class="log-placeholder">Interactive events will appear here in real-time...</span>';
1825
- }
1826
- }
1827
- disconnectedCallback() {
1828
- if (this.unsubscribeBus) {
1829
- this.unsubscribeBus();
1830
- }
1831
- }
1832
- }
1833
- customElements.define("playground-event-log", PlaygroundEventLog);
1834
-
1835
- // src/playground/components/playground-code-preview/playground-code-preview.css
1836
- var playground_code_preview_default = `.code-preview-container {
1837
- position: relative;
1838
- border-radius: var(--q-radius-lg);
1839
- background: var(--q-bg-surface-1);
1840
- border: var(--q-border);
1841
- overflow: hidden;
1842
- height: 100%;
1843
- box-sizing: border-box;
1844
- }
1845
-
1846
- .code-preview-header {
1847
- display: flex;
1848
- justify-content: space-between;
1849
- align-items: center;
1850
- padding: 8px 16px;
1851
- background: var(--q-bg-surface-2);
1852
- border-bottom: var(--q-border);
1853
- font-size: 0.8rem;
1854
- color: var(--q-fg-muted);
1855
- }
1856
-
1857
- .copy-btn {
1858
- background: transparent;
1859
- border: var(--q-border);
1860
- color: var(--q-fg-base);
1861
- border-radius: 4px;
1862
- padding: 4px 8px;
1863
- font-size: 0.75rem;
1864
- cursor: pointer;
1865
- transition:
1866
- background-color 0.2s,
1867
- border-color 0.2s,
1868
- color 0.2s;
1869
- }
1870
-
1871
- .copy-btn:hover {
1872
- background: var(--q-btn-hover-overlay);
1873
- border-color: var(--q-fg-muted);
1874
- }
1875
-
1876
- .code-preview-body {
1877
- margin: 0;
1878
- padding: 16px;
1879
- overflow-x: auto;
1880
- font-family:
1881
- ui-monospace,
1882
- SFMono-Regular,
1883
- SF Mono,
1884
- Menlo,
1885
- Consolas,
1886
- Liberation Mono,
1887
- monospace;
1888
- font-size: 0.85rem;
1889
- line-height: 1.5;
1890
- color: var(--q-fg-base);
1891
- }
1892
-
1893
- /* Syntax highlighting */
1894
- .code-comment {
1895
- color: var(--q-fg-muted);
1896
- font-style: italic;
1897
- }
1898
- .code-tag {
1899
- color: var(--q-color-danger);
1900
- font-weight: 600;
1901
- }
1902
- .code-attr {
1903
- color: var(--q-color-primary);
1904
- }
1905
- .code-value {
1906
- color: var(--q-color-success);
1907
- }
1908
- `;
1909
-
1910
- // src/playground/components/playground-code-preview/playground-code-preview.tsx
1911
- class PlaygroundCodePreview extends HTMLElement {
1912
- codeBlockBox = null;
1913
- cleanupCodeEffect;
1914
- connectedCallback() {
1915
- this.innerHTML = "";
1916
- this.appendChild(/* @__PURE__ */ h("q-syntax-box", {
1917
- variant: "panel",
1918
- heading: "LIVE RENDER MARKUP",
1919
- copyable: "true",
1920
- id: "codeBlockBox"
1921
- }));
1922
- const styleId = "playground-code-preview-style";
1923
- if (!document.getElementById(styleId)) {
1924
- const style = document.createElement("style");
1925
- style.id = styleId;
1926
- style.textContent = playground_code_preview_default;
1927
- document.head.appendChild(style);
1928
- }
1929
- this.init();
1930
- }
1931
- init() {
1932
- this.codeBlockBox = this.querySelector("#codeBlockBox");
1933
- this.cleanupCodeEffect = effect(() => {
1934
- const active = activeComponent();
1935
- const registry = componentRegistry();
1936
- const config = registry[active];
1937
- if (config) {
1938
- this.updateCodeBlock(active, config);
1939
- }
1940
- });
1941
- }
1942
- updateCodeBlock(tag, config) {
1943
- if (!this.codeBlockBox || !config)
1944
- return;
1945
- const appendScript = tag === "q-dropdown" && config.options ? `
1946
-
1947
- <!-- Programmatic dropdown options population script -->
1948
- <script>
1949
- const dropdown = document.querySelector('${tag}');
1950
- dropdown.options = ${JSON.stringify(config.options, null, 2).replace(/\n/g, `
1951
- `)};
1952
- </script>` : null;
1953
- this.codeBlockBox.code = serializeComponentCode(tag, config.props, config.slots, appendScript);
1954
- }
1955
- disconnectedCallback() {
1956
- if (this.cleanupCodeEffect) {
1957
- this.cleanupCodeEffect();
1958
- }
1959
- }
1960
- }
1961
- customElements.define("playground-code-preview", PlaygroundCodePreview);
1962
-
1963
- // src/playground/components/properties-panel/property-row.tsx
1964
- var CONTROL_FACTORY = {
1965
- boolean: (propName, prop) => /* @__PURE__ */ h("q-toggle", {
1966
- type: "switch",
1967
- size: "sm",
1968
- "data-prop": propName,
1969
- checked: prop.currentValue,
1970
- onQChange: (e) => updateKnobValue("prop", propName, e.detail)
1971
- }),
1972
- select: (propName, prop) => {
1973
- const options = prop.options ? prop.options.map((opt) => ({ label: opt || "(none)", value: opt })) : [];
1974
- const dropdown = /* @__PURE__ */ h("q-dropdown", {
1975
- size: "sm",
1976
- "data-prop": propName,
1977
- value: prop.currentValue,
1978
- onQChange: (e) => updateKnobValue("prop", propName, e.detail)
1979
- });
1980
- dropdown.options = options;
1981
- return dropdown;
1982
- },
1983
- number: (propName, prop) => /* @__PURE__ */ h("q-input", {
1984
- type: "number",
1985
- size: "sm",
1986
- "data-prop": propName,
1987
- value: prop.currentValue,
1988
- onQInput: (e) => updateKnobValue("prop", propName, e.detail)
1989
- })
1990
- };
1991
- function createPropControl(propName, prop) {
1992
- const factory = CONTROL_FACTORY[prop.type];
1993
- if (factory)
1994
- return factory(propName, prop);
1995
- return /* @__PURE__ */ h("q-input", {
1996
- type: "text",
1997
- size: "sm",
1998
- "data-prop": propName,
1999
- value: prop.currentValue,
2000
- onQInput: (e) => updateKnobValue("prop", propName, e.detail)
2001
- });
2002
- }
2003
-
2004
- class PropertyRow extends HTMLElement {
2005
- propName;
2006
- prop;
2007
- connectedCallback() {
2008
- if (!this.propName || !this.prop)
2009
- return;
2010
- this.className = "property-row";
2011
- this.innerHTML = "";
2012
- this.appendChild(/* @__PURE__ */ h("div", {
2013
- class: "property-meta"
2014
- }, /* @__PURE__ */ h("span", {
2015
- class: "property-label"
2016
- }, this.propName), /* @__PURE__ */ h("span", {
2017
- class: "property-label-sub"
2018
- }, this.prop.description || "")));
2019
- this.appendChild(/* @__PURE__ */ h("div", {
2020
- class: "property-control-container"
2021
- }, createPropControl(this.propName, this.prop)));
2022
- }
2023
- }
2024
- customElements.define("property-row", PropertyRow);
2025
-
2026
- // src/playground/components/properties-panel/slot-row.tsx
2027
- class SlotRow extends HTMLElement {
2028
- slotName;
2029
- slotConfig;
2030
- activeComponentTag;
2031
- connectedCallback() {
2032
- if (!this.slotName || !this.slotConfig)
2033
- return;
2034
- this.className = "property-row vertical";
2035
- this.innerHTML = "";
2036
- const labelText = this.slotName === "default" ? "default (Inner content)" : `slot="${this.slotName}"`;
2037
- this.appendChild(/* @__PURE__ */ h("div", {
2038
- class: "property-meta"
2039
- }, /* @__PURE__ */ h("span", {
2040
- class: "property-label"
2041
- }, labelText), /* @__PURE__ */ h("span", {
2042
- class: "property-label-sub"
2043
- }, this.slotConfig.description || "")));
2044
- let inputControl;
2045
- if (this.activeComponentTag === "q-data-table" && this.slotName === "footer") {
2046
- inputControl = /* @__PURE__ */ h("q-syntax-box", {
2047
- editable: true,
2048
- language: "html",
2049
- height: "110px",
2050
- "data-slot": this.slotName,
2051
- value: this.slotConfig.currentValue,
2052
- onQInput: (e) => updateKnobValue("slot", this.slotName, e.detail)
2053
- });
2054
- } else if (this.slotConfig.description && (this.slotConfig.description.includes("textarea") || this.slotConfig.description.includes("html"))) {
2055
- inputControl = /* @__PURE__ */ h("q-textarea", {
2056
- rows: 4,
2057
- "data-slot": this.slotName,
2058
- value: this.slotConfig.currentValue,
2059
- onQInput: (e) => updateKnobValue("slot", this.slotName, e.detail)
2060
- });
2061
- } else {
2062
- inputControl = /* @__PURE__ */ h("q-input", {
2063
- type: "text",
2064
- "data-slot": this.slotName,
2065
- value: this.slotConfig.currentValue,
2066
- onQInput: (e) => updateKnobValue("slot", this.slotName, e.detail)
2067
- });
2068
- }
2069
- this.appendChild(inputControl);
2070
- }
2071
- }
2072
- customElements.define("slot-row", SlotRow);
2073
-
2074
- // src/playground/components/properties-panel/properties-panel.css
2075
- var properties_panel_default = `.properties-panel {
2076
- width: 340px;
2077
- --q-sidepanel-panel-width: 340px;
2078
- --q-sidepanel-panel-padding: 0;
2079
- --q-sidepanel-panel-header-padding: 0;
2080
- --q-sidepanel-panel-footer-padding: 0;
2081
- flex-shrink: 0;
2082
- display: flex;
2083
- flex-direction: column;
2084
- height: 100%;
2085
- }
2086
-
2087
- .properties-panel::part(header),
2088
- .properties-panel::part(footer) {
2089
- display: none;
2090
- }
2091
-
2092
- .properties-panel::part(body) {
2093
- overflow: hidden;
2094
- }
2095
-
2096
- .properties-scroll-content {
2097
- padding: 20px;
2098
- display: flex;
2099
- flex-direction: column;
2100
- gap: 24px;
2101
- box-sizing: border-box;
2102
- }
2103
-
2104
- .properties-section-title {
2105
- font-size: 0.8rem;
2106
- text-transform: uppercase;
2107
- letter-spacing: 0.05em;
2108
- color: var(--q-fg-muted);
2109
- border-bottom: var(--q-border);
2110
- padding-bottom: 8px;
2111
- margin: 0 0 12px 0;
2112
- }
2113
-
2114
- .property-row {
2115
- display: flex;
2116
- align-items: center;
2117
- justify-content: space-between;
2118
- padding: 8px 0;
2119
- gap: 12px;
2120
- border-bottom: 1px dashed color-mix(in srgb, var(--q-border-color) 45%, transparent);
2121
- }
2122
-
2123
- .property-row.vertical {
2124
- flex-direction: column;
2125
- align-items: flex-start;
2126
- }
2127
-
2128
- .property-meta {
2129
- flex: 1;
2130
- min-width: 0;
2131
- }
2132
-
2133
- .property-control-container {
2134
- flex: 1;
2135
- display: flex;
2136
- justify-content: flex-end;
2137
- min-width: 0;
2138
- }
2139
-
2140
- .property-label {
2141
- font-size: 0.85rem;
2142
- font-weight: 500;
2143
- color: var(--q-fg-base);
2144
- }
2145
-
2146
- .property-label-sub {
2147
- font-size: 0.7rem;
2148
- color: var(--q-fg-muted);
2149
- display: block;
2150
- margin-top: 2px;
2151
- }
2152
-
2153
- .properties-panel-header {
2154
- display: none;
2155
- }
2156
-
2157
- .properties-toggle-btn {
2158
- display: none;
2159
- position: fixed;
2160
- bottom: 24px;
2161
- right: 24px;
2162
- background: linear-gradient(135deg, var(--q-color-primary) 0%, var(--q-color-primary-hover) 100%);
2163
- color: var(--q-bg-base);
2164
- border: none;
2165
- border-radius: 50px;
2166
- padding: 12px 20px;
2167
- font-weight: 600;
2168
- font-size: 0.9rem;
2169
- cursor: pointer;
2170
- box-shadow: var(--q-glow-interactive);
2171
- align-items: center;
2172
- gap: 8px;
2173
- z-index: 998;
2174
- transition:
2175
- transform 0.2s,
2176
- box-shadow 0.2s;
2177
- }
2178
-
2179
- .properties-toggle-btn:hover {
2180
- transform: translateY(-2px);
2181
- box-shadow: var(--q-shadow-medium), var(--q-glow-interactive);
2182
- }
2183
-
2184
- .properties-toggle-btn:active {
2185
- transform: translateY(0);
2186
- }
2187
-
2188
- .properties-toggle-icon {
2189
- font-size: 1rem;
2190
- }
2191
-
2192
- /* Custom WebQuark Component Properties Layout */
2193
- .property-row:not(.vertical) q-dropdown,
2194
- .property-row:not(.vertical) q-input {
2195
- width: 100% !important;
2196
- display: block !important;
2197
- min-width: 0 !important;
2198
- }
2199
-
2200
- .property-row.vertical q-input,
2201
- .property-row.vertical q-textarea,
2202
- .property-row.vertical q-syntax-box {
2203
- width: 100%;
2204
- max-width: 100%;
2205
- box-sizing: border-box;
2206
- margin-top: 6px;
2207
- display: block;
2208
- }
2209
-
2210
- /* Mobile properties panel overrides */
2211
- @media (max-width: 900px) {
2212
- .properties-panel {
2213
- position: fixed;
2214
- bottom: 0;
2215
- left: 0;
2216
- right: 0;
2217
- height: 60vh;
2218
- width: 100%;
2219
- z-index: 1000;
2220
- transform: translateY(100%);
2221
- transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
2222
- --q-sidepanel-panel-width: 100%;
2223
- border-left: none;
2224
- box-shadow: var(--q-shadow-high);
2225
- box-sizing: border-box;
2226
- display: flex;
2227
- flex-direction: column;
2228
- }
2229
-
2230
- .properties-panel::part(panel) {
2231
- border-left: none;
2232
- border-top: var(--q-border);
2233
- }
2234
-
2235
- .properties-panel.open {
2236
- transform: translateY(0);
2237
- }
2238
-
2239
- .properties-section {
2240
- flex: none;
2241
- }
2242
-
2243
- .properties-panel-header {
2244
- display: flex;
2245
- align-items: center;
2246
- justify-content: space-between;
2247
- padding-bottom: 12px;
2248
- border-bottom: var(--q-border);
2249
- margin-bottom: 8px;
2250
- gap: 16px;
2251
- }
2252
-
2253
- .properties-panel-header span {
2254
- font-weight: 700;
2255
- font-size: 1rem;
2256
- color: var(--q-fg-base);
2257
- flex-shrink: 1;
2258
- min-width: 0;
2259
- overflow: hidden;
2260
- text-overflow: ellipsis;
2261
- white-space: nowrap;
2262
- }
2263
-
2264
- .properties-close-btn {
2265
- background: transparent;
2266
- border: none;
2267
- color: var(--q-fg-base);
2268
- font-size: 1.5rem;
2269
- cursor: pointer;
2270
- padding: 4px 8px;
2271
- line-height: 1;
2272
- display: flex;
2273
- align-items: center;
2274
- justify-content: center;
2275
- flex-shrink: 0;
2276
- }
2277
-
2278
- .properties-toggle-btn {
2279
- display: flex;
2280
- }
2281
- }
2282
-
2283
- .property-empty-state {
2284
- color: var(--q-fg-muted);
2285
- font-size: 0.85rem;
2286
- }
2287
- `;
2288
-
2289
- // src/playground/components/properties-panel/properties-panel.tsx
2290
- class PropertiesPanel extends HTMLElement {
2291
- panel = null;
2292
- attrContainer = null;
2293
- slotContainer = null;
2294
- cleanupEffect;
2295
- lastActiveComponent = null;
2296
- connectedCallback() {
2297
- this.innerHTML = "";
2298
- const toggleBtn = /* @__PURE__ */ h("button", {
2299
- class: "properties-toggle-btn",
2300
- id: "propertiesToggleBtn",
2301
- type: "button",
2302
- onClick: () => this.openPanel()
2303
- }, /* @__PURE__ */ h("span", {
2304
- class: "properties-toggle-icon"
2305
- }, "⚙️"), /* @__PURE__ */ h("span", null, "Properties"));
2306
- const closeBtn = /* @__PURE__ */ h("button", {
2307
- class: "properties-close-btn",
2308
- id: "propertiesCloseBtn",
2309
- type: "button",
2310
- onClick: () => this.closePanel()
2311
- }, "×");
2312
- this.panel = /* @__PURE__ */ h("q-sidepanel", {
2313
- class: "properties-panel",
2314
- id: "propertiesPanel",
2315
- variant: "panel",
2316
- side: "right"
2317
- }, /* @__PURE__ */ h("q-scrollable", {
2318
- height: "100%"
2319
- }, /* @__PURE__ */ h("div", {
2320
- class: "properties-scroll-content"
2321
- }, /* @__PURE__ */ h("div", {
2322
- class: "properties-panel-header"
2323
- }, /* @__PURE__ */ h("span", null, "Component Properties"), closeBtn), /* @__PURE__ */ h("div", {
2324
- class: "properties-section"
2325
- }, /* @__PURE__ */ h("h3", {
2326
- class: "properties-section-title"
2327
- }, "Properties"), /* @__PURE__ */ h("div", {
2328
- id: "attributeProperties"
2329
- })), /* @__PURE__ */ h("div", {
2330
- class: "properties-section",
2331
- style: "margin-top: 10px;"
2332
- }, /* @__PURE__ */ h("h3", {
2333
- class: "properties-section-title"
2334
- }, "Slots (Content)"), /* @__PURE__ */ h("div", {
2335
- id: "slotProperties"
2336
- })))));
2337
- this.appendChild(toggleBtn);
2338
- this.appendChild(this.panel);
2339
- const styleId = "properties-panel-style";
2340
- let style = document.getElementById(styleId);
2341
- if (!style) {
2342
- style = document.createElement("style");
2343
- style.id = styleId;
2344
- document.head.appendChild(style);
2345
- }
2346
- style.textContent = properties_panel_default;
2347
- this.init(toggleBtn);
2348
- }
2349
- init(toggleBtn) {
2350
- this.attrContainer = this.querySelector("#attributeProperties");
2351
- this.slotContainer = this.querySelector("#slotProperties");
2352
- this.cleanupEffect = effect(() => {
2353
- const active = activeComponent();
2354
- const tab = activeTab();
2355
- const registry = componentRegistry();
2356
- const config = registry[active];
2357
- if (active === "global-styling" || tab !== "sandbox") {
2358
- this.style.display = "none";
2359
- toggleBtn.style.display = "none";
2360
- if (this.panel)
2361
- this.panel.classList.remove("open");
2362
- return;
2363
- }
2364
- this.style.display = "";
2365
- toggleBtn.style.display = "";
2366
- if (config) {
2367
- this.buildProperties(config, active);
2368
- }
2369
- });
2370
- }
2371
- buildProperties(config, active) {
2372
- if (!this.attrContainer || !this.slotContainer)
2373
- return;
2374
- if (this.lastActiveComponent !== active) {
2375
- this.attrContainer.innerHTML = "";
2376
- if (config.props && Object.keys(config.props).length > 0) {
2377
- Object.keys(config.props).forEach((propName) => {
2378
- if (config.props) {
2379
- const prop = config.props[propName];
2380
- const row = document.createElement("property-row");
2381
- row.propName = propName;
2382
- row.prop = prop;
2383
- this.attrContainer.appendChild(row);
2384
- }
2385
- });
2386
- } else {
2387
- this.attrContainer.appendChild(/* @__PURE__ */ h("div", {
2388
- class: "property-empty-state"
2389
- }, "No customizable attributes."));
2390
- }
2391
- } else {
2392
- if (config.props) {
2393
- Object.keys(config.props).forEach((propName) => {
2394
- const prop = config.props[propName];
2395
- const control = this.attrContainer.querySelector(`[data-prop="${propName}"]`);
2396
- if (control) {
2397
- if (prop.type === "boolean") {
2398
- if (control.checked !== prop.currentValue) {
2399
- control.checked = prop.currentValue;
2400
- }
2401
- } else {
2402
- if (control.value !== prop.currentValue && document.activeElement !== control) {
2403
- control.value = prop.currentValue;
2404
- }
2405
- }
2406
- }
2407
- });
2408
- }
2409
- }
2410
- if (this.lastActiveComponent !== active) {
2411
- this.slotContainer.innerHTML = "";
2412
- if (config.slots && Object.keys(config.slots).length > 0) {
2413
- Object.keys(config.slots).forEach((slotName) => {
2414
- if (config.slots) {
2415
- const slot = config.slots[slotName];
2416
- const row = document.createElement("slot-row");
2417
- row.slotName = slotName;
2418
- row.slotConfig = slot;
2419
- row.activeComponentTag = active;
2420
- this.slotContainer.appendChild(row);
2421
- }
2422
- });
2423
- } else {
2424
- this.slotContainer.appendChild(/* @__PURE__ */ h("div", {
2425
- class: "property-empty-state"
2426
- }, "No slot options configured."));
2427
- }
2428
- } else {
2429
- if (config.slots) {
2430
- Object.keys(config.slots).forEach((slotName) => {
2431
- const slot = config.slots[slotName];
2432
- const control = this.slotContainer.querySelector(`[data-slot="${slotName}"]`);
2433
- if (control) {
2434
- if (control.value !== slot.currentValue && document.activeElement !== control) {
2435
- control.value = slot.currentValue;
2436
- }
2437
- }
2438
- });
2439
- }
2440
- }
2441
- this.lastActiveComponent = active;
2442
- }
2443
- openPanel() {
2444
- if (this.panel)
2445
- this.panel.classList.add("open");
2446
- }
2447
- closePanel() {
2448
- if (this.panel)
2449
- this.panel.classList.remove("open");
2450
- }
2451
- disconnectedCallback() {
2452
- if (this.cleanupEffect) {
2453
- this.cleanupEffect();
2454
- }
2455
- }
2456
- }
2457
- customElements.define("properties-panel", PropertiesPanel);
2458
-
2459
- // src/playground/components/theme-designer/token-row.tsx
2460
- class TokenRow extends HTMLElement {
2461
- token;
2462
- syncValue() {
2463
- const computedStyle = window.getComputedStyle(document.documentElement);
2464
- const val = computedStyle.getPropertyValue(this.token.name).trim();
2465
- if (this.token.type === "color") {
2466
- const hexVal = convertToHex(val);
2467
- const picker = this.querySelector(".color-swatch-picker");
2468
- const textInput = this.querySelector(".color-text-input");
2469
- if (picker)
2470
- picker.value = hexVal;
2471
- if (textInput)
2472
- textInput.value = hexVal;
2473
- } else if (this.token.type === "radius") {
2474
- const numVal = parseInt(val, 10) || 0;
2475
- const slider = this.querySelector(".range-slider-input");
2476
- const display = this.querySelector(".range-slider-value");
2477
- if (slider)
2478
- slider.value = String(numVal);
2479
- if (display)
2480
- display.innerText = `${numVal}px`;
2481
- }
2482
- }
2483
- connectedCallback() {
2484
- if (!this.token)
2485
- return;
2486
- this.className = "token-row";
2487
- this.innerHTML = "";
2488
- const computedStyle = window.getComputedStyle(document.documentElement);
2489
- const val = computedStyle.getPropertyValue(this.token.name).trim();
2490
- let control;
2491
- if (this.token.type === "color") {
2492
- const hexVal = convertToHex(val);
2493
- const picker = /* @__PURE__ */ h("input", {
2494
- type: "color",
2495
- class: "color-swatch-picker",
2496
- "data-token": this.token.name,
2497
- value: hexVal,
2498
- onInput: (e) => {
2499
- const target = e.target;
2500
- const textInput2 = this.querySelector(".color-text-input");
2501
- if (textInput2)
2502
- textInput2.value = target.value;
2503
- document.documentElement.style.setProperty(this.token.name, target.value);
2504
- }
2505
- });
2506
- const textInput = /* @__PURE__ */ h("input", {
2507
- type: "text",
2508
- class: "color-text-input",
2509
- "data-token": this.token.name,
2510
- value: hexVal,
2511
- onInput: (e) => {
2512
- const target = e.target;
2513
- const newColor = target.value;
2514
- if (/^#[0-9A-F]{6}$/i.test(newColor)) {
2515
- const pickerEl = this.querySelector(".color-swatch-picker");
2516
- if (pickerEl)
2517
- pickerEl.value = newColor;
2518
- document.documentElement.style.setProperty(this.token.name, newColor);
2519
- }
2520
- }
2521
- });
2522
- control = /* @__PURE__ */ h("div", {
2523
- class: "color-input-container"
2524
- }, /* @__PURE__ */ h("div", {
2525
- class: "color-picker-wrapper"
2526
- }, picker), textInput);
2527
- } else {
2528
- const numVal = parseInt(val, 10) || 0;
2529
- const valDisplay = /* @__PURE__ */ h("span", {
2530
- class: "range-slider-value",
2531
- "data-token": this.token.name
2532
- }, numVal, "px");
2533
- const slider = /* @__PURE__ */ h("input", {
2534
- type: "range",
2535
- class: "range-slider-input",
2536
- min: String(this.token.min ?? 0),
2537
- max: String(this.token.max ?? 40),
2538
- value: String(numVal),
2539
- "data-token": this.token.name,
2540
- onInput: (e) => {
2541
- const target = e.target;
2542
- valDisplay.innerText = `${target.value}px`;
2543
- document.documentElement.style.setProperty(this.token.name, `${target.value}px`);
2544
- }
2545
- });
2546
- control = /* @__PURE__ */ h("div", {
2547
- class: "range-slider-container"
2548
- }, slider, valDisplay);
2549
- }
2550
- this.appendChild(/* @__PURE__ */ h("div", {
2551
- class: "token-info"
2552
- }, /* @__PURE__ */ h("span", {
2553
- class: "token-label"
2554
- }, this.token.label), /* @__PURE__ */ h("span", {
2555
- class: "token-desc"
2556
- }, this.token.desc)));
2557
- this.appendChild(/* @__PURE__ */ h("div", {
2558
- class: "token-control-wrapper"
2559
- }, control));
2560
- }
2561
- }
2562
- customElements.define("token-row", TokenRow);
2563
-
2564
- // src/playground/components/theme-designer/token-section.tsx
2565
- class TokenSection extends HTMLElement {
2566
- categoryName;
2567
- tokens;
2568
- connectedCallback() {
2569
- if (!this.categoryName || !this.tokens)
2570
- return;
2571
- this.className = "theme-section-card";
2572
- this.innerHTML = "";
2573
- this.appendChild(/* @__PURE__ */ h("h3", null, this.categoryName));
2574
- this.tokens.forEach((token) => {
2575
- const row = document.createElement("token-row");
2576
- row.token = token;
2577
- this.appendChild(row);
2578
- });
2579
- }
2580
- }
2581
- customElements.define("token-section", TokenSection);
2582
-
2583
- // src/playground/components/theme-designer/theme-designer.css
2584
- var theme_designer_default = `.theme-designer-container {
2585
- padding: 32px 24px;
2586
- max-width: 1000px;
2587
- margin: 0 auto;
2588
- }
2589
-
2590
- .theme-designer-header {
2591
- display: flex;
2592
- align-items: center;
2593
- justify-content: space-between;
2594
- margin-bottom: 8px;
2595
- flex-wrap: wrap;
2596
- gap: 16px;
2597
- }
2598
-
2599
- .theme-designer-header h2 {
2600
- font-size: 1.75rem;
2601
- font-weight: 700;
2602
- margin: 0;
2603
- background: linear-gradient(135deg, var(--q-fg-base) 30%, var(--q-color-primary) 100%);
2604
- -webkit-background-clip: text;
2605
- -webkit-text-fill-color: transparent;
2606
- }
2607
-
2608
- .theme-designer-desc {
2609
- font-size: 0.95rem;
2610
- color: var(--q-fg-muted);
2611
- margin: 0 0 32px 0;
2612
- line-height: 1.5;
2613
- }
2614
-
2615
- .reset-theme-btn {
2616
- display: flex;
2617
- align-items: center;
2618
- gap: 8px;
2619
- background: transparent;
2620
- border: var(--q-border);
2621
- color: var(--q-fg-base);
2622
- padding: 8px 16px;
2623
- border-radius: var(--q-radius-md, 8px);
2624
- font-size: 0.85rem;
2625
- font-weight: 600;
2626
- cursor: pointer;
2627
- transition: all 0.2s ease;
2628
- }
2629
-
2630
- .reset-theme-btn:hover {
2631
- background: var(--q-btn-hover-overlay);
2632
- border-color: var(--q-fg-base);
2633
- }
2634
-
2635
- .theme-sections-grid {
2636
- display: grid;
2637
- grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
2638
- gap: 24px;
2639
- margin-top: 16px;
2640
- }
2641
-
2642
- .theme-section-card {
2643
- background: var(--q-bg-surface-1);
2644
- border: var(--q-border);
2645
- border-radius: var(--q-radius-lg, 12px);
2646
- padding: 24px;
2647
- box-shadow: var(--q-shadow-low);
2648
- }
2649
-
2650
- .theme-section-card h3 {
2651
- font-size: 1.15rem;
2652
- font-weight: 600;
2653
- margin: 0 0 20px 0;
2654
- padding-bottom: 10px;
2655
- border-bottom: var(--q-border);
2656
- color: var(--q-fg-base);
2657
- }
2658
-
2659
- .token-row {
2660
- display: flex;
2661
- flex-direction: column;
2662
- gap: 8px;
2663
- margin-bottom: 20px;
2664
- }
2665
-
2666
- .token-row:last-child {
2667
- margin-bottom: 0;
2668
- }
2669
-
2670
- .token-info {
2671
- display: flex;
2672
- flex-direction: column;
2673
- }
2674
-
2675
- .token-label {
2676
- font-size: 0.9rem;
2677
- font-weight: 600;
2678
- color: var(--q-fg-base);
2679
- }
2680
-
2681
- .token-desc {
2682
- font-size: 0.75rem;
2683
- color: var(--q-fg-muted);
2684
- }
2685
-
2686
- .token-control-wrapper {
2687
- display: flex;
2688
- align-items: center;
2689
- gap: 12px;
2690
- }
2691
-
2692
- /* Color control styling */
2693
- .color-input-container {
2694
- display: flex;
2695
- align-items: center;
2696
- gap: 8px;
2697
- width: 100%;
2698
- }
2699
-
2700
- .color-picker-wrapper {
2701
- position: relative;
2702
- width: 38px;
2703
- height: 38px;
2704
- border-radius: var(--q-radius-md, 8px);
2705
- overflow: hidden;
2706
- border: var(--q-border);
2707
- cursor: pointer;
2708
- flex-shrink: 0;
2709
- }
2710
-
2711
- .color-swatch-picker {
2712
- position: absolute;
2713
- top: -8px;
2714
- left: -8px;
2715
- width: 56px;
2716
- height: 56px;
2717
- padding: 0;
2718
- border: 0;
2719
- cursor: pointer;
2720
- background: none;
2721
- }
2722
-
2723
- .color-text-input {
2724
- flex: 1;
2725
- background: var(--q-bg-base);
2726
- border: var(--q-border);
2727
- color: var(--q-fg-base);
2728
- padding: 8px 12px;
2729
- border-radius: var(--q-radius-md, 8px);
2730
- font-size: 0.85rem;
2731
- font-family: monospace;
2732
- }
2733
-
2734
- .color-text-input:focus {
2735
- outline: none;
2736
- border-color: var(--q-color-primary);
2737
- }
2738
-
2739
- /* Range input/slider overrides */
2740
- .range-slider-container {
2741
- display: flex;
2742
- align-items: center;
2743
- gap: 12px;
2744
- width: 100%;
2745
- }
2746
-
2747
- .range-slider-input {
2748
- flex: 1;
2749
- -webkit-appearance: none;
2750
- appearance: none;
2751
- height: 6px;
2752
- border-radius: 3px;
2753
- background: var(--q-bg-surface-2);
2754
- outline: none;
2755
- }
2756
-
2757
- .range-slider-input::-webkit-slider-thumb {
2758
- -webkit-appearance: none;
2759
- appearance: none;
2760
- width: 16px;
2761
- height: 16px;
2762
- border-radius: 50%;
2763
- background: var(--q-color-primary);
2764
- cursor: pointer;
2765
- transition: transform 0.1s ease;
2766
- }
2767
-
2768
- .range-slider-input::-webkit-slider-thumb:hover {
2769
- transform: scale(1.2);
2770
- }
2771
-
2772
- .range-slider-value {
2773
- font-size: 0.85rem;
2774
- font-family: monospace;
2775
- color: var(--q-fg-base);
2776
- min-width: 40px;
2777
- text-align: right;
2778
- }
2779
- `;
2780
-
2781
- // src/playground/components/theme-designer/theme-designer.tsx
2782
- var THEME_TOKENS = [
2783
- {
2784
- category: "Brand & Status Colors",
2785
- tokens: [
2786
- { name: "--q-color-primary", label: "Primary Color", type: "color", desc: "Main brand/accent color" },
2787
- { name: "--q-color-primary-hover", label: "Primary Hover", type: "color", desc: "Hover state for primary actions" },
2788
- { name: "--q-color-secondary", label: "Secondary Color", type: "color", desc: "Secondary/muted accent color" },
2789
- { name: "--q-color-success", label: "Success Color", type: "color", desc: "Success indicator" },
2790
- { name: "--q-color-warning", label: "Warning Color", type: "color", desc: "Warning indicator" },
2791
- { name: "--q-color-danger", label: "Danger Color", type: "color", desc: "Danger/Error indicator" }
2792
- ]
2793
- },
2794
- {
2795
- category: "Surfaces & Backgrounds",
2796
- tokens: [
2797
- { name: "--q-bg-base", label: "Base Background", type: "color", desc: "Lowest canvas background" },
2798
- { name: "--q-bg-surface-1", label: "Surface 1", type: "color", desc: "Sidebar / primary panels" },
2799
- { name: "--q-bg-surface-2", label: "Surface 2", type: "color", desc: "Cards / nested panels" },
2800
- { name: "--q-bg-surface-3", label: "Surface 3", type: "color", desc: "Popovers / raised controls" },
2801
- { name: "--q-bg-surface-4", label: "Surface 4", type: "color", desc: "Strong raised surfaces" },
2802
- { name: "--q-bg-surface-5", label: "Surface 5", type: "color", desc: "Highest contrast neutral surface" }
2803
- ]
2804
- },
2805
- {
2806
- category: "Borders & Outlines",
2807
- tokens: [
2808
- { name: "--q-border-color", label: "Border Color", type: "color", desc: "Subtle container border" }
2809
- ]
2810
- },
2811
- {
2812
- category: "Border Radii",
2813
- tokens: [
2814
- { name: "--q-radius-sm", label: "Small Radius", type: "radius", min: 0, max: 40, desc: "Badges and small components" },
2815
- { name: "--q-radius-md", label: "Medium Radius", type: "radius", min: 0, max: 40, desc: "Buttons, inputs, thumbnails" },
2816
- { name: "--q-radius-lg", label: "Large Radius", type: "radius", min: 0, max: 40, desc: "Cards, dropdown menus, panels" }
2817
- ]
2818
- }
2819
- ];
2820
-
2821
- class ThemeDesigner extends HTMLElement {
2822
- cleanupThemeSync;
2823
- connectedCallback() {
2824
- this.innerHTML = "";
2825
- this.appendChild(/* @__PURE__ */ h("div", {
2826
- class: "theme-designer-container"
2827
- }, /* @__PURE__ */ h("div", {
2828
- class: "theme-designer-header"
2829
- }, /* @__PURE__ */ h("div", {
2830
- style: "flex: 1"
2831
- }, /* @__PURE__ */ h("h2", {
2832
- style: "margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--q-fg-base)"
2833
- }, "Global Styling Designer"), /* @__PURE__ */ h("p", {
2834
- class: "theme-designer-desc"
2835
- }, "Customize global brand tokens and spacing variables. Overrides apply instantly to all sandbox components.")), /* @__PURE__ */ h("button", {
2836
- id: "resetThemeBtn",
2837
- class: "reset-theme-btn",
2838
- type: "button",
2839
- onClick: () => this.resetTheme()
2840
- }, /* @__PURE__ */ h("q-icon", {
2841
- name: "refresh-cw",
2842
- lib: "lucide",
2843
- size: "16"
2844
- }), /* @__PURE__ */ h("span", null, "Reset to Default"))), this.renderGrid()));
2845
- const styleId = "theme-designer-style";
2846
- if (!document.getElementById(styleId)) {
2847
- const style = document.createElement("style");
2848
- style.id = styleId;
2849
- style.textContent = theme_designer_default;
2850
- document.head.appendChild(style);
2851
- }
2852
- this.init();
2853
- }
2854
- init() {
2855
- this.cleanupThemeSync = effect(() => {
2856
- theme();
2857
- setTimeout(() => this.syncThemeInputs(), 50);
2858
- });
2859
- }
2860
- renderGrid() {
2861
- const grid = /* @__PURE__ */ h("div", {
2862
- class: "theme-sections-grid",
2863
- id: "themeSectionsGrid"
2864
- });
2865
- THEME_TOKENS.forEach((cat) => {
2866
- const card = document.createElement("token-section");
2867
- card.categoryName = cat.category;
2868
- card.tokens = cat.tokens;
2869
- grid.appendChild(card);
2870
- });
2871
- return grid;
2872
- }
2873
- resetTheme() {
2874
- document.documentElement.style.cssText = "";
2875
- setTimeout(() => this.syncThemeInputs(), 50);
2876
- }
2877
- syncThemeInputs() {
2878
- this.querySelectorAll("token-row").forEach((row) => {
2879
- if (typeof row.syncValue === "function") {
2880
- row.syncValue();
2881
- }
2882
- });
2883
- }
2884
- disconnectedCallback() {
2885
- if (this.cleanupThemeSync) {
2886
- this.cleanupThemeSync();
2887
- }
2888
- }
2889
- }
2890
- customElements.define("theme-designer", ThemeDesigner);
2891
-
2892
- // src/playground/playground.ts
2893
- fetchComponentSpec("q-button");