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