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.
Files changed (85) hide show
  1. package/README.md +0 -18
  2. package/dist/bundles/_virtual/_rolldown/runtime.js +14 -14
  3. package/dist/bundles/core/constants.d.ts +15 -15
  4. package/dist/bundles/core/constants.js +23 -23
  5. package/dist/bundles/core/elements/compat-view-element.d.ts +99 -99
  6. package/dist/bundles/core/elements/compat-view-element.js +440 -440
  7. package/dist/bundles/core/elements/control-panel-element.d.ts +44 -44
  8. package/dist/bundles/core/elements/control-panel-element.js +99 -99
  9. package/dist/bundles/core/elements/index.d.ts +12 -12
  10. package/dist/bundles/core/elements/index.js +13 -13
  11. package/dist/bundles/core/elements/inspector-element.d.ts +26 -26
  12. package/dist/bundles/core/elements/inspector-element.js +58 -58
  13. package/dist/bundles/core/elements/recent-result-item.js +46 -46
  14. package/dist/bundles/core/elements/results-history-item.js +46 -46
  15. package/dist/bundles/core/elements/templates/compat-view.templates.js +462 -462
  16. package/dist/bundles/core/elements/templates/control-panel.templates.js +335 -335
  17. package/dist/bundles/core/elements/templates/root-styles.template.js +40 -40
  18. package/dist/bundles/core/event-bus.d.ts +46 -46
  19. package/dist/bundles/core/event-bus.js +49 -49
  20. package/dist/bundles/core/helpers.js +47 -47
  21. package/dist/bundles/core/index.d.ts +14 -14
  22. package/dist/bundles/core/index.js +16 -16
  23. package/dist/bundles/core/state-service.d.ts +56 -56
  24. package/dist/bundles/core/state-service.js +91 -80
  25. package/dist/bundles/core/ui-component.d.ts +63 -63
  26. package/dist/bundles/core/ui-component.js +71 -71
  27. package/dist/bundles/engine/engine.d.ts +108 -108
  28. package/dist/bundles/engine/engine.js +238 -238
  29. package/dist/bundles/engine/index.js +8 -8
  30. package/dist/bundles/gen/index.js +14 -14
  31. package/dist/bundles/index.d.ts +19 -19
  32. package/dist/bundles/index.js +23 -23
  33. package/dist/bundles/pkg/shinkore.d.ts +40 -50
  34. package/dist/bundles/pkg/shinkore.js +465 -465
  35. package/dist/bundles/pkg/shinkore_bg.wasm +0 -0
  36. package/dist/bundles/shinkom.d.ts +41 -41
  37. package/dist/bundles/shinkom.js +80 -80
  38. package/dist/bundles/ui/compat-ui/compat-ui.d.ts +42 -42
  39. package/dist/bundles/ui/compat-ui/compat-ui.js +59 -59
  40. package/dist/bundles/ui/compat-ui/index.js +8 -8
  41. package/dist/bundles/ui/compatibility-view/compatibility-view.d.ts +41 -41
  42. package/dist/bundles/ui/compatibility-view/compatibility-view.js +229 -229
  43. package/dist/bundles/ui/compatibility-view/index.js +8 -8
  44. package/dist/bundles/ui/control-panel/control-panel.d.ts +52 -52
  45. package/dist/bundles/ui/control-panel/control-panel.js +320 -320
  46. package/dist/bundles/ui/control-panel/index.js +8 -8
  47. package/dist/bundles/ui/index.d.ts +11 -11
  48. package/dist/bundles/ui/index.js +16 -16
  49. package/dist/bundles/ui/inspector/index.js +8 -8
  50. package/dist/bundles/ui/inspector/inspector.d.ts +97 -97
  51. package/dist/bundles/ui/inspector/inspector.js +394 -394
  52. package/dist/modules/core/constants.cjs +17 -17
  53. package/dist/modules/core/elements/compat-view-element.cjs +434 -434
  54. package/dist/modules/core/elements/control-panel-element.cjs +93 -93
  55. package/dist/modules/core/elements/index.cjs +11 -11
  56. package/dist/modules/core/elements/inspector-element.cjs +52 -52
  57. package/dist/modules/core/elements/recent-result-item.cjs +39 -39
  58. package/dist/modules/core/elements/results-history-item.cjs +39 -39
  59. package/dist/modules/core/elements/templates/compat-view.templates.cjs +458 -458
  60. package/dist/modules/core/elements/templates/control-panel.templates.cjs +332 -332
  61. package/dist/modules/core/elements/templates/root-styles.template.cjs +33 -33
  62. package/dist/modules/core/event-bus.cjs +43 -43
  63. package/dist/modules/core/helpers.cjs +41 -41
  64. package/dist/modules/core/index.cjs +16 -16
  65. package/dist/modules/core/state-service.cjs +85 -74
  66. package/dist/modules/core/ui-component.cjs +65 -65
  67. package/dist/modules/engine/engine.cjs +232 -232
  68. package/dist/modules/gen/browser-data.cjs +100 -100
  69. package/dist/modules/gen/browser-usage-data.cjs +675 -675
  70. package/dist/modules/gen/compat-data.cjs +31015 -31015
  71. package/dist/modules/gen/index.cjs +7 -7
  72. package/dist/modules/index.cjs +27 -27
  73. package/dist/modules/pkg/shinkore.cjs +459 -459
  74. package/dist/modules/pkg/shinkore_bg.wasm +0 -0
  75. package/dist/modules/shinkom.cjs +73 -73
  76. package/dist/modules/ui/compat-ui/compat-ui.cjs +53 -53
  77. package/dist/modules/ui/compat-ui/index.cjs +1 -1
  78. package/dist/modules/ui/compatibility-view/compatibility-view.cjs +223 -223
  79. package/dist/modules/ui/compatibility-view/index.cjs +1 -1
  80. package/dist/modules/ui/control-panel/control-panel.cjs +314 -314
  81. package/dist/modules/ui/control-panel/index.cjs +1 -1
  82. package/dist/modules/ui/index.cjs +13 -13
  83. package/dist/modules/ui/inspector/index.cjs +1 -1
  84. package/dist/modules/ui/inspector/inspector.cjs +388 -388
  85. package/package.json +100 -100
