@beff/aula 0.0.1 → 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/README.md +9 -1
- package/dist/animations.d.ts +634 -0
- package/dist/animations.js +1793 -0
- package/dist/braces.d.ts +84 -0
- package/dist/braces.js +253 -0
- package/dist/card.d.ts +17 -0
- package/dist/card.js +90 -0
- package/dist/colors-palette.d.ts +2242 -0
- package/dist/colors-palette.js +2241 -0
- package/dist/colors.d.ts +120 -0
- package/dist/colors.js +403 -0
- package/dist/curves.d.ts +10 -0
- package/dist/curves.js +128 -0
- package/dist/engine.d.ts +1595 -0
- package/dist/engine.js +3364 -0
- package/dist/errors.d.ts +19 -0
- package/dist/errors.js +25 -0
- package/dist/generated/aula.conditional-suspending-3-i32-to-void.wasm +0 -0
- package/dist/generated/aula.core.wasm +0 -0
- package/dist/generated/aula.core2.wasm +0 -0
- package/dist/generated/aula.core3.wasm +0 -0
- package/dist/generated/aula.core4.wasm +0 -0
- package/dist/generated/aula.core5.wasm +0 -0
- package/dist/generated/aula.core6.wasm +0 -0
- package/dist/generated/aula.core7.wasm +0 -0
- package/dist/generated/aula.core8.wasm +0 -0
- package/dist/generated/aula.d.ts +80 -0
- package/dist/generated/aula.js +54639 -0
- package/dist/generated/interfaces/aula-engine-engine.d.ts +983 -0
- package/dist/generated/interfaces/aula-engine-host.d.ts +10 -0
- package/dist/generated/interfaces/aula-engine-tts.d.ts +43 -0
- package/dist/generated/interfaces/aula-engine-types.d.ts +60 -0
- package/dist/geometry.d.ts +551 -0
- package/dist/geometry.js +1821 -0
- package/dist/graph.d.ts +117 -0
- package/dist/graph.js +526 -0
- package/dist/graphing.d.ts +597 -0
- package/dist/graphing.js +1504 -0
- package/dist/host.d.ts +19 -0
- package/dist/host.js +85 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +11 -0
- package/dist/licenses/aula-g2p-NOTICE.txt +13 -0
- package/dist/licenses/espeak-ng-COPYING.txt +674 -0
- package/dist/licenses/fonts-OFL-JetBrainsMono.txt +93 -0
- package/dist/licenses/fonts-OFL-NunitoSans.txt +93 -0
- package/dist/load.d.ts +16 -0
- package/dist/load.js +69 -0
- package/dist/logo.d.ts +30 -0
- package/dist/logo.js +186 -0
- package/dist/manim.d.ts +22 -0
- package/dist/manim.js +19 -0
- package/dist/mobjects.d.ts +127 -0
- package/dist/mobjects.js +316 -0
- package/dist/pointcloud.d.ts +144 -0
- package/dist/pointcloud.js +400 -0
- package/dist/rates.d.ts +19 -0
- package/dist/rates.js +54 -0
- package/dist/run.d.ts +82 -0
- package/dist/run.js +245 -0
- package/dist/tables.d.ts +179 -0
- package/dist/tables.js +403 -0
- package/dist/tex.d.ts +8 -0
- package/dist/tex.js +257 -0
- package/dist/text-layouts.d.ts +64 -0
- package/dist/text-layouts.js +225 -0
- package/dist/text.d.ts +35 -0
- package/dist/text.js +52 -0
- package/dist/theme.d.ts +25 -0
- package/dist/theme.js +12 -0
- package/dist/user-code.d.ts +5 -0
- package/dist/user-code.js +20 -0
- package/dist/utils.d.ts +152 -0
- package/dist/utils.js +517 -0
- package/dist/vector-field.d.ts +132 -0
- package/dist/vector-field.js +361 -0
- package/package.json +46 -5
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Diagnostic } from "./generated/interfaces/aula-engine-types.js";
|
|
2
|
+
/** A failure (`Left`) or a value (`Right`): fp-ts's layout, narrowed by `_tag`. */
|
|
3
|
+
export type Either<E, A> = {
|
|
4
|
+
_tag: "Left";
|
|
5
|
+
left: E;
|
|
6
|
+
} | {
|
|
7
|
+
_tag: "Right";
|
|
8
|
+
right: A;
|
|
9
|
+
};
|
|
10
|
+
/** A aula error: `diagnostic` keeps its own place, if any. */
|
|
11
|
+
export declare class AulaError extends Error {
|
|
12
|
+
readonly hint: string | undefined;
|
|
13
|
+
readonly diagnostic: Diagnostic;
|
|
14
|
+
constructor(diagnostic: Diagnostic);
|
|
15
|
+
}
|
|
16
|
+
/** A AulaError with `message` and an optional hint: the fix. */
|
|
17
|
+
export declare function aulaError(message: string, hint?: string): AulaError;
|
|
18
|
+
/** Throws a AulaError with `message` and an optional hint: the fix. */
|
|
19
|
+
export declare function fault(message: string, hint?: string): never;
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** A aula error: `diagnostic` keeps its own place, if any. */
|
|
2
|
+
export class AulaError extends Error {
|
|
3
|
+
hint;
|
|
4
|
+
diagnostic;
|
|
5
|
+
constructor(diagnostic) {
|
|
6
|
+
super(diagnostic.message);
|
|
7
|
+
this.name = "AulaError";
|
|
8
|
+
this.hint = diagnostic.hint;
|
|
9
|
+
this.diagnostic = diagnostic;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/** A AulaError with `message` and an optional hint: the fix. */
|
|
13
|
+
export function aulaError(message, hint) {
|
|
14
|
+
return new AulaError({
|
|
15
|
+
severity: "error",
|
|
16
|
+
message,
|
|
17
|
+
stack: [],
|
|
18
|
+
related: [],
|
|
19
|
+
...(hint === undefined ? {} : { hint }),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/** Throws a AulaError with `message` and an optional hint: the fix. */
|
|
23
|
+
export function fault(message, hint) {
|
|
24
|
+
throw aulaError(message, hint);
|
|
25
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// world root:component/root
|
|
2
|
+
import type * as AulaEngineHost from './interfaces/aula-engine-host.js'; // aula:engine/host
|
|
3
|
+
import type * as AulaEngineTypes from './interfaces/aula-engine-types.js'; // aula:engine/types
|
|
4
|
+
import type * as AulaEngineEngineExports from './interfaces/aula-engine-engine.js'; // aula:engine/engine
|
|
5
|
+
import type * as AulaEngineTtsExports from './interfaces/aula-engine-tts.js'; // aula:engine/tts
|
|
6
|
+
export interface ImportObject {
|
|
7
|
+
"aula:engine/host": typeof AulaEngineHost,
|
|
8
|
+
"aula:engine/types": typeof AulaEngineTypes,
|
|
9
|
+
}
|
|
10
|
+
export interface Root {
|
|
11
|
+
"aula:engine/engine": typeof AulaEngineEngineExports,
|
|
12
|
+
engine: typeof AulaEngineEngineExports,
|
|
13
|
+
"aula:engine/tts": typeof AulaEngineTtsExports,
|
|
14
|
+
tts: typeof AulaEngineTtsExports,
|
|
15
|
+
/** Permanently stop this instance and dispose guest-owned host resources. */
|
|
16
|
+
readonly _util: { stop(): void; whenIdle(): Promise<void>; /** Test whether a value is a declared WIT result error from this instance. */
|
|
17
|
+
isComponentError(value: unknown): value is Error & { readonly payload: unknown }; };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Options accepted by `instantiate`.
|
|
22
|
+
*/
|
|
23
|
+
export interface InstantiateOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Called with each trap of this instance as it happens, in whichever
|
|
26
|
+
* task: including one a guest left running, which no call of the host's
|
|
27
|
+
* would otherwise fail for. Not called for stopping the instance, which
|
|
28
|
+
* it may do itself.
|
|
29
|
+
*/
|
|
30
|
+
onTrap?: (error: WebAssembly.RuntimeError) => void;
|
|
31
|
+
/** Runtime overrides for this instance. */
|
|
32
|
+
shim?: {
|
|
33
|
+
/** Platform globals used instead of those on `globalThis`. */
|
|
34
|
+
globals?: {
|
|
35
|
+
/**
|
|
36
|
+
* The WebAssembly implementation used by this instance,
|
|
37
|
+
* including by the default `instantiateCore`. Defaults to
|
|
38
|
+
* `globalThis.WebAssembly`.
|
|
39
|
+
*/
|
|
40
|
+
WebAssembly?: typeof WebAssembly;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Instantiates this component with the provided imports and
|
|
48
|
+
* returns a map of all the exports of the component.
|
|
49
|
+
*
|
|
50
|
+
* This function is intended to be similar to the
|
|
51
|
+
* `WebAssembly.Instantiate` constructor. The second `imports`
|
|
52
|
+
* argument is the "import object" for wasm, except here it
|
|
53
|
+
* uses component-model-layer types instead of core wasm
|
|
54
|
+
* integers/numbers/etc.
|
|
55
|
+
*
|
|
56
|
+
* The first argument to this function, `getCoreModule`, is
|
|
57
|
+
* used to compile core wasm modules within the component.
|
|
58
|
+
* Components are composed of core wasm modules and this callback
|
|
59
|
+
* will be invoked per core wasm module. The caller of this
|
|
60
|
+
* function is responsible for reading the core wasm module
|
|
61
|
+
* identified by `path` and returning its compiled
|
|
62
|
+
* `WebAssembly.Module` object. This would use the
|
|
63
|
+
* `WebAssembly.Module` constructor on the web, for example.
|
|
64
|
+
*
|
|
65
|
+
* The optional `options` argument configures instantiation; see
|
|
66
|
+
* `InstantiateOptions`.
|
|
67
|
+
*/
|
|
68
|
+
export function instantiate(
|
|
69
|
+
getCoreModule: (path: string) => WebAssembly.Module,
|
|
70
|
+
imports: ImportObject,
|
|
71
|
+
instantiateCore?: (module: WebAssembly.Module, imports: Record<string, any>) => WebAssembly.Instance,
|
|
72
|
+
options?: InstantiateOptions
|
|
73
|
+
): Root;
|
|
74
|
+
export function instantiate(
|
|
75
|
+
getCoreModule: (path: string) => WebAssembly.Module | Promise<WebAssembly.Module>,
|
|
76
|
+
imports: ImportObject,
|
|
77
|
+
instantiateCore?: (module: WebAssembly.Module, imports: Record<string, any>) => WebAssembly.Instance | Promise<WebAssembly.Instance>,
|
|
78
|
+
options?: InstantiateOptions
|
|
79
|
+
): Root | Promise<Root>;
|
|
80
|
+
|