@uni-helper/pages-json-schema 0.3.23 → 0.4.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 (3) hide show
  1. package/README.md +3 -1
  2. package/package.json +5 -3
  3. package/schema.json +209 -1
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @uni-helper/pages-json-schema
2
2
 
3
- 为 uni-app 的 `pages.json` 提供 schema
3
+ 为 uni-app 的 `pages.json` 提供 schema。
4
+
5
+ 不想看文档?直接问 AI 🤖 <a href="https://deepwiki.com/uni-helper/vite-plugin-uni-pages"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a> <a href="https://zread.ai/uni-helper/vite-plugin-uni-pages" target="_blank"><img src="https://img.shields.io/badge/Ask_Zread-_.svg?style=flat&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff" alt="zread"/></a>
4
6
 
5
7
  ## 安装
6
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uni-helper/pages-json-schema",
3
- "version": "0.3.23",
3
+ "version": "0.4.0",
4
4
  "description": "Schema for uni-app pages.json",
5
5
  "author": "KeJun",
6
6
  "maintainers": [
@@ -25,9 +25,11 @@
25
25
  "jsonschema"
26
26
  ],
27
27
  "devDependencies": {
28
- "ts-json-schema-generator": "^2.3.0"
28
+ "ts-json-schema-generator": "^2.9.0"
29
29
  },
30
30
  "scripts": {
31
- "build": "ts-json-schema-generator -p \"../core/src/config/types/index.ts\" -t \"PagesConfig\" -o \"schema.json\" --no-type-check"
31
+ "build": "ts-json-schema-generator -p \"../types/src/pages-config.ts\" -t \"PagesConfig\" -o \"schema.json\" --no-type-check",
32
+ "build-post": "exit 0",
33
+ "dev": "pnpm build"
32
34
  }
33
35
  }
package/schema.json CHANGED
@@ -17,6 +17,21 @@
17
17
  ],
18
18
  "type": "string"
19
19
  },
