shinkom 1.0.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 (58) hide show
  1. package/LICENSE.md +7 -0
  2. package/README.md +399 -0
  3. package/dist/bundles/_virtual/_rolldown/runtime.js +14 -0
  4. package/dist/bundles/core/constants.d.ts +16 -0
  5. package/dist/bundles/core/constants.js +20 -0
  6. package/dist/bundles/core/event-bus.d.ts +33 -0
  7. package/dist/bundles/core/event-bus.js +36 -0
  8. package/dist/bundles/core/helpers.js +25 -0
  9. package/dist/bundles/core/index.d.ts +12 -0
  10. package/dist/bundles/core/index.js +12 -0
  11. package/dist/bundles/core/state-service.d.ts +37 -0
  12. package/dist/bundles/core/state-service.js +60 -0
  13. package/dist/bundles/core/ui-component.d.ts +45 -0
  14. package/dist/bundles/core/ui-component.js +52 -0
  15. package/dist/bundles/engine/engine.d.ts +61 -0
  16. package/dist/bundles/engine/engine.js +154 -0
  17. package/dist/bundles/engine/index.js +8 -0
  18. package/dist/bundles/gen/browser-data.js +96 -0
  19. package/dist/bundles/gen/browser-usage-data.js +669 -0
  20. package/dist/bundles/gen/compat-data.js +1 -0
  21. package/dist/bundles/gen/index.js +14 -0
  22. package/dist/bundles/index.d.ts +16 -0
  23. package/dist/bundles/index.js +17 -0
  24. package/dist/bundles/node_modules/@mdn/browser-compat-data/types.d.ts +78 -0
  25. package/dist/bundles/pkg/shinkore.d.ts +51 -0
  26. package/dist/bundles/pkg/shinkore.js +462 -0
  27. package/dist/bundles/pkg/shinkore_bg.wasm +0 -0
  28. package/dist/bundles/shinkom.d.ts +34 -0
  29. package/dist/bundles/shinkom.js +55 -0
  30. package/dist/bundles/types/public.d.ts +73 -0
  31. package/dist/bundles/ui/compat-ui/compat-ui.d.ts +33 -0
  32. package/dist/bundles/ui/compat-ui/compat-ui.js +49 -0
  33. package/dist/bundles/ui/control-panel/control-panel.d.ts +39 -0
  34. package/dist/bundles/ui/control-panel/control-panel.js +409 -0
  35. package/dist/bundles/ui/index.d.ts +11 -0
  36. package/dist/bundles/ui/index.js +11 -0
  37. package/dist/bundles/ui/inspector/inspector.d.ts +44 -0
  38. package/dist/bundles/ui/inspector/inspector.js +314 -0
  39. package/dist/modules/core/constants.cjs +1 -0
  40. package/dist/modules/core/event-bus.cjs +1 -0
  41. package/dist/modules/core/helpers.cjs +1 -0
  42. package/dist/modules/core/index.cjs +1 -0
  43. package/dist/modules/core/state-service.cjs +1 -0
  44. package/dist/modules/core/ui-component.cjs +1 -0
  45. package/dist/modules/engine/engine.cjs +1 -0
  46. package/dist/modules/gen/browser-data.cjs +1 -0
  47. package/dist/modules/gen/browser-usage-data.cjs +1 -0
  48. package/dist/modules/gen/compat-data.cjs +1 -0
  49. package/dist/modules/gen/index.cjs +1 -0
  50. package/dist/modules/index.cjs +1 -0
  51. package/dist/modules/pkg/shinkore.cjs +1 -0
  52. package/dist/modules/pkg/shinkore_bg.wasm +0 -0
  53. package/dist/modules/shinkom.cjs +1 -0
  54. package/dist/modules/ui/compat-ui/compat-ui.cjs +1 -0
  55. package/dist/modules/ui/control-panel/control-panel.cjs +182 -0
  56. package/dist/modules/ui/index.cjs +1 -0
  57. package/dist/modules/ui/inspector/inspector.cjs +1 -0
  58. package/package.json +89 -0
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Shinkom - gen
3
+ * @version 1.0.0
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ import compat_data_default from "./compat-data.js";
9
+ import "./browser-data.js";
10
+ import "./browser-usage-data.js";
11
+ //#region gen/index.js
12
+ var gen_default = compat_data_default;
13
+ //#endregion
14
+ export { gen_default as default };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Shinkom - index
3
+ * @version 1.0.0
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ import { ShinkomBus } from "./core/event-bus.js";
9
+ import { ShinkomState } from "./core/state-service.js";
10
+ import { UIComponent } from "./core/ui-component.js";
11
+ import { CompatInspector } from "./ui/inspector/inspector.js";
12
+ import { CompatControlPanel } from "./ui/control-panel/control-panel.js";
13
+ import { CompatUI } from "./ui/compat-ui/compat-ui.js";
14
+ import { SKEngine } from "./engine/engine.js";
15
+ import { Shinkom } from "./shinkom.js";
16
+ export { CompatControlPanel, CompatInspector, CompatUI, SKEngine, Shinkom, ShinkomBus, ShinkomState, UIComponent };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Shinkom - index
3
+ * @version 1.0.0
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ import { ShinkomBus } from "./core/event-bus.js";
9
+ import { ShinkomState } from "./core/state-service.js";
10
+ import { UIComponent } from "./core/ui-component.js";
11
+ import { CompatInspector } from "./ui/inspector/inspector.js";
12
+ import { CompatControlPanel } from "./ui/control-panel/control-panel.js";
13
+ import { CompatUI } from "./ui/compat-ui/compat-ui.js";
14
+ import { SKEngine } from "./engine/engine.js";
15
+ import "./engine/index.js";
16
+ import { Shinkom } from "./shinkom.js";
17
+ export { CompatControlPanel, CompatInspector, CompatUI, SKEngine, Shinkom, ShinkomBus, ShinkomState, UIComponent };
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Shinkom - browser-compat-data
3
+ * @version 1.0.0
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ //#region node_modules/@mdn/browser-compat-data/types.d.ts
9
+ type VersionValue = string | false;
10
+ /**
11
+ * This interface was referenced by `CompatDataFile`'s JSON-Schema
12
+ * via the `definition` "support_statement".
13
+ */
14
+ type SupportStatement = SimpleSupportStatement | [SimpleSupportStatement, SimpleSupportStatement, ...SimpleSupportStatement[]];
15
+ /**
16
+ * This interface was referenced by `CompatDataFile`'s JSON-Schema
17
+ * via the `definition` "simple_support_statement".
18
+ */
19
+ interface SimpleSupportStatement {
20
+ /**
21
+ * A string (indicating which browser version added this feature), or the value false (indicating the feature is not supported).
22
+ */
23
+ version_added: VersionValue;
24
+ /**
25
+ * A string, indicating which browser version removed this feature.
26
+ */
27
+ version_removed?: string;
28
+ /**
29
+ * A string, indicating the last browser version that supported this feature. This is automatically generated.
30
+ */
31
+ version_last?: string;
32
+ /**
33
+ * A prefix to add to the sub-feature name (defaults to empty string). If applicable, leading and trailing '-' must be included.
34
+ */
35
+ prefix?: string;
36
+ /**
37
+ * An alternative name for the feature, for cases where a feature is implemented under an entirely different name and not just prefixed.
38
+ */
39
+ alternative_name?: string;
40
+ /**
41
+ * An optional array of objects describing flags that must be configured for this browser to support this feature.
42
+ *
43
+ * @minItems 1
44
+ */
45
+ flags?: [FlagStatement, ...FlagStatement[]];
46
+ /**
47
+ * 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.
48
+ */
49
+ impl_url?: string | [string, string, ...string[]];
50
+ /**
51
+ * 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).
52
+ */
53
+ partial_implementation?: true;
54
+ /**
55
+ * A string or array of strings containing additional information.
56
+ */
57
+ notes?: string | [string, string, ...string[]];
58
+ }
59
+ /**
60
+ * This interface was referenced by `CompatDataFile`'s JSON-Schema
61
+ * via the `definition` "flag_statement".
62
+ */
63
+ interface FlagStatement {
64
+ /**
65
+ * An enum that indicates the flag type.
66
+ */
67
+ type: "preference" | "runtime_flag";
68
+ /**
69
+ * A string giving the name of the flag or preference that must be configured.
70
+ */
71
+ name: string;
72
+ /**
73
+ * A string giving the value which the specified flag must be set to for this feature to work.
74
+ */
75
+ value_to_set?: string;
76
+ }
77
+ //#endregion
78
+ export { SupportStatement };
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Shinkom - pkg
3
+ * @version 1.0.0
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ //#region pkg/shinkore.d.ts
9
+ /**
10
+ * The [`CompatEngine`] struct stores the compatibility data
11
+ * and acts as an entry-point for the Rust/WASM engine.
12
+ */
13
+ declare class CompatEngine {
14
+ /**
15
+ * Constructs an new engine instance
16
+ * @param {any} bcd_html_data
17
+ * @param {any} bcd_svg_data
18
+ * @param {any} bcd_browser_data
19
+ * @param {any} ciu_usage_data
20
+ */
21
+ constructor(bcd_html_data: any, bcd_svg_data: any, bcd_browser_data: any, ciu_usage_data: any);
22
+ __destroy_into_raw(): number;
23
+ __wbg_ptr: number;
24
+ free(): void;
25
+ /**
26
+ * Used for checking the compatibility of a single element and its attributes.
27
+ * @param {string} html
28
+ * @returns {any}
29
+ */
30
+ check_element(html: string): any;
31
+ /**
32
+ * Used for checking the compatibility of multiple elements and their attributes
33
+ *
34
+ * `depth_level` is used to control how far down in a nested HTML structure to go before
35
+ * returning element tags.
36
+ *
37
+ * See [`preprocess::pre_process_html`] to learn more about how `depth_level` works.
38
+ * @param {string} html
39
+ * @param {number} depth_level
40
+ * @returns {any}
41
+ */
42
+ check_elements(html: string, depth_level: number): any;
43
+ /**
44
+ * Used for performing a full page compatibility check.
45
+ * @param {string} html
46
+ * @returns {any}
47
+ */
48
+ full_inspect(html: string): any;
49
+ }
50
+ //#endregion
51
+ export { CompatEngine };
@@ -0,0 +1,462 @@
1
+ /**
2
+ * Shinkom - pkg
3
+ * @version 1.0.0
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ //#region pkg/shinkore.js
9
+ /**
10
+ * The [`CompatEngine`] struct stores the compatibility data
11
+ * and acts as an entry-point for the Rust/WASM engine.
12
+ */
13
+ var CompatEngine = class {
14
+ __destroy_into_raw() {
15
+ const ptr = this.__wbg_ptr;
16
+ this.__wbg_ptr = 0;
17
+ CompatEngineFinalization.unregister(this);
18
+ return ptr;
19
+ }
20
+ free() {
21
+ const ptr = this.__destroy_into_raw();
22
+ wasm.__wbg_compatengine_free(ptr, 0);
23
+ }
24
+ /**
25
+ * Used for checking the compatibility of a single element and its attributes.
26
+ * @param {string} html
27
+ * @returns {any}
28
+ */
29
+ check_element(html) {
30
+ const ptr0 = passStringToWasm0(html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
31
+ const len0 = WASM_VECTOR_LEN;
32
+ const ret = wasm.compatengine_check_element(this.__wbg_ptr, ptr0, len0);
33
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
34
+ return takeFromExternrefTable0(ret[0]);
35
+ }
36
+ /**
37
+ * Used for checking the compatibility of multiple elements and their attributes
38
+ *
39
+ * `depth_level` is used to control how far down in a nested HTML structure to go before
40
+ * returning element tags.
41
+ *
42
+ * See [`preprocess::pre_process_html`] to learn more about how `depth_level` works.
43
+ * @param {string} html
44
+ * @param {number} depth_level
45
+ * @returns {any}
46
+ */
47
+ check_elements(html, depth_level) {
48
+ const ptr0 = passStringToWasm0(html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
49
+ const len0 = WASM_VECTOR_LEN;
50
+ const ret = wasm.compatengine_check_elements(this.__wbg_ptr, ptr0, len0, depth_level);
51
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
52
+ return takeFromExternrefTable0(ret[0]);
53
+ }
54
+ /**
55
+ * Used for performing a full page compatibility check.
56
+ * @param {string} html
57
+ * @returns {any}
58
+ */
59
+ full_inspect(html) {
60
+ const ptr0 = passStringToWasm0(html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
61
+ const len0 = WASM_VECTOR_LEN;
62
+ const ret = wasm.compatengine_full_inspect(this.__wbg_ptr, ptr0, len0);
63
+ if (ret[2]) throw takeFromExternrefTable0(ret[1]);
64
+ return takeFromExternrefTable0(ret[0]);
65
+ }
66
+ /**
67
+ * Constructs an new engine instance
68
+ * @param {any} bcd_html_data
69
+ * @param {any} bcd_svg_data
70
+ * @param {any} bcd_browser_data
71
+ * @param {any} ciu_usage_data
72
+ */
73
+ constructor(bcd_html_data, bcd_svg_data, bcd_browser_data, ciu_usage_data) {
74
+ this.__wbg_ptr = wasm.compatengine_new(bcd_html_data, bcd_svg_data, bcd_browser_data, ciu_usage_data) >>> 0;
75
+ CompatEngineFinalization.register(this, this.__wbg_ptr, this);
76
+ return this;
77
+ }
78
+ };
79
+ if (Symbol.dispose) CompatEngine.prototype[Symbol.dispose] = CompatEngine.prototype.free;
80
+ function __wbg_get_imports() {
81
+ const import0 = {
82
+ __proto__: null,
83
+ __wbg_Error_960c155d3d49e4c2: function(arg0, arg1) {
84
+ return Error(getStringFromWasm0(arg0, arg1));
85
+ },
86
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
87
+ const ptr1 = passStringToWasm0(String(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
88
+ const len1 = WASM_VECTOR_LEN;
89
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
90
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
91
+ },
92
+ __wbg___wbindgen_bigint_get_as_i64_3d3aba5d616c6a51: function(arg0, arg1) {
93
+ const v = arg1;
94
+ const ret = typeof v === "bigint" ? v : void 0;
95
+ getDataViewMemory0().setBigInt64(arg0 + 8, isLikeNone(ret) ? BigInt(0) : ret, true);
96
+ getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
97
+ },
98
+ __wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff: function(arg0) {
99
+ const v = arg0;
100
+ const ret = typeof v === "boolean" ? v : void 0;
101
+ return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
102
+ },
103
+ __wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) {
104
+ const ptr1 = passStringToWasm0(debugString(arg1), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
105
+ const len1 = WASM_VECTOR_LEN;
106
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
107
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
108
+ },
109
+ __wbg___wbindgen_in_a5d8b22e52b24dd1: function(arg0, arg1) {
110
+ return arg0 in arg1;
111
+ },
112
+ __wbg___wbindgen_is_bigint_ec25c7f91b4d9e93: function(arg0) {
113
+ return typeof arg0 === "bigint";
114
+ },
115
+ __wbg___wbindgen_is_function_3baa9db1a987f47d: function(arg0) {
116
+ return typeof arg0 === "function";
117
+ },
118
+ __wbg___wbindgen_is_object_63322ec0cd6ea4ef: function(arg0) {
119
+ const val = arg0;
120
+ return typeof val === "object" && val !== null;
121
+ },
122
+ __wbg___wbindgen_is_string_6df3bf7ef1164ed3: function(arg0) {
123
+ return typeof arg0 === "string";
124
+ },
125
+ __wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) {
126
+ return arg0 === void 0;
127
+ },
128
+ __wbg___wbindgen_jsval_eq_d3465d8a07697228: function(arg0, arg1) {
129
+ return arg0 === arg1;
130
+ },
131
+ __wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c: function(arg0, arg1) {
132
+ return arg0 == arg1;
133
+ },
134
+ __wbg___wbindgen_number_get_c7f42aed0525c451: function(arg0, arg1) {
135
+ const obj = arg1;
136
+ const ret = typeof obj === "number" ? obj : void 0;
137
+ getDataViewMemory0().setFloat64(arg0 + 8, isLikeNone(ret) ? 0 : ret, true);
138
+ getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
139
+ },
140
+ __wbg___wbindgen_string_get_7ed5322991caaec5: function(arg0, arg1) {
141
+ const obj = arg1;
142
+ const ret = typeof obj === "string" ? obj : void 0;
143
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
144
+ var len1 = WASM_VECTOR_LEN;
145
+ getDataViewMemory0().setInt32(arg0 + 4, len1, true);
146
+ getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
147
+ },
148
+ __wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
149
+ throw new Error(getStringFromWasm0(arg0, arg1));
150
+ },
151
+ __wbg_call_14b169f759b26747: function() {
152
+ return handleError(function(arg0, arg1) {
153
+ return arg0.call(arg1);
154
+ }, arguments);
155
+ },
156
+ __wbg_done_9158f7cc8751ba32: function(arg0) {
157
+ return arg0.done;
158
+ },
159
+ __wbg_entries_e0b73aa8571ddb56: function(arg0) {
160
+ return Object.entries(arg0);
161
+ },
162
+ __wbg_error_2001591ad2463697: function(arg0) {
163
+ console.error(arg0);
164
+ },
165
+ __wbg_get_1affdbdd5573b16a: function() {
166
+ return handleError(function(arg0, arg1) {
167
+ return Reflect.get(arg0, arg1);
168
+ }, arguments);
169
+ },
170
+ __wbg_get_8360291721e2339f: function(arg0, arg1) {
171
+ return arg0[arg1 >>> 0];
172
+ },
173
+ __wbg_get_unchecked_17f53dad852b9588: function(arg0, arg1) {
174
+ return arg0[arg1 >>> 0];
175
+ },
176
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
177
+ return arg0[arg1];
178
+ },
179
+ __wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3: function(arg0) {
180
+ let result;
181
+ try {
182
+ result = arg0 instanceof ArrayBuffer;
183
+ } catch (_) {
184
+ result = false;
185
+ }
186
+ return result;
187
+ },
188
+ __wbg_instanceof_Map_1b76fd4635be43eb: function(arg0) {
189
+ let result;
190
+ try {
191
+ result = arg0 instanceof Map;
192
+ } catch (_) {
193
+ result = false;
194
+ }
195
+ return result;
196
+ },
197
+ __wbg_instanceof_Uint8Array_152ba1f289edcf3f: function(arg0) {
198
+ let result;
199
+ try {
200
+ result = arg0 instanceof Uint8Array;
201
+ } catch (_) {
202
+ result = false;
203
+ }
204
+ return result;
205
+ },
206
+ __wbg_isArray_c3109d14ffc06469: function(arg0) {
207
+ return Array.isArray(arg0);
208
+ },
209
+ __wbg_isSafeInteger_4fc213d1989d6d2a: function(arg0) {
210
+ return Number.isSafeInteger(arg0);
211
+ },
212
+ __wbg_iterator_013bc09ec998c2a7: function() {
213
+ return Symbol.iterator;
214
+ },
215
+ __wbg_length_3d4ecd04bd8d22f1: function(arg0) {
216
+ return arg0.length;
217
+ },
218
+ __wbg_length_9f1775224cf1d815: function(arg0) {
219
+ return arg0.length;
220
+ },
221
+ __wbg_new_0c7403db6e782f19: function(arg0) {
222
+ return new Uint8Array(arg0);
223
+ },
224
+ __wbg_new_34d45cc8e36aaead: function() {
225
+ return /* @__PURE__ */ new Map();
226
+ },
227
+ __wbg_new_682678e2f47e32bc: function() {
228
+ return new Array();
229
+ },
230
+ __wbg_new_aa8d0fa9762c29bd: function() {
231
+ return /* @__PURE__ */ new Object();
232
+ },
233
+ __wbg_next_0340c4ae324393c3: function() {
234
+ return handleError(function(arg0) {
235
+ return arg0.next();
236
+ }, arguments);
237
+ },
238
+ __wbg_next_7646edaa39458ef7: function(arg0) {
239
+ return arg0.next;
240
+ },
241
+ __wbg_prototypesetcall_a6b02eb00b0f4ce2: function(arg0, arg1, arg2) {
242
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
243
+ },
244
+ __wbg_set_3bf1de9fab0cd644: function(arg0, arg1, arg2) {
245
+ arg0[arg1 >>> 0] = arg2;
246
+ },
247
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
248
+ arg0[arg1] = arg2;
249
+ },
250
+ __wbg_set_fde2cec06c23692b: function(arg0, arg1, arg2) {
251
+ return arg0.set(arg1, arg2);
252
+ },
253
+ __wbg_value_ee3a06f4579184fa: function(arg0) {
254
+ return arg0.value;
255
+ },
256
+ __wbindgen_cast_0000000000000001: function(arg0) {
257
+ return arg0;
258
+ },
259
+ __wbindgen_cast_0000000000000002: function(arg0) {
260
+ return arg0;
261
+ },
262
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
263
+ return getStringFromWasm0(arg0, arg1);
264
+ },
265
+ __wbindgen_cast_0000000000000004: function(arg0) {
266
+ return BigInt.asUintN(64, arg0);
267
+ },
268
+ __wbindgen_init_externref_table: function() {
269
+ const table = wasm.__wbindgen_externrefs;
270
+ const offset = table.grow(4);
271
+ table.set(0, void 0);
272
+ table.set(offset + 0, void 0);
273
+ table.set(offset + 1, null);
274
+ table.set(offset + 2, true);
275
+ table.set(offset + 3, false);
276
+ }
277
+ };
278
+ return {
279
+ __proto__: null,
280
+ "./shinkore_bg.js": import0
281
+ };
282
+ }
283
+ const CompatEngineFinalization = typeof FinalizationRegistry === "undefined" ? {
284
+ register: () => {},
285
+ unregister: () => {}
286
+ } : new FinalizationRegistry((ptr) => wasm.__wbg_compatengine_free(ptr >>> 0, 1));
287
+ function addToExternrefTable0(obj) {
288
+ const idx = wasm.__externref_table_alloc();
289
+ wasm.__wbindgen_externrefs.set(idx, obj);
290
+ return idx;
291
+ }
292
+ function debugString(val) {
293
+ const type = typeof val;
294
+ if (type == "number" || type == "boolean" || val == null) return `${val}`;
295
+ if (type == "string") return `"${val}"`;
296
+ if (type == "symbol") {
297
+ const description = val.description;
298
+ if (description == null) return "Symbol";
299
+ else return `Symbol(${description})`;
300
+ }
301
+ if (type == "function") {
302
+ const name = val.name;
303
+ if (typeof name == "string" && name.length > 0) return `Function(${name})`;
304
+ else return "Function";
305
+ }
306
+ if (Array.isArray(val)) {
307
+ const length = val.length;
308
+ let debug = "[";
309
+ if (length > 0) debug += debugString(val[0]);
310
+ for (let i = 1; i < length; i++) debug += ", " + debugString(val[i]);
311
+ debug += "]";
312
+ return debug;
313
+ }
314
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
315
+ let className;
316
+ if (builtInMatches && builtInMatches.length > 1) className = builtInMatches[1];
317
+ else return toString.call(val);
318
+ if (className == "Object") try {
319
+ return "Object(" + JSON.stringify(val) + ")";
320
+ } catch (_) {
321
+ return "Object";
322
+ }
323
+ if (val instanceof Error) return `${val.name}: ${val.message}\n${val.stack}`;
324
+ return className;
325
+ }
326
+ function getArrayU8FromWasm0(ptr, len) {
327
+ ptr = ptr >>> 0;
328
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
329
+ }
330
+ let cachedDataViewMemory0 = null;
331
+ function getDataViewMemory0() {
332
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
333
+ return cachedDataViewMemory0;
334
+ }
335
+ function getStringFromWasm0(ptr, len) {
336
+ ptr = ptr >>> 0;
337
+ return decodeText(ptr, len);
338
+ }
339
+ let cachedUint8ArrayMemory0 = null;
340
+ function getUint8ArrayMemory0() {
341
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
342
+ return cachedUint8ArrayMemory0;
343
+ }
344
+ function handleError(f, args) {
345
+ try {
346
+ return f.apply(this, args);
347
+ } catch (e) {
348
+ const idx = addToExternrefTable0(e);
349
+ wasm.__wbindgen_exn_store(idx);
350
+ }
351
+ }
352
+ function isLikeNone(x) {
353
+ return x === void 0 || x === null;
354
+ }
355
+ function passStringToWasm0(arg, malloc, realloc) {
356
+ if (realloc === void 0) {
357
+ const buf = cachedTextEncoder.encode(arg);
358
+ const ptr = malloc(buf.length, 1) >>> 0;
359
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
360
+ WASM_VECTOR_LEN = buf.length;
361
+ return ptr;
362
+ }
363
+ let len = arg.length;
364
+ let ptr = malloc(len, 1) >>> 0;
365
+ const mem = getUint8ArrayMemory0();
366
+ let offset = 0;
367
+ for (; offset < len; offset++) {
368
+ const code = arg.charCodeAt(offset);
369
+ if (code > 127) break;
370
+ mem[ptr + offset] = code;
371
+ }
372
+ if (offset !== len) {
373
+ if (offset !== 0) arg = arg.slice(offset);
374
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
375
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
376
+ const ret = cachedTextEncoder.encodeInto(arg, view);
377
+ offset += ret.written;
378
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
379
+ }
380
+ WASM_VECTOR_LEN = offset;
381
+ return ptr;
382
+ }
383
+ function takeFromExternrefTable0(idx) {
384
+ const value = wasm.__wbindgen_externrefs.get(idx);
385
+ wasm.__externref_table_dealloc(idx);
386
+ return value;
387
+ }
388
+ let cachedTextDecoder = new TextDecoder("utf-8", {
389
+ ignoreBOM: true,
390
+ fatal: true
391
+ });
392
+ cachedTextDecoder.decode();
393
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
394
+ let numBytesDecoded = 0;
395
+ function decodeText(ptr, len) {
396
+ numBytesDecoded += len;
397
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
398
+ cachedTextDecoder = new TextDecoder("utf-8", {
399
+ ignoreBOM: true,
400
+ fatal: true
401
+ });
402
+ cachedTextDecoder.decode();
403
+ numBytesDecoded = len;
404
+ }
405
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
406
+ }
407
+ const cachedTextEncoder = new TextEncoder();
408
+ if (!("encodeInto" in cachedTextEncoder)) cachedTextEncoder.encodeInto = function(arg, view) {
409
+ const buf = cachedTextEncoder.encode(arg);
410
+ view.set(buf);
411
+ return {
412
+ read: arg.length,
413
+ written: buf.length
414
+ };
415
+ };
416
+ let WASM_VECTOR_LEN = 0, wasm;
417
+ function __wbg_finalize_init(instance, module) {
418
+ wasm = instance.exports;
419
+ cachedDataViewMemory0 = null;
420
+ cachedUint8ArrayMemory0 = null;
421
+ wasm.__wbindgen_start();
422
+ return wasm;
423
+ }
424
+ async function __wbg_load(module, imports) {
425
+ if (typeof Response === "function" && module instanceof Response) {
426
+ if (typeof WebAssembly.instantiateStreaming === "function") try {
427
+ return await WebAssembly.instantiateStreaming(module, imports);
428
+ } catch (e) {
429
+ if (module.ok && expectedResponseType(module.type) && module.headers.get("Content-Type") !== "application/wasm") console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
430
+ else throw e;
431
+ }
432
+ const bytes = await module.arrayBuffer();
433
+ return await WebAssembly.instantiate(bytes, imports);
434
+ } else {
435
+ const instance = await WebAssembly.instantiate(module, imports);
436
+ if (instance instanceof WebAssembly.Instance) return {
437
+ instance,
438
+ module
439
+ };
440
+ else return instance;
441
+ }
442
+ function expectedResponseType(type) {
443
+ switch (type) {
444
+ case "basic":
445
+ case "cors":
446
+ case "default": return true;
447
+ }
448
+ return false;
449
+ }
450
+ }
451
+ async function __wbg_init(module_or_path) {
452
+ if (wasm !== void 0) return wasm;
453
+ if (module_or_path !== void 0) if (Object.getPrototypeOf(module_or_path) === Object.prototype) ({module_or_path} = module_or_path);
454
+ else console.warn("using deprecated parameters for the initialization function; pass a single object instead");
455
+ if (module_or_path === void 0) module_or_path = new URL("shinkore_bg.wasm", import.meta.url);
456
+ const imports = __wbg_get_imports();
457
+ if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) module_or_path = fetch(module_or_path);
458
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
459
+ return __wbg_finalize_init(instance, module);
460
+ }
461
+ //#endregion
462
+ export { CompatEngine, __wbg_init };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Shinkom - shinkom
3
+ * @version 1.0.0
4
+ * @license MIT
5
+ * @copyright 2026 - OneilNvM
6
+ */
7
+
8
+ import { CompatUI } from "./ui/compat-ui/compat-ui.js";
9
+ import { SKEngine } from "./engine/engine.js";
10
+ import { ShinkomConfig as ShinkomConfig$1 } from "./types/public.js";
11
+
12
+ //#region src/shinkom.d.ts
13
+ declare class Shinkom {
14
+ /**
15
+ * @param {ShinkomConfig | undefined} config
16
+ */
17
+ constructor(config?: ShinkomConfig | undefined);
18
+ /**@type {SKEngine} */
19
+ skEngine: SKEngine;
20
+ /**@type {CompatUI} */
21
+ compatUI: CompatUI;
22
+ /**
23
+ * Initialize Shinkom.
24
+ */
25
+ init(): Promise<void>;
26
+ /**
27
+ * Destroy UI components and engine instance.
28
+ */
29
+ destroy(): void;
30
+ #private;
31
+ }
32
+ type ShinkomConfig = ShinkomConfig$1;
33
+ //#endregion
34
+ export { Shinkom, ShinkomConfig };