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,45 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shinkom - elements
|
|
3
|
-
* @version 1.1.
|
|
4
|
-
* @license MIT
|
|
5
|
-
* @copyright 2026 - OneilNvM
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
//#region src/core/elements/control-panel-element.d.ts
|
|
9
|
-
/**
|
|
10
|
-
* A custom element for the `CompatControlPanel` UI component.
|
|
11
|
-
*
|
|
12
|
-
* An autonomous custom element created via the [Web Components API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
|
|
13
|
-
* This component contains methods for rendering components for the `CompatControlPanel` and providing settings for customization of different
|
|
14
|
-
* UI components.
|
|
15
|
-
*
|
|
16
|
-
* Since this element is defined via the Web Components API, to use this element outside of the `CompatControlPanel`, it must be registered
|
|
17
|
-
* as a custom element on the `window` object.
|
|
18
|
-
* @extends {BaseElement}
|
|
19
|
-
*/
|
|
20
|
-
declare class CompatControlPanelElement extends HTMLElement {
|
|
21
|
-
/**@type {ShadowRoot} */
|
|
22
|
-
shadowRootRef: ShadowRoot;
|
|
23
|
-
shadowHost: HTMLDivElement;
|
|
24
|
-
connectedCallback(): void;
|
|
25
|
-
disconnectedCallback(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Renders the `ControlPanelElement` on a specific tab.
|
|
28
|
-
*
|
|
29
|
-
* Renders the `inspector` tab by default.
|
|
30
|
-
* @param {"inspector" | "compatView" | undefined} tab
|
|
31
|
-
*/
|
|
32
|
-
render(tab?: "inspector" | "compatView" | undefined): void;
|
|
33
|
-
/**
|
|
34
|
-
* Renders content for a specific tab.
|
|
35
|
-
* @param {"inspector" | "compatView"} tab
|
|
36
|
-
*/
|
|
37
|
-
renderTabContent(tab: "inspector" | "compatView"): void;
|
|
38
|
-
/**
|
|
39
|
-
* Renders the display of the `ControlPanelElement`.
|
|
40
|
-
* @param {"show" | "hide"} display
|
|
41
|
-
*/
|
|
42
|
-
renderDisplayTransition(display: "show" | "hide"): void;
|
|
43
|
-
}
|
|
44
|
-
//#endregion
|
|
1
|
+
/**
|
|
2
|
+
* Shinkom - elements
|
|
3
|
+
* @version 1.1.2
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2026 - OneilNvM
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
//#region src/core/elements/control-panel-element.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* A custom element for the `CompatControlPanel` UI component.
|
|
11
|
+
*
|
|
12
|
+
* An autonomous custom element created via the [Web Components API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
|
|
13
|
+
* This component contains methods for rendering components for the `CompatControlPanel` and providing settings for customization of different
|
|
14
|
+
* UI components.
|
|
15
|
+
*
|
|
16
|
+
* Since this element is defined via the Web Components API, to use this element outside of the `CompatControlPanel`, it must be registered
|
|
17
|
+
* as a custom element on the `window` object.
|
|
18
|
+
* @extends {BaseElement}
|
|
19
|
+
*/
|
|
20
|
+
declare class CompatControlPanelElement extends HTMLElement {
|
|
21
|
+
/**@type {ShadowRoot} */
|
|
22
|
+
shadowRootRef: ShadowRoot;
|
|
23
|
+
shadowHost: HTMLDivElement;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
disconnectedCallback(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Renders the `ControlPanelElement` on a specific tab.
|
|
28
|
+
*
|
|
29
|
+
* Renders the `inspector` tab by default.
|
|
30
|
+
* @param {"inspector" | "compatView" | undefined} tab
|
|
31
|
+
*/
|
|
32
|
+
render(tab?: "inspector" | "compatView" | undefined): void;
|
|
33
|
+
/**
|
|
34
|
+
* Renders content for a specific tab.
|
|
35
|
+
* @param {"inspector" | "compatView"} tab
|
|
36
|
+
*/
|
|
37
|
+
renderTabContent(tab: "inspector" | "compatView"): void;
|
|
38
|
+
/**
|
|
39
|
+
* Renders the display of the `ControlPanelElement`.
|
|
40
|
+
* @param {"show" | "hide"} display
|
|
41
|
+
*/
|
|
42
|
+
renderDisplayTransition(display: "show" | "hide"): void;
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
45
|
export { CompatControlPanelElement };
|
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shinkom - elements
|
|
3
|
-
* @version 1.1.
|
|
4
|
-
* @license MIT
|
|
5
|
-
* @copyright 2026 - OneilNvM
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { getStyleSheet } from "../helpers.js";
|
|
9
|
-
import { hostStyles } from "./templates/root-styles.template.js";
|
|
10
|
-
import { controlPanelCompatViewTab, controlPanelHTML, controlPanelInspectorTab, controlPanelStyles, controlPanelTransitions } from "./templates/control-panel.templates.js";
|
|
11
|
-
//#region src/core/elements/control-panel-element.js
|
|
12
|
-
/**
|
|
13
|
-
* @type {typeof HTMLElement}
|
|
14
|
-
*/
|
|
15
|
-
const BaseElement = typeof window !== "undefined" ? HTMLElement : class {};
|
|
16
|
-
/**@type {CSSStyleSheet | null} */
|
|
17
|
-
let cachedHostStyleSheet = null;
|
|
18
|
-
/**@type {CSSStyleSheet | null} */
|
|
19
|
-
let cachedStyleSheet = null;
|
|
20
|
-
/**@type {CSSStyleSheet | null} */
|
|
21
|
-
let cachedTransitions = null;
|
|
22
|
-
/**
|
|
23
|
-
* A custom element for the `CompatControlPanel` UI component.
|
|
24
|
-
*
|
|
25
|
-
* An autonomous custom element created via the [Web Components API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
|
|
26
|
-
* This component contains methods for rendering components for the `CompatControlPanel` and providing settings for customization of different
|
|
27
|
-
* UI components.
|
|
28
|
-
*
|
|
29
|
-
* Since this element is defined via the Web Components API, to use this element outside of the `CompatControlPanel`, it must be registered
|
|
30
|
-
* as a custom element on the `window` object.
|
|
31
|
-
* @extends {BaseElement}
|
|
32
|
-
*/
|
|
33
|
-
var CompatControlPanelElement = class extends BaseElement {
|
|
34
|
-
constructor() {
|
|
35
|
-
super();
|
|
36
|
-
/**@type {ShadowRoot} */
|
|
37
|
-
this.shadowRootRef = this.attachShadow({ mode: "open" });
|
|
38
|
-
this.shadowHost = document.createElement("div");
|
|
39
|
-
this.shadowHost.id = "sk-shadow-host";
|
|
40
|
-
cachedHostStyleSheet = getStyleSheet(cachedHostStyleSheet, hostStyles);
|
|
41
|
-
cachedStyleSheet = getStyleSheet(cachedStyleSheet, controlPanelStyles);
|
|
42
|
-
cachedTransitions = getStyleSheet(cachedTransitions, controlPanelTransitions);
|
|
43
|
-
}
|
|
44
|
-
connectedCallback() {
|
|
45
|
-
Object.assign(this.shadowHost.style, {
|
|
46
|
-
position: "fixed",
|
|
47
|
-
top: "2rem",
|
|
48
|
-
left: "2rem",
|
|
49
|
-
zIndex: "992"
|
|
50
|
-
});
|
|
51
|
-
if (cachedTransitions) document.adoptedStyleSheets.push(cachedTransitions);
|
|
52
|
-
if (cachedHostStyleSheet) this.shadowRootRef.adoptedStyleSheets = [cachedHostStyleSheet];
|
|
53
|
-
if (cachedStyleSheet) this.shadowRootRef.adoptedStyleSheets.push(cachedStyleSheet);
|
|
54
|
-
this.shadowRootRef.appendChild(this.shadowHost);
|
|
55
|
-
this.render();
|
|
56
|
-
}
|
|
57
|
-
disconnectedCallback() {
|
|
58
|
-
document.adoptedStyleSheets = document.adoptedStyleSheets.filter((sheet) => sheet !== cachedTransitions);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Renders the `ControlPanelElement` on a specific tab.
|
|
62
|
-
*
|
|
63
|
-
* Renders the `inspector` tab by default.
|
|
64
|
-
* @param {"inspector" | "compatView" | undefined} tab
|
|
65
|
-
*/
|
|
66
|
-
render(tab = void 0) {
|
|
67
|
-
this.shadowHost.innerHTML = controlPanelHTML;
|
|
68
|
-
tab ? this.renderTabContent(tab) : this.renderTabContent("inspector");
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Renders content for a specific tab.
|
|
72
|
-
* @param {"inspector" | "compatView"} tab
|
|
73
|
-
*/
|
|
74
|
-
renderTabContent(tab) {
|
|
75
|
-
const main = this.shadowRootRef.getElementById("sk-control-panel-main");
|
|
76
|
-
switch (tab) {
|
|
77
|
-
case "inspector":
|
|
78
|
-
if (main) main.innerHTML = controlPanelInspectorTab;
|
|
79
|
-
break;
|
|
80
|
-
case "compatView":
|
|
81
|
-
if (main) main.innerHTML = controlPanelCompatViewTab;
|
|
82
|
-
break;
|
|
83
|
-
default: break;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Renders the display of the `ControlPanelElement`.
|
|
88
|
-
* @param {"show" | "hide"} display
|
|
89
|
-
*/
|
|
90
|
-
renderDisplayTransition(display) {
|
|
91
|
-
const panel = this.shadowRootRef.getElementById("sk-control-panel");
|
|
92
|
-
if (panel) {
|
|
93
|
-
if (display === "show") panel.style.display = "flex";
|
|
94
|
-
else if (display === "hide") panel.style.display = "none";
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
//#endregion
|
|
99
|
-
export { CompatControlPanelElement };
|
|
1
|
+
/**
|
|
2
|
+
* Shinkom - elements
|
|
3
|
+
* @version 1.1.2
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2026 - OneilNvM
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { getStyleSheet } from "../helpers.js";
|
|
9
|
+
import { hostStyles } from "./templates/root-styles.template.js";
|
|
10
|
+
import { controlPanelCompatViewTab, controlPanelHTML, controlPanelInspectorTab, controlPanelStyles, controlPanelTransitions } from "./templates/control-panel.templates.js";
|
|
11
|
+
//#region src/core/elements/control-panel-element.js
|
|
12
|
+
/**
|
|
13
|
+
* @type {typeof HTMLElement}
|
|
14
|
+
*/
|
|
15
|
+
const BaseElement = typeof window !== "undefined" ? HTMLElement : class {};
|
|
16
|
+
/**@type {CSSStyleSheet | null} */
|
|
17
|
+
let cachedHostStyleSheet = null;
|
|
18
|
+
/**@type {CSSStyleSheet | null} */
|
|
19
|
+
let cachedStyleSheet = null;
|
|
20
|
+
/**@type {CSSStyleSheet | null} */
|
|
21
|
+
let cachedTransitions = null;
|
|
22
|
+
/**
|
|
23
|
+
* A custom element for the `CompatControlPanel` UI component.
|
|
24
|
+
*
|
|
25
|
+
* An autonomous custom element created via the [Web Components API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
|
|
26
|
+
* This component contains methods for rendering components for the `CompatControlPanel` and providing settings for customization of different
|
|
27
|
+
* UI components.
|
|
28
|
+
*
|
|
29
|
+
* Since this element is defined via the Web Components API, to use this element outside of the `CompatControlPanel`, it must be registered
|
|
30
|
+
* as a custom element on the `window` object.
|
|
31
|
+
* @extends {BaseElement}
|
|
32
|
+
*/
|
|
33
|
+
var CompatControlPanelElement = class extends BaseElement {
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
/**@type {ShadowRoot} */
|
|
37
|
+
this.shadowRootRef = this.attachShadow({ mode: "open" });
|
|
38
|
+
this.shadowHost = document.createElement("div");
|
|
39
|
+
this.shadowHost.id = "sk-shadow-host";
|
|
40
|
+
cachedHostStyleSheet = getStyleSheet(cachedHostStyleSheet, hostStyles);
|
|
41
|
+
cachedStyleSheet = getStyleSheet(cachedStyleSheet, controlPanelStyles);
|
|
42
|
+
cachedTransitions = getStyleSheet(cachedTransitions, controlPanelTransitions);
|
|
43
|
+
}
|
|
44
|
+
connectedCallback() {
|
|
45
|
+
Object.assign(this.shadowHost.style, {
|
|
46
|
+
position: "fixed",
|
|
47
|
+
top: "2rem",
|
|
48
|
+
left: "2rem",
|
|
49
|
+
zIndex: "992"
|
|
50
|
+
});
|
|
51
|
+
if (cachedTransitions) document.adoptedStyleSheets.push(cachedTransitions);
|
|
52
|
+
if (cachedHostStyleSheet) this.shadowRootRef.adoptedStyleSheets = [cachedHostStyleSheet];
|
|
53
|
+
if (cachedStyleSheet) this.shadowRootRef.adoptedStyleSheets.push(cachedStyleSheet);
|
|
54
|
+
this.shadowRootRef.appendChild(this.shadowHost);
|
|
55
|
+
this.render();
|
|
56
|
+
}
|
|
57
|
+
disconnectedCallback() {
|
|
58
|
+
document.adoptedStyleSheets = document.adoptedStyleSheets.filter((sheet) => sheet !== cachedTransitions);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Renders the `ControlPanelElement` on a specific tab.
|
|
62
|
+
*
|
|
63
|
+
* Renders the `inspector` tab by default.
|
|
64
|
+
* @param {"inspector" | "compatView" | undefined} tab
|
|
65
|
+
*/
|
|
66
|
+
render(tab = void 0) {
|
|
67
|
+
this.shadowHost.innerHTML = controlPanelHTML;
|
|
68
|
+
tab ? this.renderTabContent(tab) : this.renderTabContent("inspector");
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Renders content for a specific tab.
|
|
72
|
+
* @param {"inspector" | "compatView"} tab
|
|
73
|
+
*/
|
|
74
|
+
renderTabContent(tab) {
|
|
75
|
+
const main = this.shadowRootRef.getElementById("sk-control-panel-main");
|
|
76
|
+
switch (tab) {
|
|
77
|
+
case "inspector":
|
|
78
|
+
if (main) main.innerHTML = controlPanelInspectorTab;
|
|
79
|
+
break;
|
|
80
|
+
case "compatView":
|
|
81
|
+
if (main) main.innerHTML = controlPanelCompatViewTab;
|
|
82
|
+
break;
|
|
83
|
+
default: break;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Renders the display of the `ControlPanelElement`.
|
|
88
|
+
* @param {"show" | "hide"} display
|
|
89
|
+
*/
|
|
90
|
+
renderDisplayTransition(display) {
|
|
91
|
+
const panel = this.shadowRootRef.getElementById("sk-control-panel");
|
|
92
|
+
if (panel) {
|
|
93
|
+
if (display === "show") panel.style.display = "flex";
|
|
94
|
+
else if (display === "hide") panel.style.display = "none";
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
//#endregion
|
|
99
|
+
export { CompatControlPanelElement };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shinkom - elements
|
|
3
|
-
* @version 1.1.
|
|
4
|
-
* @license MIT
|
|
5
|
-
* @copyright 2026 - OneilNvM
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { RecentResultItem } from "./recent-result-item.js";
|
|
9
|
-
import { ResultsHistoryItem } from "./results-history-item.js";
|
|
10
|
-
import { CompatViewElement } from "./compat-view-element.js";
|
|
11
|
-
import { CompatControlPanelElement } from "./control-panel-element.js";
|
|
12
|
-
import { CompatInspectorElement } from "./inspector-element.js";
|
|
1
|
+
/**
|
|
2
|
+
* Shinkom - elements
|
|
3
|
+
* @version 1.1.2
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2026 - OneilNvM
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { RecentResultItem } from "./recent-result-item.js";
|
|
9
|
+
import { ResultsHistoryItem } from "./results-history-item.js";
|
|
10
|
+
import { CompatViewElement } from "./compat-view-element.js";
|
|
11
|
+
import { CompatControlPanelElement } from "./control-panel-element.js";
|
|
12
|
+
import { CompatInspectorElement } from "./inspector-element.js";
|
|
13
13
|
export { CompatControlPanelElement, CompatInspectorElement, CompatViewElement, RecentResultItem, ResultsHistoryItem };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shinkom - elements
|
|
3
|
-
* @version 1.1.
|
|
4
|
-
* @license MIT
|
|
5
|
-
* @copyright 2026 - OneilNvM
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { RecentResultItem } from "./recent-result-item.js";
|
|
9
|
-
import { ResultsHistoryItem } from "./results-history-item.js";
|
|
10
|
-
import { CompatViewElement } from "./compat-view-element.js";
|
|
11
|
-
import { CompatControlPanelElement } from "./control-panel-element.js";
|
|
12
|
-
import { CompatInspectorElement } from "./inspector-element.js";
|
|
13
|
-
export { CompatControlPanelElement, CompatInspectorElement, CompatViewElement, RecentResultItem, ResultsHistoryItem };
|
|
1
|
+
/**
|
|
2
|
+
* Shinkom - elements
|
|
3
|
+
* @version 1.1.2
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2026 - OneilNvM
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { RecentResultItem } from "./recent-result-item.js";
|
|
9
|
+
import { ResultsHistoryItem } from "./results-history-item.js";
|
|
10
|
+
import { CompatViewElement } from "./compat-view-element.js";
|
|
11
|
+
import { CompatControlPanelElement } from "./control-panel-element.js";
|
|
12
|
+
import { CompatInspectorElement } from "./inspector-element.js";
|
|
13
|
+
export { CompatControlPanelElement, CompatInspectorElement, CompatViewElement, RecentResultItem, ResultsHistoryItem };
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shinkom - elements
|
|
3
|
-
* @version 1.1.
|
|
4
|
-
* @license MIT
|
|
5
|
-
* @copyright 2026 - OneilNvM
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
//#region src/core/elements/inspector-element.d.ts
|
|
9
|
-
/**
|
|
10
|
-
* A custom element for the `CompatInspector` UI component.
|
|
11
|
-
*
|
|
12
|
-
* An autonomous custom element created via the [Web Components API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
|
|
13
|
-
* This component is used for defining and initializing the styling and structure of the `CompatInspector`.
|
|
14
|
-
*
|
|
15
|
-
* Since this element is defined via the Web Components API, to use this element outside of the `CompatInspector`, it must be registered
|
|
16
|
-
* as a custom element on the `window` object.
|
|
17
|
-
* @extends {BaseElement}
|
|
18
|
-
*/
|
|
19
|
-
declare class CompatInspectorElement extends HTMLElement {
|
|
20
|
-
/**@type {ShadowRoot} */
|
|
21
|
-
shadowRootRef: ShadowRoot;
|
|
22
|
-
shadowHost: HTMLDivElement;
|
|
23
|
-
styles: HTMLStyleElement;
|
|
24
|
-
connectedCallback(): void;
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
1
|
+
/**
|
|
2
|
+
* Shinkom - elements
|
|
3
|
+
* @version 1.1.2
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2026 - OneilNvM
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
//#region src/core/elements/inspector-element.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* A custom element for the `CompatInspector` UI component.
|
|
11
|
+
*
|
|
12
|
+
* An autonomous custom element created via the [Web Components API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
|
|
13
|
+
* This component is used for defining and initializing the styling and structure of the `CompatInspector`.
|
|
14
|
+
*
|
|
15
|
+
* Since this element is defined via the Web Components API, to use this element outside of the `CompatInspector`, it must be registered
|
|
16
|
+
* as a custom element on the `window` object.
|
|
17
|
+
* @extends {BaseElement}
|
|
18
|
+
*/
|
|
19
|
+
declare class CompatInspectorElement extends HTMLElement {
|
|
20
|
+
/**@type {ShadowRoot} */
|
|
21
|
+
shadowRootRef: ShadowRoot;
|
|
22
|
+
shadowHost: HTMLDivElement;
|
|
23
|
+
styles: HTMLStyleElement;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
27
|
export { CompatInspectorElement };
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shinkom - elements
|
|
3
|
-
* @version 1.1.
|
|
4
|
-
* @license MIT
|
|
5
|
-
* @copyright 2026 - OneilNvM
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
//#region src/core/elements/inspector-element.js
|
|
9
|
-
/**
|
|
10
|
-
* @type {typeof HTMLElement}
|
|
11
|
-
*/
|
|
12
|
-
const BaseElement = typeof window !== "undefined" ? HTMLElement : class {};
|
|
13
|
-
/**
|
|
14
|
-
* A custom element for the `CompatInspector` UI component.
|
|
15
|
-
*
|
|
16
|
-
* An autonomous custom element created via the [Web Components API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
|
|
17
|
-
* This component is used for defining and initializing the styling and structure of the `CompatInspector`.
|
|
18
|
-
*
|
|
19
|
-
* Since this element is defined via the Web Components API, to use this element outside of the `CompatInspector`, it must be registered
|
|
20
|
-
* as a custom element on the `window` object.
|
|
21
|
-
* @extends {BaseElement}
|
|
22
|
-
*/
|
|
23
|
-
var CompatInspectorElement = class extends BaseElement {
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
/**@type {ShadowRoot} */
|
|
27
|
-
this.shadowRootRef = this.attachShadow({ mode: "open" });
|
|
28
|
-
this.shadowHost = document.createElement("div");
|
|
29
|
-
this.styles = document.createElement("style");
|
|
30
|
-
this.shadowHost.id = "sk-compat-inspector";
|
|
31
|
-
}
|
|
32
|
-
connectedCallback() {
|
|
33
|
-
this.styles.textContent = `
|
|
34
|
-
#sk-compat-inspector {
|
|
35
|
-
position: absolute;
|
|
36
|
-
top: 0;
|
|
37
|
-
background-color: rgba(0, 255, 0, .3);
|
|
38
|
-
outline-width: 1px;
|
|
39
|
-
outline-style: dashed;
|
|
40
|
-
outline-color: rgb(0, 255, 0);
|
|
41
|
-
outline-offset: 4px;
|
|
42
|
-
z-index: 990;
|
|
43
|
-
transition-property: width, height, transform;
|
|
44
|
-
transition-duration: 300ms;
|
|
45
|
-
transition-timing-function: ease-out;
|
|
46
|
-
will-change: width, height, transform;
|
|
47
|
-
pointer-events: none;
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
try {
|
|
51
|
-
this.shadowRootRef.replaceChildren(...[this.styles, this.shadowHost]);
|
|
52
|
-
} catch (error) {
|
|
53
|
-
console.error(error);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
//#endregion
|
|
58
|
-
export { CompatInspectorElement };
|
|
1
|
+
/**
|
|
2
|
+
* Shinkom - elements
|
|
3
|
+
* @version 1.1.2
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2026 - OneilNvM
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
//#region src/core/elements/inspector-element.js
|
|
9
|
+
/**
|
|
10
|
+
* @type {typeof HTMLElement}
|
|
11
|
+
*/
|
|
12
|
+
const BaseElement = typeof window !== "undefined" ? HTMLElement : class {};
|
|
13
|
+
/**
|
|
14
|
+
* A custom element for the `CompatInspector` UI component.
|
|
15
|
+
*
|
|
16
|
+
* An autonomous custom element created via the [Web Components API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
|
|
17
|
+
* This component is used for defining and initializing the styling and structure of the `CompatInspector`.
|
|
18
|
+
*
|
|
19
|
+
* Since this element is defined via the Web Components API, to use this element outside of the `CompatInspector`, it must be registered
|
|
20
|
+
* as a custom element on the `window` object.
|
|
21
|
+
* @extends {BaseElement}
|
|
22
|
+
*/
|
|
23
|
+
var CompatInspectorElement = class extends BaseElement {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
/**@type {ShadowRoot} */
|
|
27
|
+
this.shadowRootRef = this.attachShadow({ mode: "open" });
|
|
28
|
+
this.shadowHost = document.createElement("div");
|
|
29
|
+
this.styles = document.createElement("style");
|
|
30
|
+
this.shadowHost.id = "sk-compat-inspector";
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
this.styles.textContent = `
|
|
34
|
+
#sk-compat-inspector {
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 0;
|
|
37
|
+
background-color: rgba(0, 255, 0, .3);
|
|
38
|
+
outline-width: 1px;
|
|
39
|
+
outline-style: dashed;
|
|
40
|
+
outline-color: rgb(0, 255, 0);
|
|
41
|
+
outline-offset: 4px;
|
|
42
|
+
z-index: 990;
|
|
43
|
+
transition-property: width, height, transform;
|
|
44
|
+
transition-duration: 300ms;
|
|
45
|
+
transition-timing-function: ease-out;
|
|
46
|
+
will-change: width, height, transform;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
try {
|
|
51
|
+
this.shadowRootRef.replaceChildren(...[this.styles, this.shadowHost]);
|
|
52
|
+
} catch (error) {
|
|
53
|
+
console.error(error);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { CompatInspectorElement };
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shinkom - core\elements\recent-result-item
|
|
3
|
-
* @version 1.1.
|
|
4
|
-
* @license MIT
|
|
5
|
-
* @copyright 2026 - OneilNvM
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
//#region src/core/elements/recent-result-item.js
|
|
9
|
-
/**@typedef {import('../../types/public').CompatSnapshot} CompatSnapshot */
|
|
10
|
-
/**
|
|
11
|
-
* @type {typeof HTMLElement}
|
|
12
|
-
*/
|
|
13
|
-
const BaseElement = typeof window !== "undefined" ? HTMLElement : class {};
|
|
14
|
-
/**
|
|
15
|
-
* A custom element for rendering a recent compatibility result item.
|
|
16
|
-
*
|
|
17
|
-
* An autonomous custom element created via the [Web Components API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
|
|
18
|
-
* This component is used for creating unique items that store their assigned compatibility result for future viewing.
|
|
19
|
-
*
|
|
20
|
-
* Since this element is defined via the Web Components API it must be registered
|
|
21
|
-
* as a custom element on the `window` object.
|
|
22
|
-
* @extends {BaseElement}
|
|
23
|
-
*/
|
|
24
|
-
var RecentResultItem = class extends BaseElement {
|
|
25
|
-
constructor() {
|
|
26
|
-
super();
|
|
27
|
-
/**@type {CompatSnapshot | null} */
|
|
28
|
-
this._result = null;
|
|
29
|
-
/** @type {function(CompatSnapshot): void} */
|
|
30
|
-
this.viewResult = () => {};
|
|
31
|
-
}
|
|
32
|
-
get result() {
|
|
33
|
-
return this._result;
|
|
34
|
-
}
|
|
35
|
-
set result(val) {
|
|
36
|
-
if (val) this._result = val;
|
|
37
|
-
}
|
|
38
|
-
connectedCallback() {
|
|
39
|
-
const detailsButton = this.querySelector(".sk-view-result");
|
|
40
|
-
if (detailsButton instanceof HTMLButtonElement) detailsButton.addEventListener("click", () => {
|
|
41
|
-
if (this.result) this.viewResult(this.result);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
//#endregion
|
|
46
|
-
export { RecentResultItem };
|
|
1
|
+
/**
|
|
2
|
+
* Shinkom - core\elements\recent-result-item
|
|
3
|
+
* @version 1.1.2
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright 2026 - OneilNvM
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
//#region src/core/elements/recent-result-item.js
|
|
9
|
+
/**@typedef {import('../../types/public').CompatSnapshot} CompatSnapshot */
|
|
10
|
+
/**
|
|
11
|
+
* @type {typeof HTMLElement}
|
|
12
|
+
*/
|
|
13
|
+
const BaseElement = typeof window !== "undefined" ? HTMLElement : class {};
|
|
14
|
+
/**
|
|
15
|
+
* A custom element for rendering a recent compatibility result item.
|
|
16
|
+
*
|
|
17
|
+
* An autonomous custom element created via the [Web Components API](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
|
|
18
|
+
* This component is used for creating unique items that store their assigned compatibility result for future viewing.
|
|
19
|
+
*
|
|
20
|
+
* Since this element is defined via the Web Components API it must be registered
|
|
21
|
+
* as a custom element on the `window` object.
|
|
22
|
+
* @extends {BaseElement}
|
|
23
|
+
*/
|
|
24
|
+
var RecentResultItem = class extends BaseElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
/**@type {CompatSnapshot | null} */
|
|
28
|
+
this._result = null;
|
|
29
|
+
/** @type {function(CompatSnapshot): void} */
|
|
30
|
+
this.viewResult = () => {};
|
|
31
|
+
}
|
|
32
|
+
get result() {
|
|
33
|
+
return this._result;
|
|
34
|
+
}
|
|
35
|
+
set result(val) {
|
|
36
|
+
if (val) this._result = val;
|
|
37
|
+
}
|
|
38
|
+
connectedCallback() {
|
|
39
|
+
const detailsButton = this.querySelector(".sk-view-result");
|
|
40
|
+
if (detailsButton instanceof HTMLButtonElement) detailsButton.addEventListener("click", () => {
|
|
41
|
+
if (this.result) this.viewResult(this.result);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { RecentResultItem };
|