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