@epa-wg/custom-element-dist 0.0.25 → 0.0.27

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 (332) hide show
  1. package/.idea/custom-element-dist.iml +1 -5
  2. package/.storybook/main.ts +1 -3
  3. package/.storybook/preview-head.html +8 -0
  4. package/.storybook/preview.ts +13 -5
  5. package/README.md +4 -4
  6. package/bin/postinstall.sh +3 -2
  7. package/bin/vitest/vitest-browser-importmaps.mjs +20 -0
  8. package/coverage/coverage-final.json +14 -11
  9. package/coverage/index.html +51 -36
  10. package/coverage/src/custom-element/coverage.svg +1 -1
  11. package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
  12. package/coverage/src/custom-element/custom-element.js.html +596 -386
  13. package/coverage/src/custom-element/demo/coverage.svg +10 -0
  14. package/coverage/src/custom-element/demo/index.html +116 -0
  15. package/coverage/src/custom-element/demo/z.js/coverage.svg +10 -0
  16. package/coverage/src/custom-element/demo/z.js.html +112 -0
  17. package/coverage/src/custom-element/http-request.js.html +12 -12
  18. package/coverage/src/custom-element/index.html +33 -18
  19. package/coverage/src/custom-element/local-storage.js.html +56 -41
  20. package/coverage/src/custom-element/location-element.js.html +4 -4
  21. package/coverage/src/custom-element/module-url.js/coverage.svg +10 -0
  22. package/coverage/src/custom-element/module-url.js.html +187 -0
  23. package/coverage/src/index.html +1 -1
  24. package/coverage/src/mocks/coverage.svg +1 -1
  25. package/coverage/src/mocks/handlers.ts/coverage.svg +1 -1
  26. package/coverage/src/mocks/handlers.ts.html +36 -12
  27. package/coverage/src/mocks/index.html +19 -19
  28. package/coverage/src/stories/attributes.test.stories.ts.html +9 -15
  29. package/coverage/src/stories/coverage.svg +1 -1
  30. package/coverage/src/stories/css.test.stories.ts.html +1 -1
  31. package/coverage/src/stories/dom-merge.test.stories.ts.html +15 -9
  32. package/coverage/src/stories/external-template.test.stories.ts.html +27 -18
  33. package/coverage/src/stories/form.test.stories.ts.html +1 -1
  34. package/coverage/src/stories/http-request.stories.ts.html +1 -1
  35. package/coverage/src/stories/index.html +48 -33
  36. package/coverage/src/stories/local-storage.test.stories.ts/coverage.svg +1 -1
  37. package/coverage/src/stories/local-storage.test.stories.ts.html +87 -63
  38. package/coverage/src/stories/location-element.test.stories.ts.html +1 -1
  39. package/coverage/src/stories/module-url.test.stories.ts/coverage.svg +10 -0
  40. package/coverage/src/stories/module-url.test.stories.ts.html +634 -0
  41. package/coverage/src/stories/set-url.test.stories.ts.html +1 -1
  42. package/coverage/src/stories/slice-events.test.stories.ts.html +1 -1
  43. package/coverage/src/stories/slots.test.stories.ts.html +1 -1
  44. package/coverage/src/stories/testStoryBook.ts.html +12 -12
  45. package/coverage/src/stories/version-select.test.stories.ts.html +98 -20
  46. package/coverage/src/sum.ts.html +1 -1
  47. package/dist/confused.svg +1 -0
  48. package/dist/custom-element-BMMsP1Dy.js +533 -0
  49. package/dist/custom-element-CPSk7s0j.cjs +87 -0
  50. package/dist/custom-element-bundle.cjs +1 -1
  51. package/dist/custom-element-bundle.js +28 -25
  52. package/dist/demo/a.html +60 -0
  53. package/dist/demo/a.svg +27 -0
  54. package/dist/demo/b.html +13 -0
  55. package/dist/demo/confused.svg +38 -0
  56. package/dist/demo/data-slices.html +216 -0
  57. package/dist/demo/dce-social-preview.png +0 -0
  58. package/dist/demo/demo.css +25 -0
  59. package/dist/demo/dom-merge.html +123 -0
  60. package/dist/demo/embed-1.html +2 -0
  61. package/dist/demo/external-template.html +239 -0
  62. package/dist/demo/form.html +239 -0
  63. package/dist/demo/hex-grid-dce.html +183 -0
  64. package/dist/demo/hex-grid-transform.png +0 -0
  65. package/dist/demo/hex-grid.html +66 -0
  66. package/dist/demo/html-template.html +126 -0
  67. package/dist/demo/html-template.xhtml +45 -0
  68. package/dist/demo/html-template.xml +45 -0
  69. package/dist/demo/http-request.html +143 -0
  70. package/dist/demo/lib-dir/Smiley.svg +24 -0
  71. package/dist/demo/lib-dir/embed-lib.html +34 -0
  72. package/dist/demo/local-storage.html +218 -0
  73. package/dist/demo/location-element.html +168 -0
  74. package/dist/demo/logo.png +0 -0
  75. package/dist/demo/module-url.html +215 -0
  76. package/dist/demo/npm-versions-demo.html +118 -0
  77. package/dist/demo/npm-versions.html +94 -0
  78. package/dist/demo/parameters.html +70 -0
  79. package/dist/demo/s.xml +3 -0
  80. package/dist/demo/s.xslt +56 -0
  81. package/dist/demo/s1.xslt +60 -0
  82. package/dist/demo/scoped-css.html +169 -0
  83. package/dist/demo/set-url.html +141 -0
  84. package/dist/demo/ss.html +57 -0
  85. package/dist/demo/table.xml +25 -0
  86. package/dist/demo/table.xsl +293 -0
  87. package/dist/demo/template.xsl +46 -0
  88. package/dist/demo/tree.xml +25 -0
  89. package/dist/demo/tree.xsl +33 -0
  90. package/dist/demo/wc-square.svg +1 -0
  91. package/dist/demo/xhtml-template.xhtml +45 -0
  92. package/dist/demo/z.html +33 -0
  93. package/dist/demo/z.js +9 -0
  94. package/dist/demo/z.xml +60 -0
  95. package/dist/demo/z1.html +34 -0
  96. package/dist/embed-1.html +1 -2
  97. package/dist/local-storage-78EivJ_B.cjs +1 -0
  98. package/dist/local-storage-DzmNKzgN.js +66 -0
  99. package/dist/mockServiceWorker.js +1 -1
  100. package/package.json +95 -93
  101. package/public/confused.svg +1 -0
  102. package/public/demo/a.html +60 -0
  103. package/public/demo/a.svg +27 -0
  104. package/public/demo/b.html +13 -0
  105. package/public/demo/confused.svg +38 -0
  106. package/public/demo/data-slices.html +216 -0
  107. package/public/demo/dce-social-preview.png +0 -0
  108. package/public/demo/demo.css +25 -0
  109. package/public/demo/dom-merge.html +123 -0
  110. package/public/demo/embed-1.html +2 -0
  111. package/public/demo/external-template.html +239 -0
  112. package/public/demo/form.html +239 -0
  113. package/public/demo/hex-grid-dce.html +183 -0
  114. package/public/demo/hex-grid-transform.png +0 -0
  115. package/public/demo/hex-grid.html +66 -0
  116. package/public/demo/html-template.html +126 -0
  117. package/public/demo/html-template.xhtml +45 -0
  118. package/public/demo/html-template.xml +45 -0
  119. package/public/demo/http-request.html +143 -0
  120. package/public/demo/lib-dir/Smiley.svg +24 -0
  121. package/public/demo/lib-dir/embed-lib.html +34 -0
  122. package/public/demo/local-storage.html +218 -0
  123. package/public/demo/location-element.html +168 -0
  124. package/public/demo/logo.png +0 -0
  125. package/public/demo/module-url.html +215 -0
  126. package/public/demo/npm-versions-demo.html +118 -0
  127. package/public/demo/npm-versions.html +94 -0
  128. package/public/demo/parameters.html +70 -0
  129. package/public/demo/s.xml +3 -0
  130. package/public/demo/s.xslt +56 -0
  131. package/public/demo/s1.xslt +60 -0
  132. package/public/demo/scoped-css.html +169 -0
  133. package/public/demo/set-url.html +141 -0
  134. package/public/demo/ss.html +57 -0
  135. package/public/demo/table.xml +25 -0
  136. package/public/demo/table.xsl +293 -0
  137. package/public/demo/template.xsl +46 -0
  138. package/public/demo/tree.xml +25 -0
  139. package/public/demo/tree.xsl +33 -0
  140. package/public/demo/wc-square.svg +1 -0
  141. package/public/demo/xhtml-template.xhtml +45 -0
  142. package/public/demo/z.html +33 -0
  143. package/public/demo/z.js +9 -0
  144. package/public/demo/z.xml +60 -0
  145. package/public/demo/z1.html +34 -0
  146. package/public/embed-1.html +1 -2
  147. package/public/mockServiceWorker.js +1 -1
  148. package/src/custom-element/custom-element.js +103 -33
  149. package/src/custom-element/demo/a.svg +27 -0
  150. package/src/custom-element/demo/confused.svg +1 -0
  151. package/src/custom-element/demo/demo.css +11 -8
  152. package/src/custom-element/demo/embed-1.html +1 -2
  153. package/src/custom-element/demo/external-template.html +122 -62
  154. package/src/custom-element/demo/lib-dir/Smiley.svg +24 -0
  155. package/src/custom-element/demo/lib-dir/embed-lib.html +34 -0
  156. package/src/custom-element/demo/module-url.html +215 -0
  157. package/src/custom-element/demo/npm-versions-demo.html +118 -0
  158. package/src/custom-element/demo/npm-versions.html +94 -0
  159. package/src/custom-element/demo/s.xml +3 -36
  160. package/src/custom-element/demo/s.xslt +55 -96
  161. package/src/custom-element/demo/set-url.html +1 -1
  162. package/src/custom-element/demo/z.html +32 -61
  163. package/src/custom-element/demo/z.js +9 -0
  164. package/src/custom-element/demo/z1.html +34 -0
  165. package/src/custom-element/ide/customData-dce.json +215 -181
  166. package/src/custom-element/ide/web-types-dce.json +184 -159
  167. package/src/custom-element/ide/web-types-xsl.json +1 -1
  168. package/src/custom-element/index.html +21 -3
  169. package/src/custom-element/local-storage.js +19 -14
  170. package/src/custom-element/module-url.js +34 -0
  171. package/src/mocks/handlers.ts +10 -1
  172. package/src/mocks/versions.mock.ts +786 -0
  173. package/src/stories/__screenshots__/http-request.test.ts/http-request-url-change-1.png +0 -0
  174. package/src/stories/attributes.test.stories.ts +3 -5
  175. package/src/stories/dom-merge.test.stories.ts +9 -7
  176. package/src/stories/external-template.test.stories.ts +13 -10
  177. package/src/stories/local-storage.test.stories.ts +61 -53
  178. package/src/stories/module-url.test.stories.ts +183 -0
  179. package/src/stories/version-select.test.stories.ts +38 -12
  180. package/src/sum.test.ts +5 -5
  181. package/src/sum.ts +3 -3
  182. package/storybook-static/assets/Color-KGDBMAHA-CJo5gHY3.js +1 -0
  183. package/storybook-static/assets/{Configure-D0qG3gR9.js → Configure-DdXbGKhY.js} +2 -2
  184. package/storybook-static/assets/DocsRenderer-PKQXORMH-DLnpL5hE.js +2 -0
  185. package/storybook-static/assets/{attributes.test.stories-W34tZdUt.js → attributes.test.stories-Bt5V18qO.js} +10 -12
  186. package/storybook-static/assets/{css.test.stories-BZFYx1TQ.js → css.test.stories-CGYy2daE.js} +1 -1
  187. package/storybook-static/assets/custom-element-D8hcDZHh.js +265 -0
  188. package/storybook-static/assets/{dom-merge.test.stories-S-7U5N3h.js → dom-merge.test.stories-XlsZ0UvX.js} +22 -20
  189. package/storybook-static/assets/{entry-preview-DrgzXgwT.js → entry-preview-BKQ8UCxI.js} +1 -1
  190. package/storybook-static/assets/{entry-preview-docs-Bxv0qQWs.js → entry-preview-docs-BMKNVQXA.js} +2 -2
  191. package/storybook-static/assets/{external-template.test.stories-QIO3lAFz.js → external-template.test.stories-Bt_Pflu8.js} +23 -21
  192. package/storybook-static/assets/{form.test.stories-ClYhj9F1.js → form.test.stories-B0NoI8wm.js} +1 -1
  193. package/storybook-static/assets/handlers-B5969HUu.js +467 -0
  194. package/storybook-static/assets/http-request.stories-B2skuTFV.js +281 -0
  195. package/storybook-static/assets/iframe-Dfrt81rk.js +2 -0
  196. package/storybook-static/assets/index-Ay195x2L.js +605 -0
  197. package/storybook-static/assets/index-C3ChPTMh.js +1 -0
  198. package/storybook-static/assets/index-C7lvoJNv.js +1 -0
  199. package/storybook-static/assets/index-C8k3Z-3Y.js +28 -0
  200. package/storybook-static/assets/{index-DXimoRZY.js → index-D-8MO0q_.js} +1 -1
  201. package/storybook-static/assets/index-DGdNYaqV.js +8 -0
  202. package/storybook-static/assets/index-Gpdhz4ab.js +1 -0
  203. package/storybook-static/assets/lit-element-DzhCn-8W.js +19 -0
  204. package/storybook-static/assets/local-storage.test.stories-DfY6feqG.js +420 -0
  205. package/storybook-static/assets/{location-element.test.stories-DvH1TWK4.js → location-element.test.stories-944AotIJ.js} +1 -1
  206. package/storybook-static/assets/module-url.test.stories-DSKcwApl.js +208 -0
  207. package/storybook-static/assets/{preview-BKCN0mOr.js → preview-0Jj89qip.js} +1 -1
  208. package/storybook-static/assets/preview-AJR7rVPD.js +52 -0
  209. package/storybook-static/assets/{preview-TCN6m6T-.js → preview-BJPLiuSt.js} +1 -1
  210. package/storybook-static/assets/{preview-BDY5ThwJ.js → preview-BMWqy4Bi.js} +1 -1
  211. package/storybook-static/assets/preview-BnWGZYux.js +1 -0
  212. package/storybook-static/assets/preview-CadgX-4y.js +2 -0
  213. package/storybook-static/assets/{preview-BAz7FMXc.js → preview-DB9FwMii.js} +1 -1
  214. package/storybook-static/assets/preview-Djh1_Tal.js +20 -0
  215. package/storybook-static/assets/{set-url.test.stories-GlJOh31I.js → set-url.test.stories-DjLHKkEh.js} +1 -1
  216. package/storybook-static/assets/{slice-events.test.stories-VoNjuPCX.js → slice-events.test.stories-8I_BrHd6.js} +1 -1
  217. package/storybook-static/assets/{slots.test.stories-Da2j9YuO.js → slots.test.stories-CvZz4jyP.js} +1 -1
  218. package/storybook-static/assets/version-select.test.stories-DSxmJylI.js +109 -0
  219. package/storybook-static/confused.svg +1 -0
  220. package/storybook-static/demo/a.html +60 -0
  221. package/storybook-static/demo/a.svg +27 -0
  222. package/storybook-static/demo/b.html +13 -0
  223. package/storybook-static/demo/confused.svg +38 -0
  224. package/storybook-static/demo/data-slices.html +216 -0
  225. package/storybook-static/demo/dce-social-preview.png +0 -0
  226. package/storybook-static/demo/demo.css +25 -0
  227. package/storybook-static/demo/dom-merge.html +123 -0
  228. package/storybook-static/demo/embed-1.html +2 -0
  229. package/storybook-static/demo/external-template.html +239 -0
  230. package/storybook-static/demo/form.html +239 -0
  231. package/storybook-static/demo/hex-grid-dce.html +183 -0
  232. package/storybook-static/demo/hex-grid-transform.png +0 -0
  233. package/storybook-static/demo/hex-grid.html +66 -0
  234. package/storybook-static/demo/html-template.html +126 -0
  235. package/storybook-static/demo/html-template.xhtml +45 -0
  236. package/storybook-static/demo/html-template.xml +45 -0
  237. package/storybook-static/demo/http-request.html +143 -0
  238. package/storybook-static/demo/lib-dir/Smiley.svg +24 -0
  239. package/storybook-static/demo/lib-dir/embed-lib.html +34 -0
  240. package/storybook-static/demo/local-storage.html +218 -0
  241. package/storybook-static/demo/location-element.html +168 -0
  242. package/storybook-static/demo/logo.png +0 -0
  243. package/storybook-static/demo/module-url.html +215 -0
  244. package/storybook-static/demo/npm-versions-demo.html +118 -0
  245. package/storybook-static/demo/npm-versions.html +94 -0
  246. package/storybook-static/demo/parameters.html +70 -0
  247. package/storybook-static/demo/s.xml +3 -0
  248. package/storybook-static/demo/s.xslt +56 -0
  249. package/storybook-static/demo/s1.xslt +60 -0
  250. package/storybook-static/demo/scoped-css.html +169 -0
  251. package/storybook-static/demo/set-url.html +141 -0
  252. package/storybook-static/demo/ss.html +57 -0
  253. package/storybook-static/demo/table.xml +25 -0
  254. package/storybook-static/demo/table.xsl +293 -0
  255. package/storybook-static/demo/template.xsl +46 -0
  256. package/storybook-static/demo/tree.xml +25 -0
  257. package/storybook-static/demo/tree.xsl +33 -0
  258. package/storybook-static/demo/wc-square.svg +1 -0
  259. package/storybook-static/demo/xhtml-template.xhtml +45 -0
  260. package/storybook-static/demo/z.html +33 -0
  261. package/storybook-static/demo/z.js +9 -0
  262. package/storybook-static/demo/z.xml +60 -0
  263. package/storybook-static/demo/z1.html +34 -0
  264. package/storybook-static/embed-1.html +1 -2
  265. package/storybook-static/favicon.svg +1 -7
  266. package/storybook-static/iframe.html +42 -30
  267. package/storybook-static/index.html +36 -18
  268. package/storybook-static/index.json +1 -1
  269. package/storybook-static/mockServiceWorker.js +1 -1
  270. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  271. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  272. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  273. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  274. package/storybook-static/project.json +1 -1
  275. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +39 -36
  276. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +38 -1
  277. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
  278. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +395 -43
  279. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js.LEGAL.txt +0 -18
  280. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
  281. package/storybook-static/sb-addons/interactions-10/manager-bundle.js +221 -22
  282. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  283. package/storybook-static/sb-common-assets/favicon.svg +1 -0
  284. package/storybook-static/sb-manager/globals-module-info.js +995 -1
  285. package/storybook-static/sb-manager/globals-runtime.js +53525 -1
  286. package/storybook-static/sb-manager/globals.js +48 -1
  287. package/storybook-static/sb-manager/runtime.js +11884 -1
  288. package/storybook-static/sb-preview/globals.js +33 -1
  289. package/storybook-static/sb-preview/runtime.js +9437 -108
  290. package/vite.config.js +2 -1
  291. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  292. package/.idea/compiler.xml +0 -6
  293. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  294. package/.vscode/settings.json +0 -24
  295. package/dist/custom-element-DAe7uvIt.js +0 -477
  296. package/dist/custom-element-DZvvhscI.cjs +0 -53
  297. package/dist/local-storage-Boafngui.cjs +0 -1
  298. package/dist/local-storage-BqDEu2kF.js +0 -59
  299. package/storybook-static/assets/Color-PRSJMWNM-CRSv4C7i.js +0 -1
  300. package/storybook-static/assets/DocsRenderer-K4EAMTCU-CG_P5zRZ.js +0 -2
  301. package/storybook-static/assets/WithTooltip-KJL26V4Q-CUqUi5E8.js +0 -1
  302. package/storybook-static/assets/custom-element-DpIq8E2p.js +0 -219
  303. package/storybook-static/assets/formatter-2WMMO6ZP-C-UiBIma.js +0 -58
  304. package/storybook-static/assets/http-request.stories-DCqY5s2i.js +0 -300
  305. package/storybook-static/assets/iframe-CURpvmVV.js +0 -2
  306. package/storybook-static/assets/index-CKw1EbdP.js +0 -1
  307. package/storybook-static/assets/index-CVRyq5ci.js +0 -27
  308. package/storybook-static/assets/index-Cc7K62zD.js +0 -3
  309. package/storybook-static/assets/index-DYpTqTNu.js +0 -1
  310. package/storybook-static/assets/index-DsWii_Ep.js +0 -548
  311. package/storybook-static/assets/index-DuIEV_9C.js +0 -13
  312. package/storybook-static/assets/lit-element-CenEXOuS.js +0 -19
  313. package/storybook-static/assets/local-storage.test.stories-BqgYwqr-.js +0 -419
  314. package/storybook-static/assets/preview-B4GcaC1c.js +0 -1
  315. package/storybook-static/assets/preview-B63p-W8V.js +0 -20
  316. package/storybook-static/assets/preview-DRnyIGXK.js +0 -48
  317. package/storybook-static/assets/preview-DjDbQHPa.js +0 -2
  318. package/storybook-static/assets/syntaxhighlighter-BP7B2CQK-CDpEe51g.js +0 -1
  319. package/storybook-static/assets/version-select.test.stories-DLwf-TPB.js +0 -60
  320. package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -3
  321. package/storybook-static/sb-common-assets/fonts.css +0 -31
  322. package/storybook-static/sb-manager/WithTooltip-KJL26V4Q-5LS5AN27.js +0 -1
  323. package/storybook-static/sb-manager/chunk-B3YDJJJH.js +0 -347
  324. package/storybook-static/sb-manager/chunk-BLWCBWKL.js +0 -9
  325. package/storybook-static/sb-manager/chunk-GUVK2GTO.js +0 -6
  326. package/storybook-static/sb-manager/chunk-LFRML3ZV.js +0 -186
  327. package/storybook-static/sb-manager/chunk-MC7RAF2B.js +0 -274
  328. package/storybook-static/sb-manager/chunk-ZR5JZWHI.js +0 -1
  329. package/storybook-static/sb-manager/formatter-2WMMO6ZP-JI7RHVTW.js +0 -58
  330. package/storybook-static/sb-manager/index.js +0 -1
  331. package/storybook-static/sb-manager/syntaxhighlighter-BP7B2CQK-WOJYHKQR.js +0 -1
  332. /package/storybook-static/sb-addons/{storybook-core-server-presets-0 → storybook-core-core-server-presets-0}/common-manager-bundle.js.LEGAL.txt +0 -0
