@devvit/ui-renderer 0.10.20-next-2024-05-01-049df727f.0 → 0.10.20-next-2024-05-01-974a7c08f.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.
@@ -0,0 +1,83 @@
1
+ import '@reddit/faceplate-ui/templateRenderingStrategy/clientStrategy.js';
2
+ import type { BlockAction, Effect, LinkedBundle, Metadata, RealtimeEvent, RenderPostResponse, Struct, UIEvent } from '@devvit/protos';
3
+ import { Dimensions } from '@devvit/protos';
4
+ import type { WorkerErrorType } from '@devvit/runtime-lite/client/BrowserLiteClient.js';
5
+ import type { FaceplateEvent } from '@reddit/faceplate/event-types.js';
6
+ import type { PropertyValues } from 'lit';
7
+ import { LitElement } from 'lit';
8
+ import type { UIApp } from './remote-app.js';
9
+ import '../blocks/components/devvit-blocks-renderer.js';
10
+ import '../blocks/components/devvit-blocks-webview.js';
11
+ import './devvit-animation-player.js';
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ 'devvit-surface': DevvitSurface;
15
+ }
16
+ interface HTMLElementEventMap {
17
+ 'devvit-realtime-send': DevvitRealtimeSendEvent;
18
+ 'devvit-ui-effect': DevvitUIEffectEvent;
19
+ 'devvit-ui-error': FaceplateEvent<'devvit-ui-error'> & {
20
+ detail: DevvitUIError;
21
+ };
22
+ 'devvit-user-action': DevvitUserActionEvent;
23
+ }
24
+ }
25
+ export type DevvitRealtimeSend = {
26
+ event: RealtimeEvent;
27
+ };
28
+ export type DevvitRealtimeSendEvent = FaceplateEvent<'devvit-realtime-send'> & {
29
+ detail: DevvitRealtimeSend;
30
+ };
31
+ export type DevvitUIEffect = {
32
+ effect: Effect;
33
+ onEvent(event: UIEvent): void;
34
+ };
35
+ export type DevvitUIEffectEvent = FaceplateEvent<'devvit-ui-effect'> & {
36
+ detail: DevvitUIEffect;
37
+ };
38
+ export type DevvitUIError = {
39
+ type: WorkerErrorType;
40
+ err: unknown;
41
+ };
42
+ export type DevvitUserAction = {
43
+ action: BlockAction;
44
+ };
45
+ export type DevvitUserActionEvent = FaceplateEvent<'devvit-user-action'> & {
46
+ detail: DevvitUserAction;
47
+ };
48
+ /**
49
+ * Blocks program renderer.
50
+ *
51
+ * Assumes the loaded program is a CustomPost & UIEventHandler.
52
+ *
53
+ * The complexity of this class should only be the UI itself and proxying state
54
+ * to devvit-blocks-renderer and Dispatcher. Don't put logic here that you can't
55
+ * unit test.
56
+ *
57
+ * @slot - Loading / unloaded state.
58
+ */
59
+ export declare class DevvitSurface extends LitElement {
60
+ #private;
61
+ static get styles(): import("lit").CSSResult[];
62
+ /** Probably a wrapper around the remote runtime (compute-go). */
63
+ remoteApp?: UIApp | undefined;
64
+ bundle?: LinkedBundle | undefined;
65
+ localRuntimeCode?: Blob | undefined;
66
+ metadata?: Metadata | undefined;
67
+ postConfig?: Struct['fields'] | undefined;
68
+ postId?: string | undefined;
69
+ runtimeDebugLogging: boolean;
70
+ scheme?: 'dark' | 'light' | undefined;
71
+ useExperimentalBlocks: boolean;
72
+ renderResponse?: RenderPostResponse | undefined;
73
+ dimensions?: Dimensions;
74
+ private _blocksRenderer;
75
+ private _rootBlock?;
76
+ constructor();
77
+ connectedCallback(): Promise<void>;
78
+ disconnectedCallback(): void;
79
+ rerender(): void;
80
+ protected render(): import("lit-html").TemplateResult<1>;
81
+ protected willUpdate(props: PropertyValues<this>): Promise<void>;
82
+ }
83
+ //# sourceMappingURL=devvit-surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devvit-surface.d.ts","sourceRoot":"","sources":["../../library/src/client/devvit-surface.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,274 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
14
+ };
15
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
16
+ if (kind === "m") throw new TypeError("Private method is not writable");
17
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
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
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
20
+ };
21
+ var _DevvitSurface_instances, _DevvitSurface_lastRequest, _DevvitSurface_dispatcher, _DevvitSurface_rootHeight, _DevvitSurface_resizeObserver, _DevvitSurface_instersectionObserver, _DevvitSurface_bubble, _DevvitSurface_newRenderContext, _DevvitSurface_onError, _DevvitSurface_onPluginCall, _DevvitSurface_onRenderPost, _DevvitSurface_onUserActionEffect, _DevvitSurface_onUserActionEvent;
22
+ import '@reddit/faceplate-ui/templateRenderingStrategy/clientStrategy.js';
23
+ import { BlockConfig_Root, BlockRenderEventType, BlockStackDirection, Dimensions, RealtimeDefinition, } from '@devvit/protos';
24
+ import { isCircuitBreaker } from '@devvit/runtime-lite/types/CircuitBreaker.js';
25
+ import { throttle } from '@devvit/shared-types/throttle.js';
26
+ import { asT3ID } from '@devvit/shared-types/tid.js';
27
+ import { customEvent } from '@reddit/faceplate/lib/custom-event.js';
28
+ import { LitElement, html } from 'lit';
29
+ import { customElement, property, query, state } from 'lit/decorators.js';
30
+ import { DevvitBlocksRenderer } from '../blocks/components/devvit-blocks-renderer.js';
31
+ import { DEFAULT_ROOT_HEIGHT } from '../blocks/templates/renderBlock.js';
32
+ import { styles } from '../styles.js';
33
+ import { Dispatcher } from './dispatcher.js';
34
+ import '../blocks/components/devvit-blocks-renderer.js';
35
+ import '../blocks/components/devvit-blocks-webview.js';
36
+ import './devvit-animation-player.js';
37
+ /**
38
+ * Blocks program renderer.
39
+ *
40
+ * Assumes the loaded program is a CustomPost & UIEventHandler.
41
+ *
42
+ * The complexity of this class should only be the UI itself and proxying state
43
+ * to devvit-blocks-renderer and Dispatcher. Don't put logic here that you can't
44
+ * unit test.
45
+ *
46
+ * @slot - Loading / unloaded state.
47
+ */
48
+ let DevvitSurface = class DevvitSurface extends LitElement {
49
+ static get styles() {
50
+ return [styles];
51
+ }
52
+ constructor() {
53
+ super();
54
+ _DevvitSurface_instances.add(this);
55
+ this.runtimeDebugLogging = false;
56
+ this.useExperimentalBlocks = false;
57
+ _DevvitSurface_lastRequest.set(this, void 0);
58
+ _DevvitSurface_dispatcher.set(this, new Dispatcher());
59
+ _DevvitSurface_rootHeight.set(this, void 0);
60
+ _DevvitSurface_resizeObserver.set(this, void 0);
61
+ _DevvitSurface_instersectionObserver.set(this, void 0);
62
+ _DevvitSurface_newRenderContext.set(this, () => ({
63
+ experimental: this.useExperimentalBlocks,
64
+ onAction: (action) => __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").queueRenderPost(BlockRenderEventType.RENDER_USER_ACTION, action.id, action.data ?? {}),
65
+ request: __classPrivateFieldGet(this, _DevvitSurface_lastRequest, "f"),
66
+ stackDirection: BlockStackDirection.UNRECOGNIZED,
67
+ state: __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").appState,
68
+ }));
69
+ _DevvitSurface_onError.set(this, (type, err) => {
70
+ if (!isCircuitBreaker(err))
71
+ console.error(err);
72
+ __classPrivateFieldGet(this, _DevvitSurface_instances, "m", _DevvitSurface_bubble).call(this, 'devvit-ui-error', { err, type });
73
+ });
74
+ _DevvitSurface_onPluginCall.set(this, (_id, serviceName, method, args, _meta) => {
75
+ if (serviceName === RealtimeDefinition.fullName &&
76
+ method === RealtimeDefinition.methods.send.name)
77
+ __classPrivateFieldGet(this, _DevvitSurface_instances, "m", _DevvitSurface_bubble).call(this, 'devvit-realtime-send', { event: args });
78
+ });
79
+ _DevvitSurface_onRenderPost.set(this, (req, rsp) => {
80
+ var _a, _b;
81
+ this.renderResponse = rsp;
82
+ if (this.renderResponse?.blocks?.ui) {
83
+ __classPrivateFieldSet(this, _DevvitSurface_lastRequest, req.blocks, "f");
84
+ this._rootBlock = this.renderResponse.blocks.ui;
85
+ if (!__classPrivateFieldGet(this, _DevvitSurface_rootHeight, "f")) {
86
+ // Lock in the initial height
87
+ __classPrivateFieldSet(this, _DevvitSurface_rootHeight, this._rootBlock.config?.rootConfig?.height || DEFAULT_ROOT_HEIGHT, "f");
88
+ }
89
+ else {
90
+ (_a = this._rootBlock).config ?? (_a.config = {});
91
+ (_b = this._rootBlock.config).rootConfig ?? (_b.rootConfig = BlockConfig_Root.fromPartial({}));
92
+ this._rootBlock.config.rootConfig.height = __classPrivateFieldGet(this, _DevvitSurface_rootHeight, "f");
93
+ }
94
+ }
95
+ });
96
+ _DevvitSurface_onUserActionEffect.set(this, (fx) => {
97
+ __classPrivateFieldGet(this, _DevvitSurface_instances, "m", _DevvitSurface_bubble).call(this, 'devvit-ui-effect', {
98
+ effect: fx,
99
+ onEvent: (ev) => __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").queueEvent(ev),
100
+ });
101
+ });
102
+ _DevvitSurface_onUserActionEvent.set(this, (ev) => {
103
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").queueRenderPost(BlockRenderEventType.RENDER_USER_ACTION, ev.detail.action.id, ev.detail.action.data);
104
+ });
105
+ this.addEventListener('devvit-user-action', __classPrivateFieldGet(this, _DevvitSurface_onUserActionEvent, "f"));
106
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").onError = __classPrivateFieldGet(this, _DevvitSurface_onError, "f");
107
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").onPluginCall = __classPrivateFieldGet(this, _DevvitSurface_onPluginCall, "f");
108
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").onRenderPost = __classPrivateFieldGet(this, _DevvitSurface_onRenderPost, "f");
109
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").onUserAction = __classPrivateFieldGet(this, _DevvitSurface_onUserActionEffect, "f");
110
+ }
111
+ async connectedCallback() {
112
+ super.connectedCallback();
113
+ __classPrivateFieldSet(this, _DevvitSurface_resizeObserver, new ResizeObserver(throttle((entries) => {
114
+ if (entries.length === 0)
115
+ return;
116
+ const entry = entries[0];
117
+ const { contentRect: { width, height }, } = entry;
118
+ const scale = window.devicePixelRatio;
119
+ this.dimensions = { width, height, scale };
120
+ }, 600)), "f");
121
+ __classPrivateFieldGet(this, _DevvitSurface_resizeObserver, "f").observe(this, { box: 'content-box' });
122
+ __classPrivateFieldSet(this, _DevvitSurface_instersectionObserver, new IntersectionObserver((entries) => {
123
+ entries.forEach((entry) => {
124
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").togglePause(!entry.isIntersecting);
125
+ });
126
+ }), "f");
127
+ __classPrivateFieldGet(this, _DevvitSurface_instersectionObserver, "f").observe(this);
128
+ }
129
+ disconnectedCallback() {
130
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").unload();
131
+ __classPrivateFieldGet(this, _DevvitSurface_resizeObserver, "f")?.unobserve(this);
132
+ __classPrivateFieldGet(this, _DevvitSurface_resizeObserver, "f")?.disconnect();
133
+ __classPrivateFieldGet(this, _DevvitSurface_instersectionObserver, "f")?.unobserve(this);
134
+ __classPrivateFieldGet(this, _DevvitSurface_instersectionObserver, "f")?.disconnect();
135
+ super.disconnectedCallback();
136
+ }
137
+ // to-do [studio]: remove.
138
+ rerender() {
139
+ this._blocksRenderer?.requestUpdate();
140
+ }
141
+ render() {
142
+ if (!this.renderResponse) {
143
+ // The slot content is considered the loading state.
144
+ return html `<slot></slot>`;
145
+ }
146
+ return html `<div class="relative">
147
+ <devvit-blocks-renderer
148
+ class="${this.scheme ?? ''}"
149
+ .block="${this._rootBlock}"
150
+ .renderContext="${__classPrivateFieldGet(this, _DevvitSurface_newRenderContext, "f")}"
151
+ >
152
+ <slot slot="empty-state-image" name="empty-state-image"></slot>
153
+ </devvit-blocks-renderer>
154
+ </div>`;
155
+ }
156
+ async willUpdate(props) {
157
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").meta = this.metadata;
158
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").postConfig = this.postConfig;
159
+ // If the custom post has dimensions, set them on all prop updates to keep
160
+ // the dispatcher up to date on what's happening.
161
+ if (this.dimensions) {
162
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").dimensions = this.dimensions;
163
+ }
164
+ if (props.has('postId')) {
165
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").postID = this.postId ? asT3ID(this.postId) : undefined;
166
+ }
167
+ if (props.has('runtimeDebugLogging')) {
168
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").runtimeDebugLogging = this.runtimeDebugLogging;
169
+ }
170
+ if (props.has('remoteApp')) {
171
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").remote = this.remoteApp ?? undefined;
172
+ }
173
+ if (props.has('localRuntimeCode'))
174
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").setLocalSrc(this.localRuntimeCode);
175
+ if (props.has('bundle') && this.bundle) {
176
+ await __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").load(this.bundle);
177
+ if (props.get('bundle')) {
178
+ // Bundle was _replaced_ (likely devvit-preview). Require a new render.
179
+ this.renderResponse = undefined;
180
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").resetAppState();
181
+ }
182
+ }
183
+ // If the custom post does not have dimensions, block all render events until they are
184
+ // reported. This prevents the user from being shown the jank of our custom dimensions.
185
+ // Do not place this above the bundle loader! We want to start loading immediately
186
+ // since it can take a few seconds.
187
+ //
188
+ // In case you're curious, this adds about 15ms of latency, but that pales in comparison
189
+ // to the length of loading the local runtime.
190
+ if (!this.dimensions)
191
+ return;
192
+ // We always want to trigger at least one render if:
193
+ // 1. The app dimensions change
194
+ // 2. The bundle changes. Loading a bundle is lengthy and dimensions may have changed during a load
195
+ if (!__classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").rendered) {
196
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").queueRenderPost(BlockRenderEventType.RENDER_INITIAL, undefined, {});
197
+ }
198
+ else if (props.has('dimensions') || props.has('bundle')) {
199
+ __classPrivateFieldGet(this, _DevvitSurface_dispatcher, "f").queueRenderPost(BlockRenderEventType.RENDER_USER_ACTION, undefined, {});
200
+ }
201
+ }
202
+ };
203
+ _DevvitSurface_lastRequest = new WeakMap();
204
+ _DevvitSurface_dispatcher = new WeakMap();
205
+ _DevvitSurface_rootHeight = new WeakMap();
206
+ _DevvitSurface_resizeObserver = new WeakMap();
207
+ _DevvitSurface_instersectionObserver = new WeakMap();
208
+ _DevvitSurface_newRenderContext = new WeakMap();
209
+ _DevvitSurface_onError = new WeakMap();
210
+ _DevvitSurface_onPluginCall = new WeakMap();
211
+ _DevvitSurface_onRenderPost = new WeakMap();
212
+ _DevvitSurface_onUserActionEffect = new WeakMap();
213
+ _DevvitSurface_onUserActionEvent = new WeakMap();
214
+ _DevvitSurface_instances = new WeakSet();
215
+ _DevvitSurface_bubble = function _DevvitSurface_bubble(type, detail) {
216
+ this.dispatchEvent(customEvent(type, detail));
217
+ };
218
+ __decorate([
219
+ property({ attribute: false }),
220
+ __metadata("design:type", Object)
221
+ ], DevvitSurface.prototype, "remoteApp", void 0);
222
+ __decorate([
223
+ property({ attribute: false }),
224
+ __metadata("design:type", Object)
225
+ ], DevvitSurface.prototype, "bundle", void 0);
226
+ __decorate([
227
+ property({ attribute: false }),
228
+ __metadata("design:type", Object)
229
+ ], DevvitSurface.prototype, "localRuntimeCode", void 0);
230
+ __decorate([
231
+ property({ attribute: false }),
232
+ __metadata("design:type", Object)
233
+ ], DevvitSurface.prototype, "metadata", void 0);
234
+ __decorate([
235
+ property({ attribute: false }),
236
+ __metadata("design:type", Object)
237
+ ], DevvitSurface.prototype, "postConfig", void 0);
238
+ __decorate([
239
+ property({ attribute: 'post-id' }),
240
+ __metadata("design:type", Object)
241
+ ], DevvitSurface.prototype, "postId", void 0);
242
+ __decorate([
243
+ property({ attribute: 'runtime-debug-logging', type: Boolean }),
244
+ __metadata("design:type", Boolean)
245
+ ], DevvitSurface.prototype, "runtimeDebugLogging", void 0);
246
+ __decorate([
247
+ property({ attribute: 'scheme' }),
248
+ __metadata("design:type", Object)
249
+ ], DevvitSurface.prototype, "scheme", void 0);
250
+ __decorate([
251
+ property({ attribute: 'use-experimental-blocks', type: Boolean }),
252
+ __metadata("design:type", Boolean)
253
+ ], DevvitSurface.prototype, "useExperimentalBlocks", void 0);
254
+ __decorate([
255
+ state(),
256
+ __metadata("design:type", Object)
257
+ ], DevvitSurface.prototype, "renderResponse", void 0);
258
+ __decorate([
259
+ state(),
260
+ __metadata("design:type", Object)
261
+ ], DevvitSurface.prototype, "dimensions", void 0);
262
+ __decorate([
263
+ query('devvit-blocks-renderer'),
264
+ __metadata("design:type", DevvitBlocksRenderer)
265
+ ], DevvitSurface.prototype, "_blocksRenderer", void 0);
266
+ __decorate([
267
+ state(),
268
+ __metadata("design:type", Object)
269
+ ], DevvitSurface.prototype, "_rootBlock", void 0);
270
+ DevvitSurface = __decorate([
271
+ customElement('devvit-surface'),
272
+ __metadata("design:paramtypes", [])
273
+ ], DevvitSurface);
274
+ export { DevvitSurface };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/ui-renderer",
3
- "version": "0.10.20-next-2024-05-01-049df727f.0",
3
+ "version": "0.10.20-next-2024-05-01-974a7c08f.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -56,10 +56,10 @@
56
56
  },
