@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.
- package/.idea/custom-element-dist.iml +1 -5
- package/.storybook/main.ts +1 -3
- package/.storybook/preview-head.html +8 -0
- package/.storybook/preview.ts +13 -5
- package/README.md +4 -4
- package/bin/postinstall.sh +3 -2
- package/bin/vitest/vitest-browser-importmaps.mjs +20 -0
- package/coverage/coverage-final.json +14 -11
- package/coverage/index.html +51 -36
- package/coverage/src/custom-element/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js.html +596 -386
- package/coverage/src/custom-element/demo/coverage.svg +10 -0
- package/coverage/src/custom-element/demo/index.html +116 -0
- package/coverage/src/custom-element/demo/z.js/coverage.svg +10 -0
- package/coverage/src/custom-element/demo/z.js.html +112 -0
- package/coverage/src/custom-element/http-request.js.html +12 -12
- package/coverage/src/custom-element/index.html +33 -18
- package/coverage/src/custom-element/local-storage.js.html +56 -41
- package/coverage/src/custom-element/location-element.js.html +4 -4
- package/coverage/src/custom-element/module-url.js/coverage.svg +10 -0
- package/coverage/src/custom-element/module-url.js.html +187 -0
- package/coverage/src/index.html +1 -1
- package/coverage/src/mocks/coverage.svg +1 -1
- package/coverage/src/mocks/handlers.ts/coverage.svg +1 -1
- package/coverage/src/mocks/handlers.ts.html +36 -12
- package/coverage/src/mocks/index.html +19 -19
- package/coverage/src/stories/attributes.test.stories.ts.html +9 -15
- package/coverage/src/stories/coverage.svg +1 -1
- package/coverage/src/stories/css.test.stories.ts.html +1 -1
- package/coverage/src/stories/dom-merge.test.stories.ts.html +15 -9
- package/coverage/src/stories/external-template.test.stories.ts.html +27 -18
- package/coverage/src/stories/form.test.stories.ts.html +1 -1
- package/coverage/src/stories/http-request.stories.ts.html +1 -1
- package/coverage/src/stories/index.html +48 -33
- package/coverage/src/stories/local-storage.test.stories.ts/coverage.svg +1 -1
- package/coverage/src/stories/local-storage.test.stories.ts.html +87 -63
- package/coverage/src/stories/location-element.test.stories.ts.html +1 -1
- package/coverage/src/stories/module-url.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/module-url.test.stories.ts.html +634 -0
- package/coverage/src/stories/set-url.test.stories.ts.html +1 -1
- package/coverage/src/stories/slice-events.test.stories.ts.html +1 -1
- package/coverage/src/stories/slots.test.stories.ts.html +1 -1
- package/coverage/src/stories/testStoryBook.ts.html +12 -12
- package/coverage/src/stories/version-select.test.stories.ts.html +98 -20
- package/coverage/src/sum.ts.html +1 -1
- package/dist/confused.svg +1 -0
- package/dist/custom-element-BMMsP1Dy.js +533 -0
- package/dist/custom-element-CPSk7s0j.cjs +87 -0
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +28 -25
- package/dist/demo/a.html +60 -0
- package/dist/demo/a.svg +27 -0
- package/dist/demo/b.html +13 -0
- package/dist/demo/confused.svg +38 -0
- package/dist/demo/data-slices.html +216 -0
- package/dist/demo/dce-social-preview.png +0 -0
- package/dist/demo/demo.css +25 -0
- package/dist/demo/dom-merge.html +123 -0
- package/dist/demo/embed-1.html +2 -0
- package/dist/demo/external-template.html +239 -0
- package/dist/demo/form.html +239 -0
- package/dist/demo/hex-grid-dce.html +183 -0
- package/dist/demo/hex-grid-transform.png +0 -0
- package/dist/demo/hex-grid.html +66 -0
- package/dist/demo/html-template.html +126 -0
- package/dist/demo/html-template.xhtml +45 -0
- package/dist/demo/html-template.xml +45 -0
- package/dist/demo/http-request.html +143 -0
- package/dist/demo/lib-dir/Smiley.svg +24 -0
- package/dist/demo/lib-dir/embed-lib.html +34 -0
- package/dist/demo/local-storage.html +218 -0
- package/dist/demo/location-element.html +168 -0
- package/dist/demo/logo.png +0 -0
- package/dist/demo/module-url.html +215 -0
- package/dist/demo/npm-versions-demo.html +118 -0
- package/dist/demo/npm-versions.html +94 -0
- package/dist/demo/parameters.html +70 -0
- package/dist/demo/s.xml +3 -0
- package/dist/demo/s.xslt +56 -0
- package/dist/demo/s1.xslt +60 -0
- package/dist/demo/scoped-css.html +169 -0
- package/dist/demo/set-url.html +141 -0
- package/dist/demo/ss.html +57 -0
- package/dist/demo/table.xml +25 -0
- package/dist/demo/table.xsl +293 -0
- package/dist/demo/template.xsl +46 -0
- package/dist/demo/tree.xml +25 -0
- package/dist/demo/tree.xsl +33 -0
- package/dist/demo/wc-square.svg +1 -0
- package/dist/demo/xhtml-template.xhtml +45 -0
- package/dist/demo/z.html +33 -0
- package/dist/demo/z.js +9 -0
- package/dist/demo/z.xml +60 -0
- package/dist/demo/z1.html +34 -0
- package/dist/embed-1.html +1 -2
- package/dist/local-storage-78EivJ_B.cjs +1 -0
- package/dist/local-storage-DzmNKzgN.js +66 -0
- package/dist/mockServiceWorker.js +1 -1
- package/package.json +95 -93
- package/public/confused.svg +1 -0
- package/public/demo/a.html +60 -0
- package/public/demo/a.svg +27 -0
- package/public/demo/b.html +13 -0
- package/public/demo/confused.svg +38 -0
- package/public/demo/data-slices.html +216 -0
- package/public/demo/dce-social-preview.png +0 -0
- package/public/demo/demo.css +25 -0
- package/public/demo/dom-merge.html +123 -0
- package/public/demo/embed-1.html +2 -0
- package/public/demo/external-template.html +239 -0
- package/public/demo/form.html +239 -0
- package/public/demo/hex-grid-dce.html +183 -0
- package/public/demo/hex-grid-transform.png +0 -0
- package/public/demo/hex-grid.html +66 -0
- package/public/demo/html-template.html +126 -0
- package/public/demo/html-template.xhtml +45 -0
- package/public/demo/html-template.xml +45 -0
- package/public/demo/http-request.html +143 -0
- package/public/demo/lib-dir/Smiley.svg +24 -0
- package/public/demo/lib-dir/embed-lib.html +34 -0
- package/public/demo/local-storage.html +218 -0
- package/public/demo/location-element.html +168 -0
- package/public/demo/logo.png +0 -0
- package/public/demo/module-url.html +215 -0
- package/public/demo/npm-versions-demo.html +118 -0
- package/public/demo/npm-versions.html +94 -0
- package/public/demo/parameters.html +70 -0
- package/public/demo/s.xml +3 -0
- package/public/demo/s.xslt +56 -0
- package/public/demo/s1.xslt +60 -0
- package/public/demo/scoped-css.html +169 -0
- package/public/demo/set-url.html +141 -0
- package/public/demo/ss.html +57 -0
- package/public/demo/table.xml +25 -0
- package/public/demo/table.xsl +293 -0
- package/public/demo/template.xsl +46 -0
- package/public/demo/tree.xml +25 -0
- package/public/demo/tree.xsl +33 -0
- package/public/demo/wc-square.svg +1 -0
- package/public/demo/xhtml-template.xhtml +45 -0
- package/public/demo/z.html +33 -0
- package/public/demo/z.js +9 -0
- package/public/demo/z.xml +60 -0
- package/public/demo/z1.html +34 -0
- package/public/embed-1.html +1 -2
- package/public/mockServiceWorker.js +1 -1
- package/src/custom-element/custom-element.js +103 -33
- package/src/custom-element/demo/a.svg +27 -0
- package/src/custom-element/demo/confused.svg +1 -0
- package/src/custom-element/demo/demo.css +11 -8
- package/src/custom-element/demo/embed-1.html +1 -2
- package/src/custom-element/demo/external-template.html +122 -62
- package/src/custom-element/demo/lib-dir/Smiley.svg +24 -0
- package/src/custom-element/demo/lib-dir/embed-lib.html +34 -0
- package/src/custom-element/demo/module-url.html +215 -0
- package/src/custom-element/demo/npm-versions-demo.html +118 -0
- package/src/custom-element/demo/npm-versions.html +94 -0
- package/src/custom-element/demo/s.xml +3 -36
- package/src/custom-element/demo/s.xslt +55 -96
- package/src/custom-element/demo/set-url.html +1 -1
- package/src/custom-element/demo/z.html +32 -61
- package/src/custom-element/demo/z.js +9 -0
- package/src/custom-element/demo/z1.html +34 -0
- package/src/custom-element/ide/customData-dce.json +215 -181
- package/src/custom-element/ide/web-types-dce.json +184 -159
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/custom-element/index.html +21 -3
- package/src/custom-element/local-storage.js +19 -14
- package/src/custom-element/module-url.js +34 -0
- package/src/mocks/handlers.ts +10 -1
- package/src/mocks/versions.mock.ts +786 -0
- package/src/stories/__screenshots__/http-request.test.ts/http-request-url-change-1.png +0 -0
- package/src/stories/attributes.test.stories.ts +3 -5
- package/src/stories/dom-merge.test.stories.ts +9 -7
- package/src/stories/external-template.test.stories.ts +13 -10
- package/src/stories/local-storage.test.stories.ts +61 -53
- package/src/stories/module-url.test.stories.ts +183 -0
- package/src/stories/version-select.test.stories.ts +38 -12
- package/src/sum.test.ts +5 -5
- package/src/sum.ts +3 -3
- package/storybook-static/assets/Color-KGDBMAHA-CJo5gHY3.js +1 -0
- package/storybook-static/assets/{Configure-D0qG3gR9.js → Configure-DdXbGKhY.js} +2 -2
- package/storybook-static/assets/DocsRenderer-PKQXORMH-DLnpL5hE.js +2 -0
- package/storybook-static/assets/{attributes.test.stories-W34tZdUt.js → attributes.test.stories-Bt5V18qO.js} +10 -12
- package/storybook-static/assets/{css.test.stories-BZFYx1TQ.js → css.test.stories-CGYy2daE.js} +1 -1
- package/storybook-static/assets/custom-element-D8hcDZHh.js +265 -0
- package/storybook-static/assets/{dom-merge.test.stories-S-7U5N3h.js → dom-merge.test.stories-XlsZ0UvX.js} +22 -20
- package/storybook-static/assets/{entry-preview-DrgzXgwT.js → entry-preview-BKQ8UCxI.js} +1 -1
- package/storybook-static/assets/{entry-preview-docs-Bxv0qQWs.js → entry-preview-docs-BMKNVQXA.js} +2 -2
- package/storybook-static/assets/{external-template.test.stories-QIO3lAFz.js → external-template.test.stories-Bt_Pflu8.js} +23 -21
- package/storybook-static/assets/{form.test.stories-ClYhj9F1.js → form.test.stories-B0NoI8wm.js} +1 -1
- package/storybook-static/assets/handlers-B5969HUu.js +467 -0
- package/storybook-static/assets/http-request.stories-B2skuTFV.js +281 -0
- package/storybook-static/assets/iframe-Dfrt81rk.js +2 -0
- package/storybook-static/assets/index-Ay195x2L.js +605 -0
- package/storybook-static/assets/index-C3ChPTMh.js +1 -0
- package/storybook-static/assets/index-C7lvoJNv.js +1 -0
- package/storybook-static/assets/index-C8k3Z-3Y.js +28 -0
- package/storybook-static/assets/{index-DXimoRZY.js → index-D-8MO0q_.js} +1 -1
- package/storybook-static/assets/index-DGdNYaqV.js +8 -0
- package/storybook-static/assets/index-Gpdhz4ab.js +1 -0
- package/storybook-static/assets/lit-element-DzhCn-8W.js +19 -0
- package/storybook-static/assets/local-storage.test.stories-DfY6feqG.js +420 -0
- package/storybook-static/assets/{location-element.test.stories-DvH1TWK4.js → location-element.test.stories-944AotIJ.js} +1 -1
- package/storybook-static/assets/module-url.test.stories-DSKcwApl.js +208 -0
- package/storybook-static/assets/{preview-BKCN0mOr.js → preview-0Jj89qip.js} +1 -1
- package/storybook-static/assets/preview-AJR7rVPD.js +52 -0
- package/storybook-static/assets/{preview-TCN6m6T-.js → preview-BJPLiuSt.js} +1 -1
- package/storybook-static/assets/{preview-BDY5ThwJ.js → preview-BMWqy4Bi.js} +1 -1
- package/storybook-static/assets/preview-BnWGZYux.js +1 -0
- package/storybook-static/assets/preview-CadgX-4y.js +2 -0
- package/storybook-static/assets/{preview-BAz7FMXc.js → preview-DB9FwMii.js} +1 -1
- package/storybook-static/assets/preview-Djh1_Tal.js +20 -0
- package/storybook-static/assets/{set-url.test.stories-GlJOh31I.js → set-url.test.stories-DjLHKkEh.js} +1 -1
- package/storybook-static/assets/{slice-events.test.stories-VoNjuPCX.js → slice-events.test.stories-8I_BrHd6.js} +1 -1
- package/storybook-static/assets/{slots.test.stories-Da2j9YuO.js → slots.test.stories-CvZz4jyP.js} +1 -1
- package/storybook-static/assets/version-select.test.stories-DSxmJylI.js +109 -0
- package/storybook-static/confused.svg +1 -0
- package/storybook-static/demo/a.html +60 -0
- package/storybook-static/demo/a.svg +27 -0
- package/storybook-static/demo/b.html +13 -0
- package/storybook-static/demo/confused.svg +38 -0
- package/storybook-static/demo/data-slices.html +216 -0
- package/storybook-static/demo/dce-social-preview.png +0 -0
- package/storybook-static/demo/demo.css +25 -0
- package/storybook-static/demo/dom-merge.html +123 -0
- package/storybook-static/demo/embed-1.html +2 -0
- package/storybook-static/demo/external-template.html +239 -0
- package/storybook-static/demo/form.html +239 -0
- package/storybook-static/demo/hex-grid-dce.html +183 -0
- package/storybook-static/demo/hex-grid-transform.png +0 -0
- package/storybook-static/demo/hex-grid.html +66 -0
- package/storybook-static/demo/html-template.html +126 -0
- package/storybook-static/demo/html-template.xhtml +45 -0
- package/storybook-static/demo/html-template.xml +45 -0
- package/storybook-static/demo/http-request.html +143 -0
- package/storybook-static/demo/lib-dir/Smiley.svg +24 -0
- package/storybook-static/demo/lib-dir/embed-lib.html +34 -0
- package/storybook-static/demo/local-storage.html +218 -0
- package/storybook-static/demo/location-element.html +168 -0
- package/storybook-static/demo/logo.png +0 -0
- package/storybook-static/demo/module-url.html +215 -0
- package/storybook-static/demo/npm-versions-demo.html +118 -0
- package/storybook-static/demo/npm-versions.html +94 -0
- package/storybook-static/demo/parameters.html +70 -0
- package/storybook-static/demo/s.xml +3 -0
- package/storybook-static/demo/s.xslt +56 -0
- package/storybook-static/demo/s1.xslt +60 -0
- package/storybook-static/demo/scoped-css.html +169 -0
- package/storybook-static/demo/set-url.html +141 -0
- package/storybook-static/demo/ss.html +57 -0
- package/storybook-static/demo/table.xml +25 -0
- package/storybook-static/demo/table.xsl +293 -0
- package/storybook-static/demo/template.xsl +46 -0
- package/storybook-static/demo/tree.xml +25 -0
- package/storybook-static/demo/tree.xsl +33 -0
- package/storybook-static/demo/wc-square.svg +1 -0
- package/storybook-static/demo/xhtml-template.xhtml +45 -0
- package/storybook-static/demo/z.html +33 -0
- package/storybook-static/demo/z.js +9 -0
- package/storybook-static/demo/z.xml +60 -0
- package/storybook-static/demo/z1.html +34 -0
- package/storybook-static/embed-1.html +1 -2
- package/storybook-static/favicon.svg +1 -7
- package/storybook-static/iframe.html +42 -30
- package/storybook-static/index.html +36 -18
- package/storybook-static/index.json +1 -1
- package/storybook-static/mockServiceWorker.js +1 -1
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +39 -36
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +38 -1
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +395 -43
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js.LEGAL.txt +0 -18
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js +221 -22
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-manager/globals-module-info.js +995 -1
- package/storybook-static/sb-manager/globals-runtime.js +53525 -1
- package/storybook-static/sb-manager/globals.js +48 -1
- package/storybook-static/sb-manager/runtime.js +11884 -1
- package/storybook-static/sb-preview/globals.js +33 -1
- package/storybook-static/sb-preview/runtime.js +9437 -108
- package/vite.config.js +2 -1
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/compiler.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.vscode/settings.json +0 -24
- package/dist/custom-element-DAe7uvIt.js +0 -477
- package/dist/custom-element-DZvvhscI.cjs +0 -53
- package/dist/local-storage-Boafngui.cjs +0 -1
- package/dist/local-storage-BqDEu2kF.js +0 -59
- package/storybook-static/assets/Color-PRSJMWNM-CRSv4C7i.js +0 -1
- package/storybook-static/assets/DocsRenderer-K4EAMTCU-CG_P5zRZ.js +0 -2
- package/storybook-static/assets/WithTooltip-KJL26V4Q-CUqUi5E8.js +0 -1
- package/storybook-static/assets/custom-element-DpIq8E2p.js +0 -219
- package/storybook-static/assets/formatter-2WMMO6ZP-C-UiBIma.js +0 -58
- package/storybook-static/assets/http-request.stories-DCqY5s2i.js +0 -300
- package/storybook-static/assets/iframe-CURpvmVV.js +0 -2
- package/storybook-static/assets/index-CKw1EbdP.js +0 -1
- package/storybook-static/assets/index-CVRyq5ci.js +0 -27
- package/storybook-static/assets/index-Cc7K62zD.js +0 -3
- package/storybook-static/assets/index-DYpTqTNu.js +0 -1
- package/storybook-static/assets/index-DsWii_Ep.js +0 -548
- package/storybook-static/assets/index-DuIEV_9C.js +0 -13
- package/storybook-static/assets/lit-element-CenEXOuS.js +0 -19
- package/storybook-static/assets/local-storage.test.stories-BqgYwqr-.js +0 -419
- package/storybook-static/assets/preview-B4GcaC1c.js +0 -1
- package/storybook-static/assets/preview-B63p-W8V.js +0 -20
- package/storybook-static/assets/preview-DRnyIGXK.js +0 -48
- package/storybook-static/assets/preview-DjDbQHPa.js +0 -2
- package/storybook-static/assets/syntaxhighlighter-BP7B2CQK-CDpEe51g.js +0 -1
- package/storybook-static/assets/version-select.test.stories-DLwf-TPB.js +0 -60
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -3
- package/storybook-static/sb-common-assets/fonts.css +0 -31
- package/storybook-static/sb-manager/WithTooltip-KJL26V4Q-5LS5AN27.js +0 -1
- package/storybook-static/sb-manager/chunk-B3YDJJJH.js +0 -347
- package/storybook-static/sb-manager/chunk-BLWCBWKL.js +0 -9
- package/storybook-static/sb-manager/chunk-GUVK2GTO.js +0 -6
- package/storybook-static/sb-manager/chunk-LFRML3ZV.js +0 -186
- package/storybook-static/sb-manager/chunk-MC7RAF2B.js +0 -274
- package/storybook-static/sb-manager/chunk-ZR5JZWHI.js +0 -1
- package/storybook-static/sb-manager/formatter-2WMMO6ZP-JI7RHVTW.js +0 -58
- package/storybook-static/sb-manager/index.js +0 -1
- package/storybook-static/sb-manager/syntaxhighlighter-BP7B2CQK-WOJYHKQR.js +0 -1
- /package/storybook-static/sb-addons/{storybook-core-server-presets-0 → storybook-core-core-server-presets-0}/common-manager-bundle.js.LEGAL.txt +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>template based on HTML file</title>
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<b id="wave">👋</b>
|
|
9
|
+
<b id="ok">👌</b>
|
|
10
|
+
<svg id="dwc-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18"><defs><style>.cls-1{fill:#c2e6f1;}.cls-2{fill:#dcf1f7;}.cls-3{fill:#2d4554;}.cls-4{fill:#60cae5;}</style></defs><polygon class="cls-3" points="0 82.47 0 126.71 34.84 146.83 34.84 187.06 73.16 209.18 108 189.07 142.84 209.18 181.16 187.06 181.16 146.83 216 126.71 216 82.47 181.16 62.35 181.16 22.12 142.84 0 108 20.12 73.16 0 34.84 22.12 34.84 62.35 0 82.47"/><path class="cls-2" d="m114.33,56.69l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/><path class="cls-2" d="m98.19,62.71h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-1" d="m48.12,66.01l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97Z"/><path class="cls-2" d="m46.18,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/><path class="cls-2" d="m115.87,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/><path class="cls-2" d="m152.65,42.59c-4.44,2.56-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0Z"/><path class="cls-2" d="m77.55,158.4l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54Z"/><path class="cls-4" d="m146.31,134.03v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97Z"/><path class="cls-4" d="m63.35,123.06h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m103.61,151.37l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53Z"/><path class="cls-4" d="m63.35,163.29h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m28.51,102.94h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m133.04,163.29l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-4" d="m173.29,151.37l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53Z"/><path class="cls-4" d="m209.06,91.55c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84Z"/><path class="cls-2" d="m149.18,117.04l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/><path class="cls-1" d="m112.39,98.05l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54Z"/><path class="cls-1" d="m100.13,105.12c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/><path class="cls-2" d="m65.29,85.01c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/><path class="cls-1" d="m133.04,123.06l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/><path class="cls-1" d="m184.02,96.93l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/></svg>
|
|
11
|
+
<xsl:stylesheet
|
|
12
|
+
id="embedded-xsl"
|
|
13
|
+
version="1.0"
|
|
14
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
15
|
+
<xsl:output
|
|
16
|
+
method="html"
|
|
17
|
+
omit-xml-declaration="yes"
|
|
18
|
+
standalone="yes"
|
|
19
|
+
indent="yes"
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
<xsl:template match="/">
|
|
23
|
+
<xsl:apply-templates select="*"/>
|
|
24
|
+
</xsl:template>
|
|
25
|
+
<xsl:template match="*">
|
|
26
|
+
<details style="padding:0 1rem" open="open">
|
|
27
|
+
<summary>
|
|
28
|
+
<b style="color:green"><xsl:value-of select="name()"/></b>
|
|
29
|
+
<xsl:apply-templates select="@*"/>
|
|
30
|
+
</summary>
|
|
31
|
+
<xsl:value-of select="./text()"/>
|
|
32
|
+
<xsl:apply-templates select="*"/>
|
|
33
|
+
</details>
|
|
34
|
+
</xsl:template>
|
|
35
|
+
<xsl:template match="@*">
|
|
36
|
+
<code style="margin-left:1rem;color:brown"><xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</code>
|
|
37
|
+
</xsl:template>
|
|
38
|
+
<xsl:template match="text()">
|
|
39
|
+
<p>
|
|
40
|
+
<xsl:value-of select="."/>
|
|
41
|
+
</p>
|
|
42
|
+
</xsl:template>
|
|
43
|
+
</xsl:stylesheet>
|
|
44
|
+
</body>
|
|
45
|
+
</html>
|
package/dist/demo/z.html
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
5
|
+
<title>DOM merge - Declarative Custom Element implementation demo</title>
|
|
6
|
+
<link rel="icon" href="./wc-square.svg"/>
|
|
7
|
+
<script type="importmap">
|
|
8
|
+
{
|
|
9
|
+
"imports": {
|
|
10
|
+
"@epa-wg/custom-element/": "../",
|
|
11
|
+
"@epa-wg/custom-element-dist/": "../"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
<script type="module" src="../http-request.js"></script>
|
|
16
|
+
<script type="module" src="../location-element.js"></script>
|
|
17
|
+
<script type="module" src="../custom-element.js"></script>
|
|
18
|
+
<style>
|
|
19
|
+
@import "./demo.css";
|
|
20
|
+
dt{ font-weight: bold}
|
|
21
|
+
dd{ padding: 0;}
|
|
22
|
+
h1,h3{ margin: 0;}
|
|
23
|
+
nav{ gap:0; }
|
|
24
|
+
</style>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
|
|
28
|
+
<custom-element src="./html-template.html#dwc-logo">
|
|
29
|
+
<template><i>loading SVG from templates file ...</i></template>
|
|
30
|
+
</custom-element>
|
|
31
|
+
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|
package/dist/demo/z.js
ADDED
package/dist/demo/z.xml
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<dce-root data-dce-id="1" xmlns:dce="urn:schemas-epa-wg:dce" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
3
|
+
<location-element slice="window-url" data-dce-id="2"/>
|
|
4
|
+
<table data-dce-id="3">
|
|
5
|
+
<tr data-dce-id="4">
|
|
6
|
+
<th data-dce-id="5">
|
|
7
|
+
<u data-dce-id="6">URL properties</u>
|
|
8
|
+
</th>
|
|
9
|
+
</tr>
|
|
10
|
+
<tr data-dce-id="7">
|
|
11
|
+
<th data-dce-id="8">href</th>
|
|
12
|
+
<td data-dce-id="9">http://localhost:63342/custom-element/demo/a.html?_ijt=qca6trk5kne6eo4s4tomq4egmm&_ij_reload=RELOAD_ON_SAVE</td>
|
|
13
|
+
</tr>
|
|
14
|
+
<tr data-dce-id="7">
|
|
15
|
+
<th data-dce-id="8">origin</th>
|
|
16
|
+
<td data-dce-id="9">http://localhost:63342</td>
|
|
17
|
+
</tr>
|
|
18
|
+
<tr data-dce-id="7">
|
|
19
|
+
<th data-dce-id="8">protocol</th>
|
|
20
|
+
<td data-dce-id="9">http:</td>
|
|
21
|
+
</tr>
|
|
22
|
+
<tr data-dce-id="7">
|
|
23
|
+
<th data-dce-id="8">host</th>
|
|
24
|
+
<td data-dce-id="9">localhost:63342</td>
|
|
25
|
+
</tr>
|
|
26
|
+
<tr data-dce-id="7">
|
|
27
|
+
<th data-dce-id="8">hostname</th>
|
|
28
|
+
<td data-dce-id="9">localhost</td>
|
|
29
|
+
</tr>
|
|
30
|
+
<tr data-dce-id="7">
|
|
31
|
+
<th data-dce-id="8">port</th>
|
|
32
|
+
<td data-dce-id="9">63342</td>
|
|
33
|
+
</tr>
|
|
34
|
+
<tr data-dce-id="7">
|
|
35
|
+
<th data-dce-id="8">pathname</th>
|
|
36
|
+
<td data-dce-id="9">/custom-element/demo/a.html</td>
|
|
37
|
+
</tr>
|
|
38
|
+
<tr data-dce-id="7">
|
|
39
|
+
<th data-dce-id="8">search</th>
|
|
40
|
+
<td data-dce-id="9">?_ijt=qca6trk5kne6eo4s4tomq4egmm&_ij_reload=RELOAD_ON_SAVE</td>
|
|
41
|
+
</tr>
|
|
42
|
+
<tr data-dce-id="7">
|
|
43
|
+
<th data-dce-id="8">hash</th>
|
|
44
|
+
<td data-dce-id="9"/>
|
|
45
|
+
</tr>
|
|
46
|
+
<tr data-dce-id="10">
|
|
47
|
+
<th data-dce-id="11">
|
|
48
|
+
<u data-dce-id="12">URL parameters</u>
|
|
49
|
+
</th>
|
|
50
|
+
</tr>
|
|
51
|
+
<tr data-dce-id="13">
|
|
52
|
+
<th data-dce-id="14">_ijt</th>
|
|
53
|
+
<td data-dce-id="15">qca6trk5kne6eo4s4tomq4egmm</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr data-dce-id="13">
|
|
56
|
+
<th data-dce-id="14">_ij_reload</th>
|
|
57
|
+
<td data-dce-id="15">RELOAD_ON_SAVE</td>
|
|
58
|
+
</tr>
|
|
59
|
+
</table>
|
|
60
|
+
</dce-root>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
5
|
+
<title>DOM merge - Declarative Custom Element implementation demo</title>
|
|
6
|
+
<link rel="icon" href="./wc-square.svg"/>
|
|
7
|
+
<script type="importmap">
|
|
8
|
+
{
|
|
9
|
+
"imports": {
|
|
10
|
+
"@epa-wg/custom-element/": "../",
|
|
11
|
+
"@epa-wg/custom-element-dist/": "../"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
<script type="module" src="../http-request.js"></script>
|
|
16
|
+
<script type="module" src="../location-element.js"></script>
|
|
17
|
+
<script type="module" src="../custom-element.js"></script>
|
|
18
|
+
<style>
|
|
19
|
+
@import "./demo.css";
|
|
20
|
+
dt{ font-weight: bold}
|
|
21
|
+
dd{ padding: 0;}
|
|
22
|
+
h1,h3{ margin: 0;}
|
|
23
|
+
nav{ gap:0; }
|
|
24
|
+
</style>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
<button onclick="window.location.hash = `#@epa-wg/custom-element-dist@0.0.27/storybook-static/index.html`">set in page URL</button>
|
|
28
|
+
|
|
29
|
+
<custom-element src="@epa-wg/custom-element-dist/demo/npm-versions.html#npm-version"
|
|
30
|
+
package-name="@epa-wg/custom-element-dist"
|
|
31
|
+
></custom-element>
|
|
32
|
+
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
package/dist/embed-1.html
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const c=(t,e)=>{if(t==="text")return e;if(t==="json")try{return JSON.parse(e)}catch{return null}const a=document.createElement("input");return a.setAttribute("type",t),t==="number"?(a.value=e,a.valueAsNumber):t==="date"?e?(a.valueAsDate=new Date(e),a.value):null:(a.value=e,a.value)};let o,i,s;function r(t,e){o.call(localStorage,t,e),window.dispatchEvent(new CustomEvent("local-storage",{detail:{key:t,value:e}}))}function u(t){i.call(localStorage,t),window.dispatchEvent(new CustomEvent("local-storage",{detail:{key:t}}))}function g(){s.call(localStorage),window.dispatchEvent(new CustomEvent("local-storage",{detail:{}}))}function m(){o||(o=localStorage.setItem,localStorage.setItem=r,i=localStorage.removeItem,localStorage.removeItem=u,s=localStorage.clear,localStorage.clear=g)}m();function d(t,e){r(t,e)}class S extends HTMLElement{static observedAttributes=["value","slice","key","type","live"];#e;get value(){return this.#e===null?void 0:this.#e}set value(e){return this.#e=e}async connectedCallback(){const e=l=>this.getAttribute(l),a=()=>{this.#e=c(e("type"),localStorage.getItem(e("key"))),this.dispatchEvent(new Event("change"))};if(this.#e=c(e("type"),localStorage.getItem(e("key"))),this.hasAttribute("value")?d(e("key"),this.#e=e("value")):a(),this.hasAttribute("live")){const l=n=>(n.detail.key===e("key")||!n.detail.key)&&a();window.addEventListener("local-storage",l),m(),this._destroy=()=>window.removeEventListener("local-storage",l)}}disconnectedCallback(){this._destroy?.()}}window.customElements.define("local-storage",S);exports.LocalStorageElement=S;exports.localStorageSetItem=d;exports.localStorage_clear=g;exports.localStorage_removeItem=u;exports.localStorage_setItem=r;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const n = (t, e) => {
|
|
2
|
+
if (t === "text")
|
|
3
|
+
return e;
|
|
4
|
+
if (t === "json")
|
|
5
|
+
try {
|
|
6
|
+
return JSON.parse(e);
|
|
7
|
+
} catch {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const a = document.createElement("input");
|
|
11
|
+
return a.setAttribute("type", t), t === "number" ? (a.value = e, a.valueAsNumber) : t === "date" ? e ? (a.valueAsDate = new Date(e), a.value) : null : (a.value = e, a.value);
|
|
12
|
+
};
|
|
13
|
+
let o, s, i;
|
|
14
|
+
function c(t, e) {
|
|
15
|
+
o.call(localStorage, t, e), window.dispatchEvent(new CustomEvent("local-storage", { detail: { key: t, value: e } }));
|
|
16
|
+
}
|
|
17
|
+
function g(t) {
|
|
18
|
+
s.call(localStorage, t), window.dispatchEvent(new CustomEvent("local-storage", { detail: { key: t } }));
|
|
19
|
+
}
|
|
20
|
+
function d() {
|
|
21
|
+
i.call(localStorage), window.dispatchEvent(new CustomEvent("local-storage", { detail: {} }));
|
|
22
|
+
}
|
|
23
|
+
function u() {
|
|
24
|
+
o || (o = localStorage.setItem, localStorage.setItem = c, s = localStorage.removeItem, localStorage.removeItem = g, i = localStorage.clear, localStorage.clear = d);
|
|
25
|
+
}
|
|
26
|
+
u();
|
|
27
|
+
function m(t, e) {
|
|
28
|
+
c(t, e);
|
|
29
|
+
}
|
|
30
|
+
class v extends HTMLElement {
|
|
31
|
+
static observedAttributes = [
|
|
32
|
+
"value",
|
|
33
|
+
"slice",
|
|
34
|
+
"key",
|
|
35
|
+
"type",
|
|
36
|
+
"live"
|
|
37
|
+
// monitors localStorage change
|
|
38
|
+
];
|
|
39
|
+
#e;
|
|
40
|
+
get value() {
|
|
41
|
+
return this.#e === null ? void 0 : this.#e;
|
|
42
|
+
}
|
|
43
|
+
set value(e) {
|
|
44
|
+
return this.#e = e;
|
|
45
|
+
}
|
|
46
|
+
async connectedCallback() {
|
|
47
|
+
const e = (l) => this.getAttribute(l), a = () => {
|
|
48
|
+
this.#e = n(e("type"), localStorage.getItem(e("key"))), this.dispatchEvent(new Event("change"));
|
|
49
|
+
};
|
|
50
|
+
if (this.#e = n(e("type"), localStorage.getItem(e("key"))), this.hasAttribute("value") ? m(e("key"), this.#e = e("value")) : a(), this.hasAttribute("live")) {
|
|
51
|
+
const l = (r) => (r.detail.key === e("key") || !r.detail.key) && a();
|
|
52
|
+
window.addEventListener("local-storage", l), u(), this._destroy = () => window.removeEventListener("local-storage", l);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
disconnectedCallback() {
|
|
56
|
+
this._destroy?.();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
window.customElements.define("local-storage", v);
|
|
60
|
+
export {
|
|
61
|
+
v as L,
|
|
62
|
+
g as a,
|
|
63
|
+
d as b,
|
|
64
|
+
m as c,
|
|
65
|
+
c as l
|
|
66
|
+
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Please do NOT serve this file on production.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const PACKAGE_VERSION = '2.
|
|
11
|
+
const PACKAGE_VERSION = '2.4.5'
|
|
12
12
|
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
|
|
13
13
|
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
|
|
14
14
|
const activeClientIds = new Set()
|
package/package.json
CHANGED
|
@@ -1,97 +1,99 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"import": "./dist/assets/custom-element-bundle.js",
|
|
76
|
-
"require": "./dist/assets/custom-element-bundle.cjs"
|
|
77
|
-
},
|
|
78
|
-
"./package.json": "./package.json"
|
|
79
|
-
},
|
|
80
|
-
"repository": {
|
|
81
|
-
"type": "git",
|
|
82
|
-
"url": "https://github.com/EPA-WG/custom-element-dist.git"
|
|
83
|
-
},
|
|
84
|
-
"license": "Apache-2.0",
|
|
85
|
-
"bugs": {
|
|
86
|
-
"url": "https://github.com/EPA-WG/custom-element/issues"
|
|
2
|
+
"name": "@epa-wg/custom-element-dist",
|
|
3
|
+
"version": "0.0.27",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite",
|
|
7
|
+
"build": "tsc && vite build",
|
|
8
|
+
"postinstall": "bash bin/postinstall.sh",
|
|
9
|
+
"prepublishOnly": "bash bin/build.sh",
|
|
10
|
+
"preview": "vite preview",
|
|
11
|
+
"storybook": "storybook dev -p 6006",
|
|
12
|
+
"build-storybook": "storybook build",
|
|
13
|
+
"test": "node bin/vitest/vitest-browser-importmaps.mjs && vitest --coverage.enabled --coverage.all --no-file-parallelism --watch=false",
|
|
14
|
+
"test:ff": "yarn test --browser.name=firefox",
|
|
15
|
+
"test:watch": "vitest --inspect-brk --no-file-parallelism --browser.headless=false --test-timeout=0",
|
|
16
|
+
"test:storybook": "test-storybook",
|
|
17
|
+
"sb": "yarn storybook",
|
|
18
|
+
"t": "node ./node_modules/vitest/vitest.mjs --no-file-parallelism --watch --browser.headless=false src/stories/module-url.test.stories.ts",
|
|
19
|
+
"tf": "node ./node_modules/vitest/vitest.mjs --no-file-parallelism --browser.name=firefox --watch --browser.headless=false src/stories/module-url.test.stories.ts"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@epa-wg/custom-element": "0.0.27"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@chromatic-com/storybook": "2.0.0",
|
|
26
|
+
"@storybook/addon-essentials": "8.2.9",
|
|
27
|
+
"@storybook/addon-interactions": "8.2.9",
|
|
28
|
+
"@storybook/addon-links": "8.2.9",
|
|
29
|
+
"@storybook/addon-mdx-gfm": "8.2.9",
|
|
30
|
+
"@storybook/blocks": "8.2.9",
|
|
31
|
+
"@storybook/test": "8.2.9",
|
|
32
|
+
"@storybook/test-runner": "0.19.1",
|
|
33
|
+
"@storybook/web-components": "8.2.9",
|
|
34
|
+
"@storybook/web-components-vite": "8.2.9",
|
|
35
|
+
"@vitest/browser": "2.0.5",
|
|
36
|
+
"@vitest/coverage-istanbul": "2.0.5",
|
|
37
|
+
"coverage-svg": "0.0.3",
|
|
38
|
+
"lit": "3.2.0",
|
|
39
|
+
"msw": "2.4.5",
|
|
40
|
+
"msw-storybook-addon": "2.0.3",
|
|
41
|
+
"playwright": "1.47.0",
|
|
42
|
+
"storybook": "8.2.9",
|
|
43
|
+
"typescript": "5.6.2",
|
|
44
|
+
"vite": "5.4.3",
|
|
45
|
+
"vitest": "2.0.5",
|
|
46
|
+
"webdriverio": "9.0.9"
|
|
47
|
+
},
|
|
48
|
+
"msw": {
|
|
49
|
+
"workerDirectory": [
|
|
50
|
+
"public"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"keywords": [
|
|
54
|
+
"WebComponent",
|
|
55
|
+
"Declarative Custom Element",
|
|
56
|
+
"XSLT",
|
|
57
|
+
"JS",
|
|
58
|
+
"javascript"
|
|
59
|
+
],
|
|
60
|
+
"author": {
|
|
61
|
+
"name": "Sasha Firsov",
|
|
62
|
+
"email": "suns@simulationworks.com",
|
|
63
|
+
"url": "https://blog.firsov.net/"
|
|
64
|
+
},
|
|
65
|
+
"files": [
|
|
66
|
+
"*",
|
|
67
|
+
"dist/**/*",
|
|
68
|
+
"storybook-static/**/*",
|
|
69
|
+
"coverage/**/*"
|
|
70
|
+
],
|
|
71
|
+
"exports": {
|
|
72
|
+
".": {
|
|
73
|
+
"import": "./dist/assets/custom-element-bundle.js",
|
|
74
|
+
"require": "./dist/assets/custom-element-bundle.cjs"
|
|
87
75
|
},
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"url": "https://www.patreon.com/sashafirsov"
|
|
76
|
+
"./custom-element": {
|
|
77
|
+
"import": "./dist/assets/custom-element-bundle.js",
|
|
78
|
+
"require": "./dist/assets/custom-element-bundle.cjs"
|
|
92
79
|
},
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
80
|
+
"./package.json": "./package.json"
|
|
81
|
+
},
|
|
82
|
+
"repository": {
|
|
83
|
+
"type": "git",
|
|
84
|
+
"url": "https://github.com/EPA-WG/custom-element-dist.git"
|
|
85
|
+
},
|
|
86
|
+
"license": "Apache-2.0",
|
|
87
|
+
"bugs": {
|
|
88
|
+
"url": "https://github.com/EPA-WG/custom-element/issues"
|
|
89
|
+
},
|
|
90
|
+
"homepage": "https://github.com/EPA-WG/custom-element#readme",
|
|
91
|
+
"funding": {
|
|
92
|
+
"type": "patreon",
|
|
93
|
+
"url": "https://www.patreon.com/sashafirsov"
|
|
94
|
+
},
|
|
95
|
+
"web-types": [
|
|
96
|
+
"./src/custom-element/ide/web-types-dce.json",
|
|
97
|
+
"./src/custom-element/ide/web-types-xsl.json"
|
|
98
|
+
]
|
|
97
99
|
}
|
package/public/confused.svg
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
5
|
+
<title>Data slices - Declarative Custom Element implementation demo</title>
|
|
6
|
+
<link rel="icon" href="./wc-square.svg"/>
|
|
7
|
+
|
|
8
|
+
<script type="module" src="../http-request.js"></script>
|
|
9
|
+
<script type="module" src="../custom-element.js"></script>
|
|
10
|
+
<style>
|
|
11
|
+
@import "./demo.css";
|
|
12
|
+
|
|
13
|
+
label {
|
|
14
|
+
display: flex;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
label:has(input[type="text"],input[type="password"],input:not([type]) ) {
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
nav {
|
|
22
|
+
max-width: 32em;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
<!-- https://github.com/mdn/learning-area/blob/main/html/forms/form-validation/custom-error-message.html
|
|
26
|
+
todo: apply setCustomValidity( warningStr )
|
|
27
|
+
-->
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
|
|
32
|
+
<fieldset>
|
|
33
|
+
<legend><b style="color:green">green</b> in instance style can be overridden in payload as <i
|
|
34
|
+
style="color:red">red</i> in 1st instance
|
|
35
|
+
</legend>
|
|
36
|
+
<custom-element tag="dce-3">
|
|
37
|
+
<template>
|
|
38
|
+
<u>
|
|
39
|
+
<slot>is green</slot>
|
|
40
|
+
</u>
|
|
41
|
+
</template>
|
|
42
|
+
<style>dce-3 {
|
|
43
|
+
color: green
|
|
44
|
+
}</style>
|
|
45
|
+
</custom-element>
|
|
46
|
+
<u>should be</u> <i style="color:red">red</i>:
|
|
47
|
+
<dce-3 id="dce32">
|
|
48
|
+
<template>
|
|
49
|
+
<style> color:red; </style>
|
|
50
|
+
<u>red</u>
|
|
51
|
+
</template>
|
|
52
|
+
</dce-3> <br/>
|
|
53
|
+
should be GREEN:
|
|
54
|
+
<dce-3 id="dce31">green</dce-3>
|
|
55
|
+
</fieldset>
|
|
56
|
+
|
|
57
|
+
<script type="module" src="https://unpkg.com/html-demo-element@1/html-demo-element.js"></script>
|
|
58
|
+
|
|
59
|
+
</body>
|
|
60
|
+
</html>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<svg id="dwc-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
2
|
+
<defs>
|
|
3
|
+
|
|
4
|
+
</defs>
|
|
5
|
+
<polygon class="cls-3" points="0 82.47 0 126.71 34.84 146.83 34.84 187.06 73.16 209.18 108 189.07 142.84 209.18 181.16 187.06 181.16 146.83 216 126.71 216 82.47 181.16 62.35 181.16 22.12 142.84 0 108 20.12 73.16 0 34.84 22.12 34.84 62.35 0 82.47"/>
|
|
6
|
+
<path class="cls-2" d="m114.33,56.69l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
|
|
7
|
+
<path class="cls-2" d="m98.19,62.71h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
8
|
+
<path class="cls-1" d="m48.12,66.01l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97Z"/>
|
|
9
|
+
<path class="cls-2" d="m46.18,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
|
|
10
|
+
<path class="cls-2" d="m115.87,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
|
|
11
|
+
<path class="cls-2" d="m152.65,42.59c-4.44,2.56-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0Z"/>
|
|
12
|
+
<path class="cls-2" d="m77.55,158.4l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54Z"/>
|
|
13
|
+
<path class="cls-4" d="m146.31,134.03v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97Z"/>
|
|
14
|
+
<path class="cls-4" d="m63.35,123.06h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
15
|
+
<path class="cls-4" d="m103.61,151.37l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53Z"/>
|
|
16
|
+
<path class="cls-4" d="m63.35,163.29h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
17
|
+
<path class="cls-4" d="m28.51,102.94h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
18
|
+
<path class="cls-4" d="m133.04,163.29l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
19
|
+
<path class="cls-4" d="m173.29,151.37l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53Z"/>
|
|
20
|
+
<path class="cls-4" d="m209.06,91.55c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84Z"/>
|
|
21
|
+
<path class="cls-2" d="m149.18,117.04l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
|
|
22
|
+
<path class="cls-1" d="m112.39,98.05l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54Z"/>
|
|
23
|
+
<path class="cls-1" d="m100.13,105.12c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
|
|
24
|
+
<path class="cls-2" d="m65.29,85.01c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
|
|
25
|
+
<path class="cls-1" d="m133.04,123.06l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
26
|
+
<path class="cls-1" d="m184.02,96.93l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<dce-root data-dce-id="1" xmlns="http://www.w3.org/1999/xhtml" xmlns:dce="urn:schemas-epa-wg:dce"
|
|
3
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml"><u data-dce-id="2" xmlns="">
|
|
4
|
+
<dce-text data-dce-id="3">
|
|
5
|
+
<xhtml:span xmlns:xsl="http://www.w3.org/1999/XSL/Transform" slot=""/>
|
|
6
|
+
<xhtml:style xmlns:xsl="http://www.w3.org/1999/XSL/Transform" slot="" title="ABC">
|
|
7
|
+
dce-3[data-dce-style="54f96d52-ce70-435d-83c4-b421357d9a17"]{ color:red; }
|
|
8
|
+
</xhtml:style>
|
|
9
|
+
<xhtml:span xmlns:xsl="http://www.w3.org/1999/XSL/Transform" slot=""/>
|
|
10
|
+
<xhtml:u xmlns:xsl="http://www.w3.org/1999/XSL/Transform" slot="">red</xhtml:u>
|
|
11
|
+
<xhtml:span xmlns:xsl="http://www.w3.org/1999/XSL/Transform" slot=""/>
|
|
12
|
+
</dce-text>
|
|
13
|
+
</u></dce-root>
|