From 6fce2bdd8a71e713be9159f68f6500245a2a8bfa Mon Sep 17 00:00:00 2001
From: Fuqiao Xue In addition to being presented in the form of an MiniApp page, MiniApp can also be displayed in the form of information fragment, that is, a MiniApp widget. In this form, developers can put their service and/or content to various host scenarios, called host environment, such as assistants, search page, etc.. This feature connects services of the MiniApp with the scenario, providing users with more convenience. For example, when a user purchases a train ticket for trip, the MiniApp widget on smart assistant shows the train's latest status immediately. The user can click on this widget and jump to a full-screen MiniApp page for more detailed information. For example, when a user purchases a train ticket for trip, the MiniApp widget on smart assistant shows the train's latest status immediately. The user can click on this widget and jump to a full-screen MiniApp page for more detailed information.
- This specification defines a JSON-based manifest file that enables developers to set up basic information, window style, page route and other information of a MiniApp. The basic information of a MiniApp includes but is not limited to MiniApp ID, app name, version name, version code, minimum platform version, etc.; window style includes but is not limited to navigation bar, title, window background, etc.; "pages" are used to specify page route information; and "widgets" are used to describe card information.
+ This specification is a registry of supplementary members for the [[[appmanifest]]] and [[[manifest-app-info]]] specifications that provide additional metadata to an application manifest to describe MiniApps. This JSON-based manifest file enables developers to set up basic information, window style, page route, and other information of a MiniApp. The basic information of a MiniApp includes but is not limited to MiniApp ID, app name, version name, version code, minimum platform version, etc.; window style includes but is not limited to the navigation bar, title, window background, etc.; "pages" are used to specify page route information; and "widgets" are used to describe card information.
本规范定义了基于JSON格式的Manifest文件,使开发者可通过Manifest文件设置MiniApp的基本信息、窗口样式和页面路由等信息。这里,MiniApp基本信息包括但不限于MiniApp ID、名称、版本名称、版本号以及最小平台版本等;窗口样式window包括但不限于导航栏、标题和窗口背景等;pages用于指定页面路由信息;widgets用于描述卡片信息。
@@ -92,792 +98,1070 @@
- A MiniApp manifest is a JSON document that contains put metadata associated with a MiniApp.
+ A MiniApp manifest extends and profiles the Web App manifest format [[appManifest]] and
+ contains metadata associated with a MiniApp.
MiniApp Manifest 是一个JSON文档,其中包含与该MiniApp关联的元数据。
- The following table is a summary of each attribute:
-
- 下表是manifest中每个属性的总结:
-
+ The following members MUST be set in the MiniAppManifest.
+
+ @@@TODO translation@@@
+
+ The following members MUST be set in an {{ImageResource}}.
+
+ @@@TODO translation@@@
+
+ The following members MUST be set in a MiniAppWidgetResource.
+
+ @@@TODO translation@@@
+
+ The following member MUST be set in a MiniAppPermissionResource.
+
+ @@@TODO translation@@@
+ The priority of all other members is OPTIONAL, but MAY be modified by implementations of the manifest format in the case of specific MiniApp extensions.
+ The following table is a summary of each member:
+
+ 下表是manifest中每个属性的总结:
+
+ Other {{WebAppManifest}} members
+ ({{WebAppManifest/scope}},
+ {{WebAppManifest/theme_color}},
+ {{WebAppManifest/related_applications}},
+ {{WebAppManifest/prefer_related_applications}}, and
+ {{WebAppManifest/shortcuts}}) are not currently supported by MiniApp user agents.
+
+ As the [=application manifest=] is JSON, the members ofr this
+ specification are of the types number, true | false literals, object,
+ array, and string as defined in [[[ECMA-404]]]. hexcolor is a [=string=] expressing RGB color values [[css-color-3]] in hexadecimal notation: ‘#’ immediately followed by six hexadecimal characters (#rrggbb).
+
+ dir member, while
+ specifying the base direction of the localizable members of the manifest, also specifies
+ the default base text direction of the whole MiniApp. The dir
+ member's value can be set to one of the text-direction values.
+
+ @@@TODO translation@@@
+
-
-
+
+ Value `auto` is not supported currently by MiniApp agents. Value by default:
-
-
-
-
+ Implementers are encouraged to provide an accurate value that matches the manifest content.
+ The members listed in this section are defined in Web App Manifest - Application Information [[manifest-app-info]].
+
-
-
-
-
+
+ One common practice is to use the reverse-domain-name-like convention,
+ e.g.
-
-
+ Same as {{WebAppManifest/name}}. Should `appName` be `name`?
-
- MiniApp Constructor
MiniApp Widgets
Glossary
English
-
+
小程序
Mini Program
One format of MiniApp running within Native Apps.
-
+
+
快应用
Quick App
A MiniApp standard developed by 12 mobile phone manufacturers in Quick App alliances.
-
+
+
- 渲染环境
rendering view
Native view or WebView.
+
智能助理(负一屏)
smart assistant
- A smart assistant to provide service for convenience, usually at left of the home screen
-
+
+ A smart assistant to provide service for convenience, usually at left of the home screen.
+
热更新
hot reload
- no need to be re-installed when fixing or updating feature. In MiniApp, because of pratial of framework is realized by JavaScript, so MiniApp runtime can be hot reloaded.
+ No need to be re-installed when fixing or updating feature. In MiniApps, since a part of framework is implemented in JavaScript, MiniApp runtime can be hot reloaded.
Manifest
+ MiniApps Manifest
-
-
-
-
-
-
- Attribute
- 属性
-
-
- Type
- 类型
-
-
- Required
- 必填
-
-
- Description
- 描述
-
-
-
- dir
- string
-
- No
- 否
-
-
- Text direction
- 文本方向
-
-
-
- lang
- string
-
- No
- 否
-
-
- Language tag
- 语言
-
-
-
- appID
- string
-
- Yes
- 是
-
-
- ID of the MiniApp
- ID标识
-
-
-
- appName
- string
-
- Yes
- 是
-
-
- App name
- 名称
-
-
-
- shortName
- string
-
- No
- 否
-
-
- Short name
- 简称
-
-
-
+
+
+ description
- string
-
- No
- 否
-
-
+ Requirements
+
+
+
+
+
+
+ Summary of Members
+
+
+
+
-
+ Member
+ 属性
+
+
+ Type
+ 类型
+
+
+ Required
+ 必填
+
+
Description
- 简述
-
-
-
- icons
- Array
-
- Yes
- 是
-
-
- Application icons
- 图标
-
-
-
- versionName
- string
-
- Yes
- 是
-
-
- Version name
- 版本名称
-
-
-
- versionCode
- number
-
- Yes
- 是
-
-
- Version code
- 版本号
-
-
-
- minPlatformVersion
- string
-
- Yes
- 是
-
-
- Minimum platform version supported
- 支持最小平台版本
-
-
-
- pages
- Array
-
- Yes
- 是
-
-
- Route information
- 路由信息
-
-
-
- window
- Object
-
- No
- 否
-
-
- Window style
- 窗口样式
-
-
-
- widgets
- Array
-
- No
- 否
-
- Widget
- 卡片
-
-
-
+
+
+ reqPermissions
- Array
+ 描述
+
+
+
+ appID
+ [=string=]
+
+ Yes
+ 是
+
+
+ ID of the MiniApp
+ ID标识
+
+
+
+ appName
+ [=string=]
+
+ Yes
+ 是
+
+
+ App name
+ 名称
+
+
+
+ description
+ [=string=]
+
+ No
+ 否
+
+
+ Description
+ 简述
+
+
+
+ dir
+ [=string=]
+
+ No
+ 否
+
+
+ Text direction
+ 文本方向
+
+
+
+ icons
+ {{ImageResource/src}} [=array=]
+
+ Yes
+ 是
+
+
+ Application icons
+ 图标
+
+
+
+ icons
+ {{ImageResource/src}}
+ [=string=]
+
+ Yes
+ 是
+
+
+ the source of the icon image in the format of a path [=string=]
+ 以路径字符串所表示的图标图片来源
+
+
+
+ {{ImageResource/sizes}}
+ [=string=]
+
+ Yes
+ 是
+
+
+ The applicable resolution sizes of the icon image from the above mentioned
+ src
+ 来自以上src
的图标图片所适用的分辨率大小
+
+
+ lang
+ [=string=]
+
+ No
+ 否
+
+
+ Language tag
+ 语言
+
+
+
+ minPlatformVersion
+ [=string=]
+
+ Yes
+ 是
+
+
+ Minimum platform version supported
+ 支持最小平台版本
+
+
+
+ pages
+ [=array=]
+
+ Yes
+ 是
+
+
+ Route information
+ 路由信息
+
+
+
+ shortName
+ [=string=]
+
+ No
+ 否
+
+
+ Short name
+ 简称
+
+
+
+ versionCode
+ [=string=]
+
+ Yes?
+ 是
+
+
+ Version code
+ 版本号
+
+
+
+ versionName
+ [=string=]
+
+ Yes
+ 是
+
+
+ Version name
+ 版本名称
+
+
+
+ widgets
+ MiniAppWidgetResource [=array=]
+
+ No
+ 否
+
+ Widget
+ 卡片
+
+
+
+ widgets
+ name
+ [=string=]
+
+ Yes
+ 是
+
+
+ Widget name
+ Widget名字
+
+
+
+ path
+ [=string=]
+
+ Yes
+ 是
+
+
+ Corresponding page path of Widget. It follows the same path route format as defined in
+ pages
.
+ Widget对应页面路径,采用与pages
中相同页面路由的格式。
+
+
+ minPlatformVersion
+ [=string=]
+
+ No
+ 否
+
+
+ Minimum platform version supported
+ 支持最小平台版本
+
+
+
+ window
+ MiniAppWindowResource
+
+ No
+ 否
+
+
+ Window style
+ 窗口样式
+
+
+
+ window
+ navigationBarBackgroundColor
+ [=hexColor=]
+
+ No
+ 否
+
+
+ Background color of the navigation bar
+ 导航栏背景颜色
+
+
+
-
-
-
- navigationBarTextStyle
+ [=string=]
No
否
- Required permissions
- 所需权限
+
+ Background title color, valid values:
black
and white
.
+ 导航栏标题颜色,有效值:black
和white
。
+
+ navigationBarTitleText
+ [=string=]
+
+ No
+ 否
+
+
+ Title text of the navigation bar
+ 导航栏标题文字内容
+
+
+
+ navigationStyle
+ [=string=]
+
+ No
+ 否
+
+
+ Style of the navigation bar, valid values:
+ default
(default style) and custom
(customized navigation bar). Note: The capsule button at the right corner is not customizable.
+ 导航栏样式,有效值:default
(默认样式)和custom
(自定义导航栏)。注意:右上角胶囊按钮不可自定义。
+
+
+ backgroundColor
+ [=hexColor=]
+
+ No
+ 否
+
+
+ Background color of the window
+ 窗口的背景颜色
+
+
+
+ backgroundTextStyle
+ [=string=]
+
+ No
+ 否
+
+
+ Background text style, valid values:
+ dark
and light
.
+ 背景文字样式,有效值:dark
和light
。
+
+
+ enablePullDownRefresh
+ true | false
+
+ No
+ 否
+
+
+ Enable pull-to-refresh
+ 是否开启下拉刷新
+
+
+
+ onReachBottomDistance
+ [=number=]
+
+ No
+ 否
+
+
+ Distance from the bottom when page pull-up bottom event is triggered. The value is a non-negative integer and the unit is in
+ px
.
+ 页面上拉触底事件触发时距页面底部距离。取值应为非负整数,单位为 px
。
+
+
+ orientation
+ [=string=]
+
+ No
+ 否
+
+
+ Screen orientation settings, valid values:
+ portrait
and landscape
.
+ 屏幕方向设置,有效值:portrait
和landscape
。
+
+
+ fullscreen
+ true | false
+
+ No
+ 否
+
+
+ Full screen display
+ 全屏显示
+
+
+
+ designWidth
+ [=number=]
+
+ No
+ 否
+
+
+ The baseline width of the page design in
+ px
, based on which the size of the components on the page would be adjusted accordingly. The value is a non-negative integer.
+ 以px
为单位的页面设计基准宽度,元素大小将根据实际设备宽度来缩放。取值应为非负整数。
+
+
+ autoDesignWidth
+ true | false
+
+ No
+ 否
+
+
+ Whether the designWidth of the page is auto-calculated. When it's true, the value of the
+ designWidth
is ignored, and the baseline width is determined by the system automatically according to the pixel density of the screen.
+ 页面设计基准宽度是否自动计算,当设为true时,designWidth将会被忽略,设计基准宽度由设备宽度与屏幕密度计算得出。
+
+
+ reqPermissions
+ MiniAppPermissionResource [=array=]
+
+ No
+ 否
+
+ Required permissions
+ 所需权限
+
+
+
+ reqPermissions
+ name
+ [=string=]
+
+ Yes
+ 是
+
+
+ permission name
+ 权限名称
+
+
+
+ reason
+ [=string=]
+
+ No
+ 否
+
+
+ The reason to use this permission
+ 该权限的使用目的
+
+
- Dictionary
- 字段
-
+
+ MiniAppManifest members
+ 字段
+
+ Members inherited from the {{WebAppManifest}} dictionary
- dir
+
+
+
+
dir
member
方向
- dir
specifies the default base direction of the text value of the whole MiniApp as well as the localizable attributes in the manifest file such as the appName
, shortName
and description
attributes. The value of dir
can be ltr
or rtl
. ltr
means left-to-right, rtl
means right-to-left. The default value is ltr
.
+ The text-direction values defined by TextDirectionType, are the following, implying
+ that the value of the localizable members is by default:
dir
定义了整个MiniApp以及Manifest文件中appName
、shortName
和description
等可本地化属性的默认主文本方向,取值类型可以为:ltr
和rtl
,ltr
表示从左到右,rtl
表示从右到左。默认值为ltr
。
+ @@@TODO translation@@@
+
+
+ rtl
.
+
+
+ @@@TODO translation@@@
+
- lang
- 语言
-
+
+
icons
member
+ 图标
+ lang
specifies the default language of the MiniApp. It's applied to all localizable attributes of the manifest. The value here MUST be a well-formed Language-Tag
specified in [[BCP47]]. The default value is undefined. Implementers are encouraged to provide the accurate value that matches the manifest content.
+ The icons member describes images that serve as iconic representations of MiniApps in various contexts. Both {{ImageResource/src}} and {{ImageResource/sizes}} are required. {{ImageResource/src}} MUST be a relative-url string.
lang
定义了MiniApp的默认语言,适用于manifest所有可本地化属性,取值必须为[[BCP47]]所规定的合法的(well-formed)Language-Tag
值。默认值未定义。开发者需要提供匹配manifest内容的准确值。
+ @@@TODO translation@@@
- appID
- 标识
-
+
+
lang
member
+ 语言
+ appID
is the ID of MiniApp and is mainly used for the package management. It supports the update and release of MiniApp versions. The format of appID
SHALL be a string started with a letter [a-zA-Z], and the remaining characters SHALL be either alphanumeric, an underscore or a dot [0-9a-zA-Z_\.]. One common practice is to use the reverse-domain-name-like convention, e.g. com.company.miniapp
.
+ The lang member, while
+ specifying the primary language of the localizable members, also specifies
+ the primary language of the whole MiniApp.
appID
是MiniApp的唯一标识符,主要用于包管理,支撑MiniApp版本更新和发布。appID
的格式是由字母起头的字符串,剩余字符为数字、字母、下划线或点[a-zA-Z_\.]。一种常见的实现方式是使用类似反向域名的命名方式,如com.company.miniapp
。
+ @@@TODO translation@@@
+ Members supplemented from the Application Information
+
- appName
- 名称
-
+
+
description
member
+ 简述
+ appName
is the name that is directly displayed to the user. It is used as the display name of MiniApp along with the desktop icon and in the context of MiniApp management.
+ The description member provides a textual description for the MiniApp.
appName
,直接呈现给用户的名称,用于在桌面图标和MiniApp管理等处显示MiniApp的名称。
+ description
,为MiniApp提供简短的描述。
Supplementary manifest members
- shortName
- 简称
-
+
+
appID
member
+ 标识
+ shortName
provides a short and easy-to-read name for MiniApp, and it can be used when there is insufficient space to display the full MiniApp name provided in appName
.
+ The appID member identifies the MiniApp univocally. This member is mainly used for the package management.
+ It supports the update and release of MiniApp versions.
+ The format of appID
SHALL be a string defined by the rule below:
shortName
,为MiniApp提供简短易读的名称,可在没有足够空间显示MiniApp名称时使用。
+ appID
是MiniApp的唯一标识符,主要用于包管理,支撑MiniApp版本更新和发布。appID
的格式是由字母起头的字符串,剩余字符为数字、字母、下划线或点[a-zA-Z_\.]。一种常见的实现方式是使用类似反向域名的命名方式,如com.company.miniapp
。
+
+ appIDrule = ALPHA 1*( ALPHA / DIGIT / "_" / "." )
+
+ com.company.miniapp
.
+
+
+ @@@TODO translation@@@
+
- description
- 简述
-
+
+
appName
member
+ 名称
+ description
provides a brief description for MiniApp.
+ The appName member is the descriptive name of the application. This is the name directly displayed to the user. It is used as the display name of MiniApp along with the desktop icon and in the context of MiniApp management.
description
,为MiniApp提供简短的描述。
+ appName
,直接呈现给用户的名称,用于在桌面图标和MiniApp管理等处显示MiniApp的名称。
+
- icons
- 图标
-
+
+
shortName
member
+ 简称
+ icons
is the array of MiniApp application icons. It consists of icons with different resolutions, that can be displayed based on different types of display equipments.
+ The shortName member provides a concise and easy-to-read name for MiniApp. It can be used when there is insufficient space to display the full MiniApp name provided in appName
.
icons
,MiniApp应用图标数组。由不同分辨率的图标组成,根据显示设备类型的不同展示不同的图标。
-
-
-
-
-
+
-
-
-
-
- Attribute
- 属性
-
-
- Type
- 类型
-
-
- Required
- 必填
-
-
- Description
- 描述
-
-
-
- src
- string
-
- Yes
- 是
-
-
- the source of the icon image in the format of a path string
- 以路径字符串所表示的图标图片来源
-
-
-
-
-
- sizes
- string
-
- Yes
- 是
-
-
- The applicable resolution sizes of the icon image from the above mentioned
- src
- 来自以上src
的图标图片所适用的分辨率大小
- shortName
,为MiniApp提供简短易读的名称,可在没有足够空间显示MiniApp名称时使用。
+
+ Same as {{WebAppManifest/short_name}}. Should `shortName` be `short_name`? +
- -versionName
member
版本名称
-
- versionName
is a string-type character string, and is mainly used for describing the version information. It is also the version name that is displayed to the user. The general format is "1.0.0" as specified in Semantic Versioning. It plays an important role in version control, MiniApp application and equipment compatibility.
+ The versionName member is a string-type character string that is mainly used for describing the version information. It is also the version name that is displayed to the user. The general format is "1.0.0" as specified in Semantic Versioning [[SEMANTIC-VERSIONING]]. It plays an important role in version control, MiniApp application, and equipment compatibility.
- versionName
是一个string类型的字符串,主要用作版本信息描述,也是面向用户显示的版本名称。一般格式为:"1.0.0"
,详见定义Semantic Versioning,该参数在版本控制、MiniApp应用与设备兼容性等方面发挥重要作用。
+ versionName
是一个string类型的字符串,主要用作版本信息描述,也是面向用户显示的版本名称。一般格式为:"1.0.0"
,详见定义Semantic Versioning [[SEMANTIC-VERSIONING]],该参数在版本控制、MiniApp应用与设备兼容性等方面发挥重要作用。
versionCode
member
版本号
-
- versionCode
is a number-type value, and is mainly used for enhancing the maintainability and security of MiniApp, e.g. a lower version is not compatible with a higher version. versionCode
is not displayed to the user and is incrementing according to the version iteration process. The value is a non-negative integer. Default: 1.
+ The versionCode member is a number that is mainly used for enhancing the maintainability and security of MiniApp, e.g., a lower version is not compatible with a higher version. versionCode
is not displayed to the user and is incrementing according to the version iteration process.
versionCode
是一个number类型的数值,主要用作提高MiniApp的可维护性和安全性,比如:低版本不能覆盖高版本。此版本号不向用户显示,根据版本迭代过程进行递增。取值是非负整数。默认值:1
。
+ This has a default value of 1 and yet is required? +
minPlatformVersion
member
平台版本
-
- minPlatformVersion
is a string-type character string. It is the minimum supported version of the required platform that can ensure normal operation of MiniApp, e.g. "1.0.0"
.
+ The minPlatformVersion member is a string-type character string that indicates the minimum supported version of the required platform to ensure the normal operation of MiniApp (e.g. "1.0.0"
).
minPlatformVersion
是一个string类型的字符串,保证MiniApp正常运行所需平台的最小支持版本。比如:"1.0.0"
。
pages
member
页面路由
-
- pages
is an array of path strings used for specifying which pages are included in a MiniApp. Each item in the array represents a page route. Page route = [path + filename]
. During the MiniApp development process, adding or deleting pages is done by configuring the array. When configuring the page route, there is no need to add the file name extension, since the MiniApp platform will automatically parse it. Note: the first item in the pages
array stands for the homepage of a MiniApp.
+ The pages member is an [=array=] of relative-url string used for specifying which pages are included in a MiniApp. Each item in the array represents a page route. Page route = [path + filename]
. During the MiniApp development process, adding or deleting pages is done by configuring the array. When configuring the page route, there is no need to add the file name extension, since the MiniApp platform will automatically parse it. Note: the first item in the pages
array stands for the homepage of a MiniApp.
pages
数组用于指定MiniApp都包含哪些页面,数组中每一项代表一个页面路由,页面路由 = [路径 + 文件名]
。MiniApp开发时新增或删除页面需在数组中进行配置,配置页面路由时文件名不需加后缀名,MiniApp平台会自动解析。备注:pages
数组中第一项代表MiniApp首页。
+ For compatibility with the Web platform, it is RECOMMENDED to use both pages and {{WebAppManifest/start_url}} and use the value "."
for scope
in the manifest file. The value of {{WebAppManifest/start_url}} MUST be the same as the first entry in pages.
+ If scope
.
+
+ Are pages.[0]
and start_url
aligned in all cases?
+
window
member
窗口
-
- window
contains sub-attributes used for styling the status bar, navigation bar, title, window background color, etc., as shown in the following table:
+ The window member contains sub-attributes, defined in MiniAppWindowResource, used for styling the status bar, navigation bar, title, window background color, etc.
用于设置MiniApp的状态栏、导航条、标题和窗口背景色等样式,如下表所示:
- -- Attribute - 属性 - | -- Type - 类型 - | -- Required - 必填 - | -- Default - 默认值 | -- Description - 描述 - | -
---|---|---|---|---|
navigationBarBackgroundColor | -HexColor | -- No - 否 - | -#000000 | -- Background color of the navigation bar - 导航栏背景颜色 - | -
navigationBarTextStyle | -string | -- No - 否 - | -white | -
- Background title color, valid values: black and white .
- 导航栏标题颜色,有效值:black 和white 。
- |
-
navigationBarTitleText | -string | -- No - 否 - | -- | -- Title text of the navigation bar - 导航栏标题文字内容 - | -
navigationStyle | -string | -- No - 否 - | -default | -
- Style of the navigation bar, valid values: default (default style) and custom (customized navigation bar). Note: The capsule button at the right corner is not customizable.
- 导航栏样式,有效值:default (默认样式)和custom (自定义导航栏)。注意:右上角胶囊按钮不可自定义。
- |
-
backgroundColor | -HexColor | -- No - 否 - | -#ffffff | -- Background color of the window - 窗口的背景颜色 - | -
backgroundTextStyle | -string | -- No - 否 - | -dark | -
- Background text style, valid values: dark and light .
- 背景文字样式,有效值:dark 和light 。
- |
-
enablePullDownRefresh | -boolean | -- No - 否 - | -false | -- Enable pull-to-refresh - 是否开启下拉刷新 - | -
onReachBottomDistance | -number | -- No - 否 - | -50 | -
- Distance from the bottom when page pull-up bottom event is triggered. The value is a non-negative integer and the unit is in px .
- 页面上拉触底事件触发时距页面底部距离。取值应为非负整数,单位为 px 。
- |
-
orientation | -string | -- No - 否 - | -portrait | -
- Screen orientation settings, valid values: portrait and landscape .
- 屏幕方向设置,有效值:portrait 和landscape 。
- |
-
fullscreen | -boolean | -- No - 否 - | -false | -- Full screen display - 全屏显示 - | -
designWidth | -number | -- No - 否 - | -750 | -
- The baseline width of the page design in px , based on which the size of the components on the page would be adjusted accordingly. The value is a non-negative integer.
- 以px 为单位的页面设计基准宽度,元素大小将根据实际设备宽度来缩放。取值应为非负整数。
- |
-
autoDesignWidth | -boolean | -- No - 否 - | -false | -
- Whether the designWidth of the page is auto-calculated. When it's true, the value of the designWidth is ignored, and the baseline width is determined by the system automatically according to the pixel density of the screen.
- 页面设计基准宽度是否自动计算,当设为true时,designWidth将会被忽略,设计基准宽度由设备宽度与屏幕密度计算得出。
- |
-
window
inherits the text direction and language configuration from dir
and lang
.
-
- window
的文字方向和语言设置继承自dir
和lang
.
-
+ window
的文字方向和语言设置继承自dir
和lang
.
+
widgets
member
卡片
-
- Widgets are a part of a MiniApp. Specifically, a MiniApp package can include MiniApp Pages and Widgets concurrently. As a part of the MiniApp application, widgets share some of the Manifest fields with the MiniApp main program, e.g. dir
, lang
, appID
, appName
, shortName
, icons
, versionName
and versionCode
. However, a widget also has its private fields, as shown in the following table:
+ The widgets member defines a set of widgets that are a part of a MiniApp.
+ Specifically, a MiniApp package can include MiniApp Pages and Widgets concurrently.
+ As a part of the MiniApp application, widgets share some of the Manifest fields with the
+ MiniApp main program, e.g. dir
, lang
, appID
, appName
, shortName
, icons
, versionName
, and versionCode
. However, a widget also has its private fields, defined in MiniAppWidgetResource.
Widget是MiniApp的一部分。具体来说,MiniApp包中可同时包含 MiniApp Page和Widget。Widget作为MiniApp应用程序的一部分,Widget和MiniApp主体程序共用部分Manifest字段,比如:dir
、lang
、appID
、appName
、shortName
、icons
、versionName
和versionCode
。但是Widget也有自己的私有字段,如下表所示:
- Attribute - 属性 - | -- Type - 类型 - | -- Required - 必填 - | -- Description - 描述 - | -
---|---|---|---|
name | -string | -- Yes - 是 - | -- Widget name - Widget名字 - | -
path | -string | -- Yes - 是 - | -
- Corresponding page path of Widget. It follows the same path route format as defined in pages .
- Widget对应页面路径,采用与pages 中相同页面路由的格式。
- |
-
minPlatformVersion | -string | -- No - 否 - | -- Minimum platform version supported - 支持最小平台版本 - | -
There are certain differences between the Widget-related APIs and the MiniApp APIs, hence, the declaration of the minimum platform version may be different. If the minPlatformVersion
field of a widget is not set explicitly, it is then identical to the minPlatformVersion
of the MiniApp by default.
Widget 涉及的API与MiniApp API有一定差别,因此最小平台版本声明可能不同。如不单独设置Widget的minPlatformVersion
字段,则默认与MiniApp平台版本相同。
reqPermissions
member
所需权限
-
- reqPermissions
is an array of permission objects. Each object declares a permission (such as the access to the location information, user contacts, and hardware features like camera) required for the proper running of the MiniApp. User's consent may be asked to protect user's privacy related to such permissions. Such information can also be used by an app store or a hosting platform to filter a MiniApp according to user's policy or device capabilities. The structure of a permission object is defined in the following table.
+ The reqPermissions member is an [=array=] of permission objects. Each MiniAppPermissionResource object declares permission (such as the access to the location information, user contacts, and hardware features like camera) required for the proper running of the MiniApp. User's consent may be asked to protect the user's privacy related to such permissions. Such information can also be used by an app store or a hosting platform to filter a MiniApp according to user's policy or device capabilities.
+ The structure of a permission object is defined in the following table.
reqPermissions
是一个权限对象的数组,其中每个对象声明了MiniApp正常运行所需的一个权限(比如对位置信息、联系人和摄像头等硬件特性的访问)。为保护权限相关的用户隐私,可能需要征得用户同意。此类权限信息还可以被应用市场或宿主平台用来根据用户策略或者设备能力来过滤MiniApp。详细的权限对象结构定义如下表。
- Attribute - 属性 - | -- Type - 类型 - | -- Required - 必填 - | -- Description - 描述 - | -
---|---|---|---|
name | -string | -- Yes - 是 - | -- permission name - 权限名称 - | -
reason | -string | -- No - 否 - | -- The reason to use this permission - 该权限的使用目的 - | -
- It's for further study whether the predefined permissions, permission extension, permission groups and protection levels need to be specified.
+
+ The MiniAppWindowResource.navigationBarBackgroundColor member specifies the color of the navigation bar background.
+ 导航栏背景颜色
+
+
+ Value by default:
+ The MiniAppWindowResource.navigationBarTextStyle member specifies the text color of the navigation bar title.
+
+
+ Value by default:
+ The MiniAppWindowResource.navigationBarTitleText member specifies the title text of the navigation bar
+ 导航栏标题文字内容
+
+ The MiniAppWindowResource.navigationStyle member specifies the style of the navigation bar:
+
+ Value by default:
+ The MiniAppWindowResource.backgroundColor member specifies the background color of the window. This member is equivalent to {{WebAppManifest/background_color}}.
+ 窗口的背景颜色
+
+
+ Value by default:
+ The MiniAppWindowResource.backgroundTextStyle member specifies the background text style.
+ 背景文字样式,。
+
+
+ Value by default:
+ The MiniAppWindowResource.enablePullDownRefresh member specifies if the pull-to-refresh event is enabled.
+ 是否开启下拉刷新
+
+
+ Value by default:
+ The MiniAppWindowResource.onReachBottomDistance member specifies the distance from the bottom when page pull-up bottom event is triggered. The value is a non-negative integer and the unit is in pixel unit.
+ 页面上拉触底事件触发时距页面底部距离。取值应为非负整数,单位为
+
+ Value by default:
+ The MiniAppWindowResource.orientation member specifies the screen orientation settings to which a screen can be locked. The two supported values are
+
+ Value by default:
+ The MiniAppWindowResource.fullscreen member indicates the full screen display.
+
+ Value by default:
+ Should it be
+ The MiniAppWindowResource.designWidth member indicates the baseline width of the page design in pixel unit, based on which the size of the components on the page would be adjusted accordingly. The value is a non-negative integer.
+ 以
+
+ Value by default:
+ The MiniAppWindowResource.autoDesignWidth member indicates whether the designWidth of the page is auto-calculated. When it's true, the value of the
+
+ Value by default: MiniAppWindowResource members
+
+
+ navigationBarBackgroundColor
member#000000
.
+
+
+ @@@TODO translation@@@
+
+
+ navigationBarTextStyle
memberwhite
.
+
+
+ @@@TODO translation@@@
+
+
+ navigationBarTitleText
member
+ navigationStyle
memberdefault
(default style) and custom
(customized navigation bar). Note: The capsule button at the right corner is not customizable.
+ 导航栏样式:default
(默认样式)和custom
(自定义导航栏)。注意:右上角胶囊按钮不可自定义。
+ default
.
+
+
+ @@@TODO translation@@@
+
+
+ backgroundColor
member#ffffff
.
+
+
+ @@@TODO translation@@@
+
+
+ backgroundTextStyle
memberdark
.
+
+
+ @@@TODO translation@@@
+
+
+ enablePullDownRefresh
memberfalse
.
+
+
+ @@@TODO translation@@@
+
+
+ onReachBottomDistance
memberpx
。
+ 50
.
+
+
+ @@@TODO translation@@@
+
+
+ orientation
memberportrait
and landscape
, defined in {{OrientationLockType}} [[screen-orientation]]. This member is equivalent to {{WebAppManifest/orientation}}.
+ 屏幕方向设置
+ portrait
.
+
+
+ @@@TODO translation@@@
+
+
+ fullscreen
membertrue
is equivalent to the
+ {{WebAppManifest/display}} fullscreen
, and false
to minimal-ui
.
+ false
.
+
+
+ @@@TODO translation@@@
+
+ standalone
instead of minimal-ui
?
+
+ designWidth
memberpx
为单位的页面设计基准宽度,元素大小将根据实际设备宽度来缩放。取值应为非负整数。
+ 750
.
+
+
+ @@@TODO translation@@@
+
+ autoDesignWidth
memberdesignWidth
is ignored, and the baseline width is determined by the system automatically according to the pixel density of the screen.
+ 页面设计基准宽度是否自动计算,当设为true时,designWidth将会被忽略,设计基准宽度由设备宽度与屏幕密度计算得出。
+ false
.
+
+
+ @@@TODO translation@@@
+
+
- 预定义权限、权限扩展、权限分组和保护等级是否需要定义有待进一步研究。
+
+ The MiniAppWidgetResource.name member describes the Widget name
+ Widget名字
+
+ The MiniAppWidgetResource.path member indicates the corresponding page path of a Widget. It follows the same path route format as defined in pages.
+ Widget对应页面路径,采用与
+ The MiniAppWidgetResource.minPlatformVersion member indicates the minimum platform version supported
+ 支持最小平台版本
+ There are certain differences between the Widget-related APIs and the MiniApp APIs, hence, the declaration of the minimum platform version may be different. If the Widget 涉及的API与MiniApp API有一定差别,因此最小平台版本声明可能不同。如不单独设置Widget的MiniAppWidgetResource members
+
+ name
member
+ path
memberpages
中相同页面路由的格式。
+
+ minPlatformVersion
memberminPlatformVersion
field of a widget is not set explicitly, it is then identical to the minPlatformVersion
of the MiniApp by default.
+ minPlatformVersion
字段,则默认与MiniApp平台版本相同。
name
member+ The MiniAppPermissionResource.name member indicates the permission name + 权限名称 +
+reason
member+ The MiniAppPermissionResource.reason member indicates the reason to use this permission + 该权限的使用目的 +
+
- The following attributes are localizable and share the same default configuration of dir
and lang
if not otherwise specified.
+ It's for further study whether the predefined permissions, permission extension, permission groups, and protection levels need to be specified.
- 如下属性为可本地化属性。无特别规定的情况下,共享默认的dir
和lang
配置。
-
+ The following members are localizable and share the same default configuration of dir
and lang
if not otherwise specified.
+
+ 如下属性为可本地化属性。无特别规定的情况下,共享默认的dir
和lang
配置。
+
如此处所示,当且仅当以着重号标记时,建议(RECOMMENDED)才以BCP 14 [[RFC2119]] [[RFC8174]]中的说明解释。
+ ++ This specification uses the Augmented Backus-Naur Form (ABNF) notation of [[!RFC5234]]. +
Attributes like icons
, pages
, widgets
contain paths referring to local resources on the hosting platform. Implementors and the hosting platform should check the validity of those paths to ensure no illegal access outside the scope of the MiniApp package. On the other hand, the MiniApp itself (e.g. in JS code) may provide means to jump to external resources either on the hosting platform, or on a remote web site (e.g. through a uri). In this case, the hosting platform is responsible for providing clear indication to an end-user about such context switch.
Members like icons
, pages
, widgets
contain paths referring to local resources on the hosting platform. Implementors and the hosting platform should check the validity of those paths to ensure no illegal access outside the scope of the MiniApp package. On the other hand, the MiniApp itself (e.g. in JS code) may provide means to jump to external resources either on the hosting platform, or on a remote web site (e.g. through a uri). In this case, the hosting platform is responsible for providing clear indication to an end-user about such context switch.
icons
, pages
, widgets
等属性包含了宿主平台上的本地资源引用路径,开发者和宿主平台应该检查这些路径的合法性以确保没有MiniApp package之外的非法访问。另一方面,MiniApp自身(如JS代码中)可能提供跳转到其他外部资源的方式,包括宿主平台或远程网站上的外部资源(比如通过uri)。此时,宿主平台应该负责向用户提供明确的上下文切换的指示信息。
- In addition, the reqPermissions
attribute provides a specific means to control the access to the local software, hardware and data resources on the user's device. User's consent should be asked when it comes to privacy-related or high-level privileged resources.
+ In addition, the reqPermissions
member provides a specific means to control the access to the local software, hardware and data resources on the user's device. User's consent should be asked when it comes to privacy-related or high-level privileged resources.
@@ -1050,7 +1338,6 @@
This Working Group operates under the W3C Patent Policy
- (5 February 2004 Version updated 1 August 2017). To promote the
+ (15 September 2020). To promote the
widest adoption of Web standards, W3C seeks to issue Recommendations
that can be implemented, according to this policy, on a Royalty-Free
basis. For more information about disclosure obligations for this
From 1e82c60bc7a525e6fb4ff3a34d54a5f97b985192 Mon Sep 17 00:00:00 2001
From: Martin Alvarez Espinar
- This specification defines a JSON-based manifest document that enables developers to set up descriptive information, window styling, page routing, feature policies, and other information of a MiniApp. The MiniApp Manifest specification will follow the recommendations to extend existing manifest files, provided by the Web Platform Design Principles, with the Web App Manifest as reference.
+ This specification defines a JSON-based manifest document that enables developers to set up descriptive information, window styling, page routing, feature policies, and other information of a MiniApp. The MiniApp Manifest specification will follow the recommendations of the Web Platform Design Principles to extend the Web App Manifest.
Draft state: In progress in MiniApp CG
From 4b9926ee1138460d3b795d00ed271ff246ba2ed3 Mon Sep 17 00:00:00 2001
From: Martin Alvarez Espinar
- @@@TODO translation@@@
+ @@@Chinese version here@@@
Requirements
The following members MUST be set in the MiniAppManifest.
Requirements
The following members MUST be set in an {{ImageResource}}.
- @@@TODO translation@@@ + @@@Chinese version here@@@
- @@@TODO translation@@@ + @@@Chinese version here@@@
- @@@TODO translation@@@ + @@@Chinese version here@@@
- @@@TODO translation@@@ + @@@Chinese version here@@@
The text-direction values defined by TextDirectionType, are the following, implying that the value of the localizable members is by default:
- @@@TODO translation@@@ + @@@Chinese version here@@@
rtl
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -695,7 +695,7 @@ - @@@TODO translation@@@ + @@@Chinese version here@@@
- @@@TODO translation@@@ + @@@Chinese version here@@@
Implementers are encouraged to provide an accurate value that matches the manifest content. @@ -758,7 +758,7 @@
com.company.miniapp
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
navigationBarBackgroundColor
member#000000
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -931,7 +931,7 @@ navigationBarTextStyle
memberwhite
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -953,7 +953,7 @@ navigationStyle
memberdefault
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -968,7 +968,7 @@ backgroundColor
member#ffffff
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -983,7 +983,7 @@ backgroundTextStyle
memberdark
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -998,7 +998,7 @@ enablePullDownRefresh
memberfalse
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -1013,7 +1013,7 @@ onReachBottomDistance
member50
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -1028,7 +1028,7 @@ orientation
memberportrait
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -1044,7 +1044,7 @@ fullscreen
memberfalse
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -1062,7 +1062,7 @@
designWidth
member750
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
@@ -1077,7 +1077,7 @@ autoDesignWidth
memberfalse
.
- @@@TODO translation@@@
+ @@@Chinese version here@@@
From c1922321c61a2c368bb909c7b73007d1d2917086 Mon Sep 17 00:00:00 2001
From: Martin Alvarez Espinar - This specification defines a JSON-based manifest file that enables developers to set up basic information, window style, page route and other information of a MiniApp. The basic information of a MiniApp includes but is not limited to MiniApp ID, app name, version name, version code, minimum platform version, etc.; window style includes but is not limited to navigation bar, title, window background, etc.; "pages" are used to specify page route information; and "widgets" are used to describe card information. + This specification is a registry of supplementary members for the [[[appmanifest]]] and [[[manifest-app-info]]] specifications that provide additional metadata to an application manifest to describe MiniApps. This JSON-based manifest file enables developers to set up basic information, window style, page route, and other information of a MiniApp. The basic information of a MiniApp includes but is not limited to MiniApp ID, app name, version name, version code, minimum platform version, etc.; window style includes but is not limited to the navigation bar, title, window background, etc.; "pages" are used to specify page route information; and "widgets" are used to describe card information.
本规范定义了基于JSON格式的Manifest文件,使开发者可通过Manifest文件设置MiniApp的基本信息、窗口样式和页面路由等信息。这里,MiniApp基本信息包括但不限于MiniApp ID、名称、版本名称、版本号以及最小平台版本等;窗口样式window包括但不限于导航栏、标题和窗口背景等;pages用于指定页面路由信息;widgets用于描述卡片信息。 @@ -92,792 +96,1070 @@
- A MiniApp manifest is a JSON document that contains put metadata associated with a MiniApp. + A MiniApp manifest extends and profiles the Web App manifest format [[appManifest]] and + contains metadata associated with a MiniApp.
MiniApp Manifest 是一个JSON文档,其中包含与该MiniApp关联的元数据。
-- The following table is a summary of each attribute: -
-- 下表是manifest中每个属性的总结: -
-- Attribute - 属性 - | -- Type - 类型 - | -- Required - 必填 - | -- Description - 描述 - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dir | -string | -- No - 否 - | -- Text direction - 文本方向 - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lang | -string | -- No - 否 - | -- Language tag - 语言 - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
appID | -string | -- Yes - 是 - | -- ID of the MiniApp - ID标识 - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
appName | -string | -- Yes - 是 - | -- App name - 名称 - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shortName | -string | -- No - 否 - | -- Short name - 简称 - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | -string | -- No - 否 - | -
+ Requirements++ The following members MUST be set in the MiniAppManifest. + ++ @@@Chinese version here@@@ + +
+ The following members MUST be set in an {{ImageResource}}. + ++ @@@Chinese version here@@@ + +
+ The following members MUST be set in a MiniAppWidgetResource. + ++ @@@Chinese version here@@@ + + ++ The following member MUST be set in a MiniAppPermissionResource. + ++ @@@Chinese version here@@@ + +
The priority of all other members is OPTIONAL, but MAY be modified by implementations of the manifest format in the case of specific MiniApp extensions. +Summary of Members++ The following table is a summary of each member: + ++ 下表是manifest中每个属性的总结: + +
reqPermissions |
+ name |
+ [=string=] |
+
+ Yes
+ 是
+ |
+
+ permission name
+ 权限名称
+ |
+ reason |
+ [=string=] |
+
+ No
+ 否
+ |
+
+ The reason to use this permission
+ 该权限的使用目的
+ |
+ |
+ Other {{WebAppManifest}} members + ({{WebAppManifest/scope}}, + {{WebAppManifest/theme_color}}, + {{WebAppManifest/related_applications}}, + {{WebAppManifest/prefer_related_applications}}, and + {{WebAppManifest/shortcuts}}) are not currently supported by MiniApp user agents. +
++ As the [=application manifest=] is JSON, the members ofr this + specification are of the types number, true | false literals, object, + array, and string as defined in [[[ECMA-404]]]. hexcolor is a [=string=] expressing RGB color values [[css-color-3]] in hexadecimal notation: ‘#’ immediately followed by six hexadecimal characters (#rrggbb). +
+dir
member
方向
-
- dir
specifies the default base direction of the text value of the whole MiniApp as well as the localizable attributes in the manifest file such as the appName
, shortName
and description
attributes. The value of dir
can be ltr
or rtl
. ltr
means left-to-right, rtl
means right-to-left. The default value is ltr
.
+ dir member, while
+ specifying the base direction of the localizable members of the manifest, also specifies
+ the default base text direction of the whole MiniApp. The dir
+ member's value can be set to one of the text-direction values.
- dir
定义了整个MiniApp以及Manifest文件中appName
、shortName
和description
等可本地化属性的默认主文本方向,取值类型可以为:ltr
和rtl
,ltr
表示从左到右,rtl
表示从右到左。默认值为ltr
。
+ @@@Chinese version here@@@
+
+ The text-direction values defined by TextDirectionType, are the following, implying + that the value of the localizable members is by default: +
++ @@@Chinese version here@@@ +
+
+
+ Value `auto` is not supported currently by MiniApp agents. Value by default: rtl
.
+
+
+ @@@Chinese version here@@@
+
icons
member
+ 图标
+
- lang
specifies the default language of the MiniApp. It's applied to all localizable attributes of the manifest. The value here MUST be a well-formed Language-Tag
specified in [[BCP47]]. The default value is undefined. Implementers are encouraged to provide the accurate value that matches the manifest content.
+ The icons member describes images that serve as iconic representations of MiniApps in various contexts. Both {{ImageResource/src}} and {{ImageResource/sizes}} are required. {{ImageResource/src}} MUST be a relative-url string.
- lang
定义了MiniApp的默认语言,适用于manifest所有可本地化属性,取值必须为[[BCP47]]所规定的合法的(well-formed)Language-Tag
值。默认值未定义。开发者需要提供匹配manifest内容的准确值。
+ @@@Chinese version here@@@
lang
member
+ 语言
+
- appID
is the ID of MiniApp and is mainly used for the package management. It supports the update and release of MiniApp versions. The format of appID
SHALL be a string started with a letter [a-zA-Z], and the remaining characters SHALL be either alphanumeric, an underscore or a dot [0-9a-zA-Z_\.]. One common practice is to use the reverse-domain-name-like convention, e.g. com.company.miniapp
.
+ The lang member, while
+ specifying the primary language of the localizable members, also specifies
+ the primary language of the whole MiniApp.
- appID
是MiniApp的唯一标识符,主要用于包管理,支撑MiniApp版本更新和发布。appID
的格式是由字母起头的字符串,剩余字符为数字、字母、下划线或点[a-zA-Z_\.]。一种常见的实现方式是使用类似反向域名的命名方式,如com.company.miniapp
。
+ @@@Chinese version here@@@
+
+ Implementers are encouraged to provide an accurate value that matches the manifest content.
+ The members listed in this section are defined in Web App Manifest - Application Information [[manifest-app-info]]. +
description
member
+ 简述
+
- appName
is the name that is directly displayed to the user. It is used as the display name of MiniApp along with the desktop icon and in the context of MiniApp management.
+ The description member provides a textual description for the MiniApp.
- appName
,直接呈现给用户的名称,用于在桌面图标和MiniApp管理等处显示MiniApp的名称。
+ description
,为MiniApp提供简短的描述。
appID
member
+ 标识
+
- shortName
provides a short and easy-to-read name for MiniApp, and it can be used when there is insufficient space to display the full MiniApp name provided in appName
.
+ The appID member identifies the MiniApp univocally. This member is mainly used for the package management.
+ It supports the update and release of MiniApp versions.
+ The format of appID
SHALL be a string defined by the rule below:
- shortName
,为MiniApp提供简短易读的名称,可在没有足够空间显示MiniApp名称时使用。
+ appID
是MiniApp的唯一标识符,主要用于包管理,支撑MiniApp版本更新和发布。appID
的格式是由字母起头的字符串,剩余字符为数字、字母、下划线或点[a-zA-Z_\.]。一种常见的实现方式是使用类似反向域名的命名方式,如com.company.miniapp
。
+
+ appIDrule = ALPHA 1*( ALPHA / DIGIT / "_" / "." ) ++
+
+ One common practice is to use the reverse-domain-name-like convention,
+ e.g. com.company.miniapp
.
+
+
+ @@@Chinese version here@@@
+
appName
member
+ 名称
+
- description
provides a brief description for MiniApp.
+ The appName member is the descriptive name of the application. This is the name directly displayed to the user. It is used as the display name of MiniApp along with the desktop icon and in the context of MiniApp management.
- description
,为MiniApp提供简短的描述。
+ appName
,直接呈现给用户的名称,用于在桌面图标和MiniApp管理等处显示MiniApp的名称。
+
+ Same as {{WebAppManifest/name}}. Should `appName` be `name`?
shortName
member
+ 简称
+
- icons
is the array of MiniApp application icons. It consists of icons with different resolutions, that can be displayed based on different types of display equipments.
+ The shortName member provides a concise and easy-to-read name for MiniApp. It can be used when there is insufficient space to display the full MiniApp name provided in appName
.
- icons
,MiniApp应用图标数组。由不同分辨率的图标组成,根据显示设备类型的不同展示不同的图标。
-
- Attribute - 属性 - | -- Type - 类型 - | -- Required - 必填 - | -- Description - 描述 - | -
---|---|---|---|
src | -string | -- Yes - 是 - | -- the source of the icon image in the format of a path string - 以路径字符串所表示的图标图片来源 - | -
sizes | -string | -- Yes - 是 - | -
- The applicable resolution sizes of the icon image from the above mentioned src
- 来自以上src 的图标图片所适用的分辨率大小
- |
-
shortName
,为MiniApp提供简短易读的名称,可在没有足够空间显示MiniApp名称时使用。
+
+ + Same as {{WebAppManifest/short_name}}. Should `shortName` be `short_name`? +
versionName
member
版本名称
-
- versionName
is a string-type character string, and is mainly used for describing the version information. It is also the version name that is displayed to the user. The general format is "1.0.0" as specified in Semantic Versioning. It plays an important role in version control, MiniApp application and equipment compatibility.
+ The versionName member is a string-type character string that is mainly used for describing the version information. It is also the version name that is displayed to the user. The general format is "1.0.0" as specified in Semantic Versioning [[SEMANTIC-VERSIONING]]. It plays an important role in version control, MiniApp application, and equipment compatibility.
- versionName
是一个string类型的字符串,主要用作版本信息描述,也是面向用户显示的版本名称。一般格式为:"1.0.0"
,详见定义Semantic Versioning,该参数在版本控制、MiniApp应用与设备兼容性等方面发挥重要作用。
+ versionName
是一个string类型的字符串,主要用作版本信息描述,也是面向用户显示的版本名称。一般格式为:"1.0.0"
,详见定义Semantic Versioning [[SEMANTIC-VERSIONING]],该参数在版本控制、MiniApp应用与设备兼容性等方面发挥重要作用。
versionCode
member
版本号
-
- versionCode
is a number-type value, and is mainly used for enhancing the maintainability and security of MiniApp, e.g. a lower version is not compatible with a higher version. versionCode
is not displayed to the user and is incrementing according to the version iteration process. The value is a non-negative integer. Default: 1.
+ The versionCode member is a number that is mainly used for enhancing the maintainability and security of MiniApp, e.g., a lower version is not compatible with a higher version. versionCode
is not displayed to the user and is incrementing according to the version iteration process.
versionCode
是一个number类型的数值,主要用作提高MiniApp的可维护性和安全性,比如:低版本不能覆盖高版本。此版本号不向用户显示,根据版本迭代过程进行递增。取值是非负整数。默认值:1
。
+ This has a default value of 1 and yet is required? +
minPlatformVersion
member
平台版本
-
- minPlatformVersion
is a string-type character string. It is the minimum supported version of the required platform that can ensure normal operation of MiniApp, e.g. "1.0.0"
.
+ The minPlatformVersion member is a string-type character string that indicates the minimum supported version of the required platform to ensure the normal operation of MiniApp (e.g. "1.0.0"
).
minPlatformVersion
是一个string类型的字符串,保证MiniApp正常运行所需平台的最小支持版本。比如:"1.0.0"
。
pages
member
页面路由
-
- pages
is an array of path strings used for specifying which pages are included in a MiniApp. Each item in the array represents a page route. Page route = [path + filename]
. During the MiniApp development process, adding or deleting pages is done by configuring the array. When configuring the page route, there is no need to add the file name extension, since the MiniApp platform will automatically parse it. Note: the first item in the pages
array stands for the homepage of a MiniApp.
+ The pages member is an [=array=] of relative-url string used for specifying which pages are included in a MiniApp. Each item in the array represents a page route. Page route = [path + filename]
. During the MiniApp development process, adding or deleting pages is done by configuring the array. When configuring the page route, there is no need to add the file name extension, since the MiniApp platform will automatically parse it. Note: the first item in the pages
array stands for the homepage of a MiniApp.
pages
数组用于指定MiniApp都包含哪些页面,数组中每一项代表一个页面路由,页面路由 = [路径 + 文件名]
。MiniApp开发时新增或删除页面需在数组中进行配置,配置页面路由时文件名不需加后缀名,MiniApp平台会自动解析。备注:pages
数组中第一项代表MiniApp首页。
+ For compatibility with the Web platform, it is RECOMMENDED to use both pages and {{WebAppManifest/start_url}} and use the value "."
for scope
in the manifest file. The value of {{WebAppManifest/start_url}} MUST be the same as the first entry in pages.
+ If scope
.
+
+ Are pages.[0]
and start_url
aligned in all cases?
+
window
member
窗口
-
- window
contains sub-attributes used for styling the status bar, navigation bar, title, window background color, etc., as shown in the following table:
+ The window member contains sub-attributes, defined in MiniAppWindowResource, used for styling the status bar, navigation bar, title, window background color, etc.
用于设置MiniApp的状态栏、导航条、标题和窗口背景色等样式,如下表所示:
- -- Attribute - 属性 - | -- Type - 类型 - | -- Required - 必填 - | -- Default - 默认值 | -- Description - 描述 - | -
---|---|---|---|---|
navigationBarBackgroundColor | -HexColor | -- No - 否 - | -#000000 | -- Background color of the navigation bar - 导航栏背景颜色 - | -
navigationBarTextStyle | -string | -- No - 否 - | -white | -
- Background title color, valid values: black and white .
- 导航栏标题颜色,有效值:black 和white 。
- |
-
navigationBarTitleText | -string | -- No - 否 - | -- | -- Title text of the navigation bar - 导航栏标题文字内容 - | -
navigationStyle | -string | -- No - 否 - | -default | -
- Style of the navigation bar, valid values: default (default style) and custom (customized navigation bar). Note: The capsule button at the right corner is not customizable.
- 导航栏样式,有效值:default (默认样式)和custom (自定义导航栏)。注意:右上角胶囊按钮不可自定义。
- |
-
backgroundColor | -HexColor | -- No - 否 - | -#ffffff | -- Background color of the window - 窗口的背景颜色 - | -
backgroundTextStyle | -string | -- No - 否 - | -dark | -
- Background text style, valid values: dark and light .
- 背景文字样式,有效值:dark 和light 。
- |
-
enablePullDownRefresh | -boolean | -- No - 否 - | -false | -- Enable pull-to-refresh - 是否开启下拉刷新 - | -
onReachBottomDistance | -number | -- No - 否 - | -50 | -
- Distance from the bottom when page pull-up bottom event is triggered. The value is a non-negative integer and the unit is in px .
- 页面上拉触底事件触发时距页面底部距离。取值应为非负整数,单位为 px 。
- |
-
orientation | -string | -- No - 否 - | -portrait | -
- Screen orientation settings, valid values: portrait and landscape .
- 屏幕方向设置,有效值:portrait 和landscape 。
- |
-
fullscreen | -boolean | -- No - 否 - | -false | -- Full screen display - 全屏显示 - | -
designWidth | -number | -- No - 否 - | -750 | -
- The baseline width of the page design in px , based on which the size of the components on the page would be adjusted accordingly. The value is a non-negative integer.
- 以px 为单位的页面设计基准宽度,元素大小将根据实际设备宽度来缩放。取值应为非负整数。
- |
-
autoDesignWidth | -boolean | -- No - 否 - | -false | -
- Whether the designWidth of the page is auto-calculated. When it's true, the value of the designWidth is ignored, and the baseline width is determined by the system automatically according to the pixel density of the screen.
- 页面设计基准宽度是否自动计算,当设为true时,designWidth将会被忽略,设计基准宽度由设备宽度与屏幕密度计算得出。
- |
-
window
inherits the text direction and language configuration from dir
and lang
.
-
- window
的文字方向和语言设置继承自dir
和lang
.
-
+ window
的文字方向和语言设置继承自dir
和lang
.
+
widgets
member
卡片
-
- Widgets are a part of a MiniApp. Specifically, a MiniApp package can include MiniApp Pages and Widgets concurrently. As a part of the MiniApp application, widgets share some of the Manifest fields with the MiniApp main program, e.g. dir
, lang
, appID
, appName
, shortName
, icons
, versionName
and versionCode
. However, a widget also has its private fields, as shown in the following table:
+ The widgets member defines a set of widgets that are a part of a MiniApp.
+ Specifically, a MiniApp package can include MiniApp Pages and Widgets concurrently.
+ As a part of the MiniApp application, widgets share some of the Manifest fields with the
+ MiniApp main program, e.g. dir
, lang
, appID
, appName
, shortName
, icons
, versionName
, and versionCode
. However, a widget also has its private fields, defined in MiniAppWidgetResource.
Widget是MiniApp的一部分。具体来说,MiniApp包中可同时包含 MiniApp Page和Widget。Widget作为MiniApp应用程序的一部分,Widget和MiniApp主体程序共用部分Manifest字段,比如:dir
、lang
、appID
、appName
、shortName
、icons
、versionName
和versionCode
。但是Widget也有自己的私有字段,如下表所示:
- Attribute - 属性 - | -- Type - 类型 - | -- Required - 必填 - | -- Description - 描述 - | -
---|---|---|---|
name | -string | -- Yes - 是 - | -- Widget name - Widget名字 - | -
path | -string | -- Yes - 是 - | -
- Corresponding page path of Widget. It follows the same path route format as defined in pages .
- Widget对应页面路径,采用与pages 中相同页面路由的格式。
- |
-
minPlatformVersion | -string | -- No - 否 - | -- Minimum platform version supported - 支持最小平台版本 - | -
There are certain differences between the Widget-related APIs and the MiniApp APIs, hence, the declaration of the minimum platform version may be different. If the minPlatformVersion
field of a widget is not set explicitly, it is then identical to the minPlatformVersion
of the MiniApp by default.
Widget 涉及的API与MiniApp API有一定差别,因此最小平台版本声明可能不同。如不单独设置Widget的minPlatformVersion
字段,则默认与MiniApp平台版本相同。
reqPermissions
member
所需权限
-
- reqPermissions
is an array of permission objects. Each object declares a permission (such as the access to the location information, user contacts, and hardware features like camera) required for the proper running of the MiniApp. User's consent may be asked to protect user's privacy related to such permissions. Such information can also be used by an app store or a hosting platform to filter a MiniApp according to user's policy or device capabilities. The structure of a permission object is defined in the following table.
+ The reqPermissions member is an [=array=] of permission objects. Each MiniAppPermissionResource object declares permission (such as the access to the location information, user contacts, and hardware features like camera) required for the proper running of the MiniApp. User's consent may be asked to protect the user's privacy related to such permissions. Such information can also be used by an app store or a hosting platform to filter a MiniApp according to user's policy or device capabilities.
+ The structure of a permission object is defined in the following table.
reqPermissions
是一个权限对象的数组,其中每个对象声明了MiniApp正常运行所需的一个权限(比如对位置信息、联系人和摄像头等硬件特性的访问)。为保护权限相关的用户隐私,可能需要征得用户同意。此类权限信息还可以被应用市场或宿主平台用来根据用户策略或者设备能力来过滤MiniApp。详细的权限对象结构定义如下表。
- Attribute - 属性 - | -- Type - 类型 - | -- Required - 必填 - | -- Description - 描述 - | -
---|---|---|---|
name | -string | -- Yes - 是 - | -- permission name - 权限名称 - | -
reason | -string | -- No - 否 - | -- The reason to use this permission - 该权限的使用目的 - | -
- It's for further study whether the predefined permissions, permission extension, permission groups and protection levels need to be specified.
+
+ The MiniAppWindowResource.navigationBarBackgroundColor member specifies the color of the navigation bar background.
+ 导航栏背景颜色
+
+
+ Value by default:
+ The MiniAppWindowResource.navigationBarTextStyle member specifies the text color of the navigation bar title.
+
+
+ Value by default:
+ The MiniAppWindowResource.navigationBarTitleText member specifies the title text of the navigation bar
+ 导航栏标题文字内容
+
+ The MiniAppWindowResource.navigationStyle member specifies the style of the navigation bar:
+
+ Value by default:
+ The MiniAppWindowResource.backgroundColor member specifies the background color of the window. This member is equivalent to {{WebAppManifest/background_color}}.
+ 窗口的背景颜色
+
+
+ Value by default:
+ The MiniAppWindowResource.backgroundTextStyle member specifies the background text style.
+ 背景文字样式,。
+
+
+ Value by default:
+ The MiniAppWindowResource.enablePullDownRefresh member specifies if the pull-to-refresh event is enabled.
+ 是否开启下拉刷新
+
+
+ Value by default:
+ The MiniAppWindowResource.onReachBottomDistance member specifies the distance from the bottom when page pull-up bottom event is triggered. The value is a non-negative integer and the unit is in pixel unit.
+ 页面上拉触底事件触发时距页面底部距离。取值应为非负整数,单位为
+
+ Value by default:
+ The MiniAppWindowResource.orientation member specifies the screen orientation settings to which a screen can be locked. The two supported values are
+
+ Value by default:
+ The MiniAppWindowResource.fullscreen member indicates the full screen display.
+
+ Value by default:
+ Should it be
+ The MiniAppWindowResource.designWidth member indicates the baseline width of the page design in pixel unit, based on which the size of the components on the page would be adjusted accordingly. The value is a non-negative integer.
+ 以
+
+ Value by default:
+ The MiniAppWindowResource.autoDesignWidth member indicates whether the designWidth of the page is auto-calculated. When it's true, the value of the
+
+ Value by default: MiniAppWindowResource members
+
+
+ navigationBarBackgroundColor
member#000000
.
+
+
+ @@@Chinese version here@@@
+
+
+ navigationBarTextStyle
memberwhite
.
+
+
+ @@@Chinese version here@@@
+
+ navigationBarTitleText
member
+ navigationStyle
memberdefault
(default style) and custom
(customized navigation bar). Note: The capsule button at the right corner is not customizable.
+ 导航栏样式:default
(默认样式)和custom
(自定义导航栏)。注意:右上角胶囊按钮不可自定义。
+ default
.
+
+
+ @@@Chinese version here@@@
+
+
+ backgroundColor
member#ffffff
.
+
+
+ @@@Chinese version here@@@
+
+
+ backgroundTextStyle
memberdark
.
+
+
+ @@@Chinese version here@@@
+
+
+ enablePullDownRefresh
memberfalse
.
+
+
+ @@@Chinese version here@@@
+
+
+ onReachBottomDistance
memberpx
。
+ 50
.
+
+
+ @@@Chinese version here@@@
+
+
+ orientation
memberportrait
and landscape
, defined in {{OrientationLockType}} [[screen-orientation]]. This member is equivalent to {{WebAppManifest/orientation}}.
+ 屏幕方向设置
+ portrait
.
+
+
+ @@@Chinese version here@@@
+
+
+ fullscreen
membertrue
is equivalent to the
+ {{WebAppManifest/display}} fullscreen
, and false
to minimal-ui
.
+ false
.
+
+
+ @@@Chinese version here@@@
+
+ standalone
instead of minimal-ui
?
+
+ designWidth
memberpx
为单位的页面设计基准宽度,元素大小将根据实际设备宽度来缩放。取值应为非负整数。
+ 750
.
+
+
+ @@@Chinese version here@@@
+
+
+ autoDesignWidth
memberdesignWidth
is ignored, and the baseline width is determined by the system automatically according to the pixel density of the screen.
+ 页面设计基准宽度是否自动计算,当设为true时,designWidth将会被忽略,设计基准宽度由设备宽度与屏幕密度计算得出。
+ false
.
+
+
+ @@@Chinese version here@@@
+
+
- 预定义权限、权限扩展、权限分组和保护等级是否需要定义有待进一步研究。
+
+ The MiniAppWidgetResource.name member describes the Widget name
+ Widget名字
+
+ The MiniAppWidgetResource.path member indicates the corresponding page path of a Widget. It follows the same path route format as defined in pages.
+ Widget对应页面路径,采用与
+ The MiniAppWidgetResource.minPlatformVersion member indicates the minimum platform version supported
+ 支持最小平台版本
+ There are certain differences between the Widget-related APIs and the MiniApp APIs, hence, the declaration of the minimum platform version may be different. If the Widget 涉及的API与MiniApp API有一定差别,因此最小平台版本声明可能不同。如不单独设置Widget的MiniAppWidgetResource members
+
+ name
member
+ path
memberpages
中相同页面路由的格式。
+
+ minPlatformVersion
memberminPlatformVersion
field of a widget is not set explicitly, it is then identical to the minPlatformVersion
of the MiniApp by default.
+ minPlatformVersion
字段,则默认与MiniApp平台版本相同。
name
member+ The MiniAppPermissionResource.name member indicates the permission name + 权限名称 +
+reason
member+ The MiniAppPermissionResource.reason member indicates the reason to use this permission + 该权限的使用目的 +
+
- The following attributes are localizable and share the same default configuration of dir
and lang
if not otherwise specified.
+ It's for further study whether the predefined permissions, permission extension, permission groups, and protection levels need to be specified.
- 如下属性为可本地化属性。无特别规定的情况下,共享默认的dir
和lang
配置。
-
+ The following members are localizable and share the same default configuration of dir
and lang
if not otherwise specified.
+
+ 如下属性为可本地化属性。无特别规定的情况下,共享默认的dir
和lang
配置。
+
如此处所示,当且仅当以着重号标记时,建议(RECOMMENDED)才以BCP 14 [[RFC2119]] [[RFC8174]]中的说明解释。
+ ++ This specification uses the Augmented Backus-Naur Form (ABNF) notation of [[!RFC5234]]. +
Attributes like icons
, pages
, widgets
contain paths referring to local resources on the hosting platform. Implementors and the hosting platform should check the validity of those paths to ensure no illegal access outside the scope of the MiniApp package. On the other hand, the MiniApp itself (e.g. in JS code) may provide means to jump to external resources either on the hosting platform, or on a remote web site (e.g. through a uri). In this case, the hosting platform is responsible for providing clear indication to an end-user about such context switch.
Members like icons
, pages
, widgets
contain paths referring to local resources on the hosting platform. Implementors and the hosting platform should check the validity of those paths to ensure no illegal access outside the scope of the MiniApp package. On the other hand, the MiniApp itself (e.g. in JS code) may provide means to jump to external resources either on the hosting platform, or on a remote web site (e.g. through a uri). In this case, the hosting platform is responsible for providing clear indication to an end-user about such context switch.
icons
, pages
, widgets
等属性包含了宿主平台上的本地资源引用路径,开发者和宿主平台应该检查这些路径的合法性以确保没有MiniApp package之外的非法访问。另一方面,MiniApp自身(如JS代码中)可能提供跳转到其他外部资源的方式,包括宿主平台或远程网站上的外部资源(比如通过uri)。此时,宿主平台应该负责向用户提供明确的上下文切换的指示信息。
- In addition, the reqPermissions
attribute provides a specific means to control the access to the local software, hardware and data resources on the user's device. User's consent should be asked when it comes to privacy-related or high-level privileged resources.
+ In addition, the reqPermissions
member provides a specific means to control the access to the local software, hardware and data resources on the user's device. User's consent should be asked when it comes to privacy-related or high-level privileged resources.
@@ -1050,7 +1336,6 @@
A MiniApp manifest extends and profiles the Web App manifest format [[appManifest]] and
contains metadata associated with a MiniApp.
From a6cd66278435f15ee9c4d074010971c7557c864d Mon Sep 17 00:00:00 2001
From: Martin Alvarez-Espinar
The following members MUST be set in the MiniAppManifest.
- @@@Chinese version here@@@
+
+ The following members MUST be set in the MiniAppManifest.
The following members MUST be set in an {{ImageResource}}.
- @@@Chinese version here@@@
+
+ The following members MUST be set in an {{ImageResource}}.
The following members MUST be set in a MiniAppWidgetResource.
- @@@Chinese version here@@@
+
+ The following members MUST be set in a MiniAppWidgetResource.
The following member MUST be set in a MiniAppPermissionResource.
- @@@Chinese version here@@@
+
+ The following member MUST be set in a MiniAppPermissionResource.
Requirements
Requirements
Requirements
Requirements
the default base text direction of the whole MiniApp. The dir
member's value can be set to one of the text-direction values.
- @@@Chinese version here@@@ +
+ dir member, while + specifying the base direction of the localizable members of the manifest, also specifies + the default base text direction of the whole MiniApp. The dir + member's value can be set to one of the text-direction values.
The text-direction values defined by TextDirectionType, are the following, implying that the value of the localizable members is by default:
-- @@@Chinese version here@@@ +
+ The text-direction values defined by TextDirectionType, are the following, implying + that the value of the localizable members is by default:
rtl
.
-
- @@@Chinese version here@@@
+
+ Value `auto` is not supported currently by MiniApp agents. Value by default: rtl
.
@@ -694,8 +698,8 @@ The icons member describes images that serve as iconic representations of MiniApps in various contexts. Both {{ImageResource/src}} and {{ImageResource/sizes}} are required. {{ImageResource/src}} MUST be a relative-url string.
-- @@@Chinese version here@@@ +
+ The icons member describes images that serve as iconic representations of MiniApps in various contexts. Both {{ImageResource/src}} and {{ImageResource/sizes}} are required. {{ImageResource/src}} MUST be a relative-url string.
- @@@Chinese version here@@@ +
+ The lang member, while + specifying the primary language of the localizable members, also specifies + the primary language of the whole MiniApp.
Implementers are encouraged to provide an accurate value that matches the manifest content. @@ -757,8 +763,9 @@
com.company.miniapp
.
-
- @@@Chinese version here@@@
+
+ One common practice is to use the reverse-domain-name-like convention,
+ e.g. com.company.miniapp
.
navigationBarBackgroundColor
member#000000
.
-
- @@@Chinese version here@@@
-
-
+
+ Value by default: #000000
.
+
+
navigationBarTextStyle
membernavigationBarTextStyle
member
Value by default: white
.
-
-
- @@@Chinese version here@@@
-
+
+
+ Value by default: white
.
+
navigationStyle
member
Value by default: default
.
-
-
- @@@Chinese version here@@@
-
-
default
.
+
+
backgroundColor
memberbackgroundColor
member#ffffff
.
-
- @@@Chinese version here@@@
+
+ Value by default: #ffffff
.
backgroundTextStyle
member
Value by default: dark
.
-
-
- @@@Chinese version here@@@
-
-
dark
.
+
+
enablePullDownRefresh
memberenablePullDownRefresh
member
Value by default: false
.
-
-
- @@@Chinese version here@@@
-
-
false
.
+
+
onReachBottomDistance
memberonReachBottomDistance
member
Value by default: 50
.
-
-
- @@@Chinese version here@@@
-
-
50
.
+
+
orientation
memberorientation
member
Value by default: portrait
.
-
-
- @@@Chinese version here@@@
-
-
portrait
.
+
+
fullscreen
memberfalse
.
-
- @@@Chinese version here@@@
+
+ Value by default: false
.
@@ -1061,8 +1068,8 @@
designWidth
member750
.
-
- @@@Chinese version here@@@
+
+ Value by default: 750
.
autoDesignWidth
memberfalse
.
-
- @@@Chinese version here@@@
+
+ Value by default: false
.
From c570ba323f2454736471af02ccaababb1b5179d7 Mon Sep 17 00:00:00 2001
From: Martin Alvarez-Espinar - A MiniApp manifest extends and profiles the Web App manifest format [[appManifest]] and + A MiniApp manifest extends and profiles the Web App Manifest format [[appManifest]] and contains metadata associated with a MiniApp.
From b12e5f5f7f9a969d2c452e5988a3c2969fe032ed Mon Sep 17 00:00:00 2001
From: Martin Alvarez-Espinar
- As the [=application manifest=] is JSON, the members ofr this
+ As the [=application manifest=] is JSON, the members for this
specification are of the types number, true | false literals, object,
array, and string as defined in [[[ECMA-404]]]. hexcolor is a [=string=] expressing RGB color values [[css-color-3]] in hexadecimal notation: ‘#’ immediately followed by six hexadecimal characters (#rrggbb).
字段
member's value can be set to one of the text-direction values.
- dir member, while + dir member, while specifying the base direction of the localizable members of the manifest, also specifies the default base text direction of the whole MiniApp. The dir member's value can be set to one of the text-direction values. @@ -653,7 +653,7 @@
- The text-direction values defined by TextDirectionType, are the following, implying + The text-direction values defined by TextDirectionType, are the following, implying that the value of the localizable members is by default:
- The icons member describes images that serve as iconic representations of MiniApps in various contexts. Both {{ImageResource/src}} and {{ImageResource/sizes}} are required. {{ImageResource/src}} MUST be a relative-url string. + The icons member describes images that serve as iconic representations of MiniApps in various contexts. Both {{ImageResource/src}} and {{ImageResource/sizes}} are required. {{ImageResource/src}} MUST be a relative-url string.
- The lang member, while + The lang member, while specifying the primary language of the localizable members, also specifies the primary language of the whole MiniApp.
@@ -901,9 +901,8 @@The reqPermissions member is an [=array=] of permission objects. Each MiniAppPermissionResource object declares permission (such as the access to the location information, user contacts, and hardware features like camera) required for the proper running of the MiniApp. User's consent may be asked to protect the user's privacy related to such permissions. Such information can also be used by an app store or a hosting platform to filter a MiniApp according to user's policy or device capabilities. - The structure of a permission object is defined in the following table.
-+
reqPermissions
是一个权限对象的数组,其中每个对象声明了MiniApp正常运行所需的一个权限(比如对位置信息、联系人和摄像头等硬件特性的访问)。为保护权限相关的用户隐私,可能需要征得用户同意。此类权限信息还可以被应用市场或宿主平台用来根据用户策略或者设备能力来过滤MiniApp。详细的权限对象结构定义如下表。
- The versionCode member is a number that is mainly used for enhancing the maintainability and security of MiniApp, e.g., a lower version is not compatible with a higher version. versionCode
is not displayed to the user and is incrementing according to the version iteration process.
+ The versionCode member is a number that is mainly used for enhancing the maintainability and security of MiniApp, e.g., a lower version is not compatible with a higher version. versionCode
is not displayed to the user and is incrementing according to the version iteration process. Value by default: 1.
versionCode
是一个number类型的数值,主要用作提高MiniApp的可维护性和安全性,比如:低版本不能覆盖高版本。此版本号不向用户显示,根据版本迭代过程进行递增。取值是非负整数。默认值:1
。
- This has a default value of 1 and yet is required? -
+name
member
+ 名称
+ + The name member is the descriptive name of the application. This is the name directly displayed to the user. It is used as the display name of MiniApp along with the desktop icon and in the context of MiniApp management. +
+
+ name
,直接呈现给用户的名称,用于在桌面图标和MiniApp管理等处显示MiniApp的名称。
+
short_name
member
+ 简称
+
+ The short_name member provides a concise and easy-to-read name for MiniApp. It can be used when there is insufficient space to display the full MiniApp name provided in name
.
+
+ short_name
,为MiniApp提供简短易读的名称,可在没有足够空间显示MiniApp名称时使用。
+
appName
member
- 名称
- - The appName member is the descriptive name of the application. This is the name directly displayed to the user. It is used as the display name of MiniApp along with the desktop icon and in the context of MiniApp management. -
-
- appName
,直接呈现给用户的名称,用于在桌面图标和MiniApp管理等处显示MiniApp的名称。
-
- Same as {{WebAppManifest/name}}. Should `appName` be `name`? -
-shortName
member
- 简称
-
- The shortName member provides a concise and easy-to-read name for MiniApp. It can be used when there is insufficient space to display the full MiniApp name provided in appName
.
-
- shortName
,为MiniApp提供简短易读的名称,可在没有足够空间显示MiniApp名称时使用。
-
- Same as {{WebAppManifest/short_name}}. Should `shortName` be `short_name`? -
-versionName
member
@@ -882,10 +876,10 @@ dir
, lang
, appID
, appName
, shortName
, icons
, versionName
, and versionCode
. However, a widget also has its private fields, defined in MiniAppWidgetResource.
+ MiniApp main program, e.g. dir
, lang
, appID
, name
, short_name
, icons
, versionName
, and versionCode
. However, a widget also has its private fields, defined in MiniAppWidgetResource.
- Widget是MiniApp的一部分。具体来说,MiniApp包中可同时包含 MiniApp Page和Widget。Widget作为MiniApp应用程序的一部分,Widget和MiniApp主体程序共用部分Manifest字段,比如:dir
、lang
、appID
、appName
、shortName
、icons
、versionName
和versionCode
。但是Widget也有自己的私有字段,如下表所示:
+ Widget是MiniApp的一部分。具体来说,MiniApp包中可同时包含 MiniApp Page和Widget。Widget作为MiniApp应用程序的一部分,Widget和MiniApp主体程序共用部分Manifest字段,比如:dir
、lang
、appID
、name
、short_name
、icons
、versionName
和versionCode
。但是Widget也有自己的私有字段,如下表所示:
There are certain differences between the Widget-related APIs and the MiniApp APIs, hence, the declaration of the minimum platform version may be different. If the minPlatformVersion
field of a widget is not set explicitly, it is then identical to the minPlatformVersion
of the MiniApp by default.
dir
和lang
配置。
- It is RECOMMENDED that the hosting platform makes the necessary meta information in the manifest available to the end-user, such as appID
, appName
, shortName
, icons
, versionName
, description
. This is to give an end-user an opportunity to make a conscious decision to approve the installation and use of the MiniApp. This could also help to identify a spoofing MiniApp.
建议宿主平台将manifest中的必要元数据信息提供给用户,比如appID
, appName
, shortName
, icons
, versionName
, description
。这样可以给用户一个机会来对MiniApp的安装和使用提供清晰的判断依据,也可以帮助用户来识别伪装的恶意MiniApp。
appID
, name
, short_name
, icons
, versionName
, description
. This is to give an end-user an opportunity to make a conscious decision to approve the installation and use of the MiniApp. This could also help to identify a spoofing MiniApp.
+ 建议宿主平台将manifest中的必要元数据信息提供给用户,比如appID
, name
, short_name
, icons
, versionName
, description
。这样可以给用户一个机会来对MiniApp的安装和使用提供清晰的判断依据,也可以帮助用户来识别伪装的恶意MiniApp。
- This specification defines the MiniApp lifecycle events and the process that enables developers to manage the lifecycle events of both MiniApp application lifecycle and each MiniApp page's lifecycle. MiniApp application lifecycle includes a set of events, including application initialization, application running in foreground, application running in background. MiniApp page lifecycle includes a set of events, including page loading, page first rendering ready, page running in foreground, page running in background and page unloading. + This specification defines the MiniApp lifecycle events and the process that enables developers to manage the lifecycle events of both MiniApp application lifecycle and each MiniApp page's lifecycle. MiniApp application lifecycle includes a set of events, including application initialization, application running in foreground, application running in background. MiniApp page lifecycle includes a set of events, including page loading, page first rendering ready, page running in foreground, page running in background and page unloading. Whenever possible, the specification should provide a mapping to existing Web specifications such as Service Workers and Page Visibility.
Draft state: In progress in MiniApp CG @@ -451,6 +451,10 @@
The MiniApps Working Group aims to harmonize the heterogeneous MiniApp ecosystem, enabling interoperability among the different MiniApp platforms, maximizing the convergence of MiniApps and the World Wide Web, reducing the development costs and facilitating the adoption of this technology. The work will be based on the specifications incubated in the MiniApps Ecosystem Community Group for MiniApp features, including:
- Comprehensive test suites will be developed for each specification to ensure interoperability, and the group will create interoperability reports. The group will also maintain errata as required for the continued relevance and usefulness of the specifications it produces. + Comprehensive test suites will be developed for each specification to ensure interoperability, and the group will create interoperability reports. The group will also maintain errata as required for the continued relevance and usefulness of the specifications it produces.
- Each specification must contain a section on accessibility that describes the benefits and impacts, including ways specification features can be used to address them, and recommendations for maximizing accessibility in implementations. + Each specification must contain a section on accessibility that describes the benefits and impacts, including ways specification features can be used to address them, and recommendations for maximizing accessibility in implementations.
- Each specification must detail all known security and privacy implications for implementers, Web authors, and end users. + Each specification must detail all known security and privacy implications for implementers, Web authors, and end users.
- APIs shall be demonstrated to be implementable securely before released. + APIs shall be demonstrated to be implementable securely before released.
MiniApps工作组的任务是制定规范,以促进可互操作且功能强大的MiniApps的开发。
-- 加入MiniApps工作组 -
+ + +章程的草案可在GitHub上找到,欢迎随时提issue。 +
+- MiniApp URI Scheme + MiniApp Manifest |
Q1 2021
@@ -282,10 +286,10 @@ | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- MiniApp Lifecycle + MiniApp Packaging | - Q1 2021 + Q2 2021 |
Q4 2021
@@ -299,7 +303,7 @@ | ||||||||||||||
- MiniApp Manifest + MiniApp Lifecycle |
Q1 2021
@@ -316,19 +320,31 @@ | |||||||||||||||
- MiniApp Packaging + MiniApp URI Scheme + | ++ Q1 2021 + | ++ | ++ | ++ | +||||||||||||
+ Widget Requirement | Q1 2021 | - Q4 2021 | - Q3 2022 | - Q4 2022 | ||||||||||||
- MiniApp URI Scheme + MiniApp Addressing |
Q1 2021
@@ -419,12 +419,6 @@
WHATWG
review for accessibility, internationalization, performance,
privacy, and security with the relevant Working and Interest Groups,
and with the TAG. Invitation for review must be
- issued during each major standards-track document transition,
+ "Technical Architecture Group">TAG. The WG will seek input into accessibility user requirements.
+ Invitation for review must be issued during each major standards-track document transition,
including FPWD. The Working Group is
encouraged to engage collaboratively with the horizontal review
From 0c595064d5411757b02509f72bd364af326072eb Mon Sep 17 00:00:00 2001
From: Xiaoqian Wu
| |||||||||||||||
Teleconferences: topic-specific calls may be held - Face-to-face: 1 or 2 per year (only as needed) + Face-to-face: at least 1 per year |