@devvit/shared 0.11.18-next-2025-06-27-18-46-23-2ea00e698.0 → 0.11.18-next-2025-06-30-21-42-07-dd2300c6a.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/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +2 -0
- package/package.json +6 -6
- package/types/ui-response.d.ts +31 -0
- package/types/ui-response.d.ts.map +1 -0
- package/types/ui-response.js +1 -0
package/index.d.ts
CHANGED
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/shared",
|
|
3
|
-
"version": "0.11.18-next-2025-06-
|
|
3
|
+
"version": "0.11.18-next-2025-06-30-21-42-07-dd2300c6a.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
},
|
|
24
24
|
"types": "./index.d.ts",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@devvit/protos": "0.11.18-next-2025-06-
|
|
27
|
-
"@devvit/shared-types": "0.11.18-next-2025-06-
|
|
26
|
+
"@devvit/protos": "0.11.18-next-2025-06-30-21-42-07-dd2300c6a.0",
|
|
27
|
+
"@devvit/shared-types": "0.11.18-next-2025-06-30-21-42-07-dd2300c6a.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@devvit/repo-tools": "0.11.18-next-2025-06-
|
|
31
|
-
"@devvit/tsconfig": "0.11.18-next-2025-06-
|
|
30
|
+
"@devvit/repo-tools": "0.11.18-next-2025-06-30-21-42-07-dd2300c6a.0",
|
|
31
|
+
"@devvit/tsconfig": "0.11.18-next-2025-06-30-21-42-07-dd2300c6a.0",
|
|
32
32
|
"eslint": "9.11.1",
|
|
33
33
|
"typescript": "5.8.3",
|
|
34
34
|
"vitest": "1.6.1"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"directory": "dist"
|
|
38
38
|
},
|
|
39
39
|
"source": "./src/index.ts",
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "146ec2d44e1fcd91f5ea21c0d5209dc761f87e8e"
|
|
41
41
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Form, FormValues } from './form.js';
|
|
2
|
+
/**
|
|
3
|
+
* Response format that can be returned from menu action handlers and form handlers.
|
|
4
|
+
*
|
|
5
|
+
* This will create client-side UI effects in Reddit clients as responses to user
|
|
6
|
+
* actions in cases where the Devvit app is not in the direct code path.
|
|
7
|
+
*/
|
|
8
|
+
export type UiResponse = {
|
|
9
|
+
/** Navigate the user's reddit client to this URL or Reddit Thing (containing `url`). */
|
|
10
|
+
navigateTo?: string | {
|
|
11
|
+
url: string;
|
|
12
|
+
};
|
|
13
|
+
/** Show a toast to the user's reddit client. */
|
|
14
|
+
showToast?: string | Toast;
|
|
15
|
+
/** Display a form in the user's reddit client. */
|
|
16
|
+
showForm?: {
|
|
17
|
+
/** Name of the form. This must match a configured form in devvit.json. */
|
|
18
|
+
name: string;
|
|
19
|
+
/** Specification for the form to display to the user */
|
|
20
|
+
form: Form;
|
|
21
|
+
/** Data to initially populate form fields with */
|
|
22
|
+
data?: FormValues | undefined;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type Toast = {
|
|
26
|
+
/** The message shown within the toast */
|
|
27
|
+
text: string;
|
|
28
|
+
/** The appearance of the toast */
|
|
29
|
+
appearance?: 'neutral' | 'success';
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=ui-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-response.d.ts","sourceRoot":"","sources":["../../src/types/ui-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,wFAAwF;IACxF,UAAU,CAAC,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC3B,kDAAkD;IAClD,QAAQ,CAAC,EAAE;QACT,0EAA0E;QAC1E,IAAI,EAAE,MAAM,CAAC;QACb,wDAAwD;QACxD,IAAI,EAAE,IAAI,CAAC;QACX,kDAAkD;QAClD,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;KAC/B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|