@@ -1,9 +1,9 @@
1
- import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.js";function p(n){return new Promise(e=>setTimeout(e,n))}function u(n){const{title:e,body:t}=n;return`
1
+ import{w as d,e as a,u as c,f as u}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";function p(n){return new Promise(e=>setTimeout(e,n))}function m(n){const{title:e,body:t}=n;return`
2
2
  <fieldset>
3
3
  <legend>${e}</legend>
4
4
  ${t}
5
5
  </fieldset>
6
- `}const h={title:"dom-merge",render:u},o={args:{title:"Chars count in textarea",body:`
6
+ `}const h={title:"dom-merge",render:m},s={args:{title:"Chars count in textarea",body:`
7
7
  <p>Counter update happens on change event(focus change). The update should not interfere with the input</p>
8
8
  <custom-element>
9
9
  <form>
@@ -16,7 +16,7 @@ import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CV
16
16
  <br/><input placeholder="after textarea input, click here " data-testid="refocus-id" />
17
17
  </form>
18
18
  </custom-element>
19
- `},play:async({canvasElement:n})=>{const e=o.args.title,t=d(n);await t.findByText(e),await p(100),a(await t.findByTestId("textarea-id")).toBeInTheDocument();const i=t.getByTestId("textarea-id");i.value="",i.focus(),await s.keyboard(e),a(i.value).toEqual(e),a(i.value.length).toEqual(e.length),t.getByTestId("refocus-id").focus(),await p(10),a(t.getByTestId("counter-id").textContent).toEqual(""+e?.length,"counter of symbols")}},l={args:{title:"Word count in HTML input field",body:`
19
+ `},play:async({canvasElement:n})=>{const e=s.args.title,t=d(n);await t.findByText(e),await p(100),a(await t.findByTestId("textarea-id")).toBeInTheDocument();const i=t.getByTestId("textarea-id");i.value="",i.focus(),await c.keyboard(e),a(i.value).toEqual(e),a(i.value.length).toEqual(e.length),t.getByTestId("refocus-id").focus(),await p(10),a(t.getByTestId("counter-id").textContent).toEqual(""+e?.length,"counter of symbols")}},o={args:{title:"Word count in HTML input field",body:`
20
20
  <p>Counter update happens on keyup event. The update should not interfere with the input</p>
