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.
- package/dist/acf-functions/core/acf-builder.d.ts +1 -0
- package/dist/acf-functions/core/acf-field-group-autoloader.d.ts +1 -0
- package/dist/acf-functions/services/define-field-group.d.ts +1 -0
- package/dist/acf-functions/services/define-layout.d.ts +1 -0
- package/dist/acf-functions/services/map-fields/helpers/map-choice-object.d.ts +1 -1
- package/dist/acf-functions/services/map-fields/map-fields.d.ts +3 -0
- package/dist/acf-functions/types/acf-field-group.d.ts +99 -0
- package/dist/acf-functions/types/acf-field-group.js +1 -0
- package/dist/acf-functions/types/acf-field.d.ts +2813 -0
- package/dist/acf-functions/types/acf-field.js +1 -0
- package/dist/acf-functions/types/acf-layout.d.ts +19 -0
- package/dist/acf-functions/types/acf-layout.js +1 -0
- package/dist/acf-functions/types/acf-values.d.ts +4 -0
- package/dist/acf-functions/types/acf-values.js +1 -0
- package/dist/acf-functions/types/components/field-props.d.ts +196 -0
- package/dist/acf-functions/types/components/field-props.js +1 -0
- package/dist/acf-functions/types/components/nextpress-component.d.ts +11 -0
- package/dist/acf-functions/types/components/nextpress-component.js +1 -0
- package/dist/entities/common.d.ts +28 -0
- package/dist/entities/common.js +1 -0
- package/dist/entities/option/option.interface.d.ts +7 -0
- package/dist/entities/option/option.interface.js +2 -0
- package/dist/entities/post/post.interface.d.ts +67 -0
- package/dist/entities/post/post.interface.js +2 -0
- package/dist/entities/term/term.interface.d.ts +8 -0
- package/dist/entities/term/term.interface.js +1 -0
- package/dist/entities/user/user.interface.d.ts +9 -0
- package/dist/entities/user/user.interface.js +1 -0
- package/dist/globals/entity-loader/entity-loader-base.d.ts +1 -1
- package/dist/globals/entity-loader/entity-loader.interface.d.ts +52 -0
- package/dist/globals/entity-loader/entity-loader.interface.js +1 -0
- package/dist/globals/entity-loader/option-loader.d.ts +1 -1
- package/dist/globals/entity-loader/post-loader.d.ts +1 -1
- package/dist/globals/entity-loader/term-loader.d.ts +1 -1
- package/dist/globals/entity-loader/user-loader.d.ts +1 -1
- package/dist/globals/get-field/get-field.d.ts +2 -1
- package/dist/globals/nextpress-config/nextpress-config.interface.d.ts +14 -0
- package/dist/globals/nextpress-config/nextpress-config.interface.js +1 -0
- package/dist/repository/optionquery/option-query-args.d.ts +19 -0
- package/dist/repository/optionquery/option-query-args.js +1 -0
- package/dist/repository/optionquery/option-query.d.ts +1 -1
- package/dist/repository/postquery/post-query-args.d.ts +104 -0
- package/dist/repository/postquery/post-query-args.js +1 -0
- package/dist/repository/postquery/post-query.d.ts +1 -1
- package/dist/repository/termquery/term-query-args.d.ts +51 -0
- package/dist/repository/termquery/term-query-args.js +1 -0
- package/dist/repository/termquery/term-query.d.ts +1 -1
- package/dist/repository/userquery/user-query-args.d.ts +63 -0
- package/dist/repository/userquery/user-query-args.js +1 -0
- package/dist/repository/userquery/user-query.d.ts +1 -1
- package/dist/router/types.d.ts +8 -0
- package/dist/router/types.js +1 -0
- package/dist/ui/render-components.d.ts +1 -1
- package/dist/wpdb/wpdb.interface.d.ts +152 -0
- package/dist/wpdb/wpdb.interface.js +5 -0
- package/package.json +1 -1
|
@@ -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?:
|
|
2
|
+
export declare function mapChoiceObject(return_format: 'array' | 'label' | 'value', value?: string, choices?: any): ACFChoiceObject | string | undefined;
|
|
@@ -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 {};
|