shinkom 1.0.2 → 1.1.0

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.
Files changed (91) hide show
  1. package/README.md +3 -2
  2. package/dist/bundles/_virtual/_rolldown/runtime.js +1 -1
  3. package/dist/bundles/core/constants.d.ts +1 -1
  4. package/dist/bundles/core/constants.js +5 -2
  5. package/dist/bundles/core/elements/compat-view-element.d.ts +100 -0
  6. package/dist/bundles/core/elements/compat-view-element.js +440 -0
  7. package/dist/bundles/core/elements/control-panel-element.d.ts +45 -0
  8. package/dist/bundles/core/elements/control-panel-element.js +99 -0
  9. package/dist/bundles/core/elements/index.d.ts +13 -0
  10. package/dist/bundles/core/elements/index.js +13 -0
  11. package/dist/bundles/core/elements/inspector-element.d.ts +27 -0
  12. package/dist/bundles/core/elements/inspector-element.js +58 -0
  13. package/dist/bundles/core/elements/recent-result-item.js +46 -0
  14. package/dist/bundles/core/elements/results-history-item.js +46 -0
  15. package/dist/bundles/core/elements/templates/compat-view.templates.js +462 -0
  16. package/dist/bundles/core/elements/templates/control-panel.templates.js +335 -0
  17. package/dist/bundles/core/elements/templates/root-styles.template.js +40 -0
  18. package/dist/bundles/core/event-bus.d.ts +19 -5
  19. package/dist/bundles/core/event-bus.js +21 -8
  20. package/dist/bundles/core/helpers.js +24 -2
  21. package/dist/bundles/core/index.d.ts +5 -2
  22. package/dist/bundles/core/index.js +6 -2
  23. package/dist/bundles/core/state-service.d.ts +24 -4
  24. package/dist/bundles/core/state-service.js +25 -5
  25. package/dist/bundles/core/ui-component.d.ts +25 -6
  26. package/dist/bundles/core/ui-component.js +31 -12
  27. package/dist/bundles/engine/engine.d.ts +57 -9
  28. package/dist/bundles/engine/engine.js +115 -31
  29. package/dist/bundles/engine/index.js +1 -1
  30. package/dist/bundles/gen/browser-data.js +36 -36
  31. package/dist/bundles/gen/browser-usage-data.js +224 -222
  32. package/dist/bundles/gen/compat-data.js +1 -1
  33. package/dist/bundles/gen/index.js +1 -1
  34. package/dist/bundles/index.d.ts +6 -2
  35. package/dist/bundles/index.js +8 -2
  36. package/dist/bundles/pkg/shinkore.d.ts +1 -1
  37. package/dist/bundles/pkg/shinkore.js +1 -1
  38. package/dist/bundles/pkg/shinkore_bg.wasm +0 -0
  39. package/dist/bundles/shinkom.d.ts +9 -1
  40. package/dist/bundles/shinkom.js +31 -6
  41. package/dist/bundles/types/public.d.ts +13 -29
  42. package/dist/bundles/types/types.d.ts +99 -0
  43. package/dist/bundles/ui/compat-ui/compat-ui.d.ts +12 -2
  44. package/dist/bundles/ui/compat-ui/compat-ui.js +12 -2
  45. package/dist/bundles/ui/compat-ui/index.js +8 -0
  46. package/dist/bundles/ui/compatibility-view/compatibility-view.d.ts +42 -0
  47. package/dist/bundles/ui/compatibility-view/compatibility-view.js +229 -0
  48. package/dist/bundles/ui/compatibility-view/index.js +8 -0
  49. package/dist/bundles/ui/control-panel/control-panel.d.ts +30 -16
  50. package/dist/bundles/ui/control-panel/control-panel.js +188 -277
  51. package/dist/bundles/ui/control-panel/index.js +8 -0
  52. package/dist/bundles/ui/index.d.ts +3 -2
  53. package/dist/bundles/ui/index.js +7 -2
  54. package/dist/bundles/ui/inspector/index.js +8 -0
  55. package/dist/bundles/ui/inspector/inspector.d.ts +60 -6
  56. package/dist/bundles/ui/inspector/inspector.js +149 -69
  57. package/dist/modules/core/constants.cjs +17 -1
  58. package/dist/modules/core/elements/compat-view-element.cjs +434 -0
  59. package/dist/modules/core/elements/control-panel-element.cjs +93 -0
  60. package/dist/modules/core/elements/index.cjs +11 -0
  61. package/dist/modules/core/elements/inspector-element.cjs +52 -0
  62. package/dist/modules/core/elements/recent-result-item.cjs +39 -0
  63. package/dist/modules/core/elements/results-history-item.cjs +39 -0
  64. package/dist/modules/core/elements/templates/compat-view.templates.cjs +458 -0
  65. package/dist/modules/core/elements/templates/control-panel.templates.cjs +332 -0
  66. package/dist/modules/core/elements/templates/root-styles.template.cjs +33 -0
  67. package/dist/modules/core/event-bus.cjs +43 -1
  68. package/dist/modules/core/helpers.cjs +41 -1
  69. package/dist/modules/core/index.cjs +16 -1
  70. package/dist/modules/core/state-service.cjs +74 -1
  71. package/dist/modules/core/ui-component.cjs +65 -1
  72. package/dist/modules/engine/engine.cjs +232 -1
  73. package/dist/modules/gen/browser-data.cjs +100 -1
  74. package/dist/modules/gen/browser-usage-data.cjs +675 -1
  75. package/dist/modules/gen/compat-data.cjs +31015 -1
  76. package/dist/modules/gen/index.cjs +7 -1
  77. package/dist/modules/index.cjs +27 -1
  78. package/dist/modules/pkg/shinkore.cjs +459 -1
  79. package/dist/modules/pkg/shinkore_bg.wasm +0 -0
  80. package/dist/modules/shinkom.cjs +73 -1
  81. package/dist/modules/ui/compat-ui/compat-ui.cjs +53 -1
  82. package/dist/modules/ui/compat-ui/index.cjs +1 -0
  83. package/dist/modules/ui/compatibility-view/compatibility-view.cjs +223 -0
  84. package/dist/modules/ui/compatibility-view/index.cjs +1 -0
  85. package/dist/modules/ui/control-panel/control-panel.cjs +314 -182
  86. package/dist/modules/ui/control-panel/index.cjs +1 -0
  87. package/dist/modules/ui/index.cjs +13 -1
  88. package/dist/modules/ui/inspector/index.cjs +1 -0
  89. package/dist/modules/ui/inspector/inspector.cjs +388 -1
  90. package/package.json +15 -8
  91. package/dist/bundles/node_modules/@mdn/browser-compat-data/types.d.ts +0 -78
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Shinkom - gen
3
- * @version 1.0.2
3
+ * @version 1.1.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - OneilNvM
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Shinkom - index
3
- * @version 1.0.2
3
+ * @version 1.1.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - OneilNvM
6
6
  */
