@rool-dev/extension 0.3.12 → 0.3.14

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.
@@ -274,7 +274,7 @@
274
274
  <!-- Footer -->
275
275
  <div class="px-4 py-3 mt-auto flex items-center justify-between">
276
276
  <a
277
- href="https://docs.rool.dev/extension"
277
+ href="https://docs.rool.dev/extension/"
278
278
  target="_blank"
279
279
  rel="noopener noreferrer"
280
280
  class="text-[11px] text-slate-400 hover:text-indigo-500 transition-colors"
@@ -4556,11 +4556,12 @@ var BrowserAuthProvider = class {
4556
4556
  * Initiate login by redirecting to auth page.
4557
4557
  * @param appName - The name of the application requesting login (displayed on auth page)
4558
4558
  */
4559
- login(appName) {
4559
+ login(appName, options) {
4560
4560
  const loginUrl = new URL(`${this.authBaseUrl}/`);
4561
4561
  const redirectTarget = window.location.origin + window.location.pathname + window.location.search;
4562
4562
  loginUrl.searchParams.set("redirect_uri", redirectTarget);
4563
4563
  loginUrl.searchParams.set("app_name", appName);
4564
+ if (options?.signup) loginUrl.searchParams.set("signup", "true");
4564
4565
  const state = this.generateState();
4565
4566
  this.storeState(state);
4566
4567
  loginUrl.searchParams.set("state", state);
@@ -4833,8 +4834,8 @@ var AuthManager = class {
4833
4834
  * Initiate login.
4834
4835
  * @param appName - The name of the application requesting login (displayed on auth page)
4835
4836
  */
4836
- login(appName) {
4837
- return this.provider.login(appName);
4837
+ login(appName, options) {
4838
+ return this.provider.login(appName, options);
4838
4839
  }
4839
4840
  /**
4840
4841
  * Logout - clear all tokens and state.
@@ -8621,8 +8622,8 @@ var RoolClient = class extends EventEmitter {
8621
8622
  * Initiate login by redirecting to auth page.
8622
8623
  * @param appName - The name of the application requesting login (displayed on auth page)
8623
8624
  */
8624
- async login(appName) {
8625
- return this.authManager.login(appName);
8625
+ async login(appName, options) {
8626
+ return this.authManager.login(appName, options);
8626
8627
  }
8627
8628
  /**
8628
8629
  * Logout - clear all tokens and state.
@@ -9656,7 +9657,7 @@ var root_29 = /* @__PURE__ */ from_html(`<div class="text-[11px] text-red-500 mt
9656
9657
  var root_22 = /* @__PURE__ */ from_html(`<div class="px-4 py-3 border-b border-slate-100"><div class="text-[10px] font-semibold text-slate-400 uppercase tracking-wider mb-1.5">Publish</div> <button><!></button> <!></div>`);
9657
9658
  var root_30 = /* @__PURE__ */ from_svg(`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>`);
9658
9659
  var root_31 = /* @__PURE__ */ from_svg(`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>`);
9659
- var root_2$1 = /* @__PURE__ */ from_html(`<div class="w-[280px] shrink-0 bg-white border-r border-slate-200 flex flex-col overflow-y-auto"><div class="px-4 pt-4 pb-3 border-b border-slate-100"><div class="flex items-start justify-between mb-1"><!> <button class="p-1 -mr-1 text-slate-400 hover:text-slate-600 transition-colors shrink-0" title="Collapse sidebar"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 18l-6-6 6-6"></path></svg></button></div> <!> <!> <!></div> <!> <!> <!> <div class="px-4 py-3 border-b border-slate-100"><div class="text-[10px] font-semibold text-slate-400 uppercase tracking-wider mb-1.5">Environment</div> <div class="flex rounded-md border border-slate-200 overflow-hidden"><button>Local</button> <button>Dev</button> <button>Prod</button></div> <div class="text-[10px] text-slate-400 mt-1 font-mono"> </div></div> <div class="px-4 py-3 border-b border-slate-100"><div class="text-[10px] font-semibold text-slate-400 uppercase tracking-wider mb-1.5">Space</div> <div class="relative" data-dropdown=""><button type="button"> <svg class="absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 pointer-events-none" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"></path></svg></button> <!></div> <div class="text-[11px] text-slate-400 leading-normal mt-1.5"><span></span> </div></div> <!> <div class="px-4 py-3 mt-auto flex items-center justify-between"><a href="https://docs.rool.dev/extension" target="_blank" rel="noopener noreferrer" class="text-[11px] text-slate-400 hover:text-indigo-500 transition-colors">Documentation</a> <button class="p-1 text-slate-400 hover:text-indigo-500 transition-colors"><!></button> <button class="text-[11px] text-slate-400 hover:text-red-500 transition-colors">Sign out</button></div></div>`);
9660
+ var root_2$1 = /* @__PURE__ */ from_html(`<div class="w-[280px] shrink-0 bg-white border-r border-slate-200 flex flex-col overflow-y-auto"><div class="px-4 pt-4 pb-3 border-b border-slate-100"><div class="flex items-start justify-between mb-1"><!> <button class="p-1 -mr-1 text-slate-400 hover:text-slate-600 transition-colors shrink-0" title="Collapse sidebar"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 18l-6-6 6-6"></path></svg></button></div> <!> <!> <!></div> <!> <!> <!> <div class="px-4 py-3 border-b border-slate-100"><div class="text-[10px] font-semibold text-slate-400 uppercase tracking-wider mb-1.5">Environment</div> <div class="flex rounded-md border border-slate-200 overflow-hidden"><button>Local</button> <button>Dev</button> <button>Prod</button></div> <div class="text-[10px] text-slate-400 mt-1 font-mono"> </div></div> <div class="px-4 py-3 border-b border-slate-100"><div class="text-[10px] font-semibold text-slate-400 uppercase tracking-wider mb-1.5">Space</div> <div class="relative" data-dropdown=""><button type="button"> <svg class="absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 pointer-events-none" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"></path></svg></button> <!></div> <div class="text-[11px] text-slate-400 leading-normal mt-1.5"><span></span> </div></div> <!> <div class="px-4 py-3 mt-auto flex items-center justify-between"><a href="https://docs.rool.dev/extension/" target="_blank" rel="noopener noreferrer" class="text-[11px] text-slate-400 hover:text-indigo-500 transition-colors">Documentation</a> <button class="p-1 text-slate-400 hover:text-indigo-500 transition-colors"><!></button> <button class="text-[11px] text-slate-400 hover:text-red-500 transition-colors">Sign out</button></div></div>`);
9660
9661
  function Sidebar($$anchor, $$props) {
9661
9662
  push($$props, true);
9662
9663
  let dropdownOpen = prop($$props, "dropdownOpen", 15);