@yodaos-pkg/aix 0.6.0-daily.202607210233 → 0.7.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.
- package/README.md +16 -9
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/pkg/README.md +16 -9
- package/pkg/aix_web.d.ts +13 -11
- package/pkg/aix_web.js +83 -157
- package/pkg/aix_web_bg.wasm +0 -0
- package/pkg/aix_web_bg.wasm.d.ts +13 -11
- package/pkg/package.json +3 -4
package/README.md
CHANGED
|
@@ -30,11 +30,11 @@ async function fromFile(file: File) {
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
## Using the
|
|
33
|
+
## Using the Package Lab
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
The official browser lab now lives in the docs site at `/play`.
|
|
36
36
|
|
|
37
|
-
If you are developing inside this repository, install dependencies in `
|
|
37
|
+
If you are developing inside this repository, install dependencies in `crates/aix-web` first:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
npm install
|
|
@@ -46,28 +46,35 @@ npm install
|
|
|
46
46
|
npm run build
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
This step builds the `aix-web` WebAssembly bundle and TypeScript output into `dist/`, which is what the
|
|
49
|
+
This step builds the `aix-web` WebAssembly bundle and TypeScript output into `dist/`, which is what the docs-integrated Package Lab loads.
|
|
50
50
|
|
|
51
|
-
2.
|
|
51
|
+
2. Install the docs dependencies:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cd ../../docs
|
|
55
|
+
npm install
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3. Start the docs site:
|
|
52
59
|
|
|
53
60
|
```bash
|
|
54
61
|
npm run dev
|
|
55
62
|
```
|
|
56
63
|
|
|
57
|
-
|
|
64
|
+
4. Open the local VitePress URL shown in the terminal, then navigate to `/play`, usually:
|
|
58
65
|
|
|
59
66
|
```text
|
|
60
|
-
http://localhost:5173
|
|
67
|
+
http://localhost:5173/aix/play
|
|
61
68
|
```
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
5. Upload an `.aix` file in the page to inspect:
|
|
64
71
|
|
|
65
72
|
- package title and version
|
|
66
73
|
- parsed `pages`
|
|
67
74
|
- generated OpenAI-compatible `tools`
|
|
68
75
|
- package file list and raw file contents
|
|
69
76
|
|
|
70
|
-
This is useful for verifying whether `app.json`, page schemas, and `getTools()` output match expectations while developing or debugging an AIX package.
|
|
77
|
+
This is useful for verifying whether `app.json`, page schemas, and `getTools()` output match expectations while developing or debugging an AIX package inside the official docs experience.
|
|
71
78
|
|
|
72
79
|
## API Reference
|
|
73
80
|
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/pkg/README.md
CHANGED
|
@@ -30,11 +30,11 @@ async function fromFile(file: File) {
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
## Using the
|
|
33
|
+
## Using the Package Lab
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
The official browser lab now lives in the docs site at `/play`.
|
|
36
36
|
|
|
37
|
-
If you are developing inside this repository, install dependencies in `
|
|
37
|
+
If you are developing inside this repository, install dependencies in `crates/aix-web` first:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
npm install
|
|
@@ -46,28 +46,35 @@ npm install
|
|
|
46
46
|
npm run build
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
This step builds the `aix-web` WebAssembly bundle and TypeScript output into `dist/`, which is what the
|
|
49
|
+
This step builds the `aix-web` WebAssembly bundle and TypeScript output into `dist/`, which is what the docs-integrated Package Lab loads.
|
|
50
50
|
|
|
51
|
-
2.
|
|
51
|
+
2. Install the docs dependencies:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cd ../../docs
|
|
55
|
+
npm install
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3. Start the docs site:
|
|
52
59
|
|
|
53
60
|
```bash
|
|
54
61
|
npm run dev
|
|
55
62
|
```
|
|
56
63
|
|
|
57
|
-
|
|
64
|
+
4. Open the local VitePress URL shown in the terminal, then navigate to `/play`, usually:
|
|
58
65
|
|
|
59
66
|
```text
|
|
60
|
-
http://localhost:5173
|
|
67
|
+
http://localhost:5173/aix/play
|
|
61
68
|
```
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
5. Upload an `.aix` file in the page to inspect:
|
|
64
71
|
|
|
65
72
|
- package title and version
|
|
66
73
|
- parsed `pages`
|
|
67
74
|
- generated OpenAI-compatible `tools`
|
|
68
75
|
- package file list and raw file contents
|
|
69
76
|
|
|
70
|
-
This is useful for verifying whether `app.json`, page schemas, and `getTools()` output match expectations while developing or debugging an AIX package.
|
|
77
|
+
This is useful for verifying whether `app.json`, page schemas, and `getTools()` output match expectations while developing or debugging an AIX package inside the official docs experience.
|
|
71
78
|
|
|
72
79
|
## API Reference
|
|
73
80
|
|
package/pkg/aix_web.d.ts
CHANGED
|
@@ -18,17 +18,19 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
18
18
|
export interface InitOutput {
|
|
19
19
|
readonly memory: WebAssembly.Memory;
|
|
20
20
|
readonly __wbg_aixreaderwasm_free: (a: number, b: number) => void;
|
|
21
|
-
readonly aixreaderwasm_get_pages: (a: number
|
|
22
|
-
readonly aixreaderwasm_get_title: (a: number
|
|
23
|
-
readonly aixreaderwasm_get_tools: (a: number
|
|
24
|
-
readonly aixreaderwasm_get_version: (a: number
|
|
25
|
-
readonly aixreaderwasm_list: (a: number
|
|
26
|
-
readonly aixreaderwasm_new: (a: number, b: number
|
|
27
|
-
readonly aixreaderwasm_read_file: (a: number, b: number, c: number,
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
21
|
+
readonly aixreaderwasm_get_pages: (a: number) => [number, number, number];
|
|
22
|
+
readonly aixreaderwasm_get_title: (a: number) => [number, number];
|
|
23
|
+
readonly aixreaderwasm_get_tools: (a: number) => [number, number, number];
|
|
24
|
+
readonly aixreaderwasm_get_version: (a: number) => [number, number];
|
|
25
|
+
readonly aixreaderwasm_list: (a: number) => [number, number, number];
|
|
26
|
+
readonly aixreaderwasm_new: (a: number, b: number) => [number, number, number];
|
|
27
|
+
readonly aixreaderwasm_read_file: (a: number, b: number, c: number) => [number, number, number, number];
|
|
28
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
29
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
30
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
31
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
32
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
33
|
+
readonly __wbindgen_start: () => void;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
package/pkg/aix_web.js
CHANGED
|
@@ -15,214 +15,161 @@ export class AixReaderWasm {
|
|
|
15
15
|
* @returns {any}
|
|
16
16
|
*/
|
|
17
17
|
get_pages() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
22
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
23
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
24
|
-
if (r2) {
|
|
25
|
-
throw takeObject(r1);
|
|
26
|
-
}
|
|
27
|
-
return takeObject(r0);
|
|
28
|
-
} finally {
|
|
29
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
18
|
+
const ret = wasm.aixreaderwasm_get_pages(this.__wbg_ptr);
|
|
19
|
+
if (ret[2]) {
|
|
20
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
30
21
|
}
|
|
22
|
+
return takeFromExternrefTable0(ret[0]);
|
|
31
23
|
}
|
|
32
24
|
/**
|
|
33
25
|
* @returns {string | undefined}
|
|
34
26
|
*/
|
|
35
27
|
get_title() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
let v1;
|
|
42
|
-
if (r0 !== 0) {
|
|
43
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
44
|
-
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
45
|
-
}
|
|
46
|
-
return v1;
|
|
47
|
-
} finally {
|
|
48
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
28
|
+
const ret = wasm.aixreaderwasm_get_title(this.__wbg_ptr);
|
|
29
|
+
let v1;
|
|
30
|
+
if (ret[0] !== 0) {
|
|
31
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
32
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
49
33
|
}
|
|
34
|
+
return v1;
|
|
50
35
|
}
|
|
51
36
|
/**
|
|
52
37
|
* @returns {any}
|
|
53
38
|
*/
|
|
54
39
|
get_tools() {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
59
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
60
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
61
|
-
if (r2) {
|
|
62
|
-
throw takeObject(r1);
|
|
63
|
-
}
|
|
64
|
-
return takeObject(r0);
|
|
65
|
-
} finally {
|
|
66
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
40
|
+
const ret = wasm.aixreaderwasm_get_tools(this.__wbg_ptr);
|
|
41
|
+
if (ret[2]) {
|
|
42
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
67
43
|
}
|
|
44
|
+
return takeFromExternrefTable0(ret[0]);
|
|
68
45
|
}
|
|
69
46
|
/**
|
|
70
47
|
* @returns {string | undefined}
|
|
71
48
|
*/
|
|
72
49
|
get_version() {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
let v1;
|
|
79
|
-
if (r0 !== 0) {
|
|
80
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
81
|
-
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
82
|
-
}
|
|
83
|
-
return v1;
|
|
84
|
-
} finally {
|
|
85
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
50
|
+
const ret = wasm.aixreaderwasm_get_version(this.__wbg_ptr);
|
|
51
|
+
let v1;
|
|
52
|
+
if (ret[0] !== 0) {
|
|
53
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
54
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
86
55
|
}
|
|
56
|
+
return v1;
|
|
87
57
|
}
|
|
88
58
|
/**
|
|
89
59
|
* @returns {any}
|
|
90
60
|
*/
|
|
91
61
|
list() {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
96
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
97
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
98
|
-
if (r2) {
|
|
99
|
-
throw takeObject(r1);
|
|
100
|
-
}
|
|
101
|
-
return takeObject(r0);
|
|
102
|
-
} finally {
|
|
103
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
62
|
+
const ret = wasm.aixreaderwasm_list(this.__wbg_ptr);
|
|
63
|
+
if (ret[2]) {
|
|
64
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
104
65
|
}
|
|
66
|
+
return takeFromExternrefTable0(ret[0]);
|
|
105
67
|
}
|
|
106
68
|
/**
|
|
107
69
|
* @param {Uint8Array} data
|
|
108
70
|
*/
|
|
109
71
|
constructor(data) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
116
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
117
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
118
|
-
if (r2) {
|
|
119
|
-
throw takeObject(r1);
|
|
120
|
-
}
|
|
121
|
-
this.__wbg_ptr = r0 >>> 0;
|
|
122
|
-
AixReaderWasmFinalization.register(this, this.__wbg_ptr, this);
|
|
123
|
-
return this;
|
|
124
|
-
} finally {
|
|
125
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
72
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
73
|
+
const len0 = WASM_VECTOR_LEN;
|
|
74
|
+
const ret = wasm.aixreaderwasm_new(ptr0, len0);
|
|
75
|
+
if (ret[2]) {
|
|
76
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
126
77
|
}
|
|
78
|
+
this.__wbg_ptr = ret[0];
|
|
79
|
+
AixReaderWasmFinalization.register(this, this.__wbg_ptr, this);
|
|
80
|
+
return this;
|
|
127
81
|
}
|
|
128
82
|
/**
|
|
129
83
|
* @param {string} name
|
|
130
84
|
* @returns {Uint8Array}
|
|
131
85
|
*/
|
|
132
86
|
read_file(name) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
139
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
140
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
141
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
142
|
-
if (r3) {
|
|
143
|
-
throw takeObject(r2);
|
|
144
|
-
}
|
|
145
|
-
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
146
|
-
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
147
|
-
return v2;
|
|
148
|
-
} finally {
|
|
149
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
87
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
88
|
+
const len0 = WASM_VECTOR_LEN;
|
|
89
|
+
const ret = wasm.aixreaderwasm_read_file(this.__wbg_ptr, ptr0, len0);
|
|
90
|
+
if (ret[3]) {
|
|
91
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
150
92
|
}
|
|
93
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
94
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
95
|
+
return v2;
|
|
151
96
|
}
|
|
152
97
|
}
|
|
153
98
|
if (Symbol.dispose) AixReaderWasm.prototype[Symbol.dispose] = AixReaderWasm.prototype.free;
|
|
154
99
|
function __wbg_get_imports() {
|
|
155
100
|
const import0 = {
|
|
156
101
|
__proto__: null,
|
|
157
|
-
|
|
102
|
+
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
158
103
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
159
|
-
return
|
|
104
|
+
return ret;
|
|
160
105
|
},
|
|
161
106
|
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
162
|
-
const ret = String(
|
|
163
|
-
const ptr1 = passStringToWasm0(ret, wasm.
|
|
107
|
+
const ret = String(arg1);
|
|
108
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
164
109
|
const len1 = WASM_VECTOR_LEN;
|
|
165
110
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
166
111
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
167
112
|
},
|
|
168
|
-
|
|
169
|
-
const ret = typeof(
|
|
113
|
+
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
114
|
+
const ret = typeof(arg0) === 'string';
|
|
170
115
|
return ret;
|
|
171
116
|
},
|
|
172
|
-
|
|
117
|
+
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
173
118
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
174
119
|
},
|
|
175
|
-
|
|
176
|
-
const ret = new Map();
|
|
177
|
-
return addHeapObject(ret);
|
|
178
|
-
},
|
|
179
|
-
__wbg_new_682678e2f47e32bc: function() {
|
|
120
|
+
__wbg_new_32b398fb48b6d94a: function() {
|
|
180
121
|
const ret = new Array();
|
|
181
|
-
return
|
|
122
|
+
return ret;
|
|
182
123
|
},
|
|
183
|
-
|
|
124
|
+
__wbg_new_7796ffc7ed656783: function() {
|
|
125
|
+
const ret = new Map();
|
|
126
|
+
return ret;
|
|
127
|
+
},
|
|
128
|
+
__wbg_new_da52cf8fe3429cb2: function() {
|
|
184
129
|
const ret = new Object();
|
|
185
|
-
return
|
|
130
|
+
return ret;
|
|
186
131
|
},
|
|
187
|
-
|
|
188
|
-
|
|
132
|
+
__wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
|
|
133
|
+
const ret = arg0.set(arg1, arg2);
|
|
134
|
+
return ret;
|
|
189
135
|
},
|
|
190
136
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
191
|
-
|
|
137
|
+
arg0[arg1] = arg2;
|
|
192
138
|
},
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
return addHeapObject(ret);
|
|
139
|
+
__wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
|
|
140
|
+
arg0[arg1 >>> 0] = arg2;
|
|
196
141
|
},
|
|
197
|
-
|
|
142
|
+
__wbg_warn_faa1de0d37661523: function(arg0, arg1) {
|
|
198
143
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
199
144
|
},
|
|
200
145
|
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
201
146
|
// Cast intrinsic for `F64 -> Externref`.
|
|
202
147
|
const ret = arg0;
|
|
203
|
-
return
|
|
148
|
+
return ret;
|
|
204
149
|
},
|
|
205
150
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
206
151
|
// Cast intrinsic for `I64 -> Externref`.
|
|
207
152
|
const ret = arg0;
|
|
208
|
-
return
|
|
153
|
+
return ret;
|
|
209
154
|
},
|
|
210
155
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
211
156
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
212
157
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
213
|
-
return
|
|
158
|
+
return ret;
|
|
214
159
|
},
|
|
215
160
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
216
161
|
// Cast intrinsic for `U64 -> Externref`.
|
|
217
162
|
const ret = BigInt.asUintN(64, arg0);
|
|
218
|
-
return
|
|
219
|
-
},
|
|
220
|
-
__wbindgen_object_clone_ref: function(arg0) {
|
|
221
|
-
const ret = getObject(arg0);
|
|
222
|
-
return addHeapObject(ret);
|
|
163
|
+
return ret;
|
|
223
164
|
},
|
|
224
|
-
|
|
225
|
-
|
|
165
|
+
__wbindgen_init_externref_table: function() {
|
|
166
|
+
const table = wasm.__wbindgen_externrefs;
|
|
167
|
+
const offset = table.grow(4);
|
|
168
|
+
table.set(0, undefined);
|
|
169
|
+
table.set(offset + 0, undefined);
|
|
170
|
+
table.set(offset + 1, null);
|
|
171
|
+
table.set(offset + 2, true);
|
|
172
|
+
table.set(offset + 3, false);
|
|
226
173
|
},
|
|
227
174
|
};
|
|
228
175
|
return {
|
|
@@ -233,22 +180,7 @@ function __wbg_get_imports() {
|
|
|
233
180
|
|
|
234
181
|
const AixReaderWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
235
182
|
? { register: () => {}, unregister: () => {} }
|
|
236
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_aixreaderwasm_free(ptr
|
|
237
|
-
|
|
238
|
-
function addHeapObject(obj) {
|
|
239
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
240
|
-
const idx = heap_next;
|
|
241
|
-
heap_next = heap[idx];
|
|
242
|
-
|
|
243
|
-
heap[idx] = obj;
|
|
244
|
-
return idx;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
function dropObject(idx) {
|
|
248
|
-
if (idx < 1028) return;
|
|
249
|
-
heap[idx] = heap_next;
|
|
250
|
-
heap_next = idx;
|
|
251
|
-
}
|
|
183
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_aixreaderwasm_free(ptr, 1));
|
|
252
184
|
|
|
253
185
|
function getArrayU8FromWasm0(ptr, len) {
|
|
254
186
|
ptr = ptr >>> 0;
|
|
@@ -264,8 +196,7 @@ function getDataViewMemory0() {
|
|
|
264
196
|
}
|
|
265
197
|
|
|
266
198
|
function getStringFromWasm0(ptr, len) {
|
|
267
|
-
|
|
268
|
-
return decodeText(ptr, len);
|
|
199
|
+
return decodeText(ptr >>> 0, len);
|
|
269
200
|
}
|
|
270
201
|
|
|
271
202
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -276,13 +207,6 @@ function getUint8ArrayMemory0() {
|
|
|
276
207
|
return cachedUint8ArrayMemory0;
|
|
277
208
|
}
|
|
278
209
|
|
|
279
|
-
function getObject(idx) { return heap[idx]; }
|
|
280
|
-
|
|
281
|
-
let heap = new Array(1024).fill(undefined);
|
|
282
|
-
heap.push(undefined, null, true, false);
|
|
283
|
-
|
|
284
|
-
let heap_next = heap.length;
|
|
285
|
-
|
|
286
210
|
function passArray8ToWasm0(arg, malloc) {
|
|
287
211
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
288
212
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -327,10 +251,10 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
327
251
|
return ptr;
|
|
328
252
|
}
|
|
329
253
|
|
|
330
|
-
function
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
return
|
|
254
|
+
function takeFromExternrefTable0(idx) {
|
|
255
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
256
|
+
wasm.__externref_table_dealloc(idx);
|
|
257
|
+
return value;
|
|
334
258
|
}
|
|
335
259
|
|
|
336
260
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
@@ -362,12 +286,14 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
362
286
|
|
|
363
287
|
let WASM_VECTOR_LEN = 0;
|
|
364
288
|
|
|
365
|
-
let wasmModule, wasm;
|
|
289
|
+
let wasmModule, wasmInstance, wasm;
|
|
366
290
|
function __wbg_finalize_init(instance, module) {
|
|
291
|
+
wasmInstance = instance;
|
|
367
292
|
wasm = instance.exports;
|
|
368
293
|
wasmModule = module;
|
|
369
294
|
cachedDataViewMemory0 = null;
|
|
370
295
|
cachedUint8ArrayMemory0 = null;
|
|
296
|
+
wasm.__wbindgen_start();
|
|
371
297
|
return wasm;
|
|
372
298
|
}
|
|
373
299
|
|
package/pkg/aix_web_bg.wasm
CHANGED
|
Binary file
|
package/pkg/aix_web_bg.wasm.d.ts
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_aixreaderwasm_free: (a: number, b: number) => void;
|
|
5
|
-
export const aixreaderwasm_get_pages: (a: number
|
|
6
|
-
export const aixreaderwasm_get_title: (a: number
|
|
7
|
-
export const aixreaderwasm_get_tools: (a: number
|
|
8
|
-
export const aixreaderwasm_get_version: (a: number
|
|
9
|
-
export const aixreaderwasm_list: (a: number
|
|
10
|
-
export const aixreaderwasm_new: (a: number, b: number
|
|
11
|
-
export const aixreaderwasm_read_file: (a: number, b: number, c: number,
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
5
|
+
export const aixreaderwasm_get_pages: (a: number) => [number, number, number];
|
|
6
|
+
export const aixreaderwasm_get_title: (a: number) => [number, number];
|
|
7
|
+
export const aixreaderwasm_get_tools: (a: number) => [number, number, number];
|
|
8
|
+
export const aixreaderwasm_get_version: (a: number) => [number, number];
|
|
9
|
+
export const aixreaderwasm_list: (a: number) => [number, number, number];
|
|
10
|
+
export const aixreaderwasm_new: (a: number, b: number) => [number, number, number];
|
|
11
|
+
export const aixreaderwasm_read_file: (a: number, b: number, c: number) => [number, number, number, number];
|
|
12
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
13
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
14
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
15
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
16
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
17
|
+
export const __wbindgen_start: () => void;
|
package/pkg/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "aix-web",
|
|
3
|
-
"
|
|
4
|
-
"version": "0.6.0-daily.202607210233",
|
|
2
|
+
"name": "aiui-aix-web",
|
|
3
|
+
"version": "0.7.0",
|
|
5
4
|
"files": [
|
|
6
5
|
"aix_web_bg.wasm",
|
|
7
6
|
"aix_web.js",
|
|
8
7
|
"aix_web.d.ts"
|
|
9
8
|
],
|
|
10
|
-
"
|
|
9
|
+
"module": "aix_web.js",
|
|
11
10
|
"types": "aix_web.d.ts",
|
|
12
11
|
"sideEffects": [
|
|
13
12
|
"./snippets/*"
|