@devvit/ui-renderer 0.10.10-next-2023-11-29-fde0505ba.0 → 0.10.10-next-2023-11-29-ed2de3e14.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/blocks/components/devvit-blocks-renderer.js +3 -1
- package/blocks/components/devvit-blocks-webview.js +3 -1
- package/blocks/templates/util.js +1 -1
- package/client/devvit-custom-post.js +26 -6
- package/client/devvit-navigate-offsite-dialog.js +2 -1
- package/client/formbuilder/devvit-form-dialog.js +11 -1
- package/package.json +7 -7
|
@@ -54,7 +54,9 @@ let DevvitBlocksRenderer = class DevvitBlocksRenderer extends LitElement {
|
|
|
54
54
|
})}`;
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
_DevvitBlocksRenderer_colorSchemeMediaQuery = new WeakMap()
|
|
57
|
+
_DevvitBlocksRenderer_colorSchemeMediaQuery = new WeakMap();
|
|
58
|
+
_DevvitBlocksRenderer_onColorSchemeChange = new WeakMap();
|
|
59
|
+
_DevvitBlocksRenderer_baseRenderContext = new WeakMap();
|
|
58
60
|
__decorate([
|
|
59
61
|
property({ attribute: false }),
|
|
60
62
|
__metadata("design:type", Object)
|
|
@@ -76,7 +76,9 @@ let DevvitBlocksWebview = class DevvitBlocksWebview extends LitElement {
|
|
|
76
76
|
></iframe>`;
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
_DevvitBlocksWebview_iframe = new WeakMap()
|
|
79
|
+
_DevvitBlocksWebview_iframe = new WeakMap();
|
|
80
|
+
_DevvitBlocksWebview_handleMessage = new WeakMap();
|
|
81
|
+
_DevvitBlocksWebview_onLoad = new WeakMap();
|
|
80
82
|
__decorate([
|
|
81
83
|
property({ type: String }),
|
|
82
84
|
__metadata("design:type", Object)
|
package/blocks/templates/util.js
CHANGED
|
@@ -92,7 +92,7 @@ export function parseDataUrl(dataUrl) {
|
|
|
92
92
|
return null;
|
|
93
93
|
return {
|
|
94
94
|
mimeType: matches[1],
|
|
95
|
-
charset: matches[2]?.split('=')[1],
|
|
95
|
+
charset: matches[2]?.split('=')[1], // Extract charset without ';charset='
|
|
96
96
|
isBase64: !!matches[3],
|
|
97
97
|
data: matches[4].trim(),
|
|
98
98
|
};
|
|
@@ -184,21 +184,40 @@ let DevvitCustomPost = class DevvitCustomPost extends LitElement {
|
|
|
184
184
|
</div>`;
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
|
-
_DevvitCustomPost_appState = new WeakMap()
|
|
187
|
+
_DevvitCustomPost_appState = new WeakMap();
|
|
188
|
+
_DevvitCustomPost_lastRequest = new WeakMap();
|
|
189
|
+
_DevvitCustomPost_rootHeight = new WeakMap();
|
|
190
|
+
_DevvitCustomPost_hasInitialRender = new WeakMap();
|
|
191
|
+
_DevvitCustomPost_hostname = new WeakMap();
|
|
192
|
+
_DevvitCustomPost_customPostActor = new WeakMap();
|
|
193
|
+
_DevvitCustomPost_uiEventHandlerActor = new WeakMap();
|
|
194
|
+
_DevvitCustomPost_rpcQueue = new WeakMap();
|
|
195
|
+
_DevvitCustomPost_rerenderTimeout = new WeakMap();
|
|
196
|
+
_DevvitCustomPost_makeRenderContext = new WeakMap();
|
|
197
|
+
_DevvitCustomPost_handleUIEvent = new WeakMap();
|
|
198
|
+
_DevvitCustomPost_handleUserAction = new WeakMap();
|
|
199
|
+
_DevvitCustomPost_renderRequest = new WeakMap();
|
|
200
|
+
_DevvitCustomPost_onPluginCall = new WeakMap();
|
|
201
|
+
_DevvitCustomPost_instances = new WeakSet();
|
|
202
|
+
_DevvitCustomPost_state_get = function _DevvitCustomPost_state_get() {
|
|
188
203
|
const data = { __postData: { thingId: this.postId, config: this.postConfig } };
|
|
189
204
|
return Object.assign({}, __classPrivateFieldGet(this, _DevvitCustomPost_appState, "f"), data);
|
|
190
|
-
}
|
|
205
|
+
};
|
|
206
|
+
_DevvitCustomPost_initialRender = function _DevvitCustomPost_initialRender() {
|
|
191
207
|
if (this.isSuspended) {
|
|
192
208
|
this.isSuspended = false;
|
|
193
209
|
}
|
|
194
210
|
__classPrivateFieldSet(this, _DevvitCustomPost_rootHeight, undefined, "f");
|
|
195
211
|
__classPrivateFieldSet(this, _DevvitCustomPost_hasInitialRender, true, "f");
|
|
196
212
|
__classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_renderPost).call(this, __classPrivateFieldGet(this, _DevvitCustomPost_renderRequest, "f").call(this, BlockRenderEventType.RENDER_INITIAL));
|
|
197
|
-
}
|
|
213
|
+
};
|
|
214
|
+
_DevvitCustomPost_userActionRender = function _DevvitCustomPost_userActionRender(actionId, data = {}) {
|
|
198
215
|
__classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_renderPost).call(this, __classPrivateFieldGet(this, _DevvitCustomPost_renderRequest, "f").call(this, BlockRenderEventType.RENDER_USER_ACTION, actionId, data));
|
|
199
|
-
}
|
|
216
|
+
};
|
|
217
|
+
_DevvitCustomPost_effectEventRender = function _DevvitCustomPost_effectEventRender(effectType, effectData) {
|
|
200
218
|
__classPrivateFieldGet(this, _DevvitCustomPost_instances, "m", _DevvitCustomPost_renderPost).call(this, __classPrivateFieldGet(this, _DevvitCustomPost_renderRequest, "f").call(this, BlockRenderEventType.RENDER_EFFECT_EVENT, effectType, effectData));
|
|
201
|
-
}
|
|
219
|
+
};
|
|
220
|
+
_DevvitCustomPost_renderPost = function _DevvitCustomPost_renderPost(req, circuitBreak = false) {
|
|
202
221
|
void __classPrivateFieldGet(this, _DevvitCustomPost_rpcQueue, "f").add(async () => {
|
|
203
222
|
var _a, _b;
|
|
204
223
|
let call;
|
|
@@ -248,7 +267,8 @@ _DevvitCustomPost_appState = new WeakMap(), _DevvitCustomPost_lastRequest = new
|
|
|
248
267
|
},
|
|
249
268
|
// Cut in line to re-render from server response immediately
|
|
250
269
|
circuitBreak ? { priority: 100 } : {});
|
|
251
|
-
}
|
|
270
|
+
};
|
|
271
|
+
_DevvitCustomPost_handleEffects = async function _DevvitCustomPost_handleEffects(renderType, effects) {
|
|
252
272
|
effects.forEach((effect) => {
|
|
253
273
|
if (effect.type === EffectType.EFFECT_RERENDER_UI) {
|
|
254
274
|
if (__classPrivateFieldGet(this, _DevvitCustomPost_rerenderTimeout, "f") !== undefined) {
|
|
@@ -76,7 +76,8 @@ let DevvitNavigateOffsiteDialog = class DevvitNavigateOffsiteDialog extends LitE
|
|
|
76
76
|
`;
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
_DevvitNavigateOffsiteDialog_cancelNavigation = new WeakMap()
|
|
79
|
+
_DevvitNavigateOffsiteDialog_cancelNavigation = new WeakMap();
|
|
80
|
+
_DevvitNavigateOffsiteDialog_completeNavigation = new WeakMap();
|
|
80
81
|
__decorate([
|
|
81
82
|
property({ type: String }),
|
|
82
83
|
__metadata("design:type", String)
|
|
@@ -161,7 +161,17 @@ let DevvitFormDialog = class DevvitFormDialog extends LitElement {
|
|
|
161
161
|
`;
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
|
-
_DevvitFormDialog_onEvent = new WeakMap()
|
|
164
|
+
_DevvitFormDialog_onEvent = new WeakMap();
|
|
165
|
+
_DevvitFormDialog_idMap = new WeakMap();
|
|
166
|
+
_DevvitFormDialog_makeIdMap = new WeakMap();
|
|
167
|
+
_DevvitFormDialog_collectValues = new WeakMap();
|
|
168
|
+
_DevvitFormDialog_submitClicked = new WeakMap();
|
|
169
|
+
_DevvitFormDialog_cancelClicked = new WeakMap();
|
|
170
|
+
_DevvitFormDialog_closeDialog = new WeakMap();
|
|
171
|
+
_DevvitFormDialog_dispatchFormStatusToHost = new WeakMap();
|
|
172
|
+
_DevvitFormDialog_renderTitle = new WeakMap();
|
|
173
|
+
_DevvitFormDialog_renderDescription = new WeakMap();
|
|
174
|
+
_DevvitFormDialog_renderButtons = new WeakMap();
|
|
165
175
|
__decorate([
|
|
166
176
|
property({ attribute: false }),
|
|
167
177
|
__metadata("design:type", Object)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/ui-renderer",
|
|
3
|
-
"version": "0.10.10-next-2023-11-29-
|
|
3
|
+
"version": "0.10.10-next-2023-11-29-ed2de3e14.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
},
|
|
55
55
|
"types": "./index.d.ts",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@devvit/protos": "0.10.10-next-2023-11-29-
|
|
58
|
-
"@devvit/runtime-lite": "0.10.10-next-2023-11-29-
|
|
59
|
-
"@devvit/runtimes": "0.10.10-next-2023-11-29-
|
|
57
|
+
"@devvit/protos": "0.10.10-next-2023-11-29-ed2de3e14.0",
|
|
58
|
+
"@devvit/runtime-lite": "0.10.10-next-2023-11-29-ed2de3e14.0",
|
|
59
|
+
"@devvit/runtimes": "0.10.10-next-2023-11-29-ed2de3e14.0",
|
|
60
60
|
"@lottiefiles/lottie-player": "1.7.1",
|
|
61
61
|
"isomorphic-dompurify": "1.9.0",
|
|
62
62
|
"p-queue": "7.3.4",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@devvit/eslint-config": "0.10.9",
|
|
86
86
|
"@devvit/repo-tools": "0.10.9",
|
|
87
|
-
"@devvit/tsconfig": "0.10.10-next-2023-11-29-
|
|
87
|
+
"@devvit/tsconfig": "0.10.10-next-2023-11-29-ed2de3e14.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",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"puppeteer": "21.2.1",
|
|
109
109
|
"tailwindcss": "3.3.1",
|
|
110
110
|
"ts-node": "10.9.1",
|
|
111
|
-
"typescript": "
|
|
111
|
+
"typescript": "5.3.2",
|
|
112
112
|
"vite": "4.3.9",
|
|
113
113
|
"vitest": "0.31.0"
|
|
114
114
|
},
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"directory": "dist"
|
|
117
117
|
},
|
|
118
118
|
"source": "./src/index.ts",
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "a5ecb200e2999d699642ab63d2c969d9b1e7c766"
|
|
120
120
|
}
|