diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6433079..2fde3ec 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,15 @@
-# MiniApps Ecosystem Community Group
+# MiniApp Standardization
-This repository is being used for work in the W3C MiniApps Ecosystem Community Group, governed by the [W3C Community License Agreement (CLA)](https://www.w3.org/community/about/agreements/cla/). To make substantive contributions, you must join the CG.
+This repository is being used for work in the MiniApps Working Group and the W3C MiniApps Ecosystem Community Group. Some documents are intended to become part of Recommendation-track documents, and are governed by the:
+
+ * [W3C Patent Policy](https://www.w3.org/Consortium/Patent-Policy-20200915/)
+ * [Software and Document License](https://www.w3.org/Consortium/Legal/copyright-software)
+
+To make substantive contributions to these specifications, you must either participate in the relevant W3C Working Group or make a non-member patent licensing commitment.
+
+Some documents are still incubated in the Community Group, and are governed by the [W3C Community License Agreement (CLA)](https://www.w3.org/community/about/agreements/cla/).
+
+To make substantive contributions, you must join the CG.
If you are not the sole contributor to a contribution (pull request), please identify all
contributors in the pull request comment.
diff --git a/LICENSE.md b/LICENSE.md
index a792aa8..2c006ec 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,9 +1,5 @@
-All Reports in this Repository are licensed by Contributors
-under the
-[W3C Software and Document License](https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).
+All Reports in this Repository are licensed by Contributors under the [W3C Software and Document License](https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).
-Contributions to Specifications are made under the
-[W3C CLA](https://www.w3.org/community/about/agreements/cla/).
+Contributions to Specifications are made under the [W3C Software and Document License](https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document) or the [W3C CLA](https://www.w3.org/community/about/agreements/cla/).
-Contributions to Test Suites are made under the
-[W3C 3-clause BSD License](https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html)
+Contributions to Test Suites are made under the [W3C 3-clause BSD License](https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html).
diff --git a/Meetings/2021-04-CJK/agenda.html b/Meetings/2021-04-CJK/agenda.html
new file mode 100644
index 0000000..000af98
--- /dev/null
+++ b/Meetings/2021-04-CJK/agenda.html
@@ -0,0 +1 @@
+
diff --git a/Meetings/2021-04-CJK/agenda_ja.html b/Meetings/2021-04-CJK/agenda_ja.html
new file mode 100644
index 0000000..bff76c1
--- /dev/null
+++ b/Meetings/2021-04-CJK/agenda_ja.html
@@ -0,0 +1 @@
+
diff --git a/Meetings/2021-04-CJK/agenda_zh.html b/Meetings/2021-04-CJK/agenda_zh.html
new file mode 100644
index 0000000..e668a3a
--- /dev/null
+++ b/Meetings/2021-04-CJK/agenda_zh.html
@@ -0,0 +1 @@
+
diff --git a/Meetings/2021-04-CJK/index.html b/Meetings/2021-04-CJK/index.html
new file mode 100644
index 0000000..49c5c61
--- /dev/null
+++ b/Meetings/2021-04-CJK/index.html
@@ -0,0 +1 @@
+
diff --git a/Meetings/2021-04-CJK/index_ja.html b/Meetings/2021-04-CJK/index_ja.html
new file mode 100755
index 0000000..74b9ec3
--- /dev/null
+++ b/Meetings/2021-04-CJK/index_ja.html
@@ -0,0 +1 @@
+
diff --git a/Meetings/2021-04-CJK/index_zh.html b/Meetings/2021-04-CJK/index_zh.html
new file mode 100755
index 0000000..31723e2
--- /dev/null
+++ b/Meetings/2021-04-CJK/index_zh.html
@@ -0,0 +1 @@
+
diff --git a/Meetings/CG.md b/Meetings/CG.md
new file mode 100644
index 0000000..3352551
--- /dev/null
+++ b/Meetings/CG.md
@@ -0,0 +1,51 @@
+# MiniApps Ecosystem CG Meetings
+
+This document contains links to meeting minutes of the CG.
+
+## 2022
+
+* [17 March 2022 TeleConf](https://www.w3.org/2022/03/17-miniapp-minutes.html)
+* [17 February 2022 TeleConf](https://www.w3.org/2022/02/17-MiniApp-minutes.html)
+* [13 January 2022 TeleConf](https://www.w3.org/2022/01/13-miniapp-minutes.html)
+
+## 2021
+
+* [16 December 2021 TeleConf](https://www.w3.org/2021/12/16-miniapp-minutes.html)
+* [18 November 2021 TeleConf](https://www.w3.org/2021/11/18-MiniApp-minutes.html)
+* [28 October 2021 TPAC vF2F](https://www.w3.org/2021/10/28-MiniApp-minutes.html)
+* [19 October 2021 TPAC Breakout Session](https://www.w3.org/2021/10/18-miniapptools-minutes.html)
+* [16 September 2021 TeleConf](https://www.w3.org/2021/09/16-miniapp-minutes.html)
+* [19 August 2021 TeleConf](https://www.w3.org/2021/08/19-miniapp-minutes.html)
+* [15 July 2021 TeleConf](https://www.w3.org/2021/07/15-miniapp-minutes.html)
+* [17 June 2021 TeleConf](https://www.w3.org/2021/06/17-miniapp-minutes.html)
+* [20 May 2021 TeleConf](https://www.w3.org/2021/05/20-MiniApp-minutes.html)
+* [22 April 2021 TeleConf](https://www.w3.org/2021/04/22-miniapp-minutes.html)
+* [8 April 2021 CJK Meeting](https://www.w3.org/2021/03/miniapp-cjk/index.html) ([minutes](https://www.w3.org/2021/04/08-MiniApp-minutes.html))
+* [25 March 2021 TeleConf](https://www.w3.org/2021/03/25-miniapp-minutes.html)
+* [25 Feb 2021 TeleConf](https://www.w3.org/2021/02/25-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2021Mar/0001.html))
+* [14 January 2021 TeleConf](https://www.w3.org/2021/01/14-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Member/internal-miniapps/2021Jan/0001.html))
+
+## 2020
+
+* [10 December 2020 TeleConf](https://www.w3.org/2020/12/10-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Dec/0000.html))
+* [19 November 2020 TeleConf](https://www.w3.org/2020/11/19-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Nov/0000.html))
+* [29 October 2020 TPAC Breakout Session](https://www.w3.org/2020/10/29-MiniApp-Standardization-minutes.html)
+* [15 October 2020 TeleConf](https://www.w3.org/2020/10/15-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Oct/0003.html))
+* [10 September 2020 TeleConf](https://www.w3.org/2020/09/10-miniapp-minutes.html)
+* [26 August 2020 TeleConf on manifest](https://www.w3.org/2020/08/26-manifest-minutes.html)
+* [6 August 2020 TeleConf](https://www.w3.org/2020/08/06-Miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Aug/0001.html))
+* [30-31 July 2020 Virtual Meeting](https://www.w3.org/2020/07/miniapp-virtual-meeting/index.html) ([day 1](https://www.w3.org/2020/07/30-miniapp-minutes.html), [day 2](https://www.w3.org/2020/07/31-miniapp-minutes.html))
+* [9 July 2020 TeleConf](https://www.w3.org/2020/07/09-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Jul/0001.html))
+* [18 June 2020 TeleConf - draft WG charter](https://www.w3.org/2020/06/18-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Jun/0001.html))
+* [11 June 2020 TeleConf](https://www.w3.org/2020/06/11-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Jun/0000.html))
+* [14 May 2020 TeleConf](https://www.w3.org/2020/05/14-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020May/0001.html))
+* [9 April 2020 TeleConf](https://www.w3.org/2020/04/09-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Apr/0000.html))
+* [12 March 2020 TeleConf](https://www.w3.org/2020/03/12-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Mar/0001.html))
+* [13 Feb 2020 TeleConf](https://www.w3.org/2020/02/13-MiniApp-minutes.html)
+* [9 Jan 2020 TeleConf](https://www.w3.org/2020/01/09-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Jan/0000.html))
+
+## 2019
+
+* [5 Dec 2019 TeleConf](https://www.w3.org/2019/12/05-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2019Dec/0000.html))
+* [7 Nov 2019 TeleConf](https://www.w3.org/2019/11/07-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2019Nov/0000.html))
+* [17 Oct 2019 TeleConf](https://www.w3.org/2019/10/17-MiniApp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2019Oct/0002.html))
diff --git a/Meetings/Meetings.md b/Meetings/Meetings.md
index 05f9798..ccac81b 100644
--- a/Meetings/Meetings.md
+++ b/Meetings/Meetings.md
@@ -1,20 +1,3 @@
-# MiniApps Ecosystem CG Meetings
+# Meetings
-This document contains links to meeting minutes of the CG.
-
-## 2020
-
-* [18 June 2020 TeleConf - draft WG charter](https://www.w3.org/2020/06/18-miniapp-minutes.html) ([Summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Jun/0001.html))
-
-* [11 June 2020 TeleConf](https://www.w3.org/2020/06/11-miniapp-minutes.html) ([Summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Jun/0000.html))
-* [14 May 2020 TeleConf](https://www.w3.org/2020/05/14-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020May/0001.html))
-* [9 April 2020 TeleConf](https://www.w3.org/2020/04/09-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Apr/0000.html))
-* [12 March 2020 TeleConf](https://www.w3.org/2020/03/12-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Mar/0001.html))
-* [13 Feb 2020 TeleConf](https://www.w3.org/2020/02/13-MiniApp-minutes.html)
-* [9 Jan 2020 TeleConf](https://www.w3.org/2020/01/09-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2020Jan/0000.html))
-
-## 2019
-
-* [5 Dec 2019 TeleConf](https://www.w3.org/2019/12/05-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2019Dec/0000.html))
-* [7 Nov 2019 TeleConf](https://www.w3.org/2019/11/07-miniapp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2019Nov/0000.html))
-* [17 Oct 2019 TeleConf](https://www.w3.org/2019/10/17-MiniApp-minutes.html) ([summary](https://lists.w3.org/Archives/Public/public-miniapps/2019Oct/0002.html))
+See [WG Meetings](https://github.com/w3c/miniapp/blob/gh-pages/Meetings/WG.md) and [CG Meetings](https://github.com/w3c/miniapp/blob/gh-pages/Meetings/CG.md).
diff --git a/Meetings/WG.md b/Meetings/WG.md
new file mode 100644
index 0000000..faecdc0
--- /dev/null
+++ b/Meetings/WG.md
@@ -0,0 +1,27 @@
+# MiniApps WG Meetings
+
+This document contains links to meeting minutes of the WG.
+
+## 2022
+
+* [28 April 2022 TeleConf](https://www.w3.org/2022/04/28-MiniApp-minutes.html)
+* [24 March 2022 TeleConf](https://www.w3.org/2022/03/24-miniapp-minutes.html)
+* [24 February 2022 TeleConf](https://www.w3.org/2022/02/24-miniapp-minutes.html)
+* [20 January 2022 TeleConf](https://www.w3.org/2022/01/20-miniapp-minutes.html)
+
+## 2021
+
+* [16 December 2021 TeleConf](https://www.w3.org/2021/12/16-miniapp-minutes.html)
+* [25 November 2021 TeleConf](https://www.w3.org/2021/11/25-MiniApp-minutes.html)
+* [28 October 2021 TPAC vF2F](https://www.w3.org/2021/10/28-MiniApp-minutes.html)
+* [19 October 2021 TPAC Breakout Session](https://www.w3.org/2021/10/18-miniapptools-minutes.html)
+* [23 September 2021 TeleConf](https://www.w3.org/2021/09/23-MiniApp-minutes.html)
+* [26 August 2021 TeleConf](https://www.w3.org/2021/08/26-miniapp-minutes.html)
+* [29 July 2021 TeleConf](https://www.w3.org/2021/07/29-miniapp-minutes.html)
+* [24 June 2021 TeleConf](https://www.w3.org/2021/06/24-MiniApp-minutes.html)
+* [27 May 2021 TeleConf](https://www.w3.org/2021/05/27-miniapp-minutes.html)
+* [29 April 2021 TeleConf](https://www.w3.org/2021/04/29-MiniApp-minutes.html)
+* [8 April 2021 CJK Meeting](https://www.w3.org/2021/03/miniapp-cjk/index.html) ([minutes](https://www.w3.org/2021/04/08-MiniApp-minutes.html))
+* [1 April 2021 TeleConf](https://www.w3.org/2021/04/01-miniapp-minutes.html)
+* [4 March 2021 TeleConf](https://www.w3.org/2021/03/04-miniapp-minutes.html)
+* [27 January 2021 Virtual Meeting (in Chinese)](https://www.w3.org/2021/01/27-MiniApps-WG-session.html)
diff --git a/README.md b/README.md
index 5a3d778..97f384f 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,20 @@
# MiniApp Standardization
-* [CG homepage](https://www.w3.org/community/miniapps/)
-* [CG Specs](https://github.com/w3c/miniapp/tree/gh-pages/specs)
+## MiniApps Working Group
+
+* [WG Homepage](https://www.w3.org/2021/miniapps/)
+* [WG Specs](https://github.com/w3c/miniapp/tree/gh-pages/specs#wg-documents)
+* [WG Charter](https://www.w3.org/2021/01/miniapps-wg-charter.html)
+* [WG Meeting Minutes](https://github.com/w3c/miniapp/blob/gh-pages/Meetings/WG.md)
+* [WG Calendar](https://www.w3.org/groups/wg/miniapps/calendar)
+
+## MiniApps Ecosystem Community Group
+
+* [CG Homepage](https://www.w3.org/community/miniapps/)
+* [CG Specs](https://github.com/w3c/miniapp/tree/gh-pages/specs#cg-documents)
* [CG Charter](https://w3c.github.io/miniapp/charters/cg.html)
-* [CG Meetings](https://github.com/w3c/miniapp/blob/gh-pages/Meetings/Meetings.md)
+* [CG Meeting Minutes](https://github.com/w3c/miniapp/blob/gh-pages/Meetings/CG.md)
+* [CG Calendar](https://www.w3.org/groups/cg/miniapps/calendar)
## Other documents
diff --git a/charters/cg.html b/charters/cg.html
index c02f269..c3a54f8 100644
--- a/charters/cg.html
+++ b/charters/cg.html
@@ -74,7 +74,7 @@
Last Modified:
- 5 December 2019
+ 16 October 2020
@@ -91,7 +91,7 @@
The MiniApp Ecosystem Community Group aims to discuss proposals for MiniApp features that would benefit the interoperability and robustness of MiniApp ecosystem, including:
-
Basic architecture and essential functions of MiniApp such as the URI scheme, widget, application lifecycle and event, as well as Manifest;
+
Basic architecture and essential functions of MiniApp such as addressing, widget, application lifecycle and event, as well as Manifest;
Elements and APIs that would enhance the interoperability among different MiniApp platforms, including UI elements, Device API, and those advanced APIs such as Account API and Map API;
Coordination with current W3C efforts, especially PWA, on the commonality of Web features;
Carry out horizontal review for accessibility, internationalization, privacy, and security for MiniApp specifications;
@@ -108,10 +108,11 @@
New projects or status changes are communicated to the group through the public mailing list. Chairs and editors should publish status updates to the group public mailing list to allow group participants to monitor progress without having to directly watch every repo.
The mission of the MiniApps Working Group is to produce specifications that facilitate the development of interoperable and robust MiniApps.
-
-
- Join the
- MiniApps Working Group.
+ "https://www.w3.org/2021/miniapps/">MiniApps Working Group is to produce specifications that facilitate the development of interoperable and robust MiniApps.
This proposed charter is available
+ on GitHub.
+
+ Feel free to raise issues.
+
@@ -89,24 +95,23 @@
End date
- TBD
+ 2023-01-20
Chairs
-
- TBD
+
+ Qing An (Alibaba), Zitao Wang (Huawei), Dan Zhou (Baidu)
Team Contact
- (FTE %: 10)
- Fuqiao Xue
+ Fuqiao Xue (0.2 FTE)
@@ -115,27 +120,43 @@
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
-
- Scope
+
+ Mission
-
MiniApp as a new form of mobile application, leveraging both Web technologies (especially CSS and JavaScript) as well as capabilities of native applications, is gaining more and more popularity in Asian countries such as China. To enhance the interoperability between different MiniApp platforms (including super applications and native operating systems), main stream MiniApp vendors has been working together in W3C Chinese Web Interest Group since May 2019 and published a MiniApp Standardization White Paper in September 2019 as the initial standardization exploration for MiniApp technologies. As more global companies get interested in joining the MiniApp related discussion, the MiniApps Ecosystem Community Group was proposed and approved during TPAC 2019 so that global Web community can join the discussion.
-
- During the exploration phase, potential standard requirements are identified due to the different nature of MiniApp comparing to the typical web environment. For instance, the hosting platform may not be a browser and the application construction is not based on web pages. Therefore different but relevant technologies are used for UI configuration and rendering, resource packaging and the API access to local system capabilities. Such cases have not be covered by existing Web standards such as Web Packaging, Web App Manifest, and Web APIs.
-
+ MiniApp as a new form of mobile application, leveraging both Web technologies (especially CSS and JavaScript) as well as capabilities of native applications, is gaining more and more popularity in the globe. To enhance the interoperability between MiniApp platforms and the Web, and between different MiniApp platforms (applications or operating systems that are hosts to MiniApps), mainstream MiniApp vendors and related stakeholders have been working together in W3C Chinese Web Interest Group since May 2019 and published a MiniApp Standardization White Paper in September 2019 as the initial standardization exploration for MiniApp technologies. As more global companies get interested in joining the MiniApp related discussion, the MiniApps Ecosystem Community Group was proposed and approved during TPAC 2019 so that the global Web community can join the discussion.
-
The MiniApps Working Group aims to work on specifications incubated in the MiniApps Ecosystem Community Group for MiniApp features that would benefit the interoperability and robustness of MiniApp ecosystem, including:
+
+ During the exploration phase, potential standard requirements have been identified due to the unique nature of MiniApp in comparison to the typical Web environment. Substantial research work and joint discussion with related W3C groups have been conducted to clarify the requirements and possible solutions for MiniApp standardization. For instance, the hosting platform may or may not be a browser, and the application construction may or may not be based on web resources. Therefore different but relevant technologies are used for UI configuration and rendering, resource packaging, and the API access to local system capabilities. Such cases have not been fully covered by existing Web standards such as Web Packaging, Web App Manifest, or Web APIs.
+
+
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.
+
+
+
+ Scope
+
+
The work will be based on the specifications incubated in the MiniApps Ecosystem Community Group for MiniApp features, which include the following:
-
Basic architecture and essential functions of MiniApp such as the URI scheme, widget, application lifecycle and event, manifest, and packaging;
-
Components, APIs, and a template mechanism that would enhance the interoperability among different MiniApp platforms, such as UI components, Device APIs, Account API etc.;
-
Coordination with other W3C efforts, especially Progressive Web Apps, on the commonality of Web features.
+
Basic architecture and essential functions of MiniApp such as the Manifest, Packaging, Addressing, and Lifecycle, as indicated in the Deliverables section;
+
MiniApp UI components (encapsulated reusable code for rendering a part of the UI), component-associated APIs, and a page layout template mechanism that would enhance the interoperability among different MiniApp platforms and the Web. Other components and APIs may be included by rechartering the WG scope as the incubation result from the MiniApp Community Group.
+
Coordination with other W3C efforts, especially security, privacy, accessibility, internationalization and other Webapp APIs including Progressive Web Apps, on the commonality of the Web.
+
+
+ Out of Scope
+
+
The Working Group will not:
+
+
Define new CSS functionality, syntax, processing or rendering models.
+
Define any specification that overlaps the existing normative specifications for browser-based APIs without a concrete plan to work with existing working groups.
+
Define changes to the existing HTML markup language and to the Document Object Model (DOM) specifications.
+
@@ -150,63 +171,48 @@
- MiniApp URI Scheme
-
-
-
- This specification defines the MiniApp URI scheme syntax and the process to dereference the MiniApp URI scheme.
-
- This specification defines the MiniApp lifecycle events and the process to manage MiniApp and each page's lifecycle.
+ 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.
- 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.
+ This specification defines the standardized MiniApp package structure and its construction method. The MiniApp package file includes all the application assets such as document templates, components, stylesheets, scripts, internationalization resources, security resources, and the manifest file. The MiniApps Working Group aims at defining a MiniApp package format to be processed by various runtime environment.
- This specification defines the standardized MiniApp package structure.
+ 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.
- The Working Group may work on additional in-scope Recommendation-track deliverables without preparing an updated Charter.
+ If additional in-scope Recommendation-track deliverables need to be added to the Charter before the Charter expires, the Working Group will prepare an updated Charter that differs only in deliverables.
The Working Group will not adopt new proposals until they have matured through the MiniApps Ecosystem Community Group.
@@ -223,6 +229,21 @@
Other Deliverables
+
+ MiniApp Addressing
+
+
+
+ This document defines a MiniApp URI Deep Link solution that will work across various MiniApp platforms, with reference to existing URI standard work in W3C and related standard bodies.
+
- To advance to Proposed Recommendation, each specification must have
- two independent implementations of all defined features.
+ To advance to Proposed Recommendation, each specification must have two independent implementations of all defined features.
- 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
- maximising 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.
@@ -382,8 +407,8 @@
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
@@ -407,18 +432,12 @@
The MiniApps Ecosystem Community Group will provide the seed specifications to begin the standards process. In addition, the MiniApps Working Group plans to partner closely with the MiniApps Ecosystem Community Group to incubate new features - in particular, incubation of features that are out of current scope for the working group will happen in the Community Group, and then be followed by future WG rechartering to include them in scope.
- The Decentralized Identifier Working Group works on the DID URI scheme, which may contain text the MiniApp URI Scheme specification can learn from or reuse.
-
- The Web Application Security Working Group is developing guidance on APIs that expose sensitive information, and an API to manage permissions, both of which matter to this group's specifications.
+ The Web Application Security Working Group is developing an API to manage permissions, which is related to this group's specifications, such as the permission information in the manifest.
The Web Performance Working Group develops the Page Visibility specification, whose features are related to those in the MiniApp Lifecycle specification.
+ The Service Workers Working Group develops the Service Workers specification, whose features are related to those in the MiniApp Lifecycle specification.
+
+ The CSS Working Group develops mechanisms for adding style to components in Web applications, which is related to the potential UI component standardization in the group.
+
- The WHATWG maintains the URL Living Standard, which some of the
- specifications in this WG’s scope extend.
+ The WHATWG maintains the HTML and DOM Standards, which are related to
+ the UI components work in this WG.
@@ -519,14 +550,15 @@
Information about the group (for example, details about deliverables,
issues, actions, status, participants) is available from the MiniApps Working Group home page.
+ "https://www.w3.org/2021/miniapps/">MiniApps Working Group home page.
The Working Group’s Teleconferences focus on discussion of particular
- specifications, and are conducted on an as-needed basis.
+ specifications, and are conducted on an as-needed basis. The minimum time
+ required for notice of an ad-hoc teleconference should be 3 working days.
- This group primarily conducts its technical work on the public-miniapps-wg@w3.org and on GitHub issues. Other communication tools are allowed if considerable number of the group participants decide to embrace them. The public is invited to review, discuss and contribute to this work.
+ This group primarily conducts its technical work on the public-miniapps-wg@w3.org and on GitHub issues. Other communication tools are allowed if 80% of the group participants decide to embrace them. Any decision to use other communication tools must be reevaluated if further W3C Members join the Working Group. The public is invited to review, discuss and contribute to this work.
The group uses a Member-confidential mailing list for administrative
@@ -584,7 +616,7 @@
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
@@ -643,17 +675,21 @@
- This specification defines the MiniApp lifecycle events and the process to manage MiniApp and each page's lifecycle.
+ 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.
- 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.
+ This specification defines the standardized MiniApp package structure and its construction method. The MiniApp package file includes all the application assets such as document templates, components, stylesheets, scripts, internationalization resources, security resources, and the manifest file. The MiniApps Working Group aims at defining a MiniApp package format to be processed by various runtime environment.
- This specification defines the standardized MiniApp package structure.
+ 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.
+ This document defines a MiniApp URI Deep Link solution that will work across various MiniApp platforms, with reference to existing URI standard work in W3C and related standard bodies.
+
+Moved to https://github.com/w3c/miniapp-lifecycle/blob/main/docs/explainer.md
\ No newline at end of file
diff --git a/specs/lifecycle/images/lifecycle.png b/specs/lifecycle/images/lifecycle.png
deleted file mode 100644
index 951c352..0000000
Binary files a/specs/lifecycle/images/lifecycle.png and /dev/null differ
diff --git a/specs/lifecycle/index.html b/specs/lifecycle/index.html
index f2b3a52..7fe3d83 100644
--- a/specs/lifecycle/index.html
+++ b/specs/lifecycle/index.html
@@ -1,404 +1 @@
-
-
-
-
-
- MiniApp Lifecycle
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This specification defines the MiniApp lifecycle events and the process to manage MiniApp and each page's lifecycle. Implementing this specification enables the user agent to manage the lifecycle events of both global application lifecycle and page lifecycle.
-
- Application lifecycle mechanism provides a means to manage the lifecycle events of both global application lifecycle and page lifecycle. Developing MiniApp with knowledge of the application’s and page’s lifecycle state can lead to improved user experiences. MiniApp lifecycle includes a set of events, with which MiniApp can choose to alter its behavior based on its state.
-
This spec defines what the lifecycle of a MiniApp global aplication is and adds definition to enable MiniApp to respond to four important lifecycle events commonly performed by MiniApp:
-
本规范规定MiniApp全局生命周期的定义,以及MiniApp重要的四个生命周期事件:
-
-
-
MiniApp initialization
-
MiniApp初始化
-
-
-
MiniApp running in foreground
-
MiniApp前台运行
-
-
-
MiniApp running in background
-
MiniApp后台运行
-
-
-
MiniApp error
-
MiniApp错误
-
-
-
-
For each MiniApp, after initialized, it will be either running in the foreground or in the background.
-
对每一个MiniApp,在初始化后,它会运行在前台或后台。
-
-
When user chooses to close the MiniApp by clicking the close button on MiniApp, or go to the mobile phone’s home screen, the MiniApp will not be destroyed immediately, but switch to be running in the background.
When user reopens the same MiniApp, MiniApp will switch from running in the background to the foreground.
-
当用户再次打开同一个MiniApp时,MiniApp会从后台切换为前台运行。
-
-
Only when MiniApp runs in the background for more than a specific time duration (e.g., 5 minutes), or occupies too much system resources in the background, the MiniApp will be destroyed.
This spec formalizes four lifecycle states to support the above:
-
本规范定义了四个生命周期状态来支持以上的功能:
-
-
-
-
Launched: lifecycle state for MiniApp initialization. This means that the MiniApp initialization is completed, and it is triggered only once. Through this event, developer can obtain the information of the MiniApp, such as URI, source info, etc.
-
Shown: lifecycle state for MiniApp running in foreground. It is triggered once the MiniApp launch is completed, or once the MiniApp switches to be running in foreground from background.
-
onShow(object: Object): to monitor the callback of MiniApp foreground display.
-
onShow(object: Object):监测MiniApp前台显示的回调
-
-
-
Definition of object is same as the onLaunch(object: Object)
-
定义与onLaunch(object: Object)相同
-
-
-
-
-
- onHide(): to monitor the callback of MiniApp switching to be running in the background.
-
-
- onHide():监测MiniApp转为后台运行的回调
-
-
-
-
- onError(error: String): to monitor the callback of MiniApp error.
-
-
- onError(error: String):监测MiniApp错误的回调
-
-
-
-
-
-
-
-
MiniApp Page Lifecycle
-
-
MiniApp Page Lifecycle States
-
-
This spec defines what the lifecycle of a MiniApp page is and adds definition to enable MiniApp to respond to five important page lifecycle events commonly performed by MiniApp:
-
本规范规定MiniApp页面生命周期的定义,以及MiniApp重要的五个页面生命周期事件:
-
-
-
MiniApp page loading
-
MiniApp页面加载
-
-
-
MiniApp page first rendering ready
-
MiniApp页面首次渲染完成
-
-
-
MiniApp page running in foreground
-
MiniApp页面前台运行
-
-
-
MiniApp page running in background
-
MiniApp页面后台运行
-
-
-
MiniApp page unloading
-
MiniApp页面关闭
-
-
-
-
The following figure illustrates the MiniApp page lifecycle.
-
下图描述了MiniApp页面生命周期过程。
-
-
-
- MiniApp page lifecycle illustration
-
-
-
-
-
When user firstly opens a MiniApp, the RenderView and Worker will simultaneously start the initialization.
-
当用户第一次打开一个MiniApp时,RenderView与Worker同时启动初始化。
-
-
-
After Worker is initialized, it runs MiniApp global lifecycle event app.onLaunch and app.onShow to create the MiniApp instance.
Afterwards, user can interact with MiniApp. RenderView can be triggered to deliver user event to Worker for further processing, then Workers returns result data to RenderView for re-render.
- If MiniApp page switch to be running in the background, Worker runs MiniApp page lifecycle event page.onHide keep alive. If MiniApp page switch to foreground, Worker runs MiniApp page lifecycle event page.onShow.
-
This spec formalizes five page lifecycle states to support the above:
-
本规范定义了五个页面生命周期状态来支持以上的功能:
-
-
-
Loaded: lifecycle state for MiniApp page loading. This means that MiniApp page loading is completed. At this moment, Worker has obtained initialization data. Developers can obtain the path of current MiniApp page as well as the path’s query. Also, at this moment, the system event can be monitored.
Ready: lifecycle state for MiniApp page’s first rendering. It is triggered once the MiniApp page first rendering is completed. At this moment, the page UI can be configured.
Shown: lifecycle state for MiniApp page display. It is triggered once the page switches to be running in foreground from background. At this moment, developers can update data and refresh page.
Hidden: lifecycle state for MiniApp page running in background. It is triggered once the MiniApp page switches to be running from foreground to background.
-
Hidden:MiniApp页面后台运行的生命周期状态。在MiniApp从前台转为后台运行时触发。
-
-
-
Unloaded: lifecycle state for MiniApp page destroying. It is triggered once the MiniApp page is destroyed. At this moment, the registered monitoring event is destroyed.
MiniApp page lifecycle involves the following API:
-
MiniApp页面生命周期包含如下API:
-
-
-
onLoad(query: Object): to monitor the callback of MiniApp page loading.
-
onLoad(query: Object):监测MiniApp页面加载的回调
-
-
-
query: inputted query for current MiniApp page
-
query:当前MiniApp的输入query
-
-
-
-
-
onShow(): to monitor the callback of MiniApp page display.
-
onShow():监测MiniApp页面显示的回调
-
-
-
onReady(): to monitor the callback of MiniApp page’s first rendering.
-
onReady():监测MiniApp首次渲染的回调
-
-
-
onHide(): to monitor the callback of MiniApp page switching to be running in the background.
-
onHide():监测MiniApp转为后台运行的回调
-
-
-
onUnload(): to monitor the callback of destroying MiniApp page.
-
onUnload():监测MiniApp页面销毁的回调
-
-
-
-
-
-
-
- Privacy and Security
- 隐私与安全
-
-
-
- onShow and onHide event enables developers to know when a MiniApp is visible. By use of onShow event, developers can choose to process and hide the sensitive data, before MiniApp page switches to be running in foreground; the onUnload event provides a notification that the page is being unloaded.
-
-
-
-
-
+
diff --git a/specs/local.css b/specs/local.css
index 51c8ad4..185e581 100644
--- a/specs/local.css
+++ b/specs/local.css
@@ -16,9 +16,7 @@ h2 {
margin-bottom: 0em;
}
-.head h2,
-#abstract h2,
-#sotd h2 {
+:is(.head, #abstract, #sotd) h2 {
margin-top: 0;
}
diff --git a/specs/manifest/docs/explainer.md b/specs/manifest/docs/explainer.md
index 9c4af5a..e1391e2 100644
--- a/specs/manifest/docs/explainer.md
+++ b/specs/manifest/docs/explainer.md
@@ -1,134 +1 @@
-# MiniApp Manifest explainer
-
-> Note: This document serves as a supplementary explanation of the [MiniApp Manifest](https://github.com/w3c/miniapp/tree/gh-pages/specs/manifest/) spec. If there is any inconsistency with the spec, you should consider the spec to be authoritative.
-
-## Authors
-
-Shouren Lan, Zhiqiang Yu, Xiaofeng zhang, Yongjing Zhang
-
-## 1. Introduction
-
-### What is this?
-
-MiniApp Manifest defines a JSON-based profile file that provides developers with a centralized place to put essential information associated with a MiniApp ([What is MiniApp?](https://w3c.github.io/miniapp/white-paper/#what-is-miniapp)). In fact, every MiniApp must have a manifest file which describes essential information about MiniApp to build tools, host platform, users, and app market.
-
-### Why should we care?
-
-Manifest, as the manifest file of MiniApp, includes configuration information that is necessary for application development, release, installation and running, such as desktop display, application ID, version management, version upgrade, permission statement and UX configuration, etc.
-
-## 2. Manifest Design
-
-To ensure the overall design requirements of [MiniApp Packaging](https://w3c.github.io/miniapp/specs/packaging/), [MiniApp Widget](https://w3c.github.io/miniapp/specs/widget-req/), and [MiniApp URI Scheme](https://w3c.github.io/miniapp/specs/uri/) are met, the manifest file of MiniApp should contain basic information of the application, page routing scope, window configuration information and widget configuration information, etc.
-
-### Key Considerations
-
-#### Why is the basic metadata needed?
-
-* Home screen display: Show the name and icon of the application to users by `appName` and `icon`.
-* Locales: Set different languages and text directions to meet the localization requirement by `lang` and `dir`.
-* Version management: Show version information of MiniApp, control application and device compatibility to users by `versionName`.
-* Version upgrade: Provide maintainability and security of MiniApp by `versionCode`.
-* Permission statement: Declare the necessary permissions required for running MiniApp, such as geolocation, storage, camera, etc.
-
-#### Why are `pages` and `window` needed?
-
-* The [pages](https://w3c.github.io/miniapp/specs/manifest/#pages) array needs to cover all the pages included in the MiniApp and specify a reasonable page jump range and home page settings.
-* The [window](https://w3c.github.io/miniapp/specs/manifest/#window) object needs to cover the basic elements of the MiniApp window, such as the status bar, navigation bar, title and window style, etc.
-
-#### Why is `widgets` needed?
-
-Widgets can be embedded in various local applications, and directly display the content that the user is most concerned about in an interactive way to better meet the user's requirements.
-
-## 3. Sample
-
-So far only a basic subset of MiniApp Manifest is specified. It will be gradually updated and supplemented according to the demands of different scenarios.
-
-```json
-{
- "dir": "ltr",
- "lang": "en-US",
- "appID": "org.example.miniApp1",
- "appName": "My MiniApp Demo",
- "shortName": "Demo X",
- "versionName": "1.0.0",
- "versionCode": 1,
- "description": "A Simple MiniApp Demo",
- "icons": [
- {
- "src": "common/icon/icon.png",
- "sizes": "48x48"
- }
- ],
- "minPlatformVersion": "1.0.0",
- "pages": [
- "pages/index/index",
- "pages/detail/detail"
- ],
- "window": {
- "navigationBarTextStyle": "black",
- "navigationBarTitleText": "Demo",
- "navigationBarBackgroundColor": "#f8f8f8",
- "backgroundColor": "#ffffff",
- "fullscreen": false
- },
- "widgets": [
- {
- "name": "widget",
- "path": "widgets/index/index",
- "minPlatformVersion": "1.0.0"
- }
- ]
-}
-```
-
-## 4. Relationship with Web App Manifest
-The MiniApp manifest is developed in the way that it covers the most common practices in the target ecosystems like 'Mini Program' [[1]](https://smartprogram.baidu.com/developer/index.html)[[2]](https://open.alipay.com/channel/miniIndex.htm)[[3]](https://mp.weixin.qq.com/cgi-bin/wx) and [Quick App](https://www.quickapp.cn/), while trying to be aligned (compatible) as much as possible with other ongoing web standard development i.e. [Web App Manifest](https://www.w3.org/TR/appmanifest/). Therefore common elements (e.g. `dir`, `lang`) or counterparts (e.g. `shortName` vs. `short_name`) can be found in both manifest specifications. A detailed comparison given in [Appendix A](#a-miniapp-manifest-comparison-with-web-app-manifest).
-
-On the other hand, MiniApp manifest has different assumptions on the hosting platforms and the form of application from those of Web App Manifest, so there are aspects that are not matched:
-1. **Platform difference:** MiniApp needs to cover the cases that the application hosting platforms are not based on the web/browser, such as a native OS or a hosting application running on top of the OS. The software architecture is more like a native application rather than a web application (although it leverages some web technologies). Therefore, a MiniApp manifest needs to manage the compatibility more strictly between its application version and the platform version than that in the web environment. Member attributes such as `versionName`, `versionCode` and `minPlatformVersion` are specified for that purpose, but are not necessary for a web application. And strict permission management by the `reqPermissions` attribute is also needed to control the access to local resources (sensitive data and functions) via the hosting platform.
-2. **Application form difference:** A MiniApp typically consists of a set of pages and/or widgets. A MiniApp page/widget is similar to a web page in the sense of developing techniques (e.g. JS, CSS), but is different in many other ways like the life-cycle, the layout, components and system APIs. More importantly, these pages/widgets are organically composed views/activities of the MiniApp rather than independent web pages. The MiniApp manifest needs to provide means to organize and configure them into a common look and feel (e.g. navigation bar, scrolling behavior, width adaptation) by the attributes like `window`, `pages` and `widgets`.
-
-As both work are still under development, it worths further evaluating the possibilities of alignment from each side. From MiniApp perspective, further study could be investigating the usability of some unmapped member attributes (such as `categories`, `screenshots`) of Web App Manifest in the context of MiniApp.
-
-
-
-## A. MiniApp Manifest comparison with Web App Manifest
-The following table mainly describes the comparison between the manifest attributes in Mini App and Web App. "-" in the table means that there is no such attribute in the corresponding manifest.
-
-[Mini App Manifest](https://w3c.github.io/miniapp/specs/manifest/)| [Web App Manifest](https://www.w3.org/TR/appmanifest/) | Comparison
-:--- |:-- |:---
-dir | dir | Same
-lang | lang | Same
-appID |- | MiniApp only
-appName |name | Same
-shortName |short_name| Same
-description |description| Same
-icons |icons | Same
-versionName |- | MiniApp only
-versionCode |- | MiniApp only
-minPlatformVersion |- |MiniApp only
-pages |scope | Similar. `pages` lists the local URIs to the app pages of a MiniApp while the `scope` in Web App can vary from a local URL to a remote URL.
-pages.[0] |start_url | Different but comparable. The first element of `pages` represents the starting page in MiniApp instead of an explicit URL.
-window |- | MiniApp only. `window` contains a set of attributes for the default configuration of MiniApp pages and widgets. Most of them are unique to MiniApp except for a few that are mappable to Web App Manifest.(See below.)
-window.backgroundColor |background_color |Similar. MiniApp accepts only RGB hex value for now.
-window.orientation |orientation |Same
-window.fullscreen |display=fullscreen |Same but in different formation (boolean vs enum).
-widgets |- |MiniApp only
-reqPermissions |- |MiniApp only
-\- |theme_color |Web App only. (For further study in MiniApp)
-\- |iarc_rating_id | Web App only. (For further study in MiniApp)
-\- |related_applications | Web App only (For further study in MiniApp)
-\- |prefer_related_applications | Web App only (For further study in MiniApp)
-\- |categories | Web App only. (For further study in MiniApp)
-\- |screenshots | Web App only. (For further study in MiniApp)
-\- |shortcuts | Web App only (For further study in MiniApp)
-
-## References & acknowledgements
-
-In the process of writing the MiniApp Manifest specification, many people have given valuable comments, thank you all.
-
-The following name list will be continuously updated, in the order of alphabetical.
-
-* Chun Wang
-* Changjun Yang
-* ...
+Moved to https://github.com/w3c/miniapp-manifest/blob/main/docs/explainer.md
\ No newline at end of file
diff --git a/specs/manifest/index.html b/specs/manifest/index.html
index 4bcaef0..395c1f7 100644
--- a/specs/manifest/index.html
+++ b/specs/manifest/index.html
@@ -1,1069 +1 @@
-
-
-
-
-
- MiniApp Manifest
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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.
-
- Note: At present, only a basic subset of MiniApp Manifest is specified, and it will be gradually updated and supplemented based on different scenario requirements.
-
- 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
- 否
-
-
- 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
-
- No
- 否
-
-
Required permissions
- 所需权限
-
-
-
-
-
-
-
-
-
- Dictionary
- 字段
-
-
-
- dir
- 方向
-
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- description provides a brief description for MiniApp.
-
-
- description,为MiniApp提供简短的描述。
-
-
-
-
-
- icons
- 图标
-
-
- 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 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的图标图片所适用的分辨率大小
-
-
-
-
-
-
-
-
-
-
-
-
- versionName
- 版本名称
-
-
- 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.
-
- 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.
-
- 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".
-
- 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.
-
- window contains sub-attributes used for styling the status bar, navigation bar, title, window background color, etc., as shown in the following table:
-
-
- 用于设置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。
-
- 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.
-
-
-
-
-
-
- widgets
- 卡片
-
-
- 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:
-
- 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.
-
- 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.
-
- As a key part of a MiniApp package, the manifest.json file describes several important aspects of the MiniApp by referring to the resources inside the MiniApp package in different forms of files, such as the page files in the pages directory and the icon images in the common directory. Details are specified in the MiniApp Packaging specification.
-
- The normal operation of a MiniApp relies on the proper configuration of the manifest file according to this specification and the availability of the dependent resources in the MiniApp package. Such dependency needs to be checked during both the development phase and deployment phase.
-
- As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
-
-
- 本规范中的所有内容均为本草案的规范性内容,但明确标记为“非规范性”的部分、示例和注释除外。
-
-
-
- The key word RECOMMENDED in this document
- is to be interpreted as described in
- BCP 14
- [[RFC2119]] [[RFC8174]]
- when, and only when, they appear in all capitals, as shown here.
-
- As the manifest is a JSON file and will commonly be encoded using [[UNICODE]], the security considerations described in [[ECMA-404]] and [[UTR36]] apply. In order to prevent developers from including custom/unrestrained data in a manifest, implementors may use a more strict schema than that defined in JSON Schema to impose their own implementation-specific limits on the member names, types and value ranges, e.g. to guard against memory overflow, or to meet platform-specific limitations.
-
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.
- 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.
-
The integrity of the manifest document is protected by a cryptographic hash mechanism as part of the whole MiniApp package. Details are specified in the MiniApp Packaging specification.
- 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.
-
-
-
-
+
diff --git a/specs/packaging/docs/explainer.md b/specs/packaging/docs/explainer.md
index db356c6..6266dff 100644
--- a/specs/packaging/docs/explainer.md
+++ b/specs/packaging/docs/explainer.md
@@ -1,87 +1 @@
-# MiniApp Package explainer
-
-> Note: This document serves as a supplementary explanation of the [MiniApp Packaging](https://w3c.github.io/miniapp/specs/packaging/) spec. If there is any inconsistency with the spec, you should consider the spec to be authoritative.
-
-## Authors
-
-Yongjing Zhang (Huawei)
-
-## 1. Introduction
-
-### What is this?
-
-A MiniApp Package is a [ZIP](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT)-based container file that wraps a set of files (JS code, components, resources, configurations, styles) comprising the whole MiniApp.
-It can be delivered to a hosting platform through different channels (e.g. web, app store, offline), then rendered/executed by the hosting platform.
-
-### Why should we care?
-
-A MiniApp Package contains all necessary information used by a hosting platform to check, load and execute the MiniApp properly. A standardized format is necessary so that a MiniApp package generated by different developers or tools can be deployed on different hosting platforms (e.g. super-apps, or native-os frameworks) in a compatible and consistent way. The spec shall define the following aspects to ensure interoperability:
-* minimum set of files for a MiniApp to be runnable
-* optional files for enhanced features
-* a well-defined file and directory structure
-* pre-defined file names and naming convention
-* parsing and validity check mechanism
-* the overall file format (and extension name) of the package
-* the corresponding MIME type for internet exchange
-
-## 2. MiniApp Package Design
-### The Package File Format
-Following the common practice of mobile app packaging (such as Android APK), MiniApp package is designed as a specialized ZIP file, which has its own file extension name (`.ma` - tbd) and a dedicated MIME type (`application/miniapp-pkg+zip` - to be registered with IANA).
-
-It can be viewed as normal `.zip` file in some cases (a ZIP parser may open and read the MiniApp package without knowing the MiniApp Packaging spec). However, having the dedicated file extension name and MINE Type gives a way for a hosting platform or a package loader to do pre-checking or content-type negotiation before actually loading/downloading the package.
-
-### The Package Content
-To comprise a executable MiniApp, a MiniApp package needs to support the following content (in the form of internal directories and files):
-* **manifest.json**: A JSON-based file responsible for the global configuration of the MiniApp. (See [MiniApp Manifest](https://w3c.github.io/miniapp/specs/manifest/))
-* **app.js**: The main application logic and responsible to the life-cycle management (see [MiniApp Lifecycle](https://w3c.github.io/miniapp/specs/lifecycle/))
-* **app.css**: The global/default application style.
-* **pages**: A directory contains all page-related resources, and may have sub-directories to group different pages. Each page may have the following associated files:
- * ***.js**: The page scripts (app logic of the page)
- * ***.xml**: The page layout (whether it's in XML format is under discussion)
- * ***.json**: The page-specific configuration (under discussion)
- * ***.css**: The page-specific style
-* **common**: A directory contains common resources (images, scripts, UI components, templates) that can be (re)used by one or multiple pages/widgets. It may have sub-directories to group resources. (Details are for further study.)
-
-> Note: As the MiniApp Packaging spec is still under development, the content listed above is not complete yet and subject to further change.
-
-### Security Considerations
-To ensure the integrity and trustworthiness, a MiniApp package SHOULD be protected by one or more digital signatures by the author (e.g. the MiniApp developer) and the distributors (e.g. an application store) along with certificates issued by trusted authorities. (see more in the [spec](https://w3c.github.io/miniapp/specs/packaging/#security-privacy-considerations))
-
-Proven technologies such as [RFC5652](https://tools.ietf.org/html/rfc5652) (i.e. PKCS#7) can be leveraged, and the binary package archive format needs enhancement by insert the "signing block" (similar to [APK Signature Scheme v2](https://source.android.com/security/apksigning/v2)) in the basic ZIP file.
-
-The detailed solution is under development.
-
-
-## 3. Sample
-
-One typical illustrative example of a MiniApp package is given in the [spec](https://w3c.github.io/miniapp/specs/packaging/#example-1).
-
-## 4. Comparison with Other Packaging Technologies
-
-There are already some other packaging technologies specified for different purposes, such as [Widgets (obsolete)](https://www.w3.org/TR/widgets), [WICG WebPackage (WPACK)](https://github.com/WICG/webpackage) and its [obsolete version](https://www.w3.org/TR/2015/WD-web-packaging-20150115/), and [Lightweight Packaging Format (LPF)](https://www.w3.org/TR/lpf/). They are designed based on different archive formats (e.g. ZIP, CBOR), use different signature mechanisms (e.g. [XMLDSIG](http://www.w3.org/TR/xmldsig-core1/)-based, HTTP-based) and contain different types of contents (e.g. web pages, http exchanges, digital publications). Such differences result from the diversity of the environment assumptions and the technical requirements of individual technologies.
-
-The MiniApp package also has its unique assumptions and requirements that cannot be addressed directly by existing technologies. It's essentially a mobile application package designed to pack all required application materials (e.g. pages, layouts, UI components, resources, scripts and configurations) to be deployed and executed by various application hosting platforms (such as "Mini Program" [[1]](https://smartprogram.baidu.com/developer/index.html)[[2]](https://open.alipay.com/channel/miniIndex.htm)[[3]](https://mp.weixin.qq.com/cgi-bin/wx) and [Quick App](https://www.quickapp.cn/)), rather than to pack web contents or digital publications to be loaded by browsers or e-book readers. The following analysis summarizes the main reasons why **existing packaging technologies cannot meet the needs of MiniApp packaging**:
-
-1. **[WPACK](https://github.com/WICG/webpackage):** It's intended to pack a collection of web resources in terms of HTTP exchanges (including HTTP requests, responses, signatures and other metadata), so that a browser can load them locally and recover the web transaction states securely without accessing the origin. To achieve this, a HTTP-specific signature mechanism is defined which is apparently not suitable for MiniApp that doesn't rely on HTTP exchanges. Moreover, WPACK proposes to define a new CBOR-based archive format instead of using ZIP for web-specific [reasons](https://github.com/WICG/webpackage/issues/45) that don't apply to MiniApp. For instance, ZIP resources are file-based so that are not efficient for HTTP response headers in WPACK, but can serve MiniApp very well and are already used widely in mobile application packaging implementations (e.g. Android APK, QuickApp, MiniProgram).
-2. **[Web Package (obsolete)](https://www.w3.org/TR/2015/WD-web-packaging-20150115/):** It's an unfinished work as the ancestor of WPACK. It choses not to use ZIP but define a new Streamable Package Format for its specific reasons that are not seen by MiniApp. Again it's designed as closely coupled with HTTP (headers) which is not suitable for MiniApp.
-3. **[Widgets (obsolete)](https://www.w3.org/TR/widgets):** It's an old implementation of Packaged Web Apps called Widgets. It's ZIP-based but has its specific constraints on file/folder structure and naming, and it uses XML-based configuration document. These constraints are not compatible with MiniApp. In addition, it uses [XMLDSIG](http://www.w3.org/TR/xmldsig-core1/) for the digital signature, which can only protect the files that are signed but not the entire package file itself. One can add/remove signature files, add other files or blocks into the ZIP package, or alter the ZIP metadata without being noticed. Such vulnerability is not acceptable by MiniApp.
-4. **[LPF](https://www.w3.org/TR/lpf/):** It's a lightweight ZIP-based packaging format which contains digital publication materials. It mandates publication-specific files (i.e. `publication.json`, `index.html`) that are not needed by a MiniApp, while misses files required for a MiniApp (e.g. `manifest.json`, `app.js`). And it has not cover the security concerns (e.g. integrity protection of the whole package) that a MiniApp should address.
-
-A detailed comparison between MiniApp package and other packaging technologies is give in the following table:
-
-
-Technology | Client Platform | Content | Web Dependency | Format | Digital Signature
-:--- |:--- |:-- |:--- |:--- |:--
-MiniApp | Super-App, OS, or Browser* | Application-resources (e.g. app logics, page layouts, UI components – not necessarily h5-based) | No (may or may not use web resources) | ZIP-based | PKCS#7*
-WPACK | Browser | Web content (HTTP exchanges) | Yes (a web origin is always assumed, even offline) | CBOR-based | HTTP header extension
-WebPackage (old) | Browser | Web content | Yes (a web origin is always assumed, even offline) | Streamable Package Format (.pack) | n/a
-Widgets | Browser, OS | Widget files (html start files, XML configuration, icons ...) | No (may or may not use web resources) | ZIP-based | XMLDSIG-based
-LPF | e-Readers | Digital publications, configuration | No | ZIP-based | unknown*
-
->Note: `*` in the table above denotes the feature that is under discussion/development.
-
-To summarize, although MiniApp leverages popular web front-end technologies like JS, CSS, it’s more like a native-app rather than a snapshot of a web-content collection. Existing web packaging technologies cannot cover the requirements of MiniApp, therefore a dedicated MiniApp Packaging specification needs to be developed.
-
-
-
-
+Moved to https://github.com/w3c/miniapp-packaging/blob/main/docs/explainer.md
\ No newline at end of file
diff --git a/specs/packaging/index.html b/specs/packaging/index.html
index a0b909a..1603ee7 100644
--- a/specs/packaging/index.html
+++ b/specs/packaging/index.html
@@ -1,219 +1 @@
-
-
-
-
-
- MiniApp Packaging
-
-
-
-
-
-
-
-
-
-
-
- This specification defines the standardized MiniApp packaging construction method, which provides a standard package structure description. The MiniApp package file packages all the static page templates / CSS / JavaScript files and the manifest file. The MiniApp package file can be used in any runtime environment (user agent).
-
- The Miniapp package file contains a manifest document (located in the root directory of the package). The manifest file includes an overview of the MiniApp, including page description and page path. The package file contains JavaScript code, one or more page files, including template code of page(s), CSS code for page style and JavaScript code for page logic. The MiniApp package file should support digital signature verification.
-
- The MiniApp runtime environment (user agent) can identify MiniApp package files through standard package format and MIME media type. After fetching the MiniApp package file, all static page templates / CSS / JavaScript files are cached on the device through a standardized dereference step. These cached package resources are available until the next update without fetching the MiniApp package file again. In terms of launch mode, the MiniApp can be launched normally without network. The runtime environment (user agent) locates the specified startup page from the package cache path and starts the MiniApp according to the description of the manifest file.
-
Each MiniApp package is wrapped as a [[ZIP]] file. It contains, at the root level, a global configuration file (manifest.json) to describe and configure the whole MiniApp, an application logic file (app.js), and a default style file (app.css).
-
-
-
The MiniApp package also contains multiple page related files in the pages directory, and other common resource files in the common directory
-
-
One typical illustrative example of a MiniApp package is the following:
- The MiniApp package contains at the root level the global data and lifecycle management of the MiniApp in the form of the following files:
-
-
-
-
manifest.json is responsible for the global configuration of the MiniApp, such as the file paths of MiniApp pages and the window configuration (e.g. navigator bar, background image and color, page title, etc.). Details are specified in the Manifest specification
-
app.css is responsible for the global CSS style for all MiniApp pages.
-
app.js is responsible for the service logic of the MiniApp as well as the lifecycle management of it, such as launching, showing and hiding the MiniApp.
-
-
-
-
pages
-
- The pages directory contains sets of files for the display and user interaction of all MiniApp pages. Each set of files that shares the same base file name (e.g. 'page1') with different extension names describe a particular page on different aspects, such as the service logic (e.g. page1.js), the configuration (e.g. page1.json), the structure (e.g. page1.xml) and the style (e.g page1.css). Developers can choose to put all page files directly under the pages directory in a flat manner, or organize them in different sub-directories for different pages.
-
-
-
-
A .json file is responsible for the configuration of a MiniApp page.
-
A .xml file is responsible for the structure of a MiniApp page, similar to HTML.
-
A .css file is responsible for the CSS style of a MiniApp page.
-
A .js file is responsible for the service logic and lifecycle management (defined in MiniApp Lifecycle) of a MiniApp page.
-
-
-
-
-
common
-
The common directory contains common resources such as components, multimedia resources, and utils (js files). Developers can choose to put all resource files directly under the common directory in a flat manner, or organize them in different sub-directories as needed.
-
-
-
-
i18n
-
- The i18n directory contains multi-language configuration files to support internationalization. The name of each .json file in this directory follows the Language-Tag as defined in [[BCP47]], and represents the specific configuration for that particular language.
-
- Note:
- The detailed format of the .json file is to be further developed.
-
-
-
-
-
-
-
Security & Privacy Considerations
-
-
-
Integrity & Trustworthiness
-
- To ensure the integrity and trustworthiness, a MiniApp package SHOULD be protected by one or more digital signatures by the author (e.g. the MiniApp developer) and/or distributors (e.g. an application store) along with certificates issued by trusted authorities.
-
A digital signature (with a valid certificate) by the author ensures the origin of the MiniApp, so that an end user or a hosting platform can decide whether to install the MiniApp package according to the knowledge about the author (e.g. credits, blocklist, quality).
-
A digital signature (with a valid certificate) by a distributor ensures the integrity of the package and trustworthiness of the delivery channel, so that the end user can be protected from tampered software and can benefit from a healthier ecosystem.
-
-
-
- Proven technologies such as [[RFC5652]] (i.e. PKCS#7) can be used as the solution of the digital signatures for MiniApp package. Further evaluation is expected regarding whether it needs to be standardized in detail (e.g. the content scope under protection, additional attributes of concern, file format of the signature block, procedures), or is left to the discretion of implementations.
-
-
-
-
-
Confidentiality
-
- There is no requirement to develop a standardized encryption mechanism for the MiniApp package to protect its confidentiality. However, it doesn't preclude an implementation from deploying some encryption mechanism for special purpose.
-
-
-
-
-
-
-
-
IANA Considerations
-
- The proposed MIME type for the MiniApp package is application/miniapp-pkg+zip following the +zip Structured Syntax Suffix defined in [[RFC6839]]. It needs to be registered with IANA when this work moves to a normative phase. There is no specific fragment identifier consideration for now.
-
- Note:
- A temporary solution could be application/x-w3c-miniapp-pkg+zip for the sake of any early implementation.
-
-
-
-
-
-
-
+
diff --git a/specs/script.js b/specs/script.js
index 0ebd0bd..13bd47f 100644
--- a/specs/script.js
+++ b/specs/script.js
@@ -5,8 +5,8 @@ void function() {
var L10N = {
'en': {
selector: {
- '#abstract-1': 'Abstract',
- '#h-sotd': 'Status of This Document',
+ '#abstract > h2': 'Abstract',
+ '#sotd > h2': 'Status of This Document',
'#table-of-contents': 'Table of Contents',
'.note-title': 'Note',
},
@@ -22,22 +22,27 @@ void function() {
'zh-hans': {
selector: {
- '#abstract-1': '摘要',
- '#h-sotd': '关于本文档',
+ '#abstract > h2': '摘要',
+ '#sotd > h2': '关于本文档',
'#table-of-contents': '内容大纲',
'.note-title': '注',
},
'fig': '图',
+ 'summary': '关于此文档',
+
dt: {
'This version:': '本版本:',
+ 'History:': '历史:',
+ 'Previous version:': '上一版:',
'Latest published version:': '最新发布草稿:',
'Latest editor\'s draft:': '最新编辑草稿:',
'Editors:': '编辑:',
- 'Bug tracker:': '错误跟踪:',
- 'GitHub:': 'GitHub:',
- },
+ 'Former editors:': '原编辑:',
+ 'Participate:': '协助参与:',
+ 'Feedback:': '反馈:',
+ },
dd: {
'Bug tracker:': '反馈错误(修正中的错误)',
@@ -98,18 +103,29 @@ void function() {
.forEach(function(s) {
$$(s)
.forEach(function($elmt) {
- Object.assign($elmt, { textContent: l10n.selector[s] })
+ Object.assign($elmt, { textContent: l10n.selector[s] })
})
})
$$('figcaption, .fig-ref')
.forEach(function($elmt) {
- Object.assign($elmt.firstChild, { textContent: l10n['fig'] })
- })
+ Object.assign($elmt.firstChild, { textContent: l10n['fig'] })
+ })
+
+ $$('body > div.head > details > summary')
+ .forEach(function($summary) {
+ var originalText = $summary.dataset.originalText || $summary.textContent.trim()
+ var text = l10n['summary'] || originalText
+
+ if (text) {
+ $summary.textContent = text
+ $summary.dataset.originalText = originalText
+ }
+ })
- $$('h1 + h2 + dl dt')
+ $$('body > div.head > details > dl > dt')
.forEach(function($dt) {
- var originalText = $dt.dataset.originalText || $dt.textContent
+ var originalText = $dt.dataset.originalText || $dt.textContent.trim()
var text = l10n.dt[originalText] || originalText
if (text) {
diff --git a/specs/uri/docs/Q&A.md b/specs/uri/docs/Q&A.md
index ff51728..756b6d9 100644
--- a/specs/uri/docs/Q&A.md
+++ b/specs/uri/docs/Q&A.md
@@ -1,110 +1 @@
-# Questions & Answers
-
-> Note: This document documents Q&A during all discussions about [MiniApp URI Scheme](https://w3c.github.io/miniapp/specs/uri/) spec.
-
-## About syntax-host
-
-### 1. Why does the URI need the `host` field, do we need to download the package from another website?
-
-**Answer:** At present, there is such a demand for MiniApp. For example, the Open Source Alliance of Baidu Smart Program has a scenario that an alliance member user agent downloads MiniApp packages from package server provided by another user agent.
-
-
-
-### 2. In the syntax ["@" host [":" port]], is there any restriction to `host`?
-
-**Answer:** The host field is optional, and the value is parsed by the user agent. The host can be a null value, or it can represent some special package fetching logic, such as local debugging.
-
-
-## About syntax-appId
-
-### 1. The syntax `foo@example.com` represents the username for traditional usage in URL. Is it appropriate to reuse this syntax for appId in MiniApp URIs?(by @hax)
-
-**Answer:** In some URI protocol, the content before `@` does indeed represent username. And those protocals are usually used to locate a specific resource related to a person's identify, such as email or ftp.
-
-But in MiniApp URI, there is no concept of 'user', so we needn't a real username. What's the more , appid as the identity of the MiniApp can correspond to the meaning of username relative to resources.
-
-Therefore, in our opinion, it is appropriate for appId to take the username component.
-
-
-### 2. Traditionally, in an URI like "scheme://foo", `foo` represents the host like HTTP(s) URL, or the path like file URL. But with MiniApp URI, `foo` is not host or path. That means the original correspondence is changed. Is this appropriate? (by @hax)
-
-**Answer:** Unlike regular resources that must be obtained through the network, where to obtain the resources (network or local) is up to the user agent.
-
-For this feature, we have designed the MiniApp URI syntax that the host of the authority can be omitted, but appId, as the unique identifier of the MiniApp cannot be omitted.
-
-The MiniApp URI 'miniapp://foo' which has only appId is similar to the known URN, such as tel: + 1-816-555-0000, isbn: 0451450523.
-
-
-**Opening question:** Judging from the syntax description of [RFC 3986](https://tools.ietf.org/html/rfc3986) specification and known URLs, we did not find the case where authority is required but host is omitted. We want your help to review whether this design complies with RFC 3986 specification.
-
-
-## About syntax-version
-
-### 1. What is the relationship between version in URI and [versionName](https://w3c.github.io/miniapp/specs/manifest/#versionname) / [versionCode](https://w3c.github.io/miniapp/specs/manifest/#versioncode) in manifest? (By @hax)
-
-**Answer:** According to the description in the Maniafest spec, `versionName` is a semantic, optional field that can be used by the user agent or developer to show it to the user; and `versionCode` is a number that is incremented each time the MiniApp is released. Therefore, the version syntax component in the MiniApp URI can be mapped to the `versionCode` in the Manifest proposal.
-
-
-
-## About use cases
-
-### 1. Is `location` in [Example 1](https://w3c.github.io/miniapp/specs/uri/#example-1-use-miniapp-uri-in-a-mini-app-1-miniapp-uri) related to the HTML [Location](https://html.spec.whatwg.org/multipage/history.html#the-location-interface) interface?
-
-**Answer:** There is no association. It is recommended that the user agent provides MiniApp URI analysis results in the runtime environment of the MiniApp.
-
-
-
-## About security
-
-### 1. Does MiniApp URI has security risks? (by @hax)**
-
-**Answer:** The MiniApp URI Scheme may exposes the package address in some situation, which makes someone think that there may be security risk. However, for the time being, the address of the package is not secret information. That can be obtained easily by capturing the accessing, etc. Therefore, expressing the package address in the URI does not increase the security risk.
-
-For other possible security risks, there are more explanation in the "Security and Privacy" section.
-
-For the security of the entire MiniApp, not only does the provider of the package need to guarantee the security of package transmission, caching, and dereferencing, but also the user agent needs to consider the security of the use of each high-level component or API.
-
-
-
-## About accessibility
-
-### 1. What happens when a browser without MiniApp runtime accesses the MiniApp URI?
-**Answer:** If the dereference of the MiniApp URI is not supported, then generally, the browser will let the operating system to identify it. If it cannot be identified, it will not respond or prompt.
-And if the developer hopes that the MiniApp can still be called even if the MiniApp URI is running in an unsupported browser, the developer can use some known methods in the industry, such as the deep link, to call up the designated user agent which can recognize and parse MiniApp URIs.
-
-
-
-
-## About dereference
-
-### 1. Why using the HTTPS protocol to download MiniApp package?
-
-**Answer:** There is no requirement on how to download packages. [This chapter](https://w3c.github.io/miniapp/specs/uri/#https) is only a practical way to describe a user scenario. User agents can also download packages using other protocols, or just obtain MiniApp packages locally.
-
-
-
-### 2. It seems the "dereferencing" process ends up with a standard HTTP(s) URL. Wouldn't using that as is make it more accessible to end-users? This would trip unless you have a runtime (which would be also presumably, be a browser) - it feels like this tripwire mechanism's main motivation is to make the user install the runtime (in which case, what does this runtime provide that the current browser does not?), which I'm not sure is something that I personally would agree with. (by @cynthia)
-
-**Answer:** I understand your question contains two points,
-
-1. Why not directly use the HTTPS protocol as the MiniApp URI?
-
-2. The current MiniApp URI mechanism requires a set of runtimes to parse it. Why is it necessary? What is the difference between that **runtime** and a conventional browser?
-
-For point 1: downloading a package through the network is just one of the ways to get a package. In addition, there are many ways to access a miniapp resource.
-
-
-For example, after accessing the miniapp once, the miniapp package would be stored locally. Or the user agent can preset the miniapp package before the user accesses the URI for performance (as we mentioned in [§ 2.1.6 of the miniapp white paper](https://w3c.github.io/miniapp/white-paper/#performance-and-user-experience
-)). Or when debugging the Miniapp, the developer can directly push the miniapp package to the user agent through a debugging tool.
-
-
-In these cases, the user agent open miniapp locally according to the appId in MiniApp URI without having to request a package server.
-
-In other cases, the user agent can specify its own mapping relationship with "host" component. For example, the "bar" in "miniapp: // foo @ bar" can correspond a domain or a local directory, anyway.
-
-
-In summary, MiniApp URI are designed to locate MiniApp resource cross-platform, regardless of how they are obtained. That cannot be expressed intuitively through HTTPS URLs only. This is why we marked [Chapter 6](https://w3c.github.io/miniapp/specs/uri/#https) non-normative, and just describes it as a user scenario.
-
-For point 2, the runtime make miniapp help fill the gap of the Web and the Native (like we mentioned in [miniapp white paper introduction](https://w3c.github.io/miniapp/white-paper/#what-is-miniapp)). And because the design of the MiniApp is different from traditional web applications (like we mentioned in [miniapp white paper core-features](https://w3c.github.io/miniapp/white-paper/#core-features)). Even if the miniapp packaged is downloaded by a traditional browser, it cannot be opened and run.
-
-And with the necessity of the MiniApp URI demonstrated above, therefore, browsers need to implement MiniApp URI specifications to correctly parse MiniApp URIs and implement MiniApp runtime related specifications (under development) to open and run MiniApps properly.
+Moved to https://github.com/w3c/miniapp-addressing/blob/main/docs/Q%26A.md
\ No newline at end of file
diff --git a/specs/uri/docs/explainer.md b/specs/uri/docs/explainer.md
index a258c7d..9730256 100644
--- a/specs/uri/docs/explainer.md
+++ b/specs/uri/docs/explainer.md
@@ -1,149 +1 @@
-# Minipp URI Scheme explainer
-
-> Note: This document serves as a supplementary explanation of the [MiniApp URI Scheme](https://w3c.github.io/miniapp/specs/uri/) spec. If there is any inconsistency with the spec, you should consider the spec to be authoritative.
-
-## Authors
-
-Dan Zhou, Shuo Wang, Qian Liu, Tengyuan Zhang
-
-## 1. Introduction
-
-### What is this?
-
-MiniApp URI Scheme defines the Uniform Resource Identifier of a MiniApp ([What is MiniApp?](https://w3c.github.io/miniapp/white-paper/#what-is-miniapp)).
-
-Applications including Web applications can use MiniApp URI Scheme to claim the MiniApp resource it's trying to reference.
-
-### Why should we care?
-
-Each MiniApp vendors, i.e. the MiniApp packaging service providers, are now using very different methods to obtain the MiniApp package. Meanwhile, every user agent has their own way to describe a MiniApp resource. This is creating difficulty to visit a MiniApp across platforms.
-
-For example:
-
-
-
-## 2. Goals
-
-The MiniApp URI Scheme specification aims to provide a set of conform syntax rules to concatenate the information of a miniapp, such as id, version, package address, so that the user agents can identify, parse, and obtain the miniapp resource on any platform.
-
-The miniapp URI achieve this goal by the following design:
-
-* Identify the miniapp package resource by its id, host, port and version components. In most cases, through host and IP, a user agent can discover a miniapp package management service, then access a specific miniapp package by providing the unique ID and version of the miniapp.
-* Identify the resource inside miniapp package by its path, query and fragment components. The definition of these three components is close to a HTTP url in browser. How those components can be used relies on other miniapp specs, especially, the [MiniApp Packaging specification](https://w3c.github.io/miniapp/specs/packaging/).
-
-### Key Considerations
-
-#### Why is host and port needed?
-
-If there is no host and port, we'd have to build a unique and centralized miniapp package manager, which is considered difficult and cannot satisfy the demand of the current development of miniapp in China.
-
-In addition, we expect to support a variety of ways to get miniapp packages by URI besides downloading from Internet, such as local files. In this case, the host may not be considered as a domain.
-
-#### Where does id come from?
-
-Only id uniqueness in host is required. May use some algorithm to generate a universally unique id, or there exists some third party miniapp registers. This depends on the host the miniapp belong to.
-
-#### Why is version components needed?
-
-When a user visits a web page, the page content is always up to date. This is the same for miniapp in most cases, so the version in miniapp URI usually is null. But in some cases, a user agent or user needs to access some specific versions of miniapp. So we reserve the version component.
-
-## 3. Non-goals
-
-The following titles are also important but out of the scope of the MiniApp URI Scheme draft report:
-
-1. the identifier of the resource within a miniapp package, which may include path, query, fragment (this may be defined in the [packaging specification](https://w3c.github.io/miniapp/specs/packaging/));
-2. the storage and management of a miniapp package;
-3. how to generate the id of a miniapp package;
-4. the rule to define a version number;
-5. how the Web developers obtain the id and version of a miniapp package;
-6. how to obtain a miniapp package (we just provide a suggested way to obtain the package as [an use case](https://w3c.github.io/miniapp/specs/uri/#https)).
-
-## 4. Key scenarios
-
-### Scenario 1 A link to a miniapp in a web page
-
-
-
-Example code:
-
-```html
-
-
-open a MiniApp
-
-```
-
-Browsers may handle the click action of Link A inconsistently for this Web page.
-
-* If it is running in a web page or MiniApp page or Native App that has a miniapp runtime, the URI can be parsed properly, and it will be retrieved the resource from the *example.com*, then locate the URI path, query, fragment and other information to dereference the corresponding resource.
-* If it is in a web page of or Native App that does not have a miniapp runtime, the platform can parse the URI properly but can not run the miniapp resource. To provide a smooth user experience, it may trigger other user agent to open the miniapp.
-
-### Scenario 2 Use MiniApp URI within a miniapp
-
-Similar to parsing the URLs of each parts of the context for a web page, in MiniApp's runtime context, developers also need to know all the necessary information of the URI corresponding to the current MiniApp page. These information may include,
-
-```javascript
-console.log(location.href); // miniapp://foo;version=1.0.1-trial@example.com:8080/pages/index?k=v#bar
-console.log(location.protocol); // miniapp:
-console.log(location.origin); // miniapp://foo;version=1.0.1-trial@example.com:8080
-console.log(location.id); // foo
-console.log(location.version); // 1.0.1-trial
-console.log(location.host); // example.com
-console.log(location.port); // 8080
-console.log(location.pathname); // /pages/index
-console.log(location.search); // ?k=v
-console.log(location.hash); // #bar
-```
-
-More use case of MiniApp can be found in the [MiniApp White Paper use case](https://w3c.github.io/miniapp/white-paper/#case-studies).
-
-## 5. Security and Privacy Considerations
-
-### Security
-
-1. Similar to other URLs, MiniApp URI may expose the host and port of a miniapp package, so there may be a risk of being scanned and attacked for the other hidden ports. Service providers are suggested to avoid the risks through authentication or other efficient means.
-2. When the UA reads and dereferences the URI, there maybe security risks such as injection, hijacking, and man-in-the-middle attacks during the requests to obtain the package from the service provider. User agents are suggested to send requests using HTTPS and data encryption. Packet integrity and security validation can also help to identify and terminate abnormal URI access to tampered package files.
-3. When the user agent stores the package resource locally, it is necessary to ensure the storage security of files and isolate them properly.
-
-### Privacy
-
-1. User Agent should isolate the resources of the local package. Only the current miniapp can cache or access these resources, while other miniapp or applications are not supposed to. In addition, the user agent needs to obfuscate the resource names and provide mapping for the paths of the stored files, to prevent file privacy leaks.
-2. User agent should restrict the permissions of the miniapp to access certain information, miniapp can only access the user's private information (such as user address, mobile number, or email) after the user has authorized.
-
-## 6. Detailed design discussions
-
-The proposal of the URI scheme is still in an early stage. The main form of discussion are meetings and offline communication. All of the discussion has been recorded in [the Q&A document](./Q&A.md)
-
-## 7. the flowchart of MiniApp URI and comparison of other solution
-
-For more discussions, refer to https://github.com/w3c/miniapp/issues/34 https://github.com/w3ctag/design-reviews/issues/478
-
-## References & acknowledgements
-
-In the process of writing the MiniApp URI specification, many people have given valuable comments, thank you all.
-
-The following name list will be continuously updated, in the order of alphabetical.
-
-* Hax
-* Langyu Liu
-* Jing Huang
-* Wei Sun
-* Xiaohong Deng
-* Xiaoqian Wu
-* Yuan Lu
-* Ming Zu
-* ...
+Moved to https://github.com/w3c/miniapp-addressing/blob/main/docs/explainer.md
\ No newline at end of file
diff --git a/specs/uri/images/use-case-2.png b/specs/uri/images/use-case-2.png
deleted file mode 100644
index 04f714d..0000000
Binary files a/specs/uri/images/use-case-2.png and /dev/null differ
diff --git a/specs/uri/images/use-case-3.png b/specs/uri/images/use-case-3.png
deleted file mode 100644
index 9c83ca8..0000000
Binary files a/specs/uri/images/use-case-3.png and /dev/null differ
diff --git a/specs/uri/index.html b/specs/uri/index.html
index 833fc17..e5ab309 100644
--- a/specs/uri/index.html
+++ b/specs/uri/index.html
@@ -1,594 +1 @@
-
-
-
-
-
- MiniApp URI Scheme
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This specification defines the MiniApp URI scheme syntax and the process to dereference the MiniApp URI scheme. The MiniApp URI scheme syntax contains specifications for specific MiniApp URI syntax components based on the URI specification. Implementing this specification enables the user agent to locate the resources of MiniApp.
-
-
- 本规范定义了 MiniApp URI scheme 的语法,以及解引用 MiniApp URI scheme 的过程。MiniApp URI scheme 语法包含基于 URI 规范之上的 MiniApp URI 具体语法组件的规格说明。实现本规范,能使得 user agent 能够定位 MiniApp 的资源。
-
- The MiniApp URI scheme is a protocol that uniquely corresponds to a specific resource within a mini app. Mini apps are applications that run on the user agent and are based on Web technology combined with native application technology. The MiniApp Packaging specification defines the form of resources in the mini app, as well as the specific path in the mini app and the mapped path relationship in the MiniApp URI scheme.
-
-
MiniApp URI scheme 是用于唯一对应一个小程序内的具体资源的协议。小程序是运行在 user agent 上的,基于 Web 技术,结合原生应用技术实现的应用。在 MiniApp Packaging 规范 中定义了小程序内资源的形式,以及小程序内具体的资源路径和 MiniApp URI scheme 中的 path 映射关系。
-
-
-
The MiniApp URI syntax section describes the specifications and definitions of some syntax components of the URI in the mini app. Parts not covered in these specifications follow the URI specifications and are not repeated here.
-
MiniApp URI 的语法章节描述了 URI 的某些语法部件在小程序中的规范与含义,本规范未涉及到的部分,沿用 URI 的规范,不再在本规范中赘述。
- Example 1: Use MiniApp URI in a mini app
- 用例1:在一个小程序内使用 MiniApp URI
-
-
-
All parts of the MiniApp URI are accessible. For example, the user agent can expose a global location object and store the following syntax parts into the location object. The developer can then access this location object through JavaScript in the mini app runtime environment.
-
MiniApp URI 的各部分都是可以被访问到的。比如 user agent 可以暴露一个全局的 location 对象,并将以下语法部分存入 location 对象。那么开发者在小程序运行时环境可以通过 JavaScript 访问这个 location 对象。
The user agent can also implement the URL interface. The developer can then use related properties and methods by accessing the object in the mini app runtime environment.
-
User agent 也可以实现 URL 接口。那么开发者在小程序运行时环境可以通过访问该对象使用相关的属性和方法。
- Example 2: Open a mini app on Web page
- 用例2:在 Web 页面中打开一个小程序
-
-
-
-<!doctype html>
-<html>
-<a href="miniapp://foo;version=1.0.1-trial@example.com:8080/pages/index?category=book#section-3">open a MiniApp</a>
-</html>
-
-
-
Embed an a element with the href attribute as the mini app URI on the web page. When a user clicks the link, the user agent receives the URI and dereferences it. Based on the host, id, version in the URI, a request is made to a specific package server that can provide mini app package upload and download services, to download and open the corresponding mini app.
-
在 Web 页面中嵌入一个 href 属性为小程序 URI 的 a 元素。当用户点击该链接时,user agent 会接收到该 URI,并对该 URI 解引用,根据 URI 中的 host、id、version 请求特定的能提供小程序包上传和下载服务的 package server,下载并打开对应的小程序。
-
-
As shown in the following flowchart, the package is a collection of mini app resource packages, and the content and structure of the packages are defined in the packaging specification.
-
-
-
-
- Open a MiniApp from web
- 在 Web 中打开一个小程序
-
-
-
-
-
-
-
- Example 3: Access a mini app package in a development environment
- 用例3:在开发环境中访问小程序包
-
-
-
The User agent can provide debugging tools for developers to place the mini app package in the user agent development environment. Developers can obtain the unique id and version number of the mini app in the development environment, such as "foo; version = 1.0.1". Developers can concatenate it into a MiniApp URI that opens the mini app:
-
User agent 可提供调试工具,用于开发者将小程序包放置于 user agent 开发环境中。开发者有能力获取该开发中的小程序的唯一 id 和版本号,比如 “foo;version=1.0.1”。开发者可将其拼接为能打开该小程序的 MiniApp URI:
When the user agent dereferences the URI, it obtains the mini app package with the specific identification "foo; version = 1.0.1" in a certain way, and then opens and runs the mini app.
-
当 user agent 解引用该 URI 时,会使用某种方式获取到此特定标识为 “foo;version=1.0.1” 的小程序包,并打开和运行。
-
-
-
-
- Open a MiniApp in development environment
- 在开发环境中打开一个小程序
-
-
-
-
-
-
-
-
-
- User agent
- 客户端
-
-
The user agent of Mini App corresponds to the native client implementing this specification. The user agent can parse the MiniApp URI protocol according to the rules of this specification, and it can also point to a certain resource of the unique and correct mini app package based on the MiniApp URI.
-
小程序对应的 user agent 即实现了本规范的原生客户端。 User agent 能根据本规范制定的规则解析 MiniApp URI 协议,能根据 MiniApp URI 指向唯一的、正确的小程序包的某资源。
-
-
-
-
- Syntax
- 语法
-
-
- The MiniApp URI syntax is defined using [[ABNF]], using host, port, path-abempty, query, fragment, and unreserved from [[RFC3986]].
-
- miniappuri = scheme "://" authority path-abempty ["?" query ] ["#" fragment ]
-
- scheme = "miniapp"
- authority = id [";version=" version] ["@" host [ ":" port ]]
- id = 1*unreserved
- version = *unreserved
-
-
-
The following are the MiniApp URI examples that conform to this syntax rule:
-
以下是符合本语法规则的 MiniApp URI 示例:
-
-
-
-
The strings of the MiniApp URI scheme must conform to the character set rules of the URI declared in [[RFC3986]].
-
MiniApp URI scheme 的字符串必须要符合在 [[RFC3986]] 中声明的 URI 的字符集规则。
-
-
-
id
-
id is the logical identifier of the mini app under a specific host, which along with version, points to the unique mini app package of a host. There may be multiple versions of a mini app corresponding to an id under a specific host.
-
id 是特定的 host 下的小程序逻辑标识符,与 version 共同指向了某个 host 唯一的小程序包。在特定的 host 下,一个 id 对应的小程序可能会存在多个版本。
-
-
id is a mandatory field.
-
id 为必填项。
-
-
id consists of non-reserved characters and is not case sensitive.
-
id 由非保留字符组成,大小写不敏感。
-
-
The host must guarantee the uniqueness of the id.
-
host 必须保证 id 的唯一性。
-
-
-
-
Version
-
Version and id together represent the unique mini app package of the user agent.
-
version 与 id 共同表示了 user agent 下唯一的小程序包。
-
-
Version is optional, and the user agent can make rules for version, to provide information such as version and development method.
-
version 为可选项,user agent 可以对 version 制定规则,用于提供版本、开发方式等信息。
-
-
Version consists of non-reserved characters and is not case sensitive.
-
version 由非保留字符组成,大小写不敏感。
-
-
In most usage scenarios, it is recommended that the version is null, and the version is managed by user agent and package provider.
-
多数使用场景下建议 version 为空,由 user agent 及 package provider 进行版本的管理。
-
-
-
-
- Host and port
- host 与 port
-
-
- The semantic rules for the host and port are consistent with the host in [[RFC3986]] and the port in [[RFC3986]].
-
-
- host 和 port 部分的语义规则和 [[RFC3986]] 中的 host 与 [[RFC3986]] 中的 port 一致。
-
-
-
- Host and port are optional. When host and port are null, the user agent that opens the URI, decides how to open the mini app with specified id as the default behavior. When host has a value, the user agent can open the mini app with specified id after obtaining the mini app package through network protocol or file protocol.
-
-
- host 与 port 为可选项,当 host 和 port 为空时,由打开该 URI 的 user agent 决定该以什么方式作为默认行为打开指定 id 的小程序。当 host 有值时,则可以由 user agent 通过网络协议或者文件协议等方式获取小程序包后打开指定 id 的小程序。
-
-
-
-
-
Path
-
- Path (optional) represents the path of the mini app resource to be opened. The packaging specification defines the resource form, how to locate specific resource path in the package through path, and handling of the user agent when the path value is null or the path pointed by path does not exist.
-
The semantic rules of path are consistent with the path in [[RFC3986]].
-
path 的语义规则和 [[RFC3986]] 中的 path 一致。
-
-
-
-
- Query and fragment
- query 与 fragment
-
-
-
See [[RFC3986]] for definitions of query and fragment.
-
query 与 fragment 的定义参见 [[RFC3986]]。
-
-
-
-
-
-
- Dereferencing
- 解引用
-
-
This section describes how the user agent obtains the corresponding mini app package based on MiniApp URI, as well as some error handling.
-
此节描述了 user agent 如何根据 MiniApp URI 获得相应的小程序包,以及一些错误的处理。
-
-
The rules for dereferencing are as follows:
-
解引用的规则如下:
-
-
-
-
User agent recognizes MiniApp URI. If the scheme of this URI is miniapp, the user agent considers it as a MiniApp URI and parses the syntax components according to the syntax rules specified in this specification.
-
user agent 识别 MiniApp URI。如果该 URI 的 scheme 为 miniapp,则 user agent 认为其是 MiniApp URI,并以本规范中规定的语法规则解析语法部件。
-
-
-
The user agent parses the syntax components of MiniApp URI according to the above syntax rules into id, version, host, port, path, query, and fragment. If the syntax parsing fails, the user agent terminates this dereferencing algorithm.
-
user agent 解析 MiniApp URI 语法部件。User agent 依据上述语法规则,将 MiniApp URI 解析为 id、version、 host、 port、 path、 query 和 fragment 语法部件。如果语法解析失败,user agent 则终止此解引用算法。
-
-
-
The user agent uses the host and port information as the source to obtain the mini app package with specified identification. The mapping relation between the host and the method to obtain the applet package is determined by the user agent, and the user agent handles different existence modes of host values:
-
user agent 将 host 与 port 信息作为获取指定标识的小程序包的来源。host 与小程序包获取方式间的映射关系由 user agent 确定,user agent 需要处理 host 值的不同存在方式:
-
-
-
-
When host value is not null, the user agent determines the mini app package provider based on the values specified by host and port. The provider can be a package server that provides mini app package download service, or it can be a user agent custom decision that corresponds to a specific method to obtain the mini app package. The download process using HTTPS protocol as a download protocol is described in [[[#https]]] below.
-
当 host 值非空时,user agent 根据 host 与 port 指定的值确定小程序包的 provider。provider 可以是一种提供小程序包下载服务的 package server,也可以是 user agent 自定义决定对应了某种特殊的获取小程序包的方式。使用 HTTPS 协议作为下载协议的下载过程见[[[#https]]]。
-
-
When host value is null, the user agent obtains the mini app package with the specified id using a default method, which can be obtained through paths such as local path, default remote path, etc.
-
当 host 值为空值时,user agent 将会以某种默认方式获取指定 id 的小程序包,可以是从本地路径、默认的远程路径等途径获取。
-
-
-
-
The user agent uses id as a mini app logic identifier for a specific host. The mini app with specified id may have multiple versions for the service corresponding to the specific host and port values.
-
- user agent 将 id 作为特定 host 下的小程序逻辑标识符。在特定的 host 与 port 值对应的服务下,一个指定 id 的小程序可能会存在多个版本。
-
-
-
-
The user agent uses version as the version information of the mini app package with the specified id. The user agent handles different existence modes of version: For example
-
- user agent 将 version 作为指定 id 的小程序包的版本信息。User agent 需要处理 version 的不同存在方式:比如
-
-
-
-
-
When version has a value, the version is used as the version information of the mini app package, which along with id, points to the unique mini app package of a host.
-
当 version 存在值时,将 version 作为小程序包的版本信息,与 id 共同指向某个 host 唯一的小程序包。
-
-
When version is null, the mini app package with specified id is customized as an mini app package provider (package server or user agent), which can be the latest version or the default version of the mini app package with specified id, or the mini app package of a version that conforms to a mapping rule.
-
当 version 为空值时,将会以小程序包 provider (package server or user agent)自定义提供指定 id 的小程序包,可以是该指定 id 的小程序包的最新版本、或者是默认版本、或者是符合某种映射规则的版本的小程序包。
-
-
In most usage scenarios, it is recommended that the version is null, and the version is managed by the user agent and package provider.
-
多数使用场景下建议 version 为空,由 user agent 及 package provider 进行版本的管理。
-
-
-
-
The user agent obtains the mini app package based on the parsed provider information and the identification information of the mini app (e.g., id, version). The user agent handles different situations of the provider:
-
user agent 根据解析到的 provider 的信息及小程序的标识信息(比如id、version)获取小程序的包。User agent 需要处理provider不同的情况:
-
-
-
-
When provider is a package server, the user agent sends an HTTPS Request with mini app identification information to the server; the final mini app package is obtained by handling the Response body returned by the package server.
-
当 provider 为 package server 时,user agent 向该服务器发起携带了小程序标识信息的 HTTPS Request;通过处理 package server 返回的 Response body 得到最终的小程序包。
-
-
When provider is a custom method of the user agent, the user agent obtains the mini app package with specified mini app identification information through the custom method.
-
当 provider 为 user agent 自定义的方式时,user agent 通过该自定义方式获取指定小程序标识信息的小程序包。
-
-
-
-
The user agent conducts corresponding processing based on the results of the obtained mini app package:
-
user agent 根据获取小程序包的结果,进行相应的处理:
-
-
-
-
When the mini app package is obtained successfully, the following processing is performed.
-
当获取小程序包成功时,则进行接下来的处理。
-
-
When obtaining the mini app package fails, exception handling is performed based on the cause of failure. For example, when the user agent cannot obtain the package from the host, the error code and error message are returned.
-
当获取小程序包失败时,则根据失败原因,做出异常处理。例如 user agent 从 host 无法获取到包时,返回错误码与错误信息。
-
-
-
-
- The user agent locates the corresponding mini app resource based on the path, query, fragment and the method defined in MiniApp Manifest specification.
-
- If the URI does not conform to the syntax rules of MiniApp URI, the user agent does not respond or handle exceptions.
-
-
如果 URI 不符合 MiniApp URI 语法规则,则 User agent 不做响应或进行异常处理。
-
-
-
- Extract host and port from MiniApp URI and concatenate them into a complete HTTPS URL: https://example.com:8080/
-
-
从 MiniApp URI 中取出 host 与 port,拼接为完整的 HTTPS URL: https://example.com:8080/
-
-
-
- Use GET request, version and id as request parameters. That is, https://example.com:8080/?id=foo&version=1.0.1-trial
-
-
以 GET 请求将 id 和 version 作为请求参数: https://example.com:8080/?id=foo&version=1.0.1-trial
-
-
-
- The user agent may implement HTTP cache control; it is recommended to use gzip as the encoding scheme (HTTP accept-encoding) and send HTTPS request message.
-
-
user agent may 实现 HTTP 缓存控件;推荐使用 gzip 作为编码方式(HTTP accept-encoding),发送 HTTPS 请求报文。
-
-
-
- If the received request is not an HTTPS request, an HTTP 403 forbidden response is returned, and the request is terminated.
-
-
如果接受到请求不是 HTTPS 请求,则返回 HTTP 403禁止响应,并终止此请求。
-
-
-
-
- If the received request fails to pass authentication, an HTTP 403 forbidden response is returned, and the request is terminated.
-
-
如果接受到的请求未通过鉴权,则返回 HTTP 403禁止响应,并终止此请求。
-
-
-
- If the requested HTTP Method is not supported, an HTTP 501 Not Implemented response is returned, and the request is terminated.
-
-
如果该请求的 HTTP Method 不被支持,则返回 HTTP 501 Not Implemented 响应并终止此请求。
-
-
-
- Based on the query or body carried in the requested URL, a mini app package with id “foo”, version “1.0.1” is returned. If it is not found, an HTTP 404 Not Found response is returned.
-
-
根据请求 URL 所携带的 query 或者 body, 返回 id 为 “foo”,version 为“1.0.1” 的小程序包。如果找不到,则返回 HTTP 404 Not Found 响应。
-
-
-
-
- If it is successfully found, an HTTP 200 OK response is returned, and the mini app package is returned as the response body in the format specified by content-type.
-
-
如果成功找到,则以 HTTP 200 OK 响应,并将小程序包以 content-type 指定的格式作为响应主体返回。
-
-
-
- The user agent determines whether the request is successful based on status and continues to parse the response body when status is 200. A failure exception is processed when status is not 200.
-
-
user agent 根据 status 来判断请求是否成功,当 status 为 200 时,则继续解析响应体。当 status 不为 200 时,则处理失败异常。
-
-
-
- It is recommended to use the agreed unique identification field to reverify the package integrity.
-
-
建议使用约定的唯一标识字段再次校验包的完整性。
-
-
-
- For downloaded mini app package, use the package format specified in the MiniApp Packaging specification to decompress.
-
- As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
-
-
- 本规范中的所有内容均为本草案的规范性内容,但明确标记为“非规范性”的部分、示例和注释除外。
-
-
-
There is one class of products that can conform to this specification, and that is the user agent above.
-
-
- 有一类产品可以声明符合此规范,即上文中的 user agent。
-
-
-
-
-
-
- Security Considerations
- 安全性考虑
-
-
-
-
The user agent needs to ensure the correctness of URI, avoid URI tampering and prevent phishing attacks, for example, by using the recommendations in [[UTR36]].
-
User agent 需要保证 URI 的正确性,避免 URI 篡改,防止钓鱼攻击。比如,[[UTR36]] 中的技术可用于解决一部分安全问题。
-
-
-
It is recommended that UA or sign signature are used to authenticate the request process on the package server side.
-
请求过程建议通过UA或者sign签名的方式,进行package server端的鉴权认证。
-
-
-
During the request process, it is recommended to check replay attacks using HMAC.
-
请求过程中,建议通过HMAC的方式进行防重放攻击检查。
-
-
-
During the request process, it is recommended to verify package integrity by abstract comparison of md5 or sha1.
-
请求过程中,建议通过md5或sha1的摘要比对方式,验证包完整性。
-
-
-
While parsing the Response by the user agent, it is recommended to protect the data package security through encryption and decryption.
-
user agent 解析Response过程中,建议通过加解密方式进行数据包的安全性保护。
-
-
-
-
When the user agent stores the package resource locally, it is necessary to ensure the storage security of files, to protect against malware attacks.
-
user agent 本地存储包资源时,需要保证文件的存储安全,防止恶意软件攻击。
-
-
-
-
-
-
- Acknowledgments
- 致谢
-
-
The editors thank to Baidu Smart Mini Program team for reviewing this document over and over again, thank to the W3C MiniApps community group for providing a lot of valuable advice.
- The MiniApp Widget is a special form of MiniApp Page. Unlike a page, a widget can occupy a certain area instead of the entire screen. It is used to display key information and respond to simple user operations, such as displaying the weather at the user’s current location, or tracking the user’s current travel status and providing further actions.
-
- In mobile operating systems, the MiniApp Widget can be used for the Intelligent Assistant and other scenarios. In some scenarios, the user can subscribe to a service and the Widget is displayed in a fixed position, while in other scenarios, the Widget can dynamically appear and disappear based on contextual requirements.
-
- As the MiniApp Widget is an integral part of MiniApp, the other relevant parts are described in other related MiniApp documents. This document mainly describes the specific requirements that need to be considered when defining the MiniApp Widget Specification as well as other dependencies.
-
- The MiniApp Widget runs in a host environment that is called the user agent. The MiniApp Widget user agent is largely the same as the MiniApp user agent, and shall meet the following requirements:
-
-
- MiniApp Widget 需要在一个宿主环境中运行,这个环境被称为 user agent。MiniApp Widget 的 user agent 在较大程度下与 MiniApp 的 user agent 保持一致,应该满足如下一些需求:
-
-
-
-
-
- The MiniApp Widget user agent should be able to parse the MiniApp URI and obtain the MiniApp package according to the process described in the MiniApp URI Scheme, and it shall conform to the requirements in the Dereferencing section of the MiniApp URI Scheme specification.
-
- The user agent should be able to parse the manifest file as described in the MiniApp Manifest specification, so as to load and run the MiniApp Widget. Some specific requirements related to the Widget are described in the Manifest File section of this document.
-
- The form of resources that the MiniApp Widget accesses in the package is consistent with a MiniApp page. Therefore, the user agent should be able to access the resource files in the MiniApp package in the same way.
-
- When running the widget, the user agent should be able to provide necessary interface support. Some specific requirements related to the Widget are described in the MiniApp API section of this document.
-
-
- 在运行过程中,user agent 应能提供必要的接口支持,在本文档的 MiniApp API 一节中描述与 Widget 相关的特定需求。
-
-
-
-
- Specifically, in the MiniApp Widget scenario, as the Widget itself does not occupy the complete screen space, the user agent will have some specific requirements:
-
- The user agent can integrate the MiniApp Widget with its own interface, to achieve a better integration experience.
-
-
- User agent 可以将 MiniApp Widget 与自身界面结合在一起显示,以达到更好的融合体验。
-
-
-
-
To better integrate the MiniApp Widget and the user agent interface, the user agent should provide its style information to the MiniApp Widget, so as to better support the requirements such as dark mode.
The user agent should be able to load and display multiple MiniApp Widgets concurrently, for example, display a relevant air ticket Widget and taxi Widget simultaneously on Intelligent Assistant.
-
-
User agent 可以同时加载并显示多个 MiniApp Widget,例如在智能助理中同时显示相关的机票 Widget 和打车 Widget。
-
-
-
-
Some behaviors of the User agent may cause the Widget to show or hide, and in such a case, the lifecycle callback of the Widget should be triggered correctly.
-
-
- User agent 的一些行为可能会导致 Widget 的展现和消失,此时应该正确触发 Widget 的生命周期回调。
-
-
-
-
-
-
-
-
URI
-
- The MiniApp Widget URI should be consistent with the MiniApp URI Scheme, to ensure that:
-
- The user agent can obtain the MiniApp package containing the MiniApp Widget using the same mechanism.
-
-
- User agent 能以相同的机制获取包含 MiniApp Widget 的 MiniApp 包。
-
-
-
-
- The user agent can locate and load the MiniApp Widget using the same mechanism as the MiniApp Page.
-
-
- User agent 能以与 MiniApp Page 相同的机制定位并加载 MiniApp Widget。
-
-
-
-
-
-
-
- Package
- 包
-
-
- Like MiniApp, the MiniApp Widget is also distributed in the form of a package. After the user agent acquires and verifies a MiniApp package, it will acquire the Widget information contained in the package, and load and display it correctly. The form and specification of the package should be consistent with the MiniApp Packaging specification, including but not limited to file organization, compression format, filename extension, digital signature, etc. The user agent should use the same form to verify and install the MiniApp Widget package.
-
- In the MiniApp Widget scenario, the specific requirements are as follows:
-
-
- 在 MiniApp Widget 场景下,特定的需求:
-
-
-
-
-
- A MiniApp package may contain both the MiniApp Pages and Widgets. In some cases, MiniApp expects to display a Widget on the user agent, however, when the user clicks the content on the Widget, a MiniApp Page is provided as the landing page with richer content.
-
- A MiniApp package may contain only Widgets without Pages. Some MiniApp providers just want to provide simplest functions on the Widget to meet the users’ specific needs.
-
- The configuration file must be included in the MiniApp Widget package. Developers can set the basic information, style, and routing of the Widget through the Manifest file. The format of the Widget Manifest file should be consistent with that of the MiniApp Manifest file. Specifically, there will be some changes in the Widget environment.
-
- The Manifest file should include a widgets property (similar to the pages property), used for designating relevant information and configuration of widget contained in MiniApp, and should include the following:
-
- Minimum platform version. Different minimum platform version declarations may exist as there may be differences between the Widget API and MiniApp API. As the Widget is loaded independently, the minimum platform version declaration can be directed for a single widget
-
-
- 最小平台版本,因为 Widget 涉及的 API 与 MiniApp API 有一定差别,可能会存在不同的最小平台版本声明。且因为 Widget 是独立加载的,最小平台版本声明可以针对单个 widget 声明
-
-
-
-
-
- Field changes in Manifest file
- Manifest 文件字段变化
-
-
- Due to some features of the widget, some configuration information in the Manifest file will not take effect in widgets. For example, the fullScreen property of window describes whether the MiniApp Page is displayed in fullscreen, however, as the widget has no fullscreen mode, this property will be ignored.
-
- The lifecycle of the MiniApp Widget should be consistent with the MiniApp Lifecyle, wherein the trigger timing of onShow/onHide lifecycle callback will have some changes. As the Widget may also show or hide when the user agent slides the Widget off the screen or conducts a collapse action, the onShow/onHide of the Widget should also be triggered correctly at this time. Due to the form of the Widget and the form it runs in the client, the Widget also needs to support some new lifecycle API:
-
- In case of changes in system language, window size, color scheme etc., the Widget needs to receive the changed information to change the interface.
-
- The client may update the status of the Widget interface in the form of incoming data; Widget reinitialization should not be triggered at this time.
-
- The API that developers can use in the MiniApp Widget should be consistent with the [MiniApp API specification] as much as possible, however, some APIs need to be adjusted for specific MiniApp Widget scenarios. The content in this section should be adjusted based on the [MiniApp API specification].
-
-
- 开发者在 MiniApp Widget 中可以使用的API 应当与 [MiniApp API 规范] 尽量保持一致,但有一些 API 需要针对 MiniApp Widget 场景进行调整,本节内容应根据 [MiniApp API 规范] 内容调整。
-
-
- Some APIs that could be used on MiniApp Page need to be adjusted in Widget scenario, such as:
-
-
- 在 Widget 场景下,一些原先在 MiniApp Page 上可以使用的 API 需要调整,例如:
-
-
-
-
- API with background persistence or API passively triggered, e.g. background location and push. As the Widget runs in the user agent, it does not exist as an independent unit in terms of user perception, and these APIs are prone to cause user confusion between calling the Widget and the user agent.
-
-
- 具备后台持续能力或者被动触发的 API,例如持续定位和推送,因为 Widget 在 user agent 环境中运行,在用户认知上并不作为独立运行的单元存在,这些 API 易造成用户将 Widget 的调用与 user agent 混淆。
-
-
-
-
- API that can capture user attention and cause misunderstanding by the user, e.g. launching the camera interface. As multiple Widgets may be displayed on the same interface, if these Widgets directly call the API to open the interface concurrently, it will cause the user to misunderstand.
-
The User agent should provide some new APIs suitable for the Widget, for example:
-
User agent 会提供一些适用于 Widget 的新 API,例如:
-
-
-
API to obtain the current window size (viewport width)
-
获取当前窗口大小的 API(视口宽度)
-
-
-
API to obtain the current user agent information, to enable the Widget to adapt to the specific user agent
-
获取当前 user agent 信息的 API,以支持 Widget 针对特定的 user agent 进行适配
-
-
-
Pre-authorized APIs in a batch. As there may be multiple MiniApp Widgets on the user agent concurrently, multiple APIs that dynamically obtain permission will cause user confusion. Thus, the user agent should provide pre-authorized APIs in a batch.
-
批量预授权的 API,由于 user agent 上可能同时存在多个 MiniApp Widget,出现多个动态获取权限的 API 会对用户造成困扰,user agent 应提供批量预授权的 API
-
-
-
Extended APIs for specific clients, e.g., request for client update to obtain the latest version of the Widget
-
特定客户端的拓展 API,例如请求客户端更新以获取到最新版本的 Widget
-
-
-
-
-
-
- MiniApp Components
- MiniApp 组件
-
-
- The APIs that developers can use in the Widget should be consistent with the [MiniApp component specification] as much as possible, however, some components need to be adjusted for specific Widget scenarios. The content in this section should be adjusted based on the [MiniApp component specification].
-
Comparison of APIs in MiniApps, W3C specs, and PWAs
iOS
-
Yes (Partial)
-
No
+
Partial
+
No
Yes
Yes
@@ -215,9 +227,9 @@
Comparison of APIs in MiniApps, W3C specs, and PWAs
Yes (Chrome 67+)
-
No
-
No
-
No
+
No
+
No
+
No
OS
@@ -225,9 +237,9 @@
Comparison of APIs in MiniApps, W3C specs, and PWAs
Yes (Chrome 70+)
-
No
-
No
-
No
+
No
+
No
+
No
OS
@@ -235,9 +247,9 @@
Comparison of APIs in MiniApps, W3C specs, and PWAs
Yes (Chrome 70+)
-
No
-
No
-
No
+
No
+
No
+
No
Engine
@@ -245,25 +257,37 @@
Comparison of APIs in MiniApps, W3C specs, and PWAs
Browser Engines
-
No Chromium layout engine but with V8 engine, more lightweight.
- Providing pure WebAPIs to app developers,Web JS APIs are mapped from Android native APIs and part of
- standard WebAPIs.
- Template part(with HTML tags)in .ux file mapping to single android native views and combined view
- components, provided native performance experiences.
- CSS subset: Mapping to attributes of Android View(e.g. position, color)
-
Native(rendering) + WebView (rendering) + Worker (Data storage and business logic) + V8(use UC browsering engine)
+
+ Native, WebView, V8
+ No Chromium layout engine but with V8 engine, more lightweight. Providing pure WebAPIs to app developers,
+ Web JS APIs are mapped from Android native APIs and part of standard WebAPIs. Template part (with HTML
+ tags) in .ux file mapping to single android native views and combined view components, provided native performance
+ experiences. CSS subset: Mapping to attributes of Android View (e.g. position, color)
+
+
Comparison of APIs in MiniApps, W3C specs, and PWAs
Audit
-
No
+
No
Yes
Yes
Yes
@@ -290,32 +314,65 @@
Comparison of APIs in MiniApps, W3C specs, and PWAs
App store integration
-
No
+
+
+ Partial
+
+
Android (Yes): The Trusted Web Activities on Android allows App Store integration. Additionally TWAs have access to Google Pay (Digital Goods API). Cons: Lack of PWA support in China App Stores on Android and PRC custom Android ROMs.
+
Windows (Yes): The Microsoft Store on Windows is a trusted single location for customers to discover and install PWAs for their Windows PC.
+
iOS (Yes): The PWABuilder supports to publish PWAs to the App Store and gain new iPhone and iPad users.
+
Chrome OS: Will even launch the PWA window on Chrome OS. Cons: Zero market share in China.
+
+
+
Yes
-
Can be used within Alibaba's Native Apps including Alipay, Taobao, DingDing, Gaode, ELE.me
-
Can be used within Baidu App and Open Source Union apps, such as iQiyi, Bilibili, Wifi and so on
+
+
+ Yes
+ Can be used within Alibaba's native apps including Alipay, Taobao, DingTalk, Gaode, ELE.me
+
+
+
+
+
+ Yes
+ Can be used within Baidu App and Open Source Union apps, such as iQiyi, Bilibili, Wifi and so on
+
+
+
+ Yes
+ navigator.setAppBadge()
+ Badge implementation on host platforms: Android 8.0 (Oreo) or higher, Windows 7 or higher, iOS has support for badging APIs, not currently supported on Chrome OS.
+
+
+
+ No
+ No Shake Detection API but it can easily be implemented using
+ accelerometer
+ and/or gyroscope.
+
+
+
No
+
+
+ Yesmy.watchShake
+
+
No
User
Interaction
-
User Capture Screen Event
-
No
+
Detection of User Screenshots
+
-
No
-
No
-
my.onUserCaptureScreen(CALLBACK)
-
swan.onUserCaptureScreen
+
No
+
+
+ Yes@system.screenshot
+
+
+
+ Yesmy.onUserCaptureScreen
+
+
+
+ Yesswan.onUserCaptureScreen
+
User
Interaction
-
Alarms
-
No
+
Alarms
+
-
No
-
Yes (@system.alarm)
-
No
-
No
+
+
+ Partial
+ getNotifications()
+ showNotification()
+ The Notification Triggers API allows you to schedule local notifications that don't require a network connection. It is no longer pursued
+ but the requirements of recurring notification triggers still exist.
+
+