@menapo/machine 0.0.0-stage → 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 +135 -2
- package/dist/chart-BWjU2VF4.js +395 -0
- package/dist/compiled.d.ts +58 -0
- package/dist/compiled.js +43 -0
- package/dist/component-DDXOyYUI.d.ts +147 -0
- package/dist/dev-BAz6e3W-.js +79 -0
- package/dist/dom.d.ts +187 -0
- package/dist/dom.js +659 -0
- package/dist/glue/preact.d.ts +4 -0
- package/dist/glue/preact.js +54 -0
- package/dist/glue/react.d.ts +4 -0
- package/dist/glue/react.js +50 -0
- package/dist/glue/solid.d.ts +4 -0
- package/dist/glue/solid.js +42 -0
- package/dist/glue/svelte.svelte.d.ts +4 -0
- package/dist/glue/svelte.svelte.js +57 -0
- package/dist/glue/vanilla.d.ts +4 -0
- package/dist/glue/vanilla.js +83 -0
- package/dist/glue/vue.d.ts +4 -0
- package/dist/glue/vue.js +41 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.js +582 -0
- package/dist/inspect-BmyLUhcy.js +74 -0
- package/dist/inspect-C3qosuCm.d.ts +22 -0
- package/dist/instance-BM2UqeXW.js +418 -0
- package/dist/machine-BstWHtWL.d.ts +335 -0
- package/dist/naming-Csj5186j.js +492 -0
- package/dist/records-7FFepzo9.js +10 -0
- package/dist/source-DdFTPjID.js +15 -0
- package/dist/test.d.ts +63 -0
- package/dist/test.js +262 -0
- package/dist/types-Bk8svtO6.d.ts +580 -0
- package/dist/vicss.d.ts +19 -0
- package/dist/vicss.js +51 -0
- package/dist/vite.d.ts +27 -0
- package/dist/vite.js +4281 -0
- package/package.json +87 -3
package/dist/vite.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Plugin } from "vite";
|
|
2
|
+
//#region src/vite.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The frameworks `useMachine` has glue for. Written out because the
|
|
5
|
+
* published types cannot name the private `@menapo/glue`; the check below
|
|
6
|
+
* fails the type-check the moment the two differ.
|
|
7
|
+
*/
|
|
8
|
+
export type Framework = "react" | "preact" | "vue" | "svelte" | "solid" | "vanilla";
|
|
9
|
+
export interface MachineOptions {
|
|
10
|
+
/**
|
|
11
|
+
* The framework of plain `.js`/`.ts` modules that call `useMachine`.
|
|
12
|
+
* Default: the framework the root `package.json` depends on, else none
|
|
13
|
+
* (vanilla). `.vue`, `.svelte` and JSX modules go by their own.
|
|
14
|
+
*/
|
|
15
|
+
readonly framework?: Framework;
|
|
16
|
+
/**
|
|
17
|
+
* Compiles each top-level `const x = defineMachine({ … })` whose states,
|
|
18
|
+
* targets and names are written out: its config is checked at build time
|
|
19
|
+
* (a mistake fails the build, at its line) and shipped as tables, without
|
|
20
|
+
* the normaliser (PLAN §5.6). Default: true. False normalises every
|
|
21
|
+
* machine at runtime, as without the plugin.
|
|
22
|
+
*/
|
|
23
|
+
readonly compile?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** `plugins: [machine()]` in a Vite config. */
|
|
26
|
+
export declare function machine(options?: MachineOptions): Plugin[];
|
|
27
|
+
//#endregion
|