@hypen-space/core 0.4.5 → 0.4.11

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 (50) hide show
  1. package/dist/app.js +171 -171
  2. package/dist/app.js.map +4 -4
  3. package/dist/components/builtin.js +171 -171
  4. package/dist/components/builtin.js.map +4 -4
  5. package/dist/context.js +1 -1
  6. package/dist/context.js.map +1 -1
  7. package/dist/discovery.js +171 -171
  8. package/dist/discovery.js.map +4 -4
  9. package/dist/disposable.js +1 -1
  10. package/dist/disposable.js.map +1 -1
  11. package/dist/engine.browser.js +1 -1
  12. package/dist/engine.browser.js.map +1 -1
  13. package/dist/engine.js +1 -1
  14. package/dist/engine.js.map +1 -1
  15. package/dist/events.js +1 -1
  16. package/dist/events.js.map +1 -1
  17. package/dist/index.browser.js +171 -171
  18. package/dist/index.browser.js.map +4 -4
  19. package/dist/index.js +171 -171
  20. package/dist/index.js.map +4 -4
  21. package/dist/loader.js +1 -1
  22. package/dist/loader.js.map +1 -1
  23. package/dist/logger.js +245 -0
  24. package/dist/logger.js.map +10 -0
  25. package/dist/plugin.js +1 -1
  26. package/dist/plugin.js.map +1 -1
  27. package/dist/remote/client.js +1 -1
  28. package/dist/remote/client.js.map +1 -1
  29. package/dist/remote/index.js +171 -171
  30. package/dist/remote/index.js.map +4 -4
  31. package/dist/remote/server.js +171 -171
  32. package/dist/remote/server.js.map +4 -4
  33. package/dist/renderer.js +1 -1
  34. package/dist/renderer.js.map +1 -1
  35. package/dist/router.js +1 -1
  36. package/dist/router.js.map +1 -1
  37. package/dist/types.d.ts +1 -1
  38. package/dist/types.js +2 -0
  39. package/dist/types.js.map +9 -0
  40. package/package.json +1 -1
  41. package/src/types.ts +1 -1
  42. package/wasm-browser/hypen_engine.d.ts +3 -3
  43. package/wasm-browser/hypen_engine.js +73 -66
  44. package/wasm-browser/hypen_engine_bg.wasm +0 -0
  45. package/wasm-browser/hypen_engine_bg.wasm.d.ts +3 -3
  46. package/wasm-browser/package.json +1 -1
  47. package/wasm-node/hypen_engine.js +74 -66
  48. package/wasm-node/hypen_engine_bg.wasm +0 -0
  49. package/wasm-node/hypen_engine_bg.wasm.d.ts +3 -3
  50. package/wasm-node/package.json +1 -1
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+
2
+ //# debugId=9FCB033A2878230664756E2164756E21
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [
5
+ ],
6
+ "mappings": "",
7
+ "debugId": "9FCB033A2878230664756E2164756E21",
8
+ "names": []
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypen-space/core",
3
- "version": "0.4.5",
3
+ "version": "0.4.11",
4
4
  "description": "Hypen core engine - Platform-agnostic reactive UI runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/types.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  export type Patch = {
9
- type: "create" | "setProp" | "setText" | "insert" | "move" | "remove" | "attachEvent" | "detachEvent";
9
+ type: "create" | "setProp" | "removeProp" | "setText" | "insert" | "move" | "remove" | "attachEvent" | "detachEvent";
10
10
  id?: string;
11
11
  elementType?: string;
12
12
  props?: Record<string, any>;
