@konemono/nostr-login-components 1.4.0 → 1.4.1

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.
Files changed (50) hide show
  1. package/dist/components/button-base2.js.map +1 -1
  2. package/dist/components/css.js +1 -1
  3. package/dist/components/nl-auth2.js +7 -4
  4. package/dist/components/nl-auth2.js.map +1 -1
  5. package/dist/components/nl-banner2.js +18 -18
  6. package/dist/components/nl-banner2.js.map +1 -1
  7. package/dist/components/nl-change-account2.js +6 -6
  8. package/dist/components/nl-change-account2.js.map +1 -1
  9. package/dist/components/nl-confirm-logout2.js +6 -6
  10. package/dist/components/nl-confirm-logout2.js.map +1 -1
  11. package/dist/components/nl-connect2.js.map +1 -1
  12. package/dist/components/nl-iframe2.js.map +1 -1
  13. package/dist/components/nl-import-flow2.js.map +1 -1
  14. package/dist/components/nl-info-extension2.js.map +1 -1
  15. package/dist/components/nl-info2.js.map +1 -1
  16. package/dist/components/nl-loading2.js +5 -5
  17. package/dist/components/nl-loading2.js.map +1 -1
  18. package/dist/components/nl-local-signup2.js +2 -2
  19. package/dist/components/nl-local-signup2.js.map +1 -1
  20. package/dist/components/nl-nip46-relay-settings2.js +2 -2
  21. package/dist/components/nl-nip46-relay-settings2.js.map +1 -1
  22. package/dist/components/nl-otp-migrate2.js.map +1 -1
  23. package/dist/components/nl-previously-logged2.js.map +1 -1
  24. package/dist/components/nl-select2.js.map +1 -1
  25. package/dist/components/nl-signin-bunker-url2.js +1 -1
  26. package/dist/components/nl-signin-bunker-url2.js.map +1 -1
  27. package/dist/components/nl-signin-connection-string2.js +1 -1
  28. package/dist/components/nl-signin-connection-string2.js.map +1 -1
  29. package/dist/components/nl-signin-nsec2.js +1 -1
  30. package/dist/components/nl-signin-nsec2.js.map +1 -1
  31. package/dist/components/nl-signin-otp2.js +1 -1
  32. package/dist/components/nl-signin-otp2.js.map +1 -1
  33. package/dist/components/nl-signin-read-only2.js +1 -1
  34. package/dist/components/nl-signin-read-only2.js.map +1 -1
  35. package/dist/components/nl-signin2.js +1 -1
  36. package/dist/components/nl-signin2.js.map +1 -1
  37. package/dist/components/nl-signup2.js +2 -2
  38. package/dist/components/nl-signup2.js.map +1 -1
  39. package/dist/components/nl-welcome-signin2.js.map +1 -1
  40. package/dist/components/nl-welcome-signup2.js.map +1 -1
  41. package/dist/components/nl-welcome2.js.map +1 -1
  42. package/dist/types/components/nl-auth/nl-auth.d.ts +1 -0
  43. package/dist/types/components/nl-banner/nl-banner.d.ts +8 -8
  44. package/dist/types/components/nl-change-account/nl-change-account.d.ts +2 -2
  45. package/dist/types/components/nl-confirm-logout/nl-confirm-logout.d.ts +2 -2
  46. package/dist/types/components/nl-loading/nl-loading.d.ts +2 -2
  47. package/dist/types/components/nl-local-signup/nl-local-signup.d.ts +1 -1
  48. package/dist/types/components/nl-signup/nl-signup.d.ts +1 -1
  49. package/dist/types/components.d.ts +32 -32
  50. package/package.json +1 -1
