@ctx-core/auth0-ui 10.0.122 → 11.0.3

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 (87) hide show
  1. package/.swcrc +10 -0
  2. package/CHANGELOG.md +54 -0
  3. package/dist/auth0_ui_Ctx.js +2 -1
  4. package/dist/auth0_ui_Ctx.js.map +1 -1
  5. package/dist/auth0_ui_ctx_I.generated.js +4 -1
  6. package/dist/auth0_ui_ctx_I.generated.js.map +1 -1
  7. package/dist/auth0_ui_ctx_key.js +1 -0
  8. package/dist/auth0_ui_ctx_key.js.map +1 -1
  9. package/dist/auth_script_html_.js +2 -1
  10. package/dist/auth_script_html_.js.map +1 -1
  11. package/dist/getContext_auth0_ui_ctx.js +1 -0
  12. package/dist/getContext_auth0_ui_ctx.js.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/ui/Auth0.svelte +168 -0
  16. package/dist/ui/Auth0_Change_Password_Form.svelte +92 -0
  17. package/dist/ui/Auth0_Dialog_Close.svelte +10 -0
  18. package/dist/ui/Auth0_Forgot_Password_Check_Email_Form.svelte +10 -0
  19. package/dist/ui/Auth0_Forgot_Password_Form.svelte +64 -0
  20. package/dist/ui/Auth0_Loggedin_If.svelte +14 -0
  21. package/dist/ui/Auth0_Login_Form.svelte +85 -0
  22. package/dist/ui/Auth0_Signup_Form.svelte +120 -0
  23. package/dist/ui/Auth0_c.js +58 -42
  24. package/dist/ui/Auth0_c.js.map +1 -1
  25. package/dist/ui/index.js +17 -8
  26. package/dist/ui/index.js.map +1 -1
  27. package/package.json +26 -23
  28. package/src/auth0_ui_ctx_I.generated.ts +2 -12
  29. package/src/ui/Auth0.svelte +5 -6
  30. package/src/ui/Auth0_Change_Password_Form.svelte +17 -24
  31. package/src/ui/Auth0_Dialog_Close.svelte +2 -2
  32. package/src/ui/Auth0_Forgot_Password_Check_Email_Form.svelte +1 -1
  33. package/src/ui/Auth0_Forgot_Password_Form.svelte +10 -14
  34. package/src/ui/Auth0_Loggedin_If.svelte +1 -1
  35. package/src/ui/Auth0_Login_Form.svelte +25 -29
  36. package/src/ui/Auth0_Signup_Form.svelte +34 -35
  37. package/src/ui/Auth0_c.ts +16 -15
  38. package/dist/auth0_ui_Ctx.d.ts +0 -9
  39. package/dist/auth0_ui_ctx_I.generated.d.ts +0 -14
  40. package/dist/auth0_ui_ctx_key.d.ts +0 -1
  41. package/dist/auth_script_html_.d.ts +0 -2
  42. package/dist/browser/auth0_ui_ctx_key.d.ts +0 -1
  43. package/dist/browser/auth0_ui_ctx_key.js +0 -2
  44. package/dist/browser/auth0_ui_ctx_key.js.map +0 -1
  45. package/dist/browser/auth_script_html_.d.ts +0 -2
  46. package/dist/browser/auth_script_html_.js +0 -34
  47. package/dist/browser/auth_script_html_.js.map +0 -1
  48. package/dist/browser/getContext_auth0_ui_ctx.d.ts +0 -1
  49. package/dist/browser/getContext_auth0_ui_ctx.js +0 -6
  50. package/dist/browser/getContext_auth0_ui_ctx.js.map +0 -1
  51. package/dist/browser/index.d.ts +0 -3
  52. package/dist/browser/index.js +0 -4
  53. package/dist/browser/index.js.map +0 -1
  54. package/dist/getContext_auth0_ui_ctx.d.ts +0 -1
  55. package/dist/index.cjs +0 -1
  56. package/dist/index.d.ts +0 -6
  57. package/dist/node/index.d.ts +0 -6
  58. package/dist/node/index.js +0 -7
  59. package/dist/node/index.js.map +0 -1
  60. package/dist/node/jwks_cert__b.d.ts +0 -6
  61. package/dist/node/jwks_cert__b.js +0 -17
  62. package/dist/node/jwks_cert__b.js.map +0 -1
  63. package/dist/node/jwks_x5c__b.d.ts +0 -6
  64. package/dist/node/jwks_x5c__b.js +0 -20
  65. package/dist/node/jwks_x5c__b.js.map +0 -1
  66. package/dist/node/jwt_token_decoded__b.d.ts +0 -6
  67. package/dist/node/jwt_token_decoded__b.js +0 -14
  68. package/dist/node/jwt_token_decoded__b.js.map +0 -1
  69. package/dist/node/koa_jwt_token_decoded__b.d.ts +0 -7
  70. package/dist/node/koa_jwt_token_decoded__b.js +0 -16
  71. package/dist/node/koa_jwt_token_decoded__b.js.map +0 -1
  72. package/dist/node/verify_jwt_email__b.d.ts +0 -6
  73. package/dist/node/verify_jwt_email__b.js +0 -28
  74. package/dist/node/verify_jwt_email__b.js.map +0 -1
  75. package/dist/node/verify_jwt_user_id__b.d.ts +0 -6
  76. package/dist/node/verify_jwt_user_id__b.js +0 -14
  77. package/dist/node/verify_jwt_user_id__b.js.map +0 -1
  78. package/dist/ui/Auth0_c.d.ts +0 -55
  79. package/dist/ui/index.d.ts +0 -9
  80. package/src/index.browser.js +0 -4
  81. package/src/node/index.ts +0 -6
  82. package/src/node/jwks_cert__b.ts +0 -19
  83. package/src/node/jwks_x5c__b.ts +0 -21
  84. package/src/node/jwt_token_decoded__b.ts +0 -15
  85. package/src/node/koa_jwt_token_decoded__b.ts +0 -19
  86. package/src/node/verify_jwt_email__b.ts +0 -29
  87. package/src/node/verify_jwt_user_id__b.ts +0 -15
