@steambrew/ttc 2.7.4 → 2.8.5

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/dist/index.js CHANGED
@@ -309,35 +309,9 @@ function InitializePlugins() {
309
309
  MillenniumStore.ignoreProxyFlag = false;
310
310
  });
311
311
  }
312
- async function WebkitInitializeIPC() {
313
- let intervalId = null;
314
- const maxWaitTime = 10000; // 10 seconds
315
- intervalId = setInterval(() => {
316
- if (typeof SteamClient === 'undefined') {
317
- return;
318
- }
319
- if (intervalId) {
320
- clearInterval(intervalId);
321
- intervalId = null;
322
- }
323
- SteamClient.BrowserView?.RegisterForMessageFromParent((messageId, data) => {
324
- if (messageId !== IPCMessageId) {
325
- return;
326
- }
327
- const payload = JSON.parse(data);
328
- MillenniumStore.ignoreProxyFlag = true;
329
- MillenniumStore.settingsStore[payload.name] = payload.value;
330
- MillenniumStore.ignoreProxyFlag = false;
331
- });
332
- }, 100);
333
- setTimeout(() => {
334
- if (intervalId) {
335
- clearInterval(intervalId);
336
- console.warn('%c Millennium %c Failed to find SteamClient after 10000ms', 'background:rgb(37, 105, 184); color: white;', 'background: transparent;');
337
- }
338
- }, maxWaitTime);
312
+ if (isClientModule) {
313
+ ClientInitializeIPC();
339
314
  }
340
- isClientModule ? ClientInitializeIPC() : WebkitInitializeIPC();
341
315
  const StartSettingPropagation = (name, value) => {
342
316
  if (MillenniumStore.ignoreProxyFlag) {
343
317
  return;
@@ -831,6 +805,7 @@ const TranspilerPluginComponent = async (bIsMillennium, pluginJson, props) => {
831
805
  react: 'window.SP_REACT',
832
806
  'react-dom': 'window.SP_REACTDOM',
833
807
  'react-dom/client': 'window.SP_REACTDOM',
808
+ 'react/jsx-runtime': 'SP_JSX_FACTORY',
834
809
  '@steambrew/client': 'window.MILLENNIUM_API',
835
810
  },
836
811
  exports: 'named',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steambrew/ttc",
3
- "version": "2.7.4",
3
+ "version": "2.8.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
package/src/plugin-api.ts CHANGED
@@ -188,42 +188,10 @@ function InitializePlugins() {
188
188
  });
189
189
  }
190
190
 
191
- async function WebkitInitializeIPC() {
192
- let intervalId: NodeJS.Timeout | null = null;
193
- const maxWaitTime = 10000; // 10 seconds
194
-
195
- intervalId = setInterval(() => {
196
- if (typeof SteamClient === 'undefined') {
197
- return;
198
- }
199
-
200
- if (intervalId) {
201
- clearInterval(intervalId);
202
- intervalId = null;
203
- }
204
-
205
- SteamClient.BrowserView?.RegisterForMessageFromParent((messageId: string, data: string) => {
206
- if (messageId !== IPCMessageId) {
207
- return;
208
- }
209
-
210
- const payload = JSON.parse(data);
211
- MillenniumStore.ignoreProxyFlag = true;
212
- MillenniumStore.settingsStore[payload.name] = payload.value;
213
- MillenniumStore.ignoreProxyFlag = false;
214
- });
215
- }, 100);
216
-
217
- setTimeout(() => {
218
- if (intervalId) {
219
- clearInterval(intervalId);
220
- console.warn('%c Millennium %c Failed to find SteamClient after 10000ms', 'background:rgb(37, 105, 184); color: white;', 'background: transparent;');
221
- }
222
- }, maxWaitTime);
191
+ if (isClientModule) {
192
+ ClientInitializeIPC();
223
193
  }
224
194
 
225
- isClientModule ? ClientInitializeIPC() : WebkitInitializeIPC();
226
-
227
195
  const StartSettingPropagation = (name: string, value: any) => {
228
196
  if (MillenniumStore.ignoreProxyFlag) {
229
197
  return;
package/src/transpiler.ts CHANGED
@@ -269,6 +269,7 @@ export const TranspilerPluginComponent = async (bIsMillennium: boolean, pluginJs
269
269
  react: 'window.SP_REACT',
270
270
  'react-dom': 'window.SP_REACTDOM',
271
271
  'react-dom/client': 'window.SP_REACTDOM',
272
+ 'react/jsx-runtime': 'SP_JSX_FACTORY',
272
273
  '@steambrew/client': 'window.MILLENNIUM_API',
273
274
  },
274
275
  exports: 'named',