@@ -120,11 +120,11 @@ export interface InitOutput {
120
120
  readonly parseToJson: (a: number, b: number) => [number, number, number, number];
121
121
  readonly main: () => void;
122
122
  readonly wasmengine_renderSource: (a: number, b: number, c: number) => [number, number];
123
- readonly __wbindgen_exn_store: (a: number) => void;
124
- readonly __externref_table_alloc: () => number;
125
- readonly __wbindgen_export_2: WebAssembly.Table;
126
123
  readonly __wbindgen_malloc: (a: number, b: number) => number;
127
124
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
125
+ readonly __wbindgen_exn_store: (a: number) => void;
126
+ readonly __externref_table_alloc: () => number;
127
+ readonly __wbindgen_export_4: WebAssembly.Table;
128
128
  readonly __externref_table_dealloc: (a: number) => void;
129
129
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
130
130
  readonly __wbindgen_start: () => void;
@@ -30,9 +30,72 @@ function getStringFromWasm0(ptr, len) {
30
30
  return decodeText(ptr, len);
31
31
  }
32
32
 
33
+ let WASM_VECTOR_LEN = 0;
34
+
35
+ const cachedTextEncoder = new TextEncoder();
36
+
37
+ if (!('encodeInto' in cachedTextEncoder)) {
38
+ cachedTextEncoder.encodeInto = function (arg, view) {
39
+ const buf = cachedTextEncoder.encode(arg);
40
+ view.set(buf);
41
+ return {
42
+ read: arg.length,
43
+ written: buf.length
44
+ };
45
+ }
46
+ }
47
+
48
+ function passStringToWasm0(arg, malloc, realloc) {
49
+
50
+ if (realloc === undefined) {
51
+ const buf = cachedTextEncoder.encode(arg);
52
+ const ptr = malloc(buf.length, 1) >>> 0;
53
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
54
+ WASM_VECTOR_LEN = buf.length;
55
+ return ptr;
56
+ }
57
+
58
+ let len = arg.length;
59
+ let ptr = malloc(len, 1) >>> 0;
60
+
61
+ const mem = getUint8ArrayMemory0();
62
+
63
+ let offset = 0;
64
+
65
+ for (; offset < len; offset++) {
66
+ const code = arg.charCodeAt(offset);
67
+ if (code > 0x7F) break;
68
+ mem[ptr + offset] = code;
69
+ }
70
+
71
+ if (offset !== len) {
72
+ if (offset !== 0) {
73
+ arg = arg.slice(offset);
74
+ }
75
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
76
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
77
+ const ret = cachedTextEncoder.encodeInto(arg, view);
78
+
79
+ offset += ret.written;
80
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
81
+ }
82
+
83
+ WASM_VECTOR_LEN = offset;
84
+ return ptr;
85
+ }
86
+
87
+ let cachedDataViewMemory0 = null;
88
+
89
+ function getDataViewMemory0() {
90
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
91
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
92
+ }
93
+ return cachedDataViewMemory0;
94
+ }
95
+
33
96
  function addToExternrefTable0(obj) {
34
97
  const idx = wasm.__externref_table_alloc();
35
- wasm.__wbindgen_export_2.set(idx, obj);
98
+ wasm.__wbindgen_export_4.set(idx, obj);
36
99
  return idx;
37
100
  }
38
101
 
@@ -54,15 +117,6 @@ function isLikeNone(x) {
54
117
  return x === undefined || x === null;
55
118
  }
56
119
 
57
- let cachedDataViewMemory0 = null;
58
-
59
- function getDataViewMemory0() {
60
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
61
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
62
- }
63
- return cachedDataViewMemory0;
64
- }
65
-
66
120
  function debugString(val) {
67
121
  // primitive types
68
122
  const type = typeof val;
@@ -128,62 +182,8 @@ function debugString(val) {
128
182
  return className;
129
183
  }
130
184
 
131
- let WASM_VECTOR_LEN = 0;
132
-
133
- const cachedTextEncoder = new TextEncoder();
134
-
135
- if (!('encodeInto' in cachedTextEncoder)) {
136
- cachedTextEncoder.encodeInto = function (arg, view) {
137
- const buf = cachedTextEncoder.encode(arg);
138
- view.set(buf);
139
- return {
140
- read: arg.length,
141
- written: buf.length
142
- };
143
- }
144
- }
145
-
146
- function passStringToWasm0(arg, malloc, realloc) {
147
-
148
- if (realloc === undefined) {
149
- const buf = cachedTextEncoder.encode(arg);
150
- const ptr = malloc(buf.length, 1) >>> 0;
151
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
152
- WASM_VECTOR_LEN = buf.length;
153
- return ptr;
154
- }
155
-
156
- let len = arg.length;
157
- let ptr = malloc(len, 1) >>> 0;
158
-
159
- const mem = getUint8ArrayMemory0();
160
-
161
- let offset = 0;
162
-
163
- for (; offset < len; offset++) {
164
- const code = arg.charCodeAt(offset);
165
- if (code > 0x7F) break;
166
- mem[ptr + offset] = code;
167
- }
168
-
169
- if (offset !== len) {
170
- if (offset !== 0) {
171
- arg = arg.slice(offset);
172
- }
173
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
174
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
175
- const ret = cachedTextEncoder.encodeInto(arg, view);
176
-
177
- offset += ret.written;
178
- ptr = realloc(ptr, len, offset, 1) >>> 0;
179
- }
180
-
181
- WASM_VECTOR_LEN = offset;
182
- return ptr;
183
- }
184
-
185
185
  function takeFromExternrefTable0(idx) {
186
- const value = wasm.__wbindgen_export_2.get(idx);
186
+ const value = wasm.__wbindgen_export_4.get(idx);
187
187
  wasm.__externref_table_dealloc(idx);
188
188
  return value;
189
189
  }
@@ -509,6 +509,13 @@ function __wbg_get_imports() {
509
509
  const ret = Error(getStringFromWasm0(arg0, arg1));
510
510
  return ret;
511
511
  };
512
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
513
+ const ret = String(arg1);
514
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
515
+ const len1 = WASM_VECTOR_LEN;
516
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
517
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
518
+ };
512
519
  imports.wbg.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