@@ -8,9 +8,13 @@
8
8
  import { ShinkomBus } from "./core/event-bus.js";
9
9
  import { ShinkomState } from "./core/state-service.js";
10
10
  import { UIComponent } from "./core/ui-component.js";
11
+ import { CompatViewElement } from "./core/elements/compat-view-element.js";
12
+ import { CompatControlPanelElement } from "./core/elements/control-panel-element.js";
13
+ import { CompatInspectorElement } from "./core/elements/inspector-element.js";
11
14
  import { CompatInspector } from "./ui/inspector/inspector.js";
12
15
  import { CompatControlPanel } from "./ui/control-panel/control-panel.js";
16
+ import { CompatView } from "./ui/compatibility-view/compatibility-view.js";
13
17
  import { CompatUI } from "./ui/compat-ui/compat-ui.js";
14
18
  import { SKEngine } from "./engine/engine.js";
15
19
  import { Shinkom } from "./shinkom.js";
16
- export { CompatControlPanel, CompatInspector, CompatUI, SKEngine, Shinkom, ShinkomBus, ShinkomState, UIComponent };
20
+ export { CompatControlPanel, CompatControlPanelElement, CompatInspector, CompatInspectorElement, CompatUI, CompatView, CompatViewElement, SKEngine, Shinkom, ShinkomBus, ShinkomState, UIComponent };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Shinkom - index
3
- * @version 1.0.2
3
+ * @version 1.1.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - OneilNvM
6
6
  */
@@ -8,10 +8,16 @@
8
8
  import { ShinkomBus } from "./core/event-bus.js";
9
9
  import { ShinkomState } from "./core/state-service.js";
10
10
  import { UIComponent } from "./core/ui-component.js";
11
+ import { CompatViewElement } from "./core/elements/compat-view-element.js";
12
+ import { CompatControlPanelElement } from "./core/elements/control-panel-element.js";
13
+ import { CompatInspectorElement } from "./core/elements/inspector-element.js";
14
+ import "./core/index.js";
11
15
  import { CompatInspector } from "./ui/inspector/inspector.js";
