@primate/angular 0.6.0 → 0.8.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/lib/app.d.ts +5 -0
- package/lib/index.d.ts +5 -0
- package/lib/private/client/AAA.d.ts +2 -0
- package/lib/private/client/AAA.js +2 -0
- package/lib/private/client/Data.d.ts +5 -0
- package/lib/private/client/Data.js +2 -0
- package/lib/private/client/Payload.d.ts +9 -0
- package/lib/private/client/Payload.js +2 -0
- package/lib/private/client/app.d.ts +3 -11
- package/lib/private/client/app.js +24 -38
- package/lib/private/client/form.d.ts +6 -4
- package/lib/private/client/form.js +24 -14
- package/lib/{public/client.d.ts → private/client/index.d.ts} +1 -1
- package/lib/{public/client.js → private/client/index.js} +1 -1
- package/lib/private/client/root.d.ts +18 -0
- package/lib/private/client/root.js +17 -0
- package/lib/private/create-root.js +6 -1
- package/lib/private/default.d.ts +7 -0
- package/lib/private/{Default.js → default.js} +18 -20
- package/lib/private/init.d.ts +6 -0
- package/lib/private/{Runtime.js → init.js} +14 -15
- package/lib/private/request/store.d.ts +4 -0
- package/lib/private/request/store.js +4 -0
- package/lib/private/runtime.d.ts +7 -0
- package/lib/private/runtime.js +4 -0
- package/lib/public/app.d.ts +2 -0
- package/lib/public/app.js +2 -0
- package/lib/public/browser.d.ts +1 -0
- package/lib/public/browser.js +1 -0
- package/lib/public/default.d.ts +1 -3
- package/lib/public/default.js +1 -2
- package/lib/public/runtime.d.ts +2 -3
- package/lib/public/runtime.js +2 -2
- package/package.json +18 -14
- package/lib/private/Default.d.ts +0 -17
- package/lib/private/Runtime.d.ts +0 -15
package/lib/app.d.ts
ADDED
package/lib/index.d.ts
ADDED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import type
|
|
3
|
-
import type Mode from "@primate/core/Mode";
|
|
4
|
-
import type { Dict } from "@rcompat/type";
|
|
5
|
-
type Data = ClientData<{
|
|
6
|
-
views: string[];
|
|
7
|
-
props: Dict[];
|
|
8
|
-
mode: Mode;
|
|
9
|
-
}>;
|
|
1
|
+
import "#client/AAA";
|
|
2
|
+
import type Data from "#client/Data";
|
|
10
3
|
export default class AngularApp {
|
|
11
4
|
#private;
|
|
12
|
-
static mount(_view: string, data:
|
|
5
|
+
static mount(_view: string, data: Data): Promise<void>;
|
|
13
6
|
}
|
|
14
|
-
export {};
|
|
15
7
|
//# sourceMappingURL=app.d.ts.map
|
|
@@ -1,37 +1,27 @@
|
|
|
1
|
+
import "#client/AAA";
|
|
2
|
+
import root from "#client/root";
|
|
1
3
|
import INITIAL_PROPS from "#INITIAL_PROPS";
|
|
2
|
-
import "@angular/
|
|
3
|
-
import { enableProdMode, } from "@angular/core";
|
|
4
|
+
import { enableProdMode } from "@angular/core";
|
|
4
5
|
import { bootstrapApplication, provideClientHydration, } from "@angular/platform-browser";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import * as views from "angular:views";
|
|
8
|
-
const make_props = (data) => ({
|
|
9
|
-
views: data.views.map(name => views[name]),
|
|
10
|
-
props: data.props,
|
|
11
|
-
request: {
|
|
12
|
-
...data.request,
|
|
13
|
-
url: new URL(location.href),
|
|
14
|
-
},
|
|
15
|
-
update: () => undefined,
|
|
16
|
-
});
|
|
6
|
+
import client from "@primate/core/client";
|
|
7
|
+
import RootView from "angular:root";
|
|
17
8
|
export default class AngularApp {
|
|
18
9
|
static #app;
|
|
19
10
|
static #root;
|
|
20
11
|
static async mount(_view, data) {
|
|
12
|
+
const interactive = !data.ssr || data.csr;
|
|
13
|
+
if (!interactive)
|
|
14
|
+
return;
|
|
21
15
|
if (data.mode === "production")
|
|
22
16
|
enableProdMode();
|
|
23
17
|
const providers = [];
|
|
24
|
-
// add hydration provider for SSR
|
|
25
18
|
if (data.ssr)
|
|
26
19
|
providers.push(provideClientHydration());
|
|
27
|
-
// in non-SSR mode, the HTML won't contain app-root, inject it
|
|
28
20
|
else
|
|
29
21
|
document.body.appendChild(document.createElement("app-root"));
|
|
30
|
-
|
|
31
|
-
const props = make_props(data);
|
|
32
|
-
// bootstrap the application
|
|
22
|
+
const props = root.toProps(data);
|
|
33
23
|
try {
|
|
34
|
-
this.#app = await bootstrapApplication(
|
|
24
|
+
this.#app = await bootstrapApplication(RootView, {
|
|
35
25
|
providers: [
|
|
36
26
|
...providers,
|
|
37
27
|
{
|
|
@@ -41,29 +31,25 @@ export default class AngularApp {
|
|
|
41
31
|
],
|
|
42
32
|
});
|
|
43
33
|
this.#root = this.#app.components[0];
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
34
|
+
this.#root.instance.p = props;
|
|
35
|
+
this.#app.tick();
|
|
36
|
+
if (data.csr) {
|
|
37
|
+
const start = () => client.boot((next, update) => {
|
|
38
|
+
this.#root.instance.p = root.toProps(next, update);
|
|
39
|
+
this.#app.tick();
|
|
40
|
+
update?.();
|
|
41
|
+
});
|
|
42
|
+
if (document.readyState === "loading") {
|
|
43
|
+
window.addEventListener("DOMContentLoaded", start, { once: true });
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
start();
|
|
47
|
+
}
|
|
52
48
|
}
|
|
53
49
|
}
|
|
54
50
|
catch (error) {
|
|
55
51
|
console.error("Failed to bootstrap Angular application:", error);
|
|
56
52
|
}
|
|
57
53
|
}
|
|
58
|
-
static #spa() {
|
|
59
|
-
window.addEventListener("DOMContentLoaded", () => {
|
|
60
|
-
spa((next, update) => {
|
|
61
|
-
const props = { ...make_props(next), update };
|
|
62
|
-
this.#root.instance.p = props;
|
|
63
|
-
this.#app.tick();
|
|
64
|
-
update?.();
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
54
|
}
|
|
69
55
|
//# sourceMappingURL=app.js.map
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Signal } from "@angular/core";
|
|
2
|
+
import type { ClientMethod, FormInit } from "@primate/core/client";
|
|
3
3
|
import type { Dict } from "@rcompat/type";
|
|
4
4
|
type Field<T> = {
|
|
5
5
|
name: string;
|
|
6
6
|
value: T;
|
|
7
|
-
errors: Signal<
|
|
7
|
+
errors: Signal<string[]>;
|
|
8
8
|
error: Signal<string | null>;
|
|
9
9
|
};
|
|
10
10
|
type FormView<Values extends Dict> = {
|
|
11
11
|
id: string;
|
|
12
12
|
submitting: Signal<boolean>;
|
|
13
|
+
submitted: Signal<boolean>;
|
|
13
14
|
submit: (event?: Event) => Promise<void>;
|
|
14
|
-
errors: Signal<
|
|
15
|
+
errors: Signal<string[]>;
|
|
15
16
|
field: <K extends keyof Values & string>(name: K) => Field<Values[K]>;
|
|
16
17
|
};
|
|
17
18
|
type Initial<Values extends Dict> = FormInit & {
|
|
18
19
|
initial?: Values;
|
|
19
20
|
};
|
|
21
|
+
declare function form<Values extends Dict>(action: ClientMethod<Values>, init?: Initial<Values>): FormView<Values>;
|
|
20
22
|
declare function form<Values extends Dict>(init: Initial<Values>): FormView<Values>;
|
|
21
23
|
declare function form(init?: FormInit): FormView<Dict>;
|
|
22
24
|
export default form;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DestroyRef, computed, inject, signal
|
|
1
|
+
import { DestroyRef, computed, inject, signal } from "@angular/core";
|
|
2
2
|
import core from "@primate/core/client";
|
|
3
3
|
function try_destroy_ref() {
|
|
4
4
|
try {
|
|
@@ -8,36 +8,46 @@ function try_destroy_ref() {
|
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
function form(
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
11
|
+
function form(action_or_init, maybe_init) {
|
|
12
|
+
const is_action = typeof action_or_init === "function";
|
|
13
|
+
const { initial, ...form_init } = (is_action ? (maybe_init ?? {}) : (action_or_init ?? {}));
|
|
14
|
+
const action = is_action ? action_or_init : undefined;
|
|
15
|
+
const contentType = is_action
|
|
16
|
+
? action_or_init.contentType
|
|
17
|
+
: undefined;
|
|
18
|
+
const controller = core.createForm({
|
|
19
|
+
...form_init,
|
|
20
|
+
...(action !== undefined && {
|
|
21
|
+
action: action,
|
|
22
|
+
contentType,
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
25
|
+
const values = (initial ?? {});
|
|
15
26
|
const snap = signal(controller.read());
|
|
16
|
-
const
|
|
17
|
-
try_destroy_ref()?.onDestroy(
|
|
27
|
+
const unsubscribe = controller.subscribe(next => snap.set(next));
|
|
28
|
+
try_destroy_ref()?.onDestroy(unsubscribe);
|
|
18
29
|
const submitting = computed(() => snap().submitting);
|
|
30
|
+
const submitted = computed(() => snap().submitted);
|
|
19
31
|
const errors = computed(() => snap().errors.form);
|
|
20
|
-
// cache per-field views so templates calling field("x") repeatedly
|
|
21
|
-
// don't recreate computed signals every change detection cycle
|
|
22
32
|
const cache = new Map();
|
|
23
33
|
function field(name) {
|
|
24
|
-
const
|
|
25
|
-
const cached = cache.get(key);
|
|
34
|
+
const cached = cache.get(name);
|
|
26
35
|
if (cached)
|
|
27
36
|
return cached;
|
|
28
|
-
const form_errors = computed(() => snap().errors.fields[
|
|
37
|
+
const form_errors = computed(() => snap().errors.fields[name] ?? []);
|
|
29
38
|
const view = {
|
|
30
|
-
name
|
|
39
|
+
name,
|
|
31
40
|
value: values[name],
|
|
32
41
|
errors: form_errors,
|
|
33
42
|
error: computed(() => form_errors()[0] ?? null),
|
|
34
43
|
};
|
|
35
|
-
cache.set(
|
|
44
|
+
cache.set(name, view);
|
|
36
45
|
return view;
|
|
37
46
|
}
|
|
38
47
|
return {
|
|
39
48
|
id: controller.id,
|
|
40
49
|
submitting,
|
|
50
|
+
submitted,
|
|
41
51
|
submit: (event) => controller.submit(event),
|
|
42
52
|
errors,
|
|
43
53
|
field,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type Data from "#client/Data";
|
|
2
|
+
import type { Type } from "@angular/core";
|
|
3
|
+
import type { Dict } from "@rcompat/type";
|
|
4
|
+
type ViewComponent = Type<unknown>;
|
|
5
|
+
export type RootProps = {
|
|
6
|
+
views: ViewComponent[];
|
|
7
|
+
props: Dict[];
|
|
8
|
+
request: Data["request"] & {
|
|
9
|
+
url: URL;
|
|
10
|
+
};
|
|
11
|
+
update?: () => void;
|
|
12
|
+
};
|
|
13
|
+
declare function toProps(data: Data, update?: () => void): RootProps;
|
|
14
|
+
declare const root: {
|
|
15
|
+
toProps: typeof toProps;
|
|
16
|
+
};
|
|
17
|
+
export default root;
|
|
18
|
+
//# sourceMappingURL=root.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as Views from "angular:views";
|
|
2
|
+
function toProps(data, update) {
|
|
3
|
+
return {
|
|
4
|
+
views: data.views.map(name => Views[name]),
|
|
5
|
+
props: data.props,
|
|
6
|
+
request: {
|
|
7
|
+
...data.request,
|
|
8
|
+
url: new URL(data.request.url),
|
|
9
|
+
},
|
|
10
|
+
update,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const root = {
|
|
14
|
+
toProps,
|
|
15
|
+
};
|
|
16
|
+
export default root;
|
|
17
|
+
//# sourceMappingURL=root.js.map
|
|
@@ -40,6 +40,7 @@ import {
|
|
|
40
40
|
} from "@angular/core";
|
|
41
41
|
import { CommonModule, NgComponentOutlet } from "@angular/common";
|
|
42
42
|
import INITIAL_PROPS from "@primate/angular/INITIAL_PROPS";
|
|
43
|
+
import { request } from "@primate/angular/app";
|
|
43
44
|
${i18n_imports}
|
|
44
45
|
|
|
45
46
|
type Dict = Record<string, any>;
|
|
@@ -64,7 +65,10 @@ export default class RootComponent implements OnDestroy {
|
|
|
64
65
|
constructor() {
|
|
65
66
|
try {
|
|
66
67
|
const initial = inject<any>(INITIAL_PROPS);
|
|
67
|
-
if (initial)
|
|
68
|
+
if (initial) {
|
|
69
|
+
this.#p = initial;
|
|
70
|
+
request.set(initial.request);
|
|
71
|
+
}
|
|
68
72
|
} catch {}
|
|
69
73
|
${i18n_setup}
|
|
70
74
|
}
|
|
@@ -72,6 +76,7 @@ export default class RootComponent implements OnDestroy {
|
|
|
72
76
|
@Input({ required: true })
|
|
73
77
|
set p(value: RootProps) {
|
|
74
78
|
this.#p = value;
|
|
79
|
+
request.set(value.request);
|
|
75
80
|
this.#cdr.markForCheck(); // root on default CD
|
|
76
81
|
}
|
|
77
82
|
get p(): RootProps { return this.#p; }
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import create_root from "#create-root";
|
|
2
|
-
import
|
|
2
|
+
import init from "#init";
|
|
3
|
+
import frontend from "@primate/core/frontend";
|
|
3
4
|
import * as ts from "typescript";
|
|
4
|
-
export default
|
|
5
|
-
|
|
5
|
+
export default frontend({
|
|
6
|
+
...init,
|
|
7
|
+
root: {
|
|
6
8
|
create: create_root,
|
|
7
|
-
}
|
|
8
|
-
css
|
|
9
|
+
},
|
|
10
|
+
css: {
|
|
9
11
|
filter: /\.component\.(css)$/,
|
|
10
|
-
}
|
|
11
|
-
compile
|
|
12
|
+
},
|
|
13
|
+
compile: {
|
|
12
14
|
client: (text) => {
|
|
13
15
|
const result = ts.transpileModule(text, {
|
|
14
16
|
compilerOptions: {
|
|
@@ -20,18 +22,14 @@ export default class Default extends Runtime {
|
|
|
20
22
|
moduleResolution: ts.ModuleResolutionKind.NodeJs,
|
|
21
23
|
},
|
|
22
24
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (styleMatch) {
|
|
26
|
-
// Extract and process inline styles
|
|
27
|
-
css = styleMatch[1]
|
|
28
|
-
.replace(/['"`]/g, "")
|
|
29
|
-
.replace(/\\n/g, "\n")
|
|
30
|
-
.trim();
|
|
31
|
-
}
|
|
25
|
+
// extract inline styles
|
|
26
|
+
const style_match = text.match(/styles:\s*\[([\s\S]*?)\]/);
|
|
32
27
|
return {
|
|
33
28
|
js: result.outputText,
|
|
34
|
-
css
|
|
29
|
+
css: style_match === null ? "" : style_match[1]
|
|
30
|
+
.replace(/['"`]/g, "")
|
|
31
|
+
.replace(/\\n/g, "\n")
|
|
32
|
+
.trim(),
|
|
35
33
|
};
|
|
36
34
|
},
|
|
37
35
|
server: (text) => {
|
|
@@ -49,6 +47,6 @@ export default class Default extends Runtime {
|
|
|
49
47
|
// hinder treeshaking
|
|
50
48
|
return `import "@angular/compiler";\n${result.outputText}`;
|
|
51
49
|
},
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import INITIAL_PROPS from "#INITIAL_PROPS";
|
|
2
2
|
import root from "#root-selector";
|
|
3
3
|
import "@angular/compiler";
|
|
4
|
-
import { enableProdMode, importProvidersFrom
|
|
4
|
+
import { enableProdMode, importProvidersFrom } from "@angular/core";
|
|
5
5
|
import { bootstrapApplication, BrowserModule, provideClientHydration, } from "@angular/platform-browser";
|
|
6
6
|
import { provideServerRendering, renderApplication, } from "@angular/platform-server";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
render = async (view, props) => {
|
|
7
|
+
const module = {
|
|
8
|
+
name: "angular",
|
|
9
|
+
extensions: [".component.ts"],
|
|
10
|
+
layouts: true,
|
|
11
|
+
client: true,
|
|
12
|
+
async render(view, props) {
|
|
14
13
|
const providers = [
|
|
15
14
|
importProvidersFrom(BrowserModule),
|
|
16
15
|
provideServerRendering(),
|
|
@@ -25,16 +24,16 @@ export default class Runtime extends FrontendModule {
|
|
|
25
24
|
document: `<${root}></${root}>`,
|
|
26
25
|
});
|
|
27
26
|
const headMatch = html.match(/<head>(.*?)<\/head>/s);
|
|
28
|
-
const bodyRegex = new RegExp(
|
|
27
|
+
const bodyRegex = new RegExp(`(<${root}(?:\\s[^>]*)?>[\\s\\S]*?<\\/${root}>)`);
|
|
29
28
|
const bodyMatch = html.match(bodyRegex);
|
|
30
29
|
return {
|
|
31
30
|
body: bodyMatch?.[1] || html,
|
|
32
31
|
head: headMatch?.[1] || "",
|
|
33
32
|
};
|
|
34
|
-
}
|
|
35
|
-
|
|
33
|
+
},
|
|
34
|
+
onServe(app) {
|
|
36
35
|
app.mode === "production" && enableProdMode();
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
//# sourceMappingURL=
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
export default module;
|
|
39
|
+
//# sourceMappingURL=init.js.map
|
package/lib/public/browser.d.ts
CHANGED
package/lib/public/browser.js
CHANGED
package/lib/public/default.d.ts
CHANGED
package/lib/public/default.js
CHANGED
package/lib/public/runtime.d.ts
CHANGED
package/lib/public/runtime.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export default
|
|
1
|
+
export { default as client } from "#client/index";
|
|
2
|
+
export { default } from "#runtime";
|
|
3
3
|
//# sourceMappingURL=runtime.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primate/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Angular for Primate",
|
|
5
5
|
"homepage": "https://primate.run/docs/frontend/angular",
|
|
6
6
|
"bugs": "https://github.com/primate-run/primate/issues",
|
|
@@ -16,41 +16,45 @@
|
|
|
16
16
|
"/lib/**/*.d.ts",
|
|
17
17
|
"!/**/*.spec.*"
|
|
18
18
|
],
|
|
19
|
+
"types": "lib/index.d.ts",
|
|
19
20
|
"dependencies": {
|
|
20
|
-
"@angular/common": "^21.
|
|
21
|
-
"@angular/compiler": "^21.
|
|
22
|
-
"@angular/core": "^21.
|
|
23
|
-
"@angular/platform-browser": "^21.
|
|
24
|
-
"@angular/platform-server": "^21.
|
|
25
|
-
"@angular/ssr": "^21.
|
|
26
|
-
"typescript": "^
|
|
27
|
-
"@primate/core": "^0.
|
|
21
|
+
"@angular/common": "^21.2.11",
|
|
22
|
+
"@angular/compiler": "^21.2.11",
|
|
23
|
+
"@angular/core": "^21.2.11",
|
|
24
|
+
"@angular/platform-browser": "^21.2.11",
|
|
25
|
+
"@angular/platform-server": "^21.2.11",
|
|
26
|
+
"@angular/ssr": "^21.2.9",
|
|
27
|
+
"typescript": "^6.0.3",
|
|
28
|
+
"@primate/core": "^0.7.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@rcompat/type": "^0.
|
|
31
|
+
"@rcompat/type": "^0.17.0"
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
|
33
|
-
"primate": "^0.
|
|
34
|
+
"primate": "^0.38.0"
|
|
34
35
|
},
|
|
35
36
|
"imports": {
|
|
36
37
|
"#*": {
|
|
37
|
-
"
|
|
38
|
+
"@primate/source": "./src/private/*.ts",
|
|
38
39
|
"default": "./lib/private/*.js"
|
|
39
40
|
}
|
|
40
41
|
},
|
|
41
42
|
"exports": {
|
|
42
43
|
".": {
|
|
44
|
+
"types": "./lib/index.d.ts",
|
|
45
|
+
"@primate/runtime": "./src/public/runtime.ts",
|
|
46
|
+
"@primate/source": "./src/public/default.ts",
|
|
43
47
|
"browser": "./lib/public/browser.js",
|
|
44
48
|
"runtime": "./lib/public/runtime.js",
|
|
45
49
|
"default": "./lib/public/default.js"
|
|
46
50
|
},
|
|
47
51
|
"./*": {
|
|
48
|
-
"
|
|
52
|
+
"@primate/source": "./src/public/*.ts",
|
|
49
53
|
"default": "./lib/public/*.js"
|
|
50
54
|
}
|
|
51
55
|
},
|
|
52
56
|
"scripts": {
|
|
53
|
-
"build": "npm run clean && tsc",
|
|
57
|
+
"build": "npm run clean && tsc && cp src/types/{app,index}.d.ts lib",
|
|
54
58
|
"clean": "rm -rf ./lib",
|
|
55
59
|
"lint": "eslint ."
|
|
56
60
|
}
|
package/lib/private/Default.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Runtime from "#Runtime";
|
|
2
|
-
export default class Default extends Runtime {
|
|
3
|
-
root: {
|
|
4
|
-
create: (depth: number, i18n_active: boolean) => string;
|
|
5
|
-
};
|
|
6
|
-
css: {
|
|
7
|
-
filter: RegExp;
|
|
8
|
-
};
|
|
9
|
-
compile: {
|
|
10
|
-
client: (text: string) => {
|
|
11
|
-
js: string;
|
|
12
|
-
css: string;
|
|
13
|
-
};
|
|
14
|
-
server: (text: string) => string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=Default.d.ts.map
|
package/lib/private/Runtime.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "@angular/compiler";
|
|
2
|
-
import { type Type } from "@angular/core";
|
|
3
|
-
import FrontendModule from "@primate/core/frontend/Module";
|
|
4
|
-
import type Render from "@primate/core/frontend/Render";
|
|
5
|
-
import type NextServe from "@primate/core/NextServe";
|
|
6
|
-
import type ServeApp from "@primate/core/ServeApp";
|
|
7
|
-
export default class Runtime extends FrontendModule<Type<any>> {
|
|
8
|
-
name: string;
|
|
9
|
-
defaultExtensions: string[];
|
|
10
|
-
layouts: boolean;
|
|
11
|
-
client: boolean;
|
|
12
|
-
render: Render<Type<any>>;
|
|
13
|
-
serve(app: ServeApp, next: NextServe): Promise<ServeApp>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=Runtime.d.ts.map
|