package/README.md CHANGED
@@ -342,24 +342,6 @@ run()
342
342
 
343
343
  ---
344
344
 
345
- ## Contributing
346
-
347
- In order to contribute to this project, there are a few prerequisites before doing so:
348
-
349
- - Install the latest stable version of Rust on the [official Rust website](https://rust-lang.org/learn/get-started/)
350
- - Install `wasm-pack` via this command:
351
-
352
- ```bash
353
- cargo install wasm-pack
354
- ```
355
-
356
- After that, make sure to run `npm i` to install project dependencies, create a branch **from the dev branch**, add your code,
357
- and **create a pull request to the dev branch**.
358
-
359
- After review and approval of the pull request, we can introduce your changes to the dev branch and eventually to the main branch.
360
-
361
- ---
362
-
363
345
  ## Development Scripts
364
346
 
365
347
  When cloning or forking this library, refer to this table in regards to the NPM scripts:
@@ -1,14 +1,14 @@
1
- /**
2
- * Shinkom - _rolldown
3
- * @version 1.1.0
4
- * @license MIT
5
- * @copyright 2026 - OneilNvM
6
- */
7
-
8
- //#region \0rolldown/runtime.js
9
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
12
- });
13
- //#endregion
14
- export { __require };
1
+ /**
2
+ * Shinkom - _rolldown
3
+ * @version 1.1.2
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ //#region \0rolldown/runtime.js
9
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
10
+ if (typeof require !== "undefined") return require.apply(this, arguments);
11
+ throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
12
+ });
13
+ //#endregion
14
+ export { __require };
@@ -1,16 +1,16 @@
1
- /**
2
- * Shinkom - core
3
- * @version 1.1.0
4
- * @license MIT
5
- * @copyright 2026 - OneilNvM
6
- */
7
-
8
- import { UISharedState as UISharedState$1 } from "../types/public.js";
9
-
10
- //#region src/core/constants.d.ts
11
- /**@typedef {import('../types/public').UISharedState} UISharedState */
12
- /**@type {UISharedState} */
13
- declare const DEFAULT_STATE: UISharedState;
14
- type UISharedState = UISharedState$1;
15
- //#endregion
1
+ /**
2
+ * Shinkom - core
3
+ * @version 1.1.2
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ import { UISharedState as UISharedState$1 } from "../types/public.js";
9
+
10
+ //#region src/core/constants.d.ts
11
+ /**@typedef {import('../types/public').UISharedState} UISharedState */
12
+ /**@type {UISharedState} */
13
+ declare const DEFAULT_STATE: UISharedState;
14
+ type UISharedState = UISharedState$1;
15
+ //#endregion
16
16
  export { DEFAULT_STATE, UISharedState };