12
16
  import { CompatControlPanel } from "./ui/control-panel/control-panel.js";
17
+ import { CompatView } from "./ui/compatibility-view/compatibility-view.js";
13
18
  import { CompatUI } from "./ui/compat-ui/compat-ui.js";
19
+ import "./ui/index.js";
14
20
  import { SKEngine } from "./engine/engine.js";
15
21
  import "./engine/index.js";
16
22
  import { Shinkom } from "./shinkom.js";
17
- export { CompatControlPanel, CompatInspector, CompatUI, SKEngine, Shinkom, ShinkomBus, ShinkomState, UIComponent };
23
+ export { CompatControlPanel, CompatControlPanelElement, CompatInspector, CompatInspectorElement, CompatUI, CompatView, CompatViewElement, SKEngine, Shinkom, ShinkomBus, ShinkomState, UIComponent };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Shinkom - pkg
3
- * @version 1.0.2
3
+ * @version 1.1.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - OneilNvM
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Shinkom - pkg
3
- * @version 1.0.2
3
+ * @version 1.1.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - OneilNvM
6
6
  */
Binary file
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Shinkom - shinkom
3
- * @version 1.0.2
3
+ * @version 1.1.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - OneilNvM
6
6
  */
@@ -12,9 +12,17 @@ import { ShinkomConfig as ShinkomConfig$1 } from "./types/public.js";
12
12
  //#region src/shinkom.d.ts
