@devvit/client 0.12.2-next-2025-10-14-20-54-23-baa59b4c1.0 → 0.12.2-next-2025-10-14-23-17-31-2e7a72373.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,6 +26,7 @@ export declare const getWebViewMode: () => WebViewMode;
|
|
|
26
26
|
* names are the `devvit.json` `post.entrypoints` keys. Passing the
|
|
27
27
|
* same entrypoint as currently loaded causes a reload.
|
|
28
28
|
* @returns A promise that resolves request has been received.
|
|
29
|
+
* @throws When already expanded.
|
|
29
30
|
*
|
|
30
31
|
* @experimental
|
|
31
32
|
* @example
|
|
@@ -42,6 +43,7 @@ export declare function requestExpandedMode(event: PointerEvent, entry: string):
|
|
|
42
43
|
*
|
|
43
44
|
* @param event The event that triggered the request, must be a trusted event.
|
|
44
45
|
* @returns A promise that resolves request has been received.
|
|
46
|
+
* @throws When already inlined.
|
|
45
47
|
*
|
|
46
48
|
* @experimental
|
|
47
49
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-view-mode.d.ts","sourceRoot":"","sources":["../../src/effects/web-view-mode.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;AAI9D;;;;GAIG;AACH,eAAO,MAAM,cAAc,QAAO,WAA8C,CAAC;AAEjF
|
|
1
|
+
{"version":3,"file":"web-view-mode.d.ts","sourceRoot":"","sources":["../../src/effects/web-view-mode.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;AAI9D;;;;GAIG;AACH,eAAO,MAAM,cAAc,QAAO,WAA8C,CAAC;AAEjF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIrF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAInE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAE7E;AAgCD;;;GAGG;AACH,wBAAgB,gBAAgB,SAgB/B"}
|
package/effects/web-view-mode.js
CHANGED
|
@@ -17,6 +17,7 @@ export const getWebViewMode = () => webViewMode(devvit.webViewMode);
|
|
|
17
17
|
* names are the `devvit.json` `post.entrypoints` keys. Passing the
|
|
18
18
|
* same entrypoint as currently loaded causes a reload.
|
|
19
19
|
* @returns A promise that resolves request has been received.
|
|
20
|
+
* @throws When already expanded.
|
|
20
21
|
*
|
|
21
22
|
* @experimental
|
|
22
23
|
* @example
|
|
@@ -27,6 +28,8 @@ export const getWebViewMode = () => webViewMode(devvit.webViewMode);
|
|
|
27
28
|
* ```
|
|
28
29
|
*/
|
|
29
30
|
export function requestExpandedMode(event, entry) {
|
|
31
|
+
if (devvit.webViewMode === WebViewImmersiveMode.IMMERSIVE_MODE)
|
|
32
|
+
throw Error('web view is already expanded');
|
|
30
33
|
return emitModeEffect(WebViewImmersiveMode.IMMERSIVE_MODE, event, entry);
|
|
31
34
|
}
|
|
32
35
|
/**
|
|
@@ -35,6 +38,7 @@ export function requestExpandedMode(event, entry) {
|
|
|
35
38
|
*
|
|
36
39
|
* @param event The event that triggered the request, must be a trusted event.
|
|
37
40
|
* @returns A promise that resolves request has been received.
|
|
41
|
+
* @throws When already inlined.
|
|
38
42
|
*
|
|
39
43
|
* @experimental
|
|
40
44
|
* @example
|
|
@@ -45,6 +49,8 @@ export function requestExpandedMode(event, entry) {
|
|
|
45
49
|
* ```
|
|
46
50
|
*/
|
|
47
51
|
export function exitExpandedMode(event) {
|
|
52
|
+
if (devvit.webViewMode === WebViewImmersiveMode.INLINE_MODE)
|
|
53
|
+
throw Error('web view is already inlined');
|
|
48
54
|
return emitModeEffect(WebViewImmersiveMode.INLINE_MODE, event, undefined);
|
|
49
55
|
}
|
|
50
56
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/client",
|
|
3
|
-
"version": "0.12.2-next-2025-10-14-
|
|
3
|
+
"version": "0.12.2-next-2025-10-14-23-17-31-2e7a72373.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"test:unit-with-coverage": "vitest run --coverage"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@devvit/protos": "0.12.2-next-2025-10-14-
|
|
37
|
-
"@devvit/shared": "0.12.2-next-2025-10-14-
|
|
38
|
-
"@devvit/shared-types": "0.12.2-next-2025-10-14-
|
|
36
|
+
"@devvit/protos": "0.12.2-next-2025-10-14-23-17-31-2e7a72373.0",
|
|
37
|
+
"@devvit/shared": "0.12.2-next-2025-10-14-23-17-31-2e7a72373.0",
|
|
38
|
+
"@devvit/shared-types": "0.12.2-next-2025-10-14-23-17-31-2e7a72373.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@ampproject/filesize": "4.3.0",
|
|
42
|
-
"@devvit/repo-tools": "0.12.2-next-2025-10-14-
|
|
43
|
-
"@devvit/tsconfig": "0.12.2-next-2025-10-14-
|
|
42
|
+
"@devvit/repo-tools": "0.12.2-next-2025-10-14-23-17-31-2e7a72373.0",
|
|
43
|
+
"@devvit/tsconfig": "0.12.2-next-2025-10-14-23-17-31-2e7a72373.0",
|
|
44
44
|
"esbuild": "0.25.9",
|
|
45
45
|
"eslint": "9.11.1",
|
|
46
46
|
"typescript": "5.8.3",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"none": "107 KB"
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "34939aedc7a0555808b0f214d199150a55af924c"
|
|
56
56
|
}
|