@devvit/splash 0.11.20-next-2025-07-31-00-19-34-263fd4edc.0 → 0.11.20-next-2025-07-31-16-54-28-28f22dff5.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/app-icon.d.ts +1 -1
- package/app-icon.js +5 -5
- package/background.js +2 -2
- package/loading.d.ts +1 -1
- package/package.json +5 -5
- package/splash.d.ts +2 -2
- package/splash.js +2 -2
- package/utils/assets.d.ts +2 -2
- package/utils/assets.js +2 -2
package/app-icon.d.ts
CHANGED
package/app-icon.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Devvit } from '@devvit/public-api';
|
|
2
|
-
import {
|
|
2
|
+
import { iconShadowUrl } from './utils/assets.js';
|
|
3
3
|
import { getColor } from './utils/color-util.js';
|
|
4
4
|
import { getAbbreviation } from './utils/get-abbreviation.js';
|
|
5
5
|
export function AppIcon(props) {
|
|
6
6
|
return (Devvit.createElement("zstack", { height: "96px", width: "96px", alignment: "center middle" },
|
|
7
|
-
Devvit.createElement("image", { url:
|
|
8
|
-
!!props.
|
|
9
|
-
Devvit.createElement("image", { url: props.
|
|
10
|
-
!props.
|
|
7
|
+
Devvit.createElement("image", { url: iconShadowUrl, imageWidth: 192, imageHeight: 192, height: "100%", width: "100%", description: "Icon shadow" }),
|
|
8
|
+
!!props.imageUrl && (Devvit.createElement("zstack", { height: "64px", width: "64px", alignment: "center middle", cornerRadius: "medium" },
|
|
9
|
+
Devvit.createElement("image", { url: props.imageUrl, imageWidth: 256, imageHeight: 256, height: "100%", width: "100%", description: `${props.name} icon` }))),
|
|
10
|
+
!props.imageUrl && (Devvit.createElement("zstack", { height: "64px", width: "64px", backgroundColor: getColor(props.name), borderColor: "rgba(0, 0, 0, 0.1)", border: "thin", cornerRadius: "medium", alignment: "center middle" },
|
|
11
11
|
Devvit.createElement("text", { size: "xxlarge", color: "white", weight: "bold" }, getAbbreviation(props.name))))));
|
|
12
12
|
}
|
package/background.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Devvit } from '@devvit/public-api';
|
|
2
|
-
import {
|
|
2
|
+
import { backgroundUrl } from './utils/assets.js';
|
|
3
3
|
/** @internal */
|
|
4
4
|
export function BackgroundImage(props) {
|
|
5
|
-
return (Devvit.createElement("image", { url: 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
6
|
}
|
package/loading.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/splash",
|
|
3
|
-
"version": "0.11.20-next-2025-07-31-
|
|
3
|
+
"version": "0.11.20-next-2025-07-31-16-54-28-28f22dff5.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-31-
|
|
26
|
+
"@devvit/public-api": "0.11.20-next-2025-07-31-16-54-28-28f22dff5.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@devvit/repo-tools": "0.11.20-next-2025-07-31-
|
|
30
|
-
"@devvit/tsconfig": "0.11.20-next-2025-07-31-
|
|
29
|
+
"@devvit/repo-tools": "0.11.20-next-2025-07-31-16-54-28-28f22dff5.0",
|
|
30
|
+
"@devvit/tsconfig": "0.11.20-next-2025-07-31-16-54-28-28f22dff5.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": "5e44e17bd3c08da5e6975f3169f44762d3eb0c7d"
|
|
40
40
|
}
|
package/splash.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type SplashProps = {
|
|
|
6
6
|
*
|
|
7
7
|
* @example `'icon.png'`.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
appIconUri?: string | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* The text of the web view launch button.
|
|
12
12
|
* @default `'Launch App'`
|
|
@@ -20,7 +20,7 @@ export type SplashProps = {
|
|
|
20
20
|
* @example `'game.html'`.
|
|
21
21
|
* @default `'index.html'`.
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
entryUri?: string | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* Large text naming the post.
|
|
26
26
|
*
|
package/splash.js
CHANGED
|
@@ -3,12 +3,12 @@ import { AppIcon } from './app-icon.js';
|
|
|
3
3
|
import { BackgroundImage } from './background.js';
|
|
4
4
|
import {} from './loading.js';
|
|
5
5
|
export function Splash(props) {
|
|
6
|
-
const webView = useWebView({ url: props.
|
|
6
|
+
const webView = useWebView({ url: props.entryUri ?? 'index.html', onMessage() { } });
|
|
7
7
|
return (Devvit.createElement("blocks", { height: props.height },
|
|
8
8
|
Devvit.createElement("zstack", { height: "100%", width: "100%", onPress: webView.mount },
|
|
9
9
|
Devvit.createElement(BackgroundImage, { ...props }),
|
|
10
10
|
Devvit.createElement("vstack", { height: "100%", width: "100%", alignment: "center middle", padding: "medium" },
|
|
11
|
-
Devvit.createElement(AppIcon, { name: props.appDisplayName,
|
|
11
|
+
Devvit.createElement(AppIcon, { name: props.appDisplayName, imageUrl: props.appIconUri }),
|
|
12
12
|
Devvit.createElement("text", { size: "xxlarge", weight: "bold", color: "neutral-content-strong", width: "100%", alignment: "center", wrap: true }, props.title ?? props.appDisplayName),
|
|
13
13
|
Devvit.createElement("spacer", { height: "4px" }),
|
|
14
14
|
Devvit.createElement("text", { size: "large", color: "neutral-content", width: "100%", alignment: "center", wrap: true }, props.description ?? ''),
|
package/utils/assets.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const iconShadowUrl: string;
|
|
2
|
+
export declare const backgroundUrl: string;
|
|
3
3
|
//# sourceMappingURL=assets.d.ts.map
|
package/utils/assets.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// https://github.snooguts.net/knut-synstad/splash-screen/blob/f6d6816/assets/icon-shadow.png
|
|
2
|
-
export const
|
|
2
|
+
export const iconShadowUrl = 'https://i.redd.it/53aztgp96pdf1.png';
|
|
3
3
|
// https://github.snooguts.net/knut-synstad/splash-screen/blob/f6d6816/assets/pattern-background.png
|
|
4
|
-
export const
|
|
4
|
+
export const backgroundUrl = 'https://i.redd.it/cpsxzbp96pdf1.png';
|