@epa-wg/custom-element-dist 0.0.23 → 0.0.25
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/.storybook/main.ts +21 -21
- package/.vscode/settings.json +24 -0
- package/README.md +4 -4
- package/coverage/coverage-final.json +7 -5
- package/coverage/index.html +26 -26
- 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 +439 -379
- package/coverage/src/custom-element/http-request.js.html +12 -12
- package/coverage/src/custom-element/index.html +23 -23
- package/coverage/src/custom-element/local-storage.js.html +1 -1
- package/coverage/src/custom-element/location-element.js/coverage.svg +1 -1
- package/coverage/src/custom-element/location-element.js.html +116 -47
- package/coverage/src/index.html +1 -1
- package/coverage/src/mocks/handlers.ts.html +1 -1
- package/coverage/src/mocks/index.html +1 -1
- package/coverage/src/stories/attributes.test.stories.ts.html +1 -1
- 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/coverage.svg +1 -1
- package/coverage/src/stories/dom-merge.test.stories.ts.html +238 -10
- package/coverage/src/stories/external-template.test.stories.ts.html +1 -1
- 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 +46 -16
- package/coverage/src/stories/local-storage.test.stories.ts.html +1 -1
- package/coverage/src/stories/location-element.test.stories.ts.html +1 -1
- package/coverage/src/stories/set-url.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/set-url.test.stories.ts.html +427 -0
- 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/coverage.svg +10 -0
- package/coverage/src/stories/version-select.test.stories.ts.html +313 -0
- package/coverage/src/sum.ts.html +1 -1
- package/dist/{custom-element-BISbI4SU.js → custom-element-DAe7uvIt.js} +187 -173
- package/dist/custom-element-DZvvhscI.cjs +53 -0
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +23 -22
- package/dist/location-element-DRB7hCwA.cjs +1 -0
- package/dist/location-element-FJlONi2n.js +65 -0
- package/package.json +2 -2
- package/src/custom-element/custom-element.js +25 -5
- package/src/custom-element/demo/form.html +2 -3
- package/src/custom-element/demo/location-element.html +17 -4
- package/src/custom-element/demo/s.xml +31 -6
- package/src/custom-element/demo/s.xslt +59 -22
- package/src/custom-element/demo/set-url.html +141 -0
- package/src/custom-element/ide/customData-dce.json +56 -0
- package/src/custom-element/ide/web-types-dce.json +153 -110
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/custom-element/index.html +1 -0
- package/src/custom-element/location-element.js +25 -2
- package/src/custom-element.test.ts +26 -26
- package/src/stories/dom-merge.test.stories.ts +76 -0
- package/src/stories/set-url.test.stories.ts +114 -0
- package/src/stories/version-select.test.stories.ts +76 -0
- package/storybook-static/assets/{Color-PRSJMWNM-BD_Ds9NW.js → Color-PRSJMWNM-CRSv4C7i.js} +1 -1
- package/storybook-static/assets/{Configure-70I_VApa.js → Configure-D0qG3gR9.js} +1 -1
- package/storybook-static/assets/{DocsRenderer-K4EAMTCU-9dn0-HCP.js → DocsRenderer-K4EAMTCU-CG_P5zRZ.js} +2 -2
- package/storybook-static/assets/{WithTooltip-KJL26V4Q-C6g5GOU9.js → WithTooltip-KJL26V4Q-CUqUi5E8.js} +1 -1
- package/storybook-static/assets/{attributes.test.stories-BEOraI4E.js → attributes.test.stories-W34tZdUt.js} +1 -1
- package/storybook-static/assets/{css.test.stories-D9WaxrEv.js → css.test.stories-BZFYx1TQ.js} +1 -1
- package/storybook-static/assets/{custom-element-BV8-hRQS.js → custom-element-DpIq8E2p.js} +79 -79
- package/storybook-static/assets/dom-merge.test.stories-S-7U5N3h.js +258 -0
- package/storybook-static/assets/{external-template.test.stories-Bpr_wxBo.js → external-template.test.stories-QIO3lAFz.js} +1 -1
- package/storybook-static/assets/{form.test.stories-3tURbEdv.js → form.test.stories-ClYhj9F1.js} +1 -1
- package/storybook-static/assets/{formatter-2WMMO6ZP-6IvBq34u.js → formatter-2WMMO6ZP-C-UiBIma.js} +1 -1
- package/storybook-static/assets/http-request-DNq59pnj.js +1 -0
- package/storybook-static/assets/{http-request.stories-8K_qSs8C.js → http-request.stories-DCqY5s2i.js} +9 -9
- package/storybook-static/assets/iframe-CURpvmVV.js +2 -0
- package/storybook-static/assets/{index-DhXZyjEd.js → index-CKw1EbdP.js} +1 -1
- package/storybook-static/assets/{index-B3oZkK3F.js → index-DYpTqTNu.js} +1 -1
- package/storybook-static/assets/{index-C30JwJMK.js → index-DsWii_Ep.js} +5 -5
- package/storybook-static/assets/{local-storage.test.stories-CtisAQBB.js → local-storage.test.stories-BqgYwqr-.js} +1 -1
- package/storybook-static/assets/location-element-hKpcXCdn.js +1 -0
- package/storybook-static/assets/{location-element.test.stories-5O_t_m4Y.js → location-element.test.stories-DvH1TWK4.js} +9 -9
- package/storybook-static/assets/{preview-D0eCfQft.js → preview-DjDbQHPa.js} +2 -2
- package/storybook-static/assets/set-url.test.stories-GlJOh31I.js +81 -0
- package/storybook-static/assets/{slice-events.test.stories-BSXCLIA5.js → slice-events.test.stories-VoNjuPCX.js} +1 -1
- package/storybook-static/assets/{slots.test.stories-B1vqfHmN.js → slots.test.stories-Da2j9YuO.js} +1 -1
- package/storybook-static/assets/{syntaxhighlighter-BP7B2CQK-DpPBKyTO.js → syntaxhighlighter-BP7B2CQK-CDpEe51g.js} +1 -1
- package/storybook-static/assets/version-select.test.stories-DLwf-TPB.js +60 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/.idea/.gitignore +0 -8
- package/dist/custom-element-N-sWiqGK.cjs +0 -53
- package/dist/location-element-2m0gWq_d.cjs +0 -1
- package/dist/location-element-nA_wsqBt.js +0 -49
- package/storybook-static/assets/dom-merge.test.stories-BhbNeum_.js +0 -137
- package/storybook-static/assets/iframe-zdt9kuj6.js +0 -2
- package/yarn.lock +0 -10242
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import{w as d,e as a,u as s}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.js";function p(n){return new Promise(e=>setTimeout(e,n))}function u(n){const{title:e,body:t}=n;return`
|
|
2
|
+
<fieldset>
|
|
3
|
+
<legend>${e}</legend>
|
|
4
|
+
${t}
|
|
5
|
+
</fieldset>
|
|
6
|
+
`}const h={title:"dom-merge",render:u},o={args:{title:"Chars count in textarea",body:`
|
|
7
|
+
<p>Counter update happens on change event(focus change). The update should not interfere with the input</p>
|
|
8
|
+
<custom-element>
|
|
9
|
+
<form>
|
|
10
|
+
<label>
|
|
11
|
+
<textarea slice="text-container" data-testid="textarea-id">Hello world!</textarea>
|
|
12
|
+
<span> Chars count:
|
|
13
|
+
<code data-testid="counter-id">{string-length(//slice/text-container/text())}</code>
|
|
14
|
+
</span>
|
|
15
|
+
</label>
|
|
16
|
+
<br/><input placeholder="after textarea input, click here " data-testid="refocus-id" />
|
|
17
|
+
</form>
|
|
18
|
+
</custom-element>
|
|
19
|
+
`},play:async({canvasElement:n})=>{const e=o.args.title,t=d(n);await t.findByText(e),await p(100),a(await t.findByTestId("textarea-id")).toBeInTheDocument();const i=t.getByTestId("textarea-id");i.value="",i.focus(),await s.keyboard(e),a(i.value).toEqual(e),a(i.value.length).toEqual(e.length),t.getByTestId("refocus-id").focus(),await p(10),a(t.getByTestId("counter-id").textContent).toEqual(""+e?.length,"counter of symbols")}},l={args:{title:"Word count in HTML input field",body:`
|
|
20
|
+
<p>Counter update happens on keyup event. The update should not interfere with the input</p>
|
|
21
|
+
<custom-element>
|
|
22
|
+
<form>
|
|
23
|
+
<label>
|
|
24
|
+
<input type="text" value="{//txt ?? 'Type time update'}" slice="txt" slice-event="init input" data-testid="input-id">
|
|
25
|
+
|
|
26
|
+
<span> Character count:
|
|
27
|
+
<code data-testid="chars-id"
|
|
28
|
+
>{
|
|
29
|
+
string-length(//slice/txt)
|
|
30
|
+
}</code>
|
|
31
|
+
</span>
|
|
32
|
+
<span> Word count:
|
|
33
|
+
<code data-testid="words-id"
|
|
34
|
+
>{
|
|
35
|
+
string-length(normalize-space(//slice/txt)) -
|
|
36
|
+
string-length(translate(normalize-space(//slice/txt), ' ', '')) + 1
|
|
37
|
+
}</code>
|
|
38
|
+
<!-- The expression first normalizes the string by removing leading and trailing whitespace and
|
|
39
|
+
collapsing internal whitespace into a single space. It then subtracts the length of the string
|
|
40
|
+
with all spaces removed from the length of the original string,
|
|
41
|
+
and adds 1 to account for the last word.
|
|
42
|
+
-->
|
|
43
|
+
</span>
|
|
44
|
+
|
|
45
|
+
</label>
|
|
46
|
+
<p><b>txt</b> slice:</p> <blockquote> {//slice/txt} </blockquote>
|
|
47
|
+
</form>
|
|
48
|
+
</custom-element>
|
|
49
|
+
`},play:async({canvasElement:n})=>{const e=l.args.title,t=d(n);await t.findByText(e);const i=await t.findByTestId("input-id");i.value="",i.focus(),a(i).toBeInTheDocument(),await s.keyboard(e),await p(10),a(i.value).toEqual(e),a(t.getByTestId("chars-id").textContent.trim()).toEqual(""+e.length,"counter of symbols"),a(e.split(" ").length).toEqual(6,"counter of words in text sample"),a(t.getByTestId("words-id").textContent.trim()).toEqual("6","counter of words in render")}},r={args:{title:"Order preserving on 2nd transform",body:`
|
|
50
|
+
<p>IF condition content should be displayed in place where it is defined (not shifted down on the parent children)</p>
|
|
51
|
+
<custom-element>
|
|
52
|
+
<form slice="f1">
|
|
53
|
+
<label>
|
|
54
|
+
<input type="checkbox" name="c1" data-testid="cb1"/>
|
|
55
|
+
click to display #1 bellow
|
|
56
|
+
</label>
|
|
57
|
+
<br data-testid="beforeC1"/>
|
|
58
|
+
<if test="//c1">
|
|
59
|
+
<p data-testid="isC1">#1</p>
|
|
60
|
+
</if>
|
|
61
|
+
<label>
|
|
62
|
+
<input type="checkbox" name="c2" data-testid="cb2"/>
|
|
63
|
+
click to display #2 bellow
|
|
64
|
+
</label>
|
|
65
|
+
<br data-testid="beforeC2"/>
|
|
66
|
+
<if test="//c2">
|
|
67
|
+
<p>#2</p>
|
|
68
|
+
</if>
|
|
69
|
+
</form>
|
|
70
|
+
</custom-element>
|
|
71
|
+
`},play:async({canvasElement:n})=>{const e=r.args.title,t=d(n);await t.findByText(e),await s.click(t.getByTestId("cb1")),await a(await t.findByText("#1")).toBeInTheDocument(),await s.click(t.getByTestId("cb2")),await a(await t.findByText("#2")).toBeInTheDocument(),await a(t.getByTestId("beforeC1").nextElementSibling).toEqual(t.getByTestId("isC1"))}},c={args:{title:"read system validity message",body:`
|
|
72
|
+
<p>validationMessage propagated into slice as 'validation-message' attribute</p>
|
|
73
|
+
<ol>
|
|
74
|
+
<li> type in input field</li>
|
|
75
|
+
<li> delete input field content</li>
|
|
76
|
+
<li> observe the warning in string after input</li>
|
|
77
|
+
<li> Click Next observe the system warning in dropdown over input</li>
|
|
78
|
+
</ol>
|
|
79
|
+
<custom-element>
|
|
80
|
+
<template>
|
|
81
|
+
<form slice="email-form">
|
|
82
|
+
<label> Email
|
|
83
|
+
<input slice="username" slice-event="input" placeholder="non-empty" required data-testid="inp1">
|
|
84
|
+
</label>
|
|
85
|
+
<if test="//username/@validation-message">
|
|
86
|
+
<var data-testid="var1">{//username/@validation-message}</var>
|
|
87
|
+
</if>
|
|
88
|
+
<button data-testid="btn1">Next</button>
|
|
89
|
+
</form>
|
|
90
|
+
</template>
|
|
91
|
+
</custom-element>
|
|
92
|
+
`},play:async({canvasElement:n})=>{const e=c.args.title,t=d(n);await t.findByText(e),await s.type(t.getByTestId("inp1"),"Hi"),await s.clear(t.getByTestId("inp1")),await s.click(t.getByTestId("btn1")),await a(await t.findByTestId("var1")).toBeInTheDocument(),await a(t.getByTestId("var1").textContent).toEqual(t.getByTestId("inp1").validationMessage),await a(t.getByTestId("var1").textContent.length>1).toEqual(!0)}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
|
|
93
|
+
args: {
|
|
94
|
+
title: 'Chars count in textarea',
|
|
95
|
+
body: \`
|
|
96
|
+
<p>Counter update happens on change event(focus change). The update should not interfere with the input</p>
|
|
97
|
+
<custom-element>
|
|
98
|
+
<form>
|
|
99
|
+
<label>
|
|
100
|
+
<textarea slice="text-container" data-testid="textarea-id">Hello world!</textarea>
|
|
101
|
+
<span> Chars count:
|
|
102
|
+
<code data-testid="counter-id">{string-length(//slice/text-container/text())}</code>
|
|
103
|
+
</span>
|
|
104
|
+
</label>
|
|
105
|
+
<br/><input placeholder="after textarea input, click here " data-testid="refocus-id" />
|
|
106
|
+
</form>
|
|
107
|
+
</custom-element>
|
|
108
|
+
\`
|
|
109
|
+
},
|
|
110
|
+
play: async ({
|
|
111
|
+
canvasElement
|
|
112
|
+
}) => {
|
|
113
|
+
const titleText = (CharsCountInTextarea.args!.title as string);
|
|
114
|
+
const canvas = within(canvasElement);
|
|
115
|
+
await canvas.findByText(titleText);
|
|
116
|
+
await sleep(100);
|
|
117
|
+
expect(await canvas.findByTestId('textarea-id')).toBeInTheDocument();
|
|
118
|
+
const textarea = canvas.getByTestId('textarea-id');
|
|
119
|
+
textarea.value = '';
|
|
120
|
+
textarea.focus();
|
|
121
|
+
await userEvent.keyboard(titleText);
|
|
122
|
+
expect(textarea.value).toEqual(titleText);
|
|
123
|
+
expect(textarea.value.length).toEqual(titleText.length);
|
|
124
|
+
canvas.getByTestId('refocus-id').focus();
|
|
125
|
+
await sleep(10);
|
|
126
|
+
expect(canvas.getByTestId('counter-id').textContent).toEqual('' + titleText?.length, 'counter of symbols');
|
|
127
|
+
}
|
|
128
|
+
}`,...o.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
|
|
129
|
+
args: {
|
|
130
|
+
title: 'Word count in HTML input field',
|
|
131
|
+
body: \`
|
|
132
|
+
<p>Counter update happens on keyup event. The update should not interfere with the input</p>
|
|
133
|
+
<custom-element>
|
|
134
|
+
<form>
|
|
135
|
+
<label>
|
|
136
|
+
<input type="text" value="{//txt ?? 'Type time update'}" slice="txt" slice-event="init input" data-testid="input-id">
|
|
137
|
+
|
|
138
|
+
<span> Character count:
|
|
139
|
+
<code data-testid="chars-id"
|
|
140
|
+
>{
|
|
141
|
+
string-length(//slice/txt)
|
|
142
|
+
}</code>
|
|
143
|
+
</span>
|
|
144
|
+
<span> Word count:
|
|
145
|
+
<code data-testid="words-id"
|
|
146
|
+
>{
|
|
147
|
+
string-length(normalize-space(//slice/txt)) -
|
|
148
|
+
string-length(translate(normalize-space(//slice/txt), ' ', '')) + 1
|
|
149
|
+
}</code>
|
|
150
|
+
<!-- The expression first normalizes the string by removing leading and trailing whitespace and
|
|
151
|
+
collapsing internal whitespace into a single space. It then subtracts the length of the string
|
|
152
|
+
with all spaces removed from the length of the original string,
|
|
153
|
+
and adds 1 to account for the last word.
|
|
154
|
+
-->
|
|
155
|
+
</span>
|
|
156
|
+
|
|
157
|
+
</label>
|
|
158
|
+
<p><b>txt</b> slice:</p> <blockquote> {//slice/txt} </blockquote>
|
|
159
|
+
</form>
|
|
160
|
+
</custom-element>
|
|
161
|
+
\`
|
|
162
|
+
},
|
|
163
|
+
play: async ({
|
|
164
|
+
canvasElement
|
|
165
|
+
}) => {
|
|
166
|
+
const titleText = (WordCountOnType.args!.title as string);
|
|
167
|
+
const canvas = within(canvasElement);
|
|
168
|
+
await canvas.findByText(titleText);
|
|
169
|
+
const input = await canvas.findByTestId('input-id');
|
|
170
|
+
input.value = '';
|
|
171
|
+
input.focus();
|
|
172
|
+
expect(input).toBeInTheDocument();
|
|
173
|
+
await userEvent.keyboard(titleText);
|
|
174
|
+
await sleep(10);
|
|
175
|
+
expect(input.value).toEqual(titleText);
|
|
176
|
+
expect(canvas.getByTestId('chars-id').textContent.trim()).toEqual('' + titleText.length, 'counter of symbols');
|
|
177
|
+
expect(titleText.split(' ').length).toEqual(6, 'counter of words in text sample');
|
|
178
|
+
expect(canvas.getByTestId('words-id').textContent.trim()).toEqual('6', 'counter of words in render');
|
|
179
|
+
}
|
|
180
|
+
}`,...l.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
181
|
+
args: {
|
|
182
|
+
title: 'Order preserving on 2nd transform',
|
|
183
|
+
body: \`
|
|
184
|
+
<p>IF condition content should be displayed in place where it is defined (not shifted down on the parent children)</p>
|
|
185
|
+
<custom-element>
|
|
186
|
+
<form slice="f1">
|
|
187
|
+
<label>
|
|
188
|
+
<input type="checkbox" name="c1" data-testid="cb1"/>
|
|
189
|
+
click to display #1 bellow
|
|
190
|
+
</label>
|
|
191
|
+
<br data-testid="beforeC1"/>
|
|
192
|
+
<if test="//c1">
|
|
193
|
+
<p data-testid="isC1">#1</p>
|
|
194
|
+
</if>
|
|
195
|
+
<label>
|
|
196
|
+
<input type="checkbox" name="c2" data-testid="cb2"/>
|
|
197
|
+
click to display #2 bellow
|
|
198
|
+
</label>
|
|
199
|
+
<br data-testid="beforeC2"/>
|
|
200
|
+
<if test="//c2">
|
|
201
|
+
<p>#2</p>
|
|
202
|
+
</if>
|
|
203
|
+
</form>
|
|
204
|
+
</custom-element>
|
|
205
|
+
\`
|
|
206
|
+
},
|
|
207
|
+
play: async ({
|
|
208
|
+
canvasElement
|
|
209
|
+
}) => {
|
|
210
|
+
const titleText = (OrderPreservingOn2ndTransform.args!.title as string);
|
|
211
|
+
const canvas = within(canvasElement);
|
|
212
|
+
await canvas.findByText(titleText);
|
|
213
|
+
await userEvent.click(canvas.getByTestId('cb1'));
|
|
214
|
+
await expect(await canvas.findByText('#1')).toBeInTheDocument();
|
|
215
|
+
await userEvent.click(canvas.getByTestId('cb2'));
|
|
216
|
+
await expect(await canvas.findByText('#2')).toBeInTheDocument();
|
|
217
|
+
await expect(canvas.getByTestId("beforeC1").nextElementSibling).toEqual(canvas.getByTestId("isC1"));
|
|
218
|
+
}
|
|
219
|
+
}`,...r.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
|
|
220
|
+
args: {
|
|
221
|
+
title: 'read system validity message',
|
|
222
|
+
body: \`
|
|
223
|
+
<p>validationMessage propagated into slice as 'validation-message' attribute</p>
|
|
224
|
+
<ol>
|
|
225
|
+
<li> type in input field</li>
|
|
226
|
+
<li> delete input field content</li>
|
|
227
|
+
<li> observe the warning in string after input</li>
|
|
228
|
+
<li> Click Next observe the system warning in dropdown over input</li>
|
|
229
|
+
</ol>
|
|
230
|
+
<custom-element>
|
|
231
|
+
<template>
|
|
232
|
+
<form slice="email-form">
|
|
233
|
+
<label> Email
|
|
234
|
+
<input slice="username" slice-event="input" placeholder="non-empty" required data-testid="inp1">
|
|
235
|
+
</label>
|
|
236
|
+
<if test="//username/@validation-message">
|
|
237
|
+
<var data-testid="var1">{//username/@validation-message}</var>
|
|
238
|
+
</if>
|
|
239
|
+
<button data-testid="btn1">Next</button>
|
|
240
|
+
</form>
|
|
241
|
+
</template>
|
|
242
|
+
</custom-element>
|
|
243
|
+
\`
|
|
244
|
+
},
|
|
245
|
+
play: async ({
|
|
246
|
+
canvasElement
|
|
247
|
+
}) => {
|
|
248
|
+
const titleText = (ReadSystemValidityMessage.args!.title as string);
|
|
249
|
+
const canvas = within(canvasElement);
|
|
250
|
+
await canvas.findByText(titleText);
|
|
251
|
+
await userEvent.type(canvas.getByTestId('inp1'), 'Hi');
|
|
252
|
+
await userEvent.clear(canvas.getByTestId('inp1'));
|
|
253
|
+
await userEvent.click(canvas.getByTestId('btn1'));
|
|
254
|
+
await expect(await canvas.findByTestId('var1')).toBeInTheDocument();
|
|
255
|
+
await expect(canvas.getByTestId("var1").textContent).toEqual(canvas.getByTestId("inp1").validationMessage);
|
|
256
|
+
await expect(canvas.getByTestId("var1").textContent.length > 1).toEqual(true);
|
|
257
|
+
}
|
|
258
|
+
}`,...c.parameters?.docs?.source}}};const y=["CharsCountInTextarea","WordCountOnType","OrderPreservingOn2ndTransform","ReadSystemValidityMessage"];export{o as CharsCountInTextarea,r as OrderPreservingOn2ndTransform,c as ReadSystemValidityMessage,l as WordCountOnType,y as __namedExportsOrder,h as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as l,e as a}from"./custom-element-
|
|
1
|
+
import{w as l,e as a}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.js";function T(t){return new Promise(e=>setTimeout(e,t))}function v(t){const{title:e,body:n}=t;return`
|
|
2
2
|
<fieldset>
|
|
3
3
|
<legend>${e}</legend>
|
|
4
4
|
${n}
|
package/storybook-static/assets/{form.test.stories-3tURbEdv.js → form.test.stories-ClYhj9F1.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as i,e as n,u as e}from"./custom-element-
|
|
1
|
+
import{w as i,e as n,u as e}from"./custom-element-DpIq8E2p.js";import"./index-CVRyq5ci.js";function l(a){const{title:t,body:s}=a;return`
|
|
2
2
|
<fieldset>
|
|
3
3
|
<legend>${t}</legend>
|
|
4
4
|
${s}
|
package/storybook-static/assets/{formatter-2WMMO6ZP-6IvBq34u.js → formatter-2WMMO6ZP-C-UiBIma.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as Xi}from"./index-
|
|
1
|
+
import{m as Xi}from"./index-DsWii_Ep.js";import"./iframe-CURpvmVV.js";import"../sb-preview/runtime.js";import"./index-Cc7K62zD.js";import"./index-DXimoRZY.js";import"./index-DrFu-skq.js";var Qi=Object.defineProperty,cu=(e,t)=>{for(var r in t)Qi(e,r,{get:t[r],enumerable:!0})},pu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},se=(e,t,r)=>(pu(e,t,"read from private field"),t.get(e)),Zi=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ea=(e,t,r,n)=>(pu(e,t,"write to private field"),t.set(e,r),r),hu={};cu(hu,{languages:()=>jl,options:()=>Wl,parsers:()=>zu,printers:()=>Vl});var ta=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},O=ta,_r="string",Br="array",xr="cursor",_t="indent",Bt="align",Tr="trim",Je="group",xt="fill",Tt="if-break",Lt="indent-if-break",Lr="line-suffix",Nr="line-suffix-boundary",be="line",qr="label",Nt="break-parent",du=new Set([xr,_t,Bt,Tr,Je,xt,Tt,Lt,Lr,Nr,be,qr,Nt]);function ra(e){if(typeof e=="string")return _r;if(Array.isArray(e))return Br;if(!e)return;let{type:t}=e;if(du.has(t))return t}var Pr=ra,na=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function ua(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
|
2
2
|
Expected it to be 'string' or 'object'.`;if(Pr(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=na([...du].map(u=>`'${u}'`));return`Unexpected doc.type '${e.type}'.
|
|
3
3
|
Expected it to be ${n}.`}var ia=class extends Error{name="InvalidDocError";constructor(e){super(ua(e)),this.doc=e}},Du=ia,aa=()=>{},sa=aa;function we(e){return{type:_t,contents:e}}function fu(e,t){return{type:Bt,contents:t,n:e}}function q(e,t={}){return sa(t.expandedStates),{type:Je,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function oa(e){return fu(Number.NEGATIVE_INFINITY,e)}function la(e){return fu({type:"root"},e)}function mu(e){return{type:xt,parts:e}}function Et(e,t="",r={}){return{type:Tt,breakContents:e,flatContents:t,groupId:r.groupId}}function ca(e,t){return{type:Lt,contents:e,groupId:t.groupId,negate:t.negate}}var Qe={type:Nt},pa={type:be,hard:!0},ha={type:be,hard:!0,literal:!0},L={type:be},I={type:be,soft:!0},A=[pa,Qe],da=[ha,Qe];function Ze(e,t){let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var Da=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},qt=Da;function Ir(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let a=u(i);return r.set(i,a),a}function u(i){switch(Pr(i)){case Br:return t(i.map(n));case xt:return t({...i,parts:i.parts.map(n)});case Tt:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case Je:{let{expandedStates:a,contents:s}=i;return a?(a=a.map(n),s=a[0]):s=n(s),t({...i,contents:s,expandedStates:a})}case Bt:case _t:case Lt:case qr:case Lr:return t({...i,contents:n(i.contents)});case _r:case xr:case Tr:case Nr:case be:case Nt:return t(i);default:throw new Du(i)}}}function fa(e){switch(Pr(e)){case xt:if(e.parts.every(t=>t===""))return"";break;case Je:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Je&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Bt:case _t:case Lt:case Lr:if(!e.contents)return"";break;case Tt:if(!e.flatContents&&!e.breakContents)return"";break;case Br:{let t=[];for(let r of e){if(!r)continue;let[n,...u]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof qt(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...u)}return t.length===0?"":t.length===1?t[0]:t}case _r:case xr:case Tr:case Nr:case be:case qr:case Nt:break;default:throw new Du(e)}return e}function ma(e){return Ir(e,t=>fa(t))}function G(e,t=da){return Ir(e,r=>typeof r=="string"?Ze(t,r.split(`
|
|
4
4
|
`)):r)}var ga=class extends Error{name="UnexpectedNodeError";constructor(e,t,r="type"){super(`Unexpected ${t} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},Ca=ga,ot="'",ln='"';function Fa(e,t){let r=t===!0||t===ot?ot:ln,n=r===ot?ln:ot,u=0,i=0;for(let a of e)a===r?u++:a===n&&i++;return u>i?n:r}var va=Fa;function ya(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var U,Ea=class{constructor(e){Zi(this,U,void 0),ea(this,U,new Set(e))}getLeadingWhitespaceCount(e){let t=se(this,U),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=se(this,U),r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return se(this,U).has(e.charAt(0))}hasTrailingWhitespace(e){return se(this,U).has(qt(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${ya([...se(this,U)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=se(this,U);return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=se(this,U);return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=se(this,U);return Array.prototype.every.call(e,r=>t.has(r))}};U=new WeakMap;var ba=Ea,wa=[" ",`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const u=(c,e)=>c.getAttribute(e);class o extends HTMLElement{static observedAttributes=["value","slice","url","method","header-accept"];get requestHeaders(){const e={};return[...this.attributes].filter(t=>t.name.startsWith("header-")).map(t=>e[t.name.substring(7)]=t.value),e}get requestProps(){const e={};return[...this.attributes].filter(t=>!t.name.startsWith("header-")).filter(t=>!t.name.startsWith("slice")).map(t=>e[t.name]=t.value),e}disconnectedCallback(){this.#t?.()}connectedCallback(){setTimeout(()=>this.fetch(),0)}#e="";#t=()=>{};async fetch(){if(!this.closest("body"))return;const e=u(this,"url")||"";if(!e)return this.#t?.(),this.value={};if(this.#e===e)return;this.#e=e;const t=new AbortController;this.#t=()=>{t.abort(this.localName+" disconnected"),this.#e=""};const r={...this.requestProps,headers:this.requestHeaders},a={request:r},n=()=>this.dispatchEvent(new Event("change"));this.value=a,n();const h=await fetch(e,{...this.requestProps,signal:t.signal,headers:this.requestHeaders}),i={headers:{}};if([...h.headers].map(([s,l])=>i.headers[s]=l),"ok,status,statusText,type,url,redirected".split(",").map(s=>i[s]=h[s]),a.response=i,n(),i.headers["content-type"]?.includes("json"))try{a.data=await h.json(),n()}catch{}}attributeChangedCallback(e,t,r){e==="url"&&t!==r&&(t&&this.#t?.(),r?setTimeout(()=>this.fetch(),10):(this.value={},setTimeout(()=>this.dispatchEvent(new Event("change")),10)))}}window.customElements.define("http-request",o);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as U,e as w}from"./custom-element-
|
|
1
|
+
import{w as U,e as w}from"./custom-element-DpIq8E2p.js";import"./http-request-DNq59pnj.js";import{i as ve,d as J,s as Q,R as ye,t as ge}from"./index-DuIEV_9C.js";import"./index-CVRyq5ci.js";function we(){ve(typeof URL<"u",J.formatMessage(`Global "URL" class is not defined. This likely means that you're running MSW in an environment that doesn't support all Node.js standard API (e.g. React Native). If that's the case, please use an appropriate polyfill for the "URL" class, like "react-native-url-polyfill".`))}function xe(t,e){return t.toLowerCase()===e.toLowerCase()}function be(t){return t<300?"#69AB32":t<400?"#F0BB4B":"#E95F5D"}function Te(){const t=new Date;return[t.getHours(),t.getMinutes(),t.getSeconds()].map(String).map(e=>e.slice(0,2)).map(e=>e.padStart(2,"0")).join(":")}async function Ee(t){const r=await t.clone().text();return{url:new URL(t.url),method:t.method,headers:Object.fromEntries(t.headers.entries()),body:r}}var Ce=Object.create,ae=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,oe=Object.getOwnPropertyNames,Pe=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty,se=(t,e)=>function(){return e||(0,t[oe(t)[0]])((e={exports:{}}).exports,e),e.exports},qe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of oe(e))!ke.call(t,a)&&a!==r&&ae(t,a,{get:()=>e[a],enumerable:!(n=_e(e,a))||n.enumerable});return t},Re=(t,e,r)=>(r=t!=null?Ce(Pe(t)):{},qe(ae(r,"default",{value:t,enumerable:!0}),t)),Oe=se({"node_modules/statuses/codes.json"(t,e){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}}}),Ae=se({"node_modules/statuses/index.js"(t,e){var r=Oe();e.exports=p,p.message=r,p.code=n(r),p.codes=a(r),p.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},p.empty={204:!0,205:!0,304:!0},p.retry={502:!0,503:!0,504:!0};function n(o){var s={};return Object.keys(o).forEach(function(f){var c=o[f],m=Number(f);s[c.toLowerCase()]=m}),s}function a(o){return Object.keys(o).map(function(i){return Number(i)})}function l(o){var s=o.toLowerCase();if(!Object.prototype.hasOwnProperty.call(p.code,s))throw new Error('invalid status message: "'+o+'"');return p.code[s]}function u(o){if(!Object.prototype.hasOwnProperty.call(p.message,o))throw new Error("invalid status code: "+o);return p.message[o]}function p(o){if(typeof o=="number")return u(o);if(typeof o!="string")throw new TypeError("code must be a number or string");var s=parseInt(o,10);return isNaN(s)?l(o):u(s)}}}),Se=Re(Ae()),ie=Se.default;/*! Bundled license information:
|
|
2
2
|
|
|
3
3
|
statuses/index.js:
|
|
4
4
|
(*!
|
|
@@ -7,7 +7,7 @@ statuses/index.js:
|
|
|
7
7
|
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
8
8
|
* MIT Licensed
|
|
9
9
|
*)
|
|
10
|
-
*/const{message:
|
|
10
|
+
*/const{message:Be}=ie;async function $e(t){const e=t.clone(),r=await e.text(),n=e.status||200,a=e.statusText||Be[n]||"OK";return{status:n,statusText:a,headers:Object.fromEntries(e.headers.entries()),body:r}}function De(t){for(var e=[],r=0;r<t.length;){var n=t[r];if(n==="*"||n==="+"||n==="?"){e.push({type:"MODIFIER",index:r,value:t[r++]});continue}if(n==="\\"){e.push({type:"ESCAPED_CHAR",index:r++,value:t[r++]});continue}if(n==="{"){e.push({type:"OPEN",index:r,value:t[r++]});continue}if(n==="}"){e.push({type:"CLOSE",index:r,value:t[r++]});continue}if(n===":"){for(var a="",l=r+1;l<t.length;){var u=t.charCodeAt(l);if(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||u===95){a+=t[l++];continue}break}if(!a)throw new TypeError("Missing parameter name at ".concat(r));e.push({type:"NAME",index:r,value:a}),r=l;continue}if(n==="("){var p=1,o="",l=r+1;if(t[l]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(l));for(;l<t.length;){if(t[l]==="\\"){o+=t[l++]+t[l++];continue}if(t[l]===")"){if(p--,p===0){l++;break}}else if(t[l]==="("&&(p++,t[l+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(l));o+=t[l++]}if(p)throw new TypeError("Unbalanced pattern at ".concat(r));if(!o)throw new TypeError("Missing pattern at ".concat(r));e.push({type:"PATTERN",index:r,value:o}),r=l;continue}e.push({type:"CHAR",index:r,value:t[r++]})}return e.push({type:"END",index:r,value:""}),e}function Ie(t,e){e===void 0&&(e={});for(var r=De(t),n=e.prefixes,a=n===void 0?"./":n,l="[^".concat(A(e.delimiter||"/#?"),"]+?"),u=[],p=0,o=0,s="",i=function(b){if(o<r.length&&r[o].type===b)return r[o++].value},f=function(b){var k=i(b);if(k!==void 0)return k;var q=r[o],z=q.type,F=q.index;throw new TypeError("Unexpected ".concat(z," at ").concat(F,", expected ").concat(b))},c=function(){for(var b="",k;k=i("CHAR")||i("ESCAPED_CHAR");)b+=k;return b};o<r.length;){var m=i("CHAR"),h=i("NAME"),d=i("PATTERN");if(h||d){var v=m||"";a.indexOf(v)===-1&&(s+=v,v=""),s&&(u.push(s),s=""),u.push({name:h||p++,prefix:v,suffix:"",pattern:d||l,modifier:i("MODIFIER")||""});continue}var y=m||i("ESCAPED_CHAR");if(y){s+=y;continue}s&&(u.push(s),s="");var x=i("OPEN");if(x){var v=c(),T=i("NAME")||"",g=i("PATTERN")||"",P=c();f("CLOSE"),u.push({name:T||(g?p++:""),pattern:T&&!g?l:g,prefix:v,suffix:P,modifier:i("MODIFIER")||""});continue}f("END")}return u}function Ne(t,e){var r=[],n=le(t,r,e);return je(n,r,e)}function je(t,e,r){r===void 0&&(r={});var n=r.decode,a=n===void 0?function(l){return l}:n;return function(l){var u=t.exec(l);if(!u)return!1;for(var p=u[0],o=u.index,s=Object.create(null),i=function(c){if(u[c]===void 0)return"continue";var m=e[c-1];m.modifier==="*"||m.modifier==="+"?s[m.name]=u[c].split(m.prefix+m.suffix).map(function(h){return a(h,m)}):s[m.name]=a(u[c],m)},f=1;f<u.length;f++)i(f);return{path:p,index:o,params:s}}}function A(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function ce(t){return t&&t.sensitive?"":"i"}function Le(t,e){if(!e)return t;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,a=r.exec(t.source);a;)e.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(t.source);return t}function Ue(t,e,r){var n=t.map(function(a){return le(a,e,r).source});return new RegExp("(?:".concat(n.join("|"),")"),ce(r))}function He(t,e,r){return Me(Ie(t,r),e,r)}function Me(t,e,r){r===void 0&&(r={});for(var n=r.strict,a=n===void 0?!1:n,l=r.start,u=l===void 0?!0:l,p=r.end,o=p===void 0?!0:p,s=r.encode,i=s===void 0?function(F){return F}:s,f=r.delimiter,c=f===void 0?"/#?":f,m=r.endsWith,h=m===void 0?"":m,d="[".concat(A(h),"]|$"),v="[".concat(A(c),"]"),y=u?"^":"",x=0,T=t;x<T.length;x++){var g=T[x];if(typeof g=="string")y+=A(i(g));else{var P=A(i(g.prefix)),b=A(i(g.suffix));if(g.pattern)if(e&&e.push(g),P||b)if(g.modifier==="+"||g.modifier==="*"){var k=g.modifier==="*"?"?":"";y+="(?:".concat(P,"((?:").concat(g.pattern,")(?:").concat(b).concat(P,"(?:").concat(g.pattern,"))*)").concat(b,")").concat(k)}else y+="(?:".concat(P,"(").concat(g.pattern,")").concat(b,")").concat(g.modifier);else g.modifier==="+"||g.modifier==="*"?y+="((?:".concat(g.pattern,")").concat(g.modifier,")"):y+="(".concat(g.pattern,")").concat(g.modifier);else y+="(?:".concat(P).concat(b,")").concat(g.modifier)}}if(o)a||(y+="".concat(v,"?")),y+=r.endsWith?"(?=".concat(d,")"):"$";else{var q=t[t.length-1],z=typeof q=="string"?v.indexOf(q[q.length-1])>-1:q===void 0;a||(y+="(?:".concat(v,"(?=").concat(d,"))?")),z||(y+="(?=".concat(v,"|").concat(d,")"))}return new RegExp(y,ce(r))}function le(t,e,r){return t instanceof RegExp?Le(t,e):Array.isArray(t)?Ue(t,e,r):He(t,e,r)}new TextEncoder;function ze(){if(typeof navigator<"u"&&navigator.product==="ReactNative")return!0;if(typeof process<"u"){const t=process.type;return t==="renderer"||t==="worker"?!1:!!(process.versions&&process.versions.node)}return!1}var Fe=Object.defineProperty,Ve=(t,e)=>{for(var r in e)Fe(t,r,{get:e[r],enumerable:!0})},We={};Ve(We,{blue:()=>Je,gray:()=>Ke,green:()=>Xe,red:()=>Qe,yellow:()=>Ge});function Ge(t){return`\x1B[33m${t}\x1B[0m`}function Je(t){return`\x1B[34m${t}\x1B[0m`}function Ke(t){return`\x1B[90m${t}\x1B[0m`}function Qe(t){return`\x1B[31m${t}\x1B[0m`}function Xe(t){return`\x1B[32m${t}\x1B[0m`}ze();function Ze(t,e=!0){return[e&&t.origin,t.pathname].filter(Boolean).join("")}const Ye=/[\?|#].*$/g;function et(t){return new URL(`/${t}`,"http://localhost").searchParams}function ue(t){return t.endsWith("?")?t:t.replace(Ye,"")}function tt(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}function rt(t,e){if(tt(t)||t.startsWith("*"))return t;const r=e||typeof document<"u"&&document.baseURI;return r?decodeURI(new URL(encodeURI(t),r).href):t}function nt(t,e){if(t instanceof RegExp)return t;const r=rt(t,e);return ue(r)}function at(t){return t.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,(e,r,n)=>{const a="(.*)";return r?r.startsWith(":")?`${r}${n}`:`${r}${a}`:a}).replace(/([^\/])(:)(?=\d+)/,"$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/,"$1\\$2")}function ot(t,e,r){const n=nt(e,r),a=typeof n=="string"?at(n):n,l=Ze(t),u=Ne(a,{decode:decodeURIComponent})(l),p=u&&u.params||{};return{matches:u!==!1,params:p}}var st=Object.create,de=Object.defineProperty,it=Object.getOwnPropertyDescriptor,pe=Object.getOwnPropertyNames,ct=Object.getPrototypeOf,lt=Object.prototype.hasOwnProperty,ut=(t,e)=>function(){return e||(0,t[pe(t)[0]])((e={exports:{}}).exports,e),e.exports},dt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of pe(e))!lt.call(t,a)&&a!==r&&de(t,a,{get:()=>e[a],enumerable:!(n=it(e,a))||n.enumerable});return t},pt=(t,e,r)=>(r=t!=null?st(ct(t)):{},dt(de(r,"default",{value:t,enumerable:!0}),t)),ft=ut({"node_modules/cookie/index.js"(t){t.parse=n,t.serialize=a;var e=Object.prototype.toString,r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function n(s,i){if(typeof s!="string")throw new TypeError("argument str must be a string");for(var f={},c=i||{},m=c.decode||l,h=0;h<s.length;){var d=s.indexOf("=",h);if(d===-1)break;var v=s.indexOf(";",h);if(v===-1)v=s.length;else if(v<d){h=s.lastIndexOf(";",d-1)+1;continue}var y=s.slice(h,d).trim();if(f[y]===void 0){var x=s.slice(d+1,v).trim();x.charCodeAt(0)===34&&(x=x.slice(1,-1)),f[y]=o(x,m)}h=v+1}return f}function a(s,i,f){var c=f||{},m=c.encode||u;if(typeof m!="function")throw new TypeError("option encode is invalid");if(!r.test(s))throw new TypeError("argument name is invalid");var h=m(i);if(h&&!r.test(h))throw new TypeError("argument val is invalid");var d=s+"="+h;if(c.maxAge!=null){var v=c.maxAge-0;if(isNaN(v)||!isFinite(v))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(v)}if(c.domain){if(!r.test(c.domain))throw new TypeError("option domain is invalid");d+="; Domain="+c.domain}if(c.path){if(!r.test(c.path))throw new TypeError("option path is invalid");d+="; Path="+c.path}if(c.expires){var y=c.expires;if(!p(y)||isNaN(y.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+y.toUTCString()}if(c.httpOnly&&(d+="; HttpOnly"),c.secure&&(d+="; Secure"),c.priority){var x=typeof c.priority=="string"?c.priority.toLowerCase():c.priority;switch(x){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(c.sameSite){var T=typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite;switch(T){case!0:d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"strict":d+="; SameSite=Strict";break;case"none":d+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return d}function l(s){return s.indexOf("%")!==-1?decodeURIComponent(s):s}function u(s){return encodeURIComponent(s)}function p(s){return e.call(s)==="[object Date]"||s instanceof Date}function o(s,i){try{return i(s)}catch{return s}}}}),mt=pt(ft()),K=mt.default;/*! Bundled license information:
|
|
11
11
|
|
|
12
12
|
cookie/index.js:
|
|
13
13
|
(*!
|
|
@@ -16,8 +16,8 @@ cookie/index.js:
|
|
|
16
16
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
17
17
|
* MIT Licensed
|
|
18
18
|
*)
|
|
19
|
-
*/function X(){return K.parse(document.cookie)}function
|
|
20
|
-
`,"\r"," "," "],
|
|
19
|
+
*/function X(){return K.parse(document.cookie)}function ht(t){if(typeof document>"u"||typeof location>"u")return{};switch(t.credentials){case"same-origin":{const e=new URL(t.url);return location.origin===e.origin?X():{}}case"include":return X();default:return{}}}function vt(t){const e=t.headers.get("cookie"),r=e?K.parse(e):{};Q.hydrate();const n=Array.from(Q.get(t)?.entries()).reduce((u,[p,{value:o}])=>Object.assign(u,{[p.trim()]:o}),{}),l={...ht(t),...n};for(const[u,p]of Object.entries(l))t.headers.append("cookie",K.serialize(u,p));return{...l,...r}}var _=(t=>(t.HEAD="HEAD",t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH",t.OPTIONS="OPTIONS",t.DELETE="DELETE",t))(_||{});class yt extends ye{constructor(e,r,n,a){super({info:{header:`${e} ${r}`,path:r,method:e},resolver:n,options:a}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,path:r}=this.info;if(r instanceof RegExp||ue(r)===r)return;et(r).forEach((l,u)=>{}),J.warn(`Found a redundant usage of query parameters in the request handler URL for "${e} ${r}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/recipes/query-parameters`)}async parse(e){const r=new URL(e.request.url),n=ot(r,this.info.path,e.resolutionContext?.baseUrl),a=vt(e.request);return{match:n,cookies:a}}predicate(e){const r=this.matchMethod(e.request.method),n=e.parsedResult.match.matches;return r&&n}matchMethod(e){return this.info.method instanceof RegExp?this.info.method.test(e):xe(this.info.method,e)}extendResolverArgs(e){return{params:e.parsedResult.match?.params||{},cookies:e.parsedResult.cookies}}async log(e){const r=ge(e.request.url),n=await Ee(e.request),a=await $e(e.response),l=be(a.status);console.groupCollapsed(J.formatMessage(`${Te()} ${e.request.method} ${r} (%c${a.status} ${a.statusText}%c)`),`color:${l}`,"color:inherit"),console.log("Request",n),console.log("Handler:",this),console.log("Response",a),console.groupEnd()}}function C(t){return(e,r,n={})=>new yt(t,e,r,n)}const M={all:C(/.+/),head:C(_.HEAD),get:C(_.GET),post:C(_.POST),put:C(_.PUT),delete:C(_.DELETE),patch:C(_.PATCH),options:C(_.OPTIONS)};var gt=Object.create,fe=Object.defineProperty,wt=Object.getOwnPropertyDescriptor,me=Object.getOwnPropertyNames,xt=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,Tt=(t,e)=>function(){return e||(0,t[me(t)[0]])((e={exports:{}}).exports,e),e.exports},Et=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of me(e))!bt.call(t,a)&&a!==r&&fe(t,a,{get:()=>e[a],enumerable:!(n=wt(e,a))||n.enumerable});return t},Ct=(t,e,r)=>(r=t!=null?gt(xt(t)):{},Et(!t||!t.__esModule?fe(r,"default",{value:t,enumerable:!0}):r,t)),_t=Tt({"node_modules/set-cookie-parser/lib/set-cookie.js"(t,e){var r={decodeValues:!0,map:!1,silent:!1};function n(o){return typeof o=="string"&&!!o.trim()}function a(o,s){var i=o.split(";").filter(n),f=i.shift(),c=l(f),m=c.name,h=c.value;s=s?Object.assign({},r,s):r;try{h=s.decodeValues?decodeURIComponent(h):h}catch(v){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+h+"'. Set options.decodeValues to false to disable this feature.",v)}var d={name:m,value:h};return i.forEach(function(v){var y=v.split("="),x=y.shift().trimLeft().toLowerCase(),T=y.join("=");x==="expires"?d.expires=new Date(T):x==="max-age"?d.maxAge=parseInt(T,10):x==="secure"?d.secure=!0:x==="httponly"?d.httpOnly=!0:x==="samesite"?d.sameSite=T:d[x]=T}),d}function l(o){var s="",i="",f=o.split("=");return f.length>1?(s=f.shift(),i=f.join("=")):i=o,{name:s,value:i}}function u(o,s){if(s=s?Object.assign({},r,s):r,!o)return s.map?{}:[];if(o.headers)if(typeof o.headers.getSetCookie=="function")o=o.headers.getSetCookie();else if(o.headers["set-cookie"])o=o.headers["set-cookie"];else{var i=o.headers[Object.keys(o.headers).find(function(c){return c.toLowerCase()==="set-cookie"})];!i&&o.headers.cookie&&!s.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),o=i}if(Array.isArray(o)||(o=[o]),s=s?Object.assign({},r,s):r,s.map){var f={};return o.filter(n).reduce(function(c,m){var h=a(m,s);return c[h.name]=h,c},f)}else return o.filter(n).map(function(c){return a(c,s)})}function p(o){if(Array.isArray(o))return o;if(typeof o!="string")return[];var s=[],i=0,f,c,m,h,d;function v(){for(;i<o.length&&/\s/.test(o.charAt(i));)i+=1;return i<o.length}function y(){return c=o.charAt(i),c!=="="&&c!==";"&&c!==","}for(;i<o.length;){for(f=i,d=!1;v();)if(c=o.charAt(i),c===","){for(m=i,i+=1,v(),h=i;i<o.length&&y();)i+=1;i<o.length&&o.charAt(i)==="="?(d=!0,i=h,s.push(o.substring(f,m)),f=i):i=m+1}else i+=1;(!d||i>=o.length)&&s.push(o.substring(f,o.length))}return s}e.exports=u,e.exports.parse=u,e.exports.parseString=a,e.exports.splitCookiesString=p}}),Pt=Ct(_t()),kt=/[^a-z0-9\-#$%&'*+.^_`|~]/i;function B(t){if(kt.test(t)||t.trim()==="")throw new TypeError("Invalid character in header field name");return t.trim().toLowerCase()}var Z=[`
|
|
20
|
+
`,"\r"," "," "],qt=new RegExp(`(^[${Z.join("")}]|$[${Z.join("")}])`,"g");function V(t){return t.replace(qt,"")}function $(t){if(typeof t!="string"||t.length===0)return!1;for(let e=0;e<t.length;e++){const r=t.charCodeAt(e);if(r>127||!Rt(r))return!1}return!0}function Rt(t){return![127,32,"(",")","<",">","@",",",";",":","\\",'"',"/","[","]","?","=","{","}"].includes(t)}function Y(t){if(typeof t!="string"||t.trim()!==t)return!1;for(let e=0;e<t.length;e++){const r=t.charCodeAt(e);if(r===0||r===10||r===13)return!1}return!0}var R=Symbol("normalizedHeaders"),W=Symbol("rawHeaderNames"),ee=", ",te,re,ne,Ot=class he{constructor(e){this[te]={},this[re]=new Map,this[ne]="Headers",["Headers","HeadersPolyfill"].includes(e?.constructor.name)||e instanceof he||typeof globalThis.Headers<"u"&&e instanceof globalThis.Headers?e.forEach((n,a)=>{this.append(a,n)},this):Array.isArray(e)?e.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(ee):n)}):e&&Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r];this.append(r,Array.isArray(n)?n.join(ee):n)})}[(te=R,re=W,ne=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(const[e]of this.entries())yield e}*values(){for(const[,e]of this.entries())yield e}*entries(){let e=Object.keys(this[R]).sort((r,n)=>r.localeCompare(n));for(const r of e)if(r==="set-cookie")for(const n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(e){if(!$(e))throw new TypeError(`Invalid header name "${e}"`);return this[R].hasOwnProperty(B(e))}get(e){if(!$(e))throw TypeError(`Invalid header name "${e}"`);return this[R][B(e)]??null}set(e,r){if(!$(e)||!Y(r))return;const n=B(e),a=V(r);this[R][n]=V(a),this[W].set(n,e)}append(e,r){if(!$(e)||!Y(r))return;const n=B(e),a=V(r);let l=this.has(n)?`${this.get(n)}, ${a}`:a;this.set(e,l)}delete(e){if(!$(e)||!this.has(e))return;const r=B(e);delete this[R][r],this[W].delete(r)}forEach(e,r){for(const[n,a]of this.entries())e.call(r,a,n,this)}getSetCookie(){const e=this.get("set-cookie");return e===null?[]:e===""?[""]:(0,Pt.splitCookiesString)(e)}};const{message:At}=ie;function O(t={}){const e=t?.status||200,r=t?.statusText||At[e]||"",n=new Headers(t?.headers);return{...t,headers:n,status:e,statusText:r}}function St(t,e){if(e.type&&Object.defineProperty(t,"type",{value:e.type,enumerable:!0,writable:!1}),typeof document<"u"){const r=Ot.prototype.getSetCookie.call(e.headers);for(const n of r)document.cookie=n}return t}class E extends Response{constructor(e,r){const n=O(r);super(e,n),St(this,n)}static text(e,r){const n=O(r);return n.headers.has("Content-Type")||n.headers.set("Content-Type","text/plain"),n.headers.has("Content-Length")||n.headers.set("Content-Length",e?new Blob([e]).size.toString():"0"),new E(e,n)}static json(e,r){const n=O(r);n.headers.has("Content-Type")||n.headers.set("Content-Type","application/json");const a=JSON.stringify(e);return n.headers.has("Content-Length")||n.headers.set("Content-Length",a?new Blob([a]).size.toString():"0"),new E(a,n)}static xml(e,r){const n=O(r);return n.headers.has("Content-Type")||n.headers.set("Content-Type","text/xml"),new E(e,n)}static arrayBuffer(e,r){const n=O(r);return e&&n.headers.set("Content-Length",e.byteLength.toString()),new E(e,n)}static formData(e,r){return new E(e,O(r))}}async function Bt(t){let e;return e=t,new Promise(r=>setTimeout(r,e))}we();const G={count:1279,next:"https://pokeapi.co/api/v2/pokemon?offset=6&limit=6",previous:null,results:[{name:"bulbasaur",url:"https://pokeapi.co/api/v2/pokemon/1/"},{name:"ivysaur",url:"https://pokeapi.co/api/v2/pokemon/2/"},{name:"venusaur",url:"https://pokeapi.co/api/v2/pokemon/3/"},{name:"charmander",url:"https://pokeapi.co/api/v2/pokemon/4/"},{name:"charmeleon",url:"https://pokeapi.co/api/v2/pokemon/5/"},{name:"charizard",url:"https://pokeapi.co/api/v2/pokemon/6/"}]},H=[M.get("/pokemon",({request:t})=>{const r=new URL(t.url).searchParams.get("limit"),n=structuredClone(G);return r&&(n.results=n.results.slice(0,Number(r))),E.json(n)}),M.get("/noreturn",async()=>(await Bt(500),E.json(G))),M.get("/reflect",({request:t})=>{const e={};return[...t.headers.entries()].map(([r,n])=>e[r]="reflected-"+n),e["x-added"]="abc",E.json(G,{headers:e})}),M.get("/404",()=>new E(null,{status:404,statusText:"not found"}))],$t={title:"",slice:"page",url:"/pokemon?limit=6"};function S(t){return new Promise(e=>setTimeout(e,t))}function Dt({title:t,slice:e,url:r}){return`
|
|
21
21
|
<fieldset>
|
|
22
22
|
<legend>${t}</legend>
|
|
23
23
|
<custom-element>
|
|
@@ -61,7 +61,7 @@ cookie/index.js:
|
|
|
61
61
|
</template>
|
|
62
62
|
</custom-element>
|
|
63
63
|
</fieldset>
|
|
64
|
-
`}const
|
|
64
|
+
`}const It={title:"http-request",render:t=>Dt(t),renderPlay:async function(e){document.body.innerHTML=(e.render?e:It).render({...$t,...e.args}),await new Promise(r=>setTimeout(async()=>{await e.play({canvasElement:document.body.firstElementChild}),r(0)},0))}},D={args:{title:"url and slice",url:"/pokemon?limit=4"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(D.args.title),w(await e.findByText("bulbasaur")).toBeInTheDocument(),w(await e.findByText("Pokemon Count: 4")).toBeInTheDocument(t)},parameters:{msw:H}},I={args:{title:"url change",url:""},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(I.args.title);const r=l=>e.getByText(l),n=t.querySelector("http-request"),a=()=>n.getAttribute("url");w(r("Pokemon Count: 0")).toBeInTheDocument(),w(a()).toEqual(""),r("/pokemon").click(),await S(100),w(a()).toEqual("/pokemon"),w(r("Pokemon Count: 6")).toBeInTheDocument(),r("/pokemon?limit=6").click(),await S(100),w(a()).toEqual("/pokemon?limit=6"),w(r("Pokemon Count: 6")).toBeInTheDocument(),r("/pokemon?limit=3").click(),await S(100),w(a()).toEqual("/pokemon?limit=3"),w(r("Pokemon Count: 3")).toBeInTheDocument(),r("set blank").click(),await S(100),w(a()).toEqual(""),w(r("Pokemon Count: 0")).toBeInTheDocument()},parameters:{msw:H}},N={args:{title:"http-request with error",url:"/404"},play:async({canvasElement:t})=>{const e=U(t),r=async n=>(await e.findByTestId(n)).textContent;await e.findByText(N.args.title),await S(200),w(await r("attr-status")).to.include("404")},parameters:{msw:H}},j={args:{title:"http-request with delayed .5 seconds response",url:"/noreturn"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(j.args.title),w(await e.findByText("request")).toBeInTheDocument(),w(e.queryByText("response")).toBe(null),w(await e.findByText("response")).toBeInTheDocument(),w(await e.findByText("bulbasaur")).toBeInTheDocument(),w(await e.findByText("Pokemon Count: 6")).toBeInTheDocument()},parameters:{msw:H}},L={args:{title:"http-request headers and response status and headers",url:"/reflect"},play:async({canvasElement:t})=>{const e=U(t);await e.findByText(L.args.title),await S(200);const r=await e.findByTestId("section-request-attr-x-test");w(r).toBeInTheDocument(),w(r.textContent.trim()).toEqual("testing");const n=await e.findByTestId("section-response-attr-x-test");w(n).toBeInTheDocument(),w(n.textContent.trim()).toEqual("reflected-testing");const a=await e.findByTestId("section-response-attr-x-added");w(a).toBeInTheDocument(),w(a.textContent.trim()).toEqual("abc")},parameters:{msw:H},render:({url:t,title:e})=>`
|
|
65
65
|
<fieldset>
|
|
66
66
|
<legend>${e}</legend>
|
|
67
67
|
<p> <b>request</b> headers are populated into dedicated <b>slice/request/headers</b></p>
|
|
@@ -170,7 +170,7 @@ from <code>${t}</code>
|
|
|
170
170
|
parameters: {
|
|
171
171
|
msw: handlers
|
|
172
172
|
}
|
|
173
|
-
}`,...I.parameters?.docs?.source}}};
|
|
173
|
+
}`,...I.parameters?.docs?.source}}};N.parameters={...N.parameters,docs:{...N.parameters?.docs,source:{originalSource:`{
|
|
174
174
|
args: {
|
|
175
175
|
title: 'http-request with error',
|
|
176
176
|
url: '/404'
|
|
@@ -187,7 +187,7 @@ from <code>${t}</code>
|
|
|
187
187
|
parameters: {
|
|
188
188
|
msw: handlers
|
|
189
189
|
}
|
|
190
|
-
}`,...
|
|
190
|
+
}`,...N.parameters?.docs?.source}}};j.parameters={...j.parameters,docs:{...j.parameters?.docs,source:{originalSource:`{
|
|
191
191
|
args: {
|
|
192
192
|
title: 'http-request with delayed .5 seconds response',
|
|
193
193
|
url: '/noreturn'
|
|
@@ -208,7 +208,7 @@ from <code>${t}</code>
|
|
|
208
208
|
parameters: {
|
|
209
209
|
msw: handlers
|
|
210
210
|
}
|
|
211
|
-
}`,...
|
|
211
|
+
}`,...j.parameters?.docs?.source}}};L.parameters={...L.parameters,docs:{...L.parameters?.docs,source:{originalSource:`{
|
|
212
212
|
args: {
|
|
213
213
|
title: 'http-request headers and response status and headers',
|
|
214
214
|
url: '/reflect'
|
|
@@ -297,4 +297,4 @@ from <code>\${url}</code>
|
|
|
297
297
|
<headers-demo></headers-demo>
|
|
298
298
|
</fieldset>
|
|
299
299
|
\`
|
|
300
|
-
}`,...L.parameters?.docs?.source}}};const
|
|
300
|
+
}`,...L.parameters?.docs?.source}}};const Ht=["Demo","UrlChange","Http404","LifecycleInitialized","RequestResponseHeaders"];export{D as Demo,N as Http404,j as LifecycleInitialized,L as RequestResponseHeaders,I as UrlChange,Ht as __namedExportsOrder,It as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__fileDeps=["./Configure-D0qG3gR9.js","./index-DsWii_Ep.js","./index-Cc7K62zD.js","./index-DXimoRZY.js","./index-DrFu-skq.js","./index-CKw1EbdP.js","./attributes.test.stories-W34tZdUt.js","./custom-element-DpIq8E2p.js","./index-CVRyq5ci.js","./css.test.stories-BZFYx1TQ.js","./dom-merge.test.stories-S-7U5N3h.js","./external-template.test.stories-QIO3lAFz.js","./form.test.stories-ClYhj9F1.js","./http-request.stories-DCqY5s2i.js","./http-request-DNq59pnj.js","./index-DuIEV_9C.js","./local-storage.test.stories-BqgYwqr-.js","./location-element.test.stories-DvH1TWK4.js","./location-element-hKpcXCdn.js","./set-url.test.stories-GlJOh31I.js","./slice-events.test.stories-VoNjuPCX.js","./slots.test.stories-Da2j9YuO.js","./version-select.test.stories-DLwf-TPB.js","./entry-preview-DrgzXgwT.js","./lit-element-CenEXOuS.js","./entry-preview-docs-Bxv0qQWs.js","./tiny-invariant-BxWVcicq.js","./preview-TCN6m6T-.js","./preview-B63p-W8V.js","./preview-BDY5ThwJ.js","./preview-BAz7FMXc.js","./preview-BKCN0mOr.js","./preview-DRnyIGXK.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import"../sb-preview/runtime.js";(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function c(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(r){if(r.ep)return;r.ep=!0;const s=c(r);fetch(r.href,s)}})();const R="modulepreload",f=function(e,_){return new URL(e,_).href},O={},t=function(_,c,a){let r=Promise.resolve();if(c&&c.length>0){const s=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),p=o?.nonce||o?.getAttribute("nonce");r=Promise.all(c.map(i=>{if(i=f(i,a),i in O)return;O[i]=!0;const m=i.endsWith(".css"),d=m?'[rel="stylesheet"]':"";if(!!a)for(let l=s.length-1;l>=0;l--){const u=s[l];if(u.href===i&&(!m||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${d}`))return;const n=document.createElement("link");if(n.rel=m?"stylesheet":R,m||(n.as="script",n.crossOrigin=""),n.href=i,p&&n.setAttribute("nonce",p),document.head.appendChild(n),m)return new Promise((l,u)=>{n.addEventListener("load",l),n.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})}))}return r.then(()=>_()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},{createBrowserChannel:T}=__STORYBOOK_MODULE_CHANNELS__,{addons:L}=__STORYBOOK_MODULE_PREVIEW_API__,E=T({page:"preview"});L.setChannel(E);window.__STORYBOOK_ADDONS_CHANNEL__=E;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=E);const P={"./src/stories/Configure.mdx":async()=>t(()=>import("./Configure-D0qG3gR9.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"./src/stories/attributes.test.stories.ts":async()=>t(()=>import("./attributes.test.stories-W34tZdUt.js"),__vite__mapDeps([6,7,8]),import.meta.url),"./src/stories/css.test.stories.ts":async()=>t(()=>import("./css.test.stories-BZFYx1TQ.js"),__vite__mapDeps([9,7,8]),import.meta.url),"./src/stories/dom-merge.test.stories.ts":async()=>t(()=>import("./dom-merge.test.stories-S-7U5N3h.js"),__vite__mapDeps([10,7,8]),import.meta.url),"./src/stories/external-template.test.stories.ts":async()=>t(()=>import("./external-template.test.stories-QIO3lAFz.js"),__vite__mapDeps([11,7,8]),import.meta.url),"./src/stories/form.test.stories.ts":async()=>t(()=>import("./form.test.stories-ClYhj9F1.js"),__vite__mapDeps([12,7,8]),import.meta.url),"./src/stories/http-request.stories.ts":async()=>t(()=>import("./http-request.stories-DCqY5s2i.js"),__vite__mapDeps([13,7,8,14,15]),import.meta.url),"./src/stories/local-storage.test.stories.ts":async()=>t(()=>import("./local-storage.test.stories-BqgYwqr-.js"),__vite__mapDeps([16,7,8]),import.meta.url),"./src/stories/location-element.test.stories.ts":async()=>t(()=>import("./location-element.test.stories-DvH1TWK4.js"),__vite__mapDeps([17,7,8,18]),import.meta.url),"./src/stories/set-url.test.stories.ts":async()=>t(()=>import("./set-url.test.stories-GlJOh31I.js"),__vite__mapDeps([19,7,8,18]),import.meta.url),"./src/stories/slice-events.test.stories.ts":async()=>t(()=>import("./slice-events.test.stories-VoNjuPCX.js"),__vite__mapDeps([20,7,8]),import.meta.url),"./src/stories/slots.test.stories.ts":async()=>t(()=>import("./slots.test.stories-Da2j9YuO.js"),__vite__mapDeps([21,7,8]),import.meta.url),"./src/stories/version-select.test.stories.ts":async()=>t(()=>import("./version-select.test.stories-DLwf-TPB.js"),__vite__mapDeps([22,7,8,14]),import.meta.url)};async function y(e){return P[e]()}const{composeConfigs:I,PreviewWeb:V,ClientApi:S}=__STORYBOOK_MODULE_PREVIEW_API__,D=async(e=[])=>{const _=await Promise.all([e.at(0)??t(()=>import("./entry-preview-DrgzXgwT.js"),__vite__mapDeps([23,4,24]),import.meta.url),e.at(1)??t(()=>import("./entry-preview-docs-Bxv0qQWs.js"),__vite__mapDeps([25,2,26,24]),import.meta.url),e.at(2)??t(()=>import("./preview-TCN6m6T-.js"),__vite__mapDeps([27,3]),import.meta.url),e.at(3)??t(()=>import("./preview-DjDbQHPa.js"),[],import.meta.url),e.at(4)??t(()=>import("./preview-FpHGYA1q.js"),[],import.meta.url),e.at(5)??t(()=>import("./preview-B63p-W8V.js"),__vite__mapDeps([28,4]),import.meta.url),e.at(6)??t(()=>import("./preview-B4GcaC1c.js"),[],import.meta.url),e.at(7)??t(()=>import("./preview-BDY5ThwJ.js"),__vite__mapDeps([29,26]),import.meta.url),e.at(8)??t(()=>import("./preview-BAz7FMXc.js"),__vite__mapDeps([30,4]),import.meta.url),e.at(9)??t(()=>import("./preview-4Up_z4Em.js"),[],import.meta.url),e.at(10)??t(()=>import("./preview-BKCN0mOr.js"),__vite__mapDeps([31,8]),import.meta.url),e.at(11)??t(()=>import("./preview-DRnyIGXK.js"),__vite__mapDeps([32,15]),import.meta.url)]);return I(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new V(y,D);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{t as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as e}from"./index-
|
|
1
|
+
import{R as e}from"./index-DsWii_Ep.js";const o={},c=e.createContext(o);function u(n){const t=e.useContext(c);return e.useMemo(function(){return typeof n=="function"?n(t):{...t,...n}},[t,n])}function a(n){let t;return n.disableParentContext?t=typeof n.components=="function"?n.components(o):n.components||o:t=u(n.components),e.createElement(c.Provider,{value:t},n.children)}export{a as M,u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M,u as a}from"./index-
|
|
1
|
+
import{M,u as a}from"./index-CKw1EbdP.js";import"./index-DsWii_Ep.js";import"./iframe-CURpvmVV.js";import"../sb-preview/runtime.js";import"./index-Cc7K62zD.js";import"./index-DXimoRZY.js";import"./index-DrFu-skq.js";export{M as MDXProvider,a as useMDXComponents};
|