Skip to content

Commit

Permalink
feat: add new manifest options (#535)
Browse files Browse the repository at this point in the history
* feat: add new manifest options

* fix: typo in client mode

* fix: .
  • Loading branch information
userquin authored Jun 11, 2023
1 parent 1c28964 commit 4fd0214
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ export interface ShareTargetFiles {
accept: string | string[]
}

/**
* https://developer.mozilla.org/en-US/docs/Web/Manifest/launch_handler#launch_handler_item_values
*/
export type LaunchHandlerClientMode = 'auto' | 'focus-existing' | 'navigate-existing' | 'navigate-new'

export interface ManifestOptions {
/**
* @default _npm_package_name_
Expand Down Expand Up @@ -329,6 +334,22 @@ export interface ManifestOptions {
files?: ShareTargetFiles | ShareTargetFiles[]
}
}
/**
* https://github.com/WICG/pwa-url-handler/blob/main/handle_links/explainer.md#handle_links-manifest-member
*/
handle_links?: 'auto' | 'preferred' | 'not-preferred'
/**
* https://developer.mozilla.org/en-US/docs/Web/Manifest/launch_handler#launch_handler_item_values
*/
launch_handler?: {
client_mode: LaunchHandlerClientMode | LaunchHandlerClientMode[]
}
/**
* https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/sidebar#enable-sidebar-support-in-your-pwa
*/
edge_side_panel?: {
preferred_width?: number
}
}

export interface WebManifestData {
Expand Down

0 comments on commit 4fd0214

Please sign in to comment.