@shuffleio/shuffle-mcps 0.0.25 → 0.0.26

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.
@@ -2,7 +2,7 @@ import {
2
2
  fetchApps,
3
3
  fetchAppsViaApiConfig,
4
4
  invalidateAppsCache
5
- } from "./chunk-R3YLER6P.mjs";
5
+ } from "./chunk-R5NT3IQ7.mjs";
6
6
  export {
7
7
  fetchApps,
8
8
  fetchAppsViaApiConfig,
@@ -187,6 +187,7 @@ var resetRegionUrl = () => {
187
187
  }
188
188
  _regionUrl = null;
189
189
  };
190
+ var SHUFFLE_HOST_BASE_URL_EVENT = "shuffle:set-host-base-url";
190
191
  var setHostBaseUrl = (url) => {
191
192
  const next = url ? url.replace(/\/+$/, "") : null;
192
193
  if (next === _hostBaseUrl) return;
@@ -197,7 +198,22 @@ var setHostBaseUrl = (url) => {
197
198
  } catch {
198
199
  }
199
200
  }
201
+ if (typeof window !== "undefined") {
202
+ try {
203
+ window.dispatchEvent(new CustomEvent(SHUFFLE_HOST_BASE_URL_EVENT, { detail: next }));
204
+ } catch {
205
+ }
206
+ }
200
207
  };
208
+ if (typeof window !== "undefined") {
209
+ try {
210
+ window.addEventListener(SHUFFLE_HOST_BASE_URL_EVENT, (e) => {
211
+ const detail = e.detail;
212
+ setHostBaseUrl(detail ?? null);
213
+ });
214
+ } catch {
215
+ }
216
+ }
201
217
  var getHostBaseUrl = () => _hostBaseUrl;
202
218
  var getTrackedOrgId = () => _trackedOrgId;