20
+ "AppHarmony": {
21
+ "description": "设置编译到 App(Harmony)平台的特定样式\n\n相应的类型是 AppHarmony",
22
+ "properties": {
23
+ "softInputMode": {
24
+ "default": "adjustPan",
25
+ "description": "软键盘弹出模式,仅支持 \"adjustResize\" / \"adjustPan\"",
26
+ "enum": [
27
+ "adjustResize",
28
+ "adjustPan"
29
+ ],
30
+ "type": "string"
31
+ }
32
+ },
33
+ "type": "object"
34
+ },
20
35
  "AppPlus": {
21
36
  "properties": {
22
37
  "animationDuration": {
@@ -1178,6 +1193,15 @@
1178
1193
  },
1179
1194
  "GlobalStyle": {
1180
1195
  "properties": {
1196
+ "allowsBounceVertical": {
1197
+ "default": "YES",
1198
+ "description": "是否允许向下拉拽",
1199
+ "enum": [
1200
+ "YES",
1201
+ "NO"
1202
+ ],
1203
+ "type": "string"
1204
+ },
1181
1205
  "animationDuration": {
1182
1206
  "default": 300,
1183
1207
  "description": "窗口显示动画的持续时间,单位为 ms",
@@ -1188,6 +1212,10 @@
1188
1212
  "default": "pop-in",
1189
1213
  "description": "窗口显示的动画效果,详见 [窗口动画](https://uniapp.dcloud.net.cn/api/router#animation)"
1190
1214
  },
1215
+ "app-harmony": {
1216
+ "$ref": "#/definitions/AppHarmony",
1217
+ "description": "设置编译到 App(Harmony)平台的特定样式,配置项参考 [app-harmony](https://uniapp.dcloud.net.cn/collocation/pages#app-harmony)\n\n相应的类型是 AppHarmony"
1218
+ },
1191
1219
  "app-plus": {
1192
1220
  "$ref": "#/definitions/AppPlus",
1193
1221
  "description": "设置编译到 App 平台的特定样式,配置项参考 [app-plus](https://uniapp.dcloud.net.cn/collocation/pages#app-plus)\n\n相应的类型是 AppPlus"
@@ -1248,6 +1276,16 @@
1248
1276
  "default": "dark",
1249
1277
  "description": "下拉 loading 的样式,仅支持 \"dark\" / \"light\""
1250
1278
  },
1279
+ "disableScroll": {
1280
+ "default": false,
1281
+ "description": "设置为 true 则页面整体不能上下滚动(bounce 效果),只在页面配置中有效,在 globalStyle 中设置无效",
1282
+ "type": "boolean"
1283
+ },
1284
+ "disableSwipeBack": {
1285
+ "default": false,
1286
+ "description": "是否禁用滑动返回",
1287
+ "type": "boolean"
1288
+ },
1251
1289
  "dynamicRpx": {
1252
1290
  "default": false,
1253
1291
  "description": "是否使用动态 rpx,屏幕大小变化会重新渲染 rpx",
@@ -1279,6 +1317,10 @@
1279
1317
  "$ref": "#/definitions/MpBaidu",
1280
1318
  "description": "设置编译到 mp-baidu 平台的特定样式,配置项参考 [MP-BAIDU](https://uniapp.dcloud.net.cn/collocation/pages.html#mp-baidu) 和 <https://smartprogram.baidu.com/docs/develop/framework/process/#window>\n\n相应的类型是 MpBaidu"
1281
1319
  },
1320
+ "mp-harmony": {
1321
+ "$ref": "#/definitions/MpHarmony",
1322
+ "description": "设置编译到 mp-harmony 平台的特定样式\n\n相应的类型是 MpHarmony"
1323
+ },
1282
1324
  "mp-jd": {
1283
1325
  "$ref": "#/definitions/MpJd",
1284
1326
  "description": "设置编译到 mp-jd 平台的特定样式\n\n相应的类型是 MpJd"
@@ -1303,6 +1345,10 @@
1303
1345
  "$ref": "#/definitions/MpWeixin",
1304
1346
  "description": "设置编译到 mp-weixin 平台的特定样式,配置项参考 [MP-WEIXIN](https://uniapp.dcloud.net.cn/collocation/pages#mp-weixin) 和 <https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#window>\n\n相应的类型是 MpWeixin"
1305
1347
  },
1348
+ "mp-xhs": {
1349
+ "$ref": "#/definitions/MpXhs",
1350
+ "description": "设置编译到 mp-xhs 平台的特定样式\n\n相应的类型是 MpXhs"
1351
+ },
1306
1352
  "navigationBarBackgroundColor": {
1307
1353
  "anyOf": [
1308
1354
  {
@@ -1818,8 +1864,87 @@
1818
1864
  },
1819
1865
  "type": "object"
1820
1866
  },
1867
+ "MpHarmony": {
1868
+ "description": "设置编译到 mp-harmony 平台的特定样式,配置项参考 <https://developer.huawei.com/consumer/cn/doc/SPPartnerCenter-develop-Guides/extjson-description-0000002554249601>\n\n相应的类型是 MpHarmony",
1869
+ "properties": {
1870
+ "backgroundColor": {
1871
+ "anyOf": [
1872
+ {
1873
+ "$ref": "#/definitions/HEXColor"
1874
+ },
1875
+ {
1876
+ "$ref": "#/definitions/ThemeVar"
1877
+ }
1878
+ ],
1879
+ "default": "#FFFFFF",
1880
+ "description": "窗口的背景色,支持 HEX 颜色"
1881
+ },
1882
+ "backgroundTextStyle": {
1883
+ "anyOf": [
1884
+ {
1885
+ "const": "dark",
1886
+ "type": "string"
1887
+ },
1888
+ {
1889
+ "const": "light",
1890
+ "type": "string"
1891
+ },
1892
+ {
1893
+ "$ref": "#/definitions/ThemeVar"
1894
+ }
1895
+ ],
1896
+ "default": "dark",
1897
+ "description": "下拉 loading 的样式,仅支持 \"dark\" / \"light\""
1898
+ },
1899
+ "enablePullDownRefresh": {
1900
+ "default": false,
1901
+ "description": "是否开启全局的下拉刷新",
1902
+ "type": "boolean"
1903
+ },
1904
+ "navigationBarBackgroundColor": {
1905
+ "anyOf": [
1906
+ {
1907
+ "$ref": "#/definitions/HEXColor"
1908
+ },
1909
+ {
1910
+ "$ref": "#/definitions/ThemeVar"
1911
+ }
1912
+ ],
1913
+ "default": "#000000",
1914
+ "description": "导航栏背景颜色,支持 HEX 颜色",
1915
+ "format": "color"
1916
+ },
1917
+ "navigationBarTextStyle": {
1918
+ "anyOf": [
1919
+ {
1920
+ "const": "black",
1921
+ "type": "string"
1922
+ },
1923
+ {
1924
+ "const": "white",
1925
+ "type": "string"
1926
+ },
1927
+ {
1928
+ "$ref": "#/definitions/ThemeVar"
1929
+ }
1930
+ ],
1931
+ "default": "white",
1932
+ "description": "导航栏标题、状态栏颜色"
1933
+ },
1934
+ "navigationBarTitleText": {
1935
+ "description": "导航栏标题文字内容",
1936
+ "type": "string"
1937
+ },
1938
+ "onReachBottomDistance": {
1939
+ "default": 50,
1940
+ "description": "页面上拉触底事件触发时距页面底部距离,单位为 px",
1941
+ "type": "number"
1942
+ }
1943
+ },
1944
+ "type": "object"
1945
+ },
1821
1946
  "MpJd": {
1822
- "description": "设置编译到 mp-jd 平台的特定样式,配置项参考 <https://mp-docs.jd.com/doc/dev/framework/504#heading-3>\n\n相应的类型是 MpJd",
1947
+ "description": "设置编译到 mp-jd 平台的特定样式,配置项参考 <https://mp-docs.jd.com/doc/miniapp/dev/reference/2595#heading-3>\n\n相应的类型是 MpJd",
1823
1948
  "properties": {
1824
1949
  "backgroundColor": {
1825
1950
  "anyOf": [
@@ -2680,6 +2805,77 @@
2680
2805
  },
2681
2806
  "type": "object"
2682
2807
  },
2808
+ "MpXhs": {
2809
+ "description": "设置编译到 mp-xhs 平台的特定样式,配置项参考 <https://miniapp.xiaohongshu.com/doc/DC813994>\n\n相应的类型是 MpXhs",
2810
+ "properties": {
2811
+ "backgroundColor": {
2812
+ "anyOf": [
2813
+ {
2814
+ "$ref": "#/definitions/HEXColor"
2815
+ },
2816
+ {
2817
+ "$ref": "#/definitions/ThemeVar"
2818
+ }
2819
+ ],
2820
+ "default": "#FFFFFF",
2821
+ "description": "窗口的背景色,支持 HEX 颜色"
2822
+ },
2823
+ "enablePullDownRefresh": {
2824
+ "default": false,
2825
+ "description": "是否开启全局的下拉刷新",
2826
+ "type": "boolean"
2827
+ },
2828
+ "navigationBarBackgroundColor": {
2829
+ "anyOf": [
2830
+ {
2831
+ "$ref": "#/definitions/HEXColor"
2832
+ },
2833
+ {
2834
+ "$ref": "#/definitions/ThemeVar"
2835
+ }
2836
+ ],
2837
+ "default": "#000000",
2838
+ "description": "导航栏背景颜色,支持 HEX 颜色",
2839
+ "format": "color"
2840
+ },
2841
+ "navigationBarTextStyle": {
2842
+ "anyOf": [
2843
+ {
2844
+ "const": "black",
2845
+ "type": "string"
2846
+ },
2847
+ {
2848
+ "const": "white",
2849
+ "type": "string"
2850
+ },
2851
+ {
2852
+ "$ref": "#/definitions/ThemeVar"
2853
+ }
2854
+ ],
2855
+ "default": "white",
2856
+ "description": "导航栏标题、状态栏颜色"
2857
+ },
2858
+ "navigationBarTitleText": {
2859
+ "description": "导航栏标题文字内容",
2860
+ "type": "string"
2861
+ },
2862
+ "navigationStyle": {
2863
+ "default": "default",
2864
+ "description": "导航栏样式\n\n\"default\" 默认样式\n\n\"custom\" 自定义导航栏,只保留右上角胶囊按钮",
2865
+ "enum": [
2866
+ "default",
2867
+ "custom"
2868
+ ],
2869
+ "type": "string"
2870
+ },
2871
+ "onReachBottomDistance": {
2872
+ "default": 50,
2873
+ "description": "页面上拉触底事件触发时距页面底部距离,单位为 px",
2874
+ "type": "number"
2875
+ }
2876
+ },
2877
+ "type": "object"
2878
+ },
2683
2879
  "PageMetaDatum": {
2684
2880
  "properties": {
2685
2881
  "needLogin": {
@@ -2943,6 +3139,14 @@
2943
3139
  "description": "tab 上的文字默认颜色",
2944
3140
  "format": "color"
2945
3141
  },
3142
+ "custom": {
3143
+ "description": "是否启用自定义 tabBar",
3144
+ "type": "boolean"
3145
+ },
3146
+ "customize": {
3147
+ "description": "是否启用自定义 tabBar,启用后需要在项目根目录创建 custom-tab-bar 目录,参考 https://opendocs.alipay.com/mini/03jry7",
3148
+ "type": "boolean"
3149
+ },
2946
3150
  "fontSize": {
2947
3151
  "default": "10px",
2948
3152
  "description": "文字默认大小",
@@ -2973,6 +3177,10 @@
2973
3177
  "$ref": "#/definitions/TabBarMidButton",
2974
3178
  "description": "中间按钮 仅在 list 项为偶数时有效"
2975
3179
  },
3180
+ "overlay": {
3181
+ "description": "是否以 Native 模式渲染自定义 tabBar",
3182
+ "type": "boolean"
3183
+ },
2976
3184
  "position": {
2977
3185
  "default": "bottom",
2978
3186
  "description": "tab 位置",