21
21
  <custom-element>
22
22
  <form>
@@ -46,20 +46,20 @@ import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CV
46
46
  <p><b>txt</b> slice:</p> <blockquote> {//slice/txt} </blockquote>
47
47
  </form>
48
48
  </custom-element>
49
- `},play:async({canvasElement:n})=>{const e=l.args.title,t=d(n);await t.findByText(e);const i=await t.findByTestId("input-id");i.value="",i.focus(),a(i).toBeInTheDocument(),await s.keyboard(e),await p(10),a(i.value).toEqual(e),a(t.getByTestId("chars-id").textContent.trim()).toEqual(""+e.length,"counter of symbols"),a(e.split(" ").length).toEqual(6,"counter of words in text sample"),a(t.getByTestId("words-id").textContent.trim()).toEqual("6","counter of words in render")}},r={args:{title:"Order preserving on 2nd transform",body:`
49
+ `},play:async({canvasElement:n})=>{const e=o.args.title,t=d(n);await t.findByText(e);const i=await t.findByTestId("input-id");i.value="",i.focus(),a(i).toBeInTheDocument(),await c.keyboard(e),await p(10),a(i.value).toEqual(e),a(t.getByTestId("chars-id").textContent.trim()).toEqual(""+e.length,"counter of symbols"),a(e.split(" ").length).toEqual(6,"counter of words in text sample"),a(t.getByTestId("words-id").textContent.trim()).toEqual("6","counter of words in render")}},r={args:{title:"Order preserving on 2nd transform",body:`
50
50
  <p>IF condition content should be displayed in place where it is defined (not shifted down on the parent children)</p>
51
51
  <custom-element>
52
52
  <form slice="f1">
53
- <label>
54
- <input type="checkbox" name="c1" data-testid="cb1"/>
53
+ <label data-testid="cb1">
54
+ <input type="checkbox" name="c1" />
55
55
  click to display #1 bellow
56
56
  </label>
57
57
  <br data-testid="beforeC1"/>
58
58
  <if test="//c1">
59
59
  <p data-testid="isC1">#1</p>
60
60
  </if>
61
- <label>
62
- <input type="checkbox" name="c2" data-testid="cb2"/>
61
+ <label data-testid="cb2">
62
+ <input type="checkbox" name="c2" />
63
63
  click to display #2 bellow
64
64
  </label>
65
65
  <br data-testid="beforeC2"/>
@@ -68,7 +68,7 @@ import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CV
68
68
  </if>
69
69
  </form>
70
70
  </custom-element>
71
- `},play:async({canvasElement:n})=>{const e=r.args.title,t=d(n);await t.findByText(e),await s.click(t.getByTestId("cb1")),await a(await t.findByText("#1")).toBeInTheDocument(),await s.click(t.getByTestId("cb2")),await a(await t.findByText("#2")).toBeInTheDocument(),await a(t.getByTestId("beforeC1").nextElementSibling).toEqual(t.getByTestId("isC1"))}},c={args:{title:"read system validity message",body:`
71
+ `},play:async({canvasElement:n})=>{const e=r.args.title,t=d(n);await t.findByText(e),await u.click(await t.findByTestId("cb1")),await a(await t.findByText("#1")).toBeInTheDocument(),await u.click(t.getByTestId("cb2")),await a(await t.findByText("#2")).toBeInTheDocument(),await a(t.getByTestId("beforeC1").nextElementSibling).toEqual(t.getByTestId("isC1"))}},l={args:{title:"read system validity message",body:`
72
72
  <p>validationMessage propagated into slice as 'validation-message' attribute</p>
73
73
  <ol>
74
74
  <li> type in input field</li>
@@ -89,7 +89,7 @@ import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CV
89
89
  </form>
90
90
  </template>
91
91
  </custom-element>
92
- `},play:async({canvasElement:n})=>{const e=c.args.title,t=d(n);await t.findByText(e),await s.type(t.getByTestId("inp1"),"Hi"),await s.clear(t.getByTestId("inp1")),await s.click(t.getByTestId("btn1")),await a(await t.findByTestId("var1")).toBeInTheDocument(),await a(t.getByTestId("var1").textContent).toEqual(t.getByTestId("inp1").validationMessage),await a(t.getByTestId("var1").textContent.length>1).toEqual(!0)}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
92
+ `},play:async({canvasElement:n})=>{const e=l.args.title,t=d(n);await t.findByText(e),await c.type(t.getByTestId("inp1"),"Hi"),await c.clear(t.getByTestId("inp1")),await c.click(t.getByTestId("btn1")),await a(await t.findByTestId("var1")).toBeInTheDocument(),await a(t.getByTestId("var1").textContent).toEqual(t.getByTestId("inp1").validationMessage),await a(t.getByTestId("var1").textContent.length>1).toEqual(!0)}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
93
93
  args: {
94
94
  title: 'Chars count in textarea',
95
95
  body: \`
@@ -125,7 +125,7 @@ import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CV
125
125
  await sleep(10);
126
126
  expect(canvas.getByTestId('counter-id').textContent).toEqual('' + titleText?.length, 'counter of symbols');
127
127
  }
128
- }`,...o.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
128
+ }`,...s.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
129
129
  args: {
130
130
  title: 'Word count in HTML input field',
131
131
  body: \`
@@ -177,23 +177,23 @@ import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CV
177
177
  expect(titleText.split(' ').length).toEqual(6, 'counter of words in text sample');
178
178
  expect(canvas.getByTestId('words-id').textContent.trim()).toEqual('6', 'counter of words in render');
179
179
  }
180
- }`,...l.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
180
+ }`,...o.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
181
181
  args: {
182
182
  title: 'Order preserving on 2nd transform',
183
183
  body: \`
184
184
  <p>IF condition content should be displayed in place where it is defined (not shifted down on the parent children)</p>
185
185
  <custom-element>
186
186
  <form slice="f1">
187
- <label>
188
- <input type="checkbox" name="c1" data-testid="cb1"/>
187
+ <label data-testid="cb1">
188
+ <input type="checkbox" name="c1" />
189
189
  click to display #1 bellow
190
190
  </label>
191
191
  <br data-testid="beforeC1"/>
192
192
  <if test="//c1">
193
193
  <p data-testid="isC1">#1</p>
194
194
  </if>
195
- <label>
196
- <input type="checkbox" name="c2" data-testid="cb2"/>
195
+ <label data-testid="cb2">
196
+ <input type="checkbox" name="c2" />
197
197
  click to display #2 bellow
198
198
  </label>
199
199
  <br data-testid="beforeC2"/>
@@ -210,13 +210,15 @@ import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CV
210
210
  const titleText = (OrderPreservingOn2ndTransform.args!.title as string);
211
211
  const canvas = within(canvasElement);
212
212
  await canvas.findByText(titleText);
213
- await userEvent.click(canvas.getByTestId('cb1'));
213
+
214
+ // userEvent breaks under FF in vitest, fireEvent works
215
+ await fireEvent.click(await canvas.findByTestId('cb1'));
214
216
  await expect(await canvas.findByText('#1')).toBeInTheDocument();
215
- await userEvent.click(canvas.getByTestId('cb2'));
217
+ await fireEvent.click(canvas.getByTestId('cb2'));
216
218
  await expect(await canvas.findByText('#2')).toBeInTheDocument();
217
219
  await expect(canvas.getByTestId("beforeC1").nextElementSibling).toEqual(canvas.getByTestId("isC1"));
218
220
  }
219
- }`,...r.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
221
+ }`,...r.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
220
222
  args: {
221
223
  title: 'read system validity message',
222
224
  body: \`
@@ -255,4 +257,4 @@ import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CV
255
257
  await expect(canvas.getByTestId("var1").textContent).toEqual(canvas.getByTestId("inp1").validationMessage);
256
258
  await expect(canvas.getByTestId("var1").textContent.length > 1).toEqual(true);
257
259
  }
258
- }`,...c.parameters?.docs?.source}}};const y=["CharsCountInTextarea","WordCountOnType","OrderPreservingOn2ndTransform","ReadSystemValidityMessage"];export{o as CharsCountInTextarea,r as OrderPreservingOn2ndTransform,c as ReadSystemValidityMessage,l as WordCountOnType,y as __namedExportsOrder,h as default};
260
+ }`,...l.parameters?.docs?.source}}};const y=["CharsCountInTextarea","WordCountOnType","OrderPreservingOn2ndTransform","ReadSystemValidityMessage"];export{s as CharsCountInTextarea,r as OrderPreservingOn2ndTransform,l as ReadSystemValidityMessage,o as WordCountOnType,y as __namedExportsOrder,h as default};
@@ -1,4 +1,4 @@
1
- import{d as l}from"./index-DrFu-skq.js";import{j as _}from"./lit-element-CenEXOuS.js";/**
1
+ import{d as l}from"./index-DrFu-skq.js";import{Q as _}from"./lit-element-DzhCn-8W.js";/**
2
2
  * @license
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,2 +1,2 @@
1
- import{S as u,e as O,a as y}from"./index-Cc7K62zD.js";import{i as S}from"./tiny-invariant-BxWVcicq.js";import{j as p}from"./lit-element-CenEXOuS.js";const{global:i}=__STORYBOOK_MODULE_GLOBAL__;var{window:g}=i;g.STORYBOOK_ENV="web-components";function d(e){if(!e)return!1;if(typeof e=="string")return!0;throw new Error('Provided component needs to be a string. e.g. component: "my-element"')}function l(e){if(!e)return!1;if(e.tags&&Array.isArray(e.tags)||e.modules&&Array.isArray(e.modules))return!0;throw new Error(`You need to setup valid meta data in your config.js via setCustomElements().
2
- See the readme of addon-docs for web components for more details.`)}function c(){return i.__STORYBOOK_CUSTOM_ELEMENTS__||i.__STORYBOOK_CUSTOM_ELEMENTS_MANIFEST__}var{window:w,EventSource:h}=i;typeof module<"u"&&module?.hot?.decline&&(module.hot.decline(),new h("__webpack_hmr").addEventListener("message",function(e){try{let{action:r}=JSON.parse(e.data);r==="built"&&w.location.reload()}catch{}}));const{logger:m}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{useEffect:v,addons:b}=__STORYBOOK_MODULE_PREVIEW_API__;function _(e,r){let t;switch(r){case"attributes":case"properties":t={name:e.type?.text||e.type};break;case"slots":t={name:"string"};break;default:t={name:"void"};break}return{name:e.name,required:!1,description:e.description,type:t,table:{category:r,type:{summary:e.type?.text||e.type},defaultValue:{summary:e.default!==void 0?e.default:e.defaultValue}}}}function D(e){let r=e.name.replace(/(-|_|:|\.|\s)+(.)?/g,(t,n,a)=>a?a.toUpperCase():"").replace(/^([A-Z])/,t=>t.toLowerCase());return r=`on${r.charAt(0).toUpperCase()+r.substr(1)}`,[{name:r,action:{name:e.name},table:{disable:!0}},_(e,"events")]}function o(e,r){return e&&e.filter(t=>t&&t.name).reduce((t,n)=>{if(n.kind==="method")return t;switch(r){case"events":D(n).forEach(a=>{S(a.name,`${a} should have a name property.`),t[a.name]=a});break;default:t[n.name]=_(n,r);break}return t},{})}var C=(e,r)=>{if(!d(e)||!l(r))return null;let t=r.tags.find(n=>n.name.toUpperCase()===e.toUpperCase());return t||m.warn(`Component not found in custom-elements.json: ${e}`),t},T=(e,r)=>{if(!d(e)||!l(r))return null;let t;return r?.modules?.forEach(n=>{n?.declarations?.forEach(a=>{a.tagName===e&&(t=a)})}),t||m.warn(`Component not found in custom-elements.json: ${e}`),t},f=(e,r)=>r?.version==="experimental"?C(e,r):T(e,r),A=(e,r)=>{let t=f(e,r);return t&&{...o(t.members??[],"properties"),...o(t.properties??[],"properties"),...o(t.attributes??[],"attributes"),...o(t.events??[],"events"),...o(t.slots??[],"slots"),...o(t.cssProperties??[],"css custom properties"),...o(t.cssParts??[],"css shadow parts")}},M=e=>{let r=c();return A(e,r)},L=e=>{let r=f(e,c());return r&&r.description},R=/<!--\?lit\$[0-9]+\$-->|<!--\??-->/g;function I(e){let r=e?.parameters.docs?.source,t=e?.parameters.__isArgsStory;return r?.type===u.DYNAMIC?!1:!t||r?.code||r?.type===u.CODE}function P(e,r){let t=e(),n=r?.parameters.docs?.source?.excludeDecorators?r.originalStoryFn(r.args,r):t,a;if(v(()=>{let{id:s,unmappedArgs:E}=r;a&&b.getChannel().emit(y,{id:s,source:a,args:E})}),!I(r)){let s=window.document.createElement("div");n instanceof DocumentFragment?p(n.cloneNode(!0),s):p(n,s),a=s.innerHTML.replace(R,"")}return t}var N=[P],B={docs:{extractArgTypes:M,extractComponentDescription:L,story:{inline:!0},source:{type:u.DYNAMIC,language:"html"}}},V=[O];export{V as argTypesEnhancers,N as decorators,B as parameters};
1
+ import{s as u,z as E,e as w}from"./index-DGdNYaqV.js";import{i as y}from"./tiny-invariant-BxWVcicq.js";import{Q as p}from"./lit-element-DzhCn-8W.js";const{global:i}=__STORYBOOK_MODULE_GLOBAL__;var{window:g}=i;g.STORYBOOK_ENV="web-components";function d(e){if(!e)return!1;if(typeof e=="string")return!0;throw new Error('Provided component needs to be a string. e.g. component: "my-element"')}function l(e){if(!e)return!1;if(e.tags&&Array.isArray(e.tags)||e.modules&&Array.isArray(e.modules))return!0;throw new Error(`You need to setup valid meta data in your config.js via setCustomElements().
2
+ See the readme of addon-docs for web components for more details.`)}function c(){return i.__STORYBOOK_CUSTOM_ELEMENTS__||i.__STORYBOOK_CUSTOM_ELEMENTS_MANIFEST__}var{window:S,EventSource:v}=i;typeof module<"u"&&module?.hot?.decline&&(module.hot.decline(),new v("__webpack_hmr").addEventListener("message",function(e){try{let{action:r}=JSON.parse(e.data);r==="built"&&S.location.reload()}catch{}}));const{logger:m}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{useEffect:b,addons:h}=__STORYBOOK_MODULE_PREVIEW_API__;function _(e,r){let t;switch(r){case"attributes":case"properties":t={name:e.type?.text||e.type};break;case"slots":t={name:"string"};break;default:t={name:"void"};break}return{name:e.name,required:!1,description:e.description,type:t,table:{category:r,type:{summary:e.type?.text||e.type},defaultValue:{summary:e.default!==void 0?e.default:e.defaultValue}}}}function C(e){let r=e.name.replace(/(-|_|:|\.|\s)+(.)?/g,(t,n,a)=>a?a.toUpperCase():"").replace(/^([A-Z])/,t=>t.toLowerCase());return r=`on${r.charAt(0).toUpperCase()+r.substr(1)}`,[{name:r,action:{name:e.name},table:{disable:!0}},_(e,"events")]}function o(e,r){return e&&e.filter(t=>t&&t.name).reduce((t,n)=>{if(n.kind==="method")return t;switch(r){case"events":C(n).forEach(a=>{y(a.name,`${a} should have a name property.`),t[a.name]=a});break;default:t[n.name]=_(n,r);break}return t},{})}var D=(e,r)=>{if(!d(e)||!l(r))return null;let t=r.tags.find(n=>n.name.toUpperCase()===e.toUpperCase());return t||m.warn(`Component not found in custom-elements.json: ${e}`),t},M=(e,r)=>{if(!d(e)||!l(r))return null;let t;return r?.modules?.forEach(n=>{n?.declarations?.forEach(a=>{a.tagName===e&&(t=a)})}),t||m.warn(`Component not found in custom-elements.json: ${e}`),t},f=(e,r)=>r?.version==="experimental"?D(e,r):M(e,r),A=(e,r)=>{let t=f(e,r);return t&&{...o(t.members??[],"properties"),...o(t.properties??[],"properties"),...o(t.attributes??[],"attributes"),...o(t.events??[],"events"),...o(t.slots??[],"slots"),...o(t.cssProperties??[],"css custom properties"),...o(t.cssParts??[],"css shadow parts")}},T=e=>{let r=c();return A(e,r)},L=e=>{let r=f(e,c());return r&&r.description},R=/<!--\?lit\$[0-9]+\$-->|<!--\??-->/g;function I(e){let r=e?.parameters.docs?.source,t=e?.parameters.__isArgsStory;return r?.type===u.DYNAMIC?!1:!t||r?.code||r?.type===u.CODE}function U(e,r){let t=e(),n=r?.parameters.docs?.source?.excludeDecorators?r.originalStoryFn(r.args,r):t,a;if(b(()=>{let{id:s,unmappedArgs:O}=r;a&&h.getChannel().emit(w,{id:s,source:a,args:O})}),!I(r)){let s=window.document.createElement("div");n instanceof DocumentFragment?p(n.cloneNode(!0),s):p(n,s),a=s.innerHTML.replace(R,"")}return t}var B=[U],V={docs:{extractArgTypes:T,extractComponentDescription:L,story:{inline:!0},source:{type:u.DYNAMIC,language:"html"}}},$=[E];export{$ as argTypesEnhancers,B as decorators,V as parameters};
@@ -1,9 +1,9 @@
1
- import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.js";function T(t){return new Promise(e=>setTimeout(e,t))}function v(t){const{title:e,body:n}=t;return`
1
+ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";function f(t){return new Promise(e=>setTimeout(e,t))}function h(t){const{title:e,body:n}=t;return`
2
2
  <fieldset>
