@morphemeris/armilla-core 0.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.
- package/LICENSE +21 -0
- package/README.md +75 -0
- package/dist/armilla.d.ts +41 -0
- package/dist/armilla.js +98 -0
- package/dist/armilla.test.d.ts +1 -0
- package/dist/armilla.test.js +160 -0
- package/dist/basemap.generated.d.ts +8 -0
- package/dist/basemap.generated.js +9 -0
- package/dist/basemap.test.d.ts +1 -0
- package/dist/basemap.test.js +21 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +14 -0
- package/dist/index.web.d.ts +3 -0
- package/dist/index.web.js +24 -0
- package/dist/runtime.d.ts +13 -0
- package/dist/runtime.js +20 -0
- package/dist/surface.d.ts +10 -0
- package/dist/surface.js +9 -0
- package/dist/types.d.ts +55 -0
- package/dist/types.generated.d.ts +1274 -0
- package/dist/types.generated.js +4 -0
- package/dist/types.js +24 -0
- package/dist/vocabulary.generated.d.ts +8 -0
- package/dist/vocabulary.generated.js +9 -0
- package/dist/vocabulary.test.d.ts +1 -0
- package/dist/vocabulary.test.js +36 -0
- package/dist/wasm-types.d.ts +19 -0
- package/dist/wasm-types.js +1 -0
- package/dist/wasm.d.ts +2 -0
- package/dist/wasm.js +16 -0
- package/dist/web.test.d.ts +1 -0
- package/dist/web.test.js +34 -0
- package/dist/workspace.test.d.ts +1 -0
- package/dist/workspace.test.js +43 -0
- package/docs/changelog.md +37 -0
- package/docs/coordinates.md +52 -0
- package/docs/themes.md +111 -0
- package/docs/vocabulary.json +1501 -0
- package/docs/vocabulary.md +86 -0
- package/package.json +73 -0
- package/wasm/README.md +21 -0
- package/wasm/armilla_wasm.d.ts +104 -0
- package/wasm/armilla_wasm.js +497 -0
- package/wasm/armilla_wasm_bg.wasm +0 -0
- package/wasm/armilla_wasm_bg.wasm.d.ts +21 -0
- package/wasm/package.json +23 -0
- package/wasm-web/README.md +21 -0
- package/wasm-web/armilla_wasm.d.ts +150 -0
- package/wasm-web/armilla_wasm.js +583 -0
- package/wasm-web/armilla_wasm_bg.wasm +0 -0
- package/wasm-web/armilla_wasm_bg.wasm.d.ts +21 -0
- package/wasm-web/package.json +27 -0
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
/* @ts-self-types="./armilla_wasm.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Encode a view state as a URL-safe bookmark string (spec §11.5).
|
|
5
|
+
*
|
|
6
|
+
* # Errors
|
|
7
|
+
*
|
|
8
|
+
* The §15 `Error` record as a JSON string when the view state is invalid.
|
|
9
|
+
* @param {string} view_state
|
|
10
|
+
* @returns {string}
|
|
11
|
+
*/
|
|
12
|
+
function bookmark(view_state) {
|
|
13
|
+
let deferred3_0;
|
|
14
|
+
let deferred3_1;
|
|
15
|
+
try {
|
|
16
|
+
const ptr0 = passStringToWasm0(view_state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
17
|
+
const len0 = WASM_VECTOR_LEN;
|
|
18
|
+
const ret = wasm.bookmark(ptr0, len0);
|
|
19
|
+
var ptr2 = ret[0];
|
|
20
|
+
var len2 = ret[1];
|
|
21
|
+
if (ret[3]) {
|
|
22
|
+
ptr2 = 0; len2 = 0;
|
|
23
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
24
|
+
}
|
|
25
|
+
deferred3_0 = ptr2;
|
|
26
|
+
deferred3_1 = len2;
|
|
27
|
+
return getStringFromWasm0(ptr2, len2);
|
|
28
|
+
} finally {
|
|
29
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.bookmark = bookmark;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The compiled-in default theme as JSON (spec §10.2).
|
|
36
|
+
* @returns {string}
|
|
37
|
+
*/
|
|
38
|
+
function default_theme() {
|
|
39
|
+
let deferred1_0;
|
|
40
|
+
let deferred1_1;
|
|
41
|
+
try {
|
|
42
|
+
const ret = wasm.default_theme();
|
|
43
|
+
deferred1_0 = ret[0];
|
|
44
|
+
deferred1_1 = ret[1];
|
|
45
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
46
|
+
} finally {
|
|
47
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.default_theme = default_theme;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Report which rule set a resolved property (spec §13.4).
|
|
54
|
+
*
|
|
55
|
+
* # Errors
|
|
56
|
+
*
|
|
57
|
+
* The §15 `Error` record as a JSON string.
|
|
58
|
+
* @param {string} scene
|
|
59
|
+
* @param {string} theme_chain
|
|
60
|
+
* @param {string} mark_id
|
|
61
|
+
* @param {string} property
|
|
62
|
+
* @returns {string}
|
|
63
|
+
*/
|
|
64
|
+
function explain(scene, theme_chain, mark_id, property) {
|
|
65
|
+
let deferred6_0;
|
|
66
|
+
let deferred6_1;
|
|
67
|
+
try {
|
|
68
|
+
const ptr0 = passStringToWasm0(scene, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
69
|
+
const len0 = WASM_VECTOR_LEN;
|
|
70
|
+
const ptr1 = passStringToWasm0(theme_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
71
|
+
const len1 = WASM_VECTOR_LEN;
|
|
72
|
+
const ptr2 = passStringToWasm0(mark_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
73
|
+
const len2 = WASM_VECTOR_LEN;
|
|
74
|
+
const ptr3 = passStringToWasm0(property, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
75
|
+
const len3 = WASM_VECTOR_LEN;
|
|
76
|
+
const ret = wasm.explain(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
77
|
+
var ptr5 = ret[0];
|
|
78
|
+
var len5 = ret[1];
|
|
79
|
+
if (ret[3]) {
|
|
80
|
+
ptr5 = 0; len5 = 0;
|
|
81
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
82
|
+
}
|
|
83
|
+
deferred6_0 = ptr5;
|
|
84
|
+
deferred6_1 = len5;
|
|
85
|
+
return getStringFromWasm0(ptr5, len5);
|
|
86
|
+
} finally {
|
|
87
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.explain = explain;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Lay out a chart input under a theme chain, view state, environment, and
|
|
94
|
+
* panel options; returns the scene as JSON (spec §13.5 `layout`).
|
|
95
|
+
*
|
|
96
|
+
* # Errors
|
|
97
|
+
*
|
|
98
|
+
* The §15 `Error` record as a JSON string.
|
|
99
|
+
* @param {string} chart_input
|
|
100
|
+
* @param {string} theme_chain
|
|
101
|
+
* @param {string} view_state
|
|
102
|
+
* @param {string} environment
|
|
103
|
+
* @param {string} options
|
|
104
|
+
* @returns {string}
|
|
105
|
+
*/
|
|
106
|
+
function layout(chart_input, theme_chain, view_state, environment, options) {
|
|
107
|
+
let deferred7_0;
|
|
108
|
+
let deferred7_1;
|
|
109
|
+
try {
|
|
110
|
+
const ptr0 = passStringToWasm0(chart_input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
111
|
+
const len0 = WASM_VECTOR_LEN;
|
|
112
|
+
const ptr1 = passStringToWasm0(theme_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
113
|
+
const len1 = WASM_VECTOR_LEN;
|
|
114
|
+
const ptr2 = passStringToWasm0(view_state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
115
|
+
const len2 = WASM_VECTOR_LEN;
|
|
116
|
+
const ptr3 = passStringToWasm0(environment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
117
|
+
const len3 = WASM_VECTOR_LEN;
|
|
118
|
+
const ptr4 = passStringToWasm0(options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
119
|
+
const len4 = WASM_VECTOR_LEN;
|
|
120
|
+
const ret = wasm.layout(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
121
|
+
var ptr6 = ret[0];
|
|
122
|
+
var len6 = ret[1];
|
|
123
|
+
if (ret[3]) {
|
|
124
|
+
ptr6 = 0; len6 = 0;
|
|
125
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
126
|
+
}
|
|
127
|
+
deferred7_0 = ptr6;
|
|
128
|
+
deferred7_1 = len6;
|
|
129
|
+
return getStringFromWasm0(ptr6, len6);
|
|
130
|
+
} finally {
|
|
131
|
+
wasm.__wbindgen_free(deferred7_0, deferred7_1, 1);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.layout = layout;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Lint a theme chain; returns the findings as a JSON array (spec §10.7).
|
|
138
|
+
*
|
|
139
|
+
* # Errors
|
|
140
|
+
*
|
|
141
|
+
* The §15 `Error` record as a JSON string when the chain does not parse.
|
|
142
|
+
* @param {string} theme_chain
|
|
143
|
+
* @returns {string}
|
|
144
|
+
*/
|
|
145
|
+
function lint(theme_chain) {
|
|
146
|
+
let deferred3_0;
|
|
147
|
+
let deferred3_1;
|
|
148
|
+
try {
|
|
149
|
+
const ptr0 = passStringToWasm0(theme_chain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
150
|
+
const len0 = WASM_VECTOR_LEN;
|
|
151
|
+
const ret = wasm.lint(ptr0, len0);
|
|
152
|
+
var ptr2 = ret[0];
|
|
153
|
+
var len2 = ret[1];
|
|
154
|
+
if (ret[3]) {
|
|
155
|
+
ptr2 = 0; len2 = 0;
|
|
156
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
157
|
+
}
|
|
158
|
+
deferred3_0 = ptr2;
|
|
159
|
+
deferred3_1 = len2;
|
|
160
|
+
return getStringFromWasm0(ptr2, len2);
|
|
161
|
+
} finally {
|
|
162
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.lint = lint;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Build the map panels' line model (spec §12.2).
|
|
169
|
+
*
|
|
170
|
+
* # Errors
|
|
171
|
+
*
|
|
172
|
+
* The §15 `Error` record as a JSON string.
|
|
173
|
+
* @param {string} chart_input
|
|
174
|
+
* @param {string} view_state
|
|
175
|
+
* @param {string} environment
|
|
176
|
+
* @returns {string}
|
|
177
|
+
*/
|
|
178
|
+
function map_lines(chart_input, view_state, environment) {
|
|
179
|
+
let deferred5_0;
|
|
180
|
+
let deferred5_1;
|
|
181
|
+
try {
|
|
182
|
+
const ptr0 = passStringToWasm0(chart_input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
183
|
+
const len0 = WASM_VECTOR_LEN;
|
|
184
|
+
const ptr1 = passStringToWasm0(view_state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
185
|
+
const len1 = WASM_VECTOR_LEN;
|
|
186
|
+
const ptr2 = passStringToWasm0(environment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
187
|
+
const len2 = WASM_VECTOR_LEN;
|
|
188
|
+
const ret = wasm.map_lines(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
189
|
+
var ptr4 = ret[0];
|
|
190
|
+
var len4 = ret[1];
|
|
191
|
+
if (ret[3]) {
|
|
192
|
+
ptr4 = 0; len4 = 0;
|
|
193
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
194
|
+
}
|
|
195
|
+
deferred5_0 = ptr4;
|
|
196
|
+
deferred5_1 = len4;
|
|
197
|
+
return getStringFromWasm0(ptr4, len4);
|
|
198
|
+
} finally {
|
|
199
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
exports.map_lines = map_lines;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Migrate a document forward to the current schema version (spec §4.2).
|
|
206
|
+
*
|
|
207
|
+
* # Errors
|
|
208
|
+
*
|
|
209
|
+
* The §15 `Error` record as a JSON string.
|
|
210
|
+
* @param {string} kind
|
|
211
|
+
* @param {string} doc
|
|
212
|
+
* @returns {string}
|
|
213
|
+
*/
|
|
214
|
+
function migrate(kind, doc) {
|
|
215
|
+
let deferred4_0;
|
|
216
|
+
let deferred4_1;
|
|
217
|
+
try {
|
|
218
|
+
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
219
|
+
const len0 = WASM_VECTOR_LEN;
|
|
220
|
+
const ptr1 = passStringToWasm0(doc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
221
|
+
const len1 = WASM_VECTOR_LEN;
|
|
222
|
+
const ret = wasm.migrate(ptr0, len0, ptr1, len1);
|
|
223
|
+
var ptr3 = ret[0];
|
|
224
|
+
var len3 = ret[1];
|
|
225
|
+
if (ret[3]) {
|
|
226
|
+
ptr3 = 0; len3 = 0;
|
|
227
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
228
|
+
}
|
|
229
|
+
deferred4_0 = ptr3;
|
|
230
|
+
deferred4_1 = len3;
|
|
231
|
+
return getStringFromWasm0(ptr3, len3);
|
|
232
|
+
} finally {
|
|
233
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
exports.migrate = migrate;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Paint a scene as an SVG document string (spec §14).
|
|
240
|
+
*
|
|
241
|
+
* # Errors
|
|
242
|
+
*
|
|
243
|
+
* The §15 `Error` record as a JSON string.
|
|
244
|
+
* @param {string} scene
|
|
245
|
+
* @param {string} pack_manifests
|
|
246
|
+
* @returns {string}
|
|
247
|
+
*/
|
|
248
|
+
function paint_svg(scene, pack_manifests) {
|
|
249
|
+
let deferred4_0;
|
|
250
|
+
let deferred4_1;
|
|
251
|
+
try {
|
|
252
|
+
const ptr0 = passStringToWasm0(scene, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
253
|
+
const len0 = WASM_VECTOR_LEN;
|
|
254
|
+
const ptr1 = passStringToWasm0(pack_manifests, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
255
|
+
const len1 = WASM_VECTOR_LEN;
|
|
256
|
+
const ret = wasm.paint_svg(ptr0, len0, ptr1, len1);
|
|
257
|
+
var ptr3 = ret[0];
|
|
258
|
+
var len3 = ret[1];
|
|
259
|
+
if (ret[3]) {
|
|
260
|
+
ptr3 = 0; len3 = 0;
|
|
261
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
262
|
+
}
|
|
263
|
+
deferred4_0 = ptr3;
|
|
264
|
+
deferred4_1 = len3;
|
|
265
|
+
return getStringFromWasm0(ptr3, len3);
|
|
266
|
+
} finally {
|
|
267
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
exports.paint_svg = paint_svg;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Build a table panel's row model (spec §12.1).
|
|
274
|
+
*
|
|
275
|
+
* # Errors
|
|
276
|
+
*
|
|
277
|
+
* The §15 `Error` record as a JSON string.
|
|
278
|
+
* @param {string} chart_input
|
|
279
|
+
* @param {string} view_state
|
|
280
|
+
* @param {string} environment
|
|
281
|
+
* @param {string} options
|
|
282
|
+
* @returns {string}
|
|
283
|
+
*/
|
|
284
|
+
function table_rows(chart_input, view_state, environment, options) {
|
|
285
|
+
let deferred6_0;
|
|
286
|
+
let deferred6_1;
|
|
287
|
+
try {
|
|
288
|
+
const ptr0 = passStringToWasm0(chart_input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
289
|
+
const len0 = WASM_VECTOR_LEN;
|
|
290
|
+
const ptr1 = passStringToWasm0(view_state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
291
|
+
const len1 = WASM_VECTOR_LEN;
|
|
292
|
+
const ptr2 = passStringToWasm0(environment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
293
|
+
const len2 = WASM_VECTOR_LEN;
|
|
294
|
+
const ptr3 = passStringToWasm0(options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
295
|
+
const len3 = WASM_VECTOR_LEN;
|
|
296
|
+
const ret = wasm.table_rows(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
297
|
+
var ptr5 = ret[0];
|
|
298
|
+
var len5 = ret[1];
|
|
299
|
+
if (ret[3]) {
|
|
300
|
+
ptr5 = 0; len5 = 0;
|
|
301
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
302
|
+
}
|
|
303
|
+
deferred6_0 = ptr5;
|
|
304
|
+
deferred6_1 = len5;
|
|
305
|
+
return getStringFromWasm0(ptr5, len5);
|
|
306
|
+
} finally {
|
|
307
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
exports.table_rows = table_rows;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Decode a bookmark back into a view state as JSON (spec §11.5).
|
|
314
|
+
*
|
|
315
|
+
* # Errors
|
|
316
|
+
*
|
|
317
|
+
* The §15 `Error` record as a JSON string.
|
|
318
|
+
* @param {string} s
|
|
319
|
+
* @returns {string}
|
|
320
|
+
*/
|
|
321
|
+
function unbookmark(s) {
|
|
322
|
+
let deferred3_0;
|
|
323
|
+
let deferred3_1;
|
|
324
|
+
try {
|
|
325
|
+
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
326
|
+
const len0 = WASM_VECTOR_LEN;
|
|
327
|
+
const ret = wasm.unbookmark(ptr0, len0);
|
|
328
|
+
var ptr2 = ret[0];
|
|
329
|
+
var len2 = ret[1];
|
|
330
|
+
if (ret[3]) {
|
|
331
|
+
ptr2 = 0; len2 = 0;
|
|
332
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
333
|
+
}
|
|
334
|
+
deferred3_0 = ptr2;
|
|
335
|
+
deferred3_1 = len2;
|
|
336
|
+
return getStringFromWasm0(ptr2, len2);
|
|
337
|
+
} finally {
|
|
338
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
exports.unbookmark = unbookmark;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Parse and validate a workspace document, returning it normalized
|
|
345
|
+
* (spec §12): hosts consume workspaces; the core only checks them.
|
|
346
|
+
*
|
|
347
|
+
* # Errors
|
|
348
|
+
*
|
|
349
|
+
* The §15 `Error` record as a JSON string.
|
|
350
|
+
* @param {string} workspace
|
|
351
|
+
* @returns {string}
|
|
352
|
+
*/
|
|
353
|
+
function validate_workspace(workspace) {
|
|
354
|
+
let deferred3_0;
|
|
355
|
+
let deferred3_1;
|
|
356
|
+
try {
|
|
357
|
+
const ptr0 = passStringToWasm0(workspace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
358
|
+
const len0 = WASM_VECTOR_LEN;
|
|
359
|
+
const ret = wasm.validate_workspace(ptr0, len0);
|
|
360
|
+
var ptr2 = ret[0];
|
|
361
|
+
var len2 = ret[1];
|
|
362
|
+
if (ret[3]) {
|
|
363
|
+
ptr2 = 0; len2 = 0;
|
|
364
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
365
|
+
}
|
|
366
|
+
deferred3_0 = ptr2;
|
|
367
|
+
deferred3_1 = len2;
|
|
368
|
+
return getStringFromWasm0(ptr2, len2);
|
|
369
|
+
} finally {
|
|
370
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
exports.validate_workspace = validate_workspace;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* The core version, for provenance and binding checks.
|
|
377
|
+
* @returns {string}
|
|
378
|
+
*/
|
|
379
|
+
function version() {
|
|
380
|
+
let deferred1_0;
|
|
381
|
+
let deferred1_1;
|
|
382
|
+
try {
|
|
383
|
+
const ret = wasm.version();
|
|
384
|
+
deferred1_0 = ret[0];
|
|
385
|
+
deferred1_1 = ret[1];
|
|
386
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
387
|
+
} finally {
|
|
388
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
exports.version = version;
|
|
392
|
+
function __wbg_get_imports() {
|
|
393
|
+
const import0 = {
|
|
394
|
+
__proto__: null,
|
|
395
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
396
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
397
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
398
|
+
return ret;
|
|
399
|
+
},
|
|
400
|
+
__wbindgen_init_externref_table: function() {
|
|
401
|
+
const table = wasm.__wbindgen_externrefs;
|
|
402
|
+
const offset = table.grow(4);
|
|
403
|
+
table.set(0, undefined);
|
|
404
|
+
table.set(offset + 0, undefined);
|
|
405
|
+
table.set(offset + 1, null);
|
|
406
|
+
table.set(offset + 2, true);
|
|
407
|
+
table.set(offset + 3, false);
|
|
408
|
+
},
|
|
409
|
+
};
|
|
410
|
+
return {
|
|
411
|
+
__proto__: null,
|
|
412
|
+
"./armilla_wasm_bg.js": import0,
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
function getStringFromWasm0(ptr, len) {
|
|
417
|
+
return decodeText(ptr >>> 0, len);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
let cachedUint8ArrayMemory0 = null;
|
|
421
|
+
function getUint8ArrayMemory0() {
|
|
422
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
423
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
424
|
+
}
|
|
425
|
+
return cachedUint8ArrayMemory0;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
429
|
+
if (realloc === undefined) {
|
|
430
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
431
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
432
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
433
|
+
WASM_VECTOR_LEN = buf.length;
|
|
434
|
+
return ptr;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
let len = arg.length;
|
|
438
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
439
|
+
|
|
440
|
+
const mem = getUint8ArrayMemory0();
|
|
441
|
+
|
|
442
|
+
let offset = 0;
|
|
443
|
+
|
|
444
|
+
for (; offset < len; offset++) {
|
|
445
|
+
const code = arg.charCodeAt(offset);
|
|
446
|
+
if (code > 0x7F) break;
|
|
447
|
+
mem[ptr + offset] = code;
|
|
448
|
+
}
|
|
449
|
+
if (offset !== len) {
|
|
450
|
+
if (offset !== 0) {
|
|
451
|
+
arg = arg.slice(offset);
|
|
452
|
+
}
|
|
453
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
454
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
455
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
456
|
+
|
|
457
|
+
offset += ret.written;
|
|
458
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
WASM_VECTOR_LEN = offset;
|
|
462
|
+
return ptr;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
function takeFromExternrefTable0(idx) {
|
|
466
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
467
|
+
wasm.__externref_table_dealloc(idx);
|
|
468
|
+
return value;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
472
|
+
cachedTextDecoder.decode();
|
|
473
|
+
function decodeText(ptr, len) {
|
|
474
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
const cachedTextEncoder = new TextEncoder();
|
|
478
|
+
|
|
479
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
480
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
481
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
482
|
+
view.set(buf);
|
|
483
|
+
return {
|
|
484
|
+
read: arg.length,
|
|
485
|
+
written: buf.length
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
let WASM_VECTOR_LEN = 0;
|
|
491
|
+
|
|
492
|
+
const wasmPath = `${__dirname}/armilla_wasm_bg.wasm`;
|
|
493
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
494
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
495
|
+
let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
496
|
+
let wasm = wasmInstance.exports;
|
|
497
|
+
wasm.__wbindgen_start();
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const bookmark: (a: number, b: number) => [number, number, number, number];
|
|
5
|
+
export const default_theme: () => [number, number];
|
|
6
|
+
export const explain: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number, number];
|
|
7
|
+
export const layout: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number, number];
|
|
8
|
+
export const lint: (a: number, b: number) => [number, number, number, number];
|
|
9
|
+
export const map_lines: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
10
|
+
export const migrate: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
11
|
+
export const paint_svg: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
12
|
+
export const table_rows: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number, number];
|
|
13
|
+
export const unbookmark: (a: number, b: number) => [number, number, number, number];
|
|
14
|
+
export const validate_workspace: (a: number, b: number) => [number, number, number, number];
|
|
15
|
+
export const version: () => [number, number];
|
|
16
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
17
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
18
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
19
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
20
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
21
|
+
export const __wbindgen_start: () => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "armilla-wasm",
|
|
3
|
+
"description": "armilla WASM exports: layout, lint, migrate, bookmark, explain, default_theme, paint_svg",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/morphatic/armilla"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"armilla_wasm_bg.wasm",
|
|
12
|
+
"armilla_wasm.js",
|
|
13
|
+
"armilla_wasm.d.ts"
|
|
14
|
+
],
|
|
15
|
+
"main": "armilla_wasm.js",
|
|
16
|
+
"types": "armilla_wasm.d.ts",
|
|
17
|
+
"keywords": [
|
|
18
|
+
"astrology",
|
|
19
|
+
"chart",
|
|
20
|
+
"svg",
|
|
21
|
+
"layout"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# armilla
|
|
2
|
+
|
|
3
|
+
Astrological chart visualization: layout core, themes, glyph packs, and a chart designer.
|
|
4
|
+
|
|
5
|
+
Part of the swephrs / astrologica / morphemeris / astrologyjs / heliotrek family.
|
|
6
|
+
|
|
7
|
+
**Provisional name.** `armilla` is Latin for *ring* and the root of *armillary sphere*. The
|
|
8
|
+
alternate candidate is `volvelle`, the historical term for a rotating paper astronomical disc.
|
|
9
|
+
Not settled.
|
|
10
|
+
|
|
11
|
+
## Status: pre-spec
|
|
12
|
+
|
|
13
|
+
There is no implementation and no chosen language. The current phase is research.
|
|
14
|
+
|
|
15
|
+
- [`plinth/planning/open-decisions.md`](plinth/planning/open-decisions.md) — the scope split and the
|
|
16
|
+
eight open decisions, four of which block spec work.
|
|
17
|
+
- [`plinth/research/prior-art-survey.md`](plinth/research/prior-art-survey.md) — round 1 of the prior
|
|
18
|
+
art survey.
|
|
19
|
+
|
|
20
|
+
The NLSpec files in `plinth/specs/` are empty templates and stay that way until the blocking
|
|
21
|
+
decisions close.
|