@epa-wg/custom-element-dist 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +11 -0
- package/.gitignore +26 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/compiler.xml +6 -0
- package/.idea/custom-element-dist.iml +13 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.storybook/main.ts +21 -0
- package/.storybook/preview.ts +17 -0
- package/.vscode/settings.json +24 -0
- package/LICENSE +201 -0
- package/README.md +32 -0
- package/bin/build.sh +8 -0
- package/bin/clean.sh +5 -0
- package/bin/postinstall.sh +17 -0
- package/bin/start.sh +2 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/coverage-final.json +16 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +161 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/src/coverage.svg +10 -0
- package/coverage/src/custom-element/coverage.svg +10 -0
- package/coverage/src/custom-element/custom-element.js/coverage.svg +10 -0
- package/coverage/src/custom-element/custom-element.js.html +2149 -0
- package/coverage/src/custom-element/http-request.js/coverage.svg +10 -0
- package/coverage/src/custom-element/http-request.js.html +352 -0
- package/coverage/src/custom-element/index.html +161 -0
- package/coverage/src/custom-element/local-storage.js/coverage.svg +10 -0
- package/coverage/src/custom-element/local-storage.js.html +346 -0
- package/coverage/src/custom-element/location-element.js/coverage.svg +10 -0
- package/coverage/src/custom-element/location-element.js.html +343 -0
- package/coverage/src/index.html +116 -0
- package/coverage/src/mocks/coverage.svg +10 -0
- package/coverage/src/mocks/handlers.ts/coverage.svg +10 -0
- package/coverage/src/mocks/handlers.ts.html +172 -0
- package/coverage/src/mocks/index.html +116 -0
- package/coverage/src/stories/attributes.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/attributes.stories.ts.html +481 -0
- package/coverage/src/stories/coverage.svg +10 -0
- package/coverage/src/stories/css.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/css.stories.ts.html +397 -0
- package/coverage/src/stories/dom-merge.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/dom-merge.stories.ts.html +424 -0
- package/coverage/src/stories/external-template.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/external-template.stories.ts.html +820 -0
- package/coverage/src/stories/http-request.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/http-request.stories.ts.html +817 -0
- package/coverage/src/stories/index.html +236 -0
- package/coverage/src/stories/local-storage.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/local-storage.stories.ts.html +1249 -0
- package/coverage/src/stories/location-element.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/location-element.stories.ts.html +484 -0
- package/coverage/src/stories/renderPlay.ts/coverage.svg +10 -0
- package/coverage/src/stories/renderPlay.ts.html +151 -0
- package/coverage/src/stories/slice-events.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/slice-events.stories.ts.html +436 -0
- package/coverage/src/sum.ts/coverage.svg +10 -0
- package/coverage/src/sum.ts.html +94 -0
- package/dist/confused.svg +37 -0
- package/dist/custom-element-B4v-KaIh.cjs +53 -0
- package/dist/custom-element-_g0GTup2.js +436 -0
- package/dist/custom-element-bundle.cjs +1 -0
- package/dist/custom-element-bundle.js +31 -0
- package/dist/embed-1.html +3 -0
- package/dist/html-template.html +126 -0
- package/dist/html-template.xhtml +45 -0
- package/dist/html-template.xml +45 -0
- package/dist/http-request-BOvP4KTl.js +56 -0
- package/dist/http-request-DPrY7mGh.cjs +1 -0
- package/dist/local-storage-Boafngui.cjs +1 -0
- package/dist/local-storage-BqDEu2kF.js +59 -0
- package/dist/location-element-2m0gWq_d.cjs +1 -0
- package/dist/location-element-nA_wsqBt.js +49 -0
- package/dist/mockServiceWorker.js +284 -0
- package/dist/tree.xsl +33 -0
- package/dist/vite.svg +1 -0
- package/index.html +17 -0
- package/package.json +97 -0
- package/public/confused.svg +37 -0
- package/public/embed-1.html +3 -0
- package/public/html-template.html +126 -0
- package/public/html-template.xhtml +45 -0
- package/public/html-template.xml +45 -0
- package/public/mockServiceWorker.js +284 -0
- package/public/tree.xsl +33 -0
- package/public/vite.svg +1 -0
- package/src/assets/lit.svg +1 -0
- package/src/custom-element/custom-element.d.ts +36 -0
- package/src/custom-element/custom-element.js +688 -0
- package/src/custom-element/demo/a.html +63 -0
- package/src/custom-element/demo/confused.svg +37 -0
- package/src/custom-element/demo/data-slices.html +184 -0
- package/src/custom-element/demo/dce-social-preview.png +0 -0
- package/src/custom-element/demo/demo.css +22 -0
- package/src/custom-element/demo/dom-merge.html +123 -0
- package/src/custom-element/demo/embed-1.html +3 -0
- package/src/custom-element/demo/external-template.html +179 -0
- package/src/custom-element/demo/hex-grid-dce.html +183 -0
- package/src/custom-element/demo/hex-grid-transform.png +0 -0
- package/src/custom-element/demo/hex-grid.html +66 -0
- package/src/custom-element/demo/html-template.html +126 -0
- package/src/custom-element/demo/html-template.xhtml +45 -0
- package/src/custom-element/demo/html-template.xml +45 -0
- package/src/custom-element/demo/http-request.html +143 -0
- package/src/custom-element/demo/local-storage.html +218 -0
- package/src/custom-element/demo/location-element.html +155 -0
- package/src/custom-element/demo/logo.png +0 -0
- package/src/custom-element/demo/parameters.html +70 -0
- package/src/custom-element/demo/s.xml +14 -0
- package/src/custom-element/demo/s.xslt +76 -0
- package/src/custom-element/demo/scoped-css.html +169 -0
- package/src/custom-element/demo/ss.html +57 -0
- package/src/custom-element/demo/table.xml +25 -0
- package/src/custom-element/demo/table.xsl +293 -0
- package/src/custom-element/demo/template.xsl +46 -0
- package/src/custom-element/demo/tree.xml +25 -0
- package/src/custom-element/demo/tree.xsl +33 -0
- package/src/custom-element/demo/wc-square.svg +1 -0
- package/src/custom-element/demo/xhtml-template.xhtml +45 -0
- package/src/custom-element/demo/z.html +62 -0
- package/src/custom-element/demo/z.xml +60 -0
- package/src/custom-element/http-request.js +89 -0
- package/src/custom-element/ide/IDE.md +31 -0
- package/src/custom-element/ide/customData-dce.json +112 -0
- package/src/custom-element/ide/customData-xsl.json +1018 -0
- package/src/custom-element/ide/web-types-dce.json +111 -0
- package/src/custom-element/ide/web-types-xsl.json +867 -0
- package/src/custom-element/index.html +168 -0
- package/src/custom-element/index.js +7 -0
- package/src/custom-element/local-storage.js +87 -0
- package/src/custom-element/location-element.js +87 -0
- package/src/custom-element.test.ts +10 -0
- package/src/index.css +38 -0
- package/src/mocks/handlers.ts +29 -0
- package/src/mocks/pokemons.mock.ts +13 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +5 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +15 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +3 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +12 -0
- package/src/stories/assets/youtube.svg +4 -0
- package/src/stories/attributes.stories.ts +132 -0
- package/src/stories/attributes.test.ts +14 -0
- package/src/stories/css.stories.ts +104 -0
- package/src/stories/css.test.ts +12 -0
- package/src/stories/dom-merge.stories.ts +113 -0
- package/src/stories/dom-merge.test.ts +12 -0
- package/src/stories/external-template.stories.ts +245 -0
- package/src/stories/external-template.test.ts +12 -0
- package/src/stories/http-request.stories.ts +244 -0
- package/src/stories/http-request.test.ts +29 -0
- package/src/stories/local-storage.stories.ts +388 -0
- package/src/stories/local-storage.test.ts +12 -0
- package/src/stories/location-element.stories.ts +133 -0
- package/src/stories/location-element.test.ts +14 -0
- package/src/stories/renderPlay.ts +22 -0
- package/src/stories/slice-events.stories.ts +117 -0
- package/src/stories/slice-events.test.ts +12 -0
- package/src/sum.test.ts +6 -0
- package/src/sum.ts +4 -0
- package/src/vite-env.d.ts +1 -0
- package/storybook-static/assets/Color-RQJUDNI5-C4yZhNbM.js +1 -0
- package/storybook-static/assets/Configure-C7d36rng.js +173 -0
- package/storybook-static/assets/DocsRenderer-K4EAMTCU-BLMupvSb.js +2 -0
- package/storybook-static/assets/WithTooltip-Y7J54OF7-BAQSPSFk.js +1 -0
- package/storybook-static/assets/accessibility-W_h2acOZ.png +0 -0
- package/storybook-static/assets/addon-library-BWUCAmyN.png +0 -0
- package/storybook-static/assets/attributes.stories-ZB0RTY1d.js +151 -0
- package/storybook-static/assets/context-C0qIqeS4.png +0 -0
- package/storybook-static/assets/css.stories-CLSX-Xxd.js +86 -0
- package/storybook-static/assets/custom-element-BLZZ00dz.js +53 -0
- package/storybook-static/assets/docs---vsFbMi.png +0 -0
- package/storybook-static/assets/dom-merge.stories-CgHZUABU.js +138 -0
- package/storybook-static/assets/entry-preview-CQqNFx4W.js +8 -0
- package/storybook-static/assets/entry-preview-docs-CWgqLfd3.js +2 -0
- package/storybook-static/assets/external-template.stories-DtSLMxvg.js +316 -0
- package/storybook-static/assets/figma-plugin-CH2hELiO.png +0 -0
- package/storybook-static/assets/formatter-B5HCVTEV-tKeEfJA9.js +58 -0
- package/storybook-static/assets/http-request.stories-CUzlXO89.js +300 -0
- package/storybook-static/assets/iframe-gCvlWuoC.js +2 -0
- package/storybook-static/assets/index-CBQwM6ST.js +508 -0
- package/storybook-static/assets/index-CDavW7r9.js +193 -0
- package/storybook-static/assets/index-CQA5dlr6.js +13 -0
- package/storybook-static/assets/index-Cc7K62zD.js +3 -0
- package/storybook-static/assets/index-DgaNIR0t.js +1 -0
- package/storybook-static/assets/index-Dkj0J1ds.js +1 -0
- package/storybook-static/assets/index-DnEJ_bKa.js +1 -0
- package/storybook-static/assets/index-DrFu-skq.js +6 -0
- package/storybook-static/assets/lit-element-B4_0akdT.js +19 -0
- package/storybook-static/assets/local-storage.stories-BkO6djDz.js +415 -0
- package/storybook-static/assets/location-element.stories-DCIOUd0D.js +108 -0
- package/storybook-static/assets/preview-B4GcaC1c.js +1 -0
- package/storybook-static/assets/preview-B63p-W8V.js +20 -0
- package/storybook-static/assets/preview-BAz7FMXc.js +396 -0
- package/storybook-static/assets/preview-BDY5ThwJ.js +1 -0
- package/storybook-static/assets/preview-C6t8KBFr.js +1 -0
- package/storybook-static/assets/preview-CYD85dwb.js +7 -0
- package/storybook-static/assets/preview-CkgAD_DE.js +2 -0
- package/storybook-static/assets/preview-D8LadFCz.js +48 -0
- package/storybook-static/assets/preview-DNpCpRPf.js +1 -0
- package/storybook-static/assets/preview-PxUn-cIn.js +1 -0
- package/storybook-static/assets/share-DGA-UcQf.png +0 -0
- package/storybook-static/assets/slice-events.stories-DXKjXI37.js +115 -0
- package/storybook-static/assets/styling-Bk6zjRzU.png +0 -0
- package/storybook-static/assets/syntaxhighlighter-JOJW2KGS-C04pIVD3.js +1 -0
- package/storybook-static/assets/testing-cbzR9l9r.png +0 -0
- package/storybook-static/assets/theming-D6WJLNoW.png +0 -0
- package/storybook-static/assets/tiny-invariant-BxWVcicq.js +1 -0
- package/storybook-static/confused.svg +37 -0
- package/storybook-static/embed-1.html +3 -0
- package/storybook-static/favicon.svg +7 -0
- package/storybook-static/html-template.html +126 -0
- package/storybook-static/html-template.xhtml +45 -0
- package/storybook-static/html-template.xml +45 -0
- package/storybook-static/iframe.html +492 -0
- package/storybook-static/index.html +163 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/mockServiceWorker.js +284 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +327 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +40 -0
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +60 -0
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js.LEGAL.txt +18 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js +33 -0
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/links-1/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/links-1/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +3 -0
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-common-assets/fonts.css +31 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/WithTooltip-Y7J54OF7-CEHQ77YF.js +1 -0
- package/storybook-static/sb-manager/chunk-E3WK6ZOZ.js +234 -0
- package/storybook-static/sb-manager/chunk-E6ABNH5R.js +183 -0
- package/storybook-static/sb-manager/chunk-FEE35O7J.js +9 -0
- package/storybook-static/sb-manager/chunk-S4VOIVUE.js +347 -0
- package/storybook-static/sb-manager/chunk-XCO5HRLK.js +6 -0
- package/storybook-static/sb-manager/chunk-XP3HGWTR.js +1 -0
- package/storybook-static/sb-manager/formatter-B5HCVTEV-7DCBOGO6.js +58 -0
- package/storybook-static/sb-manager/globals-module-info.js +1 -0
- package/storybook-static/sb-manager/globals-runtime.js +1 -0
- package/storybook-static/sb-manager/globals.js +1 -0
- package/storybook-static/sb-manager/index.js +1 -0
- package/storybook-static/sb-manager/runtime.js +1 -0
- package/storybook-static/sb-manager/syntaxhighlighter-JOJW2KGS-VF6EEVPI.js +1 -0
- package/storybook-static/sb-preview/globals.js +1 -0
- package/storybook-static/sb-preview/runtime.js +139 -0
- package/storybook-static/tree.xsl +33 -0
- package/storybook-static/vite.svg +1 -0
- package/tsconfig.json +25 -0
- package/vite.config.js +55 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import{w as d,e}from"./index-CDavW7r9.js";import"./custom-element-BLZZ00dz.js";function a(t){return new Promise(l=>setTimeout(l,t))}function y(t){const{title:l,body:n}=t;return`
|
|
2
|
+
<fieldset>
|
|
3
|
+
<legend>${l}</legend>
|
|
4
|
+
${n}
|
|
5
|
+
</fieldset>
|
|
6
|
+
`}const q={title:"slice-events",render:y},s={args:{title:"Slice initialization, change on event",body:`
|
|
7
|
+
<p>initial value should be 0; + and - should change the number in input field</p>
|
|
8
|
+
<custom-element>
|
|
9
|
+
<template>
|
|
10
|
+
<button slice="clickcount" slice-event="click" slice-value="//clickcount + 1">+</button>
|
|
11
|
+
<button slice="clickcount" slice-event="click" slice-value="//clickcount - 1">-</button>
|
|
12
|
+
<input slice="clickcount" type="number" value="{//clickcount ?? 0}">
|
|
13
|
+
<code data-testid="slice-value">{ //clickcount }</code>
|
|
14
|
+
</template>
|
|
15
|
+
</custom-element>
|
|
16
|
+
`},play:async({canvasElement:t})=>{const l=s.args.title,n=d(t);await n.findByText(l);const c=await n.findByTestId("slice-value"),i=await t.querySelector('[type="number"]');await e(c).toBeInTheDocument(),e(c.textContent).to.equal("0","initial slot value 0"),e(i.value).to.equal("0","initial input value 0"),t.querySelector('[slice-value="//clickcount + 1"]').click(),await a(10),e(c.textContent).to.equal("1","increment to 1"),e(i.value).to.equal("1","increment input 1"),t.querySelector('[slice-value="//clickcount + 1"]').click(),await a(10),t.querySelector('[slice-value="//clickcount + 1"]').click(),await a(10),e(c.textContent).to.equal("3","double increment to 3"),e(i.value).to.equal("3","double increment input to 3"),t.querySelector('[slice-value="//clickcount - 1"]').click(),await a(10),e(c.textContent).to.equal("2","decrement to 2"),e(i.value).to.equal("2","decrement input to 2")}},o={args:{title:"Realtime Slice data on event",body:`
|
|
17
|
+
<p>move the mouse over TEXTAREA and click to see slice and slice event changed</p>
|
|
18
|
+
<custom-element>
|
|
19
|
+
<template>
|
|
20
|
+
<textarea slice="s" slice-value="concat('x:', //@pageX)" slice-event="mousemove click"
|
|
21
|
+
style="width:16rem;height:16rem;box-shadow: inset {//@offsetX}px {//@offsetY}px gold;"></textarea><br/>
|
|
22
|
+
//slice/s : <code data-testid="//slice/s" >{ //slice/s }</code> <br/>
|
|
23
|
+
//slice/s/event/@offsetY : <code data-testid="//slice/s/event/@offsetY" >{ //slice/s/event/@offsetY }</code> <br/>
|
|
24
|
+
event type : <code data-testid="//slice/s/event/@type" >{ //slice/s/event/@type }</code>
|
|
25
|
+
</template>
|
|
26
|
+
</custom-element>
|
|
27
|
+
`},play:async({canvasElement:t})=>{const l=o.args.title,n=d(t);await n.findByText(l);const c=()=>n.getByTestId("//slice/s").textContent,i=()=>n.getByTestId("//slice/s/event/@offsetY").textContent,v=()=>n.getByTestId("//slice/s/event/@type").textContent,p=await t.querySelector("textarea");e(c()).to.equal("","initial slot value blank"),e(i()).to.equal("","initial slot offsetY blank"),e(v()).to.equal("","initial slot event blank"),((u,r,m)=>{const x=new MouseEvent(m,{screenX:u,screenY:r,clientX:u,clientY:r,offsetX:u,offsetY:r});p.dispatchEvent(x)})(10,20,"click"),await a(10),e(c()).to.equal("x:10","click slot value 10"),e(Number(i())).to.be.lessThan(0,"offsetY click"),e(v()).to.equal("click","click event type")}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
28
|
+
args: {
|
|
29
|
+
title: 'Slice initialization, change on event',
|
|
30
|
+
body: \`
|
|
31
|
+
<p>initial value should be 0; + and - should change the number in input field</p>
|
|
32
|
+
<custom-element>
|
|
33
|
+
<template>
|
|
34
|
+
<button slice="clickcount" slice-event="click" slice-value="//clickcount + 1">+</button>
|
|
35
|
+
<button slice="clickcount" slice-event="click" slice-value="//clickcount - 1">-</button>
|
|
36
|
+
<input slice="clickcount" type="number" value="{//clickcount ?? 0}">
|
|
37
|
+
<code data-testid="slice-value">{ //clickcount }</code>
|
|
38
|
+
</template>
|
|
39
|
+
</custom-element>
|
|
40
|
+
\`
|
|
41
|
+
},
|
|
42
|
+
play: async ({
|
|
43
|
+
canvasElement
|
|
44
|
+
}) => {
|
|
45
|
+
const titleText = (SliceInitChangeEvent.args!.title as string);
|
|
46
|
+
const canvas = within(canvasElement);
|
|
47
|
+
await canvas.findByText(titleText);
|
|
48
|
+
const code = await canvas.findByTestId('slice-value');
|
|
49
|
+
const input = (await canvasElement.querySelector('[type="number"]') as HTMLInputElement);
|
|
50
|
+
await expect(code).toBeInTheDocument();
|
|
51
|
+
expect(code.textContent).to.equal('0', 'initial slot value 0');
|
|
52
|
+
expect(input.value).to.equal('0', 'initial input value 0');
|
|
53
|
+
canvasElement.querySelector('[slice-value="//clickcount + 1"]').click();
|
|
54
|
+
await sleep(10);
|
|
55
|
+
expect(code.textContent).to.equal('1', 'increment to 1');
|
|
56
|
+
expect(input.value).to.equal('1', 'increment input 1');
|
|
57
|
+
canvasElement.querySelector('[slice-value="//clickcount + 1"]').click();
|
|
58
|
+
await sleep(10);
|
|
59
|
+
canvasElement.querySelector('[slice-value="//clickcount + 1"]').click();
|
|
60
|
+
await sleep(10);
|
|
61
|
+
expect(code.textContent).to.equal('3', 'double increment to 3');
|
|
62
|
+
expect(input.value).to.equal('3', 'double increment input to 3');
|
|
63
|
+
canvasElement.querySelector('[slice-value="//clickcount - 1"]').click();
|
|
64
|
+
await sleep(10);
|
|
65
|
+
expect(code.textContent).to.equal('2', 'decrement to 2');
|
|
66
|
+
expect(input.value).to.equal('2', 'decrement input to 2');
|
|
67
|
+
}
|
|
68
|
+
}`,...s.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
|
|
69
|
+
args: {
|
|
70
|
+
title: 'Realtime Slice data on event',
|
|
71
|
+
body: \`
|
|
72
|
+
<p>move the mouse over TEXTAREA and click to see slice and slice event changed</p>
|
|
73
|
+
<custom-element>
|
|
74
|
+
<template>
|
|
75
|
+
<textarea slice="s" slice-value="concat('x:', //@pageX)" slice-event="mousemove click"
|
|
76
|
+
style="width:16rem;height:16rem;box-shadow: inset {//@offsetX}px {//@offsetY}px gold;"></textarea><br/>
|
|
77
|
+
//slice/s : <code data-testid="//slice/s" >{ //slice/s }</code> <br/>
|
|
78
|
+
//slice/s/event/@offsetY : <code data-testid="//slice/s/event/@offsetY" >{ //slice/s/event/@offsetY }</code> <br/>
|
|
79
|
+
event type : <code data-testid="//slice/s/event/@type" >{ //slice/s/event/@type }</code>
|
|
80
|
+
</template>
|
|
81
|
+
</custom-element>
|
|
82
|
+
\`
|
|
83
|
+
},
|
|
84
|
+
play: async ({
|
|
85
|
+
canvasElement
|
|
86
|
+
}) => {
|
|
87
|
+
const titleText = (RealtimeEventInSlice.args!.title as string);
|
|
88
|
+
const canvas = within(canvasElement);
|
|
89
|
+
await canvas.findByText(titleText);
|
|
90
|
+
const sliceText = () => canvas.getByTestId('//slice/s').textContent,
|
|
91
|
+
offsetY = () => canvas.getByTestId('//slice/s/event/@offsetY').textContent,
|
|
92
|
+
eventType = () => canvas.getByTestId('//slice/s/event/@type').textContent;
|
|
93
|
+
const input = await canvasElement.querySelector('textarea');
|
|
94
|
+
// expect(input).toBeInTheDocument();
|
|
95
|
+
expect(sliceText()).to.equal('', 'initial slot value blank');
|
|
96
|
+
expect(offsetY()).to.equal('', 'initial slot offsetY blank');
|
|
97
|
+
expect(eventType()).to.equal('', 'initial slot event blank');
|
|
98
|
+
const emitXy = (x, y, eventName) => {
|
|
99
|
+
const ev = new MouseEvent(eventName, {
|
|
100
|
+
screenX: x,
|
|
101
|
+
screenY: y,
|
|
102
|
+
clientX: x,
|
|
103
|
+
clientY: y,
|
|
104
|
+
offsetX: x,
|
|
105
|
+
offsetY: y
|
|
106
|
+
});
|
|
107
|
+
input.dispatchEvent(ev);
|
|
108
|
+
};
|
|
109
|
+
emitXy(10, 20, 'click');
|
|
110
|
+
await sleep(10);
|
|
111
|
+
expect(sliceText()).to.equal('x:10', 'click slot value 10');
|
|
112
|
+
expect(Number(offsetY())).to.be.lessThan(0, 'offsetY click');
|
|
113
|
+
expect(eventType()).to.equal('click', 'click event type');
|
|
114
|
+
}
|
|
115
|
+
}`,...o.parameters?.docs?.source}}};const T=["SliceInitChangeEvent","RealtimeEventInSlice"];export{o as RealtimeEventInSlice,s as SliceInitChangeEvent,T as __namedExportsOrder,q as default};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as s,c as m,s as g,a as n}from"./index-CBQwM6ST.js";import"./iframe-gCvlWuoC.js";import"../sb-preview/runtime.js";import"./index-Cc7K62zD.js";import"./index-Dkj0J1ds.js";import"./index-DrFu-skq.js";export{s as SyntaxHighlighter,m as createCopyToClipboardFunction,g as default,n as supportedLanguages};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=!0,n="Invariant failed";function v(o,r){if(!o){if(a)throw new Error(n);var i=typeof r=="function"?r():r,t=i?"".concat(n,": ").concat(i):n;throw new Error(t)}}export{v as i};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.0">
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="d">
|
|
5
|
+
<stop offset="0"/>
|
|
6
|
+
<stop offset=".5"/>
|
|
7
|
+
<stop offset=".80000001" stop-opacity=".46666667"/>
|
|
8
|
+
<stop offset="1" stop-opacity="0"/>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
<linearGradient id="a">
|
|
11
|
+
<stop offset="0" stop-color="#fb0"/>
|
|
12
|
+
<stop offset=".5" stop-color="#e29d00"/>
|
|
13
|
+
<stop offset="1" stop-color="#fb0"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
<linearGradient id="c">
|
|
16
|
+
<stop offset="0"/>
|
|
17
|
+
<stop offset="1" stop-opacity="0"/>
|
|
18
|
+
</linearGradient>
|
|
19
|
+
<linearGradient id="b">
|
|
20
|
+
<stop offset="0" stop-color="#ffc"/>
|
|
21
|
+
<stop offset=".5" stop-color="#fff965"/>
|
|
22
|
+
<stop offset="1" stop-color="#fc3"/>
|
|
23
|
+
</linearGradient>
|
|
24
|
+
<linearGradient xlink:href="#a" id="i" x1="8.0350637" x2="42.788235" y1="32.372219" y2="32.372219" gradientUnits="userSpaceOnUse" spreadMethod="pad"/>
|
|
25
|
+
<radialGradient xlink:href="#b" id="f" cx="17.986637" cy="16.545853" r="23.978155" fx="17.986637" fy="16.545853" gradientUnits="userSpaceOnUse"/>
|
|
26
|
+
<radialGradient xlink:href="#c" id="e" cx="53.309223" cy="94.956306" r="63.252911" fx="53.309223" fy="94.956306" gradientTransform="matrix(1 0 0 .34935 0 61.7838)" gradientUnits="userSpaceOnUse"/>
|
|
27
|
+
<radialGradient xlink:href="#d" id="g" cx="18.71347" cy="21.759708" r="1.8644418" fx="18.71347" fy="21.759708" gradientTransform="matrix(1 0 0 1.77778 0 -16.92422)" gradientUnits="userSpaceOnUse"/>
|
|
28
|
+
</defs>
|
|
29
|
+
<path fill="url(#e)" d="M116.56213 94.956306a63.252911 22.097088 0 1 1-126.5058174 0 63.252911 22.097088 0 1 1 126.5058174 0z" opacity=".53200001" transform="matrix(.3162 0 0 .33941 6.936944 8.132618)"/>
|
|
30
|
+
<path fill="url(#f)" stroke="#fb0" stroke-width="1.43869453" d="M47.094418 23.83131a23.478155 23.478155 0 1 1-46.9563107 0 23.478155 23.478155 0 1 1 46.9563107 0z" transform="translate(4.30185 4.122792) scale(.83409)"/>
|
|
31
|
+
<path id="h" fill="#fff" fill-opacity="1" fill-rule="nonzero" stroke="#fc0" stroke-dasharray="none" stroke-dashoffset="0" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-width="1" d="M21.682767 18.5142a3.9360437 6.9743929 0 1 1-7.872088 0 3.9360437 6.9743929 0 1 1 7.872088 0z" opacity="1" transform="matrix(1.01507 0 0 1.00354 -.0090285 .916405)"/>
|
|
32
|
+
<path id="j" fill="url(#g)" fill-opacity="1" fill-rule="nonzero" stroke="none" stroke-dasharray="none" stroke-dashoffset="0" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-width="1" d="M20.577912 21.759708a1.8644418 3.314563 0 1 1-3.728883 0 1.8644418 3.314563 0 1 1 3.728883 0z" opacity="1" transform="translate(-.138107 .535104)"/>
|
|
33
|
+
<use xlink:href="#h" width="48" height="48" transform="translate(12.50001 -4.4e-7)"/>
|
|
34
|
+
<path fill="none" stroke="url(#i)" stroke-linecap="round" stroke-width="1.97319973" d="M9.0216636 35.899178c4.7689724-7.457767 10.9544424-9.489956 17.3095664-3.728884 5.404329 4.899155 11.190398 4.350365 15.470406-.656007"/>
|
|
35
|
+
<path fill="none" stroke="#e2ac00" stroke-linecap="round" stroke-width="1.17813516" d="M15.504748 34.21319c3.012147-3.243177 6.693658.87012 6.693658.87012" opacity=".8"/>
|
|
36
|
+
<use xlink:href="#j" width="48" height="48" transform="translate(10.78418 -5)"/>
|
|
37
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="164" height="164">
|
|
2
|
+
<svg width="164" height="164" viewBox="0 0 164 164" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M22.467 147.762 17.5 15.402a8.062 8.062 0 0 1 7.553-8.35L137.637.016a8.061 8.061 0 0 1 8.565 8.047v144.23a8.063 8.063 0 0 1-8.424 8.054l-107.615-4.833a8.062 8.062 0 0 1-7.695-7.752Z" fill="#FF4785"></path>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="m128.785.57-15.495.968-.755 18.172a1.203 1.203 0 0 0 1.928 1.008l7.06-5.354 5.962 4.697a1.202 1.202 0 0 0 1.946-.987L128.785.569Zm-12.059 60.856c-2.836 2.203-23.965 3.707-23.965.57.447-11.969-4.912-12.494-7.889-12.494-2.828 0-7.59.855-7.59 7.267 0 6.534 6.96 10.223 15.13 14.553 11.607 6.15 25.654 13.594 25.654 32.326 0 17.953-14.588 27.871-33.194 27.871-19.201 0-35.981-7.769-34.086-34.702.744-3.163 25.156-2.411 25.156 0-.298 11.114 2.232 14.383 8.633 14.383 4.912 0 7.144-2.708 7.144-7.267 0-6.9-7.252-10.973-15.595-15.657C64.827 81.933 51.53 74.468 51.53 57.34c0-17.098 11.76-28.497 32.747-28.497 20.988 0 32.449 11.224 32.449 32.584Z" fill="#fff"></path>
|
|
5
|
+
</svg>
|
|
6
|
+
<style>@media (prefers-color-scheme: light) { :root { filter: none; } }</style>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
3
|
+
<head>
|
|
4
|
+
<title>template based on HTML file</title>
|
|
5
|
+
<style>svg {
|
|
6
|
+
width: 4rem;
|
|
7
|
+
}</style>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<script>console.error('Stranger danger!')</script>
|
|
11
|
+
<b id="wave">👋</b>
|
|
12
|
+
<b id="ok">👌</b>
|
|
13
|
+
<svg id="dwc-logo" data-testid="svg-test" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18">
|
|
14
|
+
<defs>
|
|
15
|
+
<style>.cls-1 {
|
|
16
|
+
fill: #c2e6f1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.cls-2 {
|
|
20
|
+
fill: #dcf1f7;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.cls-3 {
|
|
24
|
+
fill: #2d4554;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.cls-4 {
|
|
28
|
+
fill: #60cae5;
|
|
29
|
+
}</style>
|
|
30
|
+
</defs>
|
|
31
|
+
<polygon class="cls-3"
|
|
32
|
+
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"/>
|
|
33
|
+
<path class="cls-2"
|
|
34
|
+
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"/>
|
|
35
|
+
<path class="cls-2"
|
|
36
|
+
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"/>
|
|
37
|
+
<path class="cls-1"
|
|
38
|
+
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"/>
|
|
39
|
+
<path class="cls-2"
|
|
40
|
+
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"/>
|
|
41
|
+
<path class="cls-2"
|
|
42
|
+
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"/>
|
|
43
|
+
<path class="cls-2"
|
|
44
|
+
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"/>
|
|
45
|
+
<path class="cls-2"
|
|
46
|
+
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"/>
|
|
47
|
+
<path class="cls-4"
|
|
48
|
+
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"/>
|
|
49
|
+
<path class="cls-4"
|
|
50
|
+
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"/>
|
|
51
|
+
<path class="cls-4"
|
|
52
|
+
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"/>
|
|
53
|
+
<path class="cls-4"
|
|
54
|
+
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"/>
|
|
55
|
+
<path class="cls-4"
|
|
56
|
+
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"/>
|
|
57
|
+
<path class="cls-4"
|
|
58
|
+
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"/>
|
|
59
|
+
<path class="cls-4"
|
|
60
|
+
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"/>
|
|
61
|
+
<path class="cls-4"
|
|
62
|
+
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"/>
|
|
63
|
+
<path class="cls-2"
|
|
64
|
+
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"/>
|
|
65
|
+
<path class="cls-1"
|
|
66
|
+
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"/>
|
|
67
|
+
<path class="cls-1"
|
|
68
|
+
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"/>
|
|
69
|
+
<path class="cls-2"
|
|
70
|
+
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"/>
|
|
71
|
+
<path class="cls-1"
|
|
72
|
+
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"/>
|
|
73
|
+
<path class="cls-1"
|
|
74
|
+
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"/>
|
|
75
|
+
</svg>
|
|
76
|
+
<math id="sophomores-dream" data-testid="ml-test" display="block">
|
|
77
|
+
<mrow>
|
|
78
|
+
<msubsup>
|
|
79
|
+
<mo>∫</mo>
|
|
80
|
+
<mn>0</mn>
|
|
81
|
+
<mn>1</mn>
|
|
82
|
+
</msubsup>
|
|
83
|
+
<msup>
|
|
84
|
+
<mi>x</mi>
|
|
85
|
+
<mi>x</mi>
|
|
86
|
+
</msup>
|
|
87
|
+
<mo rspace="0.22em"></mo>
|
|
88
|
+
<mo rspace="0">ⅆ</mo>
|
|
89
|
+
<mi>x</mi>
|
|
90
|
+
<mo>=</mo>
|
|
91
|
+
<munderover>
|
|
92
|
+
<mo>∑</mo>
|
|
93
|
+
<mrow>
|
|
94
|
+
<mi>n</mi>
|
|
95
|
+
<mo>=</mo>
|
|
96
|
+
<mn>1</mn>
|
|
97
|
+
</mrow>
|
|
98
|
+
<mn>∞</mn>
|
|
99
|
+
</munderover>
|
|
100
|
+
<msup>
|
|
101
|
+
<mrow>
|
|
102
|
+
<mo>(</mo>
|
|
103
|
+
<mrow>
|
|
104
|
+
<mo form="prefix">−</mo>
|
|
105
|
+
<mn>1</mn>
|
|
106
|
+
</mrow>
|
|
107
|
+
<mo>)</mo>
|
|
108
|
+
</mrow>
|
|
109
|
+
<mrow>
|
|
110
|
+
<mi>n</mi>
|
|
111
|
+
<mo>+</mo>
|
|
112
|
+
<mn>1</mn>
|
|
113
|
+
</mrow>
|
|
114
|
+
</msup>
|
|
115
|
+
<mo></mo>
|
|
116
|
+
<msup>
|
|
117
|
+
<mi>n</mi>
|
|
118
|
+
<mrow>
|
|
119
|
+
<mo form="prefix">−</mo>
|
|
120
|
+
<mi>n</mi>
|
|
121
|
+
</mrow>
|
|
122
|
+
</msup>
|
|
123
|
+
</mrow>
|
|
124
|
+
</math>
|
|
125
|
+
</body>
|
|
126
|
+
</html>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" 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" data-testid="{name()}">
|
|
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>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" 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>
|