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,16 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for the Taxonomy template.
|
|
5
|
-
* Fallback: Archive
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function TaxonomyMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the Taxonomy 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 TaxonomyTemplate(): Promise<JSX.Element>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for the Home template.
|
|
5
|
-
* Fallback: Index
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function HomeMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the Home 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 HomeTemplate(): Promise<JSX.Element>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for the Index template.
|
|
5
|
-
* Fallback: None
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The loaded metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function IndexMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the Index template.
|
|
12
|
-
* Fallback: None
|
|
13
|
-
*
|
|
14
|
-
* @throws {Error} Throws if the Index template cannot be found in the _templates directory.
|
|
15
|
-
* @returns {Promise<JSX.Element>} The rendered template component.
|
|
16
|
-
*/
|
|
17
|
-
export declare function IndexTemplate(): Promise<JSX.Element>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for the NotFound template.
|
|
5
|
-
* Fallback: Index
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function NotFoundMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the NotFound 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 NotFoundTemplate(): Promise<JSX.Element>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for the Page template.
|
|
5
|
-
* Fallback: Singular
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function PageMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the Page template. Falls back to the Singular template if not found.
|
|
12
|
-
* Fallback: Singular
|
|
13
|
-
*
|
|
14
|
-
* @returns {Promise<JSX.Element>} The rendered template component.
|
|
15
|
-
*/
|
|
16
|
-
export declare function PageTemplate(): 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 template based on the provided post type string.
|
|
5
|
-
* Fallback: Singular
|
|
6
|
-
*
|
|
7
|
-
* @param {object} props - The properties for loading metadata.
|
|
8
|
-
* @param {string} props.postType - The post type to load metadata for.
|
|
9
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
10
|
-
*/
|
|
11
|
-
export declare function PostTypeMetadata({ postType }: {
|
|
12
|
-
postType: string;
|
|
13
|
-
}): Promise<Metadata>;
|
|
14
|
-
/**
|
|
15
|
-
* Renders a Post Type template based on the provided post type string. Falls back to Singular template if not found.
|
|
16
|
-
* Fallback: Singular
|
|
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 PostTypeTemplate({ 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 Single template.
|
|
5
|
-
* Fallback: Singular
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function SingleMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the Single template. Falls back to the Singular template if not found.
|
|
12
|
-
* Fallback: Singular
|
|
13
|
-
*
|
|
14
|
-
* @returns {Promise<JSX.Element>} The rendered template component.
|
|
15
|
-
*/
|
|
16
|
-
export declare function SingleTemplate(): Promise<JSX.Element>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Metadata } from "next";
|
|
2
|
-
import { JSX } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the metadata for the Singular template.
|
|
5
|
-
* Fallback: Index
|
|
6
|
-
*
|
|
7
|
-
* @returns {Promise<Metadata>} The merged metadata object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function SingularMetadata(): Promise<Metadata>;
|
|
10
|
-
/**
|
|
11
|
-
* Renders the Singular 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 SingularTemplate(): Promise<JSX.Element>;
|
package/dist/ui/index.d.ts
DELETED
package/dist/ui/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ClassValue } from "clsx";
|
|
2
|
-
import Image from "next/image";
|
|
3
|
-
import { ComponentPropsWithoutRef } from "react";
|
|
4
|
-
type Props = Omit<ComponentPropsWithoutRef<typeof Image>, "src" | "alt" | "height" | "width"> & {
|
|
5
|
-
attachmentId: number;
|
|
6
|
-
className?: ClassValue;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Renders a WordPress media attachment using the Next.js Image component.
|
|
10
|
-
*/
|
|
11
|
-
export declare function RenderAttachmentImage({ attachmentId, className, ...rest }: Props): Promise<import("react").JSX.Element | undefined>;
|
|
12
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import Image from "next/image";
|
|
14
|
-
/**
|
|
15
|
-
* Renders a WordPress media attachment using the Next.js Image component.
|
|
16
|
-
*/
|
|
17
|
-
export async function RenderAttachmentImage(_a) {
|
|
18
|
-
var { attachmentId, className } = _a, rest = __rest(_a, ["attachmentId", "className"]);
|
|
19
|
-
const image = await getPost(attachmentId);
|
|
20
|
-
if (!image)
|
|
21
|
-
return;
|
|
22
|
-
const { src, alt, height, width } = image.imageAttributes;
|
|
23
|
-
return (_jsx(Image, Object.assign({ src: src || '', alt: alt || '', height: height, width: width, className: className }, rest)));
|
|
24
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ResolvedFlexibleContent } from "@/acf-functions/types/components/field-props";
|
|
2
|
-
type Props = {
|
|
3
|
-
layouts: ResolvedFlexibleContent<any>;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Dynamically resolves and renders an array of mapped ACF Layout components from a resolved flexible content field.
|
|
7
|
-
*/
|
|
8
|
-
export declare function RenderComponents({ layouts }: Props): Promise<import("react").JSX.Element[]>;
|
|
9
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* Dynamically resolves and renders an array of mapped ACF Layout components from a resolved flexible content field.
|
|
4
|
-
*/
|
|
5
|
-
export async function RenderComponents({ layouts }) {
|
|
6
|
-
return layouts.map((layout, index) => _jsx(layout.Component, Object.assign({}, layout.content), index));
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type Props = {
|
|
2
|
-
loggedInUserId?: number;
|
|
3
|
-
};
|
|
4
|
-
/**
|
|
5
|
-
* Renders the WordPress admin bar for authenticated administrators browsing the Next.js frontend.
|
|
6
|
-
*/
|
|
7
|
-
export declare function RenderTheAdminBar({ loggedInUserId }: Props): Promise<import("react").JSX.Element | null>;
|
|
8
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
|
-
import { usePathname } from "next/navigation";
|
|
5
|
-
import Script from "next/script";
|
|
6
|
-
import { wpKsesPost } from "@/services/utilities/kses-post";
|
|
7
|
-
/**
|
|
8
|
-
* Renders the WordPress admin bar for authenticated administrators browsing the Next.js frontend.
|
|
9
|
-
*/
|
|
10
|
-
export async function RenderTheAdminBar({ loggedInUserId }) {
|
|
11
|
-
const [adminBar, setAdminBar] = useState(null);
|
|
12
|
-
const [isMounted, setIsMounted] = useState(false);
|
|
13
|
-
const path = usePathname();
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
fetch(`/api/admin-bar?user_id=${loggedInUserId}&path=${encodeURIComponent(path)}`)
|
|
16
|
-
.then((request) => {
|
|
17
|
-
if (!request.ok) {
|
|
18
|
-
throw new Error(`Failed to fetch admin bar: ${request.status}`);
|
|
19
|
-
}
|
|
20
|
-
return request.json();
|
|
21
|
-
})
|
|
22
|
-
.then((response) => {
|
|
23
|
-
setAdminBar(response);
|
|
24
|
-
setTimeout(() => setIsMounted(true), 50);
|
|
25
|
-
})
|
|
26
|
-
.catch((error) => {
|
|
27
|
-
console.error("Failed to load admin bar", error.message);
|
|
28
|
-
});
|
|
29
|
-
}, [loggedInUserId, path]);
|
|
30
|
-
if (!adminBar) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
return (_jsxs(_Fragment, { children: [_jsx("link", { rel: "stylesheet", href: adminBar.assets.css.admin_bar, precedence: "high" }), _jsx("link", { rel: "stylesheet", href: adminBar.assets.css.dashicons, precedence: "high" }), _jsx(Script, { src: adminBar.assets.js.admin_bar }), _jsx("div", { className: `fixed top-0 left-0 right-0 transform transition-all duration-300 ease-in-out ${isMounted
|
|
34
|
-
? "scale-y-100"
|
|
35
|
-
: "scale-y-0"}`, children: wpKsesPost(adminBar.html) })] }));
|
|
36
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type Props = {
|
|
2
|
-
className?: string;
|
|
3
|
-
};
|
|
4
|
-
/**
|
|
5
|
-
* Renders the custom site logo defined in the WordPress Customizer.
|
|
6
|
-
*
|
|
7
|
-
* Fallback: Renders the text-based Site Title if no custom logo is assigned in WordPress.
|
|
8
|
-
*/
|
|
9
|
-
export declare function RenderTheLogo({ className }: Props): Promise<import("react").JSX.Element>;
|
|
10
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getThemeMods } from "@/services/get-theme-mods";
|
|
3
|
-
import { getBlogname } from "@/services/metadata/get-blogname";
|
|
4
|
-
import { RenderAttachmentImage } from "./render-attachment-image";
|
|
5
|
-
/**
|
|
6
|
-
* Renders the custom site logo defined in the WordPress Customizer.
|
|
7
|
-
*
|
|
8
|
-
* Fallback: Renders the text-based Site Title if no custom logo is assigned in WordPress.
|
|
9
|
-
*/
|
|
10
|
-
export async function RenderTheLogo({ className }) {
|
|
11
|
-
var _a;
|
|
12
|
-
const logoId = (_a = Number(await getThemeMods('custom_logo'))) !== null && _a !== void 0 ? _a : 0;
|
|
13
|
-
return (_jsx("div", { className: className, children: logoId ?
|
|
14
|
-
_jsx(RenderAttachmentImage, { className: "h-full w-full object-contain object-center", attachmentId: logoId, sizes: "512px" })
|
|
15
|
-
: _jsx("span", { className: "text-4xl font-bold", children: await getBlogname() }) }));
|
|
16
|
-
}
|
package/dist/wpdb/index.d.ts
DELETED
|
File without changes
|
package/dist/wpdb/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/wpdb/wpdb.d.ts
DELETED
|
File without changes
|