|
1 | 1 | // Vite ✨
|
2 | 2 | export { remixPWA } from './src/index.js';
|
3 | 3 | export type { PWAOptions as PWAViteOptions } from './src/types.js';
|
4 |
| - |
5 |
| -export interface WebAppManifest { |
6 |
| - /** |
7 |
| - * The name member is a string that represents the name of the web application as it is usually |
8 |
| - * displayed to the user (e.g., amongst a list of other applications, or as a label for an icon). |
9 |
| - */ |
10 |
| - name?: string; |
11 |
| - /** |
12 |
| - * The short_name member is a string that represents the name of the web application displayed to the |
13 |
| - * user if there is not enough space to display name. |
14 |
| - */ |
15 |
| - short_name?: string; |
16 |
| - /** |
17 |
| - * The description member is a string that provides a description of the purpose of the web application. |
18 |
| - */ |
19 |
| - description?: string; |
20 |
| - /** |
21 |
| - * The icons member specifies an array of image objects that can serve as application icons for different |
22 |
| - * contexts. For example, they can be used to represent the web application amongst a list of other applications, |
23 |
| - * or to integrate the web application with an operating system's task switcher and/or system preferences. |
24 |
| - */ |
25 |
| - icons?: Array<{ |
26 |
| - src: string; |
27 |
| - sizes?: string; |
28 |
| - type?: string; |
29 |
| - purpose?: 'any' | 'maskable' | 'monochrome'; |
30 |
| - }>; |
31 |
| - /** |
32 |
| - * The start_url member is a string that represents the start URL of the web application — the preferential URL that |
33 |
| - * should be loaded when the user launches the web application (e.g., when the user taps on the web application's icon |
34 |
| - * from a device's application menu or homescreen). |
35 |
| - */ |
36 |
| - start_url?: string; |
37 |
| - /** |
38 |
| - * The display member is a string that determines the developers’ preferred display mode for the website. |
39 |
| - * The display mode changes how much of browser UI is shown to the user and can range from a browser (when the full |
40 |
| - * browser window is shown) to standalone (when the app is run without any browser UI). |
41 |
| - * |
42 |
| - * The default for display is `browser`, which results in the normal browser UI being shown. |
43 |
| - * |
44 |
| - * The full options are: |
45 |
| - * - `fullscreen`: All of the available display area is used and no user agent chrome is shown. |
46 |
| - * - `standalone`: The application will look and feel like a standalone application. This can include the application having a different window, its own icon in the application launcher, etc. |
47 |
| - * - `minimal-ui`: The application will look and feel like a standalone application, but will have a minimal set of UI elements for controlling navigation. |
48 |
| - * - `browser`: The application opens in a conventional browser tab or new window, depending on the browser and platform. |
49 |
| - */ |
50 |
| - display?: 'fullscreen' | 'standalone' | 'minimal-ui' | 'browser'; |
51 |
| - display_override?: Array<'window-controls-overlay' | 'bordered' | 'standard'>; |
52 |
| - /** |
53 |
| - * The orientation member is a string that represents the default orientation of the web application. |
54 |
| - * The value must be a string set to one of the following values: |
55 |
| - * - `any` |
56 |
| - * - `natural` |
57 |
| - * - `landscape` |
58 |
| - * - `landscape-primary` |
59 |
| - * - `landscape-secondary` |
60 |
| - * - `portrait` |
61 |
| - * - `portrait-primary` |
62 |
| - * - `portrait-secondary` |
63 |
| - */ |
64 |
| - orientation?: |
65 |
| - | 'any' |
66 |
| - | 'natural' |
67 |
| - | 'landscape' |
68 |
| - | 'landscape-primary' |
69 |
| - | 'landscape-secondary' |
70 |
| - | 'portrait' |
71 |
| - | 'portrait-primary' |
72 |
| - | 'portrait-secondary'; |
73 |
| - /** |
74 |
| - * The dir member is a string that represents the directionality of the web application. |
75 |
| - * |
76 |
| - * The value must be a string set to one of the following values: |
77 |
| - * - `ltr`: Left to right |
78 |
| - * - `rtl`: Right to left |
79 |
| - * - `auto`: Let the user agent decide based on the value of the `lang` attribute on the root element |
80 |
| - */ |
81 |
| - dir?: 'ltr' | 'rtl' | 'auto'; |
82 |
| - /** |
83 |
| - * The lang member is a string that represents the primary language for the [localizable members](https://www.w3.org/TR/appmanifest/#dfn-localizable-members) |
84 |
| - * of the manifest (as knowing the language can also help with directionality). |
85 |
| - */ |
86 |
| - lang?: string; |
87 |
| - prefer_related_applications?: boolean; |
88 |
| - related_applications?: Array<{ |
89 |
| - platform: string; |
90 |
| - url?: string; |
91 |
| - id?: string; |
92 |
| - min_version?: string; |
93 |
| - fingerprints?: Array<{ |
94 |
| - type: string; |
95 |
| - value: string; |
96 |
| - }>; |
97 |
| - }>; |
98 |
| - /** |
99 |
| - * The scope member is a string that represents the navigation scope of this web application's application context. |
100 |
| - */ |
101 |
| - scope?: string; |
102 |
| - screenshots?: Array<{ |
103 |
| - src: string; |
104 |
| - sizes?: string; |
105 |
| - type?: string; |
106 |
| - platform?: string; |
107 |
| - label?: string; |
108 |
| - form_factor?: 'narrow' | 'wide'; |
109 |
| - }>; |
110 |
| - shortcuts?: Array<{ |
111 |
| - name?: string; |
112 |
| - short_name?: string; |
113 |
| - description?: string; |
114 |
| - url?: string; |
115 |
| - icons?: Array<{ |
116 |
| - src: string; |
117 |
| - sizes?: string; |
118 |
| - type?: string; |
119 |
| - purpose?: 'any' | 'maskable' | 'monochrome'; |
120 |
| - }>; |
121 |
| - }>; |
122 |
| - share_target?: { |
123 |
| - action?: string; |
124 |
| - method?: 'GET' | 'POST'; |
125 |
| - enctype?: string; |
126 |
| - params?: { |
127 |
| - [key: string]: { |
128 |
| - name?: string; |
129 |
| - title?: string; |
130 |
| - description?: string; |
131 |
| - }; |
132 |
| - }; |
133 |
| - }; |
134 |
| - protocol_handlers?: Array<{ |
135 |
| - protocol: string; |
136 |
| - url: string; |
137 |
| - }>; |
138 |
| - note?: string; |
139 |
| - /** |
140 |
| - * The background_color member defines a placeholder background color for the application page to display before its stylesheet is loaded. |
141 |
| - */ |
142 |
| - background_color?: string; |
143 |
| - /** |
144 |
| - * The theme_color member is a string that defines the default theme color for the application. |
145 |
| - */ |
146 |
| - theme_color?: string; |
147 |
| - categories?: Array<string>; |
148 |
| - iarc_rating_ids?: Array<string>; |
149 |
| -} |
0 commit comments