513
520
  const ret = arg0.call(arg1);
514
521
  return ret;
@@ -727,7 +734,7 @@ function __wbg_get_imports() {
727
734
  return ret;
728
735
  };
729
736
  imports.wbg.__wbindgen_init_externref_table = function() {
730
- const table = wasm.__wbindgen_export_2;
737
+ const table = wasm.__wbindgen_export_4;
731
738
  const offset = table.grow(4);
732
739
  table.set(0, undefined);
733
740
  table.set(offset + 0, undefined);
Binary file
@@ -20,11 +20,11 @@ export const patchesToJson: (a: any) => [number, number, number, number];
20
20
  export const parseToJson: (a: number, b: number) => [number, number, number, number];
21
21
  export const main: () => void;
22
22
  export const wasmengine_renderSource: (a: number, b: number, c: number) => [number, number];
23
- export const __wbindgen_exn_store: (a: number) => void;
24
- export const __externref_table_alloc: () => number;
25
- export const __wbindgen_export_2: WebAssembly.Table;
26
23
  export const __wbindgen_malloc: (a: number, b: number) => number;
27
24
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
25
+ export const __wbindgen_exn_store: (a: number) => void;
26
+ export const __externref_table_alloc: () => number;
27
+ export const __wbindgen_export_4: WebAssembly.Table;
28
28
  export const __externref_table_dealloc: (a: number) => void;
29
29
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
30
30
  export const __wbindgen_start: () => void;
@@ -5,7 +5,7 @@
5
5
  "Hypen Contributors"
6
6
  ],
7
7
  "description": "A Rust implementation of the Hypen engine",
8
- "version": "0.4.2",
8
+ "version": "0.4.11",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
@@ -24,9 +24,72 @@ function getStringFromWasm0(ptr, len) {
24
24
  return decodeText(ptr, len);
25
25
  }
26
26
 
27
+ let WASM_VECTOR_LEN = 0;
28
+
29
+ const cachedTextEncoder = new TextEncoder();
30
+
31
+ if (!('encodeInto' in cachedTextEncoder)) {
32
+ cachedTextEncoder.encodeInto = function (arg, view) {
33
+ const buf = cachedTextEncoder.encode(arg);
34
+ view.set(buf);
35
+ return {
36
+ read: arg.length,
37
+ written: buf.length
38
+ };
39
+ }
40
+ }
41
+
42
+ function passStringToWasm0(arg, malloc, realloc) {
43
+
44
+ if (realloc === undefined) {
45
+ const buf = cachedTextEncoder.encode(arg);
46
+ const ptr = malloc(buf.length, 1) >>> 0;
47
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
48
+ WASM_VECTOR_LEN = buf.length;
49
+ return ptr;
50
+ }
51
+
52
+ let len = arg.length;
53
+ let ptr = malloc(len, 1) >>> 0;
54
+
55
+ const mem = getUint8ArrayMemory0();
56
+
57
+ let offset = 0;
58
+
59
+ for (; offset < len; offset++) {
60
+ const code = arg.charCodeAt(offset);
61
+ if (code > 0x7F) break;
62
+ mem[ptr + offset] = code;
63
+ }
64
+
65
+ if (offset !== len) {
66
+ if (offset !== 0) {
67
+ arg = arg.slice(offset);
68
+ }
69
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
70
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
71
+ const ret = cachedTextEncoder.encodeInto(arg, view);
72
+
73
+ offset += ret.written;
74
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
75
+ }
76
+
77
+ WASM_VECTOR_LEN = offset;
78
+ return ptr;
79
+ }
80
+
81
+ let cachedDataViewMemory0 = null;
82
+
83
+ function getDataViewMemory0() {
84
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
85
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
86
+ }
87
+ return cachedDataViewMemory0;
88
+ }
89
+
27
90
  function addToExternrefTable0(obj) {
28
91
  const idx = wasm.__externref_table_alloc();
29
- wasm.__wbindgen_export_2.set(idx, obj);
92
+ wasm.__wbindgen_export_4.set(idx, obj);
30
93
  return idx;
31
94
  }