@@ -0,0 +1,120 @@
1
+ <script lang="ts">
2
+ import {
3
+ AUTH0_DOMAIN$_b, auth0_token_error$_b, open_auth0_forgot_password_b, open_auth0_login_b,
4
+ } from '@ctx-core/auth0'
5
+ import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
6
+ import { getContext_auth0_ui_ctx } from '../getContext_auth0_ui_ctx.js'
7
+ import { Auth0_c } from './Auth0_c.js'
8
+ import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
9
+ export let error_class = '', input_class = '', button_class = '', label_class = '.js'
10
+ const ctx = getContext_auth0_ui_ctx() as auth0_ui_Ctx
11
+ const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)
12
+ const auth0_token_error$ = auth0_token_error$_b(ctx)
13
+ const open_auth0_login = open_auth0_login_b(ctx)
14
+ const open_auth0_forgot_password = open_auth0_forgot_password_b(ctx)
15
+ const _ = new Auth0_c(ctx)
16
+ let root, signup_email_input, signup_password_input, signup_password_confirmation_input
17
+ let error_username:string|undefined //region
18
+ $: error_username = $auth0_token_error$?.username //endregion
19
+ let error_password:string|undefined //region
20
+ $: error_password = $auth0_token_error$?.password //endregion
21
+ let error_password_confirmation:string|undefined //region
22
+ $: error_password_confirmation = $auth0_token_error$ && error_password_confirmation //endregion
23
+ let error_text:string
24
+ $: {
25
+ let error_text_a = []
26
+ if ($auth0_token_error$) {
27
+ for (let key in $auth0_token_error$) {
28
+ error_text_a.push($auth0_token_error$[key])
29
+ }
30
+ }
31
+ error_text = error_text_a.join('<br>') || ''
32
+ }
33
+ </script>
34
+
35
+ <div bind:this={root} class="form signup">
36
+ <Auth0_Dialog_Close></Auth0_Dialog_Close>
37
+ <h1><slot name="signup_text">Sign Up</slot></h1>
38
+ <form
39
+ action="https://{$AUTH0_DOMAIN$}/dbconnections/signup"
40
+ accept-charset="UTF-8"
41
+ method="post"
42
+ on:submit={event =>
43
+ _.onsubmit_signup(event, {
44
+ signup_email_input,
45
+ signup_password_input,
46
+ signup_password_confirmation_input
47
+ }, _.schedule_forms_clear(root))
48
+ }
49
+ >
50
+ {#if $auth0_token_error$}
51
+ <ul>
52
+ <li class="error {error_class}">
53
+ {error_text}
54
+ </li>
55
+ </ul>
56
+ {/if}
57
+ <fieldset>
58
+ <label class="field">
59
+ <div class={label_class}>Email</div>
60
+ <input
61
+ bind:this={signup_email_input}
62
+ placeholder="your@email.com"
63
+ required="required"
64
+ autocomplete="email"
65
+ class="form-control {input_class}"
66
+ class:invalid={error_username}
67
+ type="email"
68
+ id="email-signup"
69
+ name="email"/>
70
+ </label>
71
+ <label class="field">
72
+ <div class={label_class}>Password</div>
73
+ <input
74
+ bind:this={signup_password_input}
75
+ placeholder="**********"
76
+ required="required"
77
+ class={input_class}
78
+ class:invalid={error_password}
79
+ id="password-signup"
80
+ type="password"
81
+ name="password"/>
82
+ </label>
83
+ <label class="field">
84
+ <div class={label_class}>Confirm Password</div>
85
+ <input
86
+ bind:this={signup_password_confirmation_input}
87
+ placeholder="**********"
88
+ required="required"
89
+ class={input_class}
90
+ class:invalid={error_password_confirmation}
91
+ type="password"
92
+ name="password_confirmation"
93
+ id="password_confirmation-signup"/>
94
+ </label>
95
+ <slot name="tos__signup">
96
+ <p>
97
+ By clicking ‘Sign up’ you agree to the terms of this Website <br>
98
+ <a href="." target="_blank">Terms of Service</a>
99
+ and
100
+ <a href="." target="_blank">Privacy Policy</a>
101
+ </p>
102
+ </slot>
103
+ </fieldset>
104
+ <footer>
105
+ <input
106
+ type="submit"
107
+ value="Sign up"
108
+ class="button {button_class}"
109
+ />
110
+ <label
111
+ class="navigation__auth {label_class}"
112
+ on:click={open_auth0_login}
113
+ >Have an account? Log in&hellip;</label>
114
+ <label
115
+ class="navigation__auth {label_class}"
116
+ on:click={open_auth0_forgot_password}
117
+ >Forgot Password?</label>
118
+ </footer>
119
+ </form>
120
+ </div>
@@ -1,10 +1,11 @@
1
1
  import { onDestroy } from 'svelte';
2
+ import { auth0_body__b, auth0_opened_class$_b, auth0_token_error$_b, auth0_token_json$_b, clear_auth0_token_error_b, close_auth0_b, logout_auth0_token_error_b, open_auth0_forgot_password_check_email_b, open_auth0_login_b, password_realm_body__b, post_auth0_auth_change_password_b, post_auth0_dbconnections_signup_b, post_auth0_oauth_token_b, post_auth0_passwordless_start_b, validate_auth0_change_password, validate_auth0_forgot_password, validate_auth0_signup } from '@ctx-core/auth0';
2
3
  import { has_dom, dom_a_ } from '@ctx-core/dom';
4
+ import { noop } from '@ctx-core/function';
3
5
  import { subscribe } from '@ctx-core/store';
4
- import { auth0_body__b, auth0_opened_class$_b, auth0_token_error$_b, auth0_token_json$_b, clear_auth0_token_error_b, close_auth0_b, logout_auth0_token_error_b, open_auth0_forgot_password_check_email_b, open_auth0_login_b, password_realm_body__b, post_auth0_auth_change_password_b, post_auth0_dbconnections_signup_b, post_auth0_oauth_token_b, post_auth0_passwordless_start_b, validate_auth0_change_password, validate_auth0_forgot_password, validate_auth0_signup } from '@ctx-core/auth0';
5
6
  export class Auth0_c {
6
- constructor(ctx) {
7
- this.ctx = ctx;
7
+ constructor(ctx1){
8
+ this.ctx = ctx1;
8
9
  this.login_auth0_body_ = auth0_body__b(this.ctx, 'login_auth0_body_');
9
10
  this.login_password_realm_body_ = password_realm_body__b(this.ctx, 'login_password_realm_body_', this.login_auth0_body_);
10
11
  this.signup_auth0_body_ = auth0_body__b(this.ctx, 'signup_auth0_body_');
@@ -21,47 +22,50 @@ export class Auth0_c {
21
22
  this.post_auth0_oauth_token = post_auth0_oauth_token_b(this.ctx);
22
23
  this.post_auth0_auth_change_password = post_auth0_auth_change_password_b(this.ctx);
23
24
  this.post_auth0_passwordless_start = post_auth0_passwordless_start_b(this.ctx);
24
- this.onMount = async (root) => {
25
+ this.onMount = async (root)=>{
25
26
  if (has_dom) {
26
- const unsubscribe = subscribe(this.auth0_opened_class, () => this.schedule_forms_clear(root));
27
+ const unsubscribe = subscribe(this.auth0_opened_class, ()=>this.schedule_forms_clear(root)
28
+ );
27
29
  onDestroy(unsubscribe);
28
30
  }
29
31
  };
30
- this.login = async (data, schedule_forms_clear = () => { }) => {
32
+ this.login = async (data, schedule_forms_clear = ()=>{
33
+ })=>{
31
34
  const response = await this.post_auth0_oauth_token(this.login_password_realm_body_(data));
32
35
  if (response.ok) {
33
36
  const auth0_token_json = await response.text();
34
37
  this.auth0_token_json$.$ = auth0_token_json;
35
38
  schedule_forms_clear();
36
39
  this.close_auth0();
37
- }
38
- else {
40
+ } else {
39
41
  const $auth_token_error = await response.json();
40
42
  this.auth0_token_error.$ = $auth_token_error;
41
43
  this.logout_auth0_token_error($auth_token_error);
42
44
  }
43
45
  };
44
- this.signup = async (data, schedule_forms_clear = () => { }) => {
46
+ this.signup = async (data, schedule_forms_clear = ()=>{
47
+ })=>{
45
48
  const response = await this.post_auth0_dbconnections_signup(this.signup_password_realm_body_(data));
46
49
  const auth0_userinfo = await response.json();
47
- const { statusCode } = auth0_userinfo;
50
+ const { statusCode } = auth0_userinfo;
48
51
  if (statusCode) {
49
- const { code, description } = auth0_userinfo;
50
- const email = code === 'user_exists'
51
- ? 'This Email is already signed up'
52
- : description;
53
- const auth0_token_error = { email };
52
+ const { code , description } = auth0_userinfo;
53
+ const email = code === 'user_exists' ? 'This Email is already signed up' : description;
54
+ const auth0_token_error = {
55
+ email
56
+ };
54
57
  this.logout_auth0_token_error(auth0_token_error);
55
58
  return;
56
59
  }
57
60
  schedule_forms_clear();
58
61
  await this.login({
59
- username: data.email,
60
- password: data.password,
62
+ username: data.username,
63
+ password: data.password
61
64
  }, schedule_forms_clear);
62
65
  };
63
- this.change_password = async (form, schedule_forms_clear = () => { }) => {
64
- const { password } = form;
66
+ this.change_password = async (form, schedule_forms_clear = ()=>{
67
+ })=>{
68
+ const { password } = form;
65
69
  let error;
66
70
  try {
67
71
  const response = await this.post_auth0_auth_change_password(password);
@@ -69,43 +73,48 @@ export class Auth0_c {
69
73
  if (!response.ok) {
70
74
  if (response.status == 401) {
71
75
  this.open_auth0_login();
72
- const auth0_token_error = { email: 'Authentication Error - Log in' };
76
+ const auth0_token_error = {
77
+ username: 'Authentication Error - Log in'
78
+ };
73
79
  this.logout_auth0_token_error(auth0_token_error);
74
80
  return;
75
81
  }
76
82
  error = response_json.error || 'Error changing Password';
77
83
  }
78
- }
79
- catch (e) {
84
+ } catch (e) {
80
85
  console.warn(e);
81
86
  error = e.message;
82
87
  }
83
88
  if (error) {
84
- const auth0_token_error = { password: error };
89
+ const auth0_token_error = {
90
+ password: error
91
+ };
85
92
  this.logout_auth0_token_error(auth0_token_error);
86
93
  return;
87
94
  }
88
95
  schedule_forms_clear();
89
96
  this.close_auth0();
90
97
  };
91
- this.schedule_forms_clear_ = (root) => {
92
- return () => this.schedule_forms_clear(root);
98
+ this.schedule_forms_clear_ = (root)=>{
99
+ return ()=>this.schedule_forms_clear(root)
100
+ ;
93
101
  };
94
- this.schedule_forms_clear = (root) => {
95
- setTimeout(() => {
102
+ this.schedule_forms_clear = (root)=>{
103
+ setTimeout(()=>{
96
104
  this.clear_auth0_token_error();
97
105
  clear_inputs(dom_a_('input[type=text]', root));
98
106
  clear_inputs(dom_a_('input[type=password]', root));
99
107
  }, 100);
100
108
  };
101
- this.onsubmit_signup = async (event, ctx, schedule_forms_clear = () => { }) => {
109
+ this.onsubmit_signup = async (event, ctx, schedule_forms_clear = ()=>{
110
+ })=>{
102
111
  event.preventDefault();
103
- const { email_input, password_input, password_confirmation_input, } = ctx;
104
- const email = email_input.value;
112
+ const { email_input , password_input , password_confirmation_input , } = ctx;
113
+ const username = email_input.value;
105
114
  const password = password_input.value;
106
115
  const password_confirmation = password_confirmation_input.value;
107
116
  const auth0_token_error = validate_auth0_signup({
108
- email,
117
+ username,
109
118
  password,
110
119
  password_confirmation
111
120
  });
@@ -114,21 +123,25 @@ export class Auth0_c {
114
123
  return false;
115
124
  }
116
125
  await this.signup({
117
- email,
126
+ username,
118
127
  password
119
128
  }, schedule_forms_clear);
120
129
  return;
121
130
  };
122
- this.onsubmit_login = async (event, ctx, schedule_forms_clear = () => { }) => {
131
+ this.onsubmit_login = async (event, ctx, schedule_forms_clear = ()=>{
132
+ })=>{
123
133
  event.preventDefault();
124
- const { username_login_input, password_login_input } = ctx;
134
+ const { username_login_input , password_login_input } = ctx;
125
135
  const username = username_login_input.value;
126
136
  const password = password_login_input.value;
127
- await this.login({ username, password }, schedule_forms_clear);
137
+ await this.login({
138
+ username,
139
+ password
140
+ }, schedule_forms_clear);
128
141
  };
129
- this.onsubmit_forgot_password = async (event, ctx) => {
142
+ this.onsubmit_forgot_password = async (event, ctx)=>{
130
143
  event.preventDefault();
131
- const { email_input } = ctx;
144
+ const { email_input } = ctx;
132
145
  const email = email_input.value;
133
146
  const data = {
134
147
  connection: 'email',
@@ -143,9 +156,9 @@ export class Auth0_c {
143
156
  await this.post_auth0_passwordless_start(this.login_auth0_body_(data));
144
157
  this.open_auth0_forgot_password_check_email();
145
158
  };
146
- this.onsubmit_change_password = async (event, ctx, schedule_forms_clear = () => { }) => {
159
+ this.onsubmit_change_password = async (event, ctx, schedule_forms_clear = noop)=>{
147
160
  event.preventDefault();
148
- const { password_input, password_confirmation_input, } = ctx;
161
+ const { password_input , password_confirmation_input , } = ctx;
149
162
  const password = password_input.value;
150
163
  const password_confirmation = password_confirmation_input.value;
151
164
  const auth0_token_error = validate_auth0_change_password({
@@ -156,18 +169,21 @@ export class Auth0_c {
156
169
  this.logout_auth0_token_error(auth0_token_error);
157
170
  throw auth0_token_error;
158
171
  }
159
- return await this.change_password({ password }, schedule_forms_clear);
172
+ return await this.change_password({
173
+ password
174
+ }, schedule_forms_clear);
160
175
  };
161
- this.onclose = async (event) => {
176
+ this.onclose = async (event)=>{
162
177
  event.preventDefault();
163
178
  this.close_auth0();
164
179
  };
165
180
  }
166
181
  }
167
182
  function clear_inputs(inputs) {
168
- for (let i = 0; i < inputs.length; i++) {
183
+ for(let i = 0; i < inputs.length; i++){
169
184
  const input = inputs[i];
170
185
  input.value = '';
171
186
  }
172
187
  }
188
+
173
189
  //# sourceMappingURL=Auth0_c.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Auth0_c.js","sourceRoot":"","sources":["../../src/ui/Auth0_c.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EACN,aAAa,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,yBAAyB,EAC1G,aAAa,EAAE,0BAA0B,EAAE,wCAAwC,EAAE,kBAAkB,EACvG,sBAAsB,EAAE,iCAAiC,EAAE,iCAAiC,EAC5F,wBAAwB,EAAE,+BAA+B,EAAE,8BAA8B,EACzF,8BAA8B,EAAE,qBAAqB,EACrD,MAAM,iBAAiB,CAAA;AASxB,MAAM,OAAO,OAAO;IACnB,YAAsB,GAAgB;QAAhB,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EAAE,GAAgC,EAAE,oBAAoB,GAAG,GAAE,EAAE,GAAC,CAAC,EAC5E,EAAE;YACF,KAAK,CAAC,cAAc,EAAE,CAAA;YACtB,MAAM,EACL,cAAc,EACd,2BAA2B,GAC3B,GAAG,GAAG,CAAA;YACP,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAA;YACrC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC,KAAK,CAAA;YAC/D,MAAM,iBAAiB,GACtB,8BAA8B,CAC7B;gBACC,QAAQ;gBACR,qBAAqB;aACrB,CAAC,CAAA;YACJ,IAAI,iBAAiB,EAAE;gBACtB,IAAI,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,CAAA;gBAChD,MAAM,iBAAiB,CAAA;aACvB;YACD,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,oBAAoB,CAAC,CAAA;QACtE,CAAC,CAAA;QACQ,YAAO,GAAG,KAAK,EAAE,KAAgB,EAAC,EAAE;YAC5C,KAAK,CAAC,cAAc,EAAE,CAAA;YACtB,IAAI,CAAC,WAAW,EAAE,CAAA;QACnB,CAAC,CAAA;IAtMwC,CAAC;CAuM1C;AACD,SAAS,YAAY,CAAC,MAAe;IACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAqB,CAAA;QAC3C,KAAK,CAAC,KAAK,GAAG,EAAE,CAAA;KAChB;AACF,CAAC"}
1
+ {"version":3,"sources":["../../src/ui/Auth0_c.ts"],"sourcesContent":["import { onDestroy } from 'svelte'\nimport type {\n\tauth0_body__T, auth0_client_id_body_I, auth0_grant_type_body_I, login_data_I, logout_auth0_token_error_T,\n\topen_auth0_forgot_password_check_email_T, open_auth0_login_T, password_realm_body__T, password_realm_body_T,\n\tpost_auth0_auth_change_password_T, post_auth0_dbconnections_signup_T, post_auth0_oauth_token_body_I,\n\tpost_auth0_oauth_token_T, post_auth0_passwordless_start_body_T, post_auth0_passwordless_start_optional_body_T,\n\tpost_auth0_passwordless_start_T, signup_data_I\n} from '@ctx-core/auth0'\nimport {\n\tauth0_body__b, auth0_opened_class$_b, auth0_token_error$_b, auth0_token_json$_b, clear_auth0_token_error_b,\n\tclose_auth0_b, logout_auth0_token_error_b, open_auth0_forgot_password_check_email_b, open_auth0_login_b,\n\tpassword_realm_body__b, post_auth0_auth_change_password_b, post_auth0_dbconnections_signup_b,\n\tpost_auth0_oauth_token_b, post_auth0_passwordless_start_b, validate_auth0_change_password,\n\tvalidate_auth0_forgot_password, validate_auth0_signup\n} from '@ctx-core/auth0'\nimport { has_dom, dom_a_ } from '@ctx-core/dom'\nimport { noop } from '@ctx-core/function'\nimport { subscribe } from '@ctx-core/store'\nimport type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'\nexport class Auth0_c {\n\tconstructor(protected ctx:auth0_ui_Ctx) {}\n\treadonly login_auth0_body_ = auth0_body__b</*@formatter:off*/\n\t\tauth0_ui_Ctx,\n\t\t'login_auth0_body_',\n\t\tlogin_data_password_realm_body_I\n\t/*@formatter:on*/>(this.ctx, 'login_auth0_body_')\n\treadonly login_password_realm_body_ = password_realm_body__b</*@formatter:off*/\n\t\tauth0_ui_Ctx,\n\t\t'login_password_realm_body_',\n\t\tlogin_data_password_realm_body_I\n/*@formatter:on*/>(\n\t\tthis.ctx,\n\t\t'login_password_realm_body_',\n\t\tthis.login_auth0_body_\n\t)\n\treadonly signup_auth0_body_:auth0_body__T<signup_data_password_realm_body_I> = auth0_body__b</*@formatter:off*/\n\t\tauth0_ui_Ctx,\n\t\t'signup_auth0_body_',\n\t\tsignup_data_password_realm_body_I\n\t/*@formatter:on*/>(this.ctx, 'signup_auth0_body_')\n\treadonly signup_password_realm_body_:password_realm_body__T<signup_data_password_realm_body_I> = password_realm_body__b</*@formatter:off*/\n\t\tauth0_ui_Ctx,\n\t\t'signup_password_realm_body_fn',\n\t\tsignup_data_password_realm_body_I\n\t/*@formatter:on*/>(\n\t\tthis.ctx, 'signup_password_realm_body_fn', this.signup_auth0_body_\n\t)\n\treadonly auth0_opened_class = auth0_opened_class$_b(this.ctx)\n\treadonly auth0_token_json$ = auth0_token_json$_b(this.ctx)\n\treadonly auth0_token_error = auth0_token_error$_b(this.ctx)\n\treadonly clear_auth0_token_error = clear_auth0_token_error_b(this.ctx)\n\treadonly close_auth0 = close_auth0_b(this.ctx)\n\treadonly logout_auth0_token_error:logout_auth0_token_error_T = logout_auth0_token_error_b(this.ctx)\n\treadonly open_auth0_login:open_auth0_login_T = open_auth0_login_b(this.ctx)\n\treadonly open_auth0_forgot_password_check_email:open_auth0_forgot_password_check_email_T = open_auth0_forgot_password_check_email_b(this.ctx)\n\treadonly post_auth0_dbconnections_signup:post_auth0_dbconnections_signup_T = post_auth0_dbconnections_signup_b(this.ctx)\n\treadonly post_auth0_oauth_token:post_auth0_oauth_token_T = post_auth0_oauth_token_b(this.ctx)\n\treadonly post_auth0_auth_change_password:post_auth0_auth_change_password_T = post_auth0_auth_change_password_b(this.ctx)\n\treadonly post_auth0_passwordless_start:post_auth0_passwordless_start_T = post_auth0_passwordless_start_b(this.ctx)\n\treadonly onMount = async (root:HTMLElement)=>{\n\t\tif (has_dom) {\n\t\t\tconst unsubscribe =\n\t\t\t\tsubscribe(this.auth0_opened_class, ()=>this.schedule_forms_clear(root))\n\t\t\tonDestroy(unsubscribe)\n\t\t}\n\t}\n\treadonly login = async (data:login_data_I, schedule_forms_clear = ()=>{})=>{\n\t\tconst response = await this.post_auth0_oauth_token(\n\t\t\tthis.login_password_realm_body_(data)\n\t\t)\n\t\tif (response.ok) {\n\t\t\tconst auth0_token_json = await response.text()\n\t\t\tthis.auth0_token_json$.$ = auth0_token_json\n\t\t\tschedule_forms_clear()\n\t\t\tthis.close_auth0()\n\t\t} else {\n\t\t\tconst $auth_token_error = await response.json()\n\t\t\tthis.auth0_token_error.$ = $auth_token_error\n\t\t\tthis.logout_auth0_token_error($auth_token_error)\n\t\t}\n\t}\n\treadonly signup = async (data:signup_data_I, schedule_forms_clear = ()=>{})=>{\n\t\tconst response = await this.post_auth0_dbconnections_signup(this.signup_password_realm_body_(data))\n\t\tconst auth0_userinfo = await response.json()\n\t\tconst { statusCode } = auth0_userinfo\n\t\tif (statusCode) {\n\t\t\tconst {\n\t\t\t\tcode,\n\t\t\t\tdescription\n\t\t\t} = auth0_userinfo\n\t\t\tconst email =\n\t\t\t\tcode === 'user_exists'\n\t\t\t\t? 'This Email is already signed up'\n\t\t\t\t: description\n\t\t\tconst auth0_token_error = { email }\n\t\t\tthis.logout_auth0_token_error(auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tschedule_forms_clear()\n\t\tawait this.login({\n\t\t\tusername: data.username,\n\t\t\tpassword: data.password,\n\t\t}, schedule_forms_clear)\n\t}\n\treadonly change_password = async (form:{ password:string }, schedule_forms_clear = ()=>{})=>{\n\t\tconst { password } = form\n\t\tlet error\n\t\ttry {\n\t\t\tconst response = await this.post_auth0_auth_change_password(password)\n\t\t\tconst response_json = await response.json()\n\t\t\tif (!response.ok) {\n\t\t\t\tif (response.status == 401) {\n\t\t\t\t\tthis.open_auth0_login()\n\t\t\t\t\tconst auth0_token_error = { username: 'Authentication Error - Log in' }\n\t\t\t\t\tthis.logout_auth0_token_error(auth0_token_error)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\terror = response_json.error || 'Error changing Password'\n\t\t\t}\n\t\t} catch (e:any) {\n\t\t\tconsole.warn(e)\n\t\t\terror = e.message\n\t\t}\n\t\tif (error) {\n\t\t\tconst auth0_token_error = { password: error }\n\t\t\tthis.logout_auth0_token_error(auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tschedule_forms_clear()\n\t\tthis.close_auth0()\n\t}\n\treadonly schedule_forms_clear_:(root:HTMLElement)=>void = (root:HTMLElement)=>{\n\t\treturn ()=>this.schedule_forms_clear(root)\n\t}\n\treadonly schedule_forms_clear = (root:HTMLElement)=>{\n\t\tsetTimeout(()=>{\n\t\t\tthis.clear_auth0_token_error()\n\t\t\tclear_inputs(dom_a_('input[type=text]', root))\n\t\t\tclear_inputs(dom_a_('input[type=password]', root))\n\t\t}, 100)\n\t}\n\treadonly onsubmit_signup = async (event:Event, ctx:onsubmit_signup_Ctx, schedule_forms_clear = ()=>{})=>{\n\t\tevent.preventDefault()\n\t\tconst {\n\t\t\temail_input,\n\t\t\tpassword_input,\n\t\t\tpassword_confirmation_input,\n\t\t} = ctx\n\t\tconst username = email_input.value\n\t\tconst password = password_input.value\n\t\tconst password_confirmation = password_confirmation_input.value\n\t\tconst auth0_token_error =\n\t\t\tvalidate_auth0_signup({\n\t\t\t\tusername,\n\t\t\t\tpassword,\n\t\t\t\tpassword_confirmation\n\t\t\t})\n\t\tif (auth0_token_error) {\n\t\t\tthis.logout_auth0_token_error(auth0_token_error)\n\t\t\treturn false\n\t\t}\n\t\tawait this.signup({\n\t\t\tusername,\n\t\t\tpassword\n\t\t}, schedule_forms_clear)\n\t\treturn\n\t}\n\treadonly onsubmit_login = async (event:Event, ctx:onsubmit_login_Ctx, schedule_forms_clear = ()=>{})=>{\n\t\tevent.preventDefault()\n\t\tconst { username_login_input, password_login_input } = ctx\n\t\tconst username = username_login_input.value\n\t\tconst password = password_login_input.value\n\t\tawait this.login({ username, password }, schedule_forms_clear)\n\t}\n\treadonly onsubmit_forgot_password = async (event:Event, ctx:onsubmit_forgot_password_Ctx)=>{\n\t\tevent.preventDefault()\n\t\tconst { email_input } = ctx\n\t\tconst email = email_input.value\n\t\tconst data:post_auth0_passwordless_start_optional_body_T = {\n\t\t\tconnection: 'email',\n\t\t\tsend: 'link',\n\t\t\temail\n\t\t}\n\t\tconst auth0_token_error = validate_auth0_forgot_password(data)\n\t\tif (auth0_token_error) {\n\t\t\tthis.logout_auth0_token_error(auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tawait this.post_auth0_passwordless_start(\n\t\t\tthis.login_auth0_body_(data) as post_auth0_passwordless_start_body_T\n\t\t)\n\t\tthis.open_auth0_forgot_password_check_email()\n\t}\n\treadonly onsubmit_change_password = async (\n\t\tevent:Event, ctx:onsubmit_change_password_Ctx, schedule_forms_clear = noop\n\t)=>{\n\t\tevent.preventDefault()\n\t\tconst {\n\t\t\tpassword_input,\n\t\t\tpassword_confirmation_input,\n\t\t} = ctx\n\t\tconst password = password_input.value\n\t\tconst password_confirmation = password_confirmation_input.value\n\t\tconst auth0_token_error =\n\t\t\tvalidate_auth0_change_password(\n\t\t\t\t{\n\t\t\t\t\tpassword,\n\t\t\t\t\tpassword_confirmation\n\t\t\t\t})\n\t\tif (auth0_token_error) {\n\t\t\tthis.logout_auth0_token_error(auth0_token_error)\n\t\t\tthrow auth0_token_error\n\t\t}\n\t\treturn await this.change_password({ password }, schedule_forms_clear)\n\t}\n\treadonly onclose = async (event:MouseEvent)=>{\n\t\tevent.preventDefault()\n\t\tthis.close_auth0()\n\t}\n}\nfunction clear_inputs(inputs:NodeList) {\n\tfor (let i = 0; i < inputs.length; i++) {\n\t\tconst input = inputs[i] as HTMLInputElement\n\t\tinput.value = ''\n\t}\n}\nexport interface signup_data_password_realm_body_I\n\textends signup_data_I,\n\t\tauth0_client_id_body_I,\n\t\tpost_auth0_passwordless_start_body_T,\n\t\tpassword_realm_body_T,\n\t\tauth0_grant_type_body_I,\n\t\tpost_auth0_oauth_token_body_I {}\nexport interface login_data_password_realm_body_I\n\textends login_data_I,\n\t\tauth0_client_id_body_I,\n\t\tpost_auth0_passwordless_start_body_T,\n\t\tpassword_realm_body_T,\n\t\tauth0_grant_type_body_I,\n\t\tpost_auth0_oauth_token_body_I {}\nexport interface onsubmit_change_password_Ctx {\n\tpassword_input:HTMLInputElement\n\tpassword_confirmation_input:HTMLInputElement\n}\nexport interface onsubmit_forgot_password_Ctx {\n\temail_input:HTMLInputElement\n}\nexport interface onsubmit_login_Ctx {\n\tusername_login_input:HTMLInputElement\n\tpassword_login_input:HTMLInputElement\n}\nexport interface onsubmit_signup_Ctx {\n\temail_input:HTMLInputElement\n\tpassword_input:HTMLInputElement\n\tpassword_confirmation_input:HTMLInputElement\n}\n"],"names":["onDestroy","auth0_body__b","auth0_opened_class$_b","auth0_token_error$_b","auth0_token_json$_b","clear_auth0_token_error_b","close_auth0_b","logout_auth0_token_error_b","open_auth0_forgot_password_check_email_b","open_auth0_login_b","password_realm_body__b","post_auth0_auth_change_password_b","post_auth0_dbconnections_signup_b","post_auth0_oauth_token_b","post_auth0_passwordless_start_b","validate_auth0_change_password","validate_auth0_forgot_password","validate_auth0_signup","has_dom","dom_a_","noop","subscribe","Auth0_c","login_auth0_body_","ctx","login_password_realm_body_","signup_auth0_body_","signup_password_realm_body_","auth0_opened_class","auth0_token_json$","auth0_token_error","clear_auth0_token_error","close_auth0","logout_auth0_token_error","open_auth0_login","open_auth0_forgot_password_check_email","post_auth0_dbconnections_signup","post_auth0_oauth_token","post_auth0_auth_change_password","post_auth0_passwordless_start","onMount","root","unsubscribe","schedule_forms_clear","login","data","response","ok","auth0_token_json","text","$","$auth_token_error","json","signup","auth0_userinfo","statusCode","code","description","email","username","password","change_password","form","error","response_json","status","e","console","warn","message","schedule_forms_clear_","setTimeout","clear_inputs","onsubmit_signup","event","preventDefault","email_input","password_input","password_confirmation_input","value","password_confirmation","onsubmit_login","username_login_input","password_login_input","onsubmit_forgot_password","connection","send","onsubmit_change_password","onclose","inputs","i","length","input"],"mappings":"AAAA,MAAM,GAAGA,SAAS,QAAQ,CAAQ;AAQlC,MAAM,GACLC,aAAa,EAAEC,qBAAqB,EAAEC,oBAAoB,EAAEC,mBAAmB,EAAEC,yBAAyB,EAC1GC,aAAa,EAAEC,0BAA0B,EAAEC,wCAAwC,EAAEC,kBAAkB,EACvGC,sBAAsB,EAAEC,iCAAiC,EAAEC,iCAAiC,EAC5FC,wBAAwB,EAAEC,+BAA+B,EAAEC,8BAA8B,EACzFC,8BAA8B,EAAEC,qBAAqB,QAC/C,CAAiB;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AE,GAAG,CAACC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,MAAM,CAACE,MAAM,EAAED,CAAC,GAAI,CAAC;QACxC,KAAK,CAACE,KAAK,GAAGH,MAAM,CAACC,CAAC;QACtBE,KAAK,CAACb,KAAK,GAAG,CAAE;IACjB,CAAC;AACF,CAAC"}
package/dist/ui/index.js CHANGED
@@ -1,10 +1,19 @@
1
1
  import 'svelte';
2
- export * as Auth0 from './Auth0.svelte';
3
- export * as Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte';
4
- export * as Auth0_Change_Password_Form from './Auth0_Change_Password_Form.svelte';
5
- export * as Auth0_Forgot_Password_Check_Email_Form from './Auth0_Forgot_Password_Check_Email_Form.svelte';
6
- export * as Auth0_Forgot_Password_Form from './Auth0_Forgot_Password_Form.svelte';
7
- export * as Auth0_Login_Form from './Auth0_Login_Form.svelte';
8
- export * as Auth0_Signup_Form from './Auth0_Signup_Form.svelte';
9
- export * as Auth0_Loggedin_If from './Auth0_Loggedin_If.svelte';
2
+ import * as _Auth0 from './Auth0.svelte';
3
+ import * as _Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte';
4
+ import * as _Auth0_Change_Password_Form from './Auth0_Change_Password_Form.svelte';
5
+ import * as _Auth0_Forgot_Password_Check_Email_Form from './Auth0_Forgot_Password_Check_Email_Form.svelte';
6
+ import * as _Auth0_Forgot_Password_Form from './Auth0_Forgot_Password_Form.svelte';
7
+ import * as _Auth0_Login_Form from './Auth0_Login_Form.svelte';
8
+ import * as _Auth0_Signup_Form from './Auth0_Signup_Form.svelte';
9
+ import * as _Auth0_Loggedin_If from './Auth0_Loggedin_If.svelte';
10
+ export { _Auth0 as Auth0 };
11
+ export { _Auth0_Dialog_Close as Auth0_Dialog_Close };
12
+ export { _Auth0_Change_Password_Form as Auth0_Change_Password_Form };
13
+ export { _Auth0_Forgot_Password_Check_Email_Form as Auth0_Forgot_Password_Check_Email_Form };
14
+ export { _Auth0_Forgot_Password_Form as Auth0_Forgot_Password_Form };
15
+ export { _Auth0_Login_Form as Auth0_Login_Form };
16
+ export { _Auth0_Signup_Form as Auth0_Signup_Form };
17
+ export { _Auth0_Loggedin_If as Auth0_Loggedin_If };
18
+
10
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,CAAA;AACf,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AACvC,OAAO,KAAK,kBAAkB,MAAM,6BAA6B,CAAA;AACjE,OAAO,KAAK,0BAA0B,MAAM,qCAAqC,CAAA;AACjF,OAAO,KAAK,sCAAsC,MAAM,iDAAiD,CAAA;AACzG,OAAO,KAAK,0BAA0B,MAAM,qCAAqC,CAAA;AACjF,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,iBAAiB,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,iBAAiB,MAAM,4BAA4B,CAAA"}
1
+ {"version":3,"sources":["../../src/ui/index.ts"],"sourcesContent":["import 'svelte'\nexport * as Auth0 from './Auth0.svelte'\nexport * as Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'\nexport * as Auth0_Change_Password_Form from './Auth0_Change_Password_Form.svelte'\nexport * as Auth0_Forgot_Password_Check_Email_Form from './Auth0_Forgot_Password_Check_Email_Form.svelte'\nexport * as Auth0_Forgot_Password_Form from './Auth0_Forgot_Password_Form.svelte'\nexport * as Auth0_Login_Form from './Auth0_Login_Form.svelte'\nexport * as Auth0_Signup_Form from './Auth0_Signup_Form.svelte'\nexport * as Auth0_Loggedin_If from './Auth0_Loggedin_If.svelte'\n"],"names":["Auth0","Auth0_Dialog_Close","Auth0_Change_Password_Form","Auth0_Forgot_Password_Check_Email_Form","Auth0_Forgot_Password_Form","Auth0_Login_Form","Auth0_Signup_Form","Auth0_Loggedin_If"],"mappings":"AAAA,MAAM,CAAC,CAAQ;YACHA,MAAK,MAAM,CAAgB;YAC3BC,mBAAkB,MAAM,CAA6B;YACrDC,2BAA0B,MAAM,CAAqC;YACrEC,uCAAsC,MAAM,CAAiD;YAC7FC,2BAA0B,MAAM,CAAqC;YACrEC,iBAAgB,MAAM,CAA2B;YACjDC,kBAAiB,MAAM,CAA4B;YACnDC,kBAAiB,MAAM,CAA4B;SAPnDP,MAAK,IAALA,KAAK;SACLC,mBAAkB,IAAlBA,kBAAkB;SAClBC,2BAA0B,IAA1BA,0BAA0B;SAC1BC,uCAAsC,IAAtCA,sCAAsC;SACtCC,2BAA0B,IAA1BA,0BAA0B;SAC1BC,iBAAgB,IAAhBA,gBAAgB;SAChBC,kBAAiB,IAAjBA,iBAAiB;SACjBC,kBAAiB,IAAjBA,iBAAiB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/auth0-ui",
3
- "version": "10.0.122",
3
+ "version": "11.0.3",
4
4
  "description": "ctx-core auth0 ui component & express endpoints",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -17,9 +17,9 @@
17
17
  "license": "Apache-2.0",
18
18
  "author": "Brian Takita",
19
19
  "type": "module",
20
- "main": "./dist/index.cjs",
20
+ "main": "./dist/index.js",
21
21
  "module": "./dist/index.js",
22
- "types": "./dist/index.d.ts",
22
+ "types": "./src/index.ts",
23
23
  "exports": {
24
24
  ".": {
25
25
  "require": "./dist/index.cjs",
@@ -27,26 +27,31 @@
27
27
  },
28
28
  "./package.json": "./package.json"
29
29
  },
30
- "browser": "./dist/index.browser.js",
31
30
  "dependencies": {
32
- "@ctx-core/auth0": "^25.0.102",
33
- "@ctx-core/auth0-management": "^6.0.100",
34
- "@ctx-core/dialog": "^15.0.77",
35
- "@ctx-core/dom": "^11.0.29",
36
- "@ctx-core/error": "^11.0.17",
37
- "@ctx-core/fetch": "^11.0.79",
38
- "@ctx-core/jwt": "^10.0.26",
39
- "@ctx-core/object": "^21.0.21",
40
- "@ctx-core/store": "^27.0.35",
41
- "esm": "^3.2.25",
31
+ "@ctx-core/auth0": "^26.0.0",
32
+ "@ctx-core/auth0-management": "^6.0.102",
33
+ "@ctx-core/dialog": "^15.0.78",
34
+ "@ctx-core/dom": "^11.0.30",
35
+ "@ctx-core/error": "^11.0.18",
36
+ "@ctx-core/fetch": "^11.0.80",
37
+ "@ctx-core/function": "^20.2.3",
38
+ "@ctx-core/http": "^9.0.0",
39
+ "@ctx-core/jwt": "^10.0.28",
40
+ "@ctx-core/logger": "^9.0.19",
41
+ "@ctx-core/object": "^21.0.22",
42
+ "@ctx-core/store": "^27.0.36",
43
+ "auth0-js": "^9.18.0",
42
44
  "jsonwebtoken": "^8.5.1",
43
- "svelte": "3.44.1"
45
+ "polka": "^0.5.2"
44
46
  },
45
47
  "devDependencies": {
46
48
  "@ctx-core/ctx-core-package-tools": "^8.0.77",
47
- "@ctx-core/dev-tools": "^7.1.4",
48
- "@ctx-core/function": "^20.2.2",
49
+ "@ctx-core/dev-tools": "^7.2.0",
50
+ "@swc/cli": "^0.1.51",
51
+ "@swc/core": "^1.2.107",
49
52
  "@types/jsonwebtoken": "^8.5.5",
53
+ "@types/polka": "^0.5.3",
54
+ "svelte": "3.44.1",
50
55
  "typescript": "^4.4.4"
51
56
  },
52
57
  "publishConfig": {
@@ -54,12 +59,10 @@
54
59
  "cache": "~/.npm"
55
60
  },
56
61
  "scripts": {
57
- "build": "npm run clean && npm run copy-mjs && npm run generate_ctx_I_file && npm run copy-components && npm run compile",
58
- "clean": "rm -f tsconfig.tsbuildinfo && rm -f src/**/*.js && rm -f src/**/*.d.ts && rm -f src/**/*.map",
59
- "compile": "./node_modules/.bin/tsc -b .",
60
- "copy-mjs": "cd dist && echo \"module.exports = (async () => import('./index.js'))()\" > index.cjs",
61
- "copy-components": "cd src && find . | grep \\.svelte$ | awk '{print \"mkdir -p dirname \"$1\" && cp -f \"$1\" ../dist/\"$1}'",
62
+ "build": "npm run generate_ctx_I_file && npm run compile",
63
+ "clean": "rm -rf dist",
64
+ "compile": "swc src --out-dir dist --copy-files --source-maps --config-file .swcrc",
62
65
  "exec": "$@",
63
- "generate_ctx_I_file": "./node_modules/.bin/generate_ctx_I_file"
66
+ "generate_ctx_I_file": "swc $(./node_modules/.bin/generate_ctx_I_file | tail -n1) --out-dir dist --source-maps --config-file .swcrc"
64
67
  }
65
68
  }
@@ -1,17 +1,7 @@
1
1
  /*
2
2
  * This file was generated by `npm run generate_ctx_I_file` in @ctx-core/dev-tools
3
3
  */
4
- import type { jwks_cert__T } from './node/jwks_cert__b.js'
5
- import type { jwks_x5c__T } from './node/jwks_x5c__b.js'
6
- import type { jwt_token_decoded__T } from './node/jwt_token_decoded__b.js'
7
- import type { koa_jwt_token_decoded__T } from './node/koa_jwt_token_decoded__b.js'
8
- import type { verify_jwt_email__T } from './node/verify_jwt_email__b.js'
9
- import type { verify_jwt_user_id__T } from './node/verify_jwt_user_id__b.js'
4
+
10
5
  export interface auth0_ui_ctx_I {
11
- jwks_cert_?:jwks_cert__T
12
- jwks_x5c_?:jwks_x5c__T
13
- jwt_token_decoded_?:jwt_token_decoded__T
14
- koa_jwt_token_decoded_?:koa_jwt_token_decoded__T
15
- verify_jwt_email_?:verify_jwt_email__T
16
- verify_jwt_user_id_?:verify_jwt_user_id__T
6
+
17
7
  }
@@ -4,17 +4,16 @@ import {
4
4
  auth0_forgot_password_opened$_b, auth0_opened_class$_b, auth0_login_opened$_b, auth0_signup_opened$_b,
5
5
  auth0_forgot_password_check_email_opened$_b, auth0_change_password_opened$_b
6
6
  } from '@ctx-core/auth0'
7
- import { auth0_ui_ctx_key } from '../auth0_ui_ctx_key.js'
8
7
  import type { auth0_ui_Ctx } from '../auth0_ui_Ctx.js'
8
+ import { auth0_ui_ctx_key } from '../auth0_ui_ctx_key.js'
9
9
  import { Auth0_c } from './Auth0_c.js'
10
10
  import Auth0_Dialog_Close from './Auth0_Dialog_Close.svelte'
11
- import Auth0_Login_Form from './Auth0_Login_Form.svelte'
12
- import Auth0_Signup_Form from './Auth0_Signup_Form.svelte'
13
- import Auth0_Forgot_Password_Form from './Auth0_Forgot_Password_Form.svelte'
14
11
  import Auth0_Forgot_Password_Check_Email_Form from './Auth0_Forgot_Password_Check_Email_Form.svelte'
15
12
  import Auth0_Change_Password_Form from './Auth0_Change_Password_Form.svelte'
16
- export let ctx = {} as auth0_ui_Ctx
17
- export let dialog = false
13
+ import Auth0_Forgot_Password_Form from './Auth0_Forgot_Password_Form.svelte'
14
+ import Auth0_Login_Form from './Auth0_Login_Form.svelte'
15
+ import Auth0_Signup_Form from './Auth0_Signup_Form.svelte'
16
+ export let ctx = {} as auth0_ui_Ctx, dialog = false
18
17
  setContext(auth0_ui_ctx_key, ctx)
19
18
  const auth0_change_password_opened$ = auth0_change_password_opened$_b(ctx)
20
19
  const auth0_opened_class$ = auth0_opened_class$_b(ctx)