jialh
2025-01-07 bb59b053247ef82969b64979260e2478bd732e1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
export interface ComponentJson {
    component: true;
    usingComponents?: UsingComponents;
}
interface ShareWindowOptions {
    navigationBarBackgroundColor?: string;
    navigationBarTextStyle?: 'white' | 'black';
    navigationBarTitleText?: string;
    navigationStyle?: 'default' | 'custom';
    backgroundColor?: string;
    backgroundTextStyle?: 'dark' | 'light';
    backgroundColorTop?: string;
    backgroundColorBottom?: string;
    enablePullDownRefresh?: boolean;
    onReachBottomDistance?: number;
    pageOrientation?: 'portrait' | 'landscape' | 'auto';
}
declare type Style = 'v2' | string;
declare type RestartStrategy = 'homePage' | 'homePageAndLatestPage' | string;
export interface PageWindowOptions extends ShareWindowOptions {
    component?: true;
    disableScroll?: boolean;
    usingComponents?: UsingComponents;
    initialRenderingCache?: 'static' | string;
    style?: Style;
    singlePage?: SinglePage;
    restartStrategy?: RestartStrategy;
}
export interface AppWindowOptions extends ShareWindowOptions {
    visualEffectInBackground?: 'none' | 'hidden';
}
interface SubPackage {
    name?: string;
    root: string;
    pages: string[];
    independent?: boolean;
}
interface TabBarItem {
    pagePath: string;
    text: string;
    iconPath?: string;
    selectedIconPath?: string;
}
export interface TabBar {
    color: string;
    selectedColor: string;
    backgroundColor: string;
    borderStyle?: 'black' | 'white';
    list: TabBarItem[];
    position?: 'bottom' | 'top';
    custom?: boolean;
}
export interface NetworkTimeout {
    request?: number;
    requeconnectSocketst?: number;
    uploadFile?: number;
    downloadFile?: number;
}
interface Plugins {
    [name: string]: {
        version: string;
        provider: string;
    };
}
interface PreloadRule {
    [name: string]: {
        network: 'wifi' | 'all';
        packages: string[];
    };
}
export interface UsingComponents {
    [name: string]: string;
}
interface Permission {
    [name: string]: {
        desc: string;
    };
}
interface UseExtendedLib {
    kbone: boolean;
    weui: boolean;
}
interface EntranceDeclare {
    locationMessage: {
        path: string;
        query: string;
    };
}
interface SinglePage {
    navigationBarFit?: 'squeezed' | 'float';
}
export interface AppJson {
    entryPagePath?: string;
    pages: string[];
    window?: AppWindowOptions;
    tabBar?: TabBar;
    networkTimeout?: NetworkTimeout;
    debug?: boolean;
    functionalPages?: boolean;
    subPackages?: SubPackage[];
    workers?: string;
    requiredBackgroundModes?: string[];
    plugins?: Plugins;
    preloadRule?: PreloadRule;
    resizable?: boolean;
    usingComponents?: UsingComponents;
    permission?: Permission;
    sitemapLocation?: string;
    style?: Style;
    useExtendedLib?: UseExtendedLib;
    entranceDeclare?: EntranceDeclare;
    darkmode?: boolean;
    themeLocation?: string;
    lazyCodeLoading?: 'requiredComponents' | string;
    singlePage?: SinglePage;
    restartStrategy?: RestartStrategy;
    [name: string]: unknown;
}
export {};