@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.
package/dist/cloud-sdk.esm.js
CHANGED
|
@@ -7504,6 +7504,12 @@ var buildBareSpecifierPattern = function buildBareSpecifierPattern() {
|
|
|
7504
7504
|
});
|
|
7505
7505
|
return new RegExp("((?:from|import)\\s*)([\"'])(".concat(escaped.join('|'), ")(?:\\/[^\"']*)?(\\2)"), 'g');
|
|
7506
7506
|
};
|
|
7507
|
+
|
|
7508
|
+
// JavaScript reserved words that cannot be used as variable names in
|
|
7509
|
+
// `export const <name> = ...` statements. Without this filter, modules
|
|
7510
|
+
// like axios (which exports a function named `delete`) would generate
|
|
7511
|
+
// invalid shim code such as `export const delete = m["delete"];`.
|
|
7512
|
+
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']);
|
|
7507
7513
|
var buildShimCode = function buildShimCode(depKey) {
|
|
7508
7514
|
var _window$RUNTIME_WINDO;
|
|
7509
7515
|
var moduleObj = (_window$RUNTIME_WINDO = window[RUNTIME_WINDOW_KEY]) === null || _window$RUNTIME_WINDO === void 0 ? void 0 : _window$RUNTIME_WINDO[depKey];
|
|
@@ -7518,7 +7524,7 @@ var buildShimCode = function buildShimCode(depKey) {
|
|
|
7518
7524
|
}
|
|
7519
7525
|
if (_typeof(moduleObj) === 'object' && moduleObj !== null) {
|
|
7520
7526
|
Object.keys(moduleObj).filter(function (k) {
|
|
7521
|
-
return k !== 'default' && k !== '__esModule' && /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k);
|
|
7527
|
+
return k !== 'default' && k !== '__esModule' && /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k) && !JS_RESERVED_WORDS.has(k);
|
|
7522
7528
|
}).forEach(function (k) {
|
|
7523
7529
|
return lines.push("export const ".concat(k, " = m[\"").concat(k, "\"];"));
|
|
7524
7530
|
});
|
|
@@ -7648,6 +7654,12 @@ var AppRuntimeHost = function AppRuntimeHost(_ref) {
|
|
|
7648
7654
|
throw new Error((response === null || response === void 0 ? void 0 : response.message) || 'Failed to open session');
|
|
7649
7655
|
case 4:
|
|
7650
7656
|
_response$result = response.result, sessionData = _response$result.session, version = _response$result.app_version;
|
|
7657
|
+
console.log('[AppRuntimeHost] session opened:', {
|
|
7658
|
+
routePath: routePath,
|
|
7659
|
+
launchMode: launchMode,
|
|
7660
|
+
sessionRoutePath: sessionData.route_path,
|
|
7661
|
+
sessionLaunchMode: sessionData.launch_mode
|
|
7662
|
+
});
|
|
7651
7663
|
setSession(sessionData);
|
|
7652
7664
|
if (version !== null && version !== void 0 && version.build_artifact) {
|
|
7653
7665
|
_context.n = 5;
|
|
@@ -7725,7 +7737,10 @@ var AppRuntimeHost = function AppRuntimeHost(_ref) {
|
|
|
7725
7737
|
}
|
|
7726
7738
|
throw new Error('App module does not export a default component');
|
|
7727
7739
|
case 3:
|
|
7728
|
-
inputData = sessionData.input_payload || inputPayloadRef.current
|
|
7740
|
+
inputData = _objectSpread2(_objectSpread2({}, sessionData.input_payload || inputPayloadRef.current), {}, {
|
|
7741
|
+
_loom_route_path: sessionData.route_path || routePath || '/',
|
|
7742
|
+
_loom_launch_mode: sessionData.launch_mode || launchMode
|
|
7743
|
+
});
|
|
7729
7744
|
sdk = {
|
|
7730
7745
|
session: {
|
|
7731
7746
|
id: sessionData.id,
|
|
@@ -33152,19 +33167,31 @@ function PinnedAppsWidget(_ref2) {
|
|
|
33152
33167
|
return null;
|
|
33153
33168
|
}
|
|
33154
33169
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(WidgetContainer, null, pinnedApps.map(function (app) {
|
|
33155
|
-
var _app$manifest;
|
|
33170
|
+
var _app$manifest, _app$publisher, _app$publisher2;
|
|
33156
33171
|
var rawCategory = app.category || ((_app$manifest = app.manifest) === null || _app$manifest === void 0 ? void 0 : _app$manifest.kind) || "workspace";
|
|
33157
33172
|
var category = typeof rawCategory === "string" ? rawCategory : (rawCategory === null || rawCategory === void 0 ? void 0 : rawCategory.name) || "workspace";
|
|
33158
33173
|
var CategoryIcon = getCategoryIcon(category);
|
|
33159
33174
|
var tint = getCategoryTint(category);
|
|
33175
|
+
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;
|
|
33160
33176
|
return /*#__PURE__*/React__default.createElement(AppTile, {
|
|
33161
33177
|
key: app.id,
|
|
33162
33178
|
onClick: function onClick() {
|
|
33163
33179
|
return handleOpenApp(app);
|
|
33164
33180
|
}
|
|
33165
33181
|
}, /*#__PURE__*/React__default.createElement(IconBox, {
|
|
33166
|
-
$bg: tint.bg
|
|
33167
|
-
|
|
33182
|
+
$bg: publisherLogoUrl ? "transparent" : tint.bg,
|
|
33183
|
+
style: publisherLogoUrl ? {
|
|
33184
|
+
overflow: "hidden"
|
|
33185
|
+
} : undefined
|
|
33186
|
+
}, publisherLogoUrl ? /*#__PURE__*/React__default.createElement("img", {
|
|
33187
|
+
src: publisherLogoUrl,
|
|
33188
|
+
alt: app.name,
|
|
33189
|
+
style: {
|
|
33190
|
+
width: "100%",
|
|
33191
|
+
height: "100%",
|
|
33192
|
+
objectFit: "cover"
|
|
33193
|
+
}
|
|
33194
|
+
}) : /*#__PURE__*/React__default.createElement(DynamicMuiIcon, {
|
|
33168
33195
|
iconName: app.icon,
|
|
33169
33196
|
fallbackIcon: CategoryIcon,
|
|
33170
33197
|
sx: {
|