@@ -1 +1 @@
1
- {"file":"nl-banner2.js","mappings":";;;;;;;AAAA,MAAM,WAAW,GAAG,8toCAA8toC,CAAC;AACnvoC,uBAAe,WAAW;;MCOb,QAAQ;;;;;;;;;;;;;qBACuB,SAAS;wBACN,KAAK;0BACH,KAAK;2BACtB,EAAE;sBACW,KAAK;yBAEnB,KAAK;sBACI,IAAI;wBACV,IAAI;wBACQ,EAAE;8BAEpB,KAAK;sBAEL,EAAE;oBACM,EAAE;mBACb,EAAE;6BACS,KAAK;;IAYvC,kBAAkB,CAAC,MAAoB;;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,MAAM,MAAI,MAAA,MAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,KAAK,0CAAE,KAAK,CAAC,GAAG,CAAC,0CAAG,CAAC,CAAC,CAAA,IAAI,EAAE,CAAC;Q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,EAAE,EAAE,IAClF,WAAK,KAAK,EAAE,IAAI,CAAC,QAAQ,IAAI,MAAM,EAAE,GAAG,EAAC,KAAK,IAC3C,IAAI,CAAC,aAAa,IAAI,UAAU,IAC/B,qBACE,WACE,KAAK,EAAE,aAAa,IAAI,CAAC,MAAM,GAAG,0CAA0C,GAAG,kDAAkD,kJAAkJ,IAElR,OAAO,CACJ,CACI,KAEZ,WACE,KAAK,EAAE,aAAa,IAAI,CAAC,MAAM,GAAG,yCAAyC,GAAG,kDAAkD,kJAAkJ,IAEjR,OAAO,CACJ,CACP,CACG,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-banner/nl-banner.css?tag=nl-banner&encapsulation=shadow","src/components/nl-banner/nl-banner.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n","import { Component, Event, EventEmitter, Fragment, h, Prop, State, Watch } from '@stencil/core';\nimport { BannerNotify, BannerNotifyMode, Info, METHOD_MODULE, NlTheme } from '@/types';\n\n@Component({\n tag: 'nl-banner',\n styleUrl: 'nl-banner.css',\n shadow: true,\n})\nexport class NlBanner {\n @Prop({ mutable: true }) theme: NlTheme = 'default';\n @Prop({ mutable: true }) darkMode: boolean = false;\n @Prop({ mutable: true }) hiddenMode: boolean = false;\n @Prop() titleBanner: string = '';\n @Prop({ mutable: true }) isOpen: boolean = false;\n\n @Prop() isLoading: boolean = false;\n @Prop() notify: BannerNotify | null = null;\n @Prop() userInfo: Info | null = null;\n @Prop({ mutable: true }) accounts: Info[] = [];\n\n @State() isUserImgError = false;\n\n @State() domain: string = '';\n @State() mode: BannerNotifyMode = '';\n @State() url: string = '';\n @State() isOpenConfirm: boolean = false;\n\n @Event() handleNotifyConfirmBanner: EventEmitter<string>;\n @Event() handleNotifyConfirmBannerIframe: EventEmitter<string>;\n @Event() handleLoginBanner: EventEmitter<string>;\n @Event() handleLogoutBanner: EventEmitter<string>;\n @Event() handleOpenWelcomeModal: EventEmitter<string>;\n @Event() handleConfirmLogout: EventEmitter<string>;\n @Event() handleImportModal: EventEmitter<string>;\n @Event() handleCancelTimeout: EventEmitter<void>;\n\n @Watch('notify')\n watchNotifyHandler(notify: BannerNotify) {\n this.isOpen = true;\n this.isOpenConfirm = true;\n this.domain = this.userInfo?.domain || this.userInfo?.nip05?.split('@')?.[1] || '';\n\n this.mode = notify.mode;\n this.url = notify.url;\n if (!this.mode) {\n this.isOpenConfirm = false;\n this.isOpen = false;\n }\n }\n\n handleOpen() {\n if (this.userInfo) {\n this.isOpen = true;\n } else {\n this.handleOpenWelcomeModal.emit();\n }\n }\n\n handleClose() {\n this.isOpen = false;\n }\n\n handleLogin() {\n this.handleLoginBanner.emit(METHOD_MODULE.LOGIN);\n this.handleClose();\n }\n\n handleSignup() {\n this.handleLoginBanner.emit(METHOD_MODULE.SIGNUP);\n this.handleClose();\n }\n\n handleImport() {\n this.handleImportModal.emit();\n this.handleClose();\n }\n\n handleLogout() {\n const isBackupKey = localStorage.getItem('backupKey');\n\n if (isBackupKey) {\n this.handleLogoutBanner.emit(METHOD_MODULE.LOGOUT);\n this.handleClose();\n localStorage.removeItem('backupKey');\n\n return;\n }\n\n if (this.userInfo.authMethod === 'local') {\n this.handleConfirmLogout.emit();\n } else {\n this.handleLogoutBanner.emit(METHOD_MODULE.LOGOUT);\n }\n\n this.handleClose();\n }\n\n handleConfirm() {\n switch (this.mode) {\n case 'authUrl':\n this.handleNotifyConfirmBanner.emit(this.url);\n break;\n case 'iframeAuthUrl':\n this.handleNotifyConfirmBannerIframe.emit(this.url);\n break;\n }\n this.handleClose();\n }\n\n render() {\n const isShowImg = Boolean(this.userInfo?.picture);\n const userName = this.userInfo?.name || this.userInfo?.nip05?.split('@')?.[0] || this.userInfo?.pubkey || '';\n const isShowUserName = Boolean(userName);\n const defaultUserAvatar = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-full\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"\n />\n </svg>\n );\n\n const content = (\n <Fragment>\n <div class=\"block w-[48px] h-[46px] relative z-10\">\n <div onClick={() => this.handleOpen()} class={`flex w-52 h-[46px] items-center pl-[11px]`}>\n <span\n class={`${this.isLoading ? 'w-5 h-5 border-[2px] mr-3.5 ml-[2px] opacity-1' : 'w-0 h-0 border-[0px] mr-0 opacity-0 ml-0'} animate-spin transition-all duration-300 ease-in-out inline-block border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full`}\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n\n {this.userInfo ? (\n <div class={`uppercase font-bold w-6 h-6 mr-2 rounded-full border border-gray-200 flex justify-center items-center`}>\n {isShowImg ? (\n this.isUserImgError ? (\n defaultUserAvatar\n ) : (\n <img class=\"w-full rounded-full\" src={this.userInfo.picture} alt=\"Logo\" onError={() => (this.isUserImgError = true)} />\n )\n ) : isShowUserName ? (\n userName[0]\n ) : (\n defaultUserAvatar\n )}\n </div>\n ) : (\n <div class=\"flex justify-center items-center\">\n <svg class=\"w-6 h-6\" width=\"225\" height=\"224\" viewBox=\"0 0 225 224\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"224.047\" height=\"224\" rx=\"64\" fill=\"#6951FA\" />\n <path\n d=\"M162.441 135.941V88.0593C170.359 85.1674 176 77.5348 176 68.6696C176 57.2919 166.708 48 155.33 48C143.953 48 134.661 57.2444 134.661 68.6696C134.661 77.5822 140.302 85.1674 148.219 88.0593V135.941C147.698 136.13 147.176 136.367 146.655 136.604L87.3956 77.3452C88.6282 74.6904 89.2919 71.7511 89.2919 68.6696C89.2919 57.2444 80.0474 48 68.6696 48C57.2919 48 48 57.2444 48 68.6696C48 77.5822 53.6415 85.1674 61.5585 88.0593V135.941C53.6415 138.833 48 146.465 48 155.33C48 166.708 57.2444 176 68.6696 176C80.0948 176 89.3393 166.708 89.3393 155.33C89.3393 146.418 83.6978 138.833 75.7807 135.941V88.0593C76.3022 87.8696 76.8237 87.6326 77.3452 87.3956L136.604 146.655C135.372 149.31 134.708 152.249 134.708 155.33C134.708 166.708 143.953 176 155.378 176C166.803 176 176.047 166.708 176.047 155.33C176.047 146.418 170.406 138.833 162.489 135.941H162.441Z\"\n fill=\"white\"\n />\n </svg>\n {this.isOpen && (\n <span class=\"px-2\">\n <b>Nostr</b> Login\n </span>\n )}\n </div>\n )}\n\n {this.isOpen && isShowUserName && <div class=\"show-slow truncate w-16 text-xs\">{userName}</div>}\n {this.isOpen && isShowUserName && <nl-login-status info={this.userInfo} />}\n </div>\n </div>\n\n <button\n onClick={() => this.handleClose()}\n type=\"button\"\n class={`${this.isOpen ? 'z-20' : 'z-0'} nl-action-button absolute right-2 top-2 z-0 show-slow grid place-items-center w-7 h-7 text-sm font-semibold rounded-full border border-transparent`}\n >\n <span class=\"sr-only\">Close</span>\n <svg\n class=\"flex-shrink-0 w-5 h-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n\n <div class=\"p-3 show-slow\">\n {this.isOpenConfirm ? (\n <div>\n <div class=\"w-8 h-8 p-1/2 rounded-full border border-gray-200 bg-white mb-2 mt-2 show-slow m-auto\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"#5a68ff\" class=\"w-full\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z\"\n />\n </svg>\n </div>\n <p class=\"mb-2 text-center max-w-40 min-w-40 mx-auto\">\n {this.mode === 'timeout' ? 'Keys not responding, check your key storage app' : `Confirmation required at ${this.domain}`}\n </p>\n\n {this.mode === 'timeout' ? (\n <div>\n <a\n onClick={() => this.handleClose()}\n href={`https://${this.domain}`}\n target=\"_blank\"\n class=\"nl-button text-nowrap py-2.5 px-3 w-full inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg disabled:opacity-50 disabled:pointer-events-none dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600 mb-2\"\n >\n Go to {this.domain}\n </a>\n <button-base\n onClick={() => {\n this.handleCancelTimeout.emit();\n this.handleClose();\n }}\n titleBtn=\"Cancel\"\n />\n </div>\n ) : this.mode === 'rebind' ? (\n <iframe src={this.url} width={'180'} height={'80'} frameBorder={'0'}></iframe>\n ) : (\n <button-base onClick={() => this.handleConfirm()} titleBtn=\"Confirm\" />\n )}\n </div>\n ) : (\n <div>\n <div>\n {this.titleBanner && <p class=\"mb-2 text-center show-slow max-w-40 min-w-40 mx-auto\">{this.titleBanner}</p>}\n\n <div class=\"mb-2\">\n <nl-change-account currentAccount={this.userInfo} accounts={this.accounts} />\n </div>\n {/* {Boolean(this.listNotifies.length) && (\n <div\n onClick={() => this.handleRetryConfirm()}\n class=\"show-slow border border-yellow-600 text-yellow-600 bg-yellow-100 p-2 rounded-lg mb-2 cursor-pointer w-44 text-xs m-auto text-center\"\n >\n Requests: {this.listNotifies.length}\n </div>\n )} */}\n {!this.userInfo ? (\n <div>\n <button-base onClick={() => this.handleLogin()} titleBtn=\"Log in\">\n <svg\n style={{ display: 'none' }}\n slot=\"icon-start\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n class=\"flex-shrink-0 w-4 h-4\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z\"\n />\n </svg>\n </button-base>\n <button-base onClick={() => this.handleSignup()} titleBtn=\"Sign up\">\n <svg\n style={{ display: 'none' }}\n slot=\"icon-start\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n class=\"flex-shrink-0 w-4 h-4\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z\"\n />\n </svg>\n </button-base>\n </div>\n ) : (\n <button-base onClick={() => this.handleLogout()} titleBtn=\"Log out\" />\n )}\n </div>\n </div>\n )}\n </div>\n </Fragment>\n );\n\n // https://gist.github.com/Haprog/848fc451c25da00b540e6d34c301e96a\n function deepQuerySelectorAll(selector: string, root?: Element) {\n root = root || document.body;\n const results = Array.from(root.querySelectorAll(selector));\n const pushNestedResults = function (root) {\n deepQuerySelectorAll(selector, root).forEach(elem => {\n if (!results.includes(elem)) {\n results.push(elem);\n }\n });\n };\n if (root.shadowRoot) {\n pushNestedResults(root.shadowRoot);\n }\n for (const elem of Array.from(root.querySelectorAll('*'))) {\n if (elem.shadowRoot) {\n pushNestedResults(elem.shadowRoot);\n }\n }\n return results;\n }\n\n const dialogs = deepQuerySelectorAll('dialog');\n const needDialog = !!dialogs.find(d => (d as HTMLDialogElement).open && !d.classList.contains('nl-banner-dialog'));\n\n return (\n <div class={`theme-${this.theme} ${!this.isOpen && this.hiddenMode ? 'hidden' : ''}`}>\n <div class={this.darkMode && 'dark'} dir=\"ltr\">\n {this.isOpenConfirm && needDialog ? (\n <nl-dialog>\n <div\n class={`nl-banner ${this.isOpen ? 'w-52 h-auto right-2 rounded-r-lg isOpen ' : 'rounded-r-none hover:rounded-r-lg cursor-pointer'} z-50 w-12 h-12 fixed top-52 right-0 inline-block gap-x-2 text-sm font-medium rounded-lg hover:right-2 transition-all duration-300 ease-in-out`}\n >\n {content}\n </div>\n </nl-dialog>\n ) : (\n <div\n class={`nl-banner ${this.isOpen ? 'w-52 h-auto right-2 rounded-r-lg isOpen' : 'rounded-r-none hover:rounded-r-lg cursor-pointer'} z-50 w-12 h-12 fixed top-52 right-0 inline-block gap-x-2 text-sm font-medium rounded-lg hover:right-2 transition-all duration-300 ease-in-out`}\n >\n {content}\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-banner2.js","mappings":";;;;;;;AAAA,MAAM,WAAW,GAAG,8toCAA8toC,CAAC;AACnvoC,uBAAe,WAAW;;MCOb,QAAQ;;;;;;;;;;;;;qBACuB,SAAS;wBACN,KAAK;0BACH,KAAK;2BACtB,EAAE;sBACW,KAAK;yBAEnB,KAAK;sBACI,IAAI;wBACV,IAAI;wBACQ,EAAE;8BAEpB,KAAK;sBAEL,EAAE;oBACM,EAAE;mBACb,EAAE;6BACS,KAAK;;IAYvC,kBAAkB,CAAC,MAAoB;;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,M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AAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAEnH,QACE,WAAK,KAAK,EAAE,SAAS,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,GAAG,QAAQ,GAAG,EAAE,EAAE,IAClF,WAAK,KAAK,EAAE,IAAI,CAAC,QAAQ,IAAI,MAAM,EAAE,GAAG,EAAC,KAAK,IAC3C,IAAI,CAAC,aAAa,IAAI,UAAU,IAC/B,qBACE,WACE,KAAK,EAAE,aAAa,IAAI,CAAC,MAAM,GAAG,0CAA0C,GAAG,kDAAkD,kJAAkJ,IAElR,OAAO,CACJ,CACI,KAEZ,WACE,KAAK,EAAE,aAAa,IAAI,CAAC,MAAM,GAAG,yCAAyC,GAAG,kDAAkD,kJAAkJ,IAEjR,OAAO,CACJ,CACP,CACG,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-banner/nl-banner.css?tag=nl-banner&encapsulation=shadow","src/components/nl-banner/nl-banner.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n","import { Component, Event, EventEmitter, Fragment, h, Prop, State, Watch } from '@stencil/core';\nimport { BannerNotify, BannerNotifyMode, Info, METHOD_MODULE, NlTheme } from '@/types';\n\n@Component({\n tag: 'nl-banner',\n styleUrl: 'nl-banner.css',\n shadow: true,\n})\nexport class NlBanner {\n @Prop({ mutable: true }) theme: NlTheme = 'default';\n @Prop({ mutable: true }) darkMode: boolean = false;\n @Prop({ mutable: true }) hiddenMode: boolean = false;\n @Prop() titleBanner: string = '';\n @Prop({ mutable: true }) isOpen: boolean = false;\n\n @Prop() isLoading: boolean = false;\n @Prop() notify: BannerNotify | null = null;\n @Prop() userInfo: Info | null = null;\n @Prop({ mutable: true }) accounts: Info[] = [];\n\n @State() isUserImgError = false;\n\n @State() domain: string = '';\n @State() mode: BannerNotifyMode = '';\n @State() url: string = '';\n @State() isOpenConfirm: boolean = false;\n\n @Event() nlNotifyConfirmBanner: EventEmitter<string>;\n @Event() nlNotifyConfirmBannerIframe: EventEmitter<string>;\n @Event() nlLoginBanner: EventEmitter<string>;\n @Event() nlLogoutBanner: EventEmitter<string>;\n @Event() nlOpenWelcomeModal: EventEmitter<string>;\n @Event() nlConfirmLogout: EventEmitter<string>;\n @Event() nlImportModal: EventEmitter<string>;\n @Event() nlCancelTimeout: EventEmitter<void>;\n\n @Watch('notify')\n watchNotifyHandler(notify: BannerNotify) {\n this.isOpen = true;\n this.isOpenConfirm = true;\n this.domain = this.userInfo?.domain || this.userInfo?.nip05?.split('@')?.[1] || '';\n\n this.mode = notify.mode;\n this.url = notify.url;\n if (!this.mode) {\n this.isOpenConfirm = false;\n this.isOpen = false;\n }\n }\n\n handleOpen() {\n if (this.userInfo) {\n this.isOpen = true;\n } else {\n this.nlOpenWelcomeModal.emit();\n }\n }\n\n handleClose() {\n this.isOpen = false;\n }\n\n handleLogin() {\n this.nlLoginBanner.emit(METHOD_MODULE.LOGIN);\n this.handleClose();\n }\n\n handleSignup() {\n this.nlLoginBanner.emit(METHOD_MODULE.SIGNUP);\n this.handleClose();\n }\n\n handleImport() {\n this.nlImportModal.emit();\n this.handleClose();\n }\n\n handleLogout() {\n const isBackupKey = localStorage.getItem('backupKey');\n\n if (isBackupKey) {\n this.nlLogoutBanner.emit(METHOD_MODULE.LOGOUT);\n this.handleClose();\n localStorage.removeItem('backupKey');\n\n return;\n }\n\n if (this.userInfo.authMethod === 'local') {\n this.nlConfirmLogout.emit();\n } else {\n this.nlLogoutBanner.emit(METHOD_MODULE.LOGOUT);\n }\n\n this.handleClose();\n }\n\n handleConfirm() {\n switch (this.mode) {\n case 'authUrl':\n this.nlNotifyConfirmBanner.emit(this.url);\n break;\n case 'iframeAuthUrl':\n this.nlNotifyConfirmBannerIframe.emit(this.url);\n break;\n }\n this.handleClose();\n }\n\n render() {\n const isShowImg = Boolean(this.userInfo?.picture);\n const userName = this.userInfo?.name || this.userInfo?.nip05?.split('@')?.[0] || this.userInfo?.pubkey || '';\n const isShowUserName = Boolean(userName);\n const defaultUserAvatar = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-full\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"\n />\n </svg>\n );\n\n const content = (\n <Fragment>\n <div class=\"block w-[48px] h-[46px] relative z-10\">\n <div onClick={() => this.handleOpen()} class={`flex w-52 h-[46px] items-center pl-[11px]`}>\n <span\n class={`${this.isLoading ? 'w-5 h-5 border-[2px] mr-3.5 ml-[2px] opacity-1' : 'w-0 h-0 border-[0px] mr-0 opacity-0 ml-0'} animate-spin transition-all duration-300 ease-in-out inline-block border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full`}\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n\n {this.userInfo ? (\n <div class={`uppercase font-bold w-6 h-6 mr-2 rounded-full border border-gray-200 flex justify-center items-center`}>\n {isShowImg ? (\n this.isUserImgError ? (\n defaultUserAvatar\n ) : (\n <img class=\"w-full rounded-full\" src={this.userInfo.picture} alt=\"Logo\" onError={() => (this.isUserImgError = true)} />\n )\n ) : isShowUserName ? (\n userName[0]\n ) : (\n defaultUserAvatar\n )}\n </div>\n ) : (\n <div class=\"flex justify-center items-center\">\n <svg class=\"w-6 h-6\" width=\"225\" height=\"224\" viewBox=\"0 0 225 224\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"224.047\" height=\"224\" rx=\"64\" fill=\"#6951FA\" />\n <path\n d=\"M162.441 135.941V88.0593C170.359 85.1674 176 77.5348 176 68.6696C176 57.2919 166.708 48 155.33 48C143.953 48 134.661 57.2444 134.661 68.6696C134.661 77.5822 140.302 85.1674 148.219 88.0593V135.941C147.698 136.13 147.176 136.367 146.655 136.604L87.3956 77.3452C88.6282 74.6904 89.2919 71.7511 89.2919 68.6696C89.2919 57.2444 80.0474 48 68.6696 48C57.2919 48 48 57.2444 48 68.6696C48 77.5822 53.6415 85.1674 61.5585 88.0593V135.941C53.6415 138.833 48 146.465 48 155.33C48 166.708 57.2444 176 68.6696 176C80.0948 176 89.3393 166.708 89.3393 155.33C89.3393 146.418 83.6978 138.833 75.7807 135.941V88.0593C76.3022 87.8696 76.8237 87.6326 77.3452 87.3956L136.604 146.655C135.372 149.31 134.708 152.249 134.708 155.33C134.708 166.708 143.953 176 155.378 176C166.803 176 176.047 166.708 176.047 155.33C176.047 146.418 170.406 138.833 162.489 135.941H162.441Z\"\n fill=\"white\"\n />\n </svg>\n {this.isOpen && (\n <span class=\"px-2\">\n <b>Nostr</b> Login\n </span>\n )}\n </div>\n )}\n\n {this.isOpen && isShowUserName && <div class=\"show-slow truncate w-16 text-xs\">{userName}</div>}\n {this.isOpen && isShowUserName && <nl-login-status info={this.userInfo} />}\n </div>\n </div>\n\n <button\n onClick={() => this.handleClose()}\n type=\"button\"\n class={`${this.isOpen ? 'z-20' : 'z-0'} nl-action-button absolute right-2 top-2 z-0 show-slow grid place-items-center w-7 h-7 text-sm font-semibold rounded-full border border-transparent`}\n >\n <span class=\"sr-only\">Close</span>\n <svg\n class=\"flex-shrink-0 w-5 h-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n\n <div class=\"p-3 show-slow\">\n {this.isOpenConfirm ? (\n <div>\n <div class=\"w-8 h-8 p-1/2 rounded-full border border-gray-200 bg-white mb-2 mt-2 show-slow m-auto\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"#5a68ff\" class=\"w-full\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z\"\n />\n </svg>\n </div>\n <p class=\"mb-2 text-center max-w-40 min-w-40 mx-auto\">\n {this.mode === 'timeout' ? 'Keys not responding, check your key storage app' : `Confirmation required at ${this.domain}`}\n </p>\n\n {this.mode === 'timeout' ? (\n <div>\n <a\n onClick={() => this.handleClose()}\n href={`https://${this.domain}`}\n target=\"_blank\"\n class=\"nl-button text-nowrap py-2.5 px-3 w-full inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg disabled:opacity-50 disabled:pointer-events-none dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600 mb-2\"\n >\n Go to {this.domain}\n </a>\n <button-base\n onClick={() => {\n this.nlCancelTimeout.emit();\n this.handleClose();\n }}\n titleBtn=\"Cancel\"\n />\n </div>\n ) : this.mode === 'rebind' ? (\n <iframe src={this.url} width={'180'} height={'80'} frameBorder={'0'}></iframe>\n ) : (\n <button-base onClick={() => this.handleConfirm()} titleBtn=\"Confirm\" />\n )}\n </div>\n ) : (\n <div>\n <div>\n {this.titleBanner && <p class=\"mb-2 text-center show-slow max-w-40 min-w-40 mx-auto\">{this.titleBanner}</p>}\n\n <div class=\"mb-2\">\n <nl-change-account currentAccount={this.userInfo} accounts={this.accounts} />\n </div>\n {/* {Boolean(this.listNotifies.length) && (\n <div\n onClick={() => this.handleRetryConfirm()}\n class=\"show-slow border border-yellow-600 text-yellow-600 bg-yellow-100 p-2 rounded-lg mb-2 cursor-pointer w-44 text-xs m-auto text-center\"\n >\n Requests: {this.listNotifies.length}\n </div>\n )} */}\n {!this.userInfo ? (\n <div>\n <button-base onClick={() => this.handleLogin()} titleBtn=\"Log in\">\n <svg\n style={{ display: 'none' }}\n slot=\"icon-start\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n class=\"flex-shrink-0 w-4 h-4\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z\"\n />\n </svg>\n </button-base>\n <button-base onClick={() => this.handleSignup()} titleBtn=\"Sign up\">\n <svg\n style={{ display: 'none' }}\n slot=\"icon-start\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n class=\"flex-shrink-0 w-4 h-4\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z\"\n />\n </svg>\n </button-base>\n </div>\n ) : (\n <button-base onClick={() => this.handleLogout()} titleBtn=\"Log out\" />\n )}\n </div>\n </div>\n )}\n </div>\n </Fragment>\n );\n\n // https://gist.github.com/Haprog/848fc451c25da00b540e6d34c301e96a\n function deepQuerySelectorAll(selector: string, root?: Element) {\n root = root || document.body;\n const results = Array.from(root.querySelectorAll(selector));\n const pushNestedResults = function (root) {\n deepQuerySelectorAll(selector, root).forEach(elem => {\n if (!results.includes(elem)) {\n results.push(elem);\n }\n });\n };\n if (root.shadowRoot) {\n pushNestedResults(root.shadowRoot);\n }\n for (const elem of Array.from(root.querySelectorAll('*'))) {\n if (elem.shadowRoot) {\n pushNestedResults(elem.shadowRoot);\n }\n }\n return results;\n }\n\n const dialogs = deepQuerySelectorAll('dialog');\n const needDialog = !!dialogs.find(d => (d as HTMLDialogElement).open && !d.classList.contains('nl-banner-dialog'));\n\n return (\n <div class={`theme-${this.theme} ${!this.isOpen && this.hiddenMode ? 'hidden' : ''}`}>\n <div class={this.darkMode && 'dark'} dir=\"ltr\">\n {this.isOpenConfirm && needDialog ? (\n <nl-dialog>\n <div\n class={`nl-banner ${this.isOpen ? 'w-52 h-auto right-2 rounded-r-lg isOpen ' : 'rounded-r-none hover:rounded-r-lg cursor-pointer'} z-50 w-12 h-12 fixed top-52 right-0 inline-block gap-x-2 text-sm font-medium rounded-lg hover:right-2 transition-all duration-300 ease-in-out`}\n >\n {content}\n </div>\n </nl-dialog>\n ) : (\n <div\n class={`nl-banner ${this.isOpen ? 'w-52 h-auto right-2 rounded-r-lg isOpen' : 'rounded-r-none hover:rounded-r-lg cursor-pointer'} z-50 w-12 h-12 fixed top-52 right-0 inline-block gap-x-2 text-sm font-medium rounded-lg hover:right-2 transition-all duration-300 ease-in-out`}\n >\n {content}\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -10,8 +10,8 @@ const NLChangeAccount = /*@__PURE__*/ proxyCustomElement(class NLChangeAccount e
10
10
  constructor() {
11
11
  super();
12
12
  this.__registerHost();
13
- this.handleOpenWelcomeModal = createEvent(this, "handleOpenWelcomeModal", 7);
14
- this.handleSwitchAccount = createEvent(this, "handleSwitchAccount", 7);
13
+ this.nlOpenWelcomeModal = createEvent(this, "nlOpenWelcomeModal", 7);
14
+ this.nlSwitchAccount = createEvent(this, "nlSwitchAccount", 7);
15
15
  this.isOpen = false;
16
16
  this.options = [];
17
17
  this.accounts = [];
@@ -50,22 +50,22 @@ const NLChangeAccount = /*@__PURE__*/ proxyCustomElement(class NLChangeAccount e
50
50
  }
51
51
  }
52
52
  handleChange(el) {
53
- this.handleSwitchAccount.emit(el);
53
+ this.nlSwitchAccount.emit(el);
54
54
  }
55
55
  handleOpenModal() {
56
- this.handleOpenWelcomeModal.emit();
56
+ this.nlOpenWelcomeModal.emit();
57
57
  }
58
58
  render() {
59
59
  const listClass = `${this.isOpen ? 'listClass flex flex-col gap-2' : 'hidden'} w-full nl-select-list absolute z-10 left-0 shadow-md rounded-lg p-2 mt-1 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full`;
60
60
  const arrowClass = `${this.isOpen ? 'rotate-180' : 'rotate-0'} duration-300 flex-shrink-0 w-4 h-4 text-gray-500`;
61
61
  const filteredOptions = this.options && this.currentAccount ? this.options.filter(el => el.pubkey !== this.currentAccount.pubkey || el.authMethod !== this.currentAccount.authMethod) : [];
62
- return (h("div", { key: '4e15e39f7ac6a552bfc772396e3e9ef8eeca95cc', class: `theme-${this.themeState}` }, h("div", { key: 'eae10769ce35dc4cc072d2361c1ee1390c79c822', class: "relative", ref: el => (this.wrapperRef = el) }, h("button", { key: 'e585a44168809f27b99201f7e13bd5db5e4f6569', ref: el => (this.buttonRef = el), onClick: () => this.toggleDropdown(), type: "button", class: "nl-select peer py-3 px-4 flex items-center w-full justify-between border-transparent rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none dark:border-transparent" }, h("span", { key: '006ed9a67b57227d4dab51f0b6bcb8290cd9d3ac', class: "text-gray-500" }, "Switch profile"), h("svg", { key: '5f824a479165929698fab31b8837b89418587652', class: arrowClass, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: '600914907723c9f8d01a15da357ccb825c1d1e6a', d: "m6 9 6 6 6-6" }))), h("ul", { key: '9b5b68724a3bce995e6b8b0a9d0eb653baedf79a', ref: el => (this.ulRef = el), class: listClass }, this.options &&
62
+ return (h("div", { key: 'f6dd7e79783db7f604ef7d88330f6f5be49ba8a2', class: `theme-${this.themeState}` }, h("div", { key: '609309704561f010d3f65ea133ab0270109eb8b0', class: "relative", ref: el => (this.wrapperRef = el) }, h("button", { key: 'f1db53da0bda356e63f2de9febc43622c4414c45', ref: el => (this.buttonRef = el), onClick: () => this.toggleDropdown(), type: "button", class: "nl-select peer py-3 px-4 flex items-center w-full justify-between border-transparent rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none dark:border-transparent" }, h("span", { key: 'b9600f41bbe8650c51fa6f98d267fcb905b4da5d', class: "text-gray-500" }, "Switch profile"), h("svg", { key: '680809369a08990229184a1db53591d0886a5c76', class: arrowClass, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: '05a63eff193fdd09c85f237060ba76c154456806', d: "m6 9 6 6 6-6" }))), h("ul", { key: 'f40092c08eaabc5fdafeb7bd0fa27d7f20228692', ref: el => (this.ulRef = el), class: listClass }, this.options &&
63
63
  filteredOptions.map(el => {
64
64
  const isShowImg = Boolean(el === null || el === void 0 ? void 0 : el.picture);
65
65
  const userName = el.name || el.nip05 || el.pubkey;
66
66
  const isShowUserName = Boolean(userName);
67
67
  return (h("li", { onClick: () => this.handleChange(el), class: "nl-select-option flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm" }, h("div", { class: "uppercase font-bold w-full max-w-6 h-6 rounded-full border border-gray-400 flex justify-center items-center" }, isShowImg ? (h("img", { class: "w-full rounded-full", src: el.picture, alt: "Logo" })) : isShowUserName ? (userName[0]) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", class: "w-full" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" })))), h("div", { class: "overflow-hidden flex flex-col w-full" }, h("div", { class: "truncate overflow-hidden" }, userName), h("nl-login-status", { info: el }))));
68
- }), h("li", { key: '936f2b75ca2dfca3483650d5d62fc50182cfc8f2', class: "first:pt-0 pt-2 border-t-[1px] first:border-none border-gray-300" }, h("div", { key: 'be0b4f29e70d8e2bc9fd1cc04c0fb43ad3dd5cac', onClick: () => this.handleOpenModal(), class: "nl-select-option flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm" }, h("div", { key: 'bdd2a67e5763726666fcea91b0e7de67fe855994', class: "uppercase font-bold w-6 h-6 rounded-full border border-gray-400 flex justify-center items-center" }, h("svg", { key: 'f3a258f3e510ccb83b95bf3abecf65c248c8b0f1', xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", class: "w-4 h-4" }, h("path", { key: 'dafaa898f3e042531a923a9a77b94511895c6102', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 4.5v15m7.5-7.5h-15" }))), "Add profile"))))));
68
+ }), h("li", { key: 'de44321e2c48038899e0722663fdc25569ff1b8f', class: "first:pt-0 pt-2 border-t-[1px] first:border-none border-gray-300" }, h("div", { key: 'b22cd3d2aa203ab668522aa3f3da367999cbb29b', onClick: () => this.handleOpenModal(), class: "nl-select-option flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm" }, h("div", { key: '2d61e1ea7a34dc91f840ef0ede66d0d885ca225b', class: "uppercase font-bold w-6 h-6 rounded-full border border-gray-400 flex justify-center items-center" }, h("svg", { key: 'eda5d7ea77795ea6e0689a7bc44266f98bf96ac6', xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", class: "w-4 h-4" }, h("path", { key: '51dd5ca5bb80c63d199aabfb035f554beb5a6e09', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 4.5v15m7.5-7.5h-15" }))), "Add profile"))))));
69
69
  }