13
13
  declare class Shinkom {
14
14
  /**
15
+ * Initializes UI and engine components
16
+ *
17
+ * It creates instances for the event bus and state service and shares them
18
+ * between the components. It also has an optional configuration object
19
+ * used for configuring the inspector and initializing the engine with a
20
+ * URL to the WASM file.
21
+ *
15
22
  * @param {ShinkomConfig | undefined} config
16
23
  */
17
24
  constructor(config?: ShinkomConfig | undefined);
25
+ initialized: boolean | undefined;
18
26
  /**@type {SKEngine} */
19
27
  skEngine: SKEngine;
20
28
  /**@type {CompatUI} */
@@ -1,42 +1,64 @@
1
1
  /**
2
2
  * Shinkom - shinkom
3
- * @version 1.0.2
3
+ * @version 1.1.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - OneilNvM
6
6
  */
7
7
 
8
8
  import { ShinkomBus } from "./core/event-bus.js";
9
9
  import { ShinkomState } from "./core/state-service.js";
10
+ import "./core/index.js";
10
11
  import { CompatInspector } from "./ui/inspector/inspector.js";
11
12
  import { CompatControlPanel } from "./ui/control-panel/control-panel.js";
13
+ import { CompatView } from "./ui/compatibility-view/compatibility-view.js";
12
14
  import { CompatUI } from "./ui/compat-ui/compat-ui.js";
15
+ import "./ui/index.js";
13
16
  import { SKEngine } from "./engine/engine.js";
14
17
  import "./engine/index.js";
15
18
  //#region src/shinkom.js
16
19
  /**@typedef {import("./types/public").ShinkomConfig} ShinkomConfig */
20
+ /**@type {Shinkom | null} */
21
+ let instance = null;
17
22
  var Shinkom = class {
18
23
  #config;
19
- /**@type {AbortController | null} */
20
- #shinkomController = null;
21
24
  /**
25
+ * Initializes UI and engine components
26
+ *
27
+ * It creates instances for the event bus and state service and shares them
28
+ * between the components. It also has an optional configuration object
29
+ * used for configuring the inspector and initializing the engine with a
30
+ * URL to the WASM file.
31
+ *
22
32
  * @param {ShinkomConfig | undefined} config
23
33
  */
24
34
  constructor(config = void 0) {
35
+ if (instance) return instance;
36
+ this.initialized = false;
25
37
  this.#config = config;
26
38
  const bus = new ShinkomBus();
27
39
  const state = new ShinkomState();
28
40
  /**@type {SKEngine} */
29
41
  this.skEngine = new SKEngine(bus);
30
42
  /**@type {CompatUI} */
31
- this.compatUI = new CompatUI(bus, state, [new CompatInspector(bus, state, this.#config?.inspector), new CompatControlPanel(bus, state)]);
43
+ this.compatUI = new CompatUI(bus, state, [
44
+ new CompatInspector(bus, state, this.#config?.inspector),
45
+ new CompatControlPanel(bus, state),
46
+ new CompatView(bus, state)
47
+ ]);
48
+ instance = this;
32
49
  }
33
50
  /**
34
51
  * Initialize Shinkom.
35
52
  */
36
53
  async init() {
37
54
  try {
55
+ if (this.initialized) {
56
+ console.warn("Shinkom is already initialized.");
57
+ return;
58
+ }
38
59
  await this.skEngine.initEngine(this.#config?.engine?.wasmURL);
39
60
  this.compatUI.init();
61
+ this.initialized = true;
40
62
  } catch (error) {
41
63
  console.error(`Shinkom initialization error: ${error}`);
42
64
  }
@@ -45,10 +67,13 @@ var Shinkom = class {
45
67
  * Destroy UI components and engine instance.
46
68
  */
47
69
  destroy() {
70
+ if (!this.initialized) {
71
+ console.warn("Shinkom has not been initialized.");
72
+ return;
73
+ }
48
74
  this.skEngine.destroy();
49
75
  this.compatUI.destroy();
50
- if (this.#shinkomController) this.#shinkomController.abort();
51
- this.#shinkomController = null;
76
+ this.initialized = false;
52
77
  }
53
78
  };
54
79
  //#endregion
@@ -1,28 +1,5 @@
1
- import { SupportStatement } from '@mdn/browser-compat-data/types'
2
-
3
- export type ShinkomEventMap = {
4
- "ci:toggle": CustomEvent<void>;
5
- "engine:inspect": CustomEvent<CustomEventEngineDetail>;
6
- "ci:switch": CustomEvent<void>;
7
- "ci:create": CustomEvent<void>;
8
- "ci:reset": CustomEvent<void>;
9
- "ci:destroy": CustomEvent<void>;
10
- "engine:full": CustomEvent<CustomEventEngineDetail>;
11
- }
12
-
13
- export type CustomEventEngineDetail = {
14
- elem: string;
15
- depthLevel: number;
16
- multiElements: boolean;
17
- }
18
-
19
- export interface ShinkomEventTarget extends EventTarget {
20
- addEventListener: <K extends keyof ShinkomEventMap>(type: K | string, listener: ShinkomEventListener<K> | EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void;
21
- removeEventListener: <K extends keyof ShinkomEventMap>(type: K | string, callback: ShinkomEventListener<K> | EventListenerOrEventListenerObject | null) => void;
22
- dispatchEvent: <K extends keyof ShinkomEventMap>(event: ShinkomEventMap[K]) => boolean;
23
- }
24
-
25
- export type ShinkomEventListener<K extends keyof ShinkomEventMap> = (this: ShinkomEventTarget, ev: ShinkomEventMap[K]) => void
1
+ import { CompatControlPanelElement, CompatViewElement } from '../core/elements';
2
+ import { SupportStatement } from './types';
26
3
 
27
4
  export type ShinkomConfig = {
28
5
  inspector?: InspectorConfig
@@ -44,14 +21,23 @@ export type UISharedState = {
44
21
  inspectorSwitching: boolean;
45
22
  multiElements: boolean;
46
23
  depthLevel: number;
47
- ignorePanelEl: HTMLDivElement | null;
24
+ ignorePanelEl: CompatControlPanelElement | null;
25
+ ignoreCompatViewEl: CompatViewElement | null;
26
+ compatViewTab: "overview" | "results" | "history";
27
+ maxResultsHistory: number;
48
28
  }
49
29
 
30
+ export type UISharedStateProps = keyof UISharedState
31
+
50
32
  export type CompatResult = {
51
33
  overall_score: number;
52
34
  lookup_results: LookupResult[];
53
35
  }
54
36
 
37
+ export type CompatSnapshot = CompatResult & {
38
+ checkedAt: string
39
+ }
40
+
55
41
  export type LookupResult = {
56
42
  name: string;
57
43
  mdn_url: string;
@@ -68,6 +54,4 @@ export type BrowserResult = {
68
54
  weighted_score: string;
69
55
  };
70
56
  versions: SupportStatement
71
- }
72
-
73
- export type UISharedStateProps = keyof UISharedState
57
+ }
@@ -0,0 +1,99 @@
1
+ import { CompatResult } from './public'
2
+
3
+ declare const __PACKAGE_VERSION__: string;
4
+
5
+ export type ShinkomEventMap = {
6
+ "ci:toggle": CustomEvent<void>;
7
+ "ci:switch": CustomEvent<void>;
8
+ "ci:create": CustomEvent<void>;
9
+ "ci:reset": CustomEvent<void>;
10
+ "ci:destroy": CustomEvent<void>;
11
+ "engine:inspect": CustomEvent<CustomEventEngineDetail>;
12
+ "engine:full": CustomEvent<CustomEventEngineDetail>;
13
+ "results:ready": CustomEvent<CompatResult>
14
+ "clear:history": CustomEvent<void>
15
+ }
16
+
17
+ export type CustomEventEngineDetail = {
18
+ elem: string;
19
+ depthLevel: number;
20
+ multiElements: boolean;
21
+ }
22
+
23
+ /**@extends EventTarget */
24
+ export interface ShinkomEventTarget extends EventTarget {
25
+ addEventListener: <K extends keyof ShinkomEventMap>(type: K | string, listener: ShinkomEventListener<K> | EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void;
26
+ removeEventListener: <K extends keyof ShinkomEventMap>(type: K | string, callback: ShinkomEventListener<K> | EventListenerOrEventListenerObject | null) => void;
27
+ dispatchEvent: <K extends keyof ShinkomEventMap>(event: ShinkomEventMap[K]) => boolean;
28
+ }
29
+
30
+ export type ShinkomEventListener<K extends keyof ShinkomEventMap> = (this: ShinkomEventTarget, ev: ShinkomEventMap[K]) => void
31
+
32
+ type VersionValue = string | false;
33
+ /**
34
+ * This interface was referenced by `CompatDataFile`'s JSON-Schema
35
+ * via the `definition` "support_statement".
36
+ */
37
+ export type SupportStatement = SimpleSupportStatement | [SimpleSupportStatement, SimpleSupportStatement, ...SimpleSupportStatement[]];
38
+ /**
39
+ * This interface was referenced by `CompatDataFile`'s JSON-Schema
40
+ * via the `definition` "simple_support_statement".
41
+ */
42
+ interface SimpleSupportStatement {
43
+ /**
44
+ * A string (indicating which browser version added this feature), or the value false (indicating the feature is not supported).
45
+ */
46
+ version_added: VersionValue;
47
+ /**
48
+ * A string, indicating which browser version removed this feature.
49
+ */
50
+ version_removed?: string;
51
+ /**
52
+ * A string, indicating the last browser version that supported this feature. This is automatically generated.
53
+ */
54
+ version_last?: string;
55
+ /**
56
+ * A prefix to add to the sub-feature name (defaults to empty string). If applicable, leading and trailing '-' must be included.
57
+ */
58
+ prefix?: string;
59
+ /**
60
+ * An alternative name for the feature, for cases where a feature is implemented under an entirely different name and not just prefixed.
61
+ */
62
+ alternative_name?: string;
63
+ /**
64
+ * An optional array of objects describing flags that must be configured for this browser to support this feature.
65
+ *
66
+ * @minItems 1
67
+ */
68
+ flags?: [FlagStatement, ...FlagStatement[]];
69
+ /**
70
+ * An optional changeset/commit URL for the revision which implemented the feature in the source code, or the URL to the bug tracking the implementation, for the associated browser.
71
+ */
72
+ impl_url?: string | [string, string, ...string[]];
73
+ /**
74
+ * A boolean value indicating whether or not the implementation of the sub-feature deviates from the specification in a way that may cause compatibility problems. It defaults to false (no interoperability problems expected). If set to true, it is recommended that you add a note explaining how it diverges from the standard (such as that it implements an old version of the standard, for example).
75
+ */
76
+ partial_implementation?: true;
77
+ /**
78
+ * A string or array of strings containing additional information.
79
+ */
80
+ notes?: string | [string, string, ...string[]];
81
+ }
82
+ /**
83
+ * This interface was referenced by `CompatDataFile`'s JSON-Schema
84
+ * via the `definition` "flag_statement".
85
+ */
86
+ interface FlagStatement {
87
+ /**
88
+ * An enum that indicates the flag type.
89
+ */
90
+ type: "preference" | "runtime_flag";
91
+ /**
92
+ * A string giving the name of the flag or preference that must be configured.
93
+ */
94
+ name: string;
95
+ /**
96
+ * A string giving the value which the specified flag must be set to for this feature to work.
97
+ */
98
+ value_to_set?: string;
99
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Shinkom - compat-ui
3
- * @version 1.0.2
3
+ * @version 1.1.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - OneilNvM
6
6
  */
@@ -8,10 +8,19 @@
8
8
  import { ShinkomBus } from "../../core/event-bus.js";
9
9
  import { ShinkomState } from "../../core/state-service.js";
10
10
  import { UIComponent } from "../../core/ui-component.js";
11
+ import { UISharedState as UISharedState$1 } from "../../types/public.js";
11
12
 
12
13
  //#region src/ui/compat-ui/compat-ui.d.ts
13
14
  declare class CompatUI {
14
15
  /**
16
+ * Initializes the provided UI components.
17
+ *
18
+ * It requires an instance of the `ShinkomBus` and `ShinkomState` and the UI
19
+ * components to be mounted.
20
+ *
21
+ * It sets a `WeakMap` with the Proxy state from the state service for binding
22
+ * state to the components after being mounted.
23
+ *
15
24
  * @param {ShinkomBus} _bus
16
25
  * @param {ShinkomState} stateService
17
26
  * @param {UIComponent[]} components
@@ -29,5 +38,6 @@ declare class CompatUI {
29
38
  destroy(): void;
30
39
  #private;
31
40
  }
41
+ type UISharedState = UISharedState$1;
32
42
  //#endregion
33
- export { CompatUI };
43
+ export { CompatUI, UISharedState };
@@ -1,14 +1,24 @@
1
1
  /**
2
2
  * Shinkom - compat-ui
3
- * @version 1.0.2
3
+ * @version 1.1.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - OneilNvM
6
6
  */
7
7
 
8
+ import "../../core/index.js";
8
9
  //#region src/ui/compat-ui/compat-ui.js
10
+ /**@type {WeakMap<WeakKey, UISharedState>} */
9
11
  const internalState = /* @__PURE__ */ new WeakMap();
10
12
  var CompatUI = class {
11
13
  /**
14
+ * Initializes the provided UI components.
15
+ *
16
+ * It requires an instance of the `ShinkomBus` and `ShinkomState` and the UI
17
+ * components to be mounted.
18
+ *
19
+ * It sets a `WeakMap` with the Proxy state from the state service for binding
20
+ * state to the components after being mounted.
21
+ *
12
22
  * @param {ShinkomBus} _bus
13
23
  * @param {ShinkomState} stateService
14
24
  * @param {UIComponent[]} components
@@ -23,7 +33,7 @@ var CompatUI = class {
23
33
  */
24
34
  #bindState() {
25
35
  const state = internalState.get(this);
26
- this.components.forEach((comp) => comp.bindState(state));
36
+ if (state) this.components.forEach((comp) => comp.bindState(state));
27
37
  }
28
38
  /**
29
39
  * Initializes CompatUI components.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Shinkom - ui\compat-ui\index
3
+ * @version 1.1.0
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ import "./compat-ui.js";
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Shinkom - compatibility-view
3
+ * @version 1.1.0
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ import { UIComponent } from "../../core/ui-component.js";
9
+ import { CompatViewElement } from "../../core/elements/compat-view-element.js";
10
+ import { CompatResult as CompatResult$1, UISharedState as UISharedState$1, UISharedStateProps as UISharedStateProps$1 } from "../../types/public.js";
11
+
12
+ //#region src/ui/compatibility-view/compatibility-view.d.ts
13
+ /**
14
+ * CompatView manages the compatibility results panel that displays
15
+ * inspection overview, result details, and history.
16
+ *
17
+ * It mounts the `<sk-compat-view>` custom element, binds the view to
18
+ * shared state, listens for result updates from the Shinkom bus, and
19
+ * handles UI interactions such as tab switching and show/hide transitions.
20
+ *
21
+ * @extends {UIComponent}
22
+ */
23
+ declare class CompatView extends UIComponent {
24
+ /**
25
+ * Register custom elements to the CustomElementRegistry.
26
+ */
27
+ static register(): void;
28
+ /**@type {CompatViewElement | null} */
29
+ compatViewEl: CompatViewElement | null;
30
+ /**@type {"overview" | "results" | "history"} */
31
+ currentTab: "overview" | "results" | "history";
32
+ /**@type {boolean} */
33
+ active: boolean;
34
+ /**@type {() => void} */
35
+ unsubEvent: () => void;
36
+ #private;
37
+ }
38
+ type UISharedState = UISharedState$1;
39
+ type UISharedStateProps = UISharedStateProps$1;
40
+ type CompatResult = CompatResult$1;
41
+ //#endregion
42
+ export { CompatResult, CompatView, UISharedState, UISharedStateProps };