@plumix/core 0.2.0 → 0.4.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/dist/auth/bootstrap.d.ts.map +1 -1
- package/dist/auth/bootstrap.js +39 -22
- package/dist/auth/bootstrap.js.map +1 -1
- package/dist/cache/tags.d.ts.map +1 -1
- package/dist/cache/tags.js +9 -0
- package/dist/cache/tags.js.map +1 -1
- package/dist/db/errors.d.ts +8 -0
- package/dist/db/errors.d.ts.map +1 -1
- package/dist/db/errors.js +22 -0
- package/dist/db/errors.js.map +1 -1
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +1 -1
- package/dist/db/index.js.map +1 -1
- package/dist/db/schema/users.d.ts +57 -0
- package/dist/db/schema/users.d.ts.map +1 -1
- package/dist/db/schema/users.js +10 -2
- package/dist/db/schema/users.js.map +1 -1
- package/dist/debug-bar/panels/template.d.ts +5 -8
- package/dist/debug-bar/panels/template.d.ts.map +1 -1
- package/dist/debug-bar/panels/template.js +22 -8
- package/dist/debug-bar/panels/template.js.map +1 -1
- package/dist/debug-bar/primitives.d.ts +1 -1
- package/dist/debug-bar/primitives.d.ts.map +1 -1
- package/dist/debug-bar/primitives.js +1 -1
- package/dist/debug-bar/primitives.js.map +1 -1
- package/dist/debug-bar/styles.d.ts.map +1 -1
- package/dist/debug-bar/styles.js +9 -14
- package/dist/debug-bar/styles.js.map +1 -1
- package/dist/debug-bar/template-node-label.d.ts.map +1 -1
- package/dist/debug-bar/template-node-label.js +8 -2
- package/dist/debug-bar/template-node-label.js.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/plugin/manifest.d.ts +34 -0
- package/dist/plugin/manifest.d.ts.map +1 -1
- package/dist/plugin/manifest.js +1 -0
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/setup-context.d.ts +10 -1
- package/dist/plugin/setup-context.d.ts.map +1 -1
- package/dist/plugin/setup-context.js +12 -0
- package/dist/plugin/setup-context.js.map +1 -1
- package/dist/route/compile.d.ts +21 -0
- package/dist/route/compile.d.ts.map +1 -1
- package/dist/route/compile.js +63 -1
- package/dist/route/compile.js.map +1 -1
- package/dist/route/current.d.ts +5 -3
- package/dist/route/current.d.ts.map +1 -1
- package/dist/route/date-range.d.ts +12 -0
- package/dist/route/date-range.d.ts.map +1 -0
- package/dist/route/date-range.js +39 -0
- package/dist/route/date-range.js.map +1 -0
- package/dist/route/intent.d.ts +7 -3
- package/dist/route/intent.d.ts.map +1 -1
- package/dist/route/match.d.ts +1 -0
- package/dist/route/match.d.ts.map +1 -1
- package/dist/route/match.js +1 -1
- package/dist/route/match.js.map +1 -1
- package/dist/route/render/build-resolved-entries.d.ts.map +1 -1
- package/dist/route/render/build-resolved-entries.js +6 -1
- package/dist/route/render/build-resolved-entries.js.map +1 -1
- package/dist/route/render/render-template.d.ts +6 -4
- package/dist/route/render/render-template.d.ts.map +1 -1
- package/dist/route/render/render-template.js +36 -48
- package/dist/route/render/render-template.js.map +1 -1
- package/dist/route/render/resolved-entry.d.ts +46 -5
- package/dist/route/render/resolved-entry.d.ts.map +1 -1
- package/dist/route/render/template-builders.d.ts +124 -0
- package/dist/route/render/template-builders.d.ts.map +1 -0
- package/dist/route/render/template-builders.js +172 -0
- package/dist/route/render/template-builders.js.map +1 -0
- package/dist/route/render/template-hierarchy.d.ts +69 -38
- package/dist/route/render/template-hierarchy.d.ts.map +1 -1
- package/dist/route/render/template-hierarchy.js +150 -74
- package/dist/route/render/template-hierarchy.js.map +1 -1
- package/dist/route/resolve.d.ts +5 -3
- package/dist/route/resolve.d.ts.map +1 -1
- package/dist/route/resolve.js +177 -35
- package/dist/route/resolve.js.map +1 -1
- package/dist/rpc/procedures/entry/create.d.ts +2 -2
- package/dist/rpc/procedures/entry/delete-permanent.d.ts +2 -2
- package/dist/rpc/procedures/entry/duplicate.d.ts +2 -2
- package/dist/rpc/procedures/entry/get.d.ts +2 -2
- package/dist/rpc/procedures/entry/index.d.ts +22 -22
- package/dist/rpc/procedures/entry/list.d.ts +2 -2
- package/dist/rpc/procedures/entry/publish.d.ts +2 -2
- package/dist/rpc/procedures/entry/restore.d.ts +2 -2
- package/dist/rpc/procedures/entry/revisions.d.ts +8 -8
- package/dist/rpc/procedures/entry/trash.d.ts +2 -2
- package/dist/rpc/procedures/entry/update.d.ts +2 -2
- package/dist/rpc/procedures/term/create.d.ts +2 -2
- package/dist/rpc/procedures/term/delete.d.ts +2 -2
- package/dist/rpc/procedures/term/get.d.ts +2 -2
- package/dist/rpc/procedures/term/index.d.ts +10 -10
- package/dist/rpc/procedures/term/list.d.ts +2 -2
- package/dist/rpc/procedures/term/update.d.ts +2 -2
- package/dist/rpc/procedures/user/delete.d.ts +2 -0
- package/dist/rpc/procedures/user/delete.d.ts.map +1 -1
- package/dist/rpc/procedures/user/disable.d.ts +2 -0
- package/dist/rpc/procedures/user/disable.d.ts.map +1 -1
- package/dist/rpc/procedures/user/enable.d.ts +2 -0
- package/dist/rpc/procedures/user/enable.d.ts.map +1 -1
- package/dist/rpc/procedures/user/get.d.ts +2 -0
- package/dist/rpc/procedures/user/get.d.ts.map +1 -1
- package/dist/rpc/procedures/user/index.d.ts +12 -0
- package/dist/rpc/procedures/user/index.d.ts.map +1 -1
- package/dist/rpc/procedures/user/invite.d.ts.map +1 -1
- package/dist/rpc/procedures/user/invite.js +28 -15
- package/dist/rpc/procedures/user/invite.js.map +1 -1
- package/dist/rpc/procedures/user/list.d.ts +2 -0
- package/dist/rpc/procedures/user/list.d.ts.map +1 -1
- package/dist/rpc/procedures/user/list.js +1 -0
- package/dist/rpc/procedures/user/list.js.map +1 -1
- package/dist/rpc/procedures/user/update.d.ts +2 -0
- package/dist/rpc/procedures/user/update.d.ts.map +1 -1
- package/dist/rpc/router.d.ts +44 -32
- package/dist/rpc/router.d.ts.map +1 -1
- package/dist/runtime/app.d.ts +0 -8
- package/dist/runtime/app.d.ts.map +1 -1
- package/dist/runtime/app.js +0 -38
- package/dist/runtime/app.js.map +1 -1
- package/dist/runtime/dispatcher.d.ts.map +1 -1
- package/dist/runtime/dispatcher.js +74 -13
- package/dist/runtime/dispatcher.js.map +1 -1
- package/dist/seo/feed.d.ts +19 -4
- package/dist/seo/feed.d.ts.map +1 -1
- package/dist/seo/feed.js +49 -12
- package/dist/seo/feed.js.map +1 -1
- package/dist/seo/head-defaults.d.ts.map +1 -1
- package/dist/seo/head-defaults.js +6 -3
- package/dist/seo/head-defaults.js.map +1 -1
- package/dist/template-deps.js +1 -1
- package/dist/template-registry.d.ts +87 -0
- package/dist/template-registry.d.ts.map +1 -0
- package/dist/template-registry.js +1 -0
- package/dist/template-registry.js.map +1 -0
- package/dist/template.d.ts +2 -2
- package/dist/test/default-theme.d.ts.map +1 -1
- package/dist/test/default-theme.js +10 -6
- package/dist/test/default-theme.js.map +1 -1
- package/dist/test/factories.d.ts +39 -21
- package/dist/test/factories.d.ts.map +1 -1
- package/dist/test/factories.js +1 -0
- package/dist/test/factories.js.map +1 -1
- package/dist/theme-errors.d.ts +0 -3
- package/dist/theme-errors.d.ts.map +1 -1
- package/dist/theme-errors.js +7 -18
- package/dist/theme-errors.js.map +1 -1
- package/dist/theme.d.ts +67 -23
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +30 -10
- package/dist/theme.js.map +1 -1
- package/dist/users/slug.d.ts +12 -0
- package/dist/users/slug.d.ts.map +1 -0
- package/dist/users/slug.js +32 -0
- package/dist/users/slug.js.map +1 -0
- package/dist/welcome-theme.d.ts +2 -2
- package/dist/welcome-theme.d.ts.map +1 -1
- package/dist/welcome-theme.js +7 -6
- package/dist/welcome-theme.js.map +1 -1
- package/package.json +7 -7
- package/dist/route/render/archive-props.d.ts +0 -39
- package/dist/route/render/archive-props.d.ts.map +0 -1
- package/dist/route/render/archive-props.js +0 -32
- package/dist/route/render/archive-props.js.map +0 -1
|
@@ -4,10 +4,11 @@ import type { Term } from "../../db/schema/terms.js";
|
|
|
4
4
|
/** Public-safe author projection — query select narrows away email + auth columns. */
|
|
5
5
|
export interface ResolvedAuthor {
|
|
6
6
|
readonly id: number;
|
|
7
|
+
readonly slug: string;
|
|
7
8
|
readonly name: string | null;
|
|
8
9
|
readonly avatarUrl: string | null;
|
|
9
10
|
}
|
|
10
|
-
interface ResolvedTerm extends Term {
|
|
11
|
+
export interface ResolvedTerm extends Term {
|
|
11
12
|
readonly url: string | null;
|
|
12
13
|
}
|
|
13
14
|
export interface ResolvedEntry extends Entry {
|
|
@@ -16,7 +17,8 @@ export interface ResolvedEntry extends Entry {
|
|
|
16
17
|
readonly author: ResolvedAuthor;
|
|
17
18
|
readonly url: string | null;
|
|
18
19
|
}
|
|
19
|
-
export interface
|
|
20
|
+
export interface EntryData<TEntry extends ResolvedEntry = ResolvedEntry> {
|
|
21
|
+
readonly kind: "entry";
|
|
20
22
|
readonly entry: TEntry;
|
|
21
23
|
}
|
|
22
24
|
export interface Pagination {
|
|
@@ -26,33 +28,72 @@ export interface Pagination {
|
|
|
26
28
|
readonly pageCount: number;
|
|
27
29
|
}
|
|
28
30
|
export interface ArchiveData<TEntry extends ResolvedEntry = ResolvedEntry> {
|
|
31
|
+
readonly kind: "archive";
|
|
29
32
|
readonly contentType: string;
|
|
30
33
|
readonly entries: readonly TEntry[];
|
|
31
34
|
readonly pagination: Pagination;
|
|
32
35
|
}
|
|
33
|
-
export interface TaxonomyData<TEntry extends ResolvedEntry = ResolvedEntry> {
|
|
36
|
+
export interface TaxonomyData<TTerm extends ResolvedTerm = ResolvedTerm, TEntry extends ResolvedEntry = ResolvedEntry> {
|
|
37
|
+
readonly kind: "taxonomy";
|
|
34
38
|
readonly taxonomy: string;
|
|
35
|
-
readonly term:
|
|
39
|
+
readonly term: TTerm;
|
|
40
|
+
readonly entries: readonly TEntry[];
|
|
41
|
+
readonly pagination: Pagination;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Payload for an author archive (`/authors/{slug}`). Carries the resolved author
|
|
45
|
+
* as the subject (like `TaxonomyData.term`) plus their published entries.
|
|
46
|
+
*/
|
|
47
|
+
export interface AuthorArchiveData<TEntry extends ResolvedEntry = ResolvedEntry> {
|
|
48
|
+
readonly kind: "author";
|
|
49
|
+
readonly author: ResolvedAuthor;
|
|
50
|
+
readonly entries: readonly TEntry[];
|
|
51
|
+
readonly pagination: Pagination;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Payload for a date archive (`/YYYY[/MM[/DD]]`). `year` is always set;
|
|
55
|
+
* `month`/`day` are 1-based and `null` at a coarser granularity (a year archive
|
|
56
|
+
* has `month: null, day: null`).
|
|
57
|
+
*/
|
|
58
|
+
export interface DateArchiveData<TEntry extends ResolvedEntry = ResolvedEntry> {
|
|
59
|
+
readonly kind: "date";
|
|
60
|
+
readonly year: number;
|
|
61
|
+
readonly month: number | null;
|
|
62
|
+
readonly day: number | null;
|
|
36
63
|
readonly entries: readonly TEntry[];
|
|
37
64
|
readonly pagination: Pagination;
|
|
38
65
|
}
|
|
39
66
|
export interface FrontPageData<TEntry extends ResolvedEntry = ResolvedEntry> {
|
|
67
|
+
readonly kind: "frontPage";
|
|
40
68
|
readonly entries: readonly TEntry[];
|
|
41
69
|
readonly pagination: Pagination;
|
|
42
70
|
}
|
|
43
71
|
export interface SearchData<TEntry extends ResolvedEntry = ResolvedEntry> {
|
|
72
|
+
readonly kind: "search";
|
|
44
73
|
readonly query: string;
|
|
45
74
|
readonly entries: readonly TEntry[];
|
|
46
75
|
readonly pagination: Pagination;
|
|
47
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Base payload for a plugin-registered archive (`registerArchiveType`). The
|
|
79
|
+
* `kind`/`name` discriminate it; a plugin extends this with its own fields
|
|
80
|
+
* (entries, pagination, whatever the archive lists) and declares the extended
|
|
81
|
+
* shape in `ArchiveTypeRegistry` so `forArchiveType(name)` types `data`. Core
|
|
82
|
+
* only ever sees the base — the resolver and template come from the plugin.
|
|
83
|
+
*/
|
|
84
|
+
export interface CustomArchiveData {
|
|
85
|
+
readonly kind: "custom";
|
|
86
|
+
/** The registered archive-type name (`registerArchiveType(name, …)`). */
|
|
87
|
+
readonly name: string;
|
|
88
|
+
}
|
|
48
89
|
/**
|
|
49
90
|
* Payload threaded to a theme's `404` / `500` template. Public-safe by
|
|
50
91
|
* shape — there is no Error field, so internal exception messages have
|
|
51
92
|
* no path to the rendered output.
|
|
52
93
|
*/
|
|
53
94
|
export interface ErrorData {
|
|
95
|
+
readonly kind: "error";
|
|
54
96
|
readonly request: Request;
|
|
55
97
|
readonly hint?: string;
|
|
56
98
|
}
|
|
57
|
-
export {};
|
|
58
99
|
//# sourceMappingURL=resolved-entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolved-entry.d.ts","sourceRoot":"","sources":["../../../src/route/render/resolved-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD,sFAAsF;AACtF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAKD,
|
|
1
|
+
{"version":3,"file":"resolved-entry.d.ts","sourceRoot":"","sources":["../../../src/route/render/resolved-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;A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AAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACjC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { ArchiveDataOf, ArchiveTypeName, EntryProjection, EntryTypeName, MetaOf, TermMetaOf, TermProjection, TermTaxonomyName } from "../../template-registry.js";
|
|
2
|
+
import type { TemplateData, TemplateEntry, TemplateRule, ThemeDescriptor } from "../../theme.js";
|
|
3
|
+
import type { ArchiveData, AuthorArchiveData, DateArchiveData, EntryData, ErrorData, FrontPageData, SearchData, TaxonomyData } from "./resolved-entry.js";
|
|
4
|
+
/** Universal catch-all — matches any resolved node. */
|
|
5
|
+
export declare function fallback(template: TemplateEntry<TemplateData>): TemplateRule;
|
|
6
|
+
/** A single entry (any type). */
|
|
7
|
+
export declare function entry(template: TemplateEntry<EntryData>): TemplateRule;
|
|
8
|
+
/** A content-type archive listing. */
|
|
9
|
+
export declare function archive(template: TemplateEntry<ArchiveData>): TemplateRule;
|
|
10
|
+
/** A term archive (any taxonomy). */
|
|
11
|
+
export declare function taxonomy(template: TemplateEntry<TaxonomyData>): TemplateRule;
|
|
12
|
+
/** An author archive (any author). */
|
|
13
|
+
export declare function author(template: TemplateEntry<AuthorArchiveData>): TemplateRule;
|
|
14
|
+
/** A date archive (any year/month/day). */
|
|
15
|
+
export declare function date(template: TemplateEntry<DateArchiveData>): TemplateRule;
|
|
16
|
+
/** The static front page. */
|
|
17
|
+
export declare function frontPage(template: TemplateEntry<FrontPageData>): TemplateRule;
|
|
18
|
+
/** Search results. */
|
|
19
|
+
export declare function search(template: TemplateEntry<SearchData>): TemplateRule;
|
|
20
|
+
/** The 404 handler. */
|
|
21
|
+
export declare function notFound(template: TemplateEntry<ErrorData>): TemplateRule;
|
|
22
|
+
/** The 500 handler. */
|
|
23
|
+
export declare function serverError(template: TemplateEntry<ErrorData>): TemplateRule;
|
|
24
|
+
/**
|
|
25
|
+
* Normalize a theme's `templates` to a rule array — the array form as-is, or a
|
|
26
|
+
* bare component wrapped as the fallback tier.
|
|
27
|
+
*/
|
|
28
|
+
export declare function templateRules(templates: ThemeDescriptor["templates"]): readonly TemplateRule[];
|
|
29
|
+
/**
|
|
30
|
+
* Reserved entry-meta key holding an author's `named`-template choice — the
|
|
31
|
+
* editor writes it, the resolver reads it. Part of the `__plumix_*` namespace.
|
|
32
|
+
*/
|
|
33
|
+
export declare const NAMED_TEMPLATE_META_KEY = "__plumix_template";
|
|
34
|
+
interface EntrySelector<K extends EntryTypeName> {
|
|
35
|
+
/** Bind the template for the selected entry. */
|
|
36
|
+
template(t: TemplateEntry<EntryData<EntryProjection<K>>>): TemplateRule;
|
|
37
|
+
}
|
|
38
|
+
interface EntryTypeBuilder<K extends EntryTypeName> extends EntrySelector<K> {
|
|
39
|
+
/** Narrow to one entry by slug. */
|
|
40
|
+
slug(slug: string): EntrySelector<K>;
|
|
41
|
+
/** Narrow to one entry by numeric id. */
|
|
42
|
+
id(id: number): EntrySelector<K>;
|
|
43
|
+
/** Narrow by an entry-meta value, typed against the type's meta projection. */
|
|
44
|
+
whereMeta<M extends keyof MetaOf<K>>(key: M, value: MetaOf<K>[M]): EntrySelector<K>;
|
|
45
|
+
/** Narrow by an arbitrary predicate over the resolved data. */
|
|
46
|
+
where(predicate: (data: EntryData<EntryProjection<K>>) => boolean): EntrySelector<K>;
|
|
47
|
+
/** Register an author-selectable template, matched from stored entry meta. */
|
|
48
|
+
named(id: string, label: string): EntrySelector<K>;
|
|
49
|
+
/** The content-type archive listing. */
|
|
50
|
+
readonly archive: {
|
|
51
|
+
template(t: TemplateEntry<ArchiveData<EntryProjection<K>>>): TemplateRule;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Target a registered entry type. `name` autocompletes and rejects typos
|
|
56
|
+
* (`keyof EntryTypeRegistry`); the template's `data.entry` is typed from the
|
|
57
|
+
* type's projection.
|
|
58
|
+
*/
|
|
59
|
+
export declare function forEntryType<K extends EntryTypeName>(name: K): EntryTypeBuilder<K>;
|
|
60
|
+
interface TaxonomySelector<K extends TermTaxonomyName> {
|
|
61
|
+
/** Bind the template for the selected term(s). */
|
|
62
|
+
template(t: TemplateEntry<TaxonomyData<TermProjection<K>>>): TemplateRule;
|
|
63
|
+
}
|
|
64
|
+
interface TermTaxonomyBuilder<K extends TermTaxonomyName> extends TaxonomySelector<K> {
|
|
65
|
+
/** Narrow to one term by slug. */
|
|
66
|
+
slug(slug: string): TaxonomySelector<K>;
|
|
67
|
+
/** Narrow to one term by numeric id. */
|
|
68
|
+
id(id: number): TaxonomySelector<K>;
|
|
69
|
+
/** Narrow by a term-meta value, typed against the taxonomy's meta projection. */
|
|
70
|
+
whereMeta<M extends keyof TermMetaOf<K>>(key: M, value: TermMetaOf<K>[M]): TaxonomySelector<K>;
|
|
71
|
+
/** Narrow by an arbitrary predicate over the resolved taxonomy data. */
|
|
72
|
+
where(predicate: (data: TaxonomyData<TermProjection<K>>) => boolean): TaxonomySelector<K>;
|
|
73
|
+
/** Register an author-selectable template, matched from stored term meta. */
|
|
74
|
+
named(id: string, label: string): TaxonomySelector<K>;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Target a registered taxonomy. `name` autocompletes and rejects typos; the
|
|
78
|
+
* template's `data.term` is typed from the taxonomy's term projection.
|
|
79
|
+
*/
|
|
80
|
+
export declare function forTermTaxonomy<K extends TermTaxonomyName>(name: K): TermTaxonomyBuilder<K>;
|
|
81
|
+
interface AuthorSelector {
|
|
82
|
+
/** Bind the template for the selected author. */
|
|
83
|
+
template(t: TemplateEntry<AuthorArchiveData>): TemplateRule;
|
|
84
|
+
}
|
|
85
|
+
interface AuthorBuilder extends AuthorSelector {
|
|
86
|
+
/** Narrow to one author by slug. */
|
|
87
|
+
slug(slug: string): AuthorSelector;
|
|
88
|
+
/** Narrow to one author by numeric id. */
|
|
89
|
+
id(id: number): AuthorSelector;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Target author archives. There is a single author "kind" (no registry to
|
|
93
|
+
* autocomplete), so `forAuthor()` takes no name — chain `.slug(...)` / `.id(...)`
|
|
94
|
+
* to narrow to one author, mirroring `forEntryType` / `forTermTaxonomy`. The
|
|
95
|
+
* bare `.template()` matches every author archive (like the `author()` tier).
|
|
96
|
+
*/
|
|
97
|
+
export declare function forAuthor(): AuthorBuilder;
|
|
98
|
+
interface DateSelector {
|
|
99
|
+
/** Bind the template for the selected period. */
|
|
100
|
+
template(t: TemplateEntry<DateArchiveData>): TemplateRule;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Target one date archive. Date components are hierarchical (a month has no
|
|
104
|
+
* meaning without a year), so `forDate` takes them positionally and matches the
|
|
105
|
+
* archive of that exact granularity: `forDate(2026)` → the year archive,
|
|
106
|
+
* `forDate(2026, 7)` → that month, `forDate(2026, 7, 21)` → that day. The
|
|
107
|
+
* generic `date()` tier styles every date archive.
|
|
108
|
+
*/
|
|
109
|
+
export declare function forDate(year: number): DateSelector;
|
|
110
|
+
export declare function forDate(year: number, month: number): DateSelector;
|
|
111
|
+
export declare function forDate(year: number, month: number, day: number): DateSelector;
|
|
112
|
+
interface ArchiveTypeSelector<K extends ArchiveTypeName> {
|
|
113
|
+
/** Bind the template for the selected archive type. */
|
|
114
|
+
template(t: TemplateEntry<ArchiveDataOf<K>>): TemplateRule;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Target a plugin-registered archive type (`registerArchiveType`). `name`
|
|
118
|
+
* autocompletes against `ArchiveTypeRegistry` and types the template's `data`
|
|
119
|
+
* from the registered projection — the same shape as `forEntryType` /
|
|
120
|
+
* `forTermTaxonomy`, for archives that live in a plugin rather than core.
|
|
121
|
+
*/
|
|
122
|
+
export declare function forArchiveType<K extends ArchiveTypeName>(name: K): ArchiveTypeSelector<K>;
|
|
123
|
+
export {};
|
|
124
|
+
//# sourceMappingURL=template-builders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-builders.d.ts","sourceRoot":"","sources":["../../../src/route/render/template-builders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,aAAa,EACb,MAAM,EACN,UAAU,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAGV,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,SAAS,EACT,aAAa,EACb,UAAU,EACV,YAAY,EACb,MAAM,qBAAqB,CAAC;AAc7B,uDAAuD;AACvD,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,GAAG,YAAY,CAE5E;AAED,iCAAiC;AACjC,wBAAgB,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,GAAG,YAAY,CAEtE;AAED,sCAAsC;AACtC,wBAAgB,OAAO,CAAC,QAAQ,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,YAAY,CAE1E;AAED,qCAAqC;AACrC,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,YAA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EAAE,MAAM,GAAG,YAAY,CAAC;AAqBhF,UAAU,mBAAmB,CAAC,CAAC,SAAS,eAAe;IACrD,uDAAuD;IACvD,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC;CAC5D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,EACtD,IAAI,EAAE,CAAC,GACN,mBAAmB,CAAC,CAAC,CAAC,CAIxB"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// The per-tier data type is erased to the union in the stored rule. Each
|
|
2
|
+
// builder types its input to the tier's data shape (so `data.entry`/`data.term`
|
|
3
|
+
// are typed at the call site), then erases on output — the resolver only ever
|
|
4
|
+
// invokes a rule's template with the matching node's data, so the erasure is
|
|
5
|
+
// sound and it keeps the `templates` array a homogeneous element type.
|
|
6
|
+
function rule(tier, template) {
|
|
7
|
+
return { tier, template: template };
|
|
8
|
+
}
|
|
9
|
+
/** Universal catch-all — matches any resolved node. */
|
|
10
|
+
export function fallback(template) {
|
|
11
|
+
return rule("fallback", template);
|
|
12
|
+
}
|
|
13
|
+
/** A single entry (any type). */
|
|
14
|
+
export function entry(template) {
|
|
15
|
+
return rule("entry", template);
|
|
16
|
+
}
|
|
17
|
+
/** A content-type archive listing. */
|
|
18
|
+
export function archive(template) {
|
|
19
|
+
return rule("archive", template);
|
|
20
|
+
}
|
|
21
|
+
/** A term archive (any taxonomy). */
|
|
22
|
+
export function taxonomy(template) {
|
|
23
|
+
return rule("taxonomy", template);
|
|
24
|
+
}
|
|
25
|
+
/** An author archive (any author). */
|
|
26
|
+
export function author(template) {
|
|
27
|
+
return rule("author", template);
|
|
28
|
+
}
|
|
29
|
+
/** A date archive (any year/month/day). */
|
|
30
|
+
export function date(template) {
|
|
31
|
+
return rule("date", template);
|
|
32
|
+
}
|
|
33
|
+
/** The static front page. */
|
|
34
|
+
export function frontPage(template) {
|
|
35
|
+
return rule("frontPage", template);
|
|
36
|
+
}
|
|
37
|
+
/** Search results. */
|
|
38
|
+
export function search(template) {
|
|
39
|
+
return rule("search", template);
|
|
40
|
+
}
|
|
41
|
+
/** The 404 handler. */
|
|
42
|
+
export function notFound(template) {
|
|
43
|
+
return rule("notFound", template);
|
|
44
|
+
}
|
|
45
|
+
/** The 500 handler. */
|
|
46
|
+
export function serverError(template) {
|
|
47
|
+
return rule("serverError", template);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Normalize a theme's `templates` to a rule array — the array form as-is, or a
|
|
51
|
+
* bare component wrapped as the fallback tier.
|
|
52
|
+
*/
|
|
53
|
+
export function templateRules(templates) {
|
|
54
|
+
// `Array.isArray` widens a `readonly T[]` to `any[]`, so re-assert the element
|
|
55
|
+
// type on the array branch rather than leaning on the narrowing.
|
|
56
|
+
return Array.isArray(templates)
|
|
57
|
+
? templates
|
|
58
|
+
: [fallback(templates)];
|
|
59
|
+
}
|
|
60
|
+
// ── Targeted builders ───────────────────────────────────────────────────────
|
|
61
|
+
// `forEntryType`/`forTermTaxonomy` produce match rules keyed off the registered
|
|
62
|
+
// names. Each selector types the template to the tier's data shape (with the
|
|
63
|
+
// registry projection) and erases to the union like the generic builders above.
|
|
64
|
+
function matchRule(match, template) {
|
|
65
|
+
return {
|
|
66
|
+
match,
|
|
67
|
+
template: template,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Reserved entry-meta key holding an author's `named`-template choice — the
|
|
72
|
+
* editor writes it, the resolver reads it. Part of the `__plumix_*` namespace.
|
|
73
|
+
*/
|
|
74
|
+
export const NAMED_TEMPLATE_META_KEY = "__plumix_template";
|
|
75
|
+
/** A predicate matching when a content entry's meta value equals `value`. */
|
|
76
|
+
function metaEquals(key, value) {
|
|
77
|
+
return (data) => "entry" in data && data.entry.meta[key] === value;
|
|
78
|
+
}
|
|
79
|
+
/** A predicate matching when a resolved term's meta value equals `value`. */
|
|
80
|
+
function termMetaEquals(key, value) {
|
|
81
|
+
return (data) => "term" in data && data.term.meta[key] === value;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Target a registered entry type. `name` autocompletes and rejects typos
|
|
85
|
+
* (`keyof EntryTypeRegistry`); the template's `data.entry` is typed from the
|
|
86
|
+
* type's projection.
|
|
87
|
+
*/
|
|
88
|
+
export function forEntryType(name) {
|
|
89
|
+
// Each selector adds its narrowing to the shared content-node prefix.
|
|
90
|
+
const content = (extra) => ({
|
|
91
|
+
template: (t) => matchRule({ nodeKind: "content", type: name, ...extra }, t),
|
|
92
|
+
});
|
|
93
|
+
return {
|
|
94
|
+
template: (t) => matchRule({ nodeKind: "content", type: name }, t),
|
|
95
|
+
slug: (slug) => content({ slug }),
|
|
96
|
+
id: (id) => content({ id }),
|
|
97
|
+
whereMeta: (key, value) => content({ predicate: metaEquals(String(key), value) }),
|
|
98
|
+
where: (predicate) => content({
|
|
99
|
+
predicate: predicate,
|
|
100
|
+
}),
|
|
101
|
+
named: (id, label) => content({
|
|
102
|
+
named: { id, label },
|
|
103
|
+
predicate: metaEquals(NAMED_TEMPLATE_META_KEY, id),
|
|
104
|
+
}),
|
|
105
|
+
archive: {
|
|
106
|
+
template: (t) => matchRule({ nodeKind: "content-type-archive", type: name }, t),
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Target a registered taxonomy. `name` autocompletes and rejects typos; the
|
|
112
|
+
* template's `data.term` is typed from the taxonomy's term projection.
|
|
113
|
+
*/
|
|
114
|
+
export function forTermTaxonomy(name) {
|
|
115
|
+
// Each selector adds its narrowing to the shared term-node prefix.
|
|
116
|
+
const term = (extra) => ({
|
|
117
|
+
template: (t) => matchRule({ nodeKind: "term", type: name, ...extra }, t),
|
|
118
|
+
});
|
|
119
|
+
return {
|
|
120
|
+
template: (t) => matchRule({ nodeKind: "term", type: name }, t),
|
|
121
|
+
slug: (slug) => term({ slug }),
|
|
122
|
+
id: (id) => term({ id }),
|
|
123
|
+
whereMeta: (key, value) => term({ predicate: termMetaEquals(String(key), value) }),
|
|
124
|
+
where: (predicate) => term({
|
|
125
|
+
predicate: predicate,
|
|
126
|
+
}),
|
|
127
|
+
named: (id, label) => term({
|
|
128
|
+
named: { id, label },
|
|
129
|
+
predicate: termMetaEquals(NAMED_TEMPLATE_META_KEY, id),
|
|
130
|
+
}),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Target author archives. There is a single author "kind" (no registry to
|
|
135
|
+
* autocomplete), so `forAuthor()` takes no name — chain `.slug(...)` / `.id(...)`
|
|
136
|
+
* to narrow to one author, mirroring `forEntryType` / `forTermTaxonomy`. The
|
|
137
|
+
* bare `.template()` matches every author archive (like the `author()` tier).
|
|
138
|
+
*/
|
|
139
|
+
export function forAuthor() {
|
|
140
|
+
// Each selector adds its narrowing to the shared author-node prefix.
|
|
141
|
+
const authorNode = (extra) => ({
|
|
142
|
+
template: (t) => matchRule({ nodeKind: "author", type: "author", ...extra }, t),
|
|
143
|
+
});
|
|
144
|
+
return {
|
|
145
|
+
template: (t) => matchRule({ nodeKind: "author", type: "author" }, t),
|
|
146
|
+
slug: (slug) => authorNode({ slug }),
|
|
147
|
+
id: (id) => authorNode({ id }),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
export function forDate(year, month, day) {
|
|
151
|
+
return {
|
|
152
|
+
template: (t) => matchRule({
|
|
153
|
+
nodeKind: "date",
|
|
154
|
+
type: "date",
|
|
155
|
+
year,
|
|
156
|
+
...(month !== undefined ? { month } : {}),
|
|
157
|
+
...(day !== undefined ? { day } : {}),
|
|
158
|
+
}, t),
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Target a plugin-registered archive type (`registerArchiveType`). `name`
|
|
163
|
+
* autocompletes against `ArchiveTypeRegistry` and types the template's `data`
|
|
164
|
+
* from the registered projection — the same shape as `forEntryType` /
|
|
165
|
+
* `forTermTaxonomy`, for archives that live in a plugin rather than core.
|
|
166
|
+
*/
|
|
167
|
+
export function forArchiveType(name) {
|
|
168
|
+
return {
|
|
169
|
+
template: (t) => matchRule({ nodeKind: "custom", type: name }, t),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=template-builders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-builders.js","sourceRoot":"","sources":["../../../src/route/render/template-builders.ts"],"names":[],"mappings":"AA6BA,yEAAyE;AACzE,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,uEAAuE;AACvE,SAAS,IAAI,CACX,IAAiB,EACjB,QAA6B;IAE7B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAkD,EAAE,CAAC;AAChF,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,QAAQ,CAAC,QAAqC;IAC5D,OAAO,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED,iCAAiC;AACjC,MAAM,UAAU,KAAK,CAAC,QAAkC;IACtD,OAAO,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED,sCAAsC;AACtC,MAAM,UAAU,OAAO,CAAC,QAAoC;IAC1D,OAAO,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AACnC,CAAC;AAED,qCAAqC;AACrC,MAAM,UAAU,QAAQ,CAAC,QAAqC;IAC5D,OAAO,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED,sCAAsC;AACtC,MAAM,UAAU,MAAM,CACpB,QAA0C;IAE1C,OAAO,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAClC,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,IAAI,CAAC,QAAwC;IAC3D,OAAO,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED,6BAA6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AC;KAClE,CAAC;AACJ,CAAC"}
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Template resolution for the array-based `templates`. `resolveTemplate` walks a
|
|
3
|
+
* theme's rules — targeted matchers (`forEntryType`/`forTermTaxonomy`) in
|
|
4
|
+
* declaration order, then the generic tier for the node's kind, then the
|
|
5
|
+
* universal `fallback`. `resolveErrorTemplate` looks up the 404/500 tiers.
|
|
3
6
|
*
|
|
4
|
-
* `
|
|
5
|
-
*
|
|
6
|
-
* request. The render pipeline walks this list greedy-first-match
|
|
7
|
-
* against the registered template map.
|
|
8
|
-
*
|
|
9
|
-
* Mirrors WordPress's hierarchy verbatim — including the `category-…` /
|
|
10
|
-
* `tag-…` aliases for the built-in taxonomies (a hard-coded WP rule that
|
|
11
|
-
* predates the generic `taxonomy-{tax}-…` chain) and the fall-through to
|
|
12
|
-
* `archive` / `index`. Faust.js exposes the same shape from
|
|
13
|
-
* `getTemplate.ts`; the two implementations should produce identical
|
|
14
|
-
* candidate lists for the same input.
|
|
15
|
-
*
|
|
16
|
-
* `resolveTemplateCandidates(node, hooks)` is the async orchestrator the
|
|
17
|
-
* renderer calls: it runs the pure walker, then applies the
|
|
18
|
-
* `template:hierarchy` filter chain so plugins can mutate the list.
|
|
7
|
+
* The `ResolvedNode` shapes carry the identity the resolver matches on (kind +
|
|
8
|
+
* type + slug/id).
|
|
19
9
|
*/
|
|
20
|
-
import type {
|
|
21
|
-
|
|
22
|
-
interface FilterRegistry {
|
|
23
|
-
"template:hierarchy": (candidates: readonly string[], ctx: {
|
|
24
|
-
readonly node: ResolvedNode;
|
|
25
|
-
}) => readonly string[] | Promise<readonly string[]>;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export type ResolvedNode = ResolvedTermNode | ResolvedContentNode | ResolvedContentTypeArchive | ResolvedFrontPage | ResolvedPostsPage | ResolvedSearch;
|
|
10
|
+
import type { TemplateData, TemplateRule } from "../../theme.js";
|
|
11
|
+
export type ResolvedNode = ResolvedTermNode | ResolvedContentNode | ResolvedContentTypeArchive | ResolvedAuthorNode | ResolvedDateNode | ResolvedCustomNode | ResolvedFrontPage | ResolvedSearch;
|
|
29
12
|
interface ResolvedTermNode {
|
|
30
13
|
readonly kind: "term";
|
|
31
14
|
readonly taxonomy: string;
|
|
32
15
|
readonly slug: string;
|
|
33
16
|
readonly databaseId: number;
|
|
34
17
|
}
|
|
18
|
+
interface ResolvedAuthorNode {
|
|
19
|
+
readonly kind: "author";
|
|
20
|
+
readonly slug: string;
|
|
21
|
+
readonly databaseId: number;
|
|
22
|
+
}
|
|
23
|
+
interface ResolvedDateNode {
|
|
24
|
+
readonly kind: "date";
|
|
25
|
+
readonly year: number;
|
|
26
|
+
readonly month: number | null;
|
|
27
|
+
readonly day: number | null;
|
|
28
|
+
}
|
|
29
|
+
interface ResolvedCustomNode {
|
|
30
|
+
readonly kind: "custom";
|
|
31
|
+
/** The registered archive-type name (`registerArchiveType`). */
|
|
32
|
+
readonly name: string;
|
|
33
|
+
}
|
|
35
34
|
interface ResolvedContentNode {
|
|
36
35
|
readonly kind: "content";
|
|
37
36
|
readonly entryType: string;
|
|
@@ -45,24 +44,56 @@ interface ResolvedContentTypeArchive {
|
|
|
45
44
|
interface ResolvedFrontPage {
|
|
46
45
|
readonly kind: "front-page";
|
|
47
46
|
}
|
|
47
|
+
interface ResolvedSearch {
|
|
48
|
+
readonly kind: "search";
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Resolve a node to its template rule from a theme's `templates` array:
|
|
52
|
+
* (1) targeted rules (`forEntryType`/`forTermTaxonomy`, incl. `whereMeta`/`where`/
|
|
53
|
+
* `named` predicates) in declaration order, first match wins; (2) the generic
|
|
54
|
+
* tier for the node's kind; (3) the universal `fallback`. Returns `undefined`
|
|
55
|
+
* when nothing matches — the caller then renders the `notFound` (404) template.
|
|
56
|
+
* `data` is required for predicate rules to match.
|
|
57
|
+
*/
|
|
58
|
+
export declare function resolveTemplate(rules: readonly TemplateRule[], node: ResolvedNode, data?: TemplateData): TemplateRule | undefined;
|
|
48
59
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
60
|
+
* Look up an error-tier template (`notFound` → 404, `serverError` → 500).
|
|
61
|
+
* Separate from `resolveTemplate` because error pages are triggered by a
|
|
62
|
+
* condition (no match, or a render throw), not by a resolved node.
|
|
52
63
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
export declare function resolveErrorTemplate(rules: readonly TemplateRule[], tier: "notFound" | "serverError"): TemplateRule | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* A short human label for a rule — its tier, or (for a targeted rule) the type
|
|
67
|
+
* plus any `:slug` / `#id` narrowing. Used by the debug bar and as the
|
|
68
|
+
* normalize-error slot name.
|
|
69
|
+
*/
|
|
70
|
+
export declare function ruleLabel(rule: TemplateRule): string;
|
|
71
|
+
/** What happened to a rule during resolution. */
|
|
72
|
+
type ResolutionStatus = "matched" | "skipped" | "never-evaluated";
|
|
73
|
+
export interface ResolutionStep {
|
|
74
|
+
readonly label: string;
|
|
75
|
+
readonly status: ResolutionStatus;
|
|
76
|
+
/**
|
|
77
|
+
* Present for a targeted rule carrying a `whereMeta`/`where`/`named`
|
|
78
|
+
* predicate. `fired` is whether the predicate function actually ran (its
|
|
79
|
+
* rule's identity matched and `data` was present); `result` is its return.
|
|
80
|
+
*/
|
|
81
|
+
readonly predicate?: {
|
|
82
|
+
readonly fired: boolean;
|
|
83
|
+
readonly result: boolean;
|
|
84
|
+
};
|
|
55
85
|
}
|
|
56
|
-
interface
|
|
57
|
-
readonly
|
|
86
|
+
export interface ResolutionTrace {
|
|
87
|
+
readonly steps: readonly ResolutionStep[];
|
|
88
|
+
/** The winning rule's label, or `null` when nothing matched (a 404). */
|
|
89
|
+
readonly winner: string | null;
|
|
58
90
|
}
|
|
59
|
-
export declare function getPossibleTemplates(node: ResolvedNode): readonly string[];
|
|
60
91
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
92
|
+
* Replay `resolveTemplate` and classify every rule for the debug bar: which one
|
|
93
|
+
* won, which targeted rules were evaluated-but-skipped (with their predicate
|
|
94
|
+
* result), and which were never reached because an earlier zone already won.
|
|
95
|
+
* Dev-only — `resolveTemplate` stays allocation-free on the render hot path.
|
|
65
96
|
*/
|
|
66
|
-
export declare function
|
|
97
|
+
export declare function explainTemplateResolution(rules: readonly TemplateRule[], node: ResolvedNode, data?: TemplateData): ResolutionTrace;
|
|
67
98
|
export {};
|
|
68
99
|
//# sourceMappingURL=template-hierarchy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-hierarchy.d.ts","sourceRoot":"","sources":["../../../src/route/render/template-hierarchy.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"template-hierarchy.d.ts","sourceRoot":"","sources":["../../../src/route/render/template-hierarchy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAGV,YAAY,EACZ,YAAY,EACb,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,YAAY,GACpB,gBAAgB,GAChB,mBAAmB,GACnB,0BAA0B,GAC1B,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,iBAAiB,GACjB,cAAc,CAAC;AAEnB,UAAU,gBAAgB;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,UAAU,gBAAg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