70
70
  get element() { return this; }
71
71
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"nl-change-account2.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,szsCAAszsC,CAAC;AACl1sC,8BAAe,kBAAkB;;MCOpB,eAAe;;;;;;sBACC,KAAK;uBACL,EAAE;wBACF,EAAE;8BACE,IAAI;oBAsBV,KAAK;wBACF,KAAK;0BACkC,SAAS;qBACf,SAAS;;IAdtE,iBAAiB;QACf,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE;YAC/C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACrB;KACF;IAED,cAAc;QACZ,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,yBAAyB,EAAE,CAAC;KAClC;IAOD,gBAAgB,CAAC,QAAqD;QACpE,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;KAC5B;IAGD,gBAAgB,CAAC,QAAiB;QAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;KACtB;IAGD,oBAAoB,CAAC,QAAgB;QACnC,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;KACzB;IAED,iBAAiB;QACf,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;KAC3B;IAED,yBAAyB;QACvB,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BAAiB,IAAI,EAAE,EAAE,GAAI,CACzB,CACH,EACL;aACH,CAAC,EACJ,2DAAI,KAAK,EAAC,kEAAkE,IAC1E,4DAAK,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,EAAE,EAAE,KAAK,EAAC,0FAA0F,IAC1I,4DAAK,KAAK,EAAC,kGAAkG,IAC3G,4DAAK,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,EAAC,KAAK,EAAC,SAAS,IAC9H,+EAAqB,OAAO,qBAAiB,OAAO,EAAC,CAAC,EAAC,wBAAwB,GAAG,CAC9E,CACF,gBAEF,CACH,CACF,CACD,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-change-account/nl-change-account.css?tag=nl-change-account","src/components/nl-change-account/nl-change-account.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Listen, Prop, State, Watch, Element, Event, EventEmitter } from '@stencil/core';\nimport { Info } from '@/types';\n\n@Component({\n tag: 'nl-change-account',\n styleUrl: 'nl-change-account.css',\n shadow: false,\n})\nexport class NLChangeAccount {\n @State() isOpen: boolean = false;\n @State() options: Info[] = [];\n @Prop() accounts: Info[] = [];\n @Prop() currentAccount: Info = null;\n\n @Element() element: HTMLElement;\n @Event() handleOpenWelcomeModal: EventEmitter<string>;\n @Event() handleSwitchAccount: EventEmitter<Info>;\n\n buttonRef: HTMLButtonElement;\n ulRef: HTMLUListElement;\n wrapperRef: HTMLDivElement;\n\n @Listen('click', { target: 'window' })\n handleWindowClick() {\n if (this.wrapperRef.querySelector('.listClass')) {\n this.isOpen = false;\n }\n }\n\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n this.calculateDropdownPosition();\n }\n\n @State() mode: boolean = false;\n @Prop() darkMode: boolean = false;\n @State() themeState: 'default' | 'ocean' | 'lemonade' | 'purple' = 'default';\n @Prop() theme: 'default' | 'ocean' | 'lemonade' | 'purple' = 'default';\n @Watch('theme')\n watchPropHandler(newValue: 'default' | 'ocean' | 'lemonade' | 'purple') {\n this.themeState = newValue;\n }\n\n @Watch('darkMode')\n watchModeHandler(newValue: boolean) {\n this.mode = newValue;\n }\n\n @Watch('accounts')\n watchAccountsHandler(newValue: Info[]) {\n this.options = newValue;\n }\n\n connectedCallback() {\n this.themeState = this.theme;\n this.mode = this.darkMode;\n }\n\n calculateDropdownPosition() {\n if (this.isOpen && this.buttonRef) {\n const buttonRect = this.buttonRef.getBoundingClientRect();\n this.ulRef.style.top = `${buttonRect.height}px`;\n }\n }\n\n handleChange(el: Info) {\n this.handleSwitchAccount.emit(el);\n }\n\n handleOpenModal() {\n this.handleOpenWelcomeModal.emit();\n }\n\n render() {\n const listClass = `${this.isOpen ? 'listClass flex flex-col gap-2' : 'hidden'} w-full nl-select-list absolute z-10 left-0 shadow-md rounded-lg p-2 mt-1 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full`;\n const arrowClass = `${this.isOpen ? 'rotate-180' : 'rotate-0'} duration-300 flex-shrink-0 w-4 h-4 text-gray-500`;\n const filteredOptions =\n this.options && this.currentAccount ? this.options.filter(el => el.pubkey !== this.currentAccount.pubkey || el.authMethod !== this.currentAccount.authMethod) : [];\n\n return (\n <div class={`theme-${this.themeState}`}>\n <div class=\"relative\" ref={el => (this.wrapperRef = el)}>\n <button\n ref={el => (this.buttonRef = el)}\n onClick={() => this.toggleDropdown()}\n type=\"button\"\n class=\"nl-select peer py-3 px-4 flex items-center w-full justify-between border-transparent rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none dark:border-transparent\"\n >\n <span class=\"text-gray-500\">Switch profile</span>\n <svg\n class={arrowClass}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n\n <ul ref={el => (this.ulRef = el)} class={listClass}>\n {this.options &&\n filteredOptions.map(el => {\n const isShowImg = Boolean(el?.picture);\n const userName = el.name || el.nip05 || el.pubkey;\n const isShowUserName = Boolean(userName);\n\n return (\n <li onClick={() => this.handleChange(el)} class=\"nl-select-option flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm\">\n <div class=\"uppercase font-bold w-full max-w-6 h-6 rounded-full border border-gray-400 flex justify-center items-center\">\n {isShowImg ? (\n <img class=\"w-full rounded-full\" src={el.picture} alt=\"Logo\" />\n ) : isShowUserName ? (\n userName[0]\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-full\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"\n />\n </svg>\n )}\n </div>\n {/*<div class=\"truncate overflow-hidden w-full\">{userName}</div>*/}\n\n <div class=\"overflow-hidden flex flex-col w-full\">\n <div class=\"truncate overflow-hidden\">{userName}</div>\n <nl-login-status info={el} />\n </div>\n </li>\n );\n })}\n <li class=\"first:pt-0 pt-2 border-t-[1px] first:border-none border-gray-300\">\n <div onClick={() => this.handleOpenModal()} class=\"nl-select-option flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm\">\n <div class=\"uppercase font-bold w-6 h-6 rounded-full border border-gray-400 flex justify-center items-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-4 h-4\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 4.5v15m7.5-7.5h-15\" />\n </svg>\n </div>\n Add profile\n </div>\n </li>\n </ul>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-change-account2.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,szsCAAszsC,CAAC;AACl1sC,8BAAe,kBAAkB;;MCOpB,eAAe;;;;;;sBACC,KAAK;uBACL,EAAE;wBACF,EAAE;8BACE,IAAI;oBAsBV,KAAK;wBACF,KAAK;0BACkC,SAAS;qBACf,SAAS;;IAdtE,iBAAiB;QACf,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE;YAC/C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACrB;KACF;IAED,cAAc;QACZ,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,yBAAyB,EAAE,CAAC;KAClC;IAOD,gBAAgB,CAAC,QAAqD;QACpE,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;KAC5B;IAGD,gBAAgB,CAAC,QAAiB;QAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;KACtB;IAGD,oBAAoB,CAAC,QAAgB;QACnC,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;KACzB;IAED,iBAAiB;QACf,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;KAC3B;IAED,yBAAyB;QACvB,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE;YACjC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC;YAC1D,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,GAA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C1I,4DAAK,KAAK,EAAC,kGAAkG,IAC3G,4DAAK,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,EAAC,KAAK,EAAC,SAAS,IAC9H,+EAAqB,OAAO,qBAAiB,OAAO,EAAC,CAAC,EAAC,wBAAwB,GAAG,CAC9E,CACF,gBAEF,CACH,CACF,CACD,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-change-account/nl-change-account.css?tag=nl-change-account","src/components/nl-change-account/nl-change-account.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Listen, Prop, State, Watch, Element, Event, EventEmitter } from '@stencil/core';\nimport { Info } from '@/types';\n\n@Component({\n tag: 'nl-change-account',\n styleUrl: 'nl-change-account.css',\n shadow: false,\n})\nexport class NLChangeAccount {\n @State() isOpen: boolean = false;\n @State() options: Info[] = [];\n @Prop() accounts: Info[] = [];\n @Prop() currentAccount: Info = null;\n\n @Element() element: HTMLElement;\n @Event() nlOpenWelcomeModal: EventEmitter<string>;\n @Event() nlSwitchAccount: EventEmitter<Info>;\n\n buttonRef: HTMLButtonElement;\n ulRef: HTMLUListElement;\n wrapperRef: HTMLDivElement;\n\n @Listen('click', { target: 'window' })\n handleWindowClick() {\n if (this.wrapperRef.querySelector('.listClass')) {\n this.isOpen = false;\n }\n }\n\n toggleDropdown() {\n this.isOpen = !this.isOpen;\n this.calculateDropdownPosition();\n }\n\n @State() mode: boolean = false;\n @Prop() darkMode: boolean = false;\n @State() themeState: 'default' | 'ocean' | 'lemonade' | 'purple' = 'default';\n @Prop() theme: 'default' | 'ocean' | 'lemonade' | 'purple' = 'default';\n @Watch('theme')\n watchPropHandler(newValue: 'default' | 'ocean' | 'lemonade' | 'purple') {\n this.themeState = newValue;\n }\n\n @Watch('darkMode')\n watchModeHandler(newValue: boolean) {\n this.mode = newValue;\n }\n\n @Watch('accounts')\n watchAccountsHandler(newValue: Info[]) {\n this.options = newValue;\n }\n\n connectedCallback() {\n this.themeState = this.theme;\n this.mode = this.darkMode;\n }\n\n calculateDropdownPosition() {\n if (this.isOpen && this.buttonRef) {\n const buttonRect = this.buttonRef.getBoundingClientRect();\n this.ulRef.style.top = `${buttonRect.height}px`;\n }\n }\n\n handleChange(el: Info) {\n this.nlSwitchAccount.emit(el);\n }\n\n handleOpenModal() {\n this.nlOpenWelcomeModal.emit();\n }\n\n render() {\n const listClass = `${this.isOpen ? 'listClass flex flex-col gap-2' : 'hidden'} w-full nl-select-list absolute z-10 left-0 shadow-md rounded-lg p-2 mt-1 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full`;\n const arrowClass = `${this.isOpen ? 'rotate-180' : 'rotate-0'} duration-300 flex-shrink-0 w-4 h-4 text-gray-500`;\n const filteredOptions =\n this.options && this.currentAccount ? this.options.filter(el => el.pubkey !== this.currentAccount.pubkey || el.authMethod !== this.currentAccount.authMethod) : [];\n\n return (\n <div class={`theme-${this.themeState}`}>\n <div class=\"relative\" ref={el => (this.wrapperRef = el)}>\n <button\n ref={el => (this.buttonRef = el)}\n onClick={() => this.toggleDropdown()}\n type=\"button\"\n class=\"nl-select peer py-3 px-4 flex items-center w-full justify-between border-transparent rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none dark:border-transparent\"\n >\n <span class=\"text-gray-500\">Switch profile</span>\n <svg\n class={arrowClass}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n\n <ul ref={el => (this.ulRef = el)} class={listClass}>\n {this.options &&\n filteredOptions.map(el => {\n const isShowImg = Boolean(el?.picture);\n const userName = el.name || el.nip05 || el.pubkey;\n const isShowUserName = Boolean(userName);\n\n return (\n <li onClick={() => this.handleChange(el)} class=\"nl-select-option flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm\">\n <div class=\"uppercase font-bold w-full max-w-6 h-6 rounded-full border border-gray-400 flex justify-center items-center\">\n {isShowImg ? (\n <img class=\"w-full rounded-full\" src={el.picture} alt=\"Logo\" />\n ) : isShowUserName ? (\n userName[0]\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-full\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"\n />\n </svg>\n )}\n </div>\n {/*<div class=\"truncate overflow-hidden w-full\">{userName}</div>*/}\n\n <div class=\"overflow-hidden flex flex-col w-full\">\n <div class=\"truncate overflow-hidden\">{userName}</div>\n <nl-login-status info={el} />\n </div>\n </li>\n );\n })}\n <li class=\"first:pt-0 pt-2 border-t-[1px] first:border-none border-gray-300\">\n <div onClick={() => this.handleOpenModal()} class=\"nl-select-option flex cursor-pointer items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm\">\n <div class=\"uppercase font-bold w-6 h-6 rounded-full border border-gray-400 flex justify-center items-center\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-4 h-4\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 4.5v15m7.5-7.5h-15\" />\n </svg>\n </div>\n Add profile\n </div>\n </li>\n </ul>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -12,14 +12,14 @@ const NlConfirmLogout = /*@__PURE__*/ proxyCustomElement(class NlConfirmLogout e
12
12
  constructor() {
13
13
  super();
14
14
  this.__registerHost();
15
- this.handleLogoutBanner = createEvent(this, "handleLogoutBanner", 7);
16
- this.handleBackUpModal = createEvent(this, "handleBackUpModal", 7);
15
+ this.nlLogoutBanner = createEvent(this, "nlLogoutBanner", 7);
16
+ this.nlBackUpModal = createEvent(this, "nlBackUpModal", 7);
17
17
  this.nlCloseModal = createEvent(this, "nlCloseModal", 7);
18
- this.titleModal = "Delete keys?";
19
- this.description = "Your profile keys are stored in this browser tab and will be deleted if you log out, and your profile will be inaccessible.";
18
+ this.titleModal = 'Delete keys?';
19
+ this.description = 'Your profile keys are stored in this browser tab and will be deleted if you log out, and your profile will be inaccessible.';
20
20
  }
