nextpress-core 1.0.2 → 1.0.3

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 (56) hide show
  1. package/dist/acf-functions/core/acf-builder.d.ts +1 -0
  2. package/dist/acf-functions/core/acf-field-group-autoloader.d.ts +1 -0
  3. package/dist/acf-functions/services/define-field-group.d.ts +1 -0
  4. package/dist/acf-functions/services/define-layout.d.ts +1 -0
  5. package/dist/acf-functions/services/map-fields/helpers/map-choice-object.d.ts +1 -1
  6. package/dist/acf-functions/services/map-fields/map-fields.d.ts +3 -0
  7. package/dist/acf-functions/types/acf-field-group.d.ts +99 -0
  8. package/dist/acf-functions/types/acf-field-group.js +1 -0
  9. package/dist/acf-functions/types/acf-field.d.ts +2813 -0
  10. package/dist/acf-functions/types/acf-field.js +1 -0
  11. package/dist/acf-functions/types/acf-layout.d.ts +19 -0
  12. package/dist/acf-functions/types/acf-layout.js +1 -0
  13. package/dist/acf-functions/types/acf-values.d.ts +4 -0
  14. package/dist/acf-functions/types/acf-values.js +1 -0
  15. package/dist/acf-functions/types/components/field-props.d.ts +196 -0
  16. package/dist/acf-functions/types/components/field-props.js +1 -0
  17. package/dist/acf-functions/types/components/nextpress-component.d.ts +11 -0
  18. package/dist/acf-functions/types/components/nextpress-component.js +1 -0
  19. package/dist/entities/common.d.ts +28 -0
  20. package/dist/entities/common.js +1 -0
  21. package/dist/entities/option/option.interface.d.ts +7 -0
  22. package/dist/entities/option/option.interface.js +2 -0
  23. package/dist/entities/post/post.interface.d.ts +67 -0
  24. package/dist/entities/post/post.interface.js +2 -0
  25. package/dist/entities/term/term.interface.d.ts +8 -0
  26. package/dist/entities/term/term.interface.js +1 -0
  27. package/dist/entities/user/user.interface.d.ts +9 -0
  28. package/dist/entities/user/user.interface.js +1 -0
  29. package/dist/globals/entity-loader/entity-loader-base.d.ts +1 -1
  30. package/dist/globals/entity-loader/entity-loader.interface.d.ts +52 -0
  31. package/dist/globals/entity-loader/entity-loader.interface.js +1 -0
  32. package/dist/globals/entity-loader/option-loader.d.ts +1 -1
  33. package/dist/globals/entity-loader/post-loader.d.ts +1 -1
  34. package/dist/globals/entity-loader/term-loader.d.ts +1 -1
  35. package/dist/globals/entity-loader/user-loader.d.ts +1 -1
  36. package/dist/globals/get-field/get-field.d.ts +2 -1
  37. package/dist/globals/nextpress-config/nextpress-config.interface.d.ts +14 -0
  38. package/dist/globals/nextpress-config/nextpress-config.interface.js +1 -0
  39. package/dist/repository/optionquery/option-query-args.d.ts +19 -0
  40. package/dist/repository/optionquery/option-query-args.js +1 -0
  41. package/dist/repository/optionquery/option-query.d.ts +1 -1
  42. package/dist/repository/postquery/post-query-args.d.ts +104 -0
  43. package/dist/repository/postquery/post-query-args.js +1 -0
  44. package/dist/repository/postquery/post-query.d.ts +1 -1
  45. package/dist/repository/termquery/term-query-args.d.ts +51 -0
  46. package/dist/repository/termquery/term-query-args.js +1 -0
  47. package/dist/repository/termquery/term-query.d.ts +1 -1
  48. package/dist/repository/userquery/user-query-args.d.ts +63 -0
  49. package/dist/repository/userquery/user-query-args.js +1 -0
  50. package/dist/repository/userquery/user-query.d.ts +1 -1
  51. package/dist/router/types.d.ts +8 -0
  52. package/dist/router/types.js +1 -0
  53. package/dist/ui/render-components.d.ts +1 -1
  54. package/dist/wpdb/wpdb.interface.d.ts +152 -0
  55. package/dist/wpdb/wpdb.interface.js +5 -0
  56. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { ACFFieldGroup, NextpressFieldGroup } from "../types/acf-field-group";
1
2
  /**
2
3
  * Class representing ACF builder.
3
4
  */
