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.
Files changed (227) hide show
  1. package/cli/install.js +27 -0
  2. package/{dist/acf-functions/core/acf-builder.js → lib/acf-functions/core/acf-builder.ts} +45 -17
  3. package/{dist/acf-functions/core/acf-component-autoloader.js → lib/acf-functions/core/acf-component-autoloader.ts} +13 -7
  4. package/{dist/acf-functions/core/acf-field-group-autoloader.js → lib/acf-functions/core/acf-field-group-autoloader.ts} +11 -5
  5. package/{dist/acf-functions/services/define-field-group.d.ts → lib/acf-functions/services/define-field-group.ts} +4 -1
  6. package/{dist/acf-functions/services/define-layout.d.ts → lib/acf-functions/services/define-layout.ts} +4 -1
  7. package/lib/acf-functions/services/map-fields/helpers/map-choice-object.ts +20 -0
  8. package/{dist/acf-functions/services/map-fields/map-fields.js → lib/acf-functions/services/map-fields/map-fields.ts} +128 -89
  9. package/{dist/acf-functions/types/acf-field-group.d.ts → lib/acf-functions/types/acf-field-group.ts} +49 -28
  10. package/lib/acf-functions/types/acf-field.ts +2853 -0
  11. package/lib/acf-functions/types/acf-layout.ts +22 -0
  12. package/lib/acf-functions/types/components/field-props.ts +189 -0
  13. package/{dist/acf-functions/types/components/nextpress-component.d.ts → lib/acf-functions/types/components/nextpress-component.ts} +4 -3
  14. package/lib/ambient.d.ts +16 -0
  15. package/{dist/entities/common.d.ts → lib/entities/common.ts} +6 -4
  16. package/{dist/entities/option/option.interface.d.ts → lib/entities/option/option.interface.ts} +3 -3
  17. package/{dist/entities/option/option.js → lib/entities/option/option.ts} +21 -14
  18. package/{dist/entities/post/post.interface.d.ts → lib/entities/post/post.interface.ts} +26 -21
  19. package/lib/entities/post/post.ts +209 -0
  20. package/{dist/entities/term/term.interface.d.ts → lib/entities/term/term.interface.ts} +3 -3
  21. package/lib/entities/term/term.ts +82 -0
  22. package/{dist/entities/user/user.interface.d.ts → lib/entities/user/user.interface.ts} +2 -1
  23. package/lib/entities/user/user.ts +86 -0
  24. package/{dist/globals/entity-loader/entity-loader-base.js → lib/globals/entity-loader/entity-loader-base.ts} +64 -10
  25. package/{dist/globals/entity-loader/entity-loader.interface.d.ts → lib/globals/entity-loader/entity-loader.ts} +2 -4
  26. package/lib/globals/entity-loader/option-loader.ts +56 -0
  27. package/lib/globals/entity-loader/post-loader.ts +60 -0
  28. package/lib/globals/entity-loader/term-loader.ts +60 -0
  29. package/lib/globals/entity-loader/user-loader.ts +61 -0
  30. package/lib/globals/get-field/get-field.ts +76 -0
  31. package/{dist/globals/globals.js → lib/globals/globals.ts} +8 -3
  32. package/{dist/globals/nextpress-config/nextpress-config.interface.d.ts → lib/globals/nextpress-config/nextpress-config.interface.ts} +10 -6
  33. package/lib/globals/nextpress-config/nextpress-config.ts +8 -0
  34. package/lib/globals/queried-object/queried-object.ts +124 -0
  35. package/{dist/repository/optionquery/option-query-args.d.ts → lib/repository/optionquery/option-query-args.ts} +5 -2
  36. package/lib/repository/optionquery/option-query.ts +29 -0
  37. package/{dist/repository/postquery/post-query-args.d.ts → lib/repository/postquery/post-query-args.ts} +10 -6
  38. package/lib/repository/postquery/post-query.ts +282 -0
  39. package/{dist/repository/termquery/term-query-args.d.ts → lib/repository/termquery/term-query-args.ts} +16 -6
  40. package/lib/repository/termquery/term-query.ts +244 -0
  41. package/{dist/repository/userquery/user-query-args.d.ts → lib/repository/userquery/user-query-args.ts} +19 -7
  42. package/{dist/repository/userquery/user-query.js → lib/repository/userquery/user-query.ts} +93 -76
  43. package/{dist/router/helpers.js → lib/router/helpers.ts} +4 -4
  44. package/{dist/router/nextpress-layout.js → lib/router/nextpress-layout.tsx} +28 -9
  45. package/{dist/router/routes/not-found-page.js → lib/router/nextpress-not-found-route.tsx} +7 -5
  46. package/{dist/router/nextpress-proxy.js → lib/router/nextpress-proxy.ts} +15 -3
  47. package/{dist/router/nextpress-static-params.js → lib/router/nextpress-static-params.ts} +17 -5
  48. package/{dist/router/router.js → lib/router/router.tsx} +29 -22
  49. package/{dist/router/routes/api/api-get-admin-bar.js → lib/router/routes/api/api-get-admin-bar.ts} +8 -6
  50. package/{dist/router/routes/api/api-get-draft-mode.js → lib/router/routes/api/api-get-draft-mode.ts} +15 -6
  51. package/{dist/router/routes/api/api-get-field-groups.js → lib/router/routes/api/api-get-field-groups.ts} +13 -8
  52. package/{dist/router/routes/api/api-post-revalidate.js → lib/router/routes/api/api-post-revalidate.ts} +6 -4
  53. package/{dist/router/routes/api/helpers.js → lib/router/routes/api/helpers.ts} +4 -3
  54. package/lib/router/routes/author-archive.tsx +75 -0
  55. package/lib/router/routes/post-index-page.tsx +58 -0
  56. package/lib/router/routes/singular-page.tsx +78 -0
  57. package/lib/router/routes/site-front-page.tsx +51 -0
  58. package/lib/router/routes/term-archive.tsx +93 -0
  59. package/{dist/router/types.d.ts → lib/router/types.ts} +4 -2
  60. package/{dist/services/get-menu.js → lib/services/get-menu.ts} +56 -32
  61. package/{dist/services/get-theme-mods.js → lib/services/get-theme-mods.ts} +6 -4
  62. package/{dist/services/metadata/get-blogname.js → lib/services/metadata/get-blogname.ts} +2 -2
  63. package/{dist/services/metadata/get-favicon-url.js → lib/services/metadata/get-favicon-url.ts} +5 -4
  64. package/{dist/services/metadata/get-language-attribute.js → lib/services/metadata/get-language-attribute.ts} +1 -1
  65. package/{dist/services/utilities/capitalise-first-letter.js → lib/services/utilities/capitalise-first-letter.ts} +2 -3
  66. package/{dist/services/utilities/esc-html.js → lib/services/utilities/esc-html.ts} +3 -1
  67. package/{dist/services/utilities/get-date-time-formatter.js → lib/services/utilities/get-date-time-formatter.ts} +16 -6
  68. package/{dist/services/utilities/kses-post.js → lib/services/utilities/kses-post.ts} +2 -1
  69. package/{dist/services/utilities/process-url.js → lib/services/utilities/process-url.ts} +4 -3
  70. package/{dist/template-heirarchy/_autoloader/template-autoloader.js → lib/template-heirarchy/_autoloader/template-autoloader.ts} +18 -9
  71. package/{dist/template-heirarchy/archive/archive.js → lib/template-heirarchy/archive/archive.tsx} +10 -7
  72. package/{dist/template-heirarchy/archive/author.js → lib/template-heirarchy/archive/author.tsx} +10 -7
  73. package/{dist/template-heirarchy/archive/category.js → lib/template-heirarchy/archive/category.tsx} +11 -7
  74. package/{dist/template-heirarchy/archive/posttypearchive.js → lib/template-heirarchy/archive/posttypearchive.tsx} +11 -8
  75. package/{dist/template-heirarchy/archive/tag.js → lib/template-heirarchy/archive/tag.tsx} +12 -7
  76. package/{dist/template-heirarchy/archive/taxonomy.js → lib/template-heirarchy/archive/taxonomy.tsx} +10 -7
  77. package/{dist/template-heirarchy/home/home.js → lib/template-heirarchy/home/home.tsx} +10 -7
  78. package/{dist/template-heirarchy/index.js → lib/template-heirarchy/index.tsx} +9 -5
  79. package/{dist/template-heirarchy/not-found.tsx/not-found.js → lib/template-heirarchy/not-found.tsx/not-found.tsx} +10 -7
  80. package/{dist/template-heirarchy/page/page.js → lib/template-heirarchy/page/page.tsx} +10 -7
  81. package/{dist/template-heirarchy/page/posttype.js → lib/template-heirarchy/page/posttype.tsx} +12 -8
  82. package/{dist/template-heirarchy/page/single.js → lib/template-heirarchy/page/single.tsx} +10 -7
  83. package/{dist/template-heirarchy/page/singular.js → lib/template-heirarchy/page/singular.tsx} +10 -7
  84. package/lib/ui/render-attachment-image.tsx +28 -0
  85. package/lib/ui/render-components.tsx +12 -0
  86. package/lib/ui/render-the-admin-bar.tsx +79 -0
  87. package/lib/ui/render-the-logo.tsx +24 -0
  88. package/{dist/wpdb/wpdb.interface.d.ts → lib/wpdb/wpdb.interface.ts} +20 -1
  89. package/{dist/wpdb/wpdb.js → lib/wpdb/wpdb.ts} +9 -5
  90. package/package.json +8 -43
  91. package/dist/acf-functions/core/acf-builder.d.ts +0 -51
  92. package/dist/acf-functions/core/acf-component-autoloader.d.ts +0 -11
  93. package/dist/acf-functions/core/acf-field-group-autoloader.d.ts +0 -10
  94. package/dist/acf-functions/field-props.d.ts +0 -196
  95. package/dist/acf-functions/field-props.js +0 -1
  96. package/dist/acf-functions/index.d.ts +0 -13
  97. package/dist/acf-functions/index.js +0 -13
  98. package/dist/acf-functions/services/define-field-group.js +0 -10
  99. package/dist/acf-functions/services/define-layout.js +0 -10
  100. package/dist/acf-functions/services/map-fields/helpers/map-choice-object.d.ts +0 -2
  101. package/dist/acf-functions/services/map-fields/helpers/map-choice-object.js +0 -18
  102. package/dist/acf-functions/services/map-fields/map-fields.d.ts +0 -21
  103. package/dist/acf-functions/types/acf-field-group.js +0 -1
  104. package/dist/acf-functions/types/acf-field.d.ts +0 -2813
  105. package/dist/acf-functions/types/acf-field.js +0 -1
  106. package/dist/acf-functions/types/acf-layout.d.ts +0 -19
  107. package/dist/acf-functions/types/acf-layout.js +0 -1
  108. package/dist/acf-functions/types/acf-values.js +0 -1
  109. package/dist/acf-functions/types/components/field-props.d.ts +0 -196
  110. package/dist/acf-functions/types/components/field-props.js +0 -1
  111. package/dist/acf-functions/types/components/nextpress-component.js +0 -1
  112. package/dist/entities/common.js +0 -1
  113. package/dist/entities/index.d.ts +0 -9
  114. package/dist/entities/index.js +0 -9
  115. package/dist/entities/option/option.d.ts +0 -19
  116. package/dist/entities/option/option.interface.js +0 -2
  117. package/dist/entities/post/post.d.ts +0 -50
  118. package/dist/entities/post/post.interface.js +0 -2
  119. package/dist/entities/post/post.js +0 -184
  120. package/dist/entities/term/term.d.ts +0 -28
  121. package/dist/entities/term/term.interface.js +0 -1
  122. package/dist/entities/term/term.js +0 -67
  123. package/dist/entities/user/user.d.ts +0 -27
  124. package/dist/entities/user/user.interface.js +0 -1
  125. package/dist/entities/user/user.js +0 -74
  126. package/dist/globals/entity-loader/entity-loader-base.d.ts +0 -65
  127. package/dist/globals/entity-loader/entity-loader.interface.js +0 -1
  128. package/dist/globals/entity-loader/option-loader.d.ts +0 -15
  129. package/dist/globals/entity-loader/option-loader.js +0 -31
  130. package/dist/globals/entity-loader/post-loader.d.ts +0 -21
  131. package/dist/globals/entity-loader/post-loader.js +0 -28
  132. package/dist/globals/entity-loader/term-loader.d.ts +0 -21
  133. package/dist/globals/entity-loader/term-loader.js +0 -28
  134. package/dist/globals/entity-loader/user-loader.d.ts +0 -21
  135. package/dist/globals/entity-loader/user-loader.js +0 -28
  136. package/dist/globals/get-field/get-field.d.ts +0 -18
  137. package/dist/globals/get-field/get-field.js +0 -44
  138. package/dist/globals/globals.d.ts +0 -18
  139. package/dist/globals/index.d.ts +0 -10
  140. package/dist/globals/index.js +0 -10
  141. package/dist/globals/nextpress-config/nextpress-config.d.ts +0 -4
  142. package/dist/globals/nextpress-config/nextpress-config.interface.js +0 -1
  143. package/dist/globals/nextpress-config/nextpress-config.js +0 -2
  144. package/dist/globals/queried-object/queried-object.d.ts +0 -62
  145. package/dist/globals/queried-object/queried-object.js +0 -56
  146. package/dist/repository/index.d.ts +0 -5
  147. package/dist/repository/index.js +0 -5
  148. package/dist/repository/optionquery/option-query-args.js +0 -1
  149. package/dist/repository/optionquery/option-query.d.ts +0 -12
  150. package/dist/repository/optionquery/option-query.js +0 -20
  151. package/dist/repository/postquery/post-query-args.js +0 -1
  152. package/dist/repository/postquery/post-query.d.ts +0 -12
  153. package/dist/repository/postquery/post-query.js +0 -272
  154. package/dist/repository/termquery/term-query-args.js +0 -1
  155. package/dist/repository/termquery/term-query.d.ts +0 -11
  156. package/dist/repository/termquery/term-query.js +0 -213
  157. package/dist/repository/userquery/user-query-args.js +0 -1
  158. package/dist/repository/userquery/user-query.d.ts +0 -12
  159. package/dist/router/helpers.d.ts +0 -14
  160. package/dist/router/index.d.ts +0 -17
  161. package/dist/router/index.js +0 -17
  162. package/dist/router/nextpress-layout.d.ts +0 -11
  163. package/dist/router/nextpress-proxy.d.ts +0 -8
  164. package/dist/router/nextpress-static-params.d.ts +0 -9
  165. package/dist/router/router.d.ts +0 -23
  166. package/dist/router/routes/api/api-get-admin-bar.d.ts +0 -8
  167. package/dist/router/routes/api/api-get-draft-mode.d.ts +0 -8
  168. package/dist/router/routes/api/api-get-field-groups.d.ts +0 -7
  169. package/dist/router/routes/api/api-post-revalidate.d.ts +0 -7
  170. package/dist/router/routes/api/helpers.d.ts +0 -8
  171. package/dist/router/routes/author-archive.d.ts +0 -25
  172. package/dist/router/routes/author-archive.js +0 -49
  173. package/dist/router/routes/not-found-page.d.ts +0 -15
  174. package/dist/router/routes/post-index-page.d.ts +0 -25
  175. package/dist/router/routes/post-index-page.js +0 -33
  176. package/dist/router/routes/singular-page.d.ts +0 -29
  177. package/dist/router/routes/singular-page.js +0 -51
  178. package/dist/router/routes/site-front-page.d.ts +0 -27
  179. package/dist/router/routes/site-front-page.js +0 -26
  180. package/dist/router/routes/term-archive.d.ts +0 -29
  181. package/dist/router/routes/term-archive.js +0 -65
  182. package/dist/router/types.js +0 -1
  183. package/dist/services/get-menu.d.ts +0 -13
  184. package/dist/services/get-theme-mods.d.ts +0 -7
  185. package/dist/services/index.d.ts +0 -10
  186. package/dist/services/index.js +0 -10
  187. package/dist/services/metadata/get-blogname.d.ts +0 -6
  188. package/dist/services/metadata/get-favicon-url.d.ts +0 -6
  189. package/dist/services/metadata/get-language-attribute.d.ts +0 -6
  190. package/dist/services/services.d.ts +0 -3
  191. package/dist/services/services.js +0 -3
  192. package/dist/services/utilities/capitalise-first-letter.d.ts +0 -7
  193. package/dist/services/utilities/esc-html.d.ts +0 -7
  194. package/dist/services/utilities/get-date-time-formatter.d.ts +0 -6
  195. package/dist/services/utilities/index.d.ts +0 -0
  196. package/dist/services/utilities/index.js +0 -1
  197. package/dist/services/utilities/kses-post.d.ts +0 -7
  198. package/dist/services/utilities/process-url.d.ts +0 -7
  199. package/dist/template-heirarchy/_autoloader/template-autoloader.d.ts +0 -9
  200. package/dist/template-heirarchy/archive/archive.d.ts +0 -16
  201. package/dist/template-heirarchy/archive/author.d.ts +0 -16
  202. package/dist/template-heirarchy/archive/category.d.ts +0 -16
  203. package/dist/template-heirarchy/archive/posttypearchive.d.ts +0 -24
  204. package/dist/template-heirarchy/archive/tag.d.ts +0 -16
  205. package/dist/template-heirarchy/archive/taxonomy.d.ts +0 -16
  206. package/dist/template-heirarchy/home/home.d.ts +0 -16
  207. package/dist/template-heirarchy/index.d.ts +0 -17
  208. package/dist/template-heirarchy/not-found.tsx/not-found.d.ts +0 -16
  209. package/dist/template-heirarchy/page/page.d.ts +0 -16
  210. package/dist/template-heirarchy/page/posttype.d.ts +0 -24
  211. package/dist/template-heirarchy/page/single.d.ts +0 -16
  212. package/dist/template-heirarchy/page/singular.d.ts +0 -16
  213. package/dist/ui/index.d.ts +0 -4
  214. package/dist/ui/index.js +0 -4
  215. package/dist/ui/render-attachment-image.d.ts +0 -12
  216. package/dist/ui/render-attachment-image.js +0 -24
  217. package/dist/ui/render-components.d.ts +0 -9
  218. package/dist/ui/render-components.js +0 -7
  219. package/dist/ui/render-the-admin-bar.d.ts +0 -8
  220. package/dist/ui/render-the-admin-bar.js +0 -36
  221. package/dist/ui/render-the-logo.d.ts +0 -10
  222. package/dist/ui/render-the-logo.js +0 -16
  223. package/dist/wpdb/index.d.ts +0 -0
  224. package/dist/wpdb/index.js +0 -1
  225. package/dist/wpdb/wpdb.d.ts +0 -3
  226. package/dist/wpdb/wpdb.interface.js +0 -5
  227. /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>;
@@ -1,4 +0,0 @@
1
- export * from './render-the-admin-bar';
2
- export * from './render-attachment-image';
3
- export * from './render-components';
4
- export * from './render-the-logo';
package/dist/ui/index.js DELETED
@@ -1,4 +0,0 @@
1
- export * from './render-the-admin-bar';
2
- export * from './render-attachment-image';
3
- export * from './render-components';
4
- export * from './render-the-logo';
@@ -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
- }
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,3 +0,0 @@
1
- import { DB } from './wpdb.interface';
2
- import { Kysely } from 'kysely';
3
- export declare const wpdb: Kysely<DB>;
@@ -1,5 +0,0 @@
1
- /**
2
- * This file was generated by kysely-codegen.
3
- * Please do not edit it manually.
4
- */
5
- export {};