@@ -1,23 +1,23 @@
1
- /**
2
- * Shinkom - core
3
- * @version 1.1.0
4
- * @license MIT
5
- * @copyright 2026 - OneilNvM
6
- */
7
-
8
- //#region src/core/constants.js
9
- /**@typedef {import('../types/public').UISharedState} UISharedState */
10
- /**@type {UISharedState} */
11
- const DEFAULT_STATE = {
12
- inspectorExists: false,
13
- inspectorActive: false,
14
- inspectorSwitching: false,
15
- ignorePanelEl: null,
16
- ignoreCompatViewEl: null,
17
- multiElements: false,
18
- depthLevel: 0,
19
- compatViewTab: "overview",
20
- maxResultsHistory: 10
21
- };
22
- //#endregion
23
- export { DEFAULT_STATE };
1
+ /**
2
+ * Shinkom - core
3
+ * @version 1.1.2
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ //#region src/core/constants.js
9
+ /**@typedef {import('../types/public').UISharedState} UISharedState */
10
+ /**@type {UISharedState} */
11
+ const DEFAULT_STATE = {
12
+ inspectorExists: false,
13
+ inspectorActive: false,
14
+ inspectorSwitching: false,
15
+ ignorePanelEl: null,
16
+ ignoreCompatViewEl: null,
17
+ multiElements: false,
18
+ depthLevel: 0,
19
+ compatViewTab: "overview",
20
+ maxResultsHistory: 10
21
+ };
22
+ //#endregion
23
+ export { DEFAULT_STATE };
@@ -1,100 +1,100 @@
1
- /**
2
- * Shinkom - elements
3
- * @version 1.1.0
4
- * @license MIT
5
- * @copyright 2026 - OneilNvM
6
- */
7
-
8
- import { ShinkomBus } from "../event-bus.js";
9
- import { ShinkomState } from "../state-service.js";
10
- import { CompatResult as CompatResult$1, CompatSnapshot as CompatSnapshot$1, LookupResult as LookupResult$1 } from "../../types/public.js";
11
-
12
- //#region src/core/elements/compat-view-element.d.ts
13
- /**
14
- * A custom element for the `CompatView` 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 contains methods for rendering components for the CompatView and handling how the results from the engine
18
- * is stored and displayed for viewing.
19
- *
20
- * Since this element is defined via the Web Components API, to use this element outside of the CompatView, it must be registered
21
- * as a custom element on the `window` object.
22
- * @extends {BaseElement}
23
- */
24
- declare class CompatViewElement extends HTMLElement {
25
- /**@type {ShadowRoot} */
26
- shadowRootRef: ShadowRoot;
27
- shadowHost: HTMLDivElement;
28
- /**@type {"overview" | "results" | "history"} */
29
- currentTab: "overview" | "results" | "history";
30
- /**@type {ShinkomState | null} */
31
- state: ShinkomState | null;
32
- /**@type {ShinkomBus | null} */
33
- bus: ShinkomBus | null;
34
- /**@type {CompatResult | null} */
35
- _results: CompatResult | null;
36
- /**@type {CompatSnapshot[]} */
37
- _resultsHistory: CompatSnapshot[];
38
- set results(val: CompatResult$1 | null);
39
- get results(): CompatResult$1 | null;
40
- set resultsHistory(val: CompatSnapshot$1[]);
41
- get resultsHistory(): CompatSnapshot$1[];
42
- /**
43
- * Updates the results history and backs up the results to `localStorage`.
44
- * @param {CompatSnapshot} val
45
- */
46
- updateResultsHistory(val: CompatSnapshot): void;
47
- /**
48
- * Checks the current release version of `Shinkom`
49
- */
50
- checkVersion(): Promise<void>;
51
- connectedCallback(): void;
52
- _unsubEvent: (() => void) | undefined;
53
- _unsubState: (() => void) | undefined;
54
- disconnectedCallback(): void;
55
- /**
56
- * Renders the `CompatViewElement` on a specific tab.
57
- *
58
- * Renders the `overview` tab by default.
59
- * @param {"overview" | "results" | "history" | undefined} tab
60
- */
61
- render(tab?: "overview" | "results" | "history" | undefined): void;
62
- /**
63
- * Renders list items for the 5 most recent results.
64
- * @throws {Error} If the list for the recent results does not exist.
65
- */
66
- renderRecentResults(): void;
67
- /**
68
- * Renders content for a specific tab.
69
- * @param {"overview" | "results" | "history"} tab
70
- */
71
- renderTabContent(tab: "overview" | "results" | "history"): void;
72
- /**
73
- * Renders the results from the results history.
74
- * @throws {Error} If the main container does not exist.
75
- */
76
- renderHistoryResults(): void;
77
- /**
78
- * Renders the content of a compatibility result.
79
- * @param {CompatSnapshot | undefined} snapshot
80
- * @throws {Error} If the main container does not exist.
81
- */
82
- renderCompatResult(snapshot?: CompatSnapshot | undefined): void;
83
- /**
84
- * Renders the content of a browser result for a web feature.
85
- * @param {LookupResult} lookupResult
86
- * @returns {string} browser results HTML
87
- */
88
- renderBrowserResults(lookupResult: LookupResult): string;
89
- /**
90
- * Renders the display of the `CompatViewElement`.
91
- * @param {"show" | "hide"} display
92
- */
93
- renderDisplayTransition(display: "show" | "hide"): void;
94
- #private;
95
- }
96
- type CompatResult = CompatResult$1;
97
- type CompatSnapshot = CompatSnapshot$1;
98
- type LookupResult = LookupResult$1;
99
- //#endregion
1
+ /**
2
+ * Shinkom - elements
3
+ * @version 1.1.2
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ import { ShinkomBus } from "../event-bus.js";
9
+ import { ShinkomState } from "../state-service.js";
10
+ import { CompatResult as CompatResult$1, CompatSnapshot as CompatSnapshot$1, LookupResult as LookupResult$1 } from "../../types/public.js";
11
+
12
+ //#region src/core/elements/compat-view-element.d.ts
13
+ /**
14
+ * A custom element for the `CompatView` 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 contains methods for rendering components for the CompatView and handling how the results from the engine
18
+ * is stored and displayed for viewing.
19
+ *
20
+ * Since this element is defined via the Web Components API, to use this element outside of the CompatView, it must be registered
21
+ * as a custom element on the `window` object.
22
+ * @extends {BaseElement}
23
+ */
24
+ declare class CompatViewElement extends HTMLElement {
25
+ /**@type {ShadowRoot} */
26
+ shadowRootRef: ShadowRoot;
27
+ shadowHost: HTMLDivElement;
28
+ /**@type {"overview" | "results" | "history"} */
29
+ currentTab: "overview" | "results" | "history";
30
+ /**@type {ShinkomState | null} */
31
+ state: ShinkomState | null;
32
+ /**@type {ShinkomBus | null} */
33
+ bus: ShinkomBus | null;
34
+ /**@type {CompatResult | null} */
35
+ _results: CompatResult | null;
36
+ /**@type {CompatSnapshot[]} */
37
+ _resultsHistory: CompatSnapshot[];
38
+ set results(val: CompatResult$1 | null);
39
+ get results(): CompatResult$1 | null;
40
+ set resultsHistory(val: CompatSnapshot$1[]);
41
+ get resultsHistory(): CompatSnapshot$1[];
42
+ /**
43
+ * Updates the results history and backs up the results to `localStorage`.
44
+ * @param {CompatSnapshot} val
45
+ */
46
+ updateResultsHistory(val: CompatSnapshot): void;
47
+ /**
48
+ * Checks the current release version of `Shinkom`
49
+ */
50
+ checkVersion(): Promise<void>;
51
+ connectedCallback(): void;
52
+ _unsubEvent: (() => void) | undefined;
53
+ _unsubState: (() => void) | undefined;
54
+ disconnectedCallback(): void;
55
+ /**
56
+ * Renders the `CompatViewElement` on a specific tab.
57
+ *
58
+ * Renders the `overview` tab by default.
59
+ * @param {"overview" | "results" | "history" | undefined} tab
60
+ */
61
+ render(tab?: "overview" | "results" | "history" | undefined): void;
62
+ /**
63
+ * Renders list items for the 5 most recent results.
64
+ * @throws {Error} If the list for the recent results does not exist.
65
+ */
66
+ renderRecentResults(): void;
67
+ /**
68
+ * Renders content for a specific tab.
69
+ * @param {"overview" | "results" | "history"} tab
70
+ */
71
+ renderTabContent(tab: "overview" | "results" | "history"): void;
72
+ /**
73
+ * Renders the results from the results history.
74
+ * @throws {Error} If the main container does not exist.
75
+ */
76
+ renderHistoryResults(): void;
77
+ /**
78
+ * Renders the content of a compatibility result.
79
+ * @param {CompatSnapshot | undefined} snapshot
80
+ * @throws {Error} If the main container does not exist.
81
+ */
82
+ renderCompatResult(snapshot?: CompatSnapshot | undefined): void;
83
+ /**
84
+ * Renders the content of a browser result for a web feature.
85
+ * @param {LookupResult} lookupResult
86
+ * @returns {string} browser results HTML
87
+ */
88
+ renderBrowserResults(lookupResult: LookupResult): string;
89
+ /**
90
+ * Renders the display of the `CompatViewElement`.
91
+ * @param {"show" | "hide"} display
92
+ */
93
+ renderDisplayTransition(display: "show" | "hide"): void;
94
+ #private;
95
+ }
96
+ type CompatResult = CompatResult$1;
97
+ type CompatSnapshot = CompatSnapshot$1;
98
+ type LookupResult = LookupResult$1;
99
+ //#endregion
100
100
  export { CompatResult, CompatSnapshot, CompatViewElement, LookupResult };