@lvble/react 2.0.72 → 3.70.0

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/README.md CHANGED
@@ -68,15 +68,6 @@ export default function Home() {
68
68
  }
69
69
  ```
70
70
 
71
- ## Kudos
72
-
73
- [This template](https://github.com/IgnacioNMiranda/vite-component-library-template)
74
- [Ignacio Miranda Figueroa](https://www.linkedin.com/in/ignacio-miranda-figueroa/)
75
-
76
71
  ## License
77
72
 
78
73
  [MIT](LICENSE)
79
-
80
- ## Creator
81
-
82
- [Lior Pollak](https://blog.liorp.dev/)
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see react.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@lvble/core"),require("react")):"function"==typeof define&&define.amd?define("MyLib",["@lvble/core","React"],t):"object"==typeof exports?exports.MyLib=t(require("@lvble/core"),require("react")):e.MyLib=t(e["@lvble/core"],e.React)}(self,((e,t)=>(()=>{"use strict";var r={354:(e,t,r)=>{var o=r(639),n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,u=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var o,i={},s=null,a=null;for(o in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(a=t.ref),t)l.call(t,o)&&!c.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:n,type:e,key:s,ref:a,props:i,_owner:u.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},527:(e,t,r)=>{e.exports=r(354)},862:function(e,t,r){var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(93),t)},93:function(e,t,r){var o=this&&this.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.LvbleWidget=void 0;const n=r(527),i=r(639),l=r(291);t.LvbleWidget=(0,i.memo)((e=>{var{token:t}=e,r=o(e,["token"]);const{lvble:u}=(0,l.useLvbleContext)(),c=(0,i.useMemo)((()=>null==u?void 0:u.createWidget({token:t})),[u,t]);return(0,n.jsx)("div",Object.assign({style:{minHeight:"250px",width:"100%",height:"100%"},ref:e=>{if(c){for(;null==e?void 0:e.firstChild;)null==e||e.removeChild(null==e?void 0:e.firstChild);null==e||e.appendChild(c)}}},r))}))},291:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useLvbleContext=t.LvbleProvider=void 0;const o=r(527),n=r(639),i=r(54),l=(0,n.createContext)(null);t.LvbleProvider=({environment:e,onEvent:t,modal:r,customApiUrl:u,children:c})=>{const s=(0,n.useMemo)((()=>{if(e)return(0,i.Lvble)({environment:e,onEvent:t,modal:r,customApiUrl:u})}),[e,t,r,u]);return(0,o.jsx)(l.Provider,{value:{lvble:s},children:c})},t.useLvbleContext=()=>{const e=(0,n.useContext)(l);if(null==e)throw new Error("useLvbleContext must be used within a LvbleProvider");return e}},887:function(e,t,r){var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;const i=r(54);n(r(862),t),n(r(291),t),t.Environment=i.Environment},54:t=>{t.exports=e},639:e=>{e.exports=t}},o={};return function e(t){var n=o[t];if(void 0!==n)return n.exports;var i=o[t]={exports:{}};return r[t].call(i.exports,i,i.exports,e),i.exports}(887)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@lvble/core"),require("react")):"function"==typeof define&&define.amd?define("MyLib",["@lvble/core","React"],t):"object"==typeof exports?exports.MyLib=t(require("@lvble/core"),require("react")):e.MyLib=t(e["@lvble/core"],e.React)}(self,((e,t)=>(()=>{"use strict";var n={354:(e,t,n)=>{var r=n(639),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,n){var r,i={},a=null,u=null;for(r in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!p.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:a,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=a,t.jsxs=a},527:(e,t,n)=>{e.exports=n(354)},862:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(93),t)},93:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.LvbleWidget=void 0;const o=n(527),i=n(639),l=n(54);t.LvbleWidget=(0,i.memo)((e=>{var{token:t,environment:n,onEvent:c,modal:p,customApiUrl:a,onWidgetClickCallback:u,balance:f,pms:d,signature:s,externalId:v}=e,b=r(e,["token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId"]);const y=(0,i.useMemo)((()=>{if(n&&"function"==typeof c&&t){const e=(0,l.Lvble)({environment:n,onEvent:c,modal:p,customApiUrl:a});return null==e?void 0:e.createWidgetWithToken({token:t})}if(v&&d&&s&&(0===f||f)&&"function"==typeof u){const e=(0,l.Lvble)({environment:n,customApiUrl:a,balance:f,pms:d,signature:s,externalId:v,onEvent:c,onWidgetClickCallback:u});return null==e?void 0:e.createWidget()}}),[n,c,p,a,t]),m=(0,i.useCallback)((e=>{if(e&&y){for(;null==e?void 0:e.firstChild;)null==e||e.removeChild(null==e?void 0:e.firstChild);e.appendChild(y)}}),[y]);return y?(0,o.jsx)("div",Object.assign({style:{minHeight:"250px",width:"100%",height:"100%"},ref:m},b)):null}))},887:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=t.openExperience=t.Environment=t.Lvble=void 0;var i=n(54);Object.defineProperty(t,"Lvble",{enumerable:!0,get:function(){return i.Lvble}}),Object.defineProperty(t,"Environment",{enumerable:!0,get:function(){return i.Environment}}),o(n(862),t);var l=n(987);Object.defineProperty(t,"openExperience",{enumerable:!0,get:function(){return l.openExperience}});var c=n(531);Object.defineProperty(t,"openExperienceAndSetToken",{enumerable:!0,get:function(){return c.openExperienceAndSetToken}})},987:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperience=void 0;const r=n(54);t.openExperience=({token:e,environment:t,onEvent:n,modal:o,customApiUrl:i})=>{if(!t||!n)return null;(0,r.Lvble)({environment:t,onEvent:n,modal:o,customApiUrl:i}).open(e)}},531:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=void 0;const r=n(54);t.openExperienceAndSetToken=({token:e})=>{(0,r.Lvble)().openExperienceAndSetToken(e)}},54:t=>{t.exports=e},639:e=>{e.exports=t}},r={};return function e(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return n[t].call(i.exports,i,i.exports,e),i.exports}(887)})()));
3
3
  //# sourceMappingURL=react.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAAgBA,QAAQ,UAChC,mBAAXC,QAAyBA,OAAOC,IAC9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CAAEL,WAAU,CAACC,EAAOD,IACrE,OACE,8BAAKM,MAAO,CAAEC,UAAW,QAASC,MAAO,OAAQC,OAAQ,QACvDhC,IAAMA,IACJ,GAAK0B,EAAL,CACA,KAAO1B,aAAG,EAAHA,EAAKiC,YACVjC,SAAAA,EAAKkC,YAAYlC,aAAG,EAAHA,EAAKiC,YAExBjC,SAAAA,EAAKmC,YAAYT,EAJE,CAIK,GAEtBX,GAEP,4HCrBH,SAQA,QAWMqB,GAAe,IAAAC,eAAmD,MAE3D,EAAAC,cAAgB,EAC3BC,cACAC,UACAC,QACAC,eACAC,eAQA,MAAMnB,GAAQ,IAAAG,UAAQ,KACpB,GAAKY,EAOL,OANU,IAAAK,OAAM,CACdL,cACAC,UACAC,QACAC,gBAEM,GACP,CAACH,EAAaC,EAASC,EAAOC,IAEjC,OACE,SAACN,EAAaS,SAAQ,CAACC,MAAO,CAAEtB,SAAO,SAAGmB,GAC3C,EAGU,EAAAlB,gBAAkB,KAC7B,MAAMsB,GAAU,IAAAC,YAAWZ,GAC3B,GAAIW,QACF,MAAM,IAAIE,MAAM,uDAElB,OAAOF,CAAO,ihBCvDhB,cAEA,YACA,YACa,EAAAG,YAAc,sBCJ3BvE,EAAOD,QAAUM,WCAjBL,EAAOD,QAAUO,ICCbkE,EAA2B,CAAC,SAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa5E,QAGrB,IAAIC,EAASwE,EAAyBE,GAAY,CAGjD3E,QAAS,CAAC,GAOX,OAHA8E,EAAoBH,GAAU1C,KAAKhC,EAAOD,QAASC,EAAQA,EAAOD,QAAS0E,GAGpEzE,EAAOD,OACf,CCnB0B0E,CAAoB","sources":["webpack://MyLib/webpack/universalModuleDefinition","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js","webpack://MyLib/./src/lib/components/index.ts","webpack://MyLib/./src/lib/components/lvble/index.tsx","webpack://MyLib/./src/lib/context.tsx","webpack://MyLib/./src/lib/index.ts","webpack://MyLib/external umd {\"commonjs\":\"@lvble/core\",\"commonjs2\":\"@lvble/core\",\"amd\":\"@lvble/core\",\"root\":\"@lvble/core\"}","webpack://MyLib/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"React\",\"root\":\"React\"}","webpack://MyLib/webpack/bootstrap","webpack://MyLib/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"MyLib\", [\"@lvble/core\", \"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MyLib\"] = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse\n\t\troot[\"MyLib\"] = factory(root[\"@lvble/core\"], root[\"React\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__54__, __WEBPACK_EXTERNAL_MODULE__639__) => {\nreturn ","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export * from \"./lvble\";\n","import React, { memo, useMemo } from \"react\";\nimport { useLvbleContext } from \"../../context\";\n\nexport type LvbleWidgetProps = {\n token: string;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nexport const LvbleWidget = memo(({ token, ...props }: LvbleWidgetProps) => {\n const { lvble } = useLvbleContext();\n const widget = useMemo(() => lvble?.createWidget({ token }), [lvble, token]);\n return (\n <div style={{ minHeight: \"250px\", width: \"100%\", height: \"100%\" }}\n ref={(ref) => {\n if (!widget) return;\n while (ref?.firstChild) {\n ref?.removeChild(ref?.firstChild);\n }\n ref?.appendChild(widget);\n }}\n {...props}\n ></div>\n );\n});","import {\n ReactNode,\n useEffect,\n createContext,\n useContext,\n useState,\n useMemo,\n} from \"react\";\nimport {\n type Environment,\n type LvbleType,\n type ModalOptions,\n Lvble,\n} from \"@lvble/core\";\n\ntype LvbleContextType = {\n lvble?: LvbleType;\n};\n\nconst LvbleContext = createContext<LvbleContextType | null | undefined>(null);\n\nexport const LvbleProvider = ({\n environment,\n onEvent,\n modal,\n customApiUrl,\n children,\n}: {\n environment: Environment;\n onEvent: (eventType: string, data: any) => void;\n modal?: ModalOptions;\n customApiUrl?: string | null,\n children: ReactNode;\n}) => {\n const lvble = useMemo(() => {\n if (!environment) return;\n const l = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n });\n return l;\n }, [environment, onEvent, modal, customApiUrl]);\n\n return (\n <LvbleContext.Provider value={{ lvble }}>{children}</LvbleContext.Provider>\n );\n};\n\nexport const useLvbleContext = () => {\n const context = useContext(LvbleContext);\n if (context === undefined || context === null) {\n throw new Error(\"useLvbleContext must be used within a LvbleProvider\");\n }\n return context;\n};\n","import { Environment as _Environment } from \"@lvble/core\";\n\nexport * from \"./components\";\nexport * from \"./context\";\nexport const Environment = _Environment;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__54__;","module.exports = __WEBPACK_EXTERNAL_MODULE__639__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(887);\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__54__","__WEBPACK_EXTERNAL_MODULE__639__","f","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","Fragment","jsx","jsxs","LvbleWidget","memo","token","lvble","useLvbleContext","widget","useMemo","createWidget","style","minHeight","width","height","firstChild","removeChild","appendChild","LvbleContext","createContext","LvbleProvider","environment","onEvent","modal","customApiUrl","children","Lvble","Provider","value","context","useContext","Error","Environment","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"react.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAAgBA,QAAQ,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AAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa7E,QAGrB,IAAIC,EAASyE,EAAyBE,GAAY,CAGjD5E,QAAS,CAAC,GAOX,OAHA+E,EAAoBH,GAAU3C,KAAKhC,EAAOD,QAASC,EAAQA,EAAOD,QAAS2E,GAGpE1E,EAAOD,OACf,CCnB0B2E,CAAoB","sources":["webpack://MyLib/webpack/universalModuleDefinition","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js","webpack://MyLib/./src/lib/components/index.ts","webpack://MyLib/./src/lib/components/lvble/index.tsx","webpack://MyLib/./src/lib/index.ts","webpack://MyLib/./src/lib/utils/openExperience.ts","webpack://MyLib/./src/lib/utils/openExperienceAndSetToken.ts","webpack://MyLib/external umd {\"commonjs\":\"@lvble/core\",\"commonjs2\":\"@lvble/core\",\"amd\":\"@lvble/core\",\"root\":\"@lvble/core\"}","webpack://MyLib/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"React\",\"root\":\"React\"}","webpack://MyLib/webpack/bootstrap","webpack://MyLib/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"MyLib\", [\"@lvble/core\", \"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MyLib\"] = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse\n\t\troot[\"MyLib\"] = factory(root[\"@lvble/core\"], root[\"React\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__54__, __WEBPACK_EXTERNAL_MODULE__639__) => {\nreturn ","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export * from \"./lvble\";\n","import { memo, useMemo, useCallback } from \"react\";\nimport { LvbleWidgetProps } from \"./index.d\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const LvbleWidget: React.FC<LvbleWidgetProps> = memo(\n ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n onWidgetClickCallback,\n balance,\n pms,\n signature,\n externalId,\n ...props\n }) => {\n const widget = useMemo(() => {\n if (environment && typeof onEvent === \"function\" && token) {\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n });\n\n return livbleInstance?.createWidgetWithToken({ token });\n } else if (\n externalId &&\n pms &&\n signature &&\n (balance === 0 || balance) &&\n typeof onWidgetClickCallback === \"function\"\n ) {\n const livbleInstance = Lvble({\n environment,\n customApiUrl,\n balance,\n pms,\n signature,\n externalId,\n onEvent,\n onWidgetClickCallback,\n });\n\n return livbleInstance?.createWidget();\n }\n }, [environment, onEvent, modal, customApiUrl, token]);\n\n const setWidgetRef = useCallback(\n (ref: HTMLDivElement | null) => {\n if (ref && widget) {\n while (ref?.firstChild) {\n ref?.removeChild(ref?.firstChild);\n }\n\n ref.appendChild(widget);\n }\n },\n [widget]\n );\n\n if (!widget) return null;\n\n return (\n <div\n style={{ minHeight: \"250px\", width: \"100%\", height: \"100%\" }}\n ref={setWidgetRef}\n {...props}\n />\n );\n }\n);\n","export { Lvble, Environment } from \"@lvble/core\";\nexport * from \"./components\";\nexport { openExperience } from \"./utils/openExperience\";\nexport { openExperienceAndSetToken } from \"./utils/openExperienceAndSetToken\";\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\nimport { type Environment, type ModalOptions, type Lvble } from \"@lvble/core\";\n\nexport const openExperience = ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n}: {\n token: string;\n environment: Environment;\n onEvent: (eventType: string, data: any) => void;\n modal?: ModalOptions;\n customApiUrl?: string | null;\n}) => {\n if (!environment || !onEvent) return null;\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n });\n\n livbleInstance.open(token);\n};\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const openExperienceAndSetToken = ({ token }: { token: string }) => {\n const livbleInstance = Lvble();\n\n livbleInstance.openExperienceAndSetToken(token);\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__54__;","module.exports = __WEBPACK_EXTERNAL_MODULE__639__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(887);\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__54__","__WEBPACK_EXTERNAL_MODULE__639__","f","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","Fragment","jsx","jsxs","LvbleWidget","memo","token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId","widget","useMemo","livbleInstance","Lvble","createWidgetWithToken","createWidget","setWidgetRef","useCallback","firstChild","removeChild","appendChild","style","minHeight","width","height","Environment","openExperience","openExperienceAndSetToken","open","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see react.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@lvble/core"),require("react")):"function"==typeof define&&define.amd?define("MyLib",["@lvble/core","React"],t):"object"==typeof exports?exports.MyLib=t(require("@lvble/core"),require("react")):e.MyLib=t(e["@lvble/core"],e.React)}(self,((e,t)=>(()=>{"use strict";var r={354:(e,t,r)=>{var o=r(639),n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,u=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var o,i={},s=null,a=null;for(o in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(a=t.ref),t)l.call(t,o)&&!c.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:n,type:e,key:s,ref:a,props:i,_owner:u.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},527:(e,t,r)=>{e.exports=r(354)},862:function(e,t,r){var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(93),t)},93:function(e,t,r){var o=this&&this.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.LvbleWidget=void 0;const n=r(527),i=r(639),l=r(291);t.LvbleWidget=(0,i.memo)((e=>{var{token:t}=e,r=o(e,["token"]);const{lvble:u}=(0,l.useLvbleContext)(),c=(0,i.useMemo)((()=>null==u?void 0:u.createWidget({token:t})),[u,t]);return(0,n.jsx)("div",Object.assign({style:{minHeight:"250px",width:"100%",height:"100%"},ref:e=>{if(c){for(;null==e?void 0:e.firstChild;)null==e||e.removeChild(null==e?void 0:e.firstChild);null==e||e.appendChild(c)}}},r))}))},291:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useLvbleContext=t.LvbleProvider=void 0;const o=r(527),n=r(639),i=r(54),l=(0,n.createContext)(null);t.LvbleProvider=({environment:e,onEvent:t,modal:r,customApiUrl:u,children:c})=>{const s=(0,n.useMemo)((()=>{if(e)return(0,i.Lvble)({environment:e,onEvent:t,modal:r,customApiUrl:u})}),[e,t,r,u]);return(0,o.jsx)(l.Provider,{value:{lvble:s},children:c})},t.useLvbleContext=()=>{const e=(0,n.useContext)(l);if(null==e)throw new Error("useLvbleContext must be used within a LvbleProvider");return e}},887:function(e,t,r){var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;const i=r(54);n(r(862),t),n(r(291),t),t.Environment=i.Environment},54:t=>{t.exports=e},639:e=>{e.exports=t}},o={};return function e(t){var n=o[t];if(void 0!==n)return n.exports;var i=o[t]={exports:{}};return r[t].call(i.exports,i,i.exports,e),i.exports}(887)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@lvble/core"),require("react")):"function"==typeof define&&define.amd?define("MyLib",["@lvble/core","React"],t):"object"==typeof exports?exports.MyLib=t(require("@lvble/core"),require("react")):e.MyLib=t(e["@lvble/core"],e.React)}(self,((e,t)=>(()=>{"use strict";var n={354:(e,t,n)=>{var r=n(639),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,n){var r,i={},a=null,u=null;for(r in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,r)&&!p.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:a,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=a,t.jsxs=a},527:(e,t,n)=>{e.exports=n(354)},862:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(93),t)},93:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.LvbleWidget=void 0;const o=n(527),i=n(639),l=n(54);t.LvbleWidget=(0,i.memo)((e=>{var{token:t,environment:n,onEvent:c,modal:p,customApiUrl:a,onWidgetClickCallback:u,balance:f,pms:d,signature:s,externalId:v}=e,b=r(e,["token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId"]);const y=(0,i.useMemo)((()=>{if(n&&"function"==typeof c&&t){const e=(0,l.Lvble)({environment:n,onEvent:c,modal:p,customApiUrl:a});return null==e?void 0:e.createWidgetWithToken({token:t})}if(v&&d&&s&&(0===f||f)&&"function"==typeof u){const e=(0,l.Lvble)({environment:n,customApiUrl:a,balance:f,pms:d,signature:s,externalId:v,onEvent:c,onWidgetClickCallback:u});return null==e?void 0:e.createWidget()}}),[n,c,p,a,t]),m=(0,i.useCallback)((e=>{if(e&&y){for(;null==e?void 0:e.firstChild;)null==e||e.removeChild(null==e?void 0:e.firstChild);e.appendChild(y)}}),[y]);return y?(0,o.jsx)("div",Object.assign({style:{minHeight:"250px",width:"100%",height:"100%"},ref:m},b)):null}))},887:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=t.openExperience=t.Environment=t.Lvble=void 0;var i=n(54);Object.defineProperty(t,"Lvble",{enumerable:!0,get:function(){return i.Lvble}}),Object.defineProperty(t,"Environment",{enumerable:!0,get:function(){return i.Environment}}),o(n(862),t);var l=n(987);Object.defineProperty(t,"openExperience",{enumerable:!0,get:function(){return l.openExperience}});var c=n(531);Object.defineProperty(t,"openExperienceAndSetToken",{enumerable:!0,get:function(){return c.openExperienceAndSetToken}})},987:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperience=void 0;const r=n(54);t.openExperience=({token:e,environment:t,onEvent:n,modal:o,customApiUrl:i})=>{if(!t||!n)return null;(0,r.Lvble)({environment:t,onEvent:n,modal:o,customApiUrl:i}).open(e)}},531:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.openExperienceAndSetToken=void 0;const r=n(54);t.openExperienceAndSetToken=({token:e})=>{(0,r.Lvble)().openExperienceAndSetToken(e)}},54:t=>{t.exports=e},639:e=>{e.exports=t}},r={};return function e(t){var o=r[t];if(void 0!==o)return o.exports;var i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AOX,OAHA8E,EAAoBH,GAAU1C,KAAKhC,EAAOD,QAASC,EAAQA,EAAOD,QAAS0E,GAGpEzE,EAAOD,OACf,CCnB0B0E,CAAoB","sources":["webpack://MyLib/webpack/universalModuleDefinition","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js","webpack://MyLib/./src/lib/components/index.ts","webpack://MyLib/./src/lib/components/lvble/index.tsx","webpack://MyLib/./src/lib/context.tsx","webpack://MyLib/./src/lib/index.ts","webpack://MyLib/external umd {\"commonjs\":\"@lvble/core\",\"commonjs2\":\"@lvble/core\",\"amd\":\"@lvble/core\",\"root\":\"@lvble/core\"}","webpack://MyLib/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"React\",\"root\":\"React\"}","webpack://MyLib/webpack/bootstrap","webpack://MyLib/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"MyLib\", [\"@lvble/core\", \"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MyLib\"] = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse\n\t\troot[\"MyLib\"] = factory(root[\"@lvble/core\"], root[\"React\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__54__, __WEBPACK_EXTERNAL_MODULE__639__) => {\nreturn ","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export * from \"./lvble\";\n","import React, { memo, useMemo } from \"react\";\nimport { useLvbleContext } from \"../../context\";\n\nexport type LvbleWidgetProps = {\n token: string;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nexport const LvbleWidget = memo(({ token, ...props }: LvbleWidgetProps) => {\n const { lvble } = useLvbleContext();\n const widget = useMemo(() => lvble?.createWidget({ token }), [lvble, token]);\n return (\n <div style={{ minHeight: \"250px\", width: \"100%\", height: \"100%\" }}\n ref={(ref) => {\n if (!widget) return;\n while (ref?.firstChild) {\n ref?.removeChild(ref?.firstChild);\n }\n ref?.appendChild(widget);\n }}\n {...props}\n ></div>\n );\n});","import {\n ReactNode,\n useEffect,\n createContext,\n useContext,\n useState,\n useMemo,\n} from \"react\";\nimport {\n type Environment,\n type LvbleType,\n type ModalOptions,\n Lvble,\n} from \"@lvble/core\";\n\ntype LvbleContextType = {\n lvble?: LvbleType;\n};\n\nconst LvbleContext = createContext<LvbleContextType | null | undefined>(null);\n\nexport const LvbleProvider = ({\n environment,\n onEvent,\n modal,\n customApiUrl,\n children,\n}: {\n environment: Environment;\n onEvent: (eventType: string, data: any) => void;\n modal?: ModalOptions;\n customApiUrl?: string | null,\n children: ReactNode;\n}) => {\n const lvble = useMemo(() => {\n if (!environment) return;\n const l = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n });\n return l;\n }, [environment, onEvent, modal, customApiUrl]);\n\n return (\n <LvbleContext.Provider value={{ lvble }}>{children}</LvbleContext.Provider>\n );\n};\n\nexport const useLvbleContext = () => {\n const context = useContext(LvbleContext);\n if (context === undefined || context === null) {\n throw new Error(\"useLvbleContext must be used within a LvbleProvider\");\n }\n return context;\n};\n","import { Environment as _Environment } from \"@lvble/core\";\n\nexport * from \"./components\";\nexport * from \"./context\";\nexport const Environment = _Environment;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__54__;","module.exports = __WEBPACK_EXTERNAL_MODULE__639__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(887);\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__54__","__WEBPACK_EXTERNAL_MODULE__639__","f","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","Fragment","jsx","jsxs","LvbleWidget","memo","token","lvble","useLvbleContext","widget","useMemo","createWidget","style","minHeight","width","height","firstChild","removeChild","appendChild","LvbleContext","createContext","LvbleProvider","environment","onEvent","modal","customApiUrl","children","Lvble","Provider","value","context","useContext","Error","Environment","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"react.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAAgBA,QAAQ,UAChC,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,QAAS,CAAC,cAAe,SAAUJ,GAChB,iBAAZC,QACdA,QAAe,MAAID,EAAQG,QAAQ,eAAgBA,QAAQ,UAE3DJ,EAAY,MAAIC,EAAQD,EAAK,eAAgBA,EAAY,MAC1D,CATD,CASGO,MAAM,CAACC,EAAiCC,4CCA9B,IAAIC,EAAE,EAAQ,KAASC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,kBAAkBE,EAAEC,OAAOC,UAAUC,eAAeC,EAAET,EAAEU,mDAAmDC,kBAAkBC,EAAE,CAACC,KAAI,EAAGC,KAAI,EAAGC,QAAO,EAAGC,UAAS,GAChP,SAASC,EAAEC,EAAEC,EAAEC,GAAG,IAAIC,EAAEC,EAAE,CAAC,EAAEC,EAAE,KAAKC,EAAE,KAAiF,IAAIH,UAAhF,IAASD,IAAIG,EAAE,GAAGH,QAAG,IAASD,EAAEN,MAAMU,EAAE,GAAGJ,EAAEN,UAAK,IAASM,EAAEL,MAAMU,EAAEL,EAAEL,KAAcK,EAAEd,EAAEoB,KAAKN,EAAEE,KAAKT,EAAEJ,eAAea,KAAKC,EAAED,GAAGF,EAAEE,IAAI,GAAGH,GAAGA,EAAEQ,aAAa,IAAIL,KAAKF,EAAED,EAAEQ,kBAAe,IAASJ,EAAED,KAAKC,EAAED,GAAGF,EAAEE,IAAI,MAAM,CAACM,SAAS1B,EAAE2B,KAAKV,EAAEL,IAAIU,EAAET,IAAIU,EAAEK,MAAMP,EAAEQ,OAAOr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gBC,EAAS,OAAO,MACd,IAAAW,OAAM,CAC3BZ,cACAC,UACAC,QACAC,iBAGawB,KAAK5B,EAAM,qGCxB5B,cAEa,EAAA2B,0BAA4B,EAAG3B,aACnB,IAAAa,SAERc,0BAA0B3B,EAAM,UCPjD5C,EAAOD,QAAUM,WCAjBL,EAAOD,QAAUO,ICCbmE,EAA2B,CAAC,SAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAa7E,QAGrB,IAAIC,EAASyE,EAAyBE,GAAY,CAGjD5E,QAAS,CAAC,GAOX,OAHA+E,EAAoBH,GAAU3C,KAAKhC,EAAOD,QAASC,EAAQA,EAAOD,QAAS2E,GAGpE1E,EAAOD,OACf,CCnB0B2E,CAAoB","sources":["webpack://MyLib/webpack/universalModuleDefinition","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://MyLib/./node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js","webpack://MyLib/./src/lib/components/index.ts","webpack://MyLib/./src/lib/components/lvble/index.tsx","webpack://MyLib/./src/lib/index.ts","webpack://MyLib/./src/lib/utils/openExperience.ts","webpack://MyLib/./src/lib/utils/openExperienceAndSetToken.ts","webpack://MyLib/external umd {\"commonjs\":\"@lvble/core\",\"commonjs2\":\"@lvble/core\",\"amd\":\"@lvble/core\",\"root\":\"@lvble/core\"}","webpack://MyLib/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"React\",\"root\":\"React\"}","webpack://MyLib/webpack/bootstrap","webpack://MyLib/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"MyLib\", [\"@lvble/core\", \"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MyLib\"] = factory(require(\"@lvble/core\"), require(\"react\"));\n\telse\n\t\troot[\"MyLib\"] = factory(root[\"@lvble/core\"], root[\"React\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__54__, __WEBPACK_EXTERNAL_MODULE__639__) => {\nreturn ","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","export * from \"./lvble\";\n","import { memo, useMemo, useCallback } from \"react\";\nimport { LvbleWidgetProps } from \"./index.d\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const LvbleWidget: React.FC<LvbleWidgetProps> = memo(\n ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n onWidgetClickCallback,\n balance,\n pms,\n signature,\n externalId,\n ...props\n }) => {\n const widget = useMemo(() => {\n if (environment && typeof onEvent === \"function\" && token) {\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n });\n\n return livbleInstance?.createWidgetWithToken({ token });\n } else if (\n externalId &&\n pms &&\n signature &&\n (balance === 0 || balance) &&\n typeof onWidgetClickCallback === \"function\"\n ) {\n const livbleInstance = Lvble({\n environment,\n customApiUrl,\n balance,\n pms,\n signature,\n externalId,\n onEvent,\n onWidgetClickCallback,\n });\n\n return livbleInstance?.createWidget();\n }\n }, [environment, onEvent, modal, customApiUrl, token]);\n\n const setWidgetRef = useCallback(\n (ref: HTMLDivElement | null) => {\n if (ref && widget) {\n while (ref?.firstChild) {\n ref?.removeChild(ref?.firstChild);\n }\n\n ref.appendChild(widget);\n }\n },\n [widget]\n );\n\n if (!widget) return null;\n\n return (\n <div\n style={{ minHeight: \"250px\", width: \"100%\", height: \"100%\" }}\n ref={setWidgetRef}\n {...props}\n />\n );\n }\n);\n","export { Lvble, Environment } from \"@lvble/core\";\nexport * from \"./components\";\nexport { openExperience } from \"./utils/openExperience\";\nexport { openExperienceAndSetToken } from \"./utils/openExperienceAndSetToken\";\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\nimport { type Environment, type ModalOptions, type Lvble } from \"@lvble/core\";\n\nexport const openExperience = ({\n token,\n environment,\n onEvent,\n modal,\n customApiUrl,\n}: {\n token: string;\n environment: Environment;\n onEvent: (eventType: string, data: any) => void;\n modal?: ModalOptions;\n customApiUrl?: string | null;\n}) => {\n if (!environment || !onEvent) return null;\n const livbleInstance = Lvble({\n environment,\n onEvent,\n modal,\n customApiUrl,\n });\n\n livbleInstance.open(token);\n};\n","// @ts-nocheck\nimport React from \"react\";\nimport { Lvble } from \"@lvble/core\";\n\nexport const openExperienceAndSetToken = ({ token }: { token: string }) => {\n const livbleInstance = Lvble();\n\n livbleInstance.openExperienceAndSetToken(token);\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__54__;","module.exports = __WEBPACK_EXTERNAL_MODULE__639__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(887);\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__54__","__WEBPACK_EXTERNAL_MODULE__639__","f","k","Symbol","for","l","m","Object","prototype","hasOwnProperty","n","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","p","key","ref","__self","__source","q","c","a","g","b","d","e","h","call","defaultProps","$$typeof","type","props","_owner","current","Fragment","jsx","jsxs","LvbleWidget","memo","token","environment","onEvent","modal","customApiUrl","onWidgetClickCallback","balance","pms","signature","externalId","widget","useMemo","livbleInstance","Lvble","createWidgetWithToken","createWidget","setWidgetRef","useCallback","firstChild","removeChild","appendChild","style","minHeight","width","height","Environment","openExperience","openExperienceAndSetToken","open","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}
@@ -1,6 +1,4 @@
1
- import React from "react";
2
- export type LvbleWidgetProps = {
3
- token: string;
4
- } & React.HTMLAttributes<HTMLDivElement>;
5
- export declare const LvbleWidget: React.MemoExoticComponent<({ token, ...props }: LvbleWidgetProps) => import("react/jsx-runtime").JSX.Element>;
1
+ /// <reference types="react" />
2
+ import { LvbleWidgetProps } from "./index.d";
3
+ export declare const LvbleWidget: React.FC<LvbleWidgetProps>;
6
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAG7C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEzC,eAAO,MAAM,WAAW,kDAA8B,gBAAgB,6CAepE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAqElD,CAAC"}
@@ -14,18 +14,47 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.LvbleWidget = void 0;
15
15
  const jsx_runtime_1 = require("react/jsx-runtime");
16
16
  const react_1 = require("react");
17
- const context_1 = require("../../context");
17
+ const core_1 = require("@lvble/core");
18
18
  exports.LvbleWidget = (0, react_1.memo)((_a) => {
19
- var { token } = _a, props = __rest(_a, ["token"]);
20
- const { lvble } = (0, context_1.useLvbleContext)();
21
- const widget = (0, react_1.useMemo)(() => lvble === null || lvble === void 0 ? void 0 : lvble.createWidget({ token }), [lvble, token]);
22
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ style: { minHeight: "250px", width: "100%", height: "100%" }, ref: (ref) => {
23
- if (!widget)
24
- return;
19
+ var { token, environment, onEvent, modal, customApiUrl, onWidgetClickCallback, balance, pms, signature, externalId } = _a, props = __rest(_a, ["token", "environment", "onEvent", "modal", "customApiUrl", "onWidgetClickCallback", "balance", "pms", "signature", "externalId"]);
20
+ const widget = (0, react_1.useMemo)(() => {
21
+ if (environment && typeof onEvent === "function" && token) {
22
+ const livbleInstance = (0, core_1.Lvble)({
23
+ environment,
24
+ onEvent,
25
+ modal,
26
+ customApiUrl,
27
+ });
28
+ return livbleInstance === null || livbleInstance === void 0 ? void 0 : livbleInstance.createWidgetWithToken({ token });
29
+ }
30
+ else if (externalId &&
31
+ pms &&
32
+ signature &&
33
+ (balance === 0 || balance) &&
34
+ typeof onWidgetClickCallback === "function") {
35
+ const livbleInstance = (0, core_1.Lvble)({
36
+ environment,
37
+ customApiUrl,
38
+ balance,
39
+ pms,
40
+ signature,
41
+ externalId,
42
+ onEvent,
43
+ onWidgetClickCallback,
44
+ });
45
+ return livbleInstance === null || livbleInstance === void 0 ? void 0 : livbleInstance.createWidget();
46
+ }
47
+ }, [environment, onEvent, modal, customApiUrl, token]);
48
+ const setWidgetRef = (0, react_1.useCallback)((ref) => {
49
+ if (ref && widget) {
25
50
  while (ref === null || ref === void 0 ? void 0 : ref.firstChild) {
26
51
  ref === null || ref === void 0 ? void 0 : ref.removeChild(ref === null || ref === void 0 ? void 0 : ref.firstChild);
27
52
  }
28
- ref === null || ref === void 0 ? void 0 : ref.appendChild(widget);
29
- } }, props)));
53
+ ref.appendChild(widget);
54
+ }
55
+ }, [widget]);
56
+ if (!widget)
57
+ return null;
58
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ style: { minHeight: "250px", width: "100%", height: "100%" }, ref: setWidgetRef }, props)));
30
59
  });
31
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAA6C;AAC7C,2CAAgD;AAMnC,QAAA,WAAW,GAAG,IAAA,YAAI,EAAC,CAAC,EAAqC,EAAE,EAAE;QAAzC,EAAE,KAAK,OAA8B,EAAzB,KAAK,cAAjB,SAAmB,CAAF;IAChD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,yBAAe,GAAE,CAAC;IACpC,MAAM,MAAM,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,KAAK,aAAL,KAAK,uBAAL,KA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E,qBAAqB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;SACzD;aAAM,IACL,UAAU;YACV,GAAG;YACH,SAAS;YACT,CAAC,OAAO,KAAK,CAAC,IAAI,OAAO,CAAC;YAC1B,OAAO,qBAAqB,KAAK,UAAU,EAC3C;YACA,MAAM,cAAc,GAAG,IAAA,YAAK,EAAC;gBAC3B,WAAW;gBACX,YAAY;gBACZ,OAAO;gBACP,GAAG;gBACH,SAAS;gBACT,UAAU;gBACV,OAAO;gBACP,qBAAqB;aACtB,CAAC,CAAC;YAEH,OAAO,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,EAAE,CAAC;SACvC;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;IAEvD,MAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,CAAC,GAA0B,EAAE,EAAE;QAC7B,IAAI,GAAG,IAAI,MAAM,EAAE;YACjB,OAAO,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,EAAE;gBACtB,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,WAAW,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,CAAC,CAAC;aACnC;YAED,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SACzB;IACH,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,CACL,8CACE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5D,GAAG,EAAE,YAAY,IACb,KAAK,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,5 +1,5 @@
1
- import { Environment as _Environment } from "@lvble/core";
1
+ export { Lvble, Environment } from "@lvble/core";
2
2
  export * from "./components";
3
- export * from "./context";
4
- export declare const Environment: typeof _Environment;
3
+ export { openExperience } from "./utils/openExperience";
4
+ export { openExperienceAndSetToken } from "./utils/openExperienceAndSetToken";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAE1D,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,eAAO,MAAM,WAAW,qBAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACjD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC"}
package/dist/lib/index.js CHANGED
@@ -14,9 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Environment = void 0;
18
- const core_1 = require("@lvble/core");
17
+ exports.openExperienceAndSetToken = exports.openExperience = exports.Environment = exports.Lvble = void 0;
18
+ var core_1 = require("@lvble/core");
19
+ Object.defineProperty(exports, "Lvble", { enumerable: true, get: function () { return core_1.Lvble; } });
20
+ Object.defineProperty(exports, "Environment", { enumerable: true, get: function () { return core_1.Environment; } });
19
21
  __exportStar(require("./components"), exports);
20
- __exportStar(require("./context"), exports);
21
- exports.Environment = core_1.Environment;
22
+ var openExperience_1 = require("./utils/openExperience");
23
+ Object.defineProperty(exports, "openExperience", { enumerable: true, get: function () { return openExperience_1.openExperience; } });
24
+ var openExperienceAndSetToken_1 = require("./utils/openExperienceAndSetToken");
25
+ Object.defineProperty(exports, "openExperienceAndSetToken", { enumerable: true, get: function () { return openExperienceAndSetToken_1.openExperienceAndSetToken; } });
22
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sCAA0D;AAE1D,+CAA6B;AAC7B,4CAA0B;AACb,QAAA,WAAW,GAAG,kBAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oCAAiD;AAAxC,6FAAA,KAAK,OAAA;AAAE,mGAAA,WAAW,OAAA;AAC3B,+CAA6B;AAC7B,yDAAwD;AAA/C,gHAAA,cAAc,OAAA;AACvB,+EAA8E;AAArE,sIAAA,yBAAyB,OAAA"}
@@ -1,6 +1,4 @@
1
- import React from "react";
2
- export type LvbleWidgetProps = {
3
- token: string;
4
- } & React.HTMLAttributes<HTMLDivElement>;
5
- export declare const LvbleWidget: React.MemoExoticComponent<({ token, ...props }: LvbleWidgetProps) => import("react/jsx-runtime").JSX.Element>;
1
+ /// <reference types="react" />
2
+ import { LvbleWidgetProps } from "./index.d";
3
+ export declare const LvbleWidget: React.FC<LvbleWidgetProps>;
6
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAG7C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEzC,eAAO,MAAM,WAAW,kDAA8B,gBAAgB,6CAepE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAqElD,CAAC"}
@@ -10,19 +10,48 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- import { memo, useMemo } from "react";
14
- import { useLvbleContext } from "../../context";
13
+ import { memo, useMemo, useCallback } from "react";
14
+ import { Lvble } from "@lvble/core";
15
15
  export const LvbleWidget = memo((_a) => {
16
- var { token } = _a, props = __rest(_a, ["token"]);
17
- const { lvble } = useLvbleContext();
18
- const widget = useMemo(() => lvble === null || lvble === void 0 ? void 0 : lvble.createWidget({ token }), [lvble, token]);
19
- return (_jsx("div", Object.assign({ style: { minHeight: "250px", width: "100%", height: "100%" }, ref: (ref) => {
20
- if (!widget)
21
- return;
16
+ var { token, environment, onEvent, modal, customApiUrl, onWidgetClickCallback, balance, pms, signature, externalId } = _a, props = __rest(_a, ["token", "environment", "onEvent", "modal", "customApiUrl", "onWidgetClickCallback", "balance", "pms", "signature", "externalId"]);
17
+ const widget = useMemo(() => {
18
+ if (environment && typeof onEvent === "function" && token) {
19
+ const livbleInstance = Lvble({
20
+ environment,
21
+ onEvent,
22
+ modal,
23
+ customApiUrl,
24
+ });
25
+ return livbleInstance === null || livbleInstance === void 0 ? void 0 : livbleInstance.createWidgetWithToken({ token });
26
+ }
27
+ else if (externalId &&
28
+ pms &&
29
+ signature &&
30
+ (balance === 0 || balance) &&
31
+ typeof onWidgetClickCallback === "function") {
32
+ const livbleInstance = Lvble({
33
+ environment,
34
+ customApiUrl,
35
+ balance,
36
+ pms,
37
+ signature,
38
+ externalId,
39
+ onEvent,
40
+ onWidgetClickCallback,
41
+ });
42
+ return livbleInstance === null || livbleInstance === void 0 ? void 0 : livbleInstance.createWidget();
43
+ }
44
+ }, [environment, onEvent, modal, customApiUrl, token]);
45
+ const setWidgetRef = useCallback((ref) => {
46
+ if (ref && widget) {
22
47
  while (ref === null || ref === void 0 ? void 0 : ref.firstChild) {
23
48
  ref === null || ref === void 0 ? void 0 : ref.removeChild(ref === null || ref === void 0 ? void 0 : ref.firstChild);
24
49
  }
25
- ref === null || ref === void 0 ? void 0 : ref.appendChild(widget);
26
- } }, props)));
50
+ ref.appendChild(widget);
51
+ }
52
+ }, [widget]);
53
+ if (!widget)
54
+ return null;
55
+ return (_jsx("div", Object.assign({ style: { minHeight: "250px", width: "100%", height: "100%" }, ref: setWidgetRef }, props)));
27
56
  });
28
57
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/components/lvble/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAMhD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,EAAqC,EAAE,EAAE;QAAzC,EAAE,KAAK,OAA8B,EAAzB,KAAK,cAAjB,SAAmB,CAAF;IAChD,MAAM,EAAE,KAAK,EAAE,GAAG,eAAe,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAC7E,OAAO,CACL,4BAAK,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC/D,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;YACX,IAAI,CAAC,MAAM;gBAAE,OAAO;YACpB,OAAO,GAAG,aAAH,GAAG,uBAAH,GAAG,CA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;gBACP,GAAG;gBACH,SAAS;gBACT,UAAU;gBACV,OAAO;gBACP,qBAAqB;aACtB,CAAC,CAAC;YAEH,OAAO,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,EAAE,CAAC;SACvC;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;IAEvD,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,GAA0B,EAAE,EAAE;QAC7B,IAAI,GAAG,IAAI,MAAM,EAAE;YACjB,OAAO,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,EAAE;gBACtB,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,WAAW,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,CAAC,CAAC;aACnC;YAED,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SACzB;IACH,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,CACL,4BACE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5D,GAAG,EAAE,YAAY,IACb,KAAK,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,5 +1,5 @@
1
- import { Environment as _Environment } from "@lvble/core";
1
+ export { Lvble, Environment } from "@lvble/core";
2
2
  export * from "./components";
3
- export * from "./context";
4
- export declare const Environment: typeof _Environment;
3
+ export { openExperience } from "./utils/openExperience";
4
+ export { openExperienceAndSetToken } from "./utils/openExperienceAndSetToken";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAE1D,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,eAAO,MAAM,WAAW,qBAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACjD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { Environment as _Environment } from "@lvble/core";
1
+ export { Lvble, Environment } from "@lvble/core";
2
2
  export * from "./components";
3
- export * from "./context";
4
- export const Environment = _Environment;
3
+ export { openExperience } from "./utils/openExperience";
4
+ export { openExperienceAndSetToken } from "./utils/openExperienceAndSetToken";
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAE1D,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACjD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@lvble/react",
3
3
  "private": false,
4
- "version": "2.0.72",
4
+ "license": "MIT",
5
+ "version": "3.70.0",
5
6
  "main": "./dist/_bundles/index.js",
6
7
  "module": "./dist/lib-esm/index.js",
7
8
  "types": "./dist/lib/index.d.ts",
@@ -53,6 +54,6 @@
53
54
  },
54
55
  "dependencies": {
55
56
  "pkg-dir": "^7.0.0",
56
- "@lvble/core": "^2.0.72"
57
+ "@lvble/core": "3.70.0"
57
58
  }
58
59
  }