@link-loom/cloud-sdk 1.0.4 → 1.0.6

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.
@@ -7524,6 +7524,12 @@ var buildBareSpecifierPattern = function buildBareSpecifierPattern() {
7524
7524
  });
7525
7525
  return new RegExp("((?:from|import)\\s*)([\"'])(".concat(escaped.join('|'), ")(?:\\/[^\"']*)?(\\2)"), 'g');
7526
7526
  };
7527
+
7528
+ // JavaScript reserved words that cannot be used as variable names in
7529
+ // `export const <name> = ...` statements. Without this filter, modules
7530
+ // like axios (which exports a function named `delete`) would generate
7531
+ // invalid shim code such as `export const delete = m["delete"];`.
7532
+ var JS_RESERVED_WORDS = new Set(['break', 'case', 'catch', 'continue', 'debugger', 'default', 'delete', 'do', 'else', 'finally', 'for', 'function', 'if', 'in', 'instanceof', 'new', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', 'with', 'class', 'const', 'enum', 'export', 'extends', 'import', 'super', 'implements', 'interface', 'let', 'package', 'private', 'protected', 'public', 'static', 'yield']);
7527
7533
  var buildShimCode = function buildShimCode(depKey) {
7528
7534
  var _window$RUNTIME_WINDO;
7529
7535
  var moduleObj = (_window$RUNTIME_WINDO = window[RUNTIME_WINDOW_KEY]) === null || _window$RUNTIME_WINDO === void 0 ? void 0 : _window$RUNTIME_WINDO[depKey];
@@ -7538,7 +7544,7 @@ var buildShimCode = function buildShimCode(depKey) {
7538
7544
  }
7539
7545
  if (_typeof(moduleObj) === 'object' && moduleObj !== null) {
7540
7546
  Object.keys(moduleObj).filter(function (k) {
7541
- return k !== 'default' && k !== '__esModule' && /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k);
7547
+ return k !== 'default' && k !== '__esModule' && /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k) && !JS_RESERVED_WORDS.has(k);
7542
7548
  }).forEach(function (k) {
7543
7549
  return lines.push("export const ".concat(k, " = m[\"").concat(k, "\"];"));
7544
7550
  });
@@ -7668,6 +7674,12 @@ var AppRuntimeHost = function AppRuntimeHost(_ref) {
7668
7674
  throw new Error((response === null || response === void 0 ? void 0 : response.message) || 'Failed to open session');
7669
7675
  case 4:
7670
7676
  _response$result = response.result, sessionData = _response$result.session, version = _response$result.app_version;
7677
+ console.log('[AppRuntimeHost] session opened:', {
7678
+ routePath: routePath,
7679
+ launchMode: launchMode,
7680
+ sessionRoutePath: sessionData.route_path,
7681
+ sessionLaunchMode: sessionData.launch_mode
7682
+ });
7671
7683
  setSession(sessionData);
7672
7684
  if (version !== null && version !== void 0 && version.build_artifact) {
7673
7685
  _context.n = 5;
@@ -7745,7 +7757,10 @@ var AppRuntimeHost = function AppRuntimeHost(_ref) {
7745
7757
  }
7746
7758
  throw new Error('App module does not export a default component');
7747
7759
  case 3:
7748
- inputData = sessionData.input_payload || inputPayloadRef.current;
7760
+ inputData = _objectSpread2(_objectSpread2({}, sessionData.input_payload || inputPayloadRef.current), {}, {
7761
+ _loom_route_path: sessionData.route_path || routePath || '/',
7762
+ _loom_launch_mode: sessionData.launch_mode || launchMode
7763
+ });
7749
7764
  sdk = {
7750
7765
  session: {
7751
7766
  id: sessionData.id,
@@ -33172,19 +33187,31 @@ function PinnedAppsWidget(_ref2) {
33172
33187
  return null;
33173
33188
  }
33174
33189
  return /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(WidgetContainer, null, pinnedApps.map(function (app) {
33175
- var _app$manifest;
33190
+ var _app$manifest, _app$publisher, _app$publisher2;
33176
33191
  var rawCategory = app.category || ((_app$manifest = app.manifest) === null || _app$manifest === void 0 ? void 0 : _app$manifest.kind) || "workspace";
33177
33192
  var category = typeof rawCategory === "string" ? rawCategory : (rawCategory === null || rawCategory === void 0 ? void 0 : rawCategory.name) || "workspace";
33178
33193
  var CategoryIcon = getCategoryIcon(category);
33179
33194
  var tint = getCategoryTint(category);
33195
+ var publisherLogoUrl = ((_app$publisher = app.publisher) === null || _app$publisher === void 0 ? void 0 : _app$publisher.logo_url) || ((_app$publisher2 = app.publisher) === null || _app$publisher2 === void 0 || (_app$publisher2 = _app$publisher2.profile) === null || _app$publisher2 === void 0 ? void 0 : _app$publisher2.logo_url) || null;
33180
33196
  return /*#__PURE__*/React$1.createElement(AppTile, {
33181
33197
  key: app.id,
33182
33198
  onClick: function onClick() {
33183
33199
  return handleOpenApp(app);
33184
33200
  }
33185
33201
  }, /*#__PURE__*/React$1.createElement(IconBox, {
33186
- $bg: tint.bg
33187
- }, /*#__PURE__*/React$1.createElement(DynamicMuiIcon, {
33202
+ $bg: publisherLogoUrl ? "transparent" : tint.bg,
33203
+ style: publisherLogoUrl ? {
33204
+ overflow: "hidden"
33205
+ } : undefined
33206
+ }, publisherLogoUrl ? /*#__PURE__*/React$1.createElement("img", {
33207
+ src: publisherLogoUrl,
33208
+ alt: app.name,
33209
+ style: {
33210
+ width: "100%",
33211
+ height: "100%",
33212
+ objectFit: "cover"
33213
+ }
33214
+ }) : /*#__PURE__*/React$1.createElement(DynamicMuiIcon, {
33188
33215
  iconName: app.icon,
33189
33216
  fallbackIcon: CategoryIcon,
33190
33217
  sx: {