actionview-svelte-handler 0.3.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.
@@ -0,0 +1,2 @@
1
+ > [!CAUTION]
2
+ > This folder is intended to be built from TypeScript files with `npm run build`
@@ -0,0 +1,42 @@
1
+ import { Stores } from 'svelte/store';
2
+ export interface BuildSuccess {
3
+ client: string;
4
+ server: {
5
+ html: string;
6
+ css: string;
7
+ } | null;
8
+ compiled: {
9
+ client: string;
10
+ server: string | undefined;
11
+ };
12
+ }
13
+ export interface BuildError {
14
+ error: any;
15
+ }
16
+ export type BuildResult = BuildSuccess | BuildError;
17
+ /**
18
+ * Builder is a class that builds, compiles and bundles Svelte components into a nice object for the template handler
19
+ */
20
+ declare class Builder {
21
+ path: string;
22
+ props: Stores;
23
+ locals: object;
24
+ compiled: {
25
+ client: string | null;
26
+ server: string | null;
27
+ };
28
+ ssr: boolean;
29
+ workingDir: string;
30
+ preprocess: object;
31
+ constructor(path: string, props: object, locals: object, client: string | null, server: string | null, ssr: boolean, workingDir: string, preprocess: object);
32
+ bundle(generate: 'ssr' | 'dom', sveltePath?: string): Promise<string>;
33
+ client(): Promise<string>;
34
+ standardizeClient(code: string): string;
35
+ server(): Promise<{
36
+ output: string;
37
+ html: string;
38
+ css: string;
39
+ }>;
40
+ build(): Promise<BuildResult>;
41
+ }
42
+ export default Builder;