@@ -1,3 +1,4 @@
1
+ import { NextpressFieldGroup } from '../types/acf-field-group';
1
2
  /**
2
3
  * Autoloads ACF field groups dynamically from the field-groups directory.
3
4
  * * **Requirements for it to work:**
@@ -1,3 +1,4 @@
1
+ import { NextpressFieldGroup } from "../types/acf-field-group";
1
2
  /**
2
3
  * Defines field group configuration and applies typing.
3
4
  *
@@ -1,3 +1,4 @@
1
+ import { NextpressLayout } from "../types/acf-layout";
1
2
  /**
2
3
  * Defines layout configuration and applies typing.
3
4
  *
@@ -1,2 +1,2 @@
1
1
  import { ACFChoiceObject } from "@/acf-functions/types/components/field-props";
2
- export declare function mapChoiceObject(return_format: 'array' | 'label' | 'value', value?: string, choices?: Choices): ACFChoiceObject | string | undefined;
2
+ export declare function mapChoiceObject(return_format: 'array' | 'label' | 'value', value?: string, choices?: any): ACFChoiceObject | string | undefined;
@@ -1,3 +1,6 @@
1
+ import { NextpressField } from "@/acf-functions/types/acf-field";
2
+ import { NextpressLayout } from "@/acf-functions/types/acf-layout";
3
+ import { ACFRawValues } from "@/acf-functions/types/acf-values";
1
4
  /**
2
5
  * Maps individual ACF field to corresponding value.
3
6
  *
@@ -0,0 +1,99 @@
1
+ import { NextpressField, ACFField } from "./acf-field";
2
+ type TransformACFFieldGroup<T> = T extends any ? Omit<T, 'key' | 'fields'> & ('fields' extends keyof T ? {
3
+ fields: NextpressField[];
4
+ } : []) : never;
5
+ /** ACF Field Group without key constraints to allow key generation */
6
+ export type NextpressFieldGroup = TransformACFFieldGroup<ACFFieldGroup>;
7
+ /**
8
+ * Represents an Advanced Custom Fields (ACF) Field Group configuration.
9
+ */
10
+ export interface ACFFieldGroup {
11
+ /**
12
+ * Unique identifier for the field group with group_ prefix (e.g. 'group_abc123')
13
+ */
14
+ key: string;
15
+ /**
16
+ * The title/name of this entity
17
+ */
18
+ title: string;
19
+ /**
20
+ * Array of field definitions. If empty array, field group appears but contains no fields.
21
+ */
22
+ fields: ACFField[];
23
+ /**
24
+ * The order of this entity in the admin menu
25
+ */
26
+ menu_order?: number;
27
+ /**
28
+ * [ACF] Whether this entity is active
29
+ */
30
+ active?: boolean;
31
+ /**
32
+ * [ACF Export Only] Unix timestamp of last modification
33
+ */
34
+ modified?: number;
35
+ /**
36
+ * Location rules determining where this field group appears. Array of rule groups (OR logic between groups, AND logic within groups). If omitted or empty, field group won't appear on any edit screens.
37
+ */
38
+ location?: ACFLocationGroup[];
39
+ /**
40
+ * Position of the field group on the edit screen
41
+ */
42
+ position?: "normal" | "side" | "acf_after_title";
43
+ /**
44
+ * Visual style of the field group metabox
45
+ */
46
+ style?: "default" | "seamless";
47
+ /**
48
+ * Placement of field labels relative to fields
49
+ */
50
+ label_placement?: "top" | "left";
51
+ /**
52
+ * Placement of field instructions
53
+ */
54
+ instruction_placement?: "label" | "field";
55
+ /**
56
+ * Screen elements to hide when this field group is displayed
57
+ */
58
+ hide_on_screen?: ("permalink" | "the_content" | "excerpt" | "custom_fields" | "discussion" | "comments" | "revisions" | "slug" | "author" | "format" | "page_attributes" | "featured_image" | "categories" | "tags" | "send-trackbacks")[];
59
+ /**
60
+ * Description of the field group
61
+ */
62
+ description?: string;
63
+ /**
64
+ * Whether to expose this field group's fields in the REST API
65
+ */
66
+ show_in_rest?: boolean | number;
67
+ /**
68
+ * Whether to expose this field group to AI integrations
69
+ */
70
+ allow_ai_access?: boolean | number;
71
+ /**
72
+ * Description that helps AI integrations understand how to use this field group
73
+ */
74
+ ai_description?: string;
75
+ /**
76
+ * Alternative display title for the field group
77
+ */
78
+ display_title?: string;
79
+ }
80
+ /**
81
+ * Group of location rules (AND logic within group)
82
+ */
83
+ export type ACFLocationGroup = [ACFLocationRule, ...ACFLocationRule[]];
84
+ export interface ACFLocationRule {
85
+ /**
86
+ * The parameter to compare (e.g. 'post_type', 'page_template', 'user_role')
87
+ */
88
+ param: string;
89
+ /**
90
+ * Comparison operator
91
+ */
92
+ operator: "==" | "!=";
93
+ /**
94
+ * Value to compare against
95
+ */
96
+ value: string;
97
+ [k: string]: unknown;
98
+ }
99
+ export {};
@@ -0,0 +1 @@
1
+ export {};