3
3
  <legend>${e}</legend>
4
4
  ${n}
5
5
  </fieldset>
6
- `}const H={title:"external-templates",render:v},s={args:{title:"Template in page DOM",body:`
6
+ `}const B={title:"external-templates",render:h},s={args:{title:"Template in page DOM",body:`
7
7
  <template id="template1">
8
8
  <slot>Hello</slot> World!
9
9
  </template>
@@ -13,7 +13,7 @@ import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.
13
13
 
14
14
  <dce-internal data-testid="slot-override">👋</dce-internal>
15
15
  <dce-internal data-testid="slot-default"></dce-internal>
16
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(s.args.title);const n=f=>e.getByTestId(f).textContent.trim();a(n("slot-override")).toEqual("👋 World!"),a(n("slot-default")).toEqual("Hello World!")}},i={args:{title:"no tag, template in same DOM",body:`
16
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(s.args.title);const n=T=>e.getByTestId(T).textContent.trim();a(n("slot-override")).toEqual("👋 World!"),a(n("slot-default")).toEqual("Hello World!")}},i={args:{title:"no tag, template in same DOM",body:`
17
17
  <template id="template2">
18
18
  🏗️ construction
19
19
  </template>
@@ -30,7 +30,7 @@ import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.
30
30
  <custom-element src="no.svg">
31
31
  <i>fallback for missing image</i>
32
32
  </custom-element>
33
- `},play:async({canvasElement:t})=>{await l(t).findByText(m.args.title),a(t.querySelector('[src="confused.svg"]').innerHTML).to.include("loading from SVG ..."),await T(100),a(t.querySelector("dce-external").innerHTML).to.include("<svg"),a(t.querySelector('[src="no.svg"]').innerHTML).to.include("Vitest Browser Tester")}},o={args:{title:"External XSLT file",body:`
33
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(m.args.title),await a(e.getByText("inline DCE loading from SVG ...")).toBeInTheDocument(),a(t.querySelector('[src="confused.svg"]').innerHTML).to.include("loading from SVG ..."),await a(await e.findByText("fallback for missing image")).toBeInTheDocument(),await a(await e.findByTitle("Confused")).toBeInTheDocument()}},o={args:{title:"External XSLT file",body:`
34
34
  <custom-element tag="dce-external-4" src="/tree.xsl">
35
35
  <template><i>loading from XSLT ...</i></template>
36
36
  </custom-element>
@@ -39,7 +39,7 @@ import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.
39
39
  <custom-element src="/tree.xsl" data-smile="👼" data-basket="🍒">
40
40
  <i>inline DCE loading from XSLT ...</i>
41
41
  </custom-element>
42
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(o.args.title),a(t.querySelector("dce-external-4").innerHTML).to.include("Hi"),a(t.querySelector('[data-smile="👼"]').innerHTML).to.include("loading from XSLT ..."),await T(100),a(e.getByTestId("data-fruit").innerHTML).to.include("🍌"),a(e.getByTestId("data-smile").innerHTML).to.include("👼")}},c={args:{title:"external HTML template",body:`
42
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(o.args.title),a(t.querySelector("dce-external-4").innerHTML).to.include("Hi"),a(t.querySelector('[data-smile="👼"]').innerHTML).to.include("loading from XSLT ..."),await a(await e.findByTestId("data-fruit")).toHaveTextContent("🍌"),await a(await e.findByTestId("data-smile")).toHaveTextContent("👼")}},c={args:{title:"external HTML template",body:`
43
43
  <custom-element tag="dce-external-5" src="/html-template.html">
44
44
  <template><i>loading from HTML file ...</i></template>
45
45
  </custom-element>
@@ -64,15 +64,15 @@ import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.
64
64
  <custom-element src="/html-template.xhtml#embedded-xsl">
65
65
  <template>whole XSLT is embedded into HTML body</template>
66
66
  </custom-element>
67
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(g.args.title);const n=await e.findByTestId("src");a(n.textContent).to.include("/html-template.xhtml#embedded-xsl")}},y={args:{title:"external HTML template - missing id",body:`
67
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(g.args.title);const n=await e.findByTestId("src");a(n.textContent).to.include("/html-template.xhtml#embedded-xsl")}},x={args:{title:"external HTML template - missing id",body:`
68
68
  <custom-element src="/html-template.html#none">
69
69
  <template><i data-testid="no-id">element with id=none is missing in template</i></template>
70
70
  </custom-element>
71
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(y.args.title),await T(100);const n=await e.findByTestId("no-id");a(n.textContent).to.include("element with id=none is missing in template")}},x={args:{title:"external file with embedding of another external DCE",body:`
71
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(x.args.title),await f(100);const n=await e.findByTestId("no-id");a(n.textContent).to.include("element with id=none is missing in template")}},y={args:{title:"external file with embedding of another external DCE",body:`
72
72
  <custom-element src="/embed-1.html">
73
73
  loading from embed-1.html ...
74
74
  </custom-element>
75
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(x.args.title),await T(100),a(await e.findByTestId("wave")).toBeInTheDocument(),a(e.getByTestId("wave").innerHTML).toEqual("🖖")}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
75
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(y.args.title),await f(1),a(await e.findByText("embed-1.html")).toBeInTheDocument(),a(await e.findByText("🖖")).toBeInTheDocument()}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
76
76
  args: {
77
77
  title: 'Template in page DOM',
78
78
  body: \`
@@ -136,11 +136,14 @@ import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.
136
136
  }) => {
137
137
  const canvas = within(canvasElement);
138
138
  await canvas.findByText((ExternalSvg.args!.title as string));
139
+ await expect(canvas.getByText('inline DCE loading from SVG ...')).toBeInTheDocument();
140
+
141
+ // needs separate test
142
+ // await expect( await canvas.findByText('loading from SVG ...')).toBeInTheDocument();
143
+
139
144
  expect(canvasElement.querySelector('[src="confused.svg"]').innerHTML).to.include('loading from SVG ...');
140
- await sleep(100);
141
- expect(canvasElement.querySelector('dce-external').innerHTML).to.include('<svg');
142
- expect(canvasElement.querySelector('[src="no.svg"]').innerHTML).to.include('Vitest Browser Tester');
143
- // "fallback for missing image" is not shown in test as test does not return 404, see test on 404 instead
145
+ await expect(await canvas.findByText('fallback for missing image')).toBeInTheDocument();
146
+ await expect(await canvas.findByTitle('Confused')).toBeInTheDocument();
144
147
  }
145
148
  }`,...m.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
146
149
  args: {
@@ -163,9 +166,8 @@ import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.
163
166
  await canvas.findByText((ExternalXsltFile.args!.title as string));
164
167
  expect(canvasElement.querySelector('dce-external-4').innerHTML).to.include('Hi');
165
168
  expect(canvasElement.querySelector('[data-smile="👼"]').innerHTML).to.include('loading from XSLT ...');
166
- await sleep(100);
167
- expect(canvas.getByTestId('data-fruit').innerHTML).to.include('🍌');
168
- expect(canvas.getByTestId('data-smile').innerHTML).to.include('👼');
169
+ await expect(await canvas.findByTestId('data-fruit')).toHaveTextContent('🍌');
170
+ await expect(await canvas.findByTestId('data-smile')).toHaveTextContent('👼');
169
171
  }
170
172
  }`,...o.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
171
173
  args: {
@@ -276,7 +278,7 @@ import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.
276
278
  const ml = await canvas.findByTestId('src');
277
279
  expect(ml.textContent).to.include('/html-template.xhtml#embedded-xsl');
278
280
  }
279
- }`,...g.parameters?.docs?.source}}};y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`{
281
+ }`,...g.parameters?.docs?.source}}};x.parameters={...x.parameters,docs:{...x.parameters?.docs,source:{originalSource:`{
280
282
  args: {
281
283
  title: 'external HTML template - missing id',
282
284
  body: \`
@@ -294,7 +296,7 @@ import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.
294
296
  const ml = await canvas.findByTestId('no-id');
295
297
  expect(ml.textContent).to.include('element with id=none is missing in template');
296
298
  }
297
- }`,...y.parameters?.docs?.source}}};x.parameters={...x.parameters,docs:{...x.parameters?.docs,source:{originalSource:`{
299
+ }`,...x.parameters?.docs?.source}}};y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`{
298
300
  args: {
299
301
  title: 'external file with embedding of another external DCE',
300
302
  body: \`
@@ -308,8 +310,8 @@ import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.
308
310
  }) => {
309
311
  const canvas = within(canvasElement);
310
312
  await canvas.findByText((EmbeddingInAnotherFile.args!.title as string));
311
- await sleep(100);
312
- expect(await canvas.findByTestId('wave')).toBeInTheDocument();
313
- expect(canvas.getByTestId('wave').innerHTML).toEqual('🖖');
313
+ await sleep(1);
314
+ expect(await canvas.findByText('embed-1.html')).toBeInTheDocument();
315
+ expect(await canvas.findByText('🖖')).toBeInTheDocument();
314
316
  }
315
- }`,...x.parameters?.docs?.source}}};const E=["TemplateInPage","NoTag","ExternalSvg","ExternalXsltFile","ExternalHtmlFile","ExternalHtmlFileInline","HtmlWithinHtmlFile","SvgWithinHtmlFile","MathMLWithinHtmlFile","ByIdWithinXsltFile","MissingIdWithinXsltFile","EmbeddingInAnotherFile"];export{g as ByIdWithinXsltFile,x as EmbeddingInAnotherFile,c as ExternalHtmlFile,r as ExternalHtmlFileInline,m as ExternalSvg,o as ExternalXsltFile,d as HtmlWithinHtmlFile,u as MathMLWithinHtmlFile,y as MissingIdWithinXsltFile,i as NoTag,p as SvgWithinHtmlFile,s as TemplateInPage,E as __namedExportsOrder,H as default};
317
+ }`,...y.parameters?.docs?.source}}};const E=["TemplateInPage","NoTag","ExternalSvg","ExternalXsltFile","ExternalHtmlFile","ExternalHtmlFileInline","HtmlWithinHtmlFile","SvgWithinHtmlFile","MathMLWithinHtmlFile","ByIdWithinXsltFile","MissingIdWithinXsltFile","EmbeddingInAnotherFile"];export{g as ByIdWithinXsltFile,y as EmbeddingInAnotherFile,c as ExternalHtmlFile,r as ExternalHtmlFileInline,m as ExternalSvg,o as ExternalXsltFile,d as HtmlWithinHtmlFile,u as MathMLWithinHtmlFile,x as MissingIdWithinXsltFile,i as NoTag,p as SvgWithinHtmlFile,s as TemplateInPage,E as __namedExportsOrder,B as default};
@@ -1,4 +1,4 @@
1
- import{w as i,e as n,u as e}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.js";function l(a){const{title:t,body:s}=a;return`
1
+ import{w as i,e as n,u as e}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";function l(a){const{title:t,body:s}=a;return`
2
2
  <fieldset>
3
3
  <legend>${t}</legend>
4
4
  ${s}