@devvit/public-api 0.11.4-next-2024-12-07-be2205f63.0 → 0.11.4
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/apis/ui/UIClient.d.ts.map +1 -1
- package/apis/ui/UIClient.js +2 -4
- package/devvit/internals/blocks/handler/UIClient.d.ts.map +1 -1
- package/devvit/internals/blocks/handler/UIClient.js +2 -4
- package/meta.json +7 -7
- package/meta.min.json +6 -6
- package/package.json +6 -6
- package/public-api.d.ts +2 -32
- package/public-api.iife.js +7 -25
- package/public-api.min.js +2 -2
- package/public-api.min.js.map +3 -3
- package/types/web-view-ui-client.d.ts +1 -20
- package/types/web-view-ui-client.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIClient.d.ts","sourceRoot":"","sources":["../../../src/apis/ui/UIClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAG/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAIhF,qBAAa,QAAS,YAAW,SAAS;;gBAK5B,UAAU,CAAC,EAAE,gBAAgB;IAOzC,IAAI,OAAO,IAAI,eAAe,CAE7B;IAED,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI;IA6C/D,SAAS,CAAC,I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SAAS,EAAE,SAAS,GAAG,IAAI;IACtC,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAC5B,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAClC,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;CAqC7B"}
|
package/apis/ui/UIClient.js
CHANGED
|
@@ -19,15 +19,13 @@ export class UIClient {
|
|
|
19
19
|
_UIClient_effects.set(this, []);
|
|
20
20
|
_UIClient_reconciler.set(this, void 0);
|
|
21
21
|
_UIClient_webViewClient.set(this, void 0);
|
|
22
|
-
_UIClient_postMessage.set(this, (
|
|
23
|
-
const webViewId = message !== undefined ? webViewIdOrMessage : '';
|
|
24
|
-
const msg = message !== undefined ? message : webViewIdOrMessage;
|
|
22
|
+
_UIClient_postMessage.set(this, (webViewId, message) => {
|
|
25
23
|
__classPrivateFieldGet(this, _UIClient_effects, "f").push({
|
|
26
24
|
type: EffectType.EFFECT_WEB_VIEW,
|
|
27
25
|
webView: {
|
|
28
26
|
postMessage: {
|
|
29
27
|
webViewId,
|
|
30
|
-
app: { message
|
|
28
|
+
app: { message },
|
|
31
29
|
},
|
|
32
30
|
},
|
|
33
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIClient.d.ts","sourceRoot":"","sources":["../../../../../src/devvit/internals/blocks/handler/UIClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE/D,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAG9F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,E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AI,SAAS,CAMjC;AAED,qBAAa,QAAS,YAAW,SAAS;;gBAO5B,aAAa,EAAE,aAAa;IAOxC,IAAI,OAAO,IAAI,eAAe,CAE7B;IAED,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI;IAgC/D,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAC7B,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAwB7B,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAC7B,UAAU,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IACtC,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAC5B,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAClC,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;CAgC7B"}
|
|
@@ -29,16 +29,14 @@ export class UIClient {
|
|
|
29
29
|
// Used as part of the dedup key for emitEvent to prevent messages from being dedup'd.
|
|
30
30
|
_UIClient_webViewMessageCount.set(this, 0);
|
|
31
31
|
_UIClient_webViewClient.set(this, void 0);
|
|
32
|
-
_UIClient_webViewPostMessage.set(this, (
|
|
32
|
+
_UIClient_webViewPostMessage.set(this, (webViewId, message) => {
|
|
33
33
|
var _a, _b;
|
|
34
|
-
const webViewId = message !== undefined ? webViewIdOrMessage : '';
|
|
35
|
-
const msg = message !== undefined ? message : webViewIdOrMessage;
|
|
36
34
|
__classPrivateFieldGet(this, _UIClient_renderContext, "f").emitEffect(`postMessage${__classPrivateFieldSet(this, _UIClient_webViewMessageCount, (_b = __classPrivateFieldGet(this, _UIClient_webViewMessageCount, "f"), _a = _b++, _b), "f"), _a}`, {
|
|
37
35
|
type: EffectType.EFFECT_WEB_VIEW,
|
|
38
36
|
webView: {
|
|
39
37
|
postMessage: {
|
|
40
38
|
webViewId,
|
|
41
|
-
app: { message
|
|
39
|
+
app: { message },
|
|
42
40
|
},
|
|
43
41
|
},
|
|
44
42
|
});
|
package/meta.json
CHANGED
|
@@ -3224,7 +3224,7 @@
|
|
|
3224
3224
|
"format": "esm"
|
|
3225
3225
|
},
|
|
3226
3226
|
"../protos/dist/types/devvit/ui/effects/web_view/v1alpha/fullscreen.js": {
|
|
3227
|
-
"bytes":
|
|
3227
|
+
"bytes": 2569,
|
|
3228
3228
|
"imports": [
|
|
3229
3229
|
{
|
|
3230
3230
|
"path": "../../node_modules/protobufjs/minimal.js",
|
|
@@ -10018,7 +10018,7 @@
|
|
|
10018
10018
|
"format": "esm"
|
|
10019
10019
|
},
|
|
10020
10020
|
"src/apis/ui/UIClient.ts": {
|
|
10021
|
-
"bytes":
|
|
10021
|
+
"bytes": 3935,
|
|
10022
10022
|
"imports": [
|
|
10023
10023
|
{
|
|
10024
10024
|
"path": "../protos/dist/index.js",
|
|
@@ -10716,7 +10716,7 @@
|
|
|
10716
10716
|
"format": "esm"
|
|
10717
10717
|
},
|
|
10718
10718
|
"src/devvit/internals/blocks/handler/UIClient.ts": {
|
|
10719
|
-
"bytes":
|
|
10719
|
+
"bytes": 4199,
|
|
10720
10720
|
"imports": [
|
|
10721
10721
|
{
|
|
10722
10722
|
"path": "../protos/dist/index.js",
|
|
@@ -12450,7 +12450,7 @@
|
|
|
12450
12450
|
"bytesInOutput": 2853
|
|
12451
12451
|
},
|
|
12452
12452
|
"../protos/dist/types/devvit/ui/effects/web_view/v1alpha/fullscreen.js": {
|
|
12453
|
-
"bytesInOutput":
|
|
12453
|
+
"bytesInOutput": 2308
|
|
12454
12454
|
},
|
|
12455
12455
|
"../protos/dist/types/devvit/ui/effects/web_view/v1alpha/post_message.js": {
|
|
12456
12456
|
"bytesInOutput": 8779
|
|
@@ -12723,7 +12723,7 @@
|
|
|
12723
12723
|
"bytesInOutput": 1674
|
|
12724
12724
|
},
|
|
12725
12725
|
"src/apis/ui/UIClient.ts": {
|
|
12726
|
-
"bytesInOutput":
|
|
12726
|
+
"bytesInOutput": 3088
|
|
12727
12727
|
},
|
|
12728
12728
|
"src/apis/makeAPIClients.ts": {
|
|
12729
12729
|
"bytesInOutput": 1973
|
|
@@ -12804,7 +12804,7 @@
|
|
|
12804
12804
|
"bytesInOutput": 830
|
|
12805
12805
|
},
|
|
12806
12806
|
"src/devvit/internals/blocks/handler/UIClient.ts": {
|
|
12807
|
-
"bytesInOutput":
|
|
12807
|
+
"bytesInOutput": 3077
|
|
12808
12808
|
},
|
|
12809
12809
|
"src/devvit/internals/blocks/handler/useChannel.ts": {
|
|
12810
12810
|
"bytesInOutput": 5148
|
|
@@ -12915,7 +12915,7 @@
|
|
|
12915
12915
|
"bytesInOutput": 370
|
|
12916
12916
|
}
|
|
12917
12917
|
},
|
|
12918
|
-
"bytes":
|
|
12918
|
+
"bytes": 12683888
|
|
12919
12919
|
}
|
|
12920
12920
|
}
|
|
12921
12921
|
}
|
package/meta.min.json
CHANGED
|
@@ -2878,7 +2878,7 @@
|
|
|
2878
2878
|
"format": "esm"
|
|
2879
2879
|
},
|
|
2880
2880
|
"src/apis/ui/UIClient.ts": {
|
|
2881
|
-
"bytes":
|
|
2881
|
+
"bytes": 3935,
|
|
2882
2882
|
"imports": [
|
|
2883
2883
|
{
|
|
2884
2884
|
"path": "@devvit/protos",
|
|
@@ -3576,7 +3576,7 @@
|
|
|
3576
3576
|
"format": "esm"
|
|
3577
3577
|
},
|
|
3578
3578
|
"src/devvit/internals/blocks/handler/UIClient.ts": {
|
|
3579
|
-
"bytes":
|
|
3579
|
+
"bytes": 4199,
|
|
3580
3580
|
"imports": [
|
|
3581
3581
|
{
|
|
3582
3582
|
"path": "@devvit/protos",
|
|
@@ -4789,7 +4789,7 @@
|
|
|
4789
4789
|
"imports": [],
|
|
4790
4790
|
"exports": [],
|
|
4791
4791
|
"inputs": {},
|
|
4792
|
-
"bytes":
|
|
4792
|
+
"bytes": 1231787
|
|
4793
4793
|
},
|
|
4794
4794
|
"dist/public-api.min.js": {
|
|
4795
4795
|
"imports": [
|
|
@@ -5451,7 +5451,7 @@
|
|
|
5451
5451
|
"bytesInOutput": 668
|
|
5452
5452
|
},
|
|
5453
5453
|
"src/apis/ui/UIClient.ts": {
|
|
5454
|
-
"bytesInOutput":
|
|
5454
|
+
"bytesInOutput": 1334
|
|
5455
5455
|
},
|
|
5456
5456
|
"src/apis/makeAPIClients.ts": {
|
|
5457
5457
|
"bytesInOutput": 848
|
|
@@ -5526,7 +5526,7 @@
|
|
|
5526
5526
|
"bytesInOutput": 65
|
|
5527
5527
|
},
|
|
5528
5528
|
"src/devvit/internals/blocks/handler/UIClient.ts": {
|
|
5529
|
-
"bytesInOutput":
|
|
5529
|
+
"bytesInOutput": 1249
|
|
5530
5530
|
},
|
|
5531
5531
|
"../shared-types/dist/useForm.js": {
|
|
5532
5532
|
"bytesInOutput": 74
|
|
@@ -5634,7 +5634,7 @@
|
|
|
5634
5634
|
"bytesInOutput": 178
|
|
5635
5635
|
}
|
|
5636
5636
|
},
|
|
5637
|
-
"bytes":
|
|
5637
|
+
"bytes": 262544
|
|
5638
5638
|
}
|
|
5639
5639
|
}
|
|
5640
5640
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/public-api",
|
|
3
|
-
"version": "0.11.4
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"types": "./index.d.ts",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@devvit/protos": "0.11.4
|
|
34
|
-
"@devvit/shared-types": "0.11.4
|
|
33
|
+
"@devvit/protos": "0.11.4",
|
|
34
|
+
"@devvit/shared-types": "0.11.4",
|
|
35
35
|
"base64-js": "1.5.1",
|
|
36
36
|
"clone-deep": "4.0.1",
|
|
37
37
|
"core-js": "3.27.2",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@ampproject/filesize": "4.3.0",
|
|
42
|
-
"@devvit/repo-tools": "0.11.4
|
|
43
|
-
"@devvit/tsconfig": "0.11.4
|
|
42
|
+
"@devvit/repo-tools": "0.11.4",
|
|
43
|
+
"@devvit/tsconfig": "0.11.4",
|
|
44
44
|
"@microsoft/api-extractor": "7.41.0",
|
|
45
45
|
"@reddit/faceplate-ui": "18.0.1",
|
|
46
46
|
"@types/clone-deep": "4.0.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"source": "./src/index.ts",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "4e4f06374e9c54e277e08d75bc4b159952dc3e97"
|
|
67
67
|
}
|
package/public-api.d.ts
CHANGED
|
@@ -5060,7 +5060,6 @@ declare const CustomPostDefinition: {
|
|
|
5060
5060
|
fullscreen?: {
|
|
5061
5061
|
show?: boolean;
|
|
5062
5062
|
url?: string;
|
|
5063
|
-
id?: string;
|
|
5064
5063
|
} | undefined;
|
|
5065
5064
|
} | undefined;
|
|
5066
5065
|
type?: EffectType_2;
|
|
@@ -5462,7 +5461,6 @@ declare const CustomPostDefinition: {
|
|
|
5462
5461
|
fullscreen?: {
|
|
5463
5462
|
show?: boolean;
|
|
5464
5463
|
url?: string;
|
|
5465
|
-
id?: string;
|
|
5466
5464
|
} | undefined;
|
|
5467
5465
|
} | undefined;
|
|
5468
5466
|
type?: EffectType_2;
|
|
@@ -6086,7 +6084,6 @@ declare const CustomPostDefinition: {
|
|
|
6086
6084
|
fullscreen?: {
|
|
6087
6085
|
show?: boolean;
|
|
6088
6086
|
url?: string;
|
|
6089
|
-
id?: string;
|
|
6090
6087
|
} | undefined;
|
|
6091
6088
|
} | undefined;
|
|
6092
6089
|
type?: EffectType_2;
|
|
@@ -6488,7 +6485,6 @@ declare const CustomPostDefinition: {
|
|
|
6488
6485
|
fullscreen?: {
|
|
6489
6486
|
show?: boolean;
|
|
6490
6487
|
url?: string;
|
|
6491
|
-
id?: string;
|
|
6492
6488
|
} | undefined;
|
|
6493
6489
|
} | undefined;
|
|
6494
6490
|
type?: EffectType_2;
|
|
@@ -52827,19 +52823,12 @@ declare const WebViewFullScreenEvent: {
|
|
|
52827
52823
|
fromPartial(object: DeepPartial_74<WebViewFullScreenEvent>): WebViewFullScreenEvent;
|
|
52828
52824
|
};
|
|
52829
52825
|
|
|
52830
|
-
/** Sent to launch a
|
|
52826
|
+
/** Sent to launch a full-screen WebView experience */
|
|
52831
52827
|
declare interface WebViewFullScreenVisibilityEffect {
|
|
52832
52828
|
/** True if app wants to show the WebView, false if the app wants to close an open WebView */
|
|
52833
52829
|
show: boolean;
|
|
52834
52830
|
/** URL to load in the fullscreen WebView */
|
|
52835
52831
|
url: string;
|
|
52836
|
-
/**
|
|
52837
|
-
* ID to associate with the newly created WebView. Although only one can be visible at a time,
|
|
52838
|
-
* it's possible for an app to define multiple fullscreen WebViews to launch at various times.
|
|
52839
|
-
* In order to route messages back and forth between the correct WebView on the client and the
|
|
52840
|
-
* associated callbacks within the app we need a stable identifier.
|
|
52841
|
-
*/
|
|
52842
|
-
id: string;
|
|
52843
52832
|
}
|
|
52844
52833
|
|
|
52845
52834
|
declare const WebViewFullScreenVisibilityEffect: {
|
|
@@ -52912,28 +52901,9 @@ declare const WebViewStateMessage: {
|
|
|
52912
52901
|
|
|
52913
52902
|
declare interface WebViewUIClient {
|
|
52914
52903
|
/**
|
|
52915
|
-
* Send a message to a
|
|
52916
|
-
* Any WebView can receive this message. If your app contains different WebViews with specific
|
|
52917
|
-
* IDs you can target a specific WebView with the alternate overload: postMessage('id', message);
|
|
52918
|
-
*
|
|
52904
|
+
* Send a message to a webview
|
|
52919
52905
|
* Message will arrive via window.onmessage and will be wrapped in an object:
|
|
52920
52906
|
* { type: 'devvit-message', data: { message } }
|
|
52921
|
-
*
|
|
52922
|
-
* If no WebViews are present an error will be logged to the console.
|
|
52923
|
-
*
|
|
52924
|
-
* @param message
|
|
52925
|
-
*/
|
|
52926
|
-
postMessage<T extends JSONValue>(message: T): void;
|
|
52927
|
-
/**
|
|
52928
|
-
* Send a message to a specific WebView in your UI
|
|
52929
|
-
*
|
|
52930
|
-
* Message will arrive via window.onmessage and will be wrapped in an object:
|
|
52931
|
-
* { type: 'devvit-message', data: { message } }
|
|
52932
|
-
*
|
|
52933
|
-
* If a WebView with the given ID is not found an error will be logged to the console.
|
|
52934
|
-
*
|
|
52935
|
-
* @param webviewId
|
|
52936
|
-
* @param message
|
|
52937
52907
|
*/
|
|
52938
52908
|
postMessage<T extends JSONValue>(webviewId: string, message: T): void;
|
|
52939
52909
|
}
|