@sirendesign/markup 1.0.0 → 1.0.2

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/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -37520,6 +37521,15 @@ const MarkupWidget = ({ config: userConfig, }) => {
37520
37521
  require$$0.useEffect(() => {
37521
37522
  if (userConfig) {
37522
37523
  setConfig(userConfig);
37524
+ // Auto-initialize Firebase if config provided and not already initialized
37525
+ if (userConfig.firebaseConfig && getApps().length === 0) {
37526
+ try {
37527
+ initializeFirebase(userConfig.firebaseConfig);
37528
+ }
37529
+ catch (error) {
37530
+ console.error('Failed to initialize Firebase:', error);
37531
+ }
37532
+ }
37523
37533
  }
37524
37534
  }, [userConfig, setConfig]);
37525
37535
  require$$0.useEffect(() => {