@inglorious/ssx 0.1.4 → 0.2.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.
@@ -1,193 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`toHTML > API rendering within components > should support api.render() method in component render function 1`] = `"<div><div><span>Test Item</span></div></div>"`;
4
-
5
- exports[`toHTML > HTML wrapping > should default to empty title when not provided 1`] = `
6
- "<!DOCTYPE html>
7
- <html>
8
- <head>
9
- <meta charset="UTF-8">
10
- <title></title>
11
-
12
-
13
- </head>
14
- <body>
15
- <div id="root"><p>Content</p></div>
16
-
17
- </body>
18
- </html>"
19
- `;
20
-
21
- exports[`toHTML > HTML wrapping > should handle empty arrays for metas, styles, and scripts 1`] = `
22
- "<!DOCTYPE html>
23
- <html>
24
- <head>
25
- <meta charset="UTF-8">
26
- <title></title>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="root"><p>Content</p></div>
32
-
33
- </body>
34
- </html>"
35
- `;
36
-
37
- exports[`toHTML > HTML wrapping > should include all options in wrapped HTML 1`] = `
38
- "<!DOCTYPE html>
39
- <html>
40
- <head>
41
- <meta charset="UTF-8">
42
- <title>Complete Page</title>
43
- <meta name="author" content="Test Author">
44
- <link rel="stylesheet" href="/style.css">
45
- </head>
46
- <body>
47
- <div id="root"><main>Main content</main></div>
48
- <script type="module" src="/app.js"></script>
49
- </body>
50
- </html>"
51
- `;
52
-
53
- exports[`toHTML > HTML wrapping > should include meta tags in wrapped HTML 1`] = `
54
- "<!DOCTYPE html>
55
- <html>
56
- <head>
57
- <meta charset="UTF-8">
58
- <title>Test Page</title>
59
- <meta name="description" content="Test description">
60
- <meta name="viewport" content="width=device-width, initial-scale=1">
61
-
62
- </head>
63
- <body>
64
- <div id="root"><p>Content</p></div>
65
-
66
- </body>
67
- </html>"
68
- `;
69
-
70
- exports[`toHTML > HTML wrapping > should include scripts in wrapped HTML 1`] = `
71
- "<!DOCTYPE html>
72
- <html>
73
- <head>
74
- <meta charset="UTF-8">
75
- <title></title>
76
-
77
-
78
- </head>
79
- <body>
80
- <div id="root"><p>Content</p></div>
81
- <script type="module" src="/js/app.js"></script>
82
- <script type="module" src="/js/analytics.js"></script>
83
- </body>
84
- </html>"
85
- `;
86
-
87
- exports[`toHTML > HTML wrapping > should include stylesheets in wrapped HTML 1`] = `
88
- "<!DOCTYPE html>
89
- <html>
90
- <head>
91
- <meta charset="UTF-8">
92
- <title></title>
93
-
94
- <link rel="stylesheet" href="/css/style.css">
95
- <link rel="stylesheet" href="/css/theme.css">
96
- </head>
97
- <body>
98
- <div id="root"><p>Content</p></div>
99
-
100
- </body>
101
- </html>"
102
- `;
103
-
104
- exports[`toHTML > HTML wrapping > should wrap HTML with basic DOCTYPE and structure 1`] = `
105
- "<!DOCTYPE html>
106
- <html>
107
- <head>
108
- <meta charset="UTF-8">
109
- <title>My Page</title>
110
-
111
-
112
- </head>
113
- <body>
114
- <div id="root"><h1>Page Title</h1></div>
115
-
116
- </body>
117
- </html>"
118
- `;
119
-
120
- exports[`toHTML > basic rendering > should render empty content 1`] = `""`;
121
-
122
- exports[`toHTML > basic rendering > should render nested elements 1`] = `
123
- "<div class="container">
124
- <h1>Title</h1>
125
- <p>Content</p>
126
- </div>"
127
- `;
128
-
129
- exports[`toHTML > basic rendering > should render simple HTML without wrapping 1`] = `"<h1>Hello World</h1>"`;
130
-
131
- exports[`toHTML > basic rendering > should render with inline styles 1`] = `"<div style="color: red; font-size: 16px;">Styled</div>"`;
132
-
133
- exports[`toHTML > complex scenarios > should render a complete page structure with message list 1`] = `
134
- "<div class="app">
135
- <header><h1>Messages</h1></header>
136
- <main><div class="message"><p>First message</p></div> <div class="message"><p>Second message</p></div></main>
137
- <footer>© 2024</footer>
138
- </div>"
139
- `;
140
-
141
- exports[`toHTML > complex scenarios > should render wrapped complex page with all assets 1`] = `
142
- "<!DOCTYPE html>
143
- <html>
144
- <head>
145
- <meta charset="UTF-8">
146
- <title>My Website</title>
147
- <meta name="description" content="Welcome to my site">
148
- <meta name="viewport" content="width=device-width">
149
- <link rel="stylesheet" href="/style.css">
150
- </head>
151
- <body>
152
- <div id="root"><div>
153
- <header><h1>My Website</h1></header>
154
- <p>Welcome!</p>
155
- </div></div>
156
- <script type="module" src="/script.js"></script>
157
- </body>
158
- </html>"
159
- `;
160
-
161
- exports[`toHTML > edge cases > should handle special characters in content 1`] = `"<p>&lt;script&gt; &amp; "quotes"</p>"`;
162
-
163
- exports[`toHTML > edge cases > should not include wrap by default 1`] = `"<p>Content</p>"`;
164
-
165
- exports[`toHTML > edge cases > should return only inner HTML when wrap is false 1`] = `"<p>Inner</p>"`;
166
-
167
- exports[`toHTML > event handling > should render event handlers in templates 1`] = `
168
- "<div><div>
169
- Click me
170
- </div></div>"
171
- `;
172
-
173
- exports[`toHTML > event handling > should render multiple event handlers 1`] = `
174
- "<div><div>
175
- <button>
176
- +
177
- </button>
178
- <span>5</span>
179
- <button>
180
- -
181
- </button>
182
- </div></div>"
183
- `;
184
-
185
- exports[`toHTML > rendering with state > should evaluate conditional rendering based on state 1`] = `"<div><p>Visible content</p></div>"`;
186
-
187
- exports[`toHTML > rendering with state > should render entities from store 1`] = `"<div><span>Hello from store</span></div>"`;
188
-
189
- exports[`toHTML > rendering with state > should render multiple entities 1`] = `
190
- "<ul>
191
- <li>First</li> <li>Second</li> <li>Third</li>
192
- </ul>"
193
- `;