@devvit/ui-renderer 0.10.15-next-2024-02-12-3ee5af35d.0 → 0.10.15-next-2024-02-12-96a7f2dbb.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,7 @@
|
|
|
1
1
|
import '@reddit/faceplate-ui/templateRenderingStrategy/clientStrategy.js';
|
|
2
2
|
import type { BlockAction, Effect, LinkedBundle, Metadata, RenderPostResponse, Struct, UIEvent } from '@devvit/protos';
|
|
3
3
|
import { RealtimeEvent } from '@devvit/protos';
|
|
4
|
+
import { WorkerErrorType } from '@devvit/runtime-lite/client/BrowserLiteClient.js';
|
|
4
5
|
import type { ActorRef } from '@devvit/runtimes/common/runtime/ActorRef.js';
|
|
5
6
|
import { FaceplateEvent } from '@reddit/faceplate/event-types.js';
|
|
6
7
|
import { LitElement, PropertyValues } from 'lit';
|
|
@@ -12,44 +13,61 @@ declare global {
|
|
|
12
13
|
'devvit-custom-post': DevvitCustomPost;
|
|
13
14
|
}
|
|
14
15
|
interface HTMLElementEventMap {
|
|
16
|
+
'devvit-realtime-send': DevvitRealtimeSendEvent;
|
|
15
17
|
'devvit-ui-effect': DevvitUIEffectEvent;
|
|
16
|
-
'devvit-
|
|
17
|
-
|
|
18
|
+
'devvit-ui-error': FaceplateEvent<'devvit-ui-error'> & {
|
|
19
|
+
detail: DevvitUIError;
|
|
20
|
+
};
|
|
21
|
+
'devvit-user-action': DevvitUserActionEvent;
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
|
-
export type DevvitRealtimeSend =
|
|
21
|
-
|
|
22
|
-
event: RealtimeEvent;
|
|
23
|
-
}>;
|
|
24
|
+
export type DevvitRealtimeSend = {
|
|
25
|
+
event: RealtimeEvent;
|
|
24
26
|
};
|
|
25
|
-
export type
|
|
26
|
-
detail:
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
export type DevvitRealtimeSendEvent = FaceplateEvent<'devvit-realtime-send'> & {
|
|
28
|
+
detail: DevvitRealtimeSend;
|
|
29
|
+
};
|
|
30
|
+
export type DevvitUIEffect = {
|
|
31
|
+
effect: Effect;
|
|
32
|
+
onEvent(event: UIEvent): void;
|
|
29
33
|
};
|
|
30
34
|
export type DevvitUIEffectEvent = FaceplateEvent<'devvit-ui-effect'> & {
|
|
31
|
-
detail:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
detail: DevvitUIEffect;
|
|
36
|
+
};
|
|
37
|
+
export type DevvitUIError = {
|
|
38
|
+
type: WorkerErrorType;
|
|
39
|
+
err: unknown;
|
|
40
|
+
};
|
|
41
|
+
export type DevvitUserAction = {
|
|
42
|
+
action: BlockAction;
|
|
43
|
+
};
|
|
44
|
+
export type DevvitUserActionEvent = FaceplateEvent<'devvit-user-action'> & {
|
|
45
|
+
detail: DevvitUserAction;
|
|
35
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Blocks program renderer.
|
|
49
|
+
*
|
|
50
|
+
* Assumes the loaded program is a CustomPost & UIEventHandler.
|
|
51
|
+
*
|
|
52
|
+
* @slot - Loading / unloaded state.
|
|
53
|
+
*/
|
|
36
54
|
export declare class DevvitCustomPost extends LitElement {
|
|
37
55
|
#private;
|
|
38
56
|
/** Probably a wrapper around the remote runtime (compute-go). */
|
|
39
|
-
actorRef?: ActorRef;
|
|
40
|
-
bundle?: LinkedBundle;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
57
|
+
actorRef?: ActorRef | undefined;
|
|
58
|
+
bundle?: LinkedBundle | undefined;
|
|
59
|
+
localRuntimeCode?: Blob | undefined;
|
|
60
|
+
metadata?: Metadata | undefined;
|
|
61
|
+
postConfig?: Struct['fields'] | undefined;
|
|
62
|
+
postId?: string | undefined;
|
|
63
|
+
scheme?: 'dark' | 'light' | undefined;
|
|
46
64
|
useExperimentalBlocks: boolean;
|
|
47
65
|
useSandbox: boolean;
|
|
48
|
-
renderResponse?: RenderPostResponse;
|
|
66
|
+
renderResponse?: RenderPostResponse | undefined;
|
|
49
67
|
private _blocksRenderer;
|
|
50
68
|
private _isSuspended;
|
|
51
69
|
private _rootBlock?;
|
|
52
|
-
|
|
70
|
+
constructor();
|
|
53
71
|
disconnectedCallback(): void;
|
|
54
72
|
rerender(): void;
|
|
55
73
|
static get styles(): import("lit").CSSResult[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devvit-custom-post.d.ts","sourceRoot":"","sources":["../../library/src/client/devvit-custom-post.ts"],"names":[],"mappings":"AAAA,OAAO,kEAAkE,CAAC;AAE1E,OAAO,KAAK,EAEV,WAAW,EAGX,MAAM,EAGN,YAAY,EACZ,QAAQ,EAER,kBAAkB,EAClB,MAAM,EACN,OAAO,EAER,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAOL,aAAa,EAEd,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"devvit-custom-post.d.ts","sourceRoot":"","sources":["../../library/src/client/devvit-custom-post.ts"],"names":[],"mappings":"AAAA,OAAO,kEAAkE,CAAC;AAE1E,OAAO,KAAK,EAEV,WAAW,EAGX,MAAM,EAGN,YAAY,EACZ,QAAQ,EAER,kBAAkB,EAClB,MAAM,EACN,OAAO,EAER,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAOL,aAAa,EAEd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,eAAe,EAChB,MAAM,kDAAkD,CAAC;AAG1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAQ,MAAM,KAAK,CAAC;AASvD,OAAO,gDAAgD,CAAC;AACxD,OAAO,+CAA+C,CAAC;AACvD,OAAO,8BAA8B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;IACD,UAAU,mBAAmB;QAC3B,sBAAsB,EAAE,uBAAuB,CAAC;QAChD,kBAAkB,EAAE,mBAAmB,CAAC;QACxC,iBAAiB,EAAE,cAAc,CAAC,iBAAiB,CAAC,GAAG;YAAE,MAAM,EAAE,aAAa,CAAA;SAAE,CAAC;QACjF,oBAAoB,EAAE,qBAAqB,CAAC;KAC7C;CACF;AAED,MAAM,MAAM,kBAAkB,GAAG;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,CAAC;AAC1D,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,sBAAsB,CAAC,GAAG;IAC7E,MAAM,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,CAAC;AAC/E,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,kBAAkB,CAAC,GAAG;IAAE,MAAM,EAAE,cAAc,CAAA;CAAE,CAAC;AAClG,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,CAAC;AACvD,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,oBAAoB,CAAC,GAAG;IACzE,MAAM,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAiBF;;;;;;GAMG;AACH,qBACa,gBAAiB,SAAQ,UAAU;;IAC9C,iEAAiE;IACjC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IAClC,gBAAgB,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAEzE,qBAAqB,EAAE,OAAO,CAAS;IACgB,UAAU,EAAE,OAAO,CAAQ;IACzE,cAAc,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAGxB,OAAO,CAAC,eAAe,CAAwB;IAGvE,OAAO,CAAC,YAAY,CAAkB;IAItC,OAAO,CAAC,UAAU,CAAC,CAAQ;;IAY3B,oBAAoB,IAAI,IAAI;IAKrC,QAAQ,IAAI,IAAI;IAIhB,WAAoB,MAAM,8BAEzB;IAED,WAAW,IAAI,IAAI;cAQA,MAAM;cAoBA,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CA2NhF"}
|
|
@@ -18,10 +18,10 @@ 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_appState, _DevvitCustomPost_customPostActor, _DevvitCustomPost_hasInitialRender, _DevvitCustomPost_lastRequest, _DevvitCustomPost_localClient, _DevvitCustomPost_rerenderTimeout, _DevvitCustomPost_rootHeight, _DevvitCustomPost_rpcQueue, _DevvitCustomPost_uiEventHandlerActor, _DevvitCustomPost_effectEventRender, _DevvitCustomPost_handleEffects, _DevvitCustomPost_handleUserAction, _DevvitCustomPost_initialRender, _DevvitCustomPost_makeRenderContext, _DevvitCustomPost_newRenderRequest, _DevvitCustomPost_onPluginCall, _DevvitCustomPost_processEvent, _DevvitCustomPost_queueEvent, _DevvitCustomPost_queueRenderPost, _DevvitCustomPost_renderPost, _DevvitCustomPost_state_get, _DevvitCustomPost_userActionRender;
|
|
21
|
+
var _DevvitCustomPost_instances, _DevvitCustomPost_appState, _DevvitCustomPost_customPostActor, _DevvitCustomPost_hasInitialRender, _DevvitCustomPost_lastRequest, _DevvitCustomPost_localClient, _DevvitCustomPost_rerenderTimeout, _DevvitCustomPost_rootHeight, _DevvitCustomPost_rpcQueue, _DevvitCustomPost_uiEventHandlerActor, _DevvitCustomPost_bubble, _DevvitCustomPost_effectEventRender, _DevvitCustomPost_handleEffects, _DevvitCustomPost_handleUserAction, _DevvitCustomPost_initialRender, _DevvitCustomPost_makeRenderContext, _DevvitCustomPost_newRenderRequest, _DevvitCustomPost_onPluginCall, _DevvitCustomPost_processEvent, _DevvitCustomPost_queueEvent, _DevvitCustomPost_queueRenderPost, _DevvitCustomPost_renderPost, _DevvitCustomPost_state_get, _DevvitCustomPost_userActionRender;
|
|
22
22
|
import '@reddit/faceplate-ui/templateRenderingStrategy/clientStrategy.js';
|
|
23
23
|
import { BlockConfig_Root, BlockRenderEventType, BlockStackDirection, CustomPostDefinition, EffectType, RealtimeDefinition, UIEventHandlerDefinition, } from '@devvit/protos';
|
|
24
|
-
import { BrowserLiteClient } from '@devvit/runtime-lite/client/BrowserLiteClient.js';
|
|
24
|
+
import { BrowserLiteClient, } from '@devvit/runtime-lite/client/BrowserLiteClient.js';
|
|
25
25
|
import { isCircuitBreaker } from '@devvit/runtime-lite/types/CircuitBreaker.js';
|
|
26
26
|
import { customEvent } from '@reddit/faceplate/lib/custom-event.js';
|
|
27
27
|
import { LitElement, html } from 'lit';
|
|
@@ -41,9 +41,16 @@ const USER_ACTION_EFFECTS = [
|
|
|
41
41
|
EffectType.EFFECT_SHOW_FORM,
|
|
42
42
|
EffectType.EFFECT_NAVIGATE_TO_URL,
|
|
43
43
|
];
|
|
44
|
+
/**
|
|
45
|
+
* Blocks program renderer.
|
|
46
|
+
*
|
|
47
|
+
* Assumes the loaded program is a CustomPost & UIEventHandler.
|
|
48
|
+
*
|
|
49
|
+
* @slot - Loading / unloaded state.
|
|
50
|
+
*/
|
|
44
51
|
let DevvitCustomPost = class DevvitCustomPost extends LitElement {
|
|
45
52
|
constructor() {
|
|
46
|
-
super(
|
|
53
|
+
super();
|
|
47
54
|
_DevvitCustomPost_instances.add(this);
|
|
48
55
|
this.useExperimentalBlocks = false;
|
|
49
56
|
this.useSandbox = true;
|
|
@@ -55,6 +62,7 @@ let DevvitCustomPost = class DevvitCustomPost extends LitElement {
|
|
|
55
62
|
_DevvitCustomPost_localClient.set(this, void 0);
|
|
56
63
|
_DevvitCustomPost_rerenderTimeout.set(this, void 0);
|
|
57
64
|
_DevvitCustomPost_rootHeight.set(this, void 0);
|
|
65
|
+
// No concurrency is used to enforce order.
|
|
58
66
|
_DevvitCustomPost_rpcQueue.set(this, new PQueue({ concurrency: 1 }));
|
|
59
67
|
_DevvitCustomPost_uiEventHandlerActor.set(this, void 0);
|
|
60
68
|
_DevvitCustomPost_handleUserAction.set(this, async (event) => {
|
|
@@ -73,24 +81,19 @@ let DevvitCustomPost = class DevvitCustomPost extends LitElement {
|
|
|
73
81
|
_DevvitCustomPost_onPluginCall.set(this, (id, serviceName, method, args) => {
|
|
74
82
|
if (serviceName === RealtimeDefinition.fullName &&
|
|
75
83
|
method === RealtimeDefinition.methods.send.name) {
|
|
76
|
-
this.
|
|
84
|
+
__classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_bubble).call(this, 'devvit-realtime-send', { event: args });
|
|
77
85
|
__classPrivateFieldGet(this, _DevvitCustomPost_localClient, "f")?.onPluginResponse(id, { error: undefined, success: true, value: {} });
|
|
78
86
|
}
|
|
79
87
|
});
|
|
80
88
|
_DevvitCustomPost_queueEvent.set(this, async (ev) => {
|
|
81
89
|
await __classPrivateFieldGet(this, _DevvitCustomPost_rpcQueue, "f").add(() => __classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_processEvent).call(this, ev));
|
|
82
90
|
});
|
|
83
|
-
}
|
|
84
|
-
connectedCallback() {
|
|
85
|
-
super.connectedCallback();
|
|
86
91
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
87
92
|
this.addEventListener('devvit-user-action', __classPrivateFieldGet(this, _DevvitCustomPost_handleUserAction, "f"));
|
|
88
93
|
}
|
|
89
94
|
disconnectedCallback() {
|
|
90
|
-
super.disconnectedCallback();
|
|
91
95
|
this.suspendPost();
|
|
92
|
-
|
|
93
|
-
this.removeEventListener('devvit-user-action', __classPrivateFieldGet(this, _DevvitCustomPost_handleUserAction, "f"));
|
|
96
|
+
super.disconnectedCallback();
|
|
94
97
|
}
|
|
95
98
|
rerender() {
|
|
96
99
|
this._blocksRenderer?.requestUpdate();
|
|
@@ -112,7 +115,7 @@ let DevvitCustomPost = class DevvitCustomPost extends LitElement {
|
|
|
112
115
|
}
|
|
113
116
|
return html `<div class="relative">
|
|
114
117
|
<devvit-blocks-renderer
|
|
115
|
-
class="${this.
|
|
118
|
+
class="${this.scheme ?? ''}"
|
|
116
119
|
.block="${this._rootBlock}"
|
|
117
120
|
.renderContext="${__classPrivateFieldGet(this, _DevvitCustomPost_makeRenderContext, "f")}"
|
|
118
121
|
>
|
|
@@ -168,24 +171,29 @@ _DevvitCustomPost_newRenderRequest = new WeakMap();
|
|
|
168
171
|
_DevvitCustomPost_onPluginCall = new WeakMap();
|
|
169
172
|
_DevvitCustomPost_queueEvent = new WeakMap();
|
|
170
173
|
_DevvitCustomPost_instances = new WeakSet();
|
|
171
|
-
|
|
172
|
-
|
|
174
|
+
_DevvitCustomPost_bubble = function _DevvitCustomPost_bubble(type, detail) {
|
|
175
|
+
this.dispatchEvent(customEvent(type, detail));
|
|
176
|
+
};
|
|
177
|
+
_DevvitCustomPost_effectEventRender = async function _DevvitCustomPost_effectEventRender(effectType, effectData) {
|
|
178
|
+
await __classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_queueRenderPost).call(this, __classPrivateFieldGet(this, _DevvitCustomPost_newRenderRequest, "f").call(this, BlockRenderEventType.RENDER_EFFECT_EVENT, effectType, effectData), 'CircuitClose' // eslint-disable-line @reddit/i18n-shreddit/no-unwrapped-strings
|
|
173
179
|
);
|
|
174
180
|
};
|
|
175
181
|
_DevvitCustomPost_handleEffects = async function _DevvitCustomPost_handleEffects(renderType, effects) {
|
|
176
182
|
effects.forEach((effect) => {
|
|
177
183
|
if (effect.type === EffectType.EFFECT_RERENDER_UI) {
|
|
178
|
-
if (__classPrivateFieldGet(this, _DevvitCustomPost_rerenderTimeout, "f")
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
__classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_effectEventRender).call(this, 'rerender-effect', {});
|
|
184
|
+
if (__classPrivateFieldGet(this, _DevvitCustomPost_rerenderTimeout, "f") != null)
|
|
185
|
+
clearTimeout(__classPrivateFieldGet(this, _DevvitCustomPost_rerenderTimeout, "f"));
|
|
186
|
+
__classPrivateFieldSet(this, _DevvitCustomPost_rerenderTimeout, setTimeout(() => {
|
|
187
|
+
void __classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_effectEventRender).call(this, 'rerender-effect', {});
|
|
183
188
|
}, (effect.rerenderUi?.delaySeconds ?? 0) * 1000), "f");
|
|
184
189
|
}
|
|
185
190
|
else {
|
|
186
191
|
if (renderType !== BlockRenderEventType.RENDER_USER_ACTION ||
|
|
187
192
|
USER_ACTION_EFFECTS.includes(effect.type)) {
|
|
188
|
-
this.
|
|
193
|
+
__classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_bubble).call(this, 'devvit-ui-effect', {
|
|
194
|
+
effect,
|
|
195
|
+
onEvent: (ev) => void __classPrivateFieldGet(this, _DevvitCustomPost_queueEvent, "f").call(this, ev),
|
|
196
|
+
});
|
|
189
197
|
}
|
|
190
198
|
}
|
|
191
199
|
});
|
|
@@ -231,7 +239,7 @@ _DevvitCustomPost_processEvent = async function _DevvitCustomPost_processEvent(e
|
|
|
231
239
|
_DevvitCustomPost_queueRenderPost = function _DevvitCustomPost_queueRenderPost(req, circuit) {
|
|
232
240
|
void __classPrivateFieldGet(this, _DevvitCustomPost_rpcQueue, "f").add(() => __classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_renderPost).call(this, req, circuit),
|
|
233
241
|
// Cut in line to re-render from server response immediately
|
|
234
|
-
circuit === 'CircuitBreak' ?
|
|
242
|
+
{ priority: circuit === 'CircuitBreak' ? 100 : 0 });
|
|
235
243
|
};
|
|
236
244
|
_DevvitCustomPost_renderPost = async function _DevvitCustomPost_renderPost(req, circuit) {
|
|
237
245
|
var _a, _b;
|
|
@@ -289,8 +297,8 @@ _DevvitCustomPost_state_get = function _DevvitCustomPost_state_get() {
|
|
|
289
297
|
const data = { __postData: { thingId: this.postId, config: this.postConfig } };
|
|
290
298
|
return Object.assign({}, __classPrivateFieldGet(this, _DevvitCustomPost_appState, "f"), data);
|
|
291
299
|
};
|
|
292
|
-
_DevvitCustomPost_userActionRender = function _DevvitCustomPost_userActionRender(actionId, data = {}) {
|
|
293
|
-
__classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_queueRenderPost).call(this, __classPrivateFieldGet(this, _DevvitCustomPost_newRenderRequest, "f").call(this, BlockRenderEventType.RENDER_USER_ACTION, actionId, data), 'CircuitClose' // eslint-disable-line @reddit/i18n-shreddit/no-unwrapped-strings
|
|
300
|
+
_DevvitCustomPost_userActionRender = async function _DevvitCustomPost_userActionRender(actionId, data = {}) {
|
|
301
|
+
await __classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_queueRenderPost).call(this, __classPrivateFieldGet(this, _DevvitCustomPost_newRenderRequest, "f").call(this, BlockRenderEventType.RENDER_USER_ACTION, actionId, data), 'CircuitClose' // eslint-disable-line @reddit/i18n-shreddit/no-unwrapped-strings
|
|
294
302
|
);
|
|
295
303
|
};
|
|
296
304
|
__decorate([
|
|
@@ -301,13 +309,9 @@ __decorate([
|
|
|
301
309
|
property({ attribute: false }),
|
|
302
310
|
__metadata("design:type", Object)
|
|
303
311
|
], DevvitCustomPost.prototype, "bundle", void 0);
|
|
304
|
-
__decorate([
|
|
305
|
-
property({ attribute: 'force-color-scheme' }),
|
|
306
|
-
__metadata("design:type", String)
|
|
307
|
-
], DevvitCustomPost.prototype, "forceColorScheme", void 0);
|
|
308
312
|
__decorate([
|
|
309
313
|
property({ attribute: false }),
|
|
310
|
-
__metadata("design:type",
|
|
314
|
+
__metadata("design:type", Object)
|
|
311
315
|
], DevvitCustomPost.prototype, "localRuntimeCode", void 0);
|
|
312
316
|
__decorate([
|
|
313
317
|
property({ attribute: false }),
|
|
@@ -319,8 +323,12 @@ __decorate([
|
|
|
319
323
|
], DevvitCustomPost.prototype, "postConfig", void 0);
|
|
320
324
|
__decorate([
|
|
321
325
|
property({ attribute: 'post-id' }),
|
|
322
|
-
__metadata("design:type",
|
|
326
|
+
__metadata("design:type", Object)
|
|
323
327
|
], DevvitCustomPost.prototype, "postId", void 0);
|
|
328
|
+
__decorate([
|
|
329
|
+
property({ attribute: 'scheme' }),
|
|
330
|
+
__metadata("design:type", Object)
|
|
331
|
+
], DevvitCustomPost.prototype, "scheme", void 0);
|
|
324
332
|
__decorate([
|
|
325
333
|
property({ attribute: 'use-experimental-blocks', type: Boolean }),
|
|
326
334
|
__metadata("design:type", Boolean)
|
|
@@ -346,6 +354,7 @@ __decorate([
|
|
|
346
354
|
__metadata("design:type", Object)
|
|
347
355
|
], DevvitCustomPost.prototype, "_rootBlock", void 0);
|
|
348
356
|
DevvitCustomPost = __decorate([
|
|
349
|
-
customElement('devvit-custom-post')
|
|
357
|
+
customElement('devvit-custom-post'),
|
|
358
|
+
__metadata("design:paramtypes", [])
|
|
350
359
|
], DevvitCustomPost);
|
|
351
360
|
export { DevvitCustomPost };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/ui-renderer",
|
|
3
|
-
"version": "0.10.15-next-2024-02-12-
|
|
3
|
+
"version": "0.10.15-next-2024-02-12-96a7f2dbb.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
},
|
|
55
55
|
"types": "./index.d.ts",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@devvit/protos": "0.10.15-next-2024-02-12-
|
|
58
|
-
"@devvit/runtime-lite": "0.10.15-next-2024-02-12-
|
|
59
|
-
"@devvit/runtimes": "0.10.15-next-2024-02-12-
|
|
60
|
-
"@devvit/shared-types": "0.10.15-next-2024-02-12-
|
|
57
|
+
"@devvit/protos": "0.10.15-next-2024-02-12-96a7f2dbb.0",
|
|
58
|
+
"@devvit/runtime-lite": "0.10.15-next-2024-02-12-96a7f2dbb.0",
|
|
59
|
+
"@devvit/runtimes": "0.10.15-next-2024-02-12-96a7f2dbb.0",
|
|
60
|
+
"@devvit/shared-types": "0.10.15-next-2024-02-12-96a7f2dbb.0",
|
|
61
61
|
"@dotlottie/player-component": "2.7.2",
|
|
62
62
|
"p-queue": "7.3.4",
|
|
63
63
|
"rxjs": "7.5.7"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@devvit/eslint-config": "0.10.14",
|
|
86
86
|
"@devvit/repo-tools": "0.10.14",
|
|
87
|
-
"@devvit/tsconfig": "0.10.15-next-2024-02-12-
|
|
87
|
+
"@devvit/tsconfig": "0.10.15-next-2024-02-12-96a7f2dbb.0",
|
|
88
88
|
"@lit-labs/ssr": "^2.2.3",
|
|
89
89
|
"@lit/localize": "0.11.4",
|
|
90
90
|
"@open-wc/testing-helpers": "2.3.0",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"directory": "dist"
|
|
117
117
|
},
|
|
118
118
|
"source": "./src/index.ts",
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "66fa3740beaa38fa6244ca9ea2d612a4e12db80e"
|
|
120
120
|
}
|