fansunited-widgets-cdn 0.0.85 → 0.0.86-RC2

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 (75) hide show
  1. package/chunks/Alert-CuOsmojH.js +149 -0
  2. package/chunks/AspectRatio-D3Sgxj7p.js +125 -0
  3. package/chunks/Avatar-BTsEKfhc.js +186 -0
  4. package/chunks/Button-BV7YIFkS.js +858 -0
  5. package/chunks/Card-DRIT0wtY.js +129 -0
  6. package/chunks/CardContent-CD-WZh1l.js +60 -0
  7. package/chunks/ChevronRight-BrCKlr3T.js +11 -0
  8. package/chunks/Chip-6HLNTHMI.js +281 -0
  9. package/chunks/ClassicQuizWrapper-t04e9_6c.js +4883 -0
  10. package/chunks/CollectLeadForm-DtmR2Vuf-B_3JkHJC.js +1560 -0
  11. package/chunks/CollectLeadWrapper-CVAVswua.js +1294 -0
  12. package/chunks/DialogActions-C5kAgHal.js +45 -0
  13. package/chunks/DialogContent-MIXff4nd.js +60 -0
  14. package/chunks/EitherOrById-CAo8gPjm.js +1496 -0
  15. package/chunks/EitherOrPreviewWrapper-DFi2bviS.js +47 -0
  16. package/chunks/Error-DhQL89pn-BwTV1meb.js +418 -0
  17. package/chunks/EventGameWrapper-BxyLL3eA.js +7633 -0
  18. package/chunks/Grid-Dpv_ZL23.js +279 -0
  19. package/chunks/IconButton-Lt9Xks7c.js +207 -0
  20. package/chunks/Link-DLuj1USf.js +228 -0
  21. package/chunks/List-DLPlZGTP.js +397 -0
  22. package/chunks/ListItemDecorator-CE2eQLip.js +1882 -0
  23. package/chunks/MatchPredictionContainer-Ct6gXvLw.js +751 -0
  24. package/chunks/MatchQuizWrapper-Fu6RfWVn.js +11046 -0
  25. package/chunks/ModalDialog-Ci3hulZA.js +619 -0
  26. package/chunks/NotFoundSkeleton-BYJTzYJR-Be3R34nS.js +2764 -0
  27. package/chunks/OverlayLeadAfterCollection-DnqztPJ5-CpELr0AC.js +896 -0
  28. package/chunks/OverlayScoreStateSkeleton-C9FUhcnd-DMFELrvA.js +146 -0
  29. package/chunks/PersonalityQuizWrapper-MpUK4n3Y.js +34374 -0
  30. package/chunks/PlayerOfTheMatch-D4vuR7pz.js +1406 -0
  31. package/chunks/PollWrapper-CzKj8xxE.js +4198 -0
  32. package/chunks/Portal-BWqqFvVm-TuHZWjxn.js +12717 -0
  33. package/chunks/Portal-DA1mxzSo.js +41 -0
  34. package/chunks/PreviewQuizById-WWS_LyJR.js +4864 -0
  35. package/chunks/Select-p_cHpLhi.js +3418 -0
  36. package/chunks/Sheet-BaCzogZK.js +167 -0
  37. package/chunks/Snackbar-DHxnbCA3.js +358 -0
  38. package/chunks/Stack-Dgf2LXN0.js +117 -0
  39. package/chunks/Tabs-CSu_cWNi.js +784 -0
  40. package/chunks/TeamNextMatchPrediction-C7HilNqW.js +6 -0
  41. package/chunks/Tutorial-DFNZxmAx.js +427 -0
  42. package/chunks/createLucideIcon-B6NxpYkb.js +79 -0
  43. package/chunks/createSvgIcon-7h7XC877.js +119 -0
  44. package/chunks/createSvgIcon-DVA0KIUd.js +2490 -0
  45. package/chunks/dataAttributeParser-CF9vxaVN.js +28 -0
  46. package/chunks/default-quiz-bg-CTzaADn7.js +4 -0
  47. package/chunks/getReactElementRef-BD-S8A24.js +25 -0
  48. package/chunks/index-24AwmTVJ.js +85 -0
  49. package/chunks/index-3vJS8JzK.js +63 -0
  50. package/chunks/index-BSD7mvEU.js +57 -0
  51. package/chunks/index-BU6iona7.js +57 -0
  52. package/chunks/index-BqCHiyI6.js +59 -0
  53. package/chunks/index-C5qRf4TV.js +20 -0
  54. package/chunks/index-C9MpfjqV.js +35 -0
  55. package/chunks/index-CMmQs5A5.js +56 -0
  56. package/chunks/index-CicEY2Jv.js +5 -0
  57. package/chunks/index-DNeawo0R.js +17 -0
  58. package/chunks/index-DePIySlY.js +29 -0
  59. package/chunks/index-DoRYU_1L.js +41 -0
  60. package/chunks/index-DvgG9XJj.js +20 -0
  61. package/chunks/index-QpZE-92Y.js +33 -0
  62. package/chunks/index-rgFj976B.js +17 -0
  63. package/chunks/index-tzsdMoo-.js +16 -0
  64. package/chunks/index.es-CHqz6mjo.js +6162 -0
  65. package/chunks/init-BEkECL0v.js +32 -0
  66. package/chunks/main-XP7dqk6g.js +39843 -0
  67. package/chunks/resolveProps-BfYZubfk.js +37 -0
  68. package/chunks/users-D_xgC4iQ.js +16 -0
  69. package/chunks/variantColorInheritance-DI3wUohX.js +28 -0
  70. package/fu-widgets-loader.es.js +73 -0
  71. package/fu-widgets-loader.js +1 -0
  72. package/fu-widgets.es.js +4 -0
  73. package/fu-widgets.iife.js +621 -682
  74. package/manifest.json +84 -0
  75. package/package.json +9 -2
