@superleapai/flow-ui 2.5.14 → 2.5.15
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/core/superleapClient.js +3 -77
- package/dist/superleap-flow.min.js +2 -2
- package/index.js +5 -14
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -105,7 +105,6 @@
|
|
|
105
105
|
init: global.superleapClient.init,
|
|
106
106
|
getSdk: global.superleapClient.getSdk,
|
|
107
107
|
isAvailable: global.superleapClient.isAvailable,
|
|
108
|
-
getDefaultConfig: global.superleapClient.getDefaultConfig,
|
|
109
108
|
getBaseUrl: global.superleapClient.getBaseUrl,
|
|
110
109
|
}
|
|
111
110
|
: null;
|
|
@@ -121,7 +120,6 @@
|
|
|
121
120
|
init: window.superleapClient.init,
|
|
122
121
|
getSdk: window.superleapClient.getSdk,
|
|
123
122
|
isAvailable: window.superleapClient.isAvailable,
|
|
124
|
-
getDefaultConfig: window.superleapClient.getDefaultConfig,
|
|
125
123
|
getBaseUrl: window.superleapClient.getBaseUrl,
|
|
126
124
|
}
|
|
127
125
|
: null;
|
|
@@ -205,7 +203,6 @@
|
|
|
205
203
|
init: client.init.bind(client),
|
|
206
204
|
getSdk: client.getSdk.bind(client),
|
|
207
205
|
isAvailable: client.isAvailable.bind(client),
|
|
208
|
-
getDefaultConfig: client.getDefaultConfig.bind(client),
|
|
209
206
|
getBaseUrl: client.getBaseUrl.bind(client),
|
|
210
207
|
// Bridge methods (from crm.js)
|
|
211
208
|
connect: client.connect ? client.connect.bind(client) : undefined,
|
|
@@ -262,6 +259,10 @@
|
|
|
262
259
|
function doAutoConnect() {
|
|
263
260
|
window.SuperLeap.connect({ bridgeId: bridgeId })
|
|
264
261
|
.then(function () {
|
|
262
|
+
// Expose SDK as a direct global so users can write sdkInstance.getModel() directly
|
|
263
|
+
if (window.SuperLeap && typeof window.SuperLeap.getSdk === "function") {
|
|
264
|
+
window.sdkInstance = window.SuperLeap.getSdk();
|
|
265
|
+
}
|
|
265
266
|
dispatchReady();
|
|
266
267
|
})
|
|
267
268
|
.catch(function (err) {
|
|
@@ -278,17 +279,7 @@
|
|
|
278
279
|
setTimeout(doAutoConnect, 0);
|
|
279
280
|
}
|
|
280
281
|
} else {
|
|
281
|
-
// Standalone mode —
|
|
282
|
-
var client = _components["superleapClient"];
|
|
283
|
-
if (client && typeof client.init === "function" && !isInIframe) {
|
|
284
|
-
if (!client.isAvailable()) {
|
|
285
|
-
client.init(client.getDefaultConfig());
|
|
286
|
-
console.log(
|
|
287
|
-
"[Superleap-Flow] SDK auto-initialized for standalone mode"
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
282
|
+
// Standalone mode — user must call SuperLeap.init(config) manually
|
|
292
283
|
// Dispatch ready immediately (no connection needed)
|
|
293
284
|
if (document.readyState === "loading") {
|
|
294
285
|
document.addEventListener("DOMContentLoaded", dispatchReady);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superleapai/flow-ui",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.15",
|
|
4
4
|
"description": "A reusable design system for building multi-step forms with comprehensive UI components. Single file, clean globals, SDK included. Only FlowUI and SuperLeap exposed.",
|
|
5
5
|
"main": "dist/superleap-flow.min.js",
|
|
6
6
|
"types": "index.d.ts",
|