nextpress-core 1.1.0 → 2.0.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/cli/install.js +27 -0
- package/{dist/acf-functions/core/acf-builder.js → lib/acf-functions/core/acf-builder.ts} +45 -17
- package/{dist/acf-functions/core/acf-component-autoloader.js → lib/acf-functions/core/acf-component-autoloader.ts} +13 -7
- package/{dist/acf-functions/core/acf-field-group-autoloader.js → lib/acf-functions/core/acf-field-group-autoloader.ts} +11 -5
- package/{dist/acf-functions/services/define-field-group.d.ts → lib/acf-functions/services/define-field-group.ts} +4 -1
- package/{dist/acf-functions/services/define-layout.d.ts → lib/acf-functions/services/define-layout.ts} +4 -1
- package/lib/acf-functions/services/map-fields/helpers/map-choice-object.ts +20 -0
- package/{dist/acf-functions/services/map-fields/map-fields.js → lib/acf-functions/services/map-fields/map-fields.ts} +128 -89
- package/{dist/acf-functions/types/acf-field-group.d.ts → lib/acf-functions/types/acf-field-group.ts} +49 -28
- package/lib/acf-functions/types/acf-field.ts +2853 -0
- package/lib/acf-functions/types/acf-layout.ts +22 -0
- package/lib/acf-functions/types/components/field-props.ts +189 -0
- package/{dist/acf-functions/types/components/nextpress-component.d.ts → lib/acf-functions/types/components/nextpress-component.ts} +4 -3
- package/lib/ambient.d.ts +16 -0
- package/{dist/entities/common.d.ts → lib/entities/common.ts} +6 -4
- package/{dist/entities/option/option.interface.d.ts → lib/entities/option/option.interface.ts} +3 -3
- package/{dist/entities/option/option.js → lib/entities/option/option.ts} +21 -14
- package/{dist/entities/post/post.interface.d.ts → lib/entities/post/post.interface.ts} +26 -21
- package/lib/entities/post/post.ts +209 -0
- package/{dist/entities/term/term.interface.d.ts → lib/entities/term/term.interface.ts} +3 -3
- package/lib/entities/term/term.ts +82 -0
- package/{dist/entities/user/user.interface.d.ts → lib/entities/user/user.interface.ts} +2 -1
- package/lib/entities/user/user.ts +86 -0
- package/{dist/globals/entity-loader/entity-loader-base.js → lib/globals/entity-loader/entity-loader-base.ts} +64 -10
- package/{dist/globals/entity-loader/entity-loader.interface.d.ts → lib/globals/entity-loader/entity-loader.ts} +2 -4
- package/lib/globals/entity-loader/option-loader.ts +56 -0
- package/lib/globals/entity-loader/post-loader.ts +60 -0
- package/lib/globals/entity-loader/term-loader.ts +60 -0
- package/lib/globals/entity-loader/user-loader.ts +61 -0
- package/lib/globals/get-field/get-field.ts +76 -0
- package/{dist/globals/globals.js → lib/globals/globals.ts} +8 -3
- package/{dist/globals/nextpress-config/nextpress-config.interface.d.ts → lib/globals/nextpress-config/nextpress-config.interface.ts} +10 -6
- package/lib/globals/nextpress-config/nextpress-config.ts +8 -0
- package/lib/globals/queried-object/queried-object.ts +124 -0
- package/{dist/repository/optionquery/option-query-args.d.ts → lib/repository/optionquery/option-query-args.ts} +5 -2
- package/lib/repository/optionquery/option-query.ts +29 -0
- package/{dist/repository/postquery/post-query-args.d.ts → lib/repository/postquery/post-query-args.ts} +10 -6
- package/lib/repository/postquery/post-query.ts +282 -0
- package/{dist/repository/termquery/term-query-args.d.ts → lib/repository/termquery/term-query-args.ts} +16 -6
- package/lib/repository/termquery/term-query.ts +244 -0
- package/{dist/repository/userquery/user-query-args.d.ts → lib/repository/userquery/user-query-args.ts} +19 -7
- package/{dist/repository/userquery/user-query.js → lib/repository/userquery/user-query.ts} +93 -76
- package/{dist/router/helpers.js → lib/router/helpers.ts} +4 -4
- package/{dist/router/nextpress-layout.js → lib/router/nextpress-layout.tsx} +28 -9
- package/{dist/router/routes/not-found-page.js → lib/router/nextpress-not-found-route.tsx} +7 -5
- package/{dist/router/nextpress-proxy.js → lib/router/nextpress-proxy.ts} +15 -3
- package/{dist/router/nextpress-static-params.js → lib/router/nextpress-static-params.ts} +17 -5
- package/{dist/router/router.js → lib/router/router.tsx} +29 -22
- package/{dist/router/routes/api/api-get-admin-bar.js → lib/router/routes/api/api-get-admin-bar.ts} +8 -6
- package/{dist/router/routes/api/api-get-draft-mode.js → lib/router/routes/api/api-get-draft-mode.ts} +15 -6
- package/{dist/router/routes/api/api-get-field-groups.js → lib/router/routes/api/api-get-field-groups.ts} +13 -8
- package/{dist/router/routes/api/api-post-revalidate.js → lib/router/routes/api/api-post-revalidate.ts} +6 -4
- package/{dist/router/routes/api/helpers.js → lib/router/routes/api/helpers.ts} +4 -3
- package/lib/router/routes/author-archive.tsx +75 -0
- package/lib/router/routes/post-index-page.tsx +58 -0
- package/lib/router/routes/singular-page.tsx +78 -0
- package/lib/router/routes/site-front-page.tsx +51 -0
- package/lib/router/routes/term-archive.tsx +93 -0
- package/{dist/router/types.d.ts → lib/router/types.ts} +4 -2
- package/{dist/services/get-menu.js → lib/services/get-menu.ts} +56 -32
- package/{dist/services/get-theme-mods.js → lib/services/get-theme-mods.ts} +6 -4
- package/{dist/services/metadata/get-blogname.js → lib/services/metadata/get-blogname.ts} +2 -2
- package/{dist/services/metadata/get-favicon-url.js → lib/services/metadata/get-favicon-url.ts} +5 -4
- package/{dist/services/metadata/get-language-attribute.js → lib/services/metadata/get-language-attribute.ts} +1 -1
- package/{dist/services/utilities/capitalise-first-letter.js → lib/services/utilities/capitalise-first-letter.ts} +2 -3
- package/{dist/services/utilities/esc-html.js → lib/services/utilities/esc-html.ts} +3 -1
- package/{dist/services/utilities/get-date-time-formatter.js → lib/services/utilities/get-date-time-formatter.ts} +16 -6
- package/{dist/services/utilities/kses-post.js → lib/services/utilities/kses-post.ts} +2 -1
- package/{dist/services/utilities/process-url.js → lib/services/utilities/process-url.ts} +4 -3
- package/{dist/template-heirarchy/_autoloader/template-autoloader.js → lib/template-heirarchy/_autoloader/template-autoloader.ts} +18 -9
- package/{dist/template-heirarchy/archive/archive.js → lib/template-heirarchy/archive/archive.tsx} +10 -7
- package/{dist/template-heirarchy/archive/author.js → lib/template-heirarchy/archive/author.tsx} +10 -7
- package/{dist/template-heirarchy/archive/category.js → lib/template-heirarchy/archive/category.tsx} +11 -7
- package/{dist/template-heirarchy/archive/posttypearchive.js → lib/template-heirarchy/archive/posttypearchive.tsx} +11 -8
- package/{dist/template-heirarchy/archive/tag.js → lib/template-heirarchy/archive/tag.tsx} +12 -7
- package/{dist/template-heirarchy/archive/taxonomy.js → lib/template-heirarchy/archive/taxonomy.tsx} +10 -7
- package/{dist/template-heirarchy/home/home.js → lib/template-heirarchy/home/home.tsx} +10 -7
- package/{dist/template-heirarchy/index.js → lib/template-heirarchy/index.tsx} +9 -5
- package/{dist/template-heirarchy/not-found.tsx/not-found.js → lib/template-heirarchy/not-found.tsx/not-found.tsx} +10 -7
- package/{dist/template-heirarchy/page/page.js → lib/template-heirarchy/page/page.tsx} +10 -7
- package/{dist/template-heirarchy/page/posttype.js → lib/template-heirarchy/page/posttype.tsx} +12 -8
- package/{dist/template-heirarchy/page/single.js → lib/template-heirarchy/page/single.tsx} +10 -7
- package/{dist/template-heirarchy/page/singular.js → lib/template-heirarchy/page/singular.tsx} +10 -7
- package/lib/ui/render-attachment-image.tsx +28 -0
- package/lib/ui/render-components.tsx +12 -0
- package/lib/ui/render-the-admin-bar.tsx +79 -0
- package/lib/ui/render-the-logo.tsx +24 -0
- package/{dist/wpdb/wpdb.interface.d.ts → lib/wpdb/wpdb.interface.ts} +20 -1
- package/{dist/wpdb/wpdb.js → lib/wpdb/wpdb.ts} +9 -5
- package/package.json +8 -43
- package/dist/acf-functions/core/acf-builder.d.ts +0 -51
- package/dist/acf-functions/core/acf-component-autoloader.d.ts +0 -11
- package/dist/acf-functions/core/acf-field-group-autoloader.d.ts +0 -10
- package/dist/acf-functions/field-props.d.ts +0 -196
- package/dist/acf-functions/field-props.js +0 -1
- package/dist/acf-functions/index.d.ts +0 -13
- package/dist/acf-functions/index.js +0 -13
- package/dist/acf-functions/services/define-field-group.js +0 -10
- package/dist/acf-functions/services/define-layout.js +0 -10
- package/dist/acf-functions/services/map-fields/helpers/map-choice-object.d.ts +0 -2
- package/dist/acf-functions/services/map-fields/helpers/map-choice-object.js +0 -18
- package/dist/acf-functions/services/map-fields/map-fields.d.ts +0 -21
- package/dist/acf-functions/types/acf-field-group.js +0 -1
- package/dist/acf-functions/types/acf-field.d.ts +0 -2813
- package/dist/acf-functions/types/acf-field.js +0 -1
- package/dist/acf-functions/types/acf-layout.d.ts +0 -19
- package/dist/acf-functions/types/acf-layout.js +0 -1
- package/dist/acf-functions/types/acf-values.js +0 -1
- package/dist/acf-functions/types/components/field-props.d.ts +0 -196
- package/dist/acf-functions/types/components/field-props.js +0 -1
- package/dist/acf-functions/types/components/nextpress-component.js +0 -1
- package/dist/entities/common.js +0 -1
- package/dist/entities/index.d.ts +0 -9
- package/dist/entities/index.js +0 -9
- package/dist/entities/option/option.d.ts +0 -19
- package/dist/entities/option/option.interface.js +0 -2
- package/dist/entities/post/post.d.ts +0 -50
- package/dist/entities/post/post.interface.js +0 -2
- package/dist/entities/post/post.js +0 -184
- package/dist/entities/term/term.d.ts +0 -28
- package/dist/entities/term/term.interface.js +0 -1
- package/dist/entities/term/term.js +0 -67
- package/dist/entities/user/user.d.ts +0 -27
- package/dist/entities/user/user.interface.js +0 -1
- package/dist/entities/user/user.js +0 -74
- package/dist/globals/entity-loader/entity-loader-base.d.ts +0 -65
- package/dist/globals/entity-loader/entity-loader.interface.js +0 -1
- package/dist/globals/entity-loader/option-loader.d.ts +0 -15
- package/dist/globals/entity-loader/option-loader.js +0 -31
- package/dist/globals/entity-loader/post-loader.d.ts +0 -21
- package/dist/globals/entity-loader/post-loader.js +0 -28
- package/dist/globals/entity-loader/term-loader.d.ts +0 -21
- package/dist/globals/entity-loader/term-loader.js +0 -28
- package/dist/globals/entity-loader/user-loader.d.ts +0 -21
- package/dist/globals/entity-loader/user-loader.js +0 -28
- package/dist/globals/get-field/get-field.d.ts +0 -18
- package/dist/globals/get-field/get-field.js +0 -44
- package/dist/globals/globals.d.ts +0 -18
- package/dist/globals/index.d.ts +0 -10
- package/dist/globals/index.js +0 -10
- package/dist/globals/nextpress-config/nextpress-config.d.ts +0 -4
- package/dist/globals/nextpress-config/nextpress-config.interface.js +0 -1
- package/dist/globals/nextpress-config/nextpress-config.js +0 -2
- package/dist/globals/queried-object/queried-object.d.ts +0 -62
- package/dist/globals/queried-object/queried-object.js +0 -56
- package/dist/repository/index.d.ts +0 -5
- package/dist/repository/index.js +0 -5
- package/dist/repository/optionquery/option-query-args.js +0 -1
- package/dist/repository/optionquery/option-query.d.ts +0 -12
- package/dist/repository/optionquery/option-query.js +0 -20
- package/dist/repository/postquery/post-query-args.js +0 -1
- package/dist/repository/postquery/post-query.d.ts +0 -12
- package/dist/repository/postquery/post-query.js +0 -272
- package/dist/repository/termquery/term-query-args.js +0 -1
- package/dist/repository/termquery/term-query.d.ts +0 -11
- package/dist/repository/termquery/term-query.js +0 -213
- package/dist/repository/userquery/user-query-args.js +0 -1
- package/dist/repository/userquery/user-query.d.ts +0 -12
- package/dist/router/helpers.d.ts +0 -14
- package/dist/router/index.d.ts +0 -17
- package/dist/router/index.js +0 -17
- package/dist/router/nextpress-layout.d.ts +0 -11
- package/dist/router/nextpress-proxy.d.ts +0 -8
- package/dist/router/nextpress-static-params.d.ts +0 -9
- package/dist/router/router.d.ts +0 -23
- package/dist/router/routes/api/api-get-admin-bar.d.ts +0 -8
- package/dist/router/routes/api/api-get-draft-mode.d.ts +0 -8
- package/dist/router/routes/api/api-get-field-groups.d.ts +0 -7
- package/dist/router/routes/api/api-post-revalidate.d.ts +0 -7
- package/dist/router/routes/api/helpers.d.ts +0 -8
- package/dist/router/routes/author-archive.d.ts +0 -25
- package/dist/router/routes/author-archive.js +0 -49
- package/dist/router/routes/not-found-page.d.ts +0 -15
- package/dist/router/routes/post-index-page.d.ts +0 -25
- package/dist/router/routes/post-index-page.js +0 -33
- package/dist/router/routes/singular-page.d.ts +0 -29
- package/dist/router/routes/singular-page.js +0 -51
- package/dist/router/routes/site-front-page.d.ts +0 -27
- package/dist/router/routes/site-front-page.js +0 -26
- package/dist/router/routes/term-archive.d.ts +0 -29
- package/dist/router/routes/term-archive.js +0 -65
- package/dist/router/types.js +0 -1
- package/dist/services/get-menu.d.ts +0 -13
- package/dist/services/get-theme-mods.d.ts +0 -7
- package/dist/services/index.d.ts +0 -10
- package/dist/services/index.js +0 -10
- package/dist/services/metadata/get-blogname.d.ts +0 -6
- package/dist/services/metadata/get-favicon-url.d.ts +0 -6
- package/dist/services/metadata/get-language-attribute.d.ts +0 -6
- package/dist/services/services.d.ts +0 -3
- package/dist/services/services.js +0 -3
- package/dist/services/utilities/capitalise-first-letter.d.ts +0 -7
- package/dist/services/utilities/esc-html.d.ts +0 -7
- package/dist/services/utilities/get-date-time-formatter.d.ts +0 -6
- package/dist/services/utilities/index.d.ts +0 -0
- package/dist/services/utilities/index.js +0 -1
- package/dist/services/utilities/kses-post.d.ts +0 -7
- package/dist/services/utilities/process-url.d.ts +0 -7
- package/dist/template-heirarchy/_autoloader/template-autoloader.d.ts +0 -9
- package/dist/template-heirarchy/archive/archive.d.ts +0 -16
- package/dist/template-heirarchy/archive/author.d.ts +0 -16
- package/dist/template-heirarchy/archive/category.d.ts +0 -16
- package/dist/template-heirarchy/archive/posttypearchive.d.ts +0 -24
- package/dist/template-heirarchy/archive/tag.d.ts +0 -16
- package/dist/template-heirarchy/archive/taxonomy.d.ts +0 -16
- package/dist/template-heirarchy/home/home.d.ts +0 -16
- package/dist/template-heirarchy/index.d.ts +0 -17
- package/dist/template-heirarchy/not-found.tsx/not-found.d.ts +0 -16
- package/dist/template-heirarchy/page/page.d.ts +0 -16
- package/dist/template-heirarchy/page/posttype.d.ts +0 -24
- package/dist/template-heirarchy/page/single.d.ts +0 -16
- package/dist/template-heirarchy/page/singular.d.ts +0 -16
- package/dist/ui/index.d.ts +0 -4
- package/dist/ui/index.js +0 -4
- package/dist/ui/render-attachment-image.d.ts +0 -12
- package/dist/ui/render-attachment-image.js +0 -24
- package/dist/ui/render-components.d.ts +0 -9
- package/dist/ui/render-components.js +0 -7
- package/dist/ui/render-the-admin-bar.d.ts +0 -8
- package/dist/ui/render-the-admin-bar.js +0 -36
- package/dist/ui/render-the-logo.d.ts +0 -10
- package/dist/ui/render-the-logo.js +0 -16
- package/dist/wpdb/index.d.ts +0 -0
- package/dist/wpdb/index.js +0 -1
- package/dist/wpdb/wpdb.d.ts +0 -3
- package/dist/wpdb/wpdb.interface.js +0 -5
- /package/{dist/acf-functions/types/acf-values.d.ts → lib/acf-functions/types/acf-values.ts} +0 -0
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReadonlyHeaders } from "next/dist/server/web/spec-extension/adapters/headers";
|
|
2
|
-
/**
|
|
3
|
-
* Checks if request is authorized using API key.
|
|
4
|
-
*
|
|
5
|
-
* @param {ReadonlyHeaders} headerList - Headers from request.
|
|
6
|
-
* @returns {boolean} True if authorized, false otherwise.
|
|
7
|
-
*/
|
|
8
|
-
export declare function isAuthorized(headerList: ReadonlyHeaders): boolean;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { MetadataResult, TemplateResult } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* Resolves the author archive route and maps it to the template hierarchy to return Metadata.
|
|
4
|
-
* * Routing Behavior:
|
|
5
|
-
* - Unconditionally routes to `AuthorMetadata`.
|
|
6
|
-
*
|
|
7
|
-
* @param {{ path: string[], metadata: true }} props - Route properties requesting metadata.
|
|
8
|
-
* @returns {Promise<MetadataResult>} The generated metadata.
|
|
9
|
-
*/
|
|
10
|
-
export declare function AuthorArchive(props: {
|
|
11
|
-
path: string[];
|
|
12
|
-
metadata: true;
|
|
13
|
-
}): Promise<MetadataResult>;
|
|
14
|
-
/**
|
|
15
|
-
* Resolves the author archive route and maps it to the template hierarchy to return a Template.
|
|
16
|
-
* * Routing Behavior:
|
|
17
|
-
* - Unconditionally routes to `AuthorTemplate`.
|
|
18
|
-
*
|
|
19
|
-
* @param {{ path: string[], metadata?: false }} props - Route properties requesting a template.
|
|
20
|
-
* @returns {Promise<TemplateResult>} The rendered template component.
|
|
21
|
-
*/
|
|
22
|
-
export declare function AuthorArchive(props: {
|
|
23
|
-
path: string[];
|
|
24
|
-
metadata?: false;
|
|
25
|
-
}): Promise<TemplateResult>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getPageNumber } from "../helpers";
|
|
3
|
-
import { notFound } from "next/navigation";
|
|
4
|
-
import { queriedObjectState } from "@/globals/globals";
|
|
5
|
-
import { AuthorMetadata, AuthorTemplate } from "@/template-heirarchy/archive/author";
|
|
6
|
-
/**
|
|
7
|
-
* Core implementation for the author archive route.
|
|
8
|
-
* Retrieves posts published by a specific author and updates the queried object state.
|
|
9
|
-
*
|
|
10
|
-
* @param {RouteProps} props - Route properties including the path array and metadata flag.
|
|
11
|
-
* @returns {Promise<MetadataResult | TemplateResult>} The metadata or template result based on the hierarchy.
|
|
12
|
-
* @throws {Error} Throws a Next.js notFound error if the author is not found.
|
|
13
|
-
*/
|
|
14
|
-
export async function AuthorArchive({ path, metadata = false }) {
|
|
15
|
-
var _a, _b;
|
|
16
|
-
const postsPerPage = (_a = Number(await getOption('posts_per_page'))) !== null && _a !== void 0 ? _a : 10;
|
|
17
|
-
const page = getPageNumber(path) || 1;
|
|
18
|
-
const login = path[1];
|
|
19
|
-
if (!login)
|
|
20
|
-
notFound();
|
|
21
|
-
const userQuery = await userLoader.findAndPrime({
|
|
22
|
-
login: login,
|
|
23
|
-
multiple: false,
|
|
24
|
-
noFoundRows: true
|
|
25
|
-
});
|
|
26
|
-
const user = await getUser((_b = userQuery.ids[0]) !== null && _b !== void 0 ? _b : 0);
|
|
27
|
-
if (!user)
|
|
28
|
-
notFound();
|
|
29
|
-
const postIds = await postLoader.findAndPrime({
|
|
30
|
-
authorId: user.ID,
|
|
31
|
-
noFoundRows: false,
|
|
32
|
-
noPaging: false,
|
|
33
|
-
postType: 'post',
|
|
34
|
-
page: page,
|
|
35
|
-
postsPerPage: postsPerPage,
|
|
36
|
-
postStatus: 'publish',
|
|
37
|
-
orderBy: 'date'
|
|
38
|
-
});
|
|
39
|
-
const currentQueriedObject = {
|
|
40
|
-
objectType: 'user',
|
|
41
|
-
posts: postIds.ids,
|
|
42
|
-
page,
|
|
43
|
-
pageCount: Math.ceil(postIds.count / postsPerPage),
|
|
44
|
-
user: user.ID
|
|
45
|
-
};
|
|
46
|
-
const state = queriedObjectState();
|
|
47
|
-
state.currentState = currentQueriedObject;
|
|
48
|
-
return metadata ? await AuthorMetadata() : _jsx(AuthorTemplate, {});
|
|
49
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
/**
|
|
3
|
-
* Generates the metadata for the generic Not Found page.
|
|
4
|
-
* Maps to the Nextpress `NotFoundMetadata` which falls back to `IndexMetadata`.
|
|
5
|
-
*
|
|
6
|
-
* @returns {Promise<Metadata>} The generated metadata object.
|
|
7
|
-
*/
|
|
8
|
-
export declare function notFoundMetadata(): Promise<Metadata>;
|
|
9
|
-
/**
|
|
10
|
-
* Default Not Found component to handle unmatched routes.
|
|
11
|
-
* Maps to the Nextpress `NotFoundTemplate` which defaults back to `IndexTemplate` if not defined.
|
|
12
|
-
*
|
|
13
|
-
* @returns {Promise<JSX.Element>} The rendered Not Found template.
|
|
14
|
-
*/
|
|
15
|
-
export declare function NotFoundPage(): Promise<import("react").JSX.Element>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { MetadataResult, TemplateResult } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* Resolves the post index page (blog home) route and maps it to the template hierarchy to return Metadata.
|
|
4
|
-
* * Routing Behavior:
|
|
5
|
-
* - Unconditionally routes to `HomeMetadata`.
|
|
6
|
-
*
|
|
7
|
-
* @param {{ path: string[], metadata: true }} props - Route properties requesting metadata.
|
|
8
|
-
* @returns {Promise<MetadataResult>} The generated metadata.
|
|
9
|
-
*/
|
|
10
|
-
export declare function PostIndexPage(props: {
|
|
11
|
-
path: string[];
|
|
12
|
-
metadata: true;
|
|
13
|
-
}): Promise<MetadataResult>;
|
|
14
|
-
/**
|
|
15
|
-
* Resolves the post index page (blog home) route and maps it to the template hierarchy to return a Template.
|
|
16
|
-
* * Routing Behavior:
|
|
17
|
-
* - Unconditionally routes to `HomeTemplate`.
|
|
18
|
-
*
|
|
19
|
-
* @param {{ path: string[], metadata?: false }} props - Route properties requesting a template.
|
|
20
|
-
* @returns {Promise<TemplateResult>} The rendered template component.
|
|
21
|
-
*/
|
|
22
|
-
export declare function PostIndexPage(props: {
|
|
23
|
-
path: string[];
|
|
24
|
-
metadata?: false;
|
|
25
|
-
}): Promise<TemplateResult>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getPageNumber } from "../helpers";
|
|
3
|
-
import { queriedObjectState } from "@/globals/globals";
|
|
4
|
-
import { HomeMetadata, HomeTemplate } from "@/template-heirarchy/home/home";
|
|
5
|
-
/**
|
|
6
|
-
* Core implementation for the post index page route.
|
|
7
|
-
* Fetches the paginated list of all published posts and updates the queried object state.
|
|
8
|
-
*
|
|
9
|
-
* @param {RouteProps} props - Route properties including the path array and metadata flag.
|
|
10
|
-
* @returns {Promise<MetadataResult | TemplateResult>} The metadata or template result based on the hierarchy.
|
|
11
|
-
*/
|
|
12
|
-
export async function PostIndexPage({ path, metadata = false }) {
|
|
13
|
-
var _a;
|
|
14
|
-
const page = getPageNumber(path) || 1;
|
|
15
|
-
const postsPerPage = (_a = Number(await getOption('posts_per_page'))) !== null && _a !== void 0 ? _a : 10;
|
|
16
|
-
const postIds = await postLoader.findAndPrime({
|
|
17
|
-
noFoundRows: false,
|
|
18
|
-
noPaging: false,
|
|
19
|
-
postType: 'post',
|
|
20
|
-
page: page,
|
|
21
|
-
postsPerPage: postsPerPage,
|
|
22
|
-
postStatus: 'publish',
|
|
23
|
-
orderBy: 'date'
|
|
24
|
-
});
|
|
25
|
-
const currentQueriedObject = {
|
|
26
|
-
posts: postIds.ids,
|
|
27
|
-
page,
|
|
28
|
-
pageCount: postIds.count / postsPerPage
|
|
29
|
-
};
|
|
30
|
-
const state = queriedObjectState();
|
|
31
|
-
state.currentState = currentQueriedObject;
|
|
32
|
-
return metadata ? await HomeMetadata() : _jsx(HomeTemplate, {});
|
|
33
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { MetadataResult, TemplateResult } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* Resolves the singular page route and maps it to the template hierarchy to return Metadata.
|
|
4
|
-
* * Routing Behavior:
|
|
5
|
-
* - If the post_type is 'post', it routes to `SingleMetadata`.
|
|
6
|
-
* - If the post ID matches the 'page_for_posts' option, it delegates routing to `PostIndexPage`.
|
|
7
|
-
* - Otherwise, it defaults to routing to `PageMetadata`.
|
|
8
|
-
*
|
|
9
|
-
* @param {{ path: string[], metadata: true }} props - Route properties requesting metadata.
|
|
10
|
-
* @returns {Promise<MetadataResult>} The generated metadata.
|
|
11
|
-
*/
|
|
12
|
-
export declare function SingularPage(props: {
|
|
13
|
-
path: string[];
|
|
14
|
-
metadata: true;
|
|
15
|
-
}): Promise<MetadataResult>;
|
|
16
|
-
/**
|
|
17
|
-
* Resolves the singular page route and maps it to the template hierarchy to return a Template.
|
|
18
|
-
* * Routing Behavior:
|
|
19
|
-
* - If the post_type is 'post', it routes to `SingleTemplate`.
|
|
20
|
-
* - If the post ID matches the 'page_for_posts' option, it delegates routing to `PostIndexPage`.
|
|
21
|
-
* - Otherwise, it defaults to routing to `PageTemplate`.
|
|
22
|
-
*
|
|
23
|
-
* @param {{ path: string[], metadata?: false }} props - Route properties requesting a template.
|
|
24
|
-
* @returns {Promise<TemplateResult>} The rendered template component.
|
|
25
|
-
*/
|
|
26
|
-
export declare function SingularPage(props: {
|
|
27
|
-
path: string[];
|
|
28
|
-
metadata?: false;
|
|
29
|
-
}): Promise<TemplateResult>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PostIndexPage } from "./post-index-page";
|
|
3
|
-
import { getPageNumber } from "../helpers";
|
|
4
|
-
import { notFound } from "next/navigation";
|
|
5
|
-
import { queriedObjectState } from "@/globals/globals";
|
|
6
|
-
import { PageMetadata, PageTemplate } from "@/template-heirarchy/page/page";
|
|
7
|
-
import { SingleMetadata, SingleTemplate } from "@/template-heirarchy/page/single";
|
|
8
|
-
/**
|
|
9
|
-
* Core implementation for the singular page/post route.
|
|
10
|
-
* Resolves the path to a specific post ID and updates the queried object state.
|
|
11
|
-
*
|
|
12
|
-
* @param {RouteProps} props - Route properties including the path array and metadata flag.
|
|
13
|
-
* @returns {Promise<MetadataResult | TemplateResult>} The metadata or template result based on the hierarchy.
|
|
14
|
-
* @throws {Error} Throws a Next.js notFound error if the path does not match any post or page.
|
|
15
|
-
*/
|
|
16
|
-
export async function SingularPage({ path, metadata = false }) {
|
|
17
|
-
var _a;
|
|
18
|
-
let page = getPageNumber(path);
|
|
19
|
-
if (page) {
|
|
20
|
-
path = path.slice(0, -2);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
page = 1;
|
|
24
|
-
}
|
|
25
|
-
const postId = (await postLoader.findAndPrime({
|
|
26
|
-
path: `/${path.join('/')}`,
|
|
27
|
-
multiple: false,
|
|
28
|
-
noFoundRows: true,
|
|
29
|
-
noPaging: true,
|
|
30
|
-
ignoreStickyPosts: true,
|
|
31
|
-
})).ids[0];
|
|
32
|
-
if (!postId)
|
|
33
|
-
notFound();
|
|
34
|
-
const post = (_a = await getPost(postId)) !== null && _a !== void 0 ? _a : notFound();
|
|
35
|
-
const postType = post.postType;
|
|
36
|
-
const currentQueriedObject = {
|
|
37
|
-
objectType: 'post',
|
|
38
|
-
posts: [postId]
|
|
39
|
-
};
|
|
40
|
-
const state = queriedObjectState();
|
|
41
|
-
state.currentState = currentQueriedObject;
|
|
42
|
-
if (postType === 'post') {
|
|
43
|
-
return metadata ? await SingleMetadata() : _jsx(SingleTemplate, {});
|
|
44
|
-
}
|
|
45
|
-
if (post.ID !== Number(await getOption('page_for_posts'))) {
|
|
46
|
-
return metadata ? await PageMetadata() : _jsx(PageTemplate, {});
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
return metadata ? await PostIndexPage({ path, metadata: true }) : _jsx(PostIndexPage, { path: path });
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { MetadataResult, TemplateResult } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* Resolves the site front page route and maps it to the template hierarchy to return Metadata.
|
|
4
|
-
* * Routing Behavior:
|
|
5
|
-
* - If a static page is set as the homepage ('page_on_front'), it routes to `PageMetadata`.
|
|
6
|
-
* - If no static page is set, it delegates routing to `PostIndexPage`.
|
|
7
|
-
*
|
|
8
|
-
* @param {{ path: string[], metadata: true }} props - Route properties requesting metadata.
|
|
9
|
-
* @returns {Promise<MetadataResult>} The generated metadata.
|
|
10
|
-
*/
|
|
11
|
-
export declare function SiteFrontPage(props: {
|
|
12
|
-
path: string[];
|
|
13
|
-
metadata: true;
|
|
14
|
-
}): Promise<MetadataResult>;
|
|
15
|
-
/**
|
|
16
|
-
* Resolves the site front page route and maps it to the template hierarchy to return a Template.
|
|
17
|
-
* * Routing Behavior:
|
|
18
|
-
* - If a static page is set as the homepage ('page_on_front'), it routes to `PageTemplate`.
|
|
19
|
-
* - If no static page is set, it delegates routing to `PostIndexPage`.
|
|
20
|
-
*
|
|
21
|
-
* @param {{ path: string[], metadata?: false }} props - Route properties requesting a template.
|
|
22
|
-
* @returns {Promise<TemplateResult>} The rendered template component.
|
|
23
|
-
*/
|
|
24
|
-
export declare function SiteFrontPage(props: {
|
|
25
|
-
path: string[];
|
|
26
|
-
metadata?: false;
|
|
27
|
-
}): Promise<TemplateResult>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { queriedObjectState } from "@/globals/globals";
|
|
3
|
-
import { PostIndexPage } from "./post-index-page";
|
|
4
|
-
import { PageMetadata, PageTemplate } from "@/template-heirarchy/page/page";
|
|
5
|
-
/**
|
|
6
|
-
* Core implementation for the site front page (root) route.
|
|
7
|
-
* Checks for a configured static front page and updates the queried object state.
|
|
8
|
-
*
|
|
9
|
-
* @param {RouteProps} props - Route properties including the path array and metadata flag.
|
|
10
|
-
* @returns {Promise<MetadataResult | TemplateResult>} The metadata or template result based on the hierarchy.
|
|
11
|
-
*/
|
|
12
|
-
export async function SiteFrontPage({ path, metadata = false }) {
|
|
13
|
-
const homepageId = Number(await getOption('page_on_front'));
|
|
14
|
-
if (homepageId) {
|
|
15
|
-
const currentQueriedObject = {
|
|
16
|
-
objectType: 'post',
|
|
17
|
-
posts: [homepageId]
|
|
18
|
-
};
|
|
19
|
-
const state = queriedObjectState();
|
|
20
|
-
state.currentState = currentQueriedObject;
|
|
21
|
-
return metadata ? await PageMetadata() : _jsx(PageTemplate, {});
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
return metadata ? await PostIndexPage({ path, metadata: true }) : _jsx(PostIndexPage, { path: path });
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { MetadataResult, TemplateResult } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* Resolves the term archive route and maps it to the template hierarchy to return Metadata.
|
|
4
|
-
* * Routing Behavior:
|
|
5
|
-
* - If the taxonomy is 'category', it routes to `CategoryMetadata`.
|
|
6
|
-
* - If the taxonomy is 'tag', it routes to `TagMetadata`.
|
|
7
|
-
* - For all other taxonomies, it routes to `TaxonomyMetadata`.
|
|
8
|
-
*
|
|
9
|
-
* @param {{ path: string[], metadata: true }} props - Route properties requesting metadata.
|
|
10
|
-
* @returns {Promise<MetadataResult>} The generated metadata.
|
|
11
|
-
*/
|
|
12
|
-
export declare function TermArchive(props: {
|
|
13
|
-
path: string[];
|
|
14
|
-
metadata: true;
|
|
15
|
-
}): Promise<MetadataResult>;
|
|
16
|
-
/**
|
|
17
|
-
* Resolves the term archive route and maps it to the template hierarchy to return a Template.
|
|
18
|
-
* * Routing Behavior:
|
|
19
|
-
* - If the taxonomy is 'category', it routes to `CategoryTemplate`.
|
|
20
|
-
* - If the taxonomy is 'tag', it routes to `TagTemplate`.
|
|
21
|
-
* - For all other taxonomies, it routes to `TaxonomyTemplate`.
|
|
22
|
-
*
|
|
23
|
-
* @param {{ path: string[], metadata?: false }} props - Route properties requesting a template.
|
|
24
|
-
* @returns {Promise<TemplateResult>} The rendered template component.
|
|
25
|
-
*/
|
|
26
|
-
export declare function TermArchive(props: {
|
|
27
|
-
path: string[];
|
|
28
|
-
metadata?: false;
|
|
29
|
-
}): Promise<TemplateResult>;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getPageNumber } from "../helpers";
|
|
3
|
-
import { notFound } from "next/navigation";
|
|
4
|
-
import { CategoryMetadata, CategoryTemplate } from "@/template-heirarchy/archive/category";
|
|
5
|
-
import { TagMetadata, TagTemplate } from "@/template-heirarchy/archive/tag";
|
|
6
|
-
import { TaxonomyMetadata, TaxonomyTemplate } from "@/template-heirarchy/archive/taxonomy";
|
|
7
|
-
import { queriedObjectState } from "@/globals/globals";
|
|
8
|
-
/**
|
|
9
|
-
* Core implementation for the term archive route.
|
|
10
|
-
* Retrieves posts for a specific taxonomy term and updates the queried object state.
|
|
11
|
-
*
|
|
12
|
-
* @param {RouteProps} props - Route properties including the path array and metadata flag.
|
|
13
|
-
* @returns {Promise<MetadataResult | TemplateResult>} The metadata or template result based on the hierarchy.
|
|
14
|
-
* @throws {Error} Throws a Next.js notFound error if the term does not exist.
|
|
15
|
-
*/
|
|
16
|
-
export async function TermArchive({ path, metadata = false }) {
|
|
17
|
-
var _a, _b;
|
|
18
|
-
const postsPerPage = (_a = Number(await getOption('posts_per_page'))) !== null && _a !== void 0 ? _a : 10;
|
|
19
|
-
let page = getPageNumber(path);
|
|
20
|
-
if (page) {
|
|
21
|
-
path = path.slice(0, -2);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
page = 1;
|
|
25
|
-
}
|
|
26
|
-
const taxonomy = (_b = path[0]) !== null && _b !== void 0 ? _b : '';
|
|
27
|
-
const pathString = path.slice(1).join('/');
|
|
28
|
-
const termQuery = await termLoader.findAndPrime({
|
|
29
|
-
taxonomy,
|
|
30
|
-
path: `/${pathString}`
|
|
31
|
-
});
|
|
32
|
-
if (!termQuery.ids.length)
|
|
33
|
-
notFound();
|
|
34
|
-
const postIds = await postLoader.findAndPrime({
|
|
35
|
-
termIn: termQuery.ids,
|
|
36
|
-
noFoundRows: false,
|
|
37
|
-
noPaging: false,
|
|
38
|
-
postType: 'post',
|
|
39
|
-
page: page,
|
|
40
|
-
postsPerPage: postsPerPage,
|
|
41
|
-
postStatus: 'publish',
|
|
42
|
-
orderBy: 'date'
|
|
43
|
-
});
|
|
44
|
-
const terms = await getTerms(termQuery.ids);
|
|
45
|
-
const mainTerm = terms.find(term => term.slug === path[path.length - 1]);
|
|
46
|
-
const currentQueriedObject = {
|
|
47
|
-
objectType: 'term',
|
|
48
|
-
posts: postIds.ids,
|
|
49
|
-
page,
|
|
50
|
-
pageCount: Math.ceil(postIds.count / postsPerPage),
|
|
51
|
-
mainTerm: mainTerm.termId,
|
|
52
|
-
terms: termQuery.ids
|
|
53
|
-
};
|
|
54
|
-
const state = queriedObjectState();
|
|
55
|
-
state.currentState = currentQueriedObject;
|
|
56
|
-
if (taxonomy === 'category') {
|
|
57
|
-
return metadata ? await CategoryMetadata() : _jsx(CategoryTemplate, {});
|
|
58
|
-
}
|
|
59
|
-
else if (taxonomy === 'tag') {
|
|
60
|
-
return metadata ? await TagMetadata() : _jsx(TagTemplate, {});
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
return metadata ? await TaxonomyMetadata() : _jsx(TaxonomyTemplate, {});
|
|
64
|
-
}
|
|
65
|
-
}
|
package/dist/router/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IMenuItem } from "../entities/post/post.interface";
|
|
2
|
-
type Menu = {
|
|
3
|
-
menuItem: IMenuItem;
|
|
4
|
-
children: Menu[];
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Retrieves a menu by its location identifier.
|
|
8
|
-
*
|
|
9
|
-
* @param {string} menuLocation - The location identifier of the menu.
|
|
10
|
-
* @returns {Promise<Menu[] | undefined>} An array of menu items representing the menu tree, or undefined if the menu is not found.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getMenu(menuLocation: string): Promise<Menu[] | undefined>;
|
|
13
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieves a theme modification value by key.
|
|
3
|
-
*
|
|
4
|
-
* @param {string} key - The key of the theme modification to retrieve.
|
|
5
|
-
* @returns {Promise<unknown | undefined>} The theme modification value, or undefined if not found.
|
|
6
|
-
*/
|
|
7
|
-
export declare function getThemeMods(key: string): Promise<unknown | undefined>;
|
package/dist/services/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './get-theme-mods';
|
|
2
|
-
export * from './get-menu';
|
|
3
|
-
export * from './metadata/get-blogname';
|
|
4
|
-
export * from './metadata/get-language-attribute';
|
|
5
|
-
export * from './metadata/get-favicon-url';
|
|
6
|
-
export * from './utilities/esc-html';
|
|
7
|
-
export * from './utilities/kses-post';
|
|
8
|
-
export * from './utilities/get-date-time-formatter';
|
|
9
|
-
export * from './utilities/capitalise-first-letter';
|
|
10
|
-
export * from './utilities/process-url';
|
package/dist/services/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './get-theme-mods';
|
|
2
|
-
export * from './get-menu';
|
|
3
|
-
export * from './metadata/get-blogname';
|
|
4
|
-
export * from './metadata/get-language-attribute';
|
|
5
|
-
export * from './metadata/get-favicon-url';
|
|
6
|
-
export * from './utilities/esc-html';
|
|
7
|
-
export * from './utilities/kses-post';
|
|
8
|
-
export * from './utilities/get-date-time-formatter';
|
|
9
|
-
export * from './utilities/capitalise-first-letter';
|
|
10
|
-
export * from './utilities/process-url';
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sanitizes and parses an HTML string into React elements.
|
|
3
|
-
*
|
|
4
|
-
* @param {string} html - The HTML string to process.
|
|
5
|
-
* @returns {string | JSX.Element | JSX.Element[]} The parsed React elements.
|
|
6
|
-
*/
|
|
7
|
-
export declare function wpKsesPost(html: string): string | import("react").JSX.Element | import("react").JSX.Element[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Metadata } from 'next';
|
|
2
|
-
/**
|
|
3
|
-
* Loads the exported metadata configuration for a given template.
|
|
4
|
-
*
|
|
5
|
-
* @param {string} template - The name of the template file to load metadata from.
|
|
6
|
-
* @returns {Promise<Metadata | undefined>} The metadata object, or undefined if the metadata does not exist.
|
|
7
|
-
*/
|
|
8
|
-
export declare function loadMetadata(template: string): Promise<Metadata | undefined>;
|
|
9
|
-
export declare function loadTemplate(template: string): Promise<React.ComponentType<any> | undefined>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for the Archive template.
|
|
5
|
-
* Fallback: Index
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function ArchiveMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the Archive template. Falls back to the Index template if not found.
|
|
12
|
-
* Fallback: Index
|
|
13
|
-
*
|
|
14
|
-
* @returns {Promise<JSX.Element>} The rendered template component.
|
|
15
|
-
*/
|
|
16
|
-
export declare function ArchiveTemplate(): Promise<JSX.Element>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for the Author template.
|
|
5
|
-
* Fallback: Archive
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function AuthorMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the Author template. Falls back to the Archive template if not found.
|
|
12
|
-
* Fallback: Archive
|
|
13
|
-
*
|
|
14
|
-
* @returns {Promise<JSX.Element>} The rendered template component.
|
|
15
|
-
*/
|
|
16
|
-
export declare function AuthorTemplate(): Promise<JSX.Element>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for the Category template.
|
|
5
|
-
* Fallback: Archive
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function CategoryMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the Category template. Falls back to the Archive template if not found.
|
|
12
|
-
* Fallback: Archive
|
|
13
|
-
*
|
|
14
|
-
* @returns {Promise<JSX.Element>} The rendered template component.
|
|
15
|
-
*/
|
|
16
|
-
export declare function CategoryTemplate(): Promise<JSX.Element>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for a Post Type Archive template based on the given post type.
|
|
5
|
-
* Fallback: Archive
|
|
6
|
-
*
|
|
7
|
-
* @param {object} props - The properties for loading metadata.
|
|
8
|
-
* @param {string} props.postType - The post type to load the metadata for.
|
|
9
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
10
|
-
*/
|
|
11
|
-
export declare function PostTypeArchiveMetadata({ postType }: {
|
|
12
|
-
postType: string;
|
|
13
|
-
}): Promise<Metadata>;
|
|
14
|
-
/**
|
|
15
|
-
* Renders a Post Type Archive template. Falls back to the Archive template if not found.
|
|
16
|
-
* Fallback: Archive
|
|
17
|
-
*
|
|
18
|
-
* @param {object} props - The properties for rendering the template.
|
|
19
|
-
* @param {string} props.postType - The post type to load the template for.
|
|
20
|
-
* @returns {Promise<JSX.Element>} The rendered template component.
|
|
21
|
-
*/
|
|
22
|
-
export declare function PostTypeArchiveTemplate({ postType }: {
|
|
23
|
-
postType: string;
|
|
24
|
-
}): Promise<JSX.Element>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for the Tag template.
|
|
5
|
-
* Fallback: Archive
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function TagMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the Tag template. Falls back to the Archive template if not found.
|
|
12
|
-
* Fallback: Archive
|
|
13
|
-
*
|
|
14
|
-
* @returns {Promise<JSX.Element>} The rendered template component.
|
|
15
|
-
*/
|
|
16
|
-
export declare function TagTemplate(): Promise<JSX.Element>;
|