@@ -0,0 +1,37 @@
1
+ const f = "$$material";
2
+ function p(s, c) {
3
+ const t = {
4
+ ...c
5
+ };
6
+ for (const l in s)
7
+ if (Object.prototype.hasOwnProperty.call(s, l)) {
8
+ const o = l;
9
+ if (o === "components" || o === "slots")
10
+ t[o] = {
11
+ ...s[o],
12
+ ...t[o]
13
+ };
14
+ else if (o === "componentsProps" || o === "slotProps") {
15
+ const e = s[o], n = c[o];
16
+ if (!n)
17
+ t[o] = e || {};
18
+ else if (!e)
19
+ t[o] = n;
20
+ else {
21
+ t[o] = {
22
+ ...n
23
+ };
24
+ for (const i in e)
25
+ if (Object.prototype.hasOwnProperty.call(e, i)) {
26
+ const r = i;
27
+ t[o][r] = p(e[r], n[r]);
28
+ }
29
+ }
30
+ } else t[o] === void 0 && (t[o] = s[o]);
31
+ }
32
+ return t;
33
+ }
34
+ export {
35
+ f as T,
36
+ p as r
37
+ };
@@ -0,0 +1,16 @@
1
+ import { c as e } from "./createLucideIcon-B6NxpYkb.js";
2
+ /**
3
+ * @license lucide-react v0.474.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const c = [
9
+ ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
10
+ ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
11
+ ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
12
+ ["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }]
13
+ ], s = e("Users", c);
14
+ export {
15
+ s as U
16
+ };
@@ -0,0 +1,28 @@
1
+ import { j as u, r as e } from "./main-XP7dqk6g.js";
2
+ const l = /* @__PURE__ */ e.createContext(void 0);
3
+ function c(o, r) {
4
+ let t = r, n = o;
5
+ return o === "outlined" && (t = "neutral", n = "plain"), o === "plain" && (t = "neutral"), {
6
+ variant: n,
7
+ color: t
8
+ };
9
+ }
10
+ function d(o, r, t = !1) {
11
+ const n = e.useContext(l), [s, a] = typeof n == "string" ? n.split(":") : [], i = c(s || void 0, a || void 0);
12
+ return i.variant = o || i.variant, i.color = r || (t ? a : i.color), i;
13
+ }
14
+ function C({
15
+ children: o,
16
+ color: r,
17
+ variant: t
18
+ }) {
19
+ return /* @__PURE__ */ u.jsx(l.Provider, {
20
+ value: `${t || ""}:${r || ""}`,
21
+ children: o
22
+ });
23
+ }
24
+ export {
25
+ C as V,
26
+ c as g,
27
+ d as u
28
+ };
@@ -0,0 +1,73 @@
1
+ var w = Object.defineProperty;
2
+ var p = (o, t, e) => t in o ? w(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
+ var s = (o, t, e) => p(o, typeof t != "symbol" ? t + "" : t, e);
4
+ class d {
5
+ /**
6
+ * Load the FuWidget library
7
+ */
8
+ static load(t = {}) {
9
+ const { onReady: e, onError: i, _cdnBase: f, _disableSRI: E } = t, a = f || this.CDN_BASE, g = E ? !1 : this.ENABLE_SRI;
10
+ this.fetchManifest(a).then((n) => {
11
+ console.log(`📦 FuWidget v${n.version} (${n.buildDate})`);
12
+ const r = this.detectESMSupport(), l = this.PREFER_ESM && r, c = l ? "esm" : "iife", u = n.files[c];
13
+ console.log(`🚀 Loading ${c.toUpperCase()} build: ${u}`), this.loadScript({
14
+ src: `${a}/${u}`,
15
+ type: l ? "module" : void 0,
16
+ integrity: g && n.integrity ? n.integrity[c] : void 0,
17
+ onLoad: () => {
18
+ console.log("✅ FuWidget loaded successfully"), e && window.FuWidget && e(window.FuWidget, n);
19
+ },
20
+ onError: (h) => {
21
+ console.error("❌ Failed to load FuWidget from manifest"), i && i(h);
22
+ }
23
+ });
24
+ }).catch((n) => {
25
+ console.warn("⚠️ Manifest fetch failed, using fallback version", n), this.loadScript({
26
+ src: `https://cdn.jsdelivr.net/npm/fansunited-widgets-cdn@${this.FALLBACK_VERSION}/fu-widgets.iife.js`,
27
+ onLoad: () => {
28
+ console.log(`✅ FuWidget loaded (fallback v${this.FALLBACK_VERSION})`), e && window.FuWidget && e(window.FuWidget, {
29
+ name: "fansunited-widgets-cdn",
30
+ version: this.FALLBACK_VERSION,
31
+ buildDate: "unknown",
32
+ files: { iife: "fu-widgets.iife.js", esm: "fu-widgets.es.js" }
33
+ });
34
+ },
35
+ onError: (r) => {
36
+ console.error("❌ Failed to load FuWidget (fallback)"), i && i(r);
37
+ }
38
+ });
39
+ });
40
+ }
41
+ /**
42
+ * Fetch manifest.json
43
+ */
44
+ static fetchManifest(t) {
45
+ const e = `${t}/manifest.json?t=${Date.now()}`;
46
+ return fetch(e, {
47
+ cache: "no-store"
48
+ }).then((i) => {
49
+ if (!i.ok)
50
+ throw new Error(`Failed to fetch manifest: ${i.statusText}`);
51
+ return i.json();
52
+ });
53
+ }
54
+ /**
55
+ * Detect if browser supports ES modules
56
+ */
57
+ static detectESMSupport() {
58
+ return "noModule" in HTMLScriptElement.prototype;
59
+ }
60
+ /**
61
+ * Load a script dynamically
62
+ */
63
+ static loadScript(t) {
64
+ const e = document.createElement("script");
65
+ e.src = t.src, t.type && (e.type = t.type), t.integrity && (e.integrity = t.integrity, e.crossOrigin = "anonymous"), e.onload = t.onLoad, e.onerror = () => t.onError(new Error(`Failed to load script: ${t.src}`)), document.head.appendChild(e);
66
+ }
67
+ }
68
+ // Internal configuration - not exposed to users
69
+ s(d, "CDN_BASE", "https://cdn.jsdelivr.net/npm/fansunited-widgets-cdn@latest"), s(d, "FALLBACK_VERSION", "0.0.85"), s(d, "PREFER_ESM", !0), s(d, "ENABLE_SRI", !0);
70
+ typeof window < "u" && (window.FuWidgetLoader = d);
71
+ export {
72
+ d as default
73
+ };
@@ -0,0 +1 @@
1
+ var w=Object.defineProperty;var S=(i,n,t)=>n in i?w(i,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[n]=t;var r=(i,n,t)=>S(i,typeof n!="symbol"?n+"":n,t);var FuWidgetLoader=(function(){"use strict";class i{static load(t={}){const{onReady:e,onError:o,_cdnBase:f,_disableSRI:E}=t,a=f||this.CDN_BASE,g=E?!1:this.ENABLE_SRI;this.fetchManifest(a).then(s=>{console.log(`📦 FuWidget v${s.version} (${s.buildDate})`);const d=this.detectESMSupport(),l=this.PREFER_ESM&&d,c=l?"esm":"iife",u=s.files[c];console.log(`🚀 Loading ${c.toUpperCase()} build: ${u}`),this.loadScript({src:`${a}/${u}`,type:l?"module":void 0,integrity:g&&s.integrity?s.integrity[c]:void 0,onLoad:()=>{console.log("✅ FuWidget loaded successfully"),e&&window.FuWidget&&e(window.FuWidget,s)},onError:h=>{console.error("❌ Failed to load FuWidget from manifest"),o&&o(h)}})}).catch(s=>{console.warn("⚠️ Manifest fetch failed, using fallback version",s),this.loadScript({src:`https://cdn.jsdelivr.net/npm/fansunited-widgets-cdn@${this.FALLBACK_VERSION}/fu-widgets.iife.js`,onLoad:()=>{console.log(`✅ FuWidget loaded (fallback v${this.FALLBACK_VERSION})`),e&&window.FuWidget&&e(window.FuWidget,{name:"fansunited-widgets-cdn",version:this.FALLBACK_VERSION,buildDate:"unknown",files:{iife:"fu-widgets.iife.js",esm:"fu-widgets.es.js"}})},onError:d=>{console.error("❌ Failed to load FuWidget (fallback)"),o&&o(d)}})})}static fetchManifest(t){const e=`${t}/manifest.json?t=${Date.now()}`;return fetch(e,{cache:"no-store"}).then(o=>{if(!o.ok)throw new Error(`Failed to fetch manifest: ${o.statusText}`);return o.json()})}static detectESMSupport(){return"noModule"in HTMLScriptElement.prototype}static loadScript(t){const e=document.createElement("script");e.src=t.src,t.type&&(e.type=t.type),t.integrity&&(e.integrity=t.integrity,e.crossOrigin="anonymous"),e.onload=t.onLoad,e.onerror=()=>t.onError(new Error(`Failed to load script: ${t.src}`)),document.head.appendChild(e)}}return r(i,"CDN_BASE","https://cdn.jsdelivr.net/npm/fansunited-widgets-cdn@latest"),r(i,"FALLBACK_VERSION","0.0.85"),r(i,"PREFER_ESM",!0),r(i,"ENABLE_SRI",!0),typeof window<"u"&&(window.FuWidgetLoader=i),i})();
@@ -0,0 +1,4 @@
1
+ import { aq as f } from "./chunks/main-XP7dqk6g.js";
2
+ export {
3
+ f as default
4
+ };