@authhero/widget 0.4.1 → 0.5.0

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 (39) hide show
  1. package/README.md +21 -1
  2. package/dist/authhero-widget/authhero-widget.esm.js +1 -1
  3. package/dist/authhero-widget/index.esm.js +1 -1
  4. package/dist/authhero-widget/p-7989dabd.entry.js +1 -0
  5. package/dist/authhero-widget/{p-Doiemx6o.js → p-bMtPc5Dm.js} +1 -1
  6. package/dist/authhero-widget/p-fa60ab6e.entry.js +1 -0
  7. package/dist/cjs/authhero-node.cjs.entry.js +97 -9
  8. package/dist/cjs/authhero-widget.cjs.entry.js +82 -18
  9. package/dist/cjs/authhero-widget.cjs.js +2 -2
  10. package/dist/cjs/{index-D0xitTOL.js → index-Db4bZu99.js} +28 -3
  11. package/dist/cjs/index.cjs.js +1 -1
  12. package/dist/cjs/loader.cjs.js +2 -2
  13. package/dist/collection/components/authhero-node/authhero-node.css +237 -94
  14. package/dist/collection/components/authhero-node/authhero-node.js +101 -8
  15. package/dist/collection/components/authhero-widget/authhero-widget.css +128 -70
  16. package/dist/collection/components/authhero-widget/authhero-widget.js +30 -5
  17. package/dist/collection/utils/branding.js +52 -13
  18. package/dist/components/authhero-node.js +1 -1
  19. package/dist/components/authhero-widget.js +1 -1
  20. package/dist/components/index.js +1 -1
  21. package/dist/components/p-pupmqprs.js +1 -0
  22. package/dist/components/p-uIy4ySa4.js +1 -0
  23. package/dist/esm/authhero-node.entry.js +97 -9
  24. package/dist/esm/authhero-widget.entry.js +82 -18
  25. package/dist/esm/authhero-widget.js +3 -3
  26. package/dist/esm/{index-Doiemx6o.js → index-bMtPc5Dm.js} +28 -3
  27. package/dist/esm/index.js +1 -1
  28. package/dist/esm/loader.js +3 -3
  29. package/dist/types/components/authhero-node/authhero-node.d.ts +14 -1
  30. package/dist/types/components/authhero-widget/authhero-widget.d.ts +8 -0
  31. package/hydrate/index.js +207 -29
  32. package/hydrate/index.mjs +207 -29
  33. package/package.json +9 -3
  34. package/dist/authhero-widget/p-2e93c814.entry.js +0 -1
  35. package/dist/authhero-widget/p-539fc666.entry.js +0 -1
  36. package/dist/collection/server/index.js +0 -453
  37. package/dist/components/p-086EZrPM.js +0 -1
  38. package/dist/components/p-DS6y_iDJ.js +0 -1
  39. package/dist/types/server/index.d.ts +0 -85
package/README.md CHANGED
@@ -284,9 +284,12 @@ See [`packages/authhero/FLOWS.md`](../authhero/FLOWS.md) for detailed integratio
284
284
  # Install dependencies
285
285
  pnpm install
286
286
 
287
- # Start development server
287
+ # Start development server (runs Stencil build + demo server)
288
288
  pnpm dev
289
289
 
290
+ # Run demo server only (requires built widget)
291
+ pnpm demo
292
+
290
293
  # Build for production
291
294
  pnpm build
292
295
 
@@ -294,6 +297,23 @@ pnpm build
294
297
  pnpm test
295
298
  ```
296
299
 
300
+ ### Demo Server
301
+
302
+ The widget includes a demo server at `demo-server/server.ts` that provides:
303
+
304
+ - **Live Settings Panel**: Test all theme and branding options in real-time
305
+ - **Mock Authentication Flow**: Test identifier → code entry → success screens
306
+ - **Server-Driven UI**: Demonstrates how the widget integrates with a backend
307
+
308
+ When you run `pnpm dev`, the demo is available at:
309
+ - Path-based: http://localhost:3456/u2/login/identifier
310
+ - Query-based: http://localhost:3456/u2/login?screen=identifier
311
+
312
+ The demo server provides:
313
+ - `GET /u2/screen/:screenId` - Returns screen configuration
314
+ - `POST /u2/screen/:screenId` - Processes form submissions and returns next screen
315
+ - Settings panel to customize theme, branding, and widget options
316
+
297
317
  ## License
298
318
 
299
319
  MIT
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-Doiemx6o.js";export{s as setNonce}from"./p-Doiemx6o.js";import{g as t}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((async e=>(await t(),a([["p-2e93c814",[[513,"authhero-node",{component:[16],value:[1],disabled:[4]}]]],["p-539fc666",[[513,"authhero-widget",{screen:[1],apiUrl:[1,"api-url"],branding:[1],theme:[1],loading:[1028],autoSubmit:[4,"auto-submit"],_screen:[32],_branding:[32],_theme:[32],formData:[32]},null,{screen:[{watchScreen:0}],branding:[{watchBranding:0}],theme:[{watchTheme:0}]}]]]],e))));
1
+ import{p as e,b as a}from"./p-bMtPc5Dm.js";export{s as setNonce}from"./p-bMtPc5Dm.js";import{g as t}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((async e=>(await t(),a([["p-7989dabd",[[513,"authhero-node",{component:[16],value:[1],disabled:[4],passwordVisible:[32]}]]],["p-fa60ab6e",[[513,"authhero-widget",{screen:[1],apiUrl:[1,"api-url"],branding:[1],theme:[1],loading:[1028],autoSubmit:[4,"auto-submit"],_screen:[32],_branding:[32],_theme:[32],formData:[32]},null,{screen:[{watchScreen:0}],branding:[{watchBranding:0}],theme:[{watchTheme:0}]}]]]],e))));