203
219
  var API_CONFIG = {
package/dist/index.d.mts CHANGED
@@ -584,14 +584,6 @@ declare const setRegionUrl: (regionUrl: string | undefined | null, orgId: string
584
584
  * Called when org changes. Resets region URL to default until next getinfo.
585
585
  */
586
586
  declare const resetRegionUrl: () => void;
587
- /**
588
- * Host override — call from a top-level component (or `useSyncHostBaseUrl`)
589
- * with the `globalUrl` injected via `ShuffleHostProps`. When set, this beats
590
- * region URL and the env-based default for ALL fetches that go through
591
- * `getApiUrl()` / `API_CONFIG.baseUrl` / `shuffleFetch`.
592
- *
593
- * Pass `null` / `undefined` / empty string to clear the override.
594
- */
595
587
  declare const setHostBaseUrl: (url: string | undefined | null) => void;
596
588
  /** Get the currently active host override, if any. */
597
589
  declare const getHostBaseUrl: () => string | null;
package/dist/index.d.ts CHANGED
@@ -584,14 +584,6 @@ declare const setRegionUrl: (regionUrl: string | undefined | null, orgId: string
584
584
  * Called when org changes. Resets region URL to default until next getinfo.
585
585
  */
586
586
  declare const resetRegionUrl: () => void;
587
- /**
588
- * Host override — call from a top-level component (or `useSyncHostBaseUrl`)
589
- * with the `globalUrl` injected via `ShuffleHostProps`. When set, this beats
590
- * region URL and the env-based default for ALL fetches that go through
591
- * `getApiUrl()` / `API_CONFIG.baseUrl` / `shuffleFetch`.
592
- *
593
- * Pass `null` / `undefined` / empty string to clear the override.
594
- */
595
587
  declare const setHostBaseUrl: (url: string | undefined | null) => void;
596
588
  /** Get the currently active host override, if any. */
597
589
  declare const getHostBaseUrl: () => string | null;
package/dist/index.js CHANGED
@@ -155,7 +155,7 @@ var init_fetchBreaker = __esm({
155
155
  });
156
156
 
157
157
  // api.ts
158
- var DEV_BACKEND, PROD_BACKEND, CLOUD_DOMAINS, getEnvVar, isDevEnvironment, isCloudDomain, isCloud, isOnprem, getDefaultBaseUrl, _regionUrl, _trackedOrgId, _hostBaseUrl, isShufflerSubdomain, setRegionUrl, resetRegionUrl, setHostBaseUrl, getHostBaseUrl, getTrackedOrgId, API_CONFIG, getApiUrl, shuffleFetch, getAuthHeader;
158
+ var DEV_BACKEND, PROD_BACKEND, CLOUD_DOMAINS, getEnvVar, isDevEnvironment, isCloudDomain, isCloud, isOnprem, getDefaultBaseUrl, _regionUrl, _trackedOrgId, _hostBaseUrl, isShufflerSubdomain, setRegionUrl, resetRegionUrl, SHUFFLE_HOST_BASE_URL_EVENT, setHostBaseUrl, getHostBaseUrl, getTrackedOrgId, API_CONFIG, getApiUrl, shuffleFetch, getAuthHeader;
159
159
  var init_api = __esm({
160
160
  "api.ts"() {
161
161
  init_fetchBreaker();
@@ -227,6 +227,7 @@ var init_api = __esm({
227
227
  }
228
228
  _regionUrl = null;
229
229
  };
230
+ SHUFFLE_HOST_BASE_URL_EVENT = "shuffle:set-host-base-url";
230
231
  setHostBaseUrl = (url) => {
231
232
  const next = url ? url.replace(/\/+$/, "") : null;
232
233
  if (next === _hostBaseUrl) return;
@@ -237,7 +238,22 @@ var init_api = __esm({
237
238
  } catch {
238
239
  }
239
240
  }
241
+ if (typeof window !== "undefined") {
242
+ try {
243
+ window.dispatchEvent(new CustomEvent(SHUFFLE_HOST_BASE_URL_EVENT, { detail: next }));
244
+ } catch {
245
+ }
246
+ }
240
247
  };
248
+ if (typeof window !== "undefined") {
249
+ try {
250
+ window.addEventListener(SHUFFLE_HOST_BASE_URL_EVENT, (e) => {
251
+ const detail = e.detail;
252
+ setHostBaseUrl(detail ?? null);
253
+ });
254
+ } catch {
255
+ }
256
+ }
241
257
  getHostBaseUrl = () => _hostBaseUrl;
242
258
  getTrackedOrgId = () => _trackedOrgId;
243
259
  API_CONFIG = {
@@ -450,12 +466,13 @@ __export(index_exports, {
450
466
  useSyncHostBaseUrl: () => useSyncHostBaseUrl
451
467
  });
452
468
  module.exports = __toCommonJS(index_exports);
453
- var import_shuffle_mcp2 = require("./shuffle-mcp-ER33P3W2.css");
469
+ var import_shuffle_mcp3 = require("./shuffle-mcp-ER33P3W2.css");
454
470
  var import_react22 = __toESM(require("react"));
455
471
 
456
472
  // ShuffleMcpThemeProvider.tsx
457
473
  var import_react = __toESM(require("react"));
458
474
  var import_material = require("@mui/material");
475
+ var import_shuffle_mcp = require("./shuffle-mcp-ER33P3W2.css");
459
476
  var import_jsx_runtime = require("react/jsx-runtime");
460
477
  var readHtmlDarkClass = () => {
461
478
  if (typeof document === "undefined") return false;
@@ -6095,7 +6112,7 @@ function AppDetailDrawer({
6095
6112
  }
6096
6113
 
6097
6114
  // views/ShuffleMCP.tsx
6098
- var import_shuffle_mcp = require("./shuffle-mcp-ER33P3W2.css");
6115
+ var import_shuffle_mcp2 = require("./shuffle-mcp-ER33P3W2.css");
6099
6116
  init_appsCache();
6100
6117
 
6101
6118
  // components/SegmentedControl.tsx
package/dist/index.mjs CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  setHostBaseUrl,
17
17
  setRegionUrl,
18
18
  shuffleFetch
19
- } from "./chunk-R3YLER6P.mjs";
19
+ } from "./chunk-R5NT3IQ7.mjs";
20
20
 
21
21
  // index.ts
22
22
  import "./shuffle-mcp-ER33P3W2.css";
@@ -25,6 +25,7 @@ import React5 from "react";
25
25
  // ShuffleMcpThemeProvider.tsx
26
26
  import React from "react";
27
27
  import { ThemeProvider, createTheme, useTheme as useMuiTheme } from "@mui/material";
28
+ import "./shuffle-mcp-ER33P3W2.css";
28
29
  import { jsx, jsxs } from "react/jsx-runtime";
29
30
  var readHtmlDarkClass = () => {
30
31
  if (typeof document === "undefined") return false;
@@ -777,7 +778,7 @@ async function backfillAppImages(dedupedApps) {
777
778
  let missing = dedupedApps.filter((d) => !d.bestImage && !d.app.large_image);
778
779
  if (missing.length === 0) return dedupedApps;
779
780
  try {
780
- const { fetchAppsViaApiConfig: fetchAppsViaApiConfig2 } = await import("./appsCache-CFCVTF7D.mjs");
781
+ const { fetchAppsViaApiConfig: fetchAppsViaApiConfig2 } = await import("./appsCache-VFYHI4NL.mjs");
781
782
  const apps = await fetchAppsViaApiConfig2().catch(() => []);
782
783
  if (Array.isArray(apps) && apps.length > 0) {
783
784
  const byName = /* @__PURE__ */ new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuffleio/shuffle-mcps",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "Turn 3,000+ SaaS tools into MCP servers your agents can use. Headless React component for search, selection, and OAuth handoff.",
5
5
  "license": "MIT",
6
6
  "repository": {