@devvit/splash 0.11.20-next-2025-07-28-22-27-23-0f9ecc6ab.0 → 0.11.20-next-2025-07-29-04-29-31-36003bf76.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.
- package/loading.d.ts +0 -5
- package/loading.d.ts.map +1 -1
- package/loading.js +2 -3
- package/package.json +5 -5
- package/splash.d.ts +3 -6
- package/splash.d.ts.map +1 -1
- package/splash.js +12 -14
- package/background.d.ts +0 -4
- package/background.d.ts.map +0 -1
- package/background.js +0 -6
package/loading.d.ts
CHANGED
|
@@ -11,11 +11,6 @@ export type LoadingProps = {
|
|
|
11
11
|
* @example `'background.png'`.
|
|
12
12
|
*/
|
|
13
13
|
backgroundURI?: string | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Inline post height.
|
|
16
|
-
* @default `'regular'`
|
|
17
|
-
*/
|
|
18
|
-
height?: 'regular' | 'tall' | undefined;
|
|
19
14
|
};
|
|
20
15
|
export declare function Loading(props: Readonly<LoadingProps>): JSX.Element;
|
|
21
16
|
//# sourceMappingURL=loading.d.ts.map
|
package/loading.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../src/loading.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG;IACzB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../src/loading.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG;IACzB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,wBAAgB,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC,OAAO,CAYlE"}
|
package/loading.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Devvit } from '@devvit/public-api';
|
|
2
|
-
import {
|
|
2
|
+
import { backgroundURL } from './utils/assets.js';
|
|
3
3
|
export function Loading(props) {
|
|
4
|
-
return (Devvit.createElement("
|
|
5
|
-
Devvit.createElement(BackgroundImage, { ...props })));
|
|
4
|
+
return (Devvit.createElement("image", { url: props.backgroundURI ?? backgroundURL, imageWidth: 2048, imageHeight: 1024, height: "100%", width: "100%", resizeMode: "cover", description: `${props.appDisplayName} loading screen` }));
|
|
6
5
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/splash",
|
|
3
|
-
"version": "0.11.20-next-2025-07-
|
|
3
|
+
"version": "0.11.20-next-2025-07-29-04-29-31-36003bf76.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"types": "./index.d.ts",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@devvit/public-api": "0.11.20-next-2025-07-
|
|
26
|
+
"@devvit/public-api": "0.11.20-next-2025-07-29-04-29-31-36003bf76.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@devvit/repo-tools": "0.11.20-next-2025-07-
|
|
30
|
-
"@devvit/tsconfig": "0.11.20-next-2025-07-
|
|
29
|
+
"@devvit/repo-tools": "0.11.20-next-2025-07-29-04-29-31-36003bf76.0",
|
|
30
|
+
"@devvit/tsconfig": "0.11.20-next-2025-07-29-04-29-31-36003bf76.0",
|
|
31
31
|
"eslint": "9.11.1",
|
|
32
32
|
"typescript": "5.8.3",
|
|
33
33
|
"vitest": "1.6.1"
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"directory": "dist"
|
|
37
37
|
},
|
|
38
38
|
"source": "./src/index.ts",
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "a0682bfdb82f462bc10733be3da00adc04dcf8da"
|
|
40
40
|
}
|
package/splash.d.ts
CHANGED
|
@@ -7,20 +7,17 @@ export type SplashProps = {
|
|
|
7
7
|
* @example `'icon.png'`.
|
|
8
8
|
*/
|
|
9
9
|
appIconURI?: string | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* The text of the web view launch button.
|
|
12
|
-
* @default `'Launch App'`
|
|
13
|
-
*/
|
|
10
|
+
/** The text of the web view launch button. */
|
|
14
11
|
buttonLabel?: string | undefined;
|
|
15
12
|
/** Secondary text describing the post. */
|
|
16
13
|
description?: string | undefined;
|
|
17
14
|
/**
|
|
18
|
-
* Web view
|
|
15
|
+
* Web view URL relative client directory.
|
|
19
16
|
*
|
|
20
17
|
* @example `'game.html'`.
|
|
21
18
|
* @default `'index.html'`.
|
|
22
19
|
*/
|
|
23
|
-
|
|
20
|
+
entryURL?: string | undefined;
|
|
24
21
|
/**
|
|
25
22
|
* Large text naming the post.
|
|
26
23
|
*
|
package/splash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splash.d.ts","sourceRoot":"","sources":["../src/splash.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"splash.d.ts","sourceRoot":"","sources":["../src/splash.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAE1D,gCAAgC;AAChC,MAAM,MAAM,WAAW,GAAG;IACxB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,GAAG,YAAY,CAAC;AAEjB,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC,OAAO,CAkChE"}
|
package/splash.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { Devvit, useWebView } from '@devvit/public-api';
|
|
2
2
|
import { AppIcon } from './app-icon.js';
|
|
3
|
-
import {
|
|
4
|
-
import {} from './loading.js';
|
|
3
|
+
import { Loading } from './loading.js';
|
|
5
4
|
export function Splash(props) {
|
|
6
|
-
const webView = useWebView({ url: props.
|
|
7
|
-
return (Devvit.createElement("
|
|
8
|
-
Devvit.createElement(
|
|
9
|
-
|
|
10
|
-
Devvit.createElement(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Devvit.createElement("spacer", { height: "16px" })))));
|
|
5
|
+
const webView = useWebView({ url: props.entryURL ?? 'index.html', onMessage() { } });
|
|
6
|
+
return (Devvit.createElement("zstack", { height: "100%", width: "100%" },
|
|
7
|
+
Devvit.createElement(Loading, { ...props }),
|
|
8
|
+
Devvit.createElement("vstack", { height: "100%", width: "100%", alignment: "center middle", padding: "medium" },
|
|
9
|
+
Devvit.createElement(AppIcon, { name: props.appDisplayName, imageURL: props.appIconURI }),
|
|
10
|
+
Devvit.createElement("text", { size: "xxlarge", weight: "bold", color: "neutral-content-strong", width: "100%", alignment: "center", wrap: true }, props.title ?? props.appDisplayName),
|
|
11
|
+
Devvit.createElement("spacer", { height: "4px" }),
|
|
12
|
+
Devvit.createElement("text", { size: "large", color: "neutral-content", width: "100%", alignment: "center", wrap: true }, props.description ?? ''),
|
|
13
|
+
Devvit.createElement("spacer", { height: "16px" }),
|
|
14
|
+
Devvit.createElement("button", { appearance: "primary", size: "medium", onPress: webView.mount }, props.buttonLabel ?? 'Launch App'),
|
|
15
|
+
Devvit.createElement("spacer", { height: "16px" }))));
|
|
18
16
|
}
|
package/background.d.ts
DELETED
package/background.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../src/background.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,gBAAgB;AAEhB,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC,OAAO,CAY1E"}
|
package/background.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Devvit } from '@devvit/public-api';
|
|
2
|
-
import { backgroundURL } from './utils/assets.js';
|
|
3
|
-
/** @internal */
|
|
4
|
-
export function BackgroundImage(props) {
|
|
5
|
-
return (Devvit.createElement("image", { url: props.backgroundURI ?? backgroundURL, imageWidth: 2048, imageHeight: 1024, height: "100%", width: "100%", resizeMode: "cover", description: `${props.appDisplayName} loading screen` }));
|
|
6
|
-
}
|