shinkom 1.1.0 → 1.1.2
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/README.md +0 -18
- package/dist/bundles/_virtual/_rolldown/runtime.js +14 -14
- package/dist/bundles/core/constants.d.ts +15 -15
- package/dist/bundles/core/constants.js +23 -23
- package/dist/bundles/core/elements/compat-view-element.d.ts +99 -99
- package/dist/bundles/core/elements/compat-view-element.js +440 -440
- package/dist/bundles/core/elements/control-panel-element.d.ts +44 -44
- package/dist/bundles/core/elements/control-panel-element.js +99 -99
- package/dist/bundles/core/elements/index.d.ts +12 -12
- package/dist/bundles/core/elements/index.js +13 -13
- package/dist/bundles/core/elements/inspector-element.d.ts +26 -26
- package/dist/bundles/core/elements/inspector-element.js +58 -58
- package/dist/bundles/core/elements/recent-result-item.js +46 -46
- package/dist/bundles/core/elements/results-history-item.js +46 -46
- package/dist/bundles/core/elements/templates/compat-view.templates.js +462 -462
- package/dist/bundles/core/elements/templates/control-panel.templates.js +335 -335
- package/dist/bundles/core/elements/templates/root-styles.template.js +40 -40
- package/dist/bundles/core/event-bus.d.ts +46 -46
- package/dist/bundles/core/event-bus.js +49 -49
- package/dist/bundles/core/helpers.js +47 -47
- package/dist/bundles/core/index.d.ts +14 -14
- package/dist/bundles/core/index.js +16 -16
- package/dist/bundles/core/state-service.d.ts +56 -56
- package/dist/bundles/core/state-service.js +91 -80
- package/dist/bundles/core/ui-component.d.ts +63 -63
- package/dist/bundles/core/ui-component.js +71 -71
- package/dist/bundles/engine/engine.d.ts +108 -108
- package/dist/bundles/engine/engine.js +238 -238
- package/dist/bundles/engine/index.js +8 -8
- package/dist/bundles/gen/index.js +14 -14
- package/dist/bundles/index.d.ts +19 -19
- package/dist/bundles/index.js +23 -23
- package/dist/bundles/pkg/shinkore.d.ts +40 -50
- package/dist/bundles/pkg/shinkore.js +465 -465
- package/dist/bundles/pkg/shinkore_bg.wasm +0 -0
- package/dist/bundles/shinkom.d.ts +41 -41
- package/dist/bundles/shinkom.js +80 -80
- package/dist/bundles/ui/compat-ui/compat-ui.d.ts +42 -42
- package/dist/bundles/ui/compat-ui/compat-ui.js +59 -59
- package/dist/bundles/ui/compat-ui/index.js +8 -8
- package/dist/bundles/ui/compatibility-view/compatibility-view.d.ts +41 -41
- package/dist/bundles/ui/compatibility-view/compatibility-view.js +229 -229
- package/dist/bundles/ui/compatibility-view/index.js +8 -8
- package/dist/bundles/ui/control-panel/control-panel.d.ts +52 -52
- package/dist/bundles/ui/control-panel/control-panel.js +320 -320
- package/dist/bundles/ui/control-panel/index.js +8 -8
- package/dist/bundles/ui/index.d.ts +11 -11
- package/dist/bundles/ui/index.js +16 -16
- package/dist/bundles/ui/inspector/index.js +8 -8
- package/dist/bundles/ui/inspector/inspector.d.ts +97 -97
- package/dist/bundles/ui/inspector/inspector.js +394 -394
- package/dist/modules/core/constants.cjs +17 -17
- package/dist/modules/core/elements/compat-view-element.cjs +434 -434
- package/dist/modules/core/elements/control-panel-element.cjs +93 -93
- package/dist/modules/core/elements/index.cjs +11 -11
- package/dist/modules/core/elements/inspector-element.cjs +52 -52
- package/dist/modules/core/elements/recent-result-item.cjs +39 -39
- package/dist/modules/core/elements/results-history-item.cjs +39 -39
- package/dist/modules/core/elements/templates/compat-view.templates.cjs +458 -458
- package/dist/modules/core/elements/templates/control-panel.templates.cjs +332 -332
- package/dist/modules/core/elements/templates/root-styles.template.cjs +33 -33
- package/dist/modules/core/event-bus.cjs +43 -43
- package/dist/modules/core/helpers.cjs +41 -41
- package/dist/modules/core/index.cjs +16 -16
- package/dist/modules/core/state-service.cjs +85 -74
- package/dist/modules/core/ui-component.cjs +65 -65
- package/dist/modules/engine/engine.cjs +232 -232
- package/dist/modules/gen/browser-data.cjs +100 -100
- package/dist/modules/gen/browser-usage-data.cjs +675 -675
- package/dist/modules/gen/compat-data.cjs +31015 -31015
- package/dist/modules/gen/index.cjs +7 -7
- package/dist/modules/index.cjs +27 -27
- package/dist/modules/pkg/shinkore.cjs +459 -459
- package/dist/modules/pkg/shinkore_bg.wasm +0 -0
- package/dist/modules/shinkom.cjs +73 -73
- package/dist/modules/ui/compat-ui/compat-ui.cjs +53 -53
- package/dist/modules/ui/compat-ui/index.cjs +1 -1
- package/dist/modules/ui/compatibility-view/compatibility-view.cjs +223 -223
- package/dist/modules/ui/compatibility-view/index.cjs +1 -1
- package/dist/modules/ui/control-panel/control-panel.cjs +314 -314
- package/dist/modules/ui/control-panel/index.cjs +1 -1
- package/dist/modules/ui/index.cjs +13 -13
- package/dist/modules/ui/inspector/index.cjs +1 -1
- package/dist/modules/ui/inspector/inspector.cjs +388 -388
- package/package.json +100 -100
|
@@ -1,332 +1,332 @@
|
|
|
1
|
-
//#region src/core/elements/templates/control-panel.templates.js
|
|
2
|
-
const controlPanelHTML = `
|
|
3
|
-
<div style="position: relative">
|
|
4
|
-
<button id="sk-show-panel" class="sk-button-style sk-show-panel">
|
|
5
|
-
<svg style="display: block; pointer-events: none;" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
6
|
-
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
7
|
-
class="lucide lucide-panel-left-open-icon lucide-panel-left-open">
|
|
8
|
-
<rect width="18" height="18" x="3" y="3" rx="2" />
|
|
9
|
-
<path d="M9 3v18" />
|
|
10
|
-
<path d="m14 9 3 3-3 3" />
|
|
11
|
-
</svg>
|
|
12
|
-
</button>
|
|
13
|
-
<div part="control-panel" id="sk-control-panel" class="sk-control-panel" style="display: none;">
|
|
14
|
-
<div class="sk-control-panel-inner">
|
|
15
|
-
<nav class="sk-tabs-nav">
|
|
16
|
-
<button id="sk-inspector-tab" class="sk-tab-button">Inspector</button>
|
|
17
|
-
<div class="sk-tab-line"></div>
|
|
18
|
-
<button id="sk-compat-view-tab" class="sk-tab-button">Compatibility View</button>
|
|
19
|
-
</nav>
|
|
20
|
-
<hr class="sk-hr-line">
|
|
21
|
-
<main id="sk-control-panel-main" class="sk-control-panel-main"></main>
|
|
22
|
-
<hr class="sk-hr-line">
|
|
23
|
-
<footer class="sk-close">
|
|
24
|
-
<button id="sk-close-panel" class="sk-button-style">Close</button>
|
|
25
|
-
<span class="sk-copy">© 2026 Shinkom</span>
|
|
26
|
-
</footer>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
`;
|
|
31
|
-
const controlPanelInspectorTab = `
|
|
32
|
-
<div class="sk-multi-elements">
|
|
33
|
-
<p>Activate multi-element checking</p>
|
|
34
|
-
<label class="sk-multi-elements-checkbox-container">
|
|
35
|
-
<input id="sk-toggle-elements" type="checkbox">
|
|
36
|
-
<span class="sk-multi-elements-checkbox"></span>
|
|
37
|
-
</label>
|
|
38
|
-
<p>Enter a depth level</p>
|
|
39
|
-
<input id="sk-depth-level" class="sk-text-input" type="text" placeholder="depth_level">
|
|
40
|
-
</div>
|
|
41
|
-
<hr class="sk-hr-line">
|
|
42
|
-
<div class="sk-element-switching sk-section-grid">
|
|
43
|
-
<p>Toggle element switching</p>
|
|
44
|
-
<button id="sk-toggle-switching" class="sk-button-style">Disabled</button>
|
|
45
|
-
</div>
|
|
46
|
-
<hr class="sk-hr-line">
|
|
47
|
-
<div class="sk-inspector-toggling-container">
|
|
48
|
-
<div class="sk-inspector-toggling">
|
|
49
|
-
<p>Toggle the inspector</p>
|
|
50
|
-
<button id="sk-toggle-inspector" class="sk-button-style">Enabled</button>
|
|
51
|
-
</div>
|
|
52
|
-
<span class="sk-inspector-toggling-hint">Sets/ removes event listeners for the inspector, setting/
|
|
53
|
-
removing the override of click and
|
|
54
|
-
pointer events on the window object.</span>
|
|
55
|
-
</div>
|
|
56
|
-
<hr class="sk-hr-line">
|
|
57
|
-
<div class="sk-create-inspector-container sk-section-grid">
|
|
58
|
-
<p>Create inspector</p>
|
|
59
|
-
<button id="sk-create-inspector" class="sk-button-style">Create</button>
|
|
60
|
-
</div>
|
|
61
|
-
<hr class="sk-hr-line">
|
|
62
|
-
<div class="sk-reset-inspector-container sk-section-grid">
|
|
63
|
-
<p>Reset inspector</p>
|
|
64
|
-
<button id="sk-reset-inspector" class="sk-button-style">Reset</button>
|
|
65
|
-
</div>
|
|
66
|
-
<hr class="sk-hr-line">
|
|
67
|
-
<div class="sk-destroy-inspector-container sk-section-grid">
|
|
68
|
-
<p>Destroy inspector</p>
|
|
69
|
-
<button id="sk-destroy-inspector" class="sk-button-style">Destroy</button>
|
|
70
|
-
</div>
|
|
71
|
-
`;
|
|
72
|
-
const controlPanelCompatViewTab = `
|
|
73
|
-
<div class="sk-max-history-container sk-section-grid">
|
|
74
|
-
<p>Change maximum number of results stored in history</p>
|
|
75
|
-
<input id="sk-max-history" class="sk-text-input" type="text" placeholder="default is 10">
|
|
76
|
-
</div>
|
|
77
|
-
<hr class="sk-hr-line">
|
|
78
|
-
<div class="sk-clear-history-container sk-section-grid">
|
|
79
|
-
<p>Clear results history in localStorage</p>
|
|
80
|
-
<button id="sk-clear-history" class="sk-button-style">Clear</button>
|
|
81
|
-
</div>
|
|
82
|
-
`;
|
|
83
|
-
const controlPanelStyles = `
|
|
84
|
-
* {
|
|
85
|
-
box-sizing: border-box;
|
|
86
|
-
margin: 0;
|
|
87
|
-
padding: 0;
|
|
88
|
-
}
|
|
89
|
-
.sk-control-panel {
|
|
90
|
-
display: flex;
|
|
91
|
-
flex-direction: column;
|
|
92
|
-
justify-content: space-evenly;
|
|
93
|
-
width: 30rem;
|
|
94
|
-
height: 40rem;
|
|
95
|
-
padding-block: 1rem;
|
|
96
|
-
background-image: linear-gradient(to bottom, var(--sk-primary) 0%, var(--sk-background-variant-1) 25% );
|
|
97
|
-
color: white;
|
|
98
|
-
font-family: Arial, Helvetica, sans-serif;
|
|
99
|
-
border-radius: 1rem;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
}
|
|
102
|
-
.sk-control-panel * {
|
|
103
|
-
transition-property: color, background-color, border-color;
|
|
104
|
-
transition-duration: 300ms;
|
|
105
|
-
transition-timing-function: ease-in-out;
|
|
106
|
-
}
|
|
107
|
-
.sk-section-grid {
|
|
108
|
-
display: grid;
|
|
109
|
-
grid-template-columns: 1fr 1fr;
|
|
110
|
-
grid-template-rows: auto;
|
|
111
|
-
align-items: center;
|
|
112
|
-
padding-inline: 1rem;
|
|
113
|
-
padding-block: .5rem;
|
|
114
|
-
}
|
|
115
|
-
.sk-control-panel-inner {
|
|
116
|
-
display: flex;
|
|
117
|
-
flex-direction: column;
|
|
118
|
-
height: 100%;
|
|
119
|
-
}
|
|
120
|
-
.sk-tabs-nav {
|
|
121
|
-
position: relative;
|
|
122
|
-
display: grid;
|
|
123
|
-
grid-template-columns: 1fr 1fr;
|
|
124
|
-
grid-template-rows: auto;
|
|
125
|
-
align-items: center;
|
|
126
|
-
height: 2.5rem;
|
|
127
|
-
margin-bottom: 3rem;
|
|
128
|
-
}
|
|
129
|
-
.sk-tab-button {
|
|
130
|
-
color: white;
|
|
131
|
-
background: none;
|
|
132
|
-
border: none;
|
|
133
|
-
cursor: pointer;
|
|
134
|
-
font-size: var(--sk-text-xl);
|
|
135
|
-
}
|
|
136
|
-
.sk-tab-line {
|
|
137
|
-
position: absolute;
|
|
138
|
-
left: 50%;
|
|
139
|
-
top: 0;
|
|
140
|
-
height: 100%;
|
|
141
|
-
border-left: 1px solid var(--sk-accent);
|
|
142
|
-
}
|
|
143
|
-
.sk-button-style {
|
|
144
|
-
width: fit-content;
|
|
145
|
-
font-size: var(--sk-text-md);
|
|
146
|
-
color: white;
|
|
147
|
-
background-color: var(--sk-background-variant-2);
|
|
148
|
-
border: 1px solid var(--sk-secondary);
|
|
149
|
-
border-radius: .5rem;
|
|
150
|
-
padding-inline: 1.1rem;
|
|
151
|
-
padding-block: .3rem;
|
|
152
|
-
cursor: pointer;
|
|
153
|
-
}
|
|
154
|
-
.sk-button-style:hover {
|
|
155
|
-
background-color: var(--sk-hover-color);
|
|
156
|
-
}
|
|
157
|
-
.sk-hr-line {
|
|
158
|
-
width: 100%;
|
|
159
|
-
border: 0px solid transparent;
|
|
160
|
-
border-top: 1px solid var(--sk-accent);
|
|
161
|
-
}
|
|
162
|
-
.sk-control-panel-main {
|
|
163
|
-
font-size: var(--sk-text-lg);
|
|
164
|
-
}
|
|
165
|
-
.sk-multi-elements {
|
|
166
|
-
display: grid;
|
|
167
|
-
grid-template-columns: 1fr 1fr;
|
|
168
|
-
grid-template-rows: auto;
|
|
169
|
-
align-items: center;
|
|
170
|
-
padding-inline: 1rem;
|
|
171
|
-
padding-block: 1.5rem;
|
|
172
|
-
gap: 1.1rem;
|
|
173
|
-
}
|
|
174
|
-
.sk-text-input {
|
|
175
|
-
width: 50%;
|
|
176
|
-
justify-self: center;
|
|
177
|
-
background-color: var(--sk-background-variant-2);
|
|
178
|
-
border: 1px solid var(--sk-secondary);
|
|
179
|
-
border-radius: .35rem;
|
|
180
|
-
padding: .25rem;
|
|
181
|
-
color: white;
|
|
182
|
-
text-align: center;
|
|
183
|
-
font-size: var(--sk-text-md);
|
|
184
|
-
}
|
|
185
|
-
.sk-multi-elements-checkbox-container {
|
|
186
|
-
width: fit-content;
|
|
187
|
-
height: fit-content;
|
|
188
|
-
justify-self: center;
|
|
189
|
-
padding: .1rem;
|
|
190
|
-
}
|
|
191
|
-
.sk-multi-elements-checkbox-container input {
|
|
192
|
-
position: absolute;
|
|
193
|
-
opacity: 0;
|
|
194
|
-
cursor: pointer;
|
|
195
|
-
height: 0;
|
|
196
|
-
width: 0;
|
|
197
|
-
}
|
|
198
|
-
.sk-multi-elements-checkbox-container:hover input ~ .sk-multi-elements-checkbox {
|
|
199
|
-
background-color: var(--sk-hover-color);
|
|
200
|
-
}
|
|
201
|
-
.sk-multi-elements-checkbox-container input:checked ~ .sk-multi-elements-checkbox::after {
|
|
202
|
-
position: absolute;
|
|
203
|
-
top: 5%;
|
|
204
|
-
left: 25%;
|
|
205
|
-
content: "✔";
|
|
206
|
-
color: white;
|
|
207
|
-
font-size: var(--sk-text-sm);
|
|
208
|
-
}
|
|
209
|
-
.sk-multi-elements-checkbox {
|
|
210
|
-
position: relative;
|
|
211
|
-
display: inline-block;
|
|
212
|
-
width: 1.5rem;
|
|
213
|
-
height: 1.5rem;
|
|
214
|
-
background-color: var(--sk-background-variant-2);
|
|
215
|
-
border: 1px solid var(--sk-secondary);
|
|
216
|
-
border-radius: .35rem;
|
|
217
|
-
}
|
|
218
|
-
.sk-element-switching {
|
|
219
|
-
gap: 1.1rem;
|
|
220
|
-
}
|
|
221
|
-
#sk-toggle-switching {
|
|
222
|
-
justify-self: center;
|
|
223
|
-
}
|
|
224
|
-
.sk-inspector-toggling-container {
|
|
225
|
-
padding-inline: 1rem;
|
|
226
|
-
padding-block: .5rem;
|
|
227
|
-
}
|
|
228
|
-
.sk-inspector-toggling {
|
|
229
|
-
display: grid;
|
|
230
|
-
grid-template-columns: 1fr 1fr;
|
|
231
|
-
grid-template-rows: auto;
|
|
232
|
-
align-items: center;
|
|
233
|
-
gap: 1.1rem;
|
|
234
|
-
}
|
|
235
|
-
#sk-toggle-inspector {
|
|
236
|
-
justify-self: center;
|
|
237
|
-
}
|
|
238
|
-
.sk-inspector-toggling-hint {
|
|
239
|
-
font-size: var(--sk-text-xs);
|
|
240
|
-
color: var(--sk-text-grey);
|
|
241
|
-
}
|
|
242
|
-
.sk-create-inspector-container {
|
|
243
|
-
gap: 1.1rem;
|
|
244
|
-
}
|
|
245
|
-
#sk-create-inspector {
|
|
246
|
-
justify-self: center;
|
|
247
|
-
}
|
|
248
|
-
.sk-reset-inspector-container {
|
|
249
|
-
gap: 1.1rem;
|
|
250
|
-
}
|
|
251
|
-
#sk-reset-inspector {
|
|
252
|
-
justify-self: center;
|
|
253
|
-
}
|
|
254
|
-
.sk-destroy-inspector-container {
|
|
255
|
-
gap: 1.1rem;
|
|
256
|
-
}
|
|
257
|
-
#sk-destroy-inspector {
|
|
258
|
-
justify-self: center;
|
|
259
|
-
}
|
|
260
|
-
.sk-close {
|
|
261
|
-
display: flex;
|
|
262
|
-
flex: 1 1 0%;
|
|
263
|
-
justify-content: space-between;
|
|
264
|
-
align-items: flex-end;
|
|
265
|
-
padding-inline: 1rem;
|
|
266
|
-
padding-top: 1.25rem;
|
|
267
|
-
}
|
|
268
|
-
.sk-copy {
|
|
269
|
-
color: var(--sk-text-grey);
|
|
270
|
-
}
|
|
271
|
-
.sk-show-panel {
|
|
272
|
-
width: fit-content;
|
|
273
|
-
position: absolute;
|
|
274
|
-
top: 1rem;
|
|
275
|
-
left: 1rem;
|
|
276
|
-
z-index: -1;
|
|
277
|
-
transition-property: color, background-color, border-color;
|
|
278
|
-
transition-duration: 300ms;
|
|
279
|
-
transition-timing-function: ease-in-out;
|
|
280
|
-
}
|
|
281
|
-
.sk-max-history-container {
|
|
282
|
-
gap: 1.1rem;
|
|
283
|
-
}
|
|
284
|
-
.sk-clear-history-container {
|
|
285
|
-
gap: 1.1rem;
|
|
286
|
-
}
|
|
287
|
-
#sk-clear-history {
|
|
288
|
-
justify-self: center;
|
|
289
|
-
}`;
|
|
290
|
-
const controlPanelTransitions = `
|
|
291
|
-
/* Control panel transition styles injected from Shinkom */
|
|
292
|
-
|
|
293
|
-
::part(control-panel) {
|
|
294
|
-
view-transition-name: control-panel;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
@keyframes move-fade-in {
|
|
298
|
-
from {
|
|
299
|
-
opacity: 0;
|
|
300
|
-
transform: translateX(-2rem)
|
|
301
|
-
}
|
|
302
|
-
to {
|
|
303
|
-
opacity: 1;
|
|
304
|
-
transform: translateX(0rem)
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
@keyframes move-fade-out {
|
|
309
|
-
from {
|
|
310
|
-
opacity: 1;
|
|
311
|
-
transform: translateX(0rem);
|
|
312
|
-
}
|
|
313
|
-
to {
|
|
314
|
-
opacity: 0;
|
|
315
|
-
transform: translateX(-2rem);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
::view-transition-old(control-panel) {
|
|
320
|
-
animation: 300ms ease-out both move-fade-out;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
::view-transition-new(control-panel) {
|
|
324
|
-
animation: 300ms ease-out both move-fade-in;
|
|
325
|
-
}
|
|
326
|
-
`;
|
|
327
|
-
//#endregion
|
|
328
|
-
exports.controlPanelCompatViewTab = controlPanelCompatViewTab;
|
|
329
|
-
exports.controlPanelHTML = controlPanelHTML;
|
|
330
|
-
exports.controlPanelInspectorTab = controlPanelInspectorTab;
|
|
331
|
-
exports.controlPanelStyles = controlPanelStyles;
|
|
332
|
-
exports.controlPanelTransitions = controlPanelTransitions;
|
|
1
|
+
//#region src/core/elements/templates/control-panel.templates.js
|
|
2
|
+
const controlPanelHTML = `
|
|
3
|
+
<div style="position: relative">
|
|
4
|
+
<button id="sk-show-panel" class="sk-button-style sk-show-panel">
|
|
5
|
+
<svg style="display: block; pointer-events: none;" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
6
|
+
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
7
|
+
class="lucide lucide-panel-left-open-icon lucide-panel-left-open">
|
|
8
|
+
<rect width="18" height="18" x="3" y="3" rx="2" />
|
|
9
|
+
<path d="M9 3v18" />
|
|
10
|
+
<path d="m14 9 3 3-3 3" />
|
|
11
|
+
</svg>
|
|
12
|
+
</button>
|
|
13
|
+
<div part="control-panel" id="sk-control-panel" class="sk-control-panel" style="display: none;">
|
|
14
|
+
<div class="sk-control-panel-inner">
|
|
15
|
+
<nav class="sk-tabs-nav">
|
|
16
|
+
<button id="sk-inspector-tab" class="sk-tab-button">Inspector</button>
|
|
17
|
+
<div class="sk-tab-line"></div>
|
|
18
|
+
<button id="sk-compat-view-tab" class="sk-tab-button">Compatibility View</button>
|
|
19
|
+
</nav>
|
|
20
|
+
<hr class="sk-hr-line">
|
|
21
|
+
<main id="sk-control-panel-main" class="sk-control-panel-main"></main>
|
|
22
|
+
<hr class="sk-hr-line">
|
|
23
|
+
<footer class="sk-close">
|
|
24
|
+
<button id="sk-close-panel" class="sk-button-style">Close</button>
|
|
25
|
+
<span class="sk-copy">© 2026 Shinkom</span>
|
|
26
|
+
</footer>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
`;
|
|
31
|
+
const controlPanelInspectorTab = `
|
|
32
|
+
<div class="sk-multi-elements">
|
|
33
|
+
<p>Activate multi-element checking</p>
|
|
34
|
+
<label class="sk-multi-elements-checkbox-container">
|
|
35
|
+
<input id="sk-toggle-elements" type="checkbox">
|
|
36
|
+
<span class="sk-multi-elements-checkbox"></span>
|
|
37
|
+
</label>
|
|
38
|
+
<p>Enter a depth level</p>
|
|
39
|
+
<input id="sk-depth-level" class="sk-text-input" type="text" placeholder="depth_level">
|
|
40
|
+
</div>
|
|
41
|
+
<hr class="sk-hr-line">
|
|
42
|
+
<div class="sk-element-switching sk-section-grid">
|
|
43
|
+
<p>Toggle element switching</p>
|
|
44
|
+
<button id="sk-toggle-switching" class="sk-button-style">Disabled</button>
|
|
45
|
+
</div>
|
|
46
|
+
<hr class="sk-hr-line">
|
|
47
|
+
<div class="sk-inspector-toggling-container">
|
|
48
|
+
<div class="sk-inspector-toggling">
|
|
49
|
+
<p>Toggle the inspector</p>
|
|
50
|
+
<button id="sk-toggle-inspector" class="sk-button-style">Enabled</button>
|
|
51
|
+
</div>
|
|
52
|
+
<span class="sk-inspector-toggling-hint">Sets/ removes event listeners for the inspector, setting/
|
|
53
|
+
removing the override of click and
|
|
54
|
+
pointer events on the window object.</span>
|
|
55
|
+
</div>
|
|
56
|
+
<hr class="sk-hr-line">
|
|
57
|
+
<div class="sk-create-inspector-container sk-section-grid">
|
|
58
|
+
<p>Create inspector</p>
|
|
59
|
+
<button id="sk-create-inspector" class="sk-button-style">Create</button>
|
|
60
|
+
</div>
|
|
61
|
+
<hr class="sk-hr-line">
|
|
62
|
+
<div class="sk-reset-inspector-container sk-section-grid">
|
|
63
|
+
<p>Reset inspector</p>
|
|
64
|
+
<button id="sk-reset-inspector" class="sk-button-style">Reset</button>
|
|
65
|
+
</div>
|
|
66
|
+
<hr class="sk-hr-line">
|
|
67
|
+
<div class="sk-destroy-inspector-container sk-section-grid">
|
|
68
|
+
<p>Destroy inspector</p>
|
|
69
|
+
<button id="sk-destroy-inspector" class="sk-button-style">Destroy</button>
|
|
70
|
+
</div>
|
|
71
|
+
`;
|
|
72
|
+
const controlPanelCompatViewTab = `
|
|
73
|
+
<div class="sk-max-history-container sk-section-grid">
|
|
74
|
+
<p>Change maximum number of results stored in history</p>
|
|
75
|
+
<input id="sk-max-history" class="sk-text-input" type="text" placeholder="default is 10">
|
|
76
|
+
</div>
|
|
77
|
+
<hr class="sk-hr-line">
|
|
78
|
+
<div class="sk-clear-history-container sk-section-grid">
|
|
79
|
+
<p>Clear results history in localStorage</p>
|
|
80
|
+
<button id="sk-clear-history" class="sk-button-style">Clear</button>
|
|
81
|
+
</div>
|
|
82
|
+
`;
|
|
83
|
+
const controlPanelStyles = `
|
|
84
|
+
* {
|
|
85
|
+
box-sizing: border-box;
|
|
86
|
+
margin: 0;
|
|
87
|
+
padding: 0;
|
|
88
|
+
}
|
|
89
|
+
.sk-control-panel {
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
justify-content: space-evenly;
|
|
93
|
+
width: 30rem;
|
|
94
|
+
height: 40rem;
|
|
95
|
+
padding-block: 1rem;
|
|
96
|
+
background-image: linear-gradient(to bottom, var(--sk-primary) 0%, var(--sk-background-variant-1) 25% );
|
|
97
|
+
color: white;
|
|
98
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
99
|
+
border-radius: 1rem;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
}
|
|
102
|
+
.sk-control-panel * {
|
|
103
|
+
transition-property: color, background-color, border-color;
|
|
104
|
+
transition-duration: 300ms;
|
|
105
|
+
transition-timing-function: ease-in-out;
|
|
106
|
+
}
|
|
107
|
+
.sk-section-grid {
|
|
108
|
+
display: grid;
|
|
109
|
+
grid-template-columns: 1fr 1fr;
|
|
110
|
+
grid-template-rows: auto;
|
|
111
|
+
align-items: center;
|
|
112
|
+
padding-inline: 1rem;
|
|
113
|
+
padding-block: .5rem;
|
|
114
|
+
}
|
|
115
|
+
.sk-control-panel-inner {
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
height: 100%;
|
|
119
|
+
}
|
|
120
|
+
.sk-tabs-nav {
|
|
121
|
+
position: relative;
|
|
122
|
+
display: grid;
|
|
123
|
+
grid-template-columns: 1fr 1fr;
|
|
124
|
+
grid-template-rows: auto;
|
|
125
|
+
align-items: center;
|
|
126
|
+
height: 2.5rem;
|
|
127
|
+
margin-bottom: 3rem;
|
|
128
|
+
}
|
|
129
|
+
.sk-tab-button {
|
|
130
|
+
color: white;
|
|
131
|
+
background: none;
|
|
132
|
+
border: none;
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
font-size: var(--sk-text-xl);
|
|
135
|
+
}
|
|
136
|
+
.sk-tab-line {
|
|
137
|
+
position: absolute;
|
|
138
|
+
left: 50%;
|
|
139
|
+
top: 0;
|
|
140
|
+
height: 100%;
|
|
141
|
+
border-left: 1px solid var(--sk-accent);
|
|
142
|
+
}
|
|
143
|
+
.sk-button-style {
|
|
144
|
+
width: fit-content;
|
|
145
|
+
font-size: var(--sk-text-md);
|
|
146
|
+
color: white;
|
|
147
|
+
background-color: var(--sk-background-variant-2);
|
|
148
|
+
border: 1px solid var(--sk-secondary);
|
|
149
|
+
border-radius: .5rem;
|
|
150
|
+
padding-inline: 1.1rem;
|
|
151
|
+
padding-block: .3rem;
|
|
152
|
+
cursor: pointer;
|
|
153
|
+
}
|
|
154
|
+
.sk-button-style:hover {
|
|
155
|
+
background-color: var(--sk-hover-color);
|
|
156
|
+
}
|
|
157
|
+
.sk-hr-line {
|
|
158
|
+
width: 100%;
|
|
159
|
+
border: 0px solid transparent;
|
|
160
|
+
border-top: 1px solid var(--sk-accent);
|
|
161
|
+
}
|
|
162
|
+
.sk-control-panel-main {
|
|
163
|
+
font-size: var(--sk-text-lg);
|
|
164
|
+
}
|
|
165
|
+
.sk-multi-elements {
|
|
166
|
+
display: grid;
|
|
167
|
+
grid-template-columns: 1fr 1fr;
|
|
168
|
+
grid-template-rows: auto;
|
|
169
|
+
align-items: center;
|
|
170
|
+
padding-inline: 1rem;
|
|
171
|
+
padding-block: 1.5rem;
|
|
172
|
+
gap: 1.1rem;
|
|
173
|
+
}
|
|
174
|
+
.sk-text-input {
|
|
175
|
+
width: 50%;
|
|
176
|
+
justify-self: center;
|
|
177
|
+
background-color: var(--sk-background-variant-2);
|
|
178
|
+
border: 1px solid var(--sk-secondary);
|
|
179
|
+
border-radius: .35rem;
|
|
180
|
+
padding: .25rem;
|
|
181
|
+
color: white;
|
|
182
|
+
text-align: center;
|
|
183
|
+
font-size: var(--sk-text-md);
|
|
184
|
+
}
|
|
185
|
+
.sk-multi-elements-checkbox-container {
|
|
186
|
+
width: fit-content;
|
|
187
|
+
height: fit-content;
|
|
188
|
+
justify-self: center;
|
|
189
|
+
padding: .1rem;
|
|
190
|
+
}
|
|
191
|
+
.sk-multi-elements-checkbox-container input {
|
|
192
|
+
position: absolute;
|
|
193
|
+
opacity: 0;
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
height: 0;
|
|
196
|
+
width: 0;
|
|
197
|
+
}
|
|
198
|
+
.sk-multi-elements-checkbox-container:hover input ~ .sk-multi-elements-checkbox {
|
|
199
|
+
background-color: var(--sk-hover-color);
|
|
200
|
+
}
|
|
201
|
+
.sk-multi-elements-checkbox-container input:checked ~ .sk-multi-elements-checkbox::after {
|
|
202
|
+
position: absolute;
|
|
203
|
+
top: 5%;
|
|
204
|
+
left: 25%;
|
|
205
|
+
content: "✔";
|
|
206
|
+
color: white;
|
|
207
|
+
font-size: var(--sk-text-sm);
|
|
208
|
+
}
|
|
209
|
+
.sk-multi-elements-checkbox {
|
|
210
|
+
position: relative;
|
|
211
|
+
display: inline-block;
|
|
212
|
+
width: 1.5rem;
|
|
213
|
+
height: 1.5rem;
|
|
214
|
+
background-color: var(--sk-background-variant-2);
|
|
215
|
+
border: 1px solid var(--sk-secondary);
|
|
216
|
+
border-radius: .35rem;
|
|
217
|
+
}
|
|
218
|
+
.sk-element-switching {
|
|
219
|
+
gap: 1.1rem;
|
|
220
|
+
}
|
|
221
|
+
#sk-toggle-switching {
|
|
222
|
+
justify-self: center;
|
|
223
|
+
}
|
|
224
|
+
.sk-inspector-toggling-container {
|
|
225
|
+
padding-inline: 1rem;
|
|
226
|
+
padding-block: .5rem;
|
|
227
|
+
}
|
|
228
|
+
.sk-inspector-toggling {
|
|
229
|
+
display: grid;
|
|
230
|
+
grid-template-columns: 1fr 1fr;
|
|
231
|
+
grid-template-rows: auto;
|
|
232
|
+
align-items: center;
|
|
233
|
+
gap: 1.1rem;
|
|
234
|
+
}
|
|
235
|
+
#sk-toggle-inspector {
|
|
236
|
+
justify-self: center;
|
|
237
|
+
}
|
|
238
|
+
.sk-inspector-toggling-hint {
|
|
239
|
+
font-size: var(--sk-text-xs);
|
|
240
|
+
color: var(--sk-text-grey);
|
|
241
|
+
}
|
|
242
|
+
.sk-create-inspector-container {
|
|
243
|
+
gap: 1.1rem;
|
|
244
|
+
}
|
|
245
|
+
#sk-create-inspector {
|
|
246
|
+
justify-self: center;
|
|
247
|
+
}
|
|
248
|
+
.sk-reset-inspector-container {
|
|
249
|
+
gap: 1.1rem;
|
|
250
|
+
}
|
|
251
|
+
#sk-reset-inspector {
|
|
252
|
+
justify-self: center;
|
|
253
|
+
}
|
|
254
|
+
.sk-destroy-inspector-container {
|
|
255
|
+
gap: 1.1rem;
|
|
256
|
+
}
|
|
257
|
+
#sk-destroy-inspector {
|
|
258
|
+
justify-self: center;
|
|
259
|
+
}
|
|
260
|
+
.sk-close {
|
|
261
|
+
display: flex;
|
|
262
|
+
flex: 1 1 0%;
|
|
263
|
+
justify-content: space-between;
|
|
264
|
+
align-items: flex-end;
|
|
265
|
+
padding-inline: 1rem;
|
|
266
|
+
padding-top: 1.25rem;
|
|
267
|
+
}
|
|
268
|
+
.sk-copy {
|
|
269
|
+
color: var(--sk-text-grey);
|
|
270
|
+
}
|
|
271
|
+
.sk-show-panel {
|
|
272
|
+
width: fit-content;
|
|
273
|
+
position: absolute;
|
|
274
|
+
top: 1rem;
|
|
275
|
+
left: 1rem;
|
|
276
|
+
z-index: -1;
|
|
277
|
+
transition-property: color, background-color, border-color;
|
|
278
|
+
transition-duration: 300ms;
|
|
279
|
+
transition-timing-function: ease-in-out;
|
|
280
|
+
}
|
|
281
|
+
.sk-max-history-container {
|
|
282
|
+
gap: 1.1rem;
|
|
283
|
+
}
|
|
284
|
+
.sk-clear-history-container {
|
|
285
|
+
gap: 1.1rem;
|
|
286
|
+
}
|
|
287
|
+
#sk-clear-history {
|
|
288
|
+
justify-self: center;
|
|
289
|
+
}`;
|
|
290
|
+
const controlPanelTransitions = `
|
|
291
|
+
/* Control panel transition styles injected from Shinkom */
|
|
292
|
+
|
|
293
|
+
::part(control-panel) {
|
|
294
|
+
view-transition-name: control-panel;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
@keyframes move-fade-in {
|
|
298
|
+
from {
|
|
299
|
+
opacity: 0;
|
|
300
|
+
transform: translateX(-2rem)
|
|
301
|
+
}
|
|
302
|
+
to {
|
|
303
|
+
opacity: 1;
|
|
304
|
+
transform: translateX(0rem)
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
@keyframes move-fade-out {
|
|
309
|
+
from {
|
|
310
|
+
opacity: 1;
|
|
311
|
+
transform: translateX(0rem);
|
|
312
|
+
}
|
|
313
|
+
to {
|
|
314
|
+
opacity: 0;
|
|
315
|
+
transform: translateX(-2rem);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
::view-transition-old(control-panel) {
|
|
320
|
+
animation: 300ms ease-out both move-fade-out;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
::view-transition-new(control-panel) {
|
|
324
|
+
animation: 300ms ease-out both move-fade-in;
|
|
325
|
+
}
|
|
326
|
+
`;
|
|
327
|
+
//#endregion
|
|
328
|
+
exports.controlPanelCompatViewTab = controlPanelCompatViewTab;
|
|
329
|
+
exports.controlPanelHTML = controlPanelHTML;
|
|
330
|
+
exports.controlPanelInspectorTab = controlPanelInspectorTab;
|
|
331
|
+
exports.controlPanelStyles = controlPanelStyles;
|
|
332
|
+
exports.controlPanelTransitions = controlPanelTransitions;
|