@tellegen/engine 0.4.0 → 0.4.1
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 -2
- package/dist/data/populated_places.json +7351 -1
- package/dist/generated/api-types.d.ts +1 -1
- package/dist/generated/api-types.js +1 -1
- package/dist/generated/synth-schema.d.ts.map +1 -1
- package/dist/generated/synth-schema.js +1 -1
- package/dist/generated/synth-schema.js.map +1 -1
- package/dist/generated/synth-types.d.ts +6 -4
- package/dist/generated/synth-types.d.ts.map +1 -1
- package/dist/generated/synth-types.js +1 -1
- package/dist/wasm-pkg/tellegen.js +1 -1
- package/dist/wasm-pkg/tellegen_bg.wasm +0 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -17,6 +17,19 @@ import {
|
|
|
17
17
|
The wasm files are resolved relative to the package module. Host apps must serve
|
|
18
18
|
package asset files from `node_modules`.
|
|
19
19
|
|
|
20
|
+
A host that preloads or budgets the engine's two large assets names them by
|
|
21
|
+
export rather than by path: `@tellegen/engine/wasm` is the WebAssembly binary
|
|
22
|
+
and `@tellegen/engine/places` the populated places table. In Vite, import them
|
|
23
|
+
with `?url`:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import engineWasmUrl from "@tellegen/engine/wasm?url";
|
|
27
|
+
import placesUrl from "@tellegen/engine/places?url";
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Elsewhere, `import.meta.resolve("@tellegen/engine/wasm")` gives the file's URL.
|
|
31
|
+
`syntheticPlacesUrl()` returns the places table's URL at run time.
|
|
32
|
+
|
|
20
33
|
Under a Content Security Policy the engine needs `script-src 'wasm-unsafe-eval'`
|
|
21
34
|
(to compile WebAssembly; never `'unsafe-eval'`) and `worker-src 'self'`: its
|
|
22
35
|
workers are same-origin module workers.
|
|
@@ -61,8 +74,9 @@ describes the stages, the demand model and the evidence.
|
|
|
61
74
|
|
|
62
75
|
The package ships data from third parties:
|
|
63
76
|
|
|
64
|
-
- **Natural Earth** populated places (`dist/data/populated_places.json
|
|
65
|
-
|
|
77
|
+
- **Natural Earth** v5.1.2 populated places (`dist/data/populated_places.json`,
|
|
78
|
+
which names the release and its source file's SHA-256) and country areas
|
|
79
|
+
(compiled into the wasm): public domain,
|
|
66
80
|
[naturalearthdata.com](https://www.naturalearthdata.com/about/terms-of-use/).
|
|
67
81
|
- **Ember**, *Yearly Electricity Data*, through **Our World in Data**,
|
|
68
82
|
*Energy dataset*: national electricity demand, compiled into the wasm.
|