Skip to content

Commit

Permalink
feat: update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 17, 2024
1 parent 025a1ac commit 3f7883e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-lions-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@json-types/web-manifest": minor
---

Update schema
42 changes: 33 additions & 9 deletions packages/web-manifest/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,39 @@
},
"orientation": {
"description": "The orientation member is a string that serves as the default orientation for all top-level browsing contexts of the web application.",
"enum": [
"any",
"natural",
"landscape",
"portrait",
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
"oneOf": [
{
"const": "any",
"description": "Displays the web app in any orientation allowed by the device's operating system or user settings. It allows the app to rotate freely to match the orientation of the device when it is rotated. "
},
{
"const": "natural",
"description": "Displays the web app in the orientation considered most natural for the device, as determined by the browser, operating system, user settings, or the screen itself. It corresponds to how the device is most commonly held or used: On devices typically held vertically, such as mobile phones, natural is usually portrait-primary. On devices typically used horizontally, such as computer monitors and tablets, natural is usually landscape-primary. When the device is rotated, the app may or may not rotate so as to match the device's natural orientation; this behavior may vary depending on the specific device, browser implementation, and user settings."
},
{
"const": "landscape",
"description": "Displays the web app with width greater than height. It allows the app to switch between landscape-primary and landscape-secondary orientations when the device is rotated."
},
{
"const": "portrait",
"description": "Displays the web app with height greater than width. It allows the app to switch between portrait-primary and portrait-secondary orientations when the device is rotated."
},
{
"const": "portrait-primary",
"description": "Displays the web app in portrait mode, typically with the device held upright. This is usually the default app orientation on devices that are naturally portrait. Depending on the device and browser implementation, the app will typically maintain this orientation even when the device is rotated."
},
{
"const": "portrait-secondary",
"description": "Displays the web app in inverted portrait mode, which is portrait-primary rotated 180 degrees. Depending on the device and browser implementation, the app will typically maintain this orientation even when the device is rotated."
},
{
"const": "landscape-primary",
"description": "Displays the web app in landscape mode, typically with the device held in its standard horizontal position. This is usually the default app orientation on devices that are naturally landscape. Depending on the device and browser implementation, the app will typically maintain this orientation even when the device is rotated."
},
{
"const": "landscape-secondary",
"description": "Displays the web app in inverted landscape mode, which is landscape-primary rotated 180 degrees. Depending on the device and browser implementation, the app will typically maintain this orientation even when the device is rotated."
}
]
},
"prefer_related_applications": {
Expand Down

0 comments on commit 3f7883e

Please sign in to comment.