57
57
  "types": "./index.d.ts",
58
58
  "dependencies": {
59
- "@devvit/protos": "0.10.20-next-2024-05-01-049df727f.0",
60
- "@devvit/runtime-lite": "0.10.20-next-2024-05-01-049df727f.0",
61
- "@devvit/runtimes": "0.10.20-next-2024-05-01-049df727f.0",
62
- "@devvit/shared-types": "0.10.20-next-2024-05-01-049df727f.0",
59
+ "@devvit/protos": "0.10.20-next-2024-05-01-974a7c08f.0",
60
+ "@devvit/runtime-lite": "0.10.20-next-2024-05-01-974a7c08f.0",
61
+ "@devvit/runtimes": "0.10.20-next-2024-05-01-974a7c08f.0",
62
+ "@devvit/shared-types": "0.10.20-next-2024-05-01-974a7c08f.0",
63
63
  "@dotlottie/player-component": "2.7.2",
64
64
  "nice-grpc-web": "3.3.3",
65
65
  "p-queue": "7.3.4",
@@ -86,9 +86,9 @@
86
86
  },
87
87
  "devDependencies": {
88
88
  "@devvit/eslint-config": "0.10.19",
89
- "@devvit/public-api": "0.10.20-next-2024-05-01-049df727f.0",
89
+ "@devvit/public-api": "0.10.20-next-2024-05-01-974a7c08f.0",
90
90
  "@devvit/repo-tools": "0.10.19",
91
- "@devvit/tsconfig": "0.10.20-next-2024-05-01-049df727f.0",
91
+ "@devvit/tsconfig": "0.10.20-next-2024-05-01-974a7c08f.0",
92
92
  "@lit-labs/ssr": "^2.2.3",
93
93
  "@lit/localize": "0.11.4",
94
94
  "@open-wc/testing-helpers": "2.3.0",
@@ -121,5 +121,5 @@
121
121
  "directory": "dist"
122
122
  },
123
123
  "source": "./src/index.ts",
124
- "gitHead": "fc7c194574e010a43a22cdc05c8645ee84d6c6cc"
124
+ "gitHead": "a3eceb72df13df831ce26958e5a770ecc5149b4d"
125
125
  }