@superleapai/flow-ui 2.2.4 → 2.2.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/index.js CHANGED
@@ -221,6 +221,20 @@
221
221
  // Execute immediately (synchronously)
222
222
  captureComponents();
223
223
 
224
+ // Auto-initialize SDK with default config if not in iframe context
225
+ // This allows standalone testing without calling SuperLeap.init() manually
226
+ // In iframe context, SuperLeap.connect() will reinitialize with CRM config
227
+ const client = _components["superleapClient"];
228
+ if (client && typeof client.init === "function") {
229
+ // Check if we're NOT in an iframe context (standalone usage)
230
+ const isStandalone = window === window.parent;
231
+ if (isStandalone && !client.isAvailable()) {
232
+ // Auto-init with default config for standalone testing
233
+ client.init(client.getDefaultConfig());
234
+ console.log("[Superleap-Flow] SDK auto-initialized for standalone mode");
235
+ }
236
+ }
237
+
224
238
  // Dispatch custom event when library is ready
225
239
  if (typeof CustomEvent !== "undefined" && typeof document !== "undefined") {
226
240
  // Function to dispatch the ready event
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superleapai/flow-ui",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
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",