21
21
  handleLogout() {
22
- this.handleLogoutBanner.emit(METHOD_MODULE.LOGOUT);
22
+ this.nlLogoutBanner.emit(METHOD_MODULE.LOGOUT);
23
23
  this.nlCloseModal.emit();
24
24
  }
25
25
  handleCancel() {
@@ -29,7 +29,7 @@ const NlConfirmLogout = /*@__PURE__*/ proxyCustomElement(class NlConfirmLogout e
29
29
  state.path = [CURRENT_MODULE.IMPORT_FLOW];
30
30
  }
31
31
  render() {
32
- return (h("div", { key: 'fe605f38f9d0a440fe53e21f19288c41e4762c22', class: "p-4 overflow-y-auto" }, h("h1", { key: '84d14a59035515b2fd612d262400a038887a10d7', class: "nl-title font-bold text-center text-4xl" }, this.titleModal), h("p", { key: '83ef73271c76309561be95e0207f8130d75a161c', class: "nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto" }, this.description), h("div", { key: 'fce0f132846beb95dd9e41357f5ab87be7229a56', class: "mt-3 ml-auto mr-auto w-60 flex flex-col gap-2" }, h("button-base", { key: 'c4fc722a7c98d84e797963ed7fe928164411b701', onClick: () => this.handleBackUp(), titleBtn: "Backup keys", theme: "lemonade" }), h("button-base", { key: '39df385a9a8dc3fcd74f4196d4191bc4a308a16d', onClick: () => this.handleLogout(), theme: "crab", titleBtn: "Logout and delete keys" }))));
32
+ return (h("div", { key: '4f720e5609b30c620a8368a0f5d00be2c0b97a49', class: "p-4 overflow-y-auto" }, h("h1", { key: '605f8a771e9cae2475c7ce6b14601409c6ccc859', class: "nl-title font-bold text-center text-4xl" }, this.titleModal), h("p", { key: '1afc0d130722fe0936501f110aa59e4157d7ab3c', class: "nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto" }, this.description), h("div", { key: '3db1d568eb4998f1f1988ad7084f1b77af8359d9', class: "mt-3 ml-auto mr-auto w-60 flex flex-col gap-2" }, h("button-base", { key: 'b8f48caec08a8077f9e92d35e585bd360798d3dc', onClick: () => this.handleBackUp(), titleBtn: "Backup keys", theme: "lemonade" }), h("button-base", { key: '00e6be728321540d99275e63dafbe405e96bc9b1', onClick: () => this.handleLogout(), theme: "crab", titleBtn: "Logout and delete keys" }))));
33
33
  }
34
34
  static get style() { return NlConfirmLogoutStyle0; }
35
35
  }, [0, "nl-confirm-logout", {
@@ -1 +1 @@
1
- {"file":"nl-confirm-logout2.js","mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,us1CAAus1C,CAAC;AACnu1C,8BAAe,kBAAkB;;MCQpB,eAAe;;;;;;;0BACL,cAAc;2BACb,6HAA6H;;IAKnJ,YAAY;QACV,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,YAAY;QACV,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,YAAY;QACV,KAAK,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;KAC3C;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,2DAAI,KAAK,EAAC,yCAAyC,IAAE,IAAI,CAAC,UAAU,CAAM,EAC1E,0DAAG,KAAK,EAAC,qEAAqE,IAAE,IAAI,CAAC,WAAW,CAAK,EAErG,4DAAK,KAAK,EAAC,+CAA+C,IAExD,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAC,aAAa,EAAC,KAAK,EAAC,UAAU,GAAG,EAC3F,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,KAAK,EAAC,MAAM,EAAC,QAAQ,EAAC,wBAAwB,GAAG,CAC9F,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-confirm-logout/nl-confirm-logout.css?tag=nl-confirm-logout","src/components/nl-confirm-logout/nl-confirm-logout.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { CURRENT_MODULE, METHOD_MODULE } from '@/types';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-confirm-logout',\n styleUrl: 'nl-confirm-logout.css',\n shadow: false,\n})\nexport class NlConfirmLogout {\n @Prop() titleModal = \"Delete keys?\";\n @Prop() description = \"Your profile keys are stored in this browser tab and will be deleted if you log out, and your profile will be inaccessible.\";\n @Event() handleLogoutBanner: EventEmitter<string>;\n @Event() handleBackUpModal: EventEmitter<string>;\n @Event() nlCloseModal: EventEmitter;\n\n handleLogout() {\n this.handleLogoutBanner.emit(METHOD_MODULE.LOGOUT);\n this.nlCloseModal.emit();\n }\n\n handleCancel() {\n this.nlCloseModal.emit();\n }\n\n handleBackUp() {\n state.path = [CURRENT_MODULE.IMPORT_FLOW];\n }\n\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-4xl\">{this.titleModal}</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{this.description}</p>\n\n <div class=\"mt-3 ml-auto mr-auto w-60 flex flex-col gap-2\">\n {/* <button-base onClick={() => this.handleCancel()} titleBtn=\"Cancel\" /> */}\n <button-base onClick={() => this.handleBackUp()} titleBtn=\"Backup keys\" theme=\"lemonade\" />\n <button-base onClick={() => this.handleLogout()} theme=\"crab\" titleBtn=\"Logout and delete keys\" />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-confirm-logout2.js","mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,kr3CAAkr3C,CAAC;AAC9s3C,8BAAe,kBAAkB;;MCQpB,eAAe;;;;;;;0BACL,cAAc;2BACb,6HAA6H;;IAKnJ,YAAY;QACV,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,YAAY;QACV,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,YAAY;QACV,KAAK,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;KAC3C;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,2DAAI,KAAK,EAAC,yCAAyC,IAAE,IAAI,CAAC,UAAU,CAAM,EAC1E,0DAAG,KAAK,EAAC,qEAAqE,IAAE,IAAI,CAAC,WAAW,CAAK,EAErG,4DAAK,KAAK,EAAC,+CAA+C,IAExD,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAC,aAAa,EAAC,KAAK,EAAC,UAAU,GAAG,EAC3F,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,KAAK,EAAC,MAAM,EAAC,QAAQ,EAAC,wBAAwB,GAAG,CAC9F,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-confirm-logout/nl-confirm-logout.css?tag=nl-confirm-logout","src/components/nl-confirm-logout/nl-confirm-logout.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { CURRENT_MODULE, METHOD_MODULE } from '@/types';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-confirm-logout',\n styleUrl: 'nl-confirm-logout.css',\n shadow: false,\n})\nexport class NlConfirmLogout {\n @Prop() titleModal = 'Delete keys?';\n @Prop() description = 'Your profile keys are stored in this browser tab and will be deleted if you log out, and your profile will be inaccessible.';\n @Event() nlLogoutBanner: EventEmitter<string>;\n @Event() nlBackUpModal: EventEmitter<string>;\n @Event() nlCloseModal: EventEmitter;\n\n handleLogout() {\n this.nlLogoutBanner.emit(METHOD_MODULE.LOGOUT);\n this.nlCloseModal.emit();\n }\n\n handleCancel() {\n this.nlCloseModal.emit();\n }\n\n handleBackUp() {\n state.path = [CURRENT_MODULE.IMPORT_FLOW];\n }\n\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-4xl\">{this.titleModal}</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{this.description}</p>\n\n <div class=\"mt-3 ml-auto mr-auto w-60 flex flex-col gap-2\">\n {/* <button-base onClick={() => this.handleCancel()} titleBtn=\"Cancel\" /> */}\n <button-base onClick={() => this.handleBackUp()} titleBtn=\"Backup keys\" theme=\"lemonade\" />\n <button-base onClick={() => this.handleLogout()} theme=\"crab\" titleBtn=\"Logout and delete keys\" />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-connect2.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,w92CAAw92C,CAAC;AAC9+2C,wBAAe,YAAY;;MCQd,SAAS;;;;;4BACG,sBAAsB;2BACT,EAAE;sBACZ,KAAK;wCACwB,EAAE;mCAEjB,KAAK;;IAG7C,kBAAkB,CAAC,MAAM;QACvB,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,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pF,4DAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,+EACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,6bAA6b,GAC/b,EACF,+EACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,0OAA0O,GAC5O,CACE,CACM,CACf,EAEA,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,KAC9B,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,QAAQ,EAAC,YAAY,IACzG,4DAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,+EACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,2KAA2K,GAC7K,CACE,CACM,CACf,CACG,CACF,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-connect/nl-connect.css?tag=nl-connect","src/components/nl-connect/nl-connect.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Fragment, h, Prop, State } from '@stencil/core';\nimport { AuthMethod, ConnectionString, CURRENT_MODULE } from '@/types';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-connect',\n styleUrl: 'nl-connect.css',\n shadow: false,\n})\nexport class NlConnect {\n @Prop() titleWelcome = 'Connect to key store';\n @Prop() authMethods: AuthMethod[] = [];\n @Prop() hasOTP: boolean = false;\n @Prop() connectionStringServices: ConnectionString[] = [];\n\n @State() isOpenAdvancedLogin: boolean = false;\n @Event() nlNostrConnect: EventEmitter<ConnectionString>;\n\n handleChangeScreen(screen) {\n state.path = [...state.path, screen];\n }\n\n handleOpenAdvanced() {\n this.isOpenAdvancedLogin = !this.isOpenAdvancedLogin;\n }\n\n allowAuthMethod(m: AuthMethod) {\n return !this.authMethods.length || this.authMethods.includes(m);\n }\n\n componentWillLoad() {}\n\n handleOpenLink(e: Event, cs: ConnectionString) {\n e.preventDefault();\n this.nlNostrConnect.emit(cs);\n }\n\n handleConnectionString() {\n this.handleChangeScreen(CURRENT_MODULE.CONNECTION_STRING);\n }\n\n render() {\n const arrowClass = `${this.isOpenAdvancedLogin ? 'rotate-180' : 'rotate-0'} duration-300 flex-shrink-0 w-4 h-4 text-blue-500`;\n\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-3xl\">{this.titleWelcome}</h1>\n </div>\n\n <div class=\"p-4\">\n {Boolean(this.connectionStringServices.length) && (\n <div class=\"max-w-96 mx-auto pt-5\">\n <p class=\"nl-description font-medium text-sm pb-1.5\">Select key store:</p>\n <ul class=\"p-2 rounded-lg border border-gray-200 flex flex-col w-full gap-0.5\">\n {this.connectionStringServices.map(el => {\n const isLoading = el.available === 'loading';\n const isUnavailable = el.available === false;\n const isDisabled = isLoading || isUnavailable;\n\n return (\n <li class={isDisabled ? 'opacity-50 pointer-events-none' : ''}>\n <a\n href={isDisabled ? undefined : el.link}\n target=\"_blank\"\n onClick={e => {\n if (isDisabled) {\n e.preventDefault();\n return;\n }\n this.handleOpenLink(e, el);\n }}\n class={`flex items-center gap-x-3.5 w-full py-2 px-3 rounded-lg text-sm justify-between ${isDisabled ? 'cursor-default' : 'hover:bg-gray-300 cursor-pointer'}`}\n >\n <div class=\"w-full max-w-7 h-7 flex relative\">\n <div class=\"uppercase font-bold w-full h-full rounded-full border border-gray-400 flex justify-center items-center\">\n {Boolean(el.img) ? (\n <img class={`w-full rounded-full ${isUnavailable ? 'grayscale' : ''}`} src={el.img} alt={el.name} />\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"#9ca3af\" class=\"w-4 h-4 block\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z\"\n />\n </svg>\n )}\n </div>\n </div>\n <div class=\"overflow-hidden flex flex-col w-full\">\n <div class=\"nl-title truncate overflow-hidden\">\n {el.name}\n {isLoading && <span class=\"nl-description text-xs ml-2\">checking...</span>}\n {isUnavailable && <span class=\"nl-description text-xs ml-2\">offline</span>}\n </div>\n </div>\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n )}\n </div>\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <div class=\"max-w-72 mx-auto\">\n <nl-nip46-relay-settings\n defaultRelays={state.customNip46Relays}\n onNlRelaysChanged={e => {\n state.customNip46Relays = e.detail;\n }}\n />\n </div>\n\n <div class=\"max-w-52 mx-auto pb-5\">\n {(this.allowAuthMethod('connect') || this.allowAuthMethod('readOnly')) && (\n <div class=\"flex justify-center\">\n <div\n onClick={() => this.handleOpenAdvanced()}\n class=\"text-blue-500 mt-3 decoration-dashed cursor-pointer inline-flex gap-2 items-center pb-1 border-dashed border-b-[1px] border-blue-500 text-sm font-light\"\n >\n Advanced\n <svg\n class={arrowClass}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </div>\n </div>\n )}\n\n <div\n class={`${this.isOpenAdvancedLogin ? 'max-h-[500px] mt-3 duration-300' : 'max-h-0 mt-0 duration-[0.25s]'} transition-max-height ease-in flex gap-3 flex-col overflow-hidden`}\n >\n {/* {this.hasExtension && !this.allowAuthMethod('extension') && this.renderSignInWithExtension()} */}\n {this.allowAuthMethod('connect') && (\n <button-base titleBtn=\"User name\" onClick={() => this.handleChangeScreen(CURRENT_MODULE.LOGIN)}>\n <svg\n style={{ display: 'none' }}\n slot=\"icon-start\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"2\"\n stroke=\"currentColor\"\n // class=\"flex-shrink-0 w-4 h-4 text-gray-500\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z\"\n />\n </svg>\n </button-base>\n )}\n\n {this.allowAuthMethod('connect') && (\n <button-base titleBtn=\"Connection string\" onClick={() => this.handleConnectionString()}>\n <svg style={{ display: 'none' }} slot=\"icon-start\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M3.75 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 3.75 9.375v-4.5ZM3.75 14.625c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5a1.125 1.125 0 0 1-1.125-1.125v-4.5ZM13.5 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 13.5 9.375v-4.5Z\"\n />\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M6.75 6.75h.75v.75h-.75v-.75ZM6.75 16.5h.75v.75h-.75v-.75ZM16.5 6.75h.75v.75h-.75v-.75ZM13.5 13.5h.75v.75h-.75v-.75ZM13.5 19.5h.75v.75h-.75v-.75ZM19.5 13.5h.75v.75h-.75v-.75ZM19.5 19.5h.75v.75h-.75v-.75ZM16.5 16.5h.75v.75h-.75v-.75Z\"\n />\n </svg>\n </button-base>\n )}\n\n {this.allowAuthMethod('connect') && (\n <button-base onClick={() => this.handleChangeScreen(CURRENT_MODULE.LOGIN_BUNKER_URL)} titleBtn=\"Bunker URL\">\n <svg style={{ display: 'none' }} slot=\"icon-start\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244\"\n />\n </svg>\n </button-base>\n )}\n </div>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-connect2.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,gq3CAAgq3C,CAAC;AACtr3C,wBAAe,YAAY;;MCQd,SAAS;;;;;4BACG,sBAAsB;2BACT,EAAE;sBACZ,KAAK;wCACwB,EAAE;mCAEjB,KAAK;;IAG7C,kBAAkB,CAAC,MAAM;QACvB,KAAK,CAAC,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,MA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,EAAE,IACpF,4DAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,+EACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,6bAA6b,GAC/b,EACF,+EACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,0OAA0O,GAC5O,CACE,CACM,CACf,EAEA,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,KAC9B,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,QAAQ,EAAC,YAAY,IACzG,4DAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,+EACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,2KAA2K,GAC7K,CACE,CACM,CACf,CACG,CACF,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-connect/nl-connect.css?tag=nl-connect","src/components/nl-connect/nl-connect.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Fragment, h, Prop, State } from '@stencil/core';\nimport { AuthMethod, ConnectionString, CURRENT_MODULE } from '@/types';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-connect',\n styleUrl: 'nl-connect.css',\n shadow: false,\n})\nexport class NlConnect {\n @Prop() titleWelcome = 'Connect to key store';\n @Prop() authMethods: AuthMethod[] = [];\n @Prop() hasOTP: boolean = false;\n @Prop() connectionStringServices: ConnectionString[] = [];\n\n @State() isOpenAdvancedLogin: boolean = false;\n @Event() nlNostrConnect: EventEmitter<ConnectionString>;\n\n handleChangeScreen(screen) {\n state.path = [...state.path, screen];\n }\n\n handleOpenAdvanced() {\n this.isOpenAdvancedLogin = !this.isOpenAdvancedLogin;\n }\n\n allowAuthMethod(m: AuthMethod) {\n return !this.authMethods.length || this.authMethods.includes(m);\n }\n\n componentWillLoad() {}\n\n handleOpenLink(e: Event, cs: ConnectionString) {\n e.preventDefault();\n this.nlNostrConnect.emit(cs);\n }\n\n handleConnectionString() {\n this.handleChangeScreen(CURRENT_MODULE.CONNECTION_STRING);\n }\n\n render() {\n const arrowClass = `${this.isOpenAdvancedLogin ? 'rotate-180' : 'rotate-0'} duration-300 flex-shrink-0 w-4 h-4 text-blue-500`;\n\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-3xl\">{this.titleWelcome}</h1>\n </div>\n\n <div class=\"p-4\">\n {Boolean(this.connectionStringServices.length) && (\n <div class=\"max-w-96 mx-auto pt-5\">\n <p class=\"nl-description font-medium text-sm pb-1.5\">Select key store:</p>\n <ul class=\"p-2 rounded-lg border border-gray-200 flex flex-col w-full gap-0.5\">\n {this.connectionStringServices.map(el => {\n const isLoading = el.available === 'loading';\n const isUnavailable = el.available === false;\n const isDisabled = isLoading || isUnavailable;\n\n return (\n <li class={isDisabled ? 'opacity-50 pointer-events-none' : ''}>\n <a\n href={isDisabled ? undefined : el.link}\n target=\"_blank\"\n onClick={e => {\n if (isDisabled) {\n e.preventDefault();\n return;\n }\n this.handleOpenLink(e, el);\n }}\n class={`flex items-center gap-x-3.5 w-full py-2 px-3 rounded-lg text-sm justify-between ${isDisabled ? 'cursor-default' : 'hover:bg-gray-300 cursor-pointer'}`}\n >\n <div class=\"w-full max-w-7 h-7 flex relative\">\n <div class=\"uppercase font-bold w-full h-full rounded-full border border-gray-400 flex justify-center items-center\">\n {Boolean(el.img) ? (\n <img class={`w-full rounded-full ${isUnavailable ? 'grayscale' : ''}`} src={el.img} alt={el.name} />\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"#9ca3af\" class=\"w-4 h-4 block\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z\"\n />\n </svg>\n )}\n </div>\n </div>\n <div class=\"overflow-hidden flex flex-col w-full\">\n <div class=\"nl-title truncate overflow-hidden\">\n {el.name}\n {isLoading && <span class=\"nl-description text-xs ml-2\">checking...</span>}\n {isUnavailable && <span class=\"nl-description text-xs ml-2\">offline</span>}\n </div>\n </div>\n </a>\n </li>\n );\n })}\n </ul>\n </div>\n )}\n </div>\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <div class=\"max-w-72 mx-auto\">\n <nl-nip46-relay-settings\n defaultRelays={state.customNip46Relays}\n onNlRelaysChanged={e => {\n state.customNip46Relays = e.detail;\n }}\n />\n </div>\n\n <div class=\"max-w-52 mx-auto pb-5\">\n {(this.allowAuthMethod('connect') || this.allowAuthMethod('readOnly')) && (\n <div class=\"flex justify-center\">\n <div\n onClick={() => this.handleOpenAdvanced()}\n class=\"text-blue-500 mt-3 decoration-dashed cursor-pointer inline-flex gap-2 items-center pb-1 border-dashed border-b-[1px] border-blue-500 text-sm font-light\"\n >\n Advanced\n <svg\n class={arrowClass}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </div>\n </div>\n )}\n\n <div\n class={`${this.isOpenAdvancedLogin ? 'max-h-[500px] mt-3 duration-300' : 'max-h-0 mt-0 duration-[0.25s]'} transition-max-height ease-in flex gap-3 flex-col overflow-hidden`}\n >\n {/* {this.hasExtension && !this.allowAuthMethod('extension') && this.renderSignInWithExtension()} */}\n {this.allowAuthMethod('connect') && (\n <button-base titleBtn=\"User name\" onClick={() => this.handleChangeScreen(CURRENT_MODULE.LOGIN)}>\n <svg\n style={{ display: 'none' }}\n slot=\"icon-start\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"2\"\n stroke=\"currentColor\"\n // class=\"flex-shrink-0 w-4 h-4 text-gray-500\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z\"\n />\n </svg>\n </button-base>\n )}\n\n {this.allowAuthMethod('connect') && (\n <button-base titleBtn=\"Connection string\" onClick={() => this.handleConnectionString()}>\n <svg style={{ display: 'none' }} slot=\"icon-start\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M3.75 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 3.75 9.375v-4.5ZM3.75 14.625c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5a1.125 1.125 0 0 1-1.125-1.125v-4.5ZM13.5 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 13.5 9.375v-4.5Z\"\n />\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M6.75 6.75h.75v.75h-.75v-.75ZM6.75 16.5h.75v.75h-.75v-.75ZM16.5 6.75h.75v.75h-.75v-.75ZM13.5 13.5h.75v.75h-.75v-.75ZM13.5 19.5h.75v.75h-.75v-.75ZM19.5 13.5h.75v.75h-.75v-.75ZM19.5 19.5h.75v.75h-.75v-.75ZM16.5 16.5h.75v.75h-.75v-.75Z\"\n />\n </svg>\n </button-base>\n )}\n\n {this.allowAuthMethod('connect') && (\n <button-base onClick={() => this.handleChangeScreen(CURRENT_MODULE.LOGIN_BUNKER_URL)} titleBtn=\"Bunker URL\">\n <svg style={{ display: 'none' }} slot=\"icon-start\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244\"\n />\n </svg>\n </button-base>\n )}\n </div>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-iframe2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,so1CAAso1C,CAAC;AAC3p1C,uBAAe,WAAW;;MCMb,eAAe;;;;;0BACL,SAAS;2BACR,6HAA6H;yBAC/H,EAAE;;IAGtB,YAAY;QACV,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAI9B,4DAAK,KAAK,EAAC,0BAA0B,IAClC,IAAI,CAAC,SAAS,KACb,+DACE,GAAG,EAAE,IAAI,CAAC,SAAS,EACnB,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE,KAAK;aACpB,GACO,CACX,CACG,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-iframe/nl-iframe.css?tag=nl-iframe","src/components/nl-iframe/nl-iframe.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'nl-iframe',\n styleUrl: 'nl-iframe.css',\n shadow: false,\n})\nexport class NlConfirmLogout {\n @Prop() titleModal = 'Confirm';\n @Prop() description = 'Your profile keys are stored in this browser tab and will be deleted if you log out, and your profile will be inaccessible.';\n @Prop() iframeUrl = '';\n @Event() nlCloseModal: EventEmitter;\n\n handleCancel() {\n this.nlCloseModal.emit();\n }\n\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n {/* <h1 class=\"nl-title font-bold text-center text-4xl\">{this.titleModal}</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{this.description}</p> */}\n\n <div class=\"mt-3 flex flex-col gap-2\">\n {this.iframeUrl && (\n <iframe\n src={this.iframeUrl}\n style={{\n width: '100%',\n height: '600px',\n border: '1px solid #ccc',\n borderRadius: '8px',\n }}\n ></iframe>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-iframe2.js","mappings":";;AAAA,MAAM,WAAW,GAAG,gq3CAAgq3C,CAAC;AACrr3C,uBAAe,WAAW;;MCMb,eAAe;;;;;0BACL,SAAS;2BACR,6HAA6H;yBAC/H,EAAE;;IAGtB,YAAY;QACV,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAI9B,4DAAK,KAAK,EAAC,0BAA0B,IAClC,IAAI,CAAC,SAAS,KACb,+DACE,GAAG,EAAE,IAAI,CAAC,SAAS,EACnB,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE,KAAK;aACpB,GACO,CACX,CACG,CACF,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-iframe/nl-iframe.css?tag=nl-iframe","src/components/nl-iframe/nl-iframe.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'nl-iframe',\n styleUrl: 'nl-iframe.css',\n shadow: false,\n})\nexport class NlConfirmLogout {\n @Prop() titleModal = 'Confirm';\n @Prop() description = 'Your profile keys are stored in this browser tab and will be deleted if you log out, and your profile will be inaccessible.';\n @Prop() iframeUrl = '';\n @Event() nlCloseModal: EventEmitter;\n\n handleCancel() {\n this.nlCloseModal.emit();\n }\n\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n {/* <h1 class=\"nl-title font-bold text-center text-4xl\">{this.titleModal}</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{this.description}</p> */}\n\n <div class=\"mt-3 flex flex-col gap-2\">\n {this.iframeUrl && (\n <iframe\n src={this.iframeUrl}\n style={{\n width: '100%',\n height: '600px',\n border: '1px solid #ccc',\n borderRadius: '8px',\n }}\n ></iframe>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-import-flow2.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,so1CAAso1C,CAAC;AAC/p1C,2BAAe,eAAe;;MCQjB,YAAY;;;;;;yBACc,mBAAmB;2BAClC,kBAAkB;wBACD,EAAE;2BAElB,KAA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AAS,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAC,iBAAiB,IAC1G,KAAK,CAAC,SAAS,IACd,YACE,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,2IAA2I,EACjJ,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,KAER,WAAK,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,8BACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,yMAAyM,GAC3M,CACE,CACP,CACW,CACV,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-import-flow/nl-import-flow.css?tag=nl-import-flow","src/components/nl-import-flow/nl-import-flow.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Fragment, State, Prop, Event, EventEmitter } from '@stencil/core';\nimport { state } from '@/store';\nimport { ConnectionString } from '@/types';\n\n@Component({\n tag: 'nl-import-flow',\n styleUrl: 'nl-import-flow.css',\n shadow: false,\n})\nexport class NlImportFlow {\n @Prop({ mutable: true }) titleInfo = 'Back up your keys';\n @Prop() titleImport = 'Choose a service';\n @Prop() services: ConnectionString[] = [];\n\n @State() isContinued = false;\n @State() isKeyBackup = false;\n\n @State() isCopy = false;\n\n @Event() nlImportAccount: EventEmitter<ConnectionString>;\n @Event() nlExportKeys: EventEmitter<void>;\n\n handleDomainSelect(event: CustomEvent<string>) {\n const s = this.services.find(s => s.domain === event.detail);\n state.nlImport = s;\n }\n\n handleCreateAccount(e: MouseEvent) {\n e.preventDefault();\n this.nlImportAccount.emit(state.nlImport);\n }\n\n handleContinue() {\n this.isContinued = true;\n }\n\n handleContinueKeyBackup() {\n this.isKeyBackup = true;\n }\n\n async copyToClipboard() {\n this.nlExportKeys.emit();\n this.isCopy = true;\n\n setTimeout(() => {\n this.isCopy = false;\n }, 1500);\n }\n\n render() {\n if (!this.isContinued && !this.isKeyBackup) {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleInfo}</h1>\n <p class=\"nl-description font-light text-sm pt-2 pb-2 max-w-96 mx-auto\">\n Nostr profiles are controlled by cryptographic keys.\n <br />\n <br />\n Your keys are currently only stored in this browser tab, and may be lost if you close it.\n <br />\n <br />\n You should backup your keys.\n <br />\n <br />\n We recommend to import your keys into a key store service, to protect them and to use with other apps.\n {/* <br />\n <br />\n You can also export your keys and save them in your password manager. */}\n </p>\n <div class=\"ml-auto mr-auto mb-2 w-72\">\n <button-base onClick={() => this.handleContinue()} titleBtn=\"Import to key store\" />\n </div>\n <div class=\"ml-auto mr-auto w-72\">\n <button-base onClick={() => this.handleContinueKeyBackup()} titleBtn=\"Export keys\" />\n </div>\n </div>\n );\n }\n\n if (this.isKeyBackup) {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">Key export</h1>\n <p class=\"nl-description font-light text-sm pt-2 pb-2 max-w-96 mx-auto\">\n Copy your keys and store them in a safe place, like a password manager.\n <br />\n <br />\n You can sign into other Nostr apps by pasting your keys into them.\n <br />\n <br />\n Your keys must be kept secret, never share them with anyone.\n </p>\n <div class=\"max-w-72 mx-auto\">\n <div class=\"ml-auto mr-auto mb-2 w-72\">\n <button-base onClick={() => this.copyToClipboard()} titleBtn={this.isCopy ? 'Copied!' : 'Copy to clipboard'} />\n </div>\n </div>\n </div>\n );\n }\n\n const options = this.services.filter(s => s.canImport).map(s => ({ name: s.domain!, value: s.domain! }));\n\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleImport}</h1>\n <p class=\"nl-description font-light text-center text-sm pt-2 max-w-96 mx-auto\">\n Your Nostr keys will be imported into the service you choose. You will manage your keys on their website.\n </p>\n </div>\n\n <div class=\"max-w-72 mx-auto mb-5\">\n <div class=\"mb-0.5\">\n <nl-select onSelectDomain={e => this.handleDomainSelect(e)} selected={0} options={options}></nl-select>\n </div>\n <p class=\"nl-title font-light text-sm mb-2\">Default provider is a fine choice to start with.</p>\n\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <button-base disabled={state.isLoading} onClick={e => this.handleCreateAccount(e)} titleBtn=\"Start importing\">\n {state.isLoading ? (\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n ) : (\n <svg slot=\"icon-start\" style={{ display: 'none' }} xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z\"\n />\n </svg>\n )}\n </button-base>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-import-flow2.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,gq3CAAgq3C,CAAC;AACzr3C,2BAAe,eAAe;;MCQjB,YAAY;;;;;;yBACc,mBAAmB;2BAClC,kBAAkB;wBACD,EAAE;2BAElB,KAAK;2BACL,KAAK;sBAEV,KAAK;;IAKvB,kBAAkB,CAAC,KAA0B;QAC3C,MAAM,CAAC,GAAG,IAAI,C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C,iBAAiB,IAC1G,KAAK,CAAC,SAAS,IACd,YACE,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,2IAA2I,EACjJ,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,KAER,WAAK,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,kBAAc,KAAK,EAAC,MAAM,EAAC,cAAc,IAC5J,8BACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,yMAAyM,GAC3M,CACE,CACP,CACW,CACV,CACG,EACX;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-import-flow/nl-import-flow.css?tag=nl-import-flow","src/components/nl-import-flow/nl-import-flow.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h, Fragment, State, Prop, Event, EventEmitter } from '@stencil/core';\nimport { state } from '@/store';\nimport { ConnectionString } from '@/types';\n\n@Component({\n tag: 'nl-import-flow',\n styleUrl: 'nl-import-flow.css',\n shadow: false,\n})\nexport class NlImportFlow {\n @Prop({ mutable: true }) titleInfo = 'Back up your keys';\n @Prop() titleImport = 'Choose a service';\n @Prop() services: ConnectionString[] = [];\n\n @State() isContinued = false;\n @State() isKeyBackup = false;\n\n @State() isCopy = false;\n\n @Event() nlImportAccount: EventEmitter<ConnectionString>;\n @Event() nlExportKeys: EventEmitter<void>;\n\n handleDomainSelect(event: CustomEvent<string>) {\n const s = this.services.find(s => s.domain === event.detail);\n state.nlImport = s;\n }\n\n handleCreateAccount(e: MouseEvent) {\n e.preventDefault();\n this.nlImportAccount.emit(state.nlImport);\n }\n\n handleContinue() {\n this.isContinued = true;\n }\n\n handleContinueKeyBackup() {\n this.isKeyBackup = true;\n }\n\n async copyToClipboard() {\n this.nlExportKeys.emit();\n this.isCopy = true;\n\n setTimeout(() => {\n this.isCopy = false;\n }, 1500);\n }\n\n render() {\n if (!this.isContinued && !this.isKeyBackup) {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleInfo}</h1>\n <p class=\"nl-description font-light text-sm pt-2 pb-2 max-w-96 mx-auto\">\n Nostr profiles are controlled by cryptographic keys.\n <br />\n <br />\n Your keys are currently only stored in this browser tab, and may be lost if you close it.\n <br />\n <br />\n You should backup your keys.\n <br />\n <br />\n We recommend to import your keys into a key store service, to protect them and to use with other apps.\n {/* <br />\n <br />\n You can also export your keys and save them in your password manager. */}\n </p>\n <div class=\"ml-auto mr-auto mb-2 w-72\">\n <button-base onClick={() => this.handleContinue()} titleBtn=\"Import to key store\" />\n </div>\n <div class=\"ml-auto mr-auto w-72\">\n <button-base onClick={() => this.handleContinueKeyBackup()} titleBtn=\"Export keys\" />\n </div>\n </div>\n );\n }\n\n if (this.isKeyBackup) {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">Key export</h1>\n <p class=\"nl-description font-light text-sm pt-2 pb-2 max-w-96 mx-auto\">\n Copy your keys and store them in a safe place, like a password manager.\n <br />\n <br />\n You can sign into other Nostr apps by pasting your keys into them.\n <br />\n <br />\n Your keys must be kept secret, never share them with anyone.\n </p>\n <div class=\"max-w-72 mx-auto\">\n <div class=\"ml-auto mr-auto mb-2 w-72\">\n <button-base onClick={() => this.copyToClipboard()} titleBtn={this.isCopy ? 'Copied!' : 'Copy to clipboard'} />\n </div>\n </div>\n </div>\n );\n }\n\n const options = this.services.filter(s => s.canImport).map(s => ({ name: s.domain!, value: s.domain! }));\n\n return (\n <Fragment>\n <div class=\"p-4 overflow-y-auto\">\n <h1 class=\"nl-title font-bold text-center text-2xl\">{this.titleImport}</h1>\n <p class=\"nl-description font-light text-center text-sm pt-2 max-w-96 mx-auto\">\n Your Nostr keys will be imported into the service you choose. You will manage your keys on their website.\n </p>\n </div>\n\n <div class=\"max-w-72 mx-auto mb-5\">\n <div class=\"mb-0.5\">\n <nl-select onSelectDomain={e => this.handleDomainSelect(e)} selected={0} options={options}></nl-select>\n </div>\n <p class=\"nl-title font-light text-sm mb-2\">Default provider is a fine choice to start with.</p>\n\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n\n <button-base disabled={state.isLoading} onClick={e => this.handleCreateAccount(e)} titleBtn=\"Start importing\">\n {state.isLoading ? (\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n ) : (\n <svg slot=\"icon-start\" style={{ display: 'none' }} xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z\"\n />\n </svg>\n )}\n </button-base>\n </div>\n </Fragment>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-info-extension2.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,so1CAAso1C,CAAC;AAClq1C,8BAAe,kBAAkB;;MCOpB,eAAe;;;;;IAC1B,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC7B,KAAK,CAAC,kBAAkB,IACvB,eACE,UAAI,KAAK,EAAC,yCAAyC,oBAAmB,EACtE,WAAK,KAAK,EAAC,kCAAkC,IAC3C,YACE,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,6JAA6J,EACnK,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,CACJ,EACN,WAAK,KAAK,EAAC,2BAA2B,IACpC,SAAG,KAAK,EAAC,0DAA0D,IAAE,KAAK,CAAC,KAAK,CAAK,CACjF,CACF,KAEN,eACE,UAAI,KAAK,EAAC,yCAAyC,iCAAgC,EACnF,SAAG,KAAK,EAAC,qEAAqE,WACxE,GAAG,EACP,SAAG,IAAI,EAAC,qBAAqB,EAAC,MAAM,EAAC,QAAQ,WAEzC,OACF,GAAG,EACL,SAAG,IAAI,EAAC,iFAAiF,EAAC,MAAM,EAAC,QAAQ,YAErG,EAAC,GAAG,QACL,GAAG,EACN,SAAG,IAAI,EAAC,oDAAoD,EAAC,MAAM,EAAC,QAAQ,cAExE,CACF,CACA,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-info-extension/nl-info-extension.css?tag=nl-info-extension","src/components/nl-info-extension/nl-info-extension.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-info-extension',\n styleUrl: 'nl-info-extension.css',\n shadow: false,\n})\nexport class NlInfoExtension {\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n {state.isLoadingExtension ? (\n <div>\n <h1 class=\"nl-title font-bold text-center text-4xl\">Signing in...</h1>\n <div class=\"mt-10 mb-10 ml-auto mr-auto w-20\">\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading ml-auto mr-auto inline-block w-20 h-20 border-[4px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n </div>\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n </div>\n ) : (\n <div>\n <h1 class=\"nl-title font-bold text-center text-4xl\">Install browser extension!</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">\n Try{' '}\n <a href=\"https://getalby.com\" target=\"_blank\">\n Alby\n </a>\n ,{' '}\n <a href=\"https://chromewebstore.google.com/detail/nos2x/kpgefcfmnafjgpblomihpgmejjdanjjp\" target=\"_blank\">\n nos2x\n </a>{' '}\n or{' '}\n <a href=\"https://apps.apple.com/us/app/nostore/id1666553677\" target=\"_blank\">\n Nostore\n </a>\n </p>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-info-extension2.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,gq3CAAgq3C,CAAC;AAC5r3C,8BAAe,kBAAkB;;MCOpB,eAAe;;;;;IAC1B,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC7B,KAAK,CAAC,kBAAkB,IACvB,eACE,UAAI,KAAK,EAAC,yCAAyC,oBAAmB,EACtE,WAAK,KAAK,EAAC,kCAAkC,IAC3C,YACE,IAAI,EAAC,YAAY,EACjB,KAAK,EAAC,6JAA6J,EACnK,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,CACJ,EACN,WAAK,KAAK,EAAC,2BAA2B,IACpC,SAAG,KAAK,EAAC,0DAA0D,IAAE,KAAK,CAAC,KAAK,CAAK,CACjF,CACF,KAEN,eACE,UAAI,KAAK,EAAC,yCAAyC,iCAAgC,EACnF,SAAG,KAAK,EAAC,qEAAqE,WACxE,GAAG,EACP,SAAG,IAAI,EAAC,qBAAqB,EAAC,MAAM,EAAC,QAAQ,WAEzC,OACF,GAAG,EACL,SAAG,IAAI,EAAC,iFAAiF,EAAC,MAAM,EAAC,QAAQ,YAErG,EAAC,GAAG,QACL,GAAG,EACN,SAAG,IAAI,EAAC,oDAAoD,EAAC,MAAM,EAAC,QAAQ,cAExE,CACF,CACA,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-info-extension/nl-info-extension.css?tag=nl-info-extension","src/components/nl-info-extension/nl-info-extension.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\nimport { state } from '@/store';\n\n@Component({\n tag: 'nl-info-extension',\n styleUrl: 'nl-info-extension.css',\n shadow: false,\n})\nexport class NlInfoExtension {\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n {state.isLoadingExtension ? (\n <div>\n <h1 class=\"nl-title font-bold text-center text-4xl\">Signing in...</h1>\n <div class=\"mt-10 mb-10 ml-auto mr-auto w-20\">\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading ml-auto mr-auto inline-block w-20 h-20 border-[4px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n </div>\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n </div>\n ) : (\n <div>\n <h1 class=\"nl-title font-bold text-center text-4xl\">Install browser extension!</h1>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">\n Try{' '}\n <a href=\"https://getalby.com\" target=\"_blank\">\n Alby\n </a>\n ,{' '}\n <a href=\"https://chromewebstore.google.com/detail/nos2x/kpgefcfmnafjgpblomihpgmejjdanjjp\" target=\"_blank\">\n nos2x\n </a>{' '}\n or{' '}\n <a href=\"https://apps.apple.com/us/app/nostore/id1666553677\" target=\"_blank\">\n Nostore\n </a>\n </p>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"nl-info2.js","mappings":";;AAAA,MAAM,SAAS,GAAG,811CAA811C,CAAC;AACj31C,qBAAe,SAAS;;MCMX,MAAM;;;;;IACjB,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,4DAAK,KAAK,EAAC,wBAAwB,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,IAC/H,6DAAM,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,GAAG,EAC5D,6DACE,CAAC,EAAC,o1BAAo1B,EACt1B,IAAI,EAAC,OAAO,GACZ,CACE,EACN,2DAAI,KAAK,EAAC,yCAAyC,cAC3C,6DAAM,KAAK,EAAC,YAAY,YAAa,CACxC,EACL,0DAAG,KAAK,EAAC,yFAAyF,sBAAoB,EACtH,0DAAG,KAAK,EAAC,qEAAqE,8BACrD,GAAG,EAC1B,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,mBAAmB,WAEvC,OACH,4DAAM,gBACI,GAAG,EACd,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,0CAA0C,kBAE9D,EAAC,GAAG,aACA,GAAG,EACX,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,oBAAoB,iBAExC,MAEF,CACA,EACN;KACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-info/nl-info.css?tag=nl-info","src/components/nl-info/nl-info.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'nl-info',\n styleUrl: 'nl-info.css',\n shadow: false,\n})\nexport class NlInfo {\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <svg class=\"w-12 h-12 mx-auto mb-2\" width=\"225\" height=\"224\" viewBox=\"0 0 225 224\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"224.047\" height=\"224\" rx=\"64\" fill=\"#6951FA\" />\n <path\n d=\"M162.441 135.941V88.0593C170.359 85.1674 176 77.5348 176 68.6696C176 57.2919 166.708 48 155.33 48C143.953 48 134.661 57.2444 134.661 68.6696C134.661 77.5822 140.302 85.1674 148.219 88.0593V135.941C147.698 136.13 147.176 136.367 146.655 136.604L87.3956 77.3452C88.6282 74.6904 89.2919 71.7511 89.2919 68.6696C89.2919 57.2444 80.0474 48 68.6696 48C57.2919 48 48 57.2444 48 68.6696C48 77.5822 53.6415 85.1674 61.5585 88.0593V135.941C53.6415 138.833 48 146.465 48 155.33C48 166.708 57.2444 176 68.6696 176C80.0948 176 89.3393 166.708 89.3393 155.33C89.3393 146.418 83.6978 138.833 75.7807 135.941V88.0593C76.3022 87.8696 76.8237 87.6326 77.3452 87.3956L136.604 146.655C135.372 149.31 134.708 152.249 134.708 155.33C134.708 166.708 143.953 176 155.378 176C166.803 176 176.047 166.708 176.047 155.33C176.047 146.418 170.406 138.833 162.489 135.941H162.441Z\"\n fill=\"white\"\n />\n </svg>\n <h1 class=\"nl-title font-bold text-center text-4xl\">\n Nostr <span class=\"font-light\">Login</span>\n </h1>\n <p class=\"text-green-800 dark:text-green-200 font-light text-center text-lg pt-2 max-w-96 mx-auto\">Version: 1.7.11</p>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">\n Learn more about Nostr{' '}\n <a target=\"_blank\" href=\"https://nostr.how\">\n here\n </a>\n .<br />\n This is an{' '}\n <a target=\"_blank\" href=\"https://github.com/nostrband/nostr-login\">\n open-source\n </a>{' '}\n tool by{' '}\n <a target=\"_blank\" href=\"https://nostr.band\">\n Nostr.Band\n </a>\n .\n </p>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-info2.js","mappings":";;AAAA,MAAM,SAAS,GAAG,gq3CAAgq3C,CAAC;AACnr3C,qBAAe,SAAS;;MCMX,MAAM;;;;;IACjB,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,qBAAqB,IAC9B,4DAAK,KAAK,EAAC,wBAAwB,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,IAC/H,6DAAM,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAC,EAAE,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,GAAG,EAC5D,6DACE,CAAC,EAAC,o1BAAo1B,EACt1B,IAAI,EAAC,OAAO,GACZ,CACE,EACN,2DAAI,KAAK,EAAC,yCAAyC,cAC3C,6DAAM,KAAK,EAAC,YAAY,YAAa,CACxC,EACL,0DAAG,KAAK,EAAC,yFAAyF,sBAAoB,EACtH,0DAAG,KAAK,EAAC,qEAAqE,8BACrD,GAAG,EAC1B,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,mBAAmB,WAEvC,OACH,4DAAM,gBACI,GAAG,EACd,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,0CAA0C,kBAE9D,EAAC,GAAG,aACA,GAAG,EACX,0DAAG,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,oBAAoB,iBAExC,MAEF,CACA,EACN;KACH;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-info/nl-info.css?tag=nl-info","src/components/nl-info/nl-info.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'nl-info',\n styleUrl: 'nl-info.css',\n shadow: false,\n})\nexport class NlInfo {\n render() {\n return (\n <div class=\"p-4 overflow-y-auto\">\n <svg class=\"w-12 h-12 mx-auto mb-2\" width=\"225\" height=\"224\" viewBox=\"0 0 225 224\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"224.047\" height=\"224\" rx=\"64\" fill=\"#6951FA\" />\n <path\n d=\"M162.441 135.941V88.0593C170.359 85.1674 176 77.5348 176 68.6696C176 57.2919 166.708 48 155.33 48C143.953 48 134.661 57.2444 134.661 68.6696C134.661 77.5822 140.302 85.1674 148.219 88.0593V135.941C147.698 136.13 147.176 136.367 146.655 136.604L87.3956 77.3452C88.6282 74.6904 89.2919 71.7511 89.2919 68.6696C89.2919 57.2444 80.0474 48 68.6696 48C57.2919 48 48 57.2444 48 68.6696C48 77.5822 53.6415 85.1674 61.5585 88.0593V135.941C53.6415 138.833 48 146.465 48 155.33C48 166.708 57.2444 176 68.6696 176C80.0948 176 89.3393 166.708 89.3393 155.33C89.3393 146.418 83.6978 138.833 75.7807 135.941V88.0593C76.3022 87.8696 76.8237 87.6326 77.3452 87.3956L136.604 146.655C135.372 149.31 134.708 152.249 134.708 155.33C134.708 166.708 143.953 176 155.378 176C166.803 176 176.047 166.708 176.047 155.33C176.047 146.418 170.406 138.833 162.489 135.941H162.441Z\"\n fill=\"white\"\n />\n </svg>\n <h1 class=\"nl-title font-bold text-center text-4xl\">\n Nostr <span class=\"font-light\">Login</span>\n </h1>\n <p class=\"text-green-800 dark:text-green-200 font-light text-center text-lg pt-2 max-w-96 mx-auto\">Version: 1.7.11</p>\n <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">\n Learn more about Nostr{' '}\n <a target=\"_blank\" href=\"https://nostr.how\">\n here\n </a>\n .<br />\n This is an{' '}\n <a target=\"_blank\" href=\"https://github.com/nostrband/nostr-login\">\n open-source\n </a>{' '}\n tool by{' '}\n <a target=\"_blank\" href=\"https://nostr.band\">\n Nostr.Band\n </a>\n .\n </p>\n </div>\n );\n }\n}\n"],"version":3}
@@ -12,18 +12,18 @@ const NlLoading = /*@__PURE__*/ proxyCustomElement(class NlLoading extends HTMLE
12
12
  constructor() {
13
13
  super();
14
14
  this.__registerHost();
15
- this.stopFetchHandler = createEvent(this, "stopFetchHandler", 7);
16
- this.handleContinue = createEvent(this, "handleContinue", 7);
15
+ this.nlStopFetch = createEvent(this, "nlStopFetch", 7);
16
+ this.nlContinue = createEvent(this, "nlContinue", 7);
17
17
  this.path = undefined;
18
18
  }
19
19
  handleStop(e) {
20
20
  e.preventDefault();
21
- this.stopFetchHandler.emit();
21
+ this.nlStopFetch.emit();
22
22
  }
23
23
  handleContinueClick(e) {
24
24
  e.preventDefault();
25
25
  // reset();
26
- this.handleContinue.emit();
26
+ this.nlContinue.emit();
27
27
  }
28
28
  render() {
29
29
  let title = 'Connecting...';
@@ -49,7 +49,7 @@ const NlLoading = /*@__PURE__*/ proxyCustomElement(class NlLoading extends HTMLE
49
49
  const showButton = this.path !== CURRENT_MODULE.LOCAL_SIGNUP;
50
50
  const showIframe = !state.isLoading && state.iframeUrl && state.authUrl;
51
51
  const iframeUrl = state.iframeUrl ? `${state.iframeUrl}?connect=${encodeURIComponent(state.authUrl)}` : '';
52
- return (h("div", { key: 'db647721e5ca60eed1502bf784f11973106938ff', class: "p-4 overflow-y-auto" }, title && h("h1", { key: '605d32178383840ea53a3fc16c2d760dccea0812', class: "nl-title font-bold text-center text-4xl" }, title), text && h("p", { key: '8dc819ba9544242ef05256a12f866cd88b3603cf', class: "nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto" }, text), !state.njumpIframe && !state.authUrl && state.isLoading && (h("div", { key: 'f392c2a856018c4d35b01a76b77f0eec8342fb86', class: "mt-10 mb-10 ml-auto mr-auto w-20" }, h("span", { key: '90541216f412c9c8d77be8988c6f9e5b654ce115', slot: "icon-start", class: "animate-spin-loading ml-auto mr-auto inline-block w-20 h-20 border-[4px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full", role: "status", "aria-label": "loading" }))), h("div", { key: 'a870a4e31048a13f400970aad850e7eab418ef06', class: "ps-4 pe-4 overflow-y-auto" }, h("p", { key: '5bf2c4a5b94a4dfe1331a2fa5fb11ea4d414f353', class: "nl-error font-light text-center text-sm max-w-96 mx-auto" }, state.error)), iframeUrl && (h("div", { key: '854f1920def8e2354801a819f9e564ae1658e34b', class: "mt-3 ml-auto mr-auto w-72 flex justify-center" }, h("iframe", { key: 'a5056dbe483013c20515b8c6576af60f612e132b', src: iframeUrl, width: "180px", height: "80px", style: { display: showIframe ? 'block' : 'none', border: '0' } }))), state.njumpIframe && (h("div", { key: '848d0c6cf74610b8793ade84a5c1f32fd5944b62', class: "mt-3 ml-auto mr-auto flex justify-center" }, h("iframe", { key: '456702bd5c9e9b290d532aef0ec245e1212ea79f', srcdoc: state.njumpIframe, width: "600px", style: { border: '0', height: '80vh', borderRadius: '8px' } }))), showButton && (h("div", { key: 'd7b82c1fd76a8cf4edf38d2cbe2386e2ce698a81', class: "mt-3 ml-auto mr-auto w-72" }, h("button-base", { key: '8465e32b53c4b86e3b1b488fddcc5937a018768f', onClick: e => {
52
+ return (h("div", { key: '0da1c63c9d397d47d58d5093c32b532596e45e32', class: "p-4 overflow-y-auto" }, title && h("h1", { key: '802a9e76dd39059210ab8b2d4b5ac5265fc0f850', class: "nl-title font-bold text-center text-4xl" }, title), text && h("p", { key: 'c66d311cf9c5ec5ddf2fcb1033a11ac6d995df48', class: "nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto" }, text), !state.njumpIframe && !state.authUrl && state.isLoading && (h("div", { key: '49a00c120305ed0a89919b64503f31a951c16b20', class: "mt-10 mb-10 ml-auto mr-auto w-20" }, h("span", { key: '9a99b6a5c542839603494e382477a953dd54e1be', slot: "icon-start", class: "animate-spin-loading ml-auto mr-auto inline-block w-20 h-20 border-[4px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full", role: "status", "aria-label": "loading" }))), h("div", { key: '79432ff64dbadd94b83bfc66f74de30722ed10f3', class: "ps-4 pe-4 overflow-y-auto" }, h("p", { key: '7f1b04f507f9909885f3cd43fe1ae5999c0fa45f', class: "nl-error font-light text-center text-sm max-w-96 mx-auto" }, state.error)), iframeUrl && (h("div", { key: '47678e88e7526e0326201ab0169463e2c3d83530', class: "mt-3 ml-auto mr-auto w-72 flex justify-center" }, h("iframe", { key: '0656f59ee5a6578a274c136adad6a1a7b8b6624f', src: iframeUrl, width: "180px", height: "80px", style: { display: showIframe ? 'block' : 'none', border: '0' } }))), state.njumpIframe && (h("div", { key: 'a1e7f2f5eb0172b94628d0279828b669314202dd', class: "mt-3 ml-auto mr-auto flex justify-center" }, h("iframe", { key: 'e2dc852dfa21e9336c2086e575d2fea9485a895c', srcdoc: state.njumpIframe, width: "600px", style: { border: '0', height: '80vh', borderRadius: '8px' } }))), showButton && (h("div", { key: 'c856104db6f59b47e37e7fe6f95a8ee3e31222ad', class: "mt-3 ml-auto mr-auto w-72" }, h("button-base", { key: 'fa2584816a2ad234b5dff40bfcc8429f9e53c54b', onClick: e => {
53
53
  if (state.authUrl && !state.isLoading) {
54
54
  this.handleContinueClick(e);
55
55
  }
@@ -1 +1 @@
1
- {"file":"nl-loading2.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,so1CAAso1C,CAAC;AAC5p1C,wBAAe,YAAY;;MCQd,SAAS;;;;;;;;IAKpB,UAAU,CAAC,CAAC;QACV,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;KAC9B;IAED,mBAAmB,CAAC,CAAC;QACnB,CAAC,CAAC,cAAc,EAAE,CAAC;;QAEnB,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;KAC5B;IAED,MAAM;QACJ,IAAI,KAAK,GAAG,eAAe,CAAC;QAC5B,IAAI,IAAI,GAAG,8CAA8C,CAAC;QAC1D,IAAI,KAAK,CAAC,WAAW,EAAE;YACrB,KAAK,GAAG,EAAE,CAAC;YACX,IAAI,GAAG,EAAE,CAAC;SACX;aAAM,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,YAAY,EAAE;YACpD,KAAK,GAAG,aAAa,CAAC;YACtB,IAAI,GAAG,mCAAmC,CAAC;SAC5C;aAAM,IAAI,KAAK,CAAC,OAAO,EAAE;YACxB,IAAI,KAAK,CAAC,SAAS,EAAE;gBACnB,KAAK,GAAG,eAAe,CAAC;gBACxB,IAAI,GAAG,wDAAwD,CAAC;aACjE;iBAAM;gBACL,KAAK,GAAG,eAAe,CAAC;gBACxB,IAAI,GAAG,yDAAyD,CAAC;aAClE;SACF;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,YAAY,CAAC;QAC7D,MAAM,UAAU,GAAG,CAAC,KAAK,CAAC,SA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O,EAAE,CAAC;gBACR,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;oBACrC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;iBAC7B;qBAAM;oBACL,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;iBACpB;aACF,EACD,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,UAAU,GAAG,QAAQ,GAClD,CACE,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-loading/nl-loading.css?tag=nl-loading","src/components/nl-loading/nl-loading.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { state } from '@/store';\nimport { CURRENT_MODULE } from '@/types';\n\n@Component({\n tag: 'nl-loading',\n styleUrl: 'nl-loading.css',\n shadow: false,\n})\nexport class NlLoading {\n @Event() stopFetchHandler: EventEmitter<boolean>;\n @Event() handleContinue: EventEmitter<boolean>;\n @Prop() path: string;\n\n handleStop(e) {\n e.preventDefault();\n this.stopFetchHandler.emit();\n }\n\n handleContinueClick(e) {\n e.preventDefault();\n // reset();\n this.handleContinue.emit();\n }\n\n render() {\n let title = 'Connecting...';\n let text = 'Establishing connection to your key storage.';\n if (state.njumpIframe) {\n title = '';\n text = '';\n } else if (this.path === CURRENT_MODULE.LOCAL_SIGNUP) {\n title = 'Creating...';\n text = 'Publishing your profile on Nostr.';\n } else if (state.authUrl) {\n if (state.isLoading) {\n title = 'Confirming...';\n text = 'Please confirm the connection in your key storage app.';\n } else {\n title = 'Almost ready!';\n text = 'Continue to confirm the connection to your key storage.';\n }\n }\n\n const showButton = this.path !== CURRENT_MODULE.LOCAL_SIGNUP;\n const showIframe = !state.isLoading && state.iframeUrl && state.authUrl;\n const iframeUrl = state.iframeUrl ? `${state.iframeUrl}?connect=${encodeURIComponent(state.authUrl)}` : '';\n\n return (\n <div class=\"p-4 overflow-y-auto\">\n {title && <h1 class=\"nl-title font-bold text-center text-4xl\">{title}</h1>}\n {text && <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{text}</p>}\n {!state.njumpIframe && !state.authUrl && state.isLoading && (\n <div class=\"mt-10 mb-10 ml-auto mr-auto w-20\">\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading ml-auto mr-auto inline-block w-20 h-20 border-[4px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n </div>\n )}\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n {iframeUrl && (\n <div class=\"mt-3 ml-auto mr-auto w-72 flex justify-center\">\n <iframe src={iframeUrl} width=\"180px\" height=\"80px\" style={{ display: showIframe ? 'block' : 'none', border: '0' }}></iframe>\n </div>\n )}\n {state.njumpIframe && (\n <div class=\"mt-3 ml-auto mr-auto flex justify-center\">\n <iframe srcdoc={state.njumpIframe} width=\"600px\" style={{ border: '0', height: '80vh', borderRadius: '8px' }}></iframe>\n </div>\n )}\n {showButton && (\n <div class=\"mt-3 ml-auto mr-auto w-72\">\n <button-base\n onClick={e => {\n if (state.authUrl && !state.isLoading) {\n this.handleContinueClick(e);\n } else {\n this.handleStop(e);\n }\n }}\n titleBtn={!state.isLoading ? 'Continue' : 'Cancel'}\n />\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nl-loading2.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,gq3CAAgq3C,CAAC;AACtr3C,wBAAe,YAAY;;MCQd,SAAS;;;;;;;;IAKpB,UAAU,CAAC,CAAC;QACV,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;KACzB;IAED,mBAAmB,CAAC,CAAC;QACnB,CAAC,CAAC,cAAc,EAAE,CAAC;;QAE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,KAAK,EAAC,6JAA6J,EACnK,IAAI,EAAC,QAAQ,gBACF,SAAS,GACd,CACJ,CACP,EACD,4DAAK,KAAK,EAAC,2BAA2B,IACpC,0DAAG,KAAK,EAAC,0DAA0D,IAAE,KAAK,CAAC,KAAK,CAAK,CACjF,EACL,SAAS,KACR,4DAAK,KAAK,EAAC,+CAA+C,IACxD,+DAAQ,GAAG,EAAE,SAAS,EAAE,KAAK,EAAC,OAAO,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAW,CACzH,CACP,EACA,KAAK,CAAC,WAAW,KAChB,4DAAK,KAAK,EAAC,0CAA0C,IACnD,+DAAQ,MAAM,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,GAAW,CACnH,CACP,EACA,UAAU,KACT,4DAAK,KAAK,EAAC,2BAA2B,IACpC,oEACE,OAAO,EAAE,CAAC;gBACR,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;oBACrC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;iBAC7B;qBAAM;oBACL,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;iBACpB;aACF,EACD,QAAQ,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,UAAU,GAAG,QAAQ,GAClD,CACE,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/nl-loading/nl-loading.css?tag=nl-loading","src/components/nl-loading/nl-loading.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Prop, h } from '@stencil/core';\nimport { state } from '@/store';\nimport { CURRENT_MODULE } from '@/types';\n\n@Component({\n tag: 'nl-loading',\n styleUrl: 'nl-loading.css',\n shadow: false,\n})\nexport class NlLoading {\n @Event() nlStopFetch: EventEmitter<boolean>;\n @Event() nlContinue: EventEmitter<boolean>;\n @Prop() path: string;\n\n handleStop(e) {\n e.preventDefault();\n this.nlStopFetch.emit();\n }\n\n handleContinueClick(e) {\n e.preventDefault();\n // reset();\n this.nlContinue.emit();\n }\n\n render() {\n let title = 'Connecting...';\n let text = 'Establishing connection to your key storage.';\n if (state.njumpIframe) {\n title = '';\n text = '';\n } else if (this.path === CURRENT_MODULE.LOCAL_SIGNUP) {\n title = 'Creating...';\n text = 'Publishing your profile on Nostr.';\n } else if (state.authUrl) {\n if (state.isLoading) {\n title = 'Confirming...';\n text = 'Please confirm the connection in your key storage app.';\n } else {\n title = 'Almost ready!';\n text = 'Continue to confirm the connection to your key storage.';\n }\n }\n\n const showButton = this.path !== CURRENT_MODULE.LOCAL_SIGNUP;\n const showIframe = !state.isLoading && state.iframeUrl && state.authUrl;\n const iframeUrl = state.iframeUrl ? `${state.iframeUrl}?connect=${encodeURIComponent(state.authUrl)}` : '';\n\n return (\n <div class=\"p-4 overflow-y-auto\">\n {title && <h1 class=\"nl-title font-bold text-center text-4xl\">{title}</h1>}\n {text && <p class=\"nl-description font-light text-center text-lg pt-2 max-w-96 mx-auto\">{text}</p>}\n {!state.njumpIframe && !state.authUrl && state.isLoading && (\n <div class=\"mt-10 mb-10 ml-auto mr-auto w-20\">\n <span\n slot=\"icon-start\"\n class=\"animate-spin-loading ml-auto mr-auto inline-block w-20 h-20 border-[4px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full\"\n role=\"status\"\n aria-label=\"loading\"\n ></span>\n </div>\n )}\n <div class=\"ps-4 pe-4 overflow-y-auto\">\n <p class=\"nl-error font-light text-center text-sm max-w-96 mx-auto\">{state.error}</p>\n </div>\n {iframeUrl && (\n <div class=\"mt-3 ml-auto mr-auto w-72 flex justify-center\">\n <iframe src={iframeUrl} width=\"180px\" height=\"80px\" style={{ display: showIframe ? 'block' : 'none', border: '0' }}></iframe>\n </div>\n )}\n {state.njumpIframe && (\n <div class=\"mt-3 ml-auto mr-auto flex justify-center\">\n <iframe srcdoc={state.njumpIframe} width=\"600px\" style={{ border: '0', height: '80vh', borderRadius: '8px' }}></iframe>\n </div>\n )}\n {showButton && (\n <div class=\"mt-3 ml-auto mr-auto w-72\">\n <button-base\n onClick={e => {\n if (state.authUrl && !state.isLoading) {\n this.handleContinueClick(e);\n } else {\n this.handleStop(e);\n }\n }}\n titleBtn={!state.isLoading ? 'Continue' : 'Cancel'}\n />\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -13,7 +13,7 @@ const NlLocalSignup = /*@__PURE__*/ proxyCustomElement(class NlLocalSignup exten
13
13
  this.__registerHost();
14
14
  this.nlLocalSignup = createEvent(this, "nlLocalSignup", 7);
15
15
  this.nlSignupNjump = createEvent(this, "nlSignupNjump", 7);
16
- this.fetchHandler = createEvent(this, "fetchHandler", 7);
16
+ this.nlFetchStatus = createEvent(this, "nlFetchStatus", 7);
17
17
  this.titleSignup = 'Create Nostr profile';
18
18
  this.description = 'Choose any username, you can always change it later.';
19
19
  this.descriptionNjump = 'Proceed to creating your Nostr profile in a new tab.';
@@ -34,7 +34,7 @@ const NlLocalSignup = /*@__PURE__*/ proxyCustomElement(class NlLocalSignup exten
34
34
  }
35
35
  }
36
36
  render() {
37
- return (h(Fragment, { key: '4e2e1cb4e43c985fbcc79af1b085389a38c2805d' }, h("div", { key: 'ed3e90f3eeef7d1354b6e36d8f29c7348176b989', class: "p-4 overflow-y-auto" }, h("h1", { key: '8b47eb2e2221b61d8b75e297ae9b954cd2a0ef89', class: "nl-title font-bold text-center text-2xl" }, this.titleSignup), h("p", { key: 'af517d0c92652d1e4fd14f57bf593eb1510865e7', class: "nl-description font-light text-center text-sm pt-2 max-w-96 mx-auto" }, this.signupNjump ? this.descriptionNjump : this.description)), h("div", { key: '54dd6ee361785bf45b760333104dc946a5a8f941', class: "max-w-72 mx-auto" }, !this.signupNjump && (h("div", { key: 'af4d8a26c1da84d2a07f1086c69b9776b361d484', class: "relative mb-2" }, h("input", { key: 'dc30806eefb1b2210e4960401de95578256becbd', onInput: e => this.handleInputChange(e), type: "text", class: "nl-input peer py-3 px-4 ps-11 block w-full border-transparent rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none dark:border-transparent", placeholder: "Enter username", value: state.nlSignup.signupName }), h("div", { key: '64cfe0fe240b2e04216485915b3e6f034c5d0229', class: "absolute inset-y-0 start-0 flex items-center pointer-events-none ps-4 peer-disabled:opacity-50 peer-disabled:pointer-events-none" }, h("svg", { key: '434077af1de7ee510325e84b64bc02981b039792', xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "2", stroke: this.isAvailable ? '#00cc00' : 'currentColor', class: "flex-shrink-0 w-4 h-4 text-gray-500" }, h("path", { key: '5f9aae2d279fd8807b1798518f33da878e30f8ff', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" }))))), h("div", { key: '39115be409b0cc01e098e05fdeb370e15673f8e1', class: "ps-4 pe-4 overflow-y-auto" }, h("p", { key: 'cd7556b84e69f372b6aa9c834794e5bded78c228', class: "nl-error font-light text-center text-sm max-w-96 mx-auto" }, state.error)), h("button-base", { key: 'd29de7bb01cf5fb0b3ba76b9cf52aa846e3db638', disabled: state.isLoading, onClick: e => this.handleCreateAccount(e), titleBtn: this.signupNjump ? 'Get started' : 'Create profile' }, state.isLoading ? (h("span", { slot: "icon-start", class: "animate-spin-loading inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full", role: "status", "aria-label": "loading" })) : (h("svg", { slot: "icon-start", style: { display: 'none' }, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z" })))))));
37
+ return (h(Fragment, { key: 'a82dd2c2061fd35dc3e0fea186a96adbbd8c014a' }, h("div", { key: 'ba4799fc36360c9a1c3cd6ae3ebf6648c692a801', class: "p-4 overflow-y-auto" }, h("h1", { key: 'aa53a9645bc15e54653087e2e2865d0447509d7e', class: "nl-title font-bold text-center text-2xl" }, this.titleSignup), h("p", { key: '1bffb9657f8946210e9613c60e0f6b699657c696', class: "nl-description font-light text-center text-sm pt-2 max-w-96 mx-auto" }, this.signupNjump ? this.descriptionNjump : this.description)), h("div", { key: 'd09c7ecb4c4919dff636f9e864ae47a95ec16e05', class: "max-w-72 mx-auto" }, !this.signupNjump && (h("div", { key: '47c13c913387573f42717a44927e5d25b1eb14ae', class: "relative mb-2" }, h("input", { key: 'ed03046af288f41188ff7cfd512777b4d1047f63', onInput: e => this.handleInputChange(e), type: "text", class: "nl-input peer py-3 px-4 ps-11 block w-full border-transparent rounded-lg text-sm disabled:opacity-50 disabled:pointer-events-none dark:border-transparent", placeholder: "Enter username", "aria-label": "Username", value: state.nlSignup.signupName }), h("div", { key: 'b538a723c8d380ea00d01f532e575d6ee060d690', class: "absolute inset-y-0 start-0 flex items-center pointer-events-none ps-4 peer-disabled:opacity-50 peer-disabled:pointer-events-none" }, h("svg", { key: '9c94523bf652468ba536e4c928c931a2e35d2f97', xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "2", stroke: this.isAvailable ? '#00cc00' : 'currentColor', class: "flex-shrink-0 w-4 h-4 text-gray-500" }, h("path", { key: '8bdc63aeb69d243a489f6ba8bab6327151fb65f1', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" }))))), h("div", { key: '26aa017c90784d2cda2384fc5d7f4eb4343755a4', class: "ps-4 pe-4 overflow-y-auto" }, h("p", { key: 'fcf29f2c2e80ec2c0841eb9ce4239e0fc33eea8a', class: "nl-error font-light text-center text-sm max-w-96 mx-auto" }, state.error)), h("button-base", { key: '2be044eb8d499db8c038c59f842de4a17690fddf', disabled: state.isLoading, onClick: e => this.handleCreateAccount(e), titleBtn: this.signupNjump ? 'Get started' : 'Create profile' }, state.isLoading ? (h("span", { slot: "icon-start", class: "animate-spin-loading inline-block w-4 h-4 border-[3px] border-current border-t-transparent text-slate-900 dark:text-gray-300 rounded-full", role: "status", "aria-label": "loading" })) : (h("svg", { slot: "icon-start", style: { display: 'none' }, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z" })))))));
38
38
  }
39
39
  static get style() { return NlLocalSignupStyle0; }
40
40
  }, [0, "nl-local-signup", {