snice 2.1.1 → 2.1.2

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.
@@ -162,7 +162,6 @@ export class SniceLogin extends HTMLElement implements SniceLoginElement {
162
162
 
163
163
  @on('click', 'snice-button')
164
164
  async handleButtonClick(event: Event) {
165
- console.log('Button clicked'); // Debug
166
165
  event.preventDefault();
167
166
  // Trigger form submit
168
167
  if (this.form) {
@@ -173,15 +172,12 @@ export class SniceLogin extends HTMLElement implements SniceLoginElement {
173
172
  @on('submit', '.login__form')
174
173
  @dispatch('@snice/login-attempt', { bubbles: true, composed: true })
175
174
  async handleSubmit(event: Event) {
176
- console.log('Submit handler called'); // Debug
177
175
  event.preventDefault();
178
176
 
179
177
  if (this.loading || this.disabled) {
180
- console.log('Submit blocked - loading or disabled'); // Debug
181
178
  return;
182
179
  }
183
180
 
184
- console.log('Clearing error and setting loading...'); // Debug
185
181
  this.clearAlert();
186
182
  this.loading = true;
187
183
  this.updateLoadingState();
@@ -191,10 +187,8 @@ export class SniceLogin extends HTMLElement implements SniceLoginElement {
191
187
 
192
188
  try {
193
189
  const credentials = this.getFormData();
194
- console.log('Final credentials for login:', credentials); // Debug log
195
190
 
196
191
  if (!credentials.username || !credentials.password) {
197
- console.log('Missing credentials detected'); // Debug
198
192
  this.showAlert('Username and password are required', 'error');
199
193
  return;
200
194
  }
@@ -210,7 +204,6 @@ export class SniceLogin extends HTMLElement implements SniceLoginElement {
210
204
  }
211
205
  } catch (error) {
212
206
  const errorMessage = error instanceof Error ? error.message : 'Login failed';
213
- console.log('Login error:', errorMessage); // Debug
214
207
  this.showAlert(errorMessage, 'error');
215
208
  this.dispatchLoginError(errorMessage);
216
209
  } finally {
@@ -243,11 +236,7 @@ export class SniceLogin extends HTMLElement implements SniceLoginElement {
243
236
 
244
237
  @dispatch('@snice/login-success', { bubbles: true, composed: true })
245
238
  private dispatchLoginSuccess(result: LoginResult) {
246
- return {
247
- user: result.user,
248
- token: result.token,
249
- timestamp: new Date().toISOString()
250
- };
239
+ return { timestamp: new Date().toISOString() };
251
240
  }
252
241
 
253
242
  @dispatch('@snice/login-error', { bubbles: true, composed: true })
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * snice v2.1.0
2
+ * snice v2.1.1
3
3
  * Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.
4
4
  * (c) 2024
5
5
  * Released under the MIT License.
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * snice v2.1.0
2
+ * snice v2.1.1
3
3
  * Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.
4
4
  * (c) 2024
5
5
  * Released under the MIT License.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * snice v2.1.0
2
+ * snice v2.1.1
3
3
  * Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.
4
4
  * (c) 2024
5
5
  * Released under the MIT License.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * snice v2.1.0
2
+ * snice v2.1.1
3
3
  * Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.
4
4
  * (c) 2024
5
5
  * Released under the MIT License.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * snice v2.1.0
2
+ * snice v2.1.1
3
3
  * Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.
4
4
  * (c) 2024
5
5
  * Released under the MIT License.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * snice v2.1.0
2
+ * snice v2.1.1
3
3
  * Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.
4
4
  * (c) 2024
5
5
  * Released under the MIT License.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * snice v2.1.0
2
+ * snice v2.1.1
3
3
  * Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.
4
4
  * (c) 2024
5
5
  * Released under the MIT License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snice",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "type": "module",
5
5
  "description": "Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.",
6
6
  "main": "dist/index.cjs",