@devvit/ui-renderer 0.9.10-next-2023-06-08-62879cbc3.0 → 0.9.10-next-2023-06-08-ff65a79bb.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
import '@reddit/faceplate-ui/templateRenderingStrategy/clientStrategy.js';
|
|
3
|
-
import type { LinkedBundle, Metadata } from '@devvit/protos';
|
|
3
|
+
import type { LinkedBundle, Metadata, Struct } from '@devvit/protos';
|
|
4
4
|
import { Block, RenderPostResponse } from '@devvit/protos';
|
|
5
5
|
import type { ActorRef } from '@devvit/runtimes/common/runtime/ActorRef.js';
|
|
6
6
|
import { BrowserLiteClient } from '@devvit/runtime-lite/BrowserLiteClient.js';
|
|
@@ -17,6 +17,7 @@ export declare class DevvitCustomPost extends LitElement {
|
|
|
17
17
|
actorRef?: ActorRef;
|
|
18
18
|
metadata?: Metadata;
|
|
19
19
|
postId?: string;
|
|
20
|
+
postConfig?: Struct['fields'];
|
|
20
21
|
localRuntimeCode?: Blob;
|
|
21
22
|
bundle?: LinkedBundle;
|
|
22
23
|
useSandbox: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devvit-custom-post.d.ts","sourceRoot":"","sources":["../../library/src/client/devvit-custom-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAIvD,OAAO,kEAAkE,CAAC;AAG1E,OAAO,KAAK,EAOV,YAAY,EACZ,QAAQ,
|
|
1
|
+
{"version":3,"file":"devvit-custom-post.d.ts","sourceRoot":"","sources":["../../library/src/client/devvit-custom-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAIvD,OAAO,kEAAkE,CAAC;AAG1E,OAAO,KAAK,EAOV,YAAY,EACZ,QAAQ,EAER,MAAM,EAGP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,EAKL,kBAAkB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAK9E,OAAO,8BAA8B,CAAC;AACtC,OAAO,gDAAgD,CAAC;AACxD,OAAO,+CAA+C,CAAC;AAEvD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF;AASD,qBACa,gBAAiB,SAAQ,UAAU;;IAE9C,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAGpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAGpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,UAAU,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IAG9B,gBAAgB,CAAC,EAAE,IAAI,CAAC;IAGxB,MAAM,CAAC,EAAE,YAAY,CAAC;IAGtB,UAAU,EAAE,OAAO,CAAQ;IAG3B,cAAc,CAAC,EAAE,kBAAkB,CAAC;IAGpC,SAAS,CAAC,EAAE,KAAK,CAAC;IAclB,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAMvB,iBAAiB;IAKjB,oBAAoB;cASJ,UAAU,CAAC,iBAAiB,EAAE,cAAc;IAqC5D,MAAM;CAiIhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
|
|
@@ -18,7 +18,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
18
18
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
19
19
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
20
20
|
};
|
|
21
|
-
var _DevvitCustomPost_instances, _DevvitCustomPost_postData, _DevvitCustomPost_appState, _DevvitCustomPost_lastRequest, _DevvitCustomPost_customPostActor, _DevvitCustomPost_uiEventHandlerActor, _DevvitCustomPost_rpcQueue, _DevvitCustomPost_rerenderTimeout, _DevvitCustomPost_state_get, _DevvitCustomPost_makeRenderContext, _DevvitCustomPost_handleUIEvent, _DevvitCustomPost_handleUserAction, _DevvitCustomPost_renderRequest, _DevvitCustomPost_initialRender, _DevvitCustomPost_userActionRender, _DevvitCustomPost_effectEventRender, _DevvitCustomPost_renderPost, _DevvitCustomPost_handleEffects;
|
|
21
|
+
var _DevvitCustomPost_instances, _DevvitCustomPost_postData, _DevvitCustomPost_postConfig, _DevvitCustomPost_appState, _DevvitCustomPost_lastRequest, _DevvitCustomPost_customPostActor, _DevvitCustomPost_uiEventHandlerActor, _DevvitCustomPost_rpcQueue, _DevvitCustomPost_rerenderTimeout, _DevvitCustomPost_state_get, _DevvitCustomPost_makeRenderContext, _DevvitCustomPost_handleUIEvent, _DevvitCustomPost_handleUserAction, _DevvitCustomPost_renderRequest, _DevvitCustomPost_initialRender, _DevvitCustomPost_userActionRender, _DevvitCustomPost_effectEventRender, _DevvitCustomPost_renderPost, _DevvitCustomPost_handleEffects;
|
|
22
22
|
import { html, LitElement } from 'lit';
|
|
23
23
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
24
24
|
import PQueue from 'p-queue';
|
|
@@ -36,6 +36,7 @@ let DevvitCustomPost = class DevvitCustomPost extends LitElement {
|
|
|
36
36
|
_DevvitCustomPost_instances.add(this);
|
|
37
37
|
this.useSandbox = true;
|
|
38
38
|
_DevvitCustomPost_postData.set(this, void 0);
|
|
39
|
+
_DevvitCustomPost_postConfig.set(this, void 0);
|
|
39
40
|
_DevvitCustomPost_appState.set(this, {});
|
|
40
41
|
_DevvitCustomPost_lastRequest.set(this, void 0);
|
|
41
42
|
_DevvitCustomPost_customPostActor.set(this, void 0);
|
|
@@ -92,7 +93,9 @@ let DevvitCustomPost = class DevvitCustomPost extends LitElement {
|
|
|
92
93
|
}
|
|
93
94
|
async willUpdate(changedProperties) {
|
|
94
95
|
if (changedProperties.has('postId')) {
|
|
95
|
-
__classPrivateFieldSet(this, _DevvitCustomPost_postData, this.postId !== undefined
|
|
96
|
+
__classPrivateFieldSet(this, _DevvitCustomPost_postData, this.postId !== undefined
|
|
97
|
+
? { __postData: { thingId: this.postId, config: __classPrivateFieldGet(this, _DevvitCustomPost_postConfig, "f") ?? {} } }
|
|
98
|
+
: undefined, "f");
|
|
96
99
|
}
|
|
97
100
|
if (changedProperties.has('localRuntimeCode') && this.localRuntimeCode) {
|
|
98
101
|
this.localClient?.quit();
|
|
@@ -132,7 +135,7 @@ let DevvitCustomPost = class DevvitCustomPost extends LitElement {
|
|
|
132
135
|
</devvit-blocks-renderer>`;
|
|
133
136
|
}
|
|
134
137
|
};
|
|
135
|
-
_DevvitCustomPost_postData = new WeakMap(), _DevvitCustomPost_appState = new WeakMap(), _DevvitCustomPost_lastRequest = new WeakMap(), _DevvitCustomPost_customPostActor = new WeakMap(), _DevvitCustomPost_uiEventHandlerActor = new WeakMap(), _DevvitCustomPost_rpcQueue = new WeakMap(), _DevvitCustomPost_rerenderTimeout = new WeakMap(), _DevvitCustomPost_makeRenderContext = new WeakMap(), _DevvitCustomPost_handleUIEvent = new WeakMap(), _DevvitCustomPost_handleUserAction = new WeakMap(), _DevvitCustomPost_renderRequest = new WeakMap(), _DevvitCustomPost_instances = new WeakSet(), _DevvitCustomPost_state_get = function _DevvitCustomPost_state_get() {
|
|
138
|
+
_DevvitCustomPost_postData = new WeakMap(), _DevvitCustomPost_postConfig = new WeakMap(), _DevvitCustomPost_appState = new WeakMap(), _DevvitCustomPost_lastRequest = new WeakMap(), _DevvitCustomPost_customPostActor = new WeakMap(), _DevvitCustomPost_uiEventHandlerActor = new WeakMap(), _DevvitCustomPost_rpcQueue = new WeakMap(), _DevvitCustomPost_rerenderTimeout = new WeakMap(), _DevvitCustomPost_makeRenderContext = new WeakMap(), _DevvitCustomPost_handleUIEvent = new WeakMap(), _DevvitCustomPost_handleUserAction = new WeakMap(), _DevvitCustomPost_renderRequest = new WeakMap(), _DevvitCustomPost_instances = new WeakSet(), _DevvitCustomPost_state_get = function _DevvitCustomPost_state_get() {
|
|
136
139
|
return Object.assign({}, __classPrivateFieldGet(this, _DevvitCustomPost_postData, "f"), __classPrivateFieldGet(this, _DevvitCustomPost_appState, "f"));
|
|
137
140
|
}, _DevvitCustomPost_initialRender = function _DevvitCustomPost_initialRender() {
|
|
138
141
|
__classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_renderPost).call(this, __classPrivateFieldGet(this, _DevvitCustomPost_renderRequest, "f").call(this, BlockRenderEventType.RENDER_INITIAL));
|
|
@@ -201,6 +204,10 @@ __decorate([
|
|
|
201
204
|
property({ attribute: false }),
|
|
202
205
|
__metadata("design:type", String)
|
|
203
206
|
], DevvitCustomPost.prototype, "postId", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
property({ attribute: false }),
|
|
209
|
+
__metadata("design:type", Object)
|
|
210
|
+
], DevvitCustomPost.prototype, "postConfig", void 0);
|
|
204
211
|
__decorate([
|
|
205
212
|
property({ attribute: false }),
|
|
206
213
|
__metadata("design:type", Blob)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/ui-renderer",
|
|
3
|
-
"version": "0.9.10-next-2023-06-08-
|
|
3
|
+
"version": "0.9.10-next-2023-06-08-ff65a79bb.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
},
|
|
48
48
|
"types": "./index.d.ts",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@devvit/protos": "0.9.10-next-2023-06-08-
|
|
51
|
-
"@devvit/runtime-lite": "0.9.10-next-2023-06-08-
|
|
52
|
-
"@devvit/runtimes": "0.9.10-next-2023-06-08-
|
|
50
|
+
"@devvit/protos": "0.9.10-next-2023-06-08-ff65a79bb.0",
|
|
51
|
+
"@devvit/runtime-lite": "0.9.10-next-2023-06-08-ff65a79bb.0",
|
|
52
|
+
"@devvit/runtimes": "0.9.10-next-2023-06-08-ff65a79bb.0",
|
|
53
53
|
"@lottiefiles/lottie-player": "1.7.1",
|
|
54
54
|
"p-queue": "7.3.4",
|
|
55
55
|
"rxjs": "7.5.7"
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@devvit/eslint-config": "0.9.9",
|
|
78
|
-
"@devvit/public-api": "0.9.10-next-2023-06-08-
|
|
78
|
+
"@devvit/public-api": "0.9.10-next-2023-06-08-ff65a79bb.0",
|
|
79
79
|
"@devvit/repo-tools": "0.9.9",
|
|
80
|
-
"@devvit/tsconfig": "0.9.10-next-2023-06-08-
|
|
80
|
+
"@devvit/tsconfig": "0.9.10-next-2023-06-08-ff65a79bb.0",
|
|
81
81
|
"@lit/localize": "0.11.4",
|
|
82
82
|
"@reddit/baseplate": "0.14.0",
|
|
83
83
|
"@reddit/eslint-plugin-i18n-shreddit": "0.1.0",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"directory": "dist"
|
|
102
102
|
},
|
|
103
103
|
"source": "./src/index.ts",
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "a6a5365232babd846d69e302f82c66357cb10285"
|
|
105
105
|
}
|