32
95
 
@@ -48,15 +111,6 @@ function isLikeNone(x) {
48
111
  return x === undefined || x === null;
49
112
  }
50
113
 
51
- let cachedDataViewMemory0 = null;
52
-
53
- function getDataViewMemory0() {
54
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
55
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
56
- }
57
- return cachedDataViewMemory0;
58
- }
59
-
60
114
  function debugString(val) {
61
115
  // primitive types
62
116
  const type = typeof val;
@@ -122,62 +176,8 @@ function debugString(val) {
122
176
  return className;
123
177
  }
124
178
 
125
- let WASM_VECTOR_LEN = 0;
126
-
127
- const cachedTextEncoder = new TextEncoder();
128
-
129
- if (!('encodeInto' in cachedTextEncoder)) {
130
- cachedTextEncoder.encodeInto = function (arg, view) {
131
- const buf = cachedTextEncoder.encode(arg);
132
- view.set(buf);
133
- return {
134
- read: arg.length,
135
- written: buf.length
136
- };
137
- }
138
- }
139
-
140
- function passStringToWasm0(arg, malloc, realloc) {
141
-
142
- if (realloc === undefined) {
143
- const buf = cachedTextEncoder.encode(arg);
144
- const ptr = malloc(buf.length, 1) >>> 0;
145
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
146
- WASM_VECTOR_LEN = buf.length;
147
- return ptr;
148
- }
149
-
150
- let len = arg.length;
151
- let ptr = malloc(len, 1) >>> 0;
152
-
153
- const mem = getUint8ArrayMemory0();
154
-
155
- let offset = 0;
156
-
157
- for (; offset < len; offset++) {
158
- const code = arg.charCodeAt(offset);
159
- if (code > 0x7F) break;
160
- mem[ptr + offset] = code;
161
- }
162
-
163
- if (offset !== len) {
164
- if (offset !== 0) {
165
- arg = arg.slice(offset);
166
- }
167
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
168
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
169
- const ret = cachedTextEncoder.encodeInto(arg, view);
170
-
171
- offset += ret.written;
172
- ptr = realloc(ptr, len, offset, 1) >>> 0;
173
- }
174
-
175
- WASM_VECTOR_LEN = offset;
176
- return ptr;
177
- }
178
-
179
179
  function takeFromExternrefTable0(idx) {
180
- const value = wasm.__wbindgen_export_2.get(idx);
180
+ const value = wasm.__wbindgen_export_4.get(idx);
181
181
  wasm.__externref_table_dealloc(idx);
182
182
  return value;
183
183
  }
@@ -468,6 +468,14 @@ exports.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
468
468
  return ret;
469
469
  };
470
470
 
471
+ exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
472
+ const ret = String(arg1);
473
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
474
+ const len1 = WASM_VECTOR_LEN;
475
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
476
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
477
+ };
478
+
471
479
  exports.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
472
480
  const ret = arg0.call(arg1);
473
481
  return ret;
@@ -733,7 +741,7 @@ exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
733
741
  };
734
742
 
735
743
  exports.__wbindgen_init_externref_table = function() {
736
- const table = wasm.__wbindgen_export_2;
744
+ const table = wasm.__wbindgen_export_4;
737
745
  const offset = table.grow(4);
738
746
  table.set(0, undefined);
739
747
  table.set(offset + 0, undefined);
Binary file
@@ -20,11 +20,11 @@ export const patchesToJson: (a: any) => [number, number, number, number];
20
20
  export const parseToJson: (a: number, b: number) => [number, number, number, number];
21
21
  export const main: () => void;
22
22
  export const wasmengine_renderSource: (a: number, b: number, c: number) => [number, number];
23
- export const __wbindgen_exn_store: (a: number) => void;
24
- export const __externref_table_alloc: () => number;
25
- export const __wbindgen_export_2: WebAssembly.Table;
26
23
  export const __wbindgen_malloc: (a: number, b: number) => number;
27
24
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
25
+ export const __wbindgen_exn_store: (a: number) => void;
26
+ export const __externref_table_alloc: () => number;
27
+ export const __wbindgen_export_4: WebAssembly.Table;
28
28
  export const __externref_table_dealloc: (a: number) => void;
29
29
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
30
30
  export const __wbindgen_start: () => void;
@@ -4,7 +4,7 @@
4
4
  "Hypen Contributors"
5
5
  ],
6
6
  "description": "A Rust implementation of the Hypen engine",
7
- "version": "0.4.2",
7
+ "version": "0.4.11",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",