@hintergrund/ui 0.2.0 → 0.2.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.
@@ -1,5 +1,5 @@
1
- import { i as v, r as I, m as M, G as S, c as R, a as L, b as _ } from "./google-shared-tABuvUYZ.js";
2
- import { d as x, h as G, e as O, f as A } from "./Builder-RvOmGKW5.js";
1
+ import { i as v, r as I, m as M, G as S, c as R, a as L, b as _ } from "./google-shared-BmdaIInh.js";
2
+ import { d as x, h as G, e as O, f as A } from "./Builder-B0XYsyXe.js";
3
3
  import { b as N, s as P } from "./transform-messages-CkpQp6fJ.js";
4
4
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(e) {
5
5
  return Promise.resolve().then(e);
@@ -1,4 +1,4 @@
1
- import { bf as ii } from "./global-JDSIqdYm.js";
1
+ import { b9 as ii } from "./global-CFcrkAa3.js";
2
2
  import { t as ri, s as re } from "./transform-messages-CkpQp6fJ.js";
3
3
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(t) {
4
4
  return Promise.resolve().then(t);
@@ -1,5 +1,5 @@
1
- import { i as E, r as x, m as v, G as O, c as w, a as R, b as M, T as h, R as G } from "./google-shared-tABuvUYZ.js";
2
- import { h as S, e as N, f as A } from "./Builder-RvOmGKW5.js";
1
+ import { i as E, r as x, m as v, G as O, c as w, a as R, b as M, T as h, R as G } from "./google-shared-BmdaIInh.js";
2
+ import { h as S, e as N, f as A } from "./Builder-B0XYsyXe.js";
3
3
  import { b as P, s as U } from "./transform-messages-CkpQp6fJ.js";
4
4
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(e) {
5
5
  return Promise.resolve().then(e);
@@ -1,4 +1,4 @@
1
- import { i as s } from "./Builder-RvOmGKW5.js";
1
+ import { i as s } from "./Builder-B0XYsyXe.js";
2
2
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(e) {
3
3
  return Promise.resolve().then(e);
4
4
  } });
package/dist/login.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a2 as G, a3 as I, a4 as K, as as W, Q as Y, Z as r, a7 as l, a8 as o, ad as y, ab as n, ag as ee, X as m, ah as g, au as ae, V as a, aj as i, ae as q, am as E, al as M, a9 as te, aD as re, a6 as se, aa as D, aE as oe, af as J } from "./global-JDSIqdYm.js";
1
+ import { Y as I, Z as Q, _ as V, am as W, K as X, S as r, a1 as l, a2 as o, a7 as y, a5 as n, aa as ee, P as m, ab as g, ao as ae, N as a, ad as i, a8 as q, ag as E, af as M, a3 as te, ax as re, a0 as se, a4 as J, ay as oe, a9 as N } from "./global-CFcrkAa3.js";
2
2
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(p) {
3
3
  return Promise.resolve().then(p);
4
4
  } });
@@ -8,9 +8,9 @@ const ue = {
8
8
  code: ".auth-wrapper.svelte-uxwqu2 {min-height:100vh;display:flex;align-items:center;justify-content:center;background-color:var(--bgColor-muted);padding:var(--base-size-24);}.auth-container.svelte-uxwqu2 {width:100%;max-width:340px;}.auth-header.svelte-uxwqu2 {text-align:center;margin-bottom:var(--base-size-24);}.auth-logo.svelte-uxwqu2 {color:var(--fgColor-default);margin-bottom:var(--base-size-16);}.auth-header.svelte-uxwqu2 h1:where(.svelte-uxwqu2) {font-size:var(--text-title-size-medium);font-weight:var(--base-text-weight-light);color:var(--fgColor-default);margin:0;}"
9
9
  };
10
10
  function ce(p, B) {
11
- I(B, !0), K(p, ue);
11
+ Q(B, !0), V(p, ue);
12
12
  let T = W(B, "config", 7), w = m(!1), P = m(""), x = m(""), u = m(""), _ = m(""), c = m(!1);
13
- Y(() => {
13
+ X(() => {
14
14
  const e = new URLSearchParams(window.location.search).get("error");
15
15
  e && (r(u, e, !0), window.history.replaceState({}, "", window.location.pathname));
16
16
  });
@@ -38,36 +38,36 @@ function ce(p, B) {
38
38
  set config(t) {
39
39
  T(t), ae();
40
40
  }
41
- }, C = ve(), Z = o(C), j = l(o(Z), 2);
41
+ }, C = ve(), Z = o(C), A = l(o(Z), 2);
42
42
  {
43
43
  var $ = (t) => {
44
44
  var e = ie(), d = l(o(e));
45
45
  i(e), q(() => E(d, ` ${a(u) ?? ""}`)), n(t, e);
46
46
  };
47
- y(j, (t) => {
47
+ y(A, (t) => {
48
48
  a(u) && t($);
49
49
  });
50
50
  }
51
- var H = l(j, 2);
51
+ var D = l(A, 2);
52
52
  {
53
- var N = (t) => {
53
+ var H = (t) => {
54
54
  var e = le(), d = l(o(e));
55
55
  i(e), q(() => E(d, ` ${a(_) ?? ""}`)), n(t, e);
56
- }, Q = (t) => {
57
- var e = de(), d = o(e), s = o(d), L = o(s), S = l(o(L), 2);
58
- M(S), i(L);
59
- var A = l(L, 2);
56
+ }, K = (t) => {
57
+ var e = de(), d = o(e), s = o(d), S = o(s), L = l(o(S), 2);
58
+ M(L), i(S);
59
+ var j = l(S, 2);
60
60
  {
61
61
  var R = (v) => {
62
62
  var b = ne(), f = l(o(b), 2);
63
- M(f), i(b), q(() => f.disabled = a(c)), J(f, () => a(P), (k) => r(P, k)), n(v, b);
63
+ M(f), i(b), q(() => f.disabled = a(c)), N(f, () => a(P), (k) => r(P, k)), n(v, b);
64
64
  };
65
- y(A, (v) => {
65
+ y(j, (v) => {
66
66
  a(w) && v(R);
67
67
  });
68
68
  }
69
- var V = l(A, 2);
70
- te(V, {
69
+ var Y = l(j, 2);
70
+ te(Y, {
71
71
  type: "submit",
72
72
  variant: "primary",
73
73
  size: "large",
@@ -78,29 +78,29 @@ function ce(p, B) {
78
78
  children: (v, b) => {
79
79
  var f = re(), k = se(f);
80
80
  {
81
- var X = (h) => {
82
- var z = D("Please wait...");
81
+ var F = (h) => {
82
+ var z = J("Please wait...");
83
83
  n(h, z);
84
- }, F = (h) => {
85
- var z = D("Continue");
84
+ }, G = (h) => {
85
+ var z = J("Continue");
86
86
  n(h, z);
87
87
  };
88
88
  y(k, (h) => {
89
- a(c) ? h(X) : h(F, -1);
89
+ a(c) ? h(F) : h(G, -1);
90
90
  });
91
91
  }
92
92
  n(v, f);
93
93
  },
94
94
  $$slots: { default: !0 }
95
- }), i(s), i(d), i(e), q(() => S.disabled = a(c) || a(w)), oe("submit", s, O), J(S, () => a(x), (v) => r(x, v)), n(t, e);
95
+ }), i(s), i(d), i(e), q(() => L.disabled = a(c) || a(w)), oe("submit", s, O), N(L, () => a(x), (v) => r(x, v)), n(t, e);
96
96
  };
97
- y(H, (t) => {
98
- a(_) ? t(N) : t(Q, -1);
97
+ y(D, (t) => {
98
+ a(_) ? t(H) : t(K, -1);
99
99
  });
100
100
  }
101
101
  return i(Z), i(C), n(p, C), ee(U);
102
102
  }
103
- customElements.define("hintergrund-login", G(ce, { config: {} }, [], []));
103
+ customElements.define("hintergrund-login", I(ce, { config: {} }, [], []));
104
104
  export {
105
105
  ce as default
106
106
  };
@@ -1,6 +1,6 @@
1
- import { d as Cn, h as Vu, e as Gu, f as Ju } from "./Builder-RvOmGKW5.js";
1
+ import { d as Cn, h as Vu, e as Gu, f as Ju } from "./Builder-B0XYsyXe.js";
2
2
  import { s as Bu } from "./hash-DFlR084x.js";
3
- import { p as Ir } from "./json-parse-Didq-LlA.js";
3
+ import { p as Ir } from "./json-parse-DmJ6NiZE.js";
4
4
  import { b as Yu, t as Qu, s as We } from "./transform-messages-CkpQp6fJ.js";
5
5
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(e) {
6
6
  return Promise.resolve().then(e);
@@ -1,6 +1,6 @@
1
- import { d as P, h as Z, e as ee } from "./Builder-RvOmGKW5.js";
1
+ import { d as P, h as Z, e as ee } from "./Builder-B0XYsyXe.js";
2
2
  import { h as N } from "./headers-u7rXGJ9f.js";
3
- import { c as $, a as te, p as F } from "./openai-responses-shared-qXvKLxLt.js";
3
+ import { c as $, a as te, p as F } from "./openai-responses-shared-eUUJSL4D.js";
4
4
  import { b as re } from "./transform-messages-CkpQp6fJ.js";
5
5
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(e) {
6
6
  return Promise.resolve().then(e);
@@ -1,7 +1,7 @@
1
1
  import { O as H } from "./client-Sh7wNjbG.js";
2
- import { d as F, h as j, e as G, f as $ } from "./Builder-RvOmGKW5.js";
2
+ import { d as F, h as j, e as G, f as $ } from "./Builder-B0XYsyXe.js";
3
3
  import { h as W } from "./headers-u7rXGJ9f.js";
4
- import { p as q } from "./json-parse-Didq-LlA.js";
4
+ import { p as q } from "./json-parse-DmJ6NiZE.js";
5
5
  import { b as J, t as K, s as A } from "./transform-messages-CkpQp6fJ.js";
6
6
  import { h as Y, b as V, i as Z, r as Q } from "./github-copilot-headers-DWh_6bE3.js";
7
7
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(e) {
@@ -1,8 +1,8 @@
1
1
  import { O as w } from "./client-Sh7wNjbG.js";
2
- import { d, h as y, e as E } from "./Builder-RvOmGKW5.js";
2
+ import { d, h as y, e as E } from "./Builder-B0XYsyXe.js";
3
3
  import { h as b } from "./headers-u7rXGJ9f.js";
4
4
  import { h as I, b as A, i as _, r as P } from "./github-copilot-headers-DWh_6bE3.js";
5
- import { p as T, c as O, a as S } from "./openai-responses-shared-qXvKLxLt.js";
5
+ import { p as T, c as O, a as S } from "./openai-responses-shared-eUUJSL4D.js";
6
6
  import { b as C } from "./transform-messages-CkpQp6fJ.js";
7
7
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(e) {
8
8
  return Promise.resolve().then(e);
@@ -1,6 +1,6 @@
1
- import { f as S } from "./Builder-RvOmGKW5.js";
1
+ import { f as S } from "./Builder-B0XYsyXe.js";
2
2
  import { s as v } from "./hash-DFlR084x.js";
3
- import { p as x } from "./json-parse-Didq-LlA.js";
3
+ import { p as x } from "./json-parse-DmJ6NiZE.js";
4
4
  import { t as T, s as _ } from "./transform-messages-CkpQp6fJ.js";
5
5
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(r) {
6
6
  return Promise.resolve().then(r);
package/dist/setup.js CHANGED
@@ -1,14 +1,14 @@
1
- import { a2 as Ie, a3 as Le, a4 as We, X as d, Y as qe, a7 as s, a8 as r, an as Re, ad as A, aE as Ke, ab as y, ag as Fe, ah as z, aj as t, ae as E, ao as Me, V as e, ax as ye, am as $, Z as l, al as p, ak as _, a9 as R, aa as K, af as w, aq as Ve, bc as he } from "./global-JDSIqdYm.js";
2
- typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(j) {
3
- return Promise.resolve().then(j);
1
+ import { Y as je, Z as Ie, _ as Re, P as d, Q as We, a1 as s, a2 as r, ah as Ke, a7 as A, ay as Ye, a5 as f, aa as qe, ab as z, ad as t, a8 as T, ai as Fe, N as e, ar as be, ag as $, S as l, af as w, ae as k, a3 as R, a4 as W, a9 as m, ak as Ue, b6 as ye } from "./global-CFcrkAa3.js";
2
+ typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(E) {
3
+ return Promise.resolve().then(E);
4
4
  } });
5
- var Ye = z('<li><span class="step-index svelte-1sk6wwy"> </span> <span class="step-label svelte-1sk6wwy"> </span></li>'), Ze = z('<div class="flash flash-error" role="alert"><svg class="octicon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path></svg> </div>'), De = z(`<div class="Box"><div class="Box-header"><h2>Create your site</h2> <p>Set the public site title and the administrator account.</p></div> <div class="Box-body"><div class="form-group"><label for="site-title">Site title</label> <input id="site-title" class="form-control" required="" autocomplete="organization" placeholder="My business"/></div> <div class="form-group"><label for="admin-email">Email address</label> <input id="admin-email" class="form-control" type="email" required="" autocomplete="email" placeholder="you@example.com"/> <p class="note svelte-1sk6wwy">You sign in with this address. Admin notices go here too.</p></div> <div class="form-group"><label for="admin-password">Password</label> <div class="input-group svelte-1sk6wwy"><input id="admin-password" class="form-control" required="" minlength="12" autocomplete="new-password"/> <!></div> <p class="note svelte-1sk6wwy">A strong password was generated for you. Save it, or replace it with your own (at
6
- least 12 characters).</p></div></div></div>`), Ue = z('<div class="subsection svelte-1sk6wwy"><div class="form-group"><label for="stripe-secret">Stripe secret key</label> <input id="stripe-secret" class="form-control" type="password" autocomplete="off" placeholder="sk_live_…"/></div> <div class="form-group"><label for="stripe-webhook">Stripe webhook secret <span class="optional svelte-1sk6wwy">optional</span></label> <input id="stripe-webhook" class="form-control" type="password" autocomplete="off" placeholder="whsec_…"/> <p class="note svelte-1sk6wwy">Leave blank and we create the webhook for you.</p></div> <div class="links svelte-1sk6wwy"><a href="https://dashboard.stripe.com/register" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create a Stripe account ↗</a> <a href="https://docs.stripe.com/keys" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Find your API keys ↗</a> <a href="https://docs.stripe.com/webhooks" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Learn about webhooks ↗</a></div></div>'), Je = z(`<div class="Box"><div class="Box-header"><h2>Set up payments</h2> <p>Start with direct bank transfer, then optionally add card payments.</p></div> <div class="Box-body"><div class="notice svelte-1sk6wwy"><strong>Bank transfer has no processing fee.</strong> Customers receive your account details
5
+ var Ze = z('<li><span class="step-index svelte-1sk6wwy"> </span> <span class="step-label svelte-1sk6wwy"> </span></li>'), De = z('<div class="flash flash-error" role="alert"><svg class="octicon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path></svg> </div>'), Me = z(`<div class="Box"><div class="Box-header"><h2>Create your administrator account</h2> <p>Your site title is already set. Choose the credentials for its first administrator.</p></div> <div class="Box-body"><div class="form-group"><label for="admin-email">Email address</label> <input id="admin-email" class="form-control" type="email" required="" autocomplete="email" placeholder="you@example.com"/> <p class="note svelte-1sk6wwy">You sign in with this address. Admin notices go here too.</p></div> <div class="form-group"><label for="admin-password">Password</label> <div class="input-group svelte-1sk6wwy"><input id="admin-password" class="form-control" required="" minlength="12" autocomplete="new-password"/> <!></div> <p class="note svelte-1sk6wwy">A strong password was generated for you. Save it, or replace it with your own (at
6
+ least 12 characters).</p></div></div></div>`), Ve = z('<div class="subsection svelte-1sk6wwy"><div class="form-group"><label for="stripe-secret">Stripe secret key</label> <input id="stripe-secret" class="form-control" type="password" autocomplete="off" placeholder="sk_live_…"/></div> <div class="form-group"><label for="stripe-webhook">Stripe webhook secret <span class="optional svelte-1sk6wwy">optional</span></label> <input id="stripe-webhook" class="form-control" type="password" autocomplete="off" placeholder="whsec_…"/> <p class="note svelte-1sk6wwy">Leave blank and we create the webhook for you.</p></div> <div class="links svelte-1sk6wwy"><a href="https://dashboard.stripe.com/register" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create a Stripe account ↗</a> <a href="https://docs.stripe.com/keys" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Find your API keys ↗</a> <a href="https://docs.stripe.com/webhooks" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Learn about webhooks ↗</a></div></div>'), Je = z(`<div class="Box"><div class="Box-header"><h2>Set up payments</h2> <p>Start with direct bank transfer, then optionally add card payments.</p></div> <div class="Box-body"><div class="notice svelte-1sk6wwy"><strong>Bank transfer has no processing fee.</strong> Customers receive your account details
7
7
  and their order number as the payment reference; you confirm that the money arrived in your
8
8
  dashboard. If you prefer card payments, connect Stripe and run both side by side — the processing
9
9
  fee is Stripe’s, never ours.</div> <div class="form-group"><label for="account-holder">Account holder</label> <input id="account-holder" class="form-control" autocomplete="organization"/></div> <div class="form-group"><label for="iban">IBAN</label> <input id="iban" class="form-control" autocomplete="off" placeholder="DE…"/></div> <div class="form-row svelte-1sk6wwy"><div class="form-group"><label for="bic">BIC <span class="optional svelte-1sk6wwy">optional</span></label> <input id="bic" class="form-control" autocomplete="off"/></div> <div class="form-group"><label for="bank-name">Bank name <span class="optional svelte-1sk6wwy">optional</span></label> <input id="bank-name" class="form-control" autocomplete="organization"/></div></div> <div class="form-group"><label for="instructions">Payment instructions <span class="optional svelte-1sk6wwy">optional</span></label> <textarea id="instructions" class="form-control" placeholder="Please use your order number as the payment reference."></textarea></div> <fieldset class="choices svelte-1sk6wwy"><legend class="svelte-1sk6wwy">Payment methods</legend> <label class="choice svelte-1sk6wwy"><input type="radio" class="svelte-1sk6wwy"/> <span class="choice-text svelte-1sk6wwy"><strong class="svelte-1sk6wwy">Bank transfer only</strong> <small class="svelte-1sk6wwy">No processing fee; confirm incoming payments yourself.</small></span></label> <label class="choice svelte-1sk6wwy"><input type="radio" class="svelte-1sk6wwy"/> <span class="choice-text svelte-1sk6wwy"><strong class="svelte-1sk6wwy">Add Stripe for card payments</strong> <small class="svelte-1sk6wwy">Use card payments alongside bank transfer.</small></span></label></fieldset> <!></div></div>`), Oe = z(`<div class="Box"><div class="Box-header"><h2>Set up email</h2> <p>Plunk sends order, subscriber, and administrator emails. You can skip this for now.</p></div> <div class="Box-body"><div class="notice svelte-1sk6wwy">Create a Plunk account, verify the domain you will send from, then create an API key.
10
- The sender email must use that verified domain.</div> <div class="form-group"><label for="plunk-key">Plunk API key <span class="optional svelte-1sk6wwy">optional</span></label> <input id="plunk-key" class="form-control" type="password" autocomplete="off" placeholder="plunk_…"/></div> <div class="form-row svelte-1sk6wwy"><div class="form-group"><label for="from-email">Sender email</label> <input id="from-email" class="form-control" type="email" autocomplete="email" placeholder="hello@yourdomain.com"/></div> <div class="form-group"><label for="from-name">Sender name <span class="optional svelte-1sk6wwy">optional</span></label> <input id="from-name" class="form-control" autocomplete="organization"/></div></div> <div class="form-group"><label for="reply-to">Reply-to email <span class="optional svelte-1sk6wwy">optional</span></label> <input id="reply-to" class="form-control" type="email" autocomplete="email"/></div> <div class="links svelte-1sk6wwy"><a href="https://app.useplunk.com" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create or open your Plunk account ↗</a> <a href="https://docs.useplunk.com/guides/verifying-domains" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Verify your sending domain ↗</a> <a href="https://docs.useplunk.com/guides/api-keys" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create a Plunk API key ↗</a></div></div></div>`), Xe = z("<span></span>"), Ge = z('<main class="setup-wrapper svelte-1sk6wwy"><div class="setup-container svelte-1sk6wwy"><div class="setup-header svelte-1sk6wwy"><svg class="setup-logo svelte-1sk6wwy" viewBox="0 0 90 90" width="48" height="48" fill="currentColor"><rect x="12" y="12" width="66" height="66" fill="currentColor"></rect></svg> <h1 class="svelte-1sk6wwy">Set up Hintergrund</h1> <p class="setup-subtitle svelte-1sk6wwy">Three short steps and your site is live.</p></div> <ol class="steps svelte-1sk6wwy" aria-label="Setup progress"></ol> <!> <form autocomplete="off"><!> <div class="actions svelte-1sk6wwy"><!> <!></div></form></div></main>');
11
- const Qe = {
10
+ The sender email must use that verified domain.</div> <div class="form-group"><label for="plunk-key">Plunk API key <span class="optional svelte-1sk6wwy">optional</span></label> <input id="plunk-key" class="form-control" type="password" autocomplete="off" placeholder="plunk_…"/></div> <div class="form-row svelte-1sk6wwy"><div class="form-group"><label for="from-email">Sender email</label> <input id="from-email" class="form-control" type="email" autocomplete="email" placeholder="hello@yourdomain.com"/></div> <div class="form-group"><label for="from-name">Sender name <span class="optional svelte-1sk6wwy">optional</span></label> <input id="from-name" class="form-control" autocomplete="organization"/></div></div> <div class="form-group"><label for="reply-to">Reply-to email <span class="optional svelte-1sk6wwy">optional</span></label> <input id="reply-to" class="form-control" type="email" autocomplete="email"/></div> <div class="links svelte-1sk6wwy"><a href="https://app.useplunk.com" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create or open your Plunk account ↗</a> <a href="https://docs.useplunk.com/guides/verifying-domains" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Verify your sending domain ↗</a> <a href="https://docs.useplunk.com/guides/api-keys" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create a Plunk API key ↗</a></div></div></div>`), Qe = z("<span></span>"), Ge = z('<main class="setup-wrapper svelte-1sk6wwy"><div class="setup-container svelte-1sk6wwy"><div class="setup-header svelte-1sk6wwy"><svg class="setup-logo svelte-1sk6wwy" viewBox="0 0 90 90" width="48" height="48" fill="currentColor"><rect x="12" y="12" width="66" height="66" fill="currentColor"></rect></svg> <h1 class="svelte-1sk6wwy">Set up Hintergrund</h1> <p class="setup-subtitle svelte-1sk6wwy">Three short steps and your site is live.</p></div> <ol class="steps svelte-1sk6wwy" aria-label="Setup progress"></ol> <!> <form autocomplete="off"><!> <div class="actions svelte-1sk6wwy"><!> <!></div></form></div></main>');
11
+ const Xe = {
12
12
  hash: "svelte-1sk6wwy",
13
13
  code: `.setup-wrapper.svelte-1sk6wwy {min-height:100vh;padding:var(--base-size-48) var(--base-size-24);background-color:var(--bgColor-muted);color:var(--fgColor-default);}.setup-container.svelte-1sk6wwy {width:100%;max-width:var(--base-size-600);margin:0 auto;}.setup-header.svelte-1sk6wwy {text-align:center;margin-bottom:var(--base-size-24);}.setup-logo.svelte-1sk6wwy {color:var(--fgColor-default);margin-bottom:var(--base-size-16);}.setup-header.svelte-1sk6wwy h1:where(.svelte-1sk6wwy) {margin:0;font-size:var(--text-title-size-medium);font-weight:var(--base-text-weight-light);color:var(--fgColor-default);}.setup-subtitle.svelte-1sk6wwy {margin:var(--base-size-4) 0 0;font-size:var(--text-body-size-medium);color:var(--fgColor-muted);}
14
14
 
@@ -27,17 +27,19 @@ const Qe = {
27
27
  @media (max-width: 560px) {.setup-wrapper.svelte-1sk6wwy {padding:var(--base-size-24) var(--base-size-16);}.form-row.svelte-1sk6wwy {grid-template-columns:1fr;gap:0;}.step-label.svelte-1sk6wwy {display:none;}.steps.svelte-1sk6wwy {grid-template-columns:repeat(3, 1fr);}
28
28
  }`
29
29
  };
30
- function es(j, ge) {
31
- Le(ge, !0), We(j, Qe);
32
- const ie = [], ne = ["Site & admin", "Payments", "Email"];
33
- function ke() {
30
+ function es(E, he) {
31
+ Ie(he, !0), Re(E, Xe);
32
+ const oe = [], le = ["Admin", "Payments", "Email"];
33
+ function ge() {
34
34
  const a = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789!@#$%^&*";
35
35
  return [...crypto.getRandomValues(new Uint8Array(20))].map((n) => a[n % a.length]).join("");
36
36
  }
37
- let u = d(1), H = d(""), N = d(""), I = d(qe(ke())), L = d(!1), P = d("bank_transfer"), F = d(""), M = d(""), V = d(""), Y = d(""), Z = d(""), D = d(""), U = d(""), J = d(""), O = d(""), X = d(""), G = d(""), C = d(""), B = d(!1);
37
+ let u = d(1);
38
+ const ke = new URLSearchParams(window.location.search).get("token") ?? "";
39
+ let N = d(""), H = d(We(ge())), L = d(!1), P = d("bank_transfer"), K = d(""), Y = d(""), q = d(""), F = d(""), U = d(""), Z = d(""), D = d(""), M = d(""), V = d(""), J = d(""), O = d(""), C = d(""), B = d(!1);
38
40
  function _e() {
39
- if (e(u) === 1 && (!e(H).trim() || !e(N).trim() || e(I).length < 12)) {
40
- l(C, "Site title, email, and a password of at least 12 characters are required.");
41
+ if (e(u) === 1 && (!e(N).trim() || e(H).length < 12)) {
42
+ l(C, "An email address and a password of at least 12 characters are required.");
41
43
  return;
42
44
  }
43
45
  l(C, ""), l(u, e(u) + 1), window.scrollTo({ top: 0, behavior: "smooth" });
@@ -52,23 +54,23 @@ function es(j, ge) {
52
54
  method: "POST",
53
55
  headers: { "Content-Type": "application/json" },
54
56
  body: JSON.stringify({
55
- siteTitle: e(H),
57
+ setupToken: ke,
56
58
  email: e(N),
57
- password: e(I),
59
+ password: e(H),
58
60
  paymentProvider: e(P),
59
61
  bankTransfer: {
60
- accountHolder: e(F),
61
- iban: e(M),
62
- bic: e(V),
63
- bankName: e(Y),
64
- instructions: e(Z)
62
+ accountHolder: e(K),
63
+ iban: e(Y),
64
+ bic: e(q),
65
+ bankName: e(F),
66
+ instructions: e(U)
65
67
  },
66
- stripeSecretKey: e(D),
67
- stripeWebhookSecret: e(U),
68
- plunkApiKey: e(J),
69
- fromEmail: e(O),
70
- fromName: e(X),
71
- replyTo: e(G)
68
+ stripeSecretKey: e(Z),
69
+ stripeWebhookSecret: e(D),
70
+ plunkApiKey: e(M),
71
+ fromEmail: e(V),
72
+ fromName: e(J),
73
+ replyTo: e(O)
72
74
  })
73
75
  }), n = await o.json();
74
76
  if (!o.ok) throw new Error(n.error || "Setup failed");
@@ -77,129 +79,127 @@ function es(j, ge) {
77
79
  l(C, o instanceof Error ? o.message : "Setup failed", !0), l(B, !1);
78
80
  }
79
81
  }
80
- var Q = Ge(), de = r(Q), ee = s(r(de), 2);
81
- Re(ee, 22, () => ne, (a) => a, (a, o, n) => {
82
- var i = Ye();
83
- let h;
84
- var c = r(i), g = r(c, !0);
82
+ var Q = Ge(), ie = r(Q), G = s(r(ie), 2);
83
+ Ke(G, 22, () => le, (a) => a, (a, o, n) => {
84
+ var i = Ze();
85
+ let b;
86
+ var c = r(i), y = r(c, !0);
85
87
  t(c);
86
- var f = s(c, 2), k = r(f, !0);
87
- t(f), t(i), E(() => {
88
- h = Me(i, 1, "step-item svelte-1sk6wwy", null, h, {
88
+ var p = s(c, 2), _ = r(p, !0);
89
+ t(p), t(i), T(() => {
90
+ b = Fe(i, 1, "step-item svelte-1sk6wwy", null, b, {
89
91
  active: e(u) === e(n) + 1,
90
92
  done: e(u) > e(n) + 1
91
- }), ye(i, "aria-current", e(u) === e(n) + 1 ? "step" : void 0), $(g, e(u) > e(n) + 1 ? "✓" : e(n) + 1), $(k, o);
92
- }), y(a, i);
93
- }), t(ee);
94
- var ve = s(ee, 2);
93
+ }), be(i, "aria-current", e(u) === e(n) + 1 ? "step" : void 0), $(y, e(u) > e(n) + 1 ? "✓" : e(n) + 1), $(_, o);
94
+ }), f(a, i);
95
+ }), t(G);
96
+ var ne = s(G, 2);
95
97
  {
96
98
  var Ce = (a) => {
97
- var o = Ze(), n = s(r(o));
98
- t(o), E(() => $(n, ` ${e(C) ?? ""}`)), y(a, o);
99
+ var o = De(), n = s(r(o));
100
+ t(o), T(() => $(n, ` ${e(C) ?? ""}`)), f(a, o);
99
101
  };
100
- A(ve, (a) => {
102
+ A(ne, (a) => {
101
103
  e(C) && a(Ce);
102
104
  });
103
105
  }
104
- var se = s(ve, 2), ce = r(se);
106
+ var X = s(ne, 2), de = r(X);
105
107
  {
106
- var Se = (a) => {
107
- var o = De(), n = s(r(o), 2), i = r(n), h = s(r(i), 2);
108
- p(h), t(i);
109
- var c = s(i, 2), g = s(r(c), 2);
110
- p(g), _(2), t(c);
111
- var f = s(c, 2), k = s(r(f), 2), x = r(k);
112
- p(x);
113
- var S = s(x, 2);
114
- R(S, {
108
+ var Pe = (a) => {
109
+ var o = Me(), n = s(r(o), 2), i = r(n), b = s(r(i), 2);
110
+ w(b), k(2), t(i);
111
+ var c = s(i, 2), y = s(r(c), 2), p = r(y);
112
+ w(p);
113
+ var _ = s(p, 2);
114
+ R(_, {
115
115
  class: "input-group-btn",
116
116
  onclick: () => l(L, !e(L)),
117
- children: (m, b) => {
118
- _();
119
- var T = K();
120
- E(() => $(T, e(L) ? "Hide" : "Show")), y(m, T);
117
+ children: (h, S) => {
118
+ k();
119
+ var x = W();
120
+ T(() => $(x, e(L) ? "Hide" : "Show")), f(h, x);
121
121
  },
122
122
  $$slots: { default: !0 }
123
- }), t(k), _(2), t(f), t(n), t(o), E(() => ye(x, "type", e(L) ? "text" : "password")), w(h, () => e(H), (m) => l(H, m)), w(g, () => e(N), (m) => l(N, m)), w(x, () => e(I), (m) => l(I, m)), y(a, o);
124
- }, Pe = (a) => {
125
- var o = Je(), n = s(r(o), 2), i = s(r(n), 2), h = s(r(i), 2);
126
- p(h), t(i);
127
- var c = s(i, 2), g = s(r(c), 2);
128
- p(g), t(c);
129
- var f = s(c, 2), k = r(f), x = s(r(k), 2);
130
- p(x), t(k);
131
- var S = s(k, 2), m = s(r(S), 2);
132
- p(m), t(S), t(f);
133
- var b = s(f, 2), T = s(r(b), 2);
134
- Ve(T), t(b);
135
- var ae = s(b, 2), te = s(r(ae), 2), W = r(te);
136
- p(W), W.value = W.__value = "bank_transfer", _(2), t(te);
137
- var ue = s(te, 2), q = r(ue);
138
- p(q), q.value = q.__value = "stripe", _(2), t(ue), t(ae);
139
- var He = s(ae, 2);
123
+ }), t(y), k(2), t(c), t(n), t(o), T(() => be(p, "type", e(L) ? "text" : "password")), m(b, () => e(N), (h) => l(N, h)), m(p, () => e(H), (h) => l(H, h)), f(a, o);
124
+ }, Se = (a) => {
125
+ var o = Je(), n = s(r(o), 2), i = s(r(n), 2), b = s(r(i), 2);
126
+ w(b), t(i);
127
+ var c = s(i, 2), y = s(r(c), 2);
128
+ w(y), t(c);
129
+ var p = s(c, 2), _ = r(p), h = s(r(_), 2);
130
+ w(h), t(_);
131
+ var S = s(_, 2), x = s(r(S), 2);
132
+ w(x), t(S), t(p);
133
+ var g = s(p, 2), pe = s(r(g), 2);
134
+ Ue(pe), t(g);
135
+ var ee = s(g, 2), se = s(r(ee), 2), j = r(se);
136
+ w(j), j.value = j.__value = "bank_transfer", k(2), t(se);
137
+ var we = s(se, 2), I = r(we);
138
+ w(I), I.value = I.__value = "stripe", k(2), t(we), t(ee);
139
+ var He = s(ee, 2);
140
140
  {
141
- var Ne = (v) => {
142
- var re = Ue(), oe = r(re), me = s(r(oe), 2);
143
- p(me), t(oe);
144
- var fe = s(oe, 2), be = s(r(fe), 2);
145
- p(be), _(2), t(fe), _(2), t(re), w(me, () => e(D), (le) => l(D, le)), w(be, () => e(U), (le) => l(U, le)), y(v, re);
141
+ var Le = (v) => {
142
+ var ae = Ve(), te = r(ae), ue = s(r(te), 2);
143
+ w(ue), t(te);
144
+ var me = s(te, 2), fe = s(r(me), 2);
145
+ w(fe), k(2), t(me), k(2), t(ae), m(ue, () => e(Z), (re) => l(Z, re)), m(fe, () => e(D), (re) => l(D, re)), f(v, ae);
146
146
  };
147
147
  A(He, (v) => {
148
- e(P) === "stripe" && v(Ne);
148
+ e(P) === "stripe" && v(Le);
149
149
  });
150
150
  }
151
- t(n), t(o), w(h, () => e(F), (v) => l(F, v)), w(g, () => e(M), (v) => l(M, v)), w(x, () => e(V), (v) => l(V, v)), w(m, () => e(Y), (v) => l(Y, v)), w(T, () => e(Z), (v) => l(Z, v)), he(ie, [], W, () => e(P), (v) => l(P, v)), he(ie, [], q, () => e(P), (v) => l(P, v)), y(a, o);
151
+ t(n), t(o), m(b, () => e(K), (v) => l(K, v)), m(y, () => e(Y), (v) => l(Y, v)), m(h, () => e(q), (v) => l(q, v)), m(x, () => e(F), (v) => l(F, v)), m(pe, () => e(U), (v) => l(U, v)), ye(oe, [], j, () => e(P), (v) => l(P, v)), ye(oe, [], I, () => e(P), (v) => l(P, v)), f(a, o);
152
152
  }, Be = (a) => {
153
- var o = Oe(), n = s(r(o), 2), i = s(r(n), 2), h = s(r(i), 2);
154
- p(h), t(i);
155
- var c = s(i, 2), g = r(c), f = s(r(g), 2);
156
- p(f), t(g);
157
- var k = s(g, 2), x = s(r(k), 2);
158
- p(x), t(k), t(c);
159
- var S = s(c, 2), m = s(r(S), 2);
160
- p(m), t(S), _(2), t(n), t(o), w(h, () => e(J), (b) => l(J, b)), w(f, () => e(O), (b) => l(O, b)), w(x, () => e(X), (b) => l(X, b)), w(m, () => e(G), (b) => l(G, b)), y(a, o);
153
+ var o = Oe(), n = s(r(o), 2), i = s(r(n), 2), b = s(r(i), 2);
154
+ w(b), t(i);
155
+ var c = s(i, 2), y = r(c), p = s(r(y), 2);
156
+ w(p), t(y);
157
+ var _ = s(y, 2), h = s(r(_), 2);
158
+ w(h), t(_), t(c);
159
+ var S = s(c, 2), x = s(r(S), 2);
160
+ w(x), t(S), k(2), t(n), t(o), m(b, () => e(M), (g) => l(M, g)), m(p, () => e(V), (g) => l(V, g)), m(h, () => e(J), (g) => l(J, g)), m(x, () => e(O), (g) => l(O, g)), f(a, o);
161
161
  };
162
- A(ce, (a) => {
163
- e(u) === 1 ? a(Se) : e(u) === 2 ? a(Pe, 1) : a(Be, -1);
162
+ A(de, (a) => {
163
+ e(u) === 1 ? a(Pe) : e(u) === 2 ? a(Se, 1) : a(Be, -1);
164
164
  });
165
165
  }
166
- var pe = s(ce, 2), we = r(pe);
166
+ var ve = s(de, 2), ce = r(ve);
167
167
  {
168
- var Te = (a) => {
168
+ var Ae = (a) => {
169
169
  R(a, {
170
170
  onclick: xe,
171
171
  get disabled() {
172
172
  return e(B);
173
173
  },
174
174
  children: (o, n) => {
175
- _();
176
- var i = K("Back");
177
- y(o, i);
175
+ k();
176
+ var i = W("Back");
177
+ f(o, i);
178
178
  },
179
179
  $$slots: { default: !0 }
180
180
  });
181
- }, Ae = (a) => {
182
- var o = Xe();
183
- y(a, o);
181
+ }, Te = (a) => {
182
+ var o = Qe();
183
+ f(a, o);
184
184
  };
185
- A(we, (a) => {
186
- e(u) > 1 ? a(Te) : a(Ae, -1);
185
+ A(ce, (a) => {
186
+ e(u) > 1 ? a(Ae) : a(Te, -1);
187
187
  });
188
188
  }
189
- var Ee = s(we, 2);
189
+ var $e = s(ce, 2);
190
190
  {
191
- var $e = (a) => {
191
+ var Ee = (a) => {
192
192
  R(a, {
193
193
  variant: "primary",
194
194
  onclick: _e,
195
195
  children: (o, n) => {
196
- _();
197
- var i = K("Continue");
198
- y(o, i);
196
+ k();
197
+ var i = W("Continue");
198
+ f(o, i);
199
199
  },
200
200
  $$slots: { default: !0 }
201
201
  });
202
- }, je = (a) => {
202
+ }, Ne = (a) => {
203
203
  R(a, {
204
204
  variant: "primary",
205
205
  type: "submit",
@@ -207,20 +207,20 @@ function es(j, ge) {
207
207
  return e(B);
208
208
  },
209
209
  children: (o, n) => {
210
- _();
211
- var i = K();
212
- E(() => $(i, e(B) ? "Finishing setup…" : "Finish setup")), y(o, i);
210
+ k();
211
+ var i = W();
212
+ T(() => $(i, e(B) ? "Finishing setup…" : "Finish setup")), f(o, i);
213
213
  },
214
214
  $$slots: { default: !0 }
215
215
  });
216
216
  };
217
- A(Ee, (a) => {
218
- e(u) < ne.length ? a($e) : a(je, -1);
217
+ A($e, (a) => {
218
+ e(u) < le.length ? a(Ee) : a(Ne, -1);
219
219
  });
220
220
  }
221
- t(pe), t(se), t(de), t(Q), Ke("submit", se, ze), y(j, Q), Fe();
221
+ t(ve), t(X), t(ie), t(Q), Ye("submit", X, ze), f(E, Q), qe();
222
222
  }
223
- customElements.define("hintergrund-setup", Ie(es, {}, [], []));
223
+ customElements.define("hintergrund-setup", je(es, {}, [], []));
224
224
  export {
225
225
  es as default
226
226
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hintergrund/ui",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "scripts": {
5
5
  "dev": "concurrently \"vite build --watch\" \"sirv dist --port 5188 --cors --dev\"",
6
6
  "build": "vite build",
@@ -29,7 +29,7 @@
29
29
  "svelte-check": "^4.3.2",
30
30
  "typescript": "^5.9.2",
31
31
  "vite": "^7.1.7",
32
- "@hintergrund/runtime-contracts": "^0.1.9",
32
+ "@hintergrund/runtime-contracts": "^0.1.15",
33
33
  "@hintergrund/sveltekit-static-preview": "workspace:*"
34
34
  },
35
35
  "keywords": [