@siteping/widget 0.9.15 → 0.9.16
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.
- package/dist/{chunk-NEX6ECQM.js → chunk-GRXZBZ42.js} +3 -3
- package/dist/chunk-GRXZBZ42.js.map +1 -0
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{panel-66LNZR5L.js → panel-4KOYCMDH.js} +2 -2
- package/dist/{panel-66LNZR5L.js.map → panel-4KOYCMDH.js.map} +1 -1
- package/dist/react.js +2 -2
- package/package.json +4 -4
- package/dist/chunk-NEX6ECQM.js.map +0 -1
package/dist/index.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var SitePing=(function(exports){'use strict';var Zu=Object.create;var zn=Object.defineProperty;var qu=Object.getOwnPropertyDescriptor;var Ah=Object.getOwnPropertyNames;var eh=Object.getPrototypeOf,th=Object.prototype.hasOwnProperty;var dA=(o,n)=>()=>(o&&(n=o(o=0)),n);var rh=(o,n)=>()=>(n||o((n={exports:{}}).exports,n),n.exports),ve=(o,n)=>{for(var s in n)zn(o,s,{get:n[s],enumerable:true});},nh=(o,n,s,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of Ah(n))!th.call(o,c)&&c!==s&&zn(o,c,{get:()=>n[c],enumerable:!(a=qu(n,c))||a.enumerable});return o};var sh=(o,n,s)=>(s=o!=null?Zu(eh(o)):{},nh(zn(s,"default",{value:o,enumerable:true}),o));function G(o){let a=document.createRange().createContextualFragment(o).firstElementChild;if(
|
|
1
|
+
var SitePing=(function(exports){'use strict';var Zu=Object.create;var zn=Object.defineProperty;var qu=Object.getOwnPropertyDescriptor;var Ah=Object.getOwnPropertyNames;var eh=Object.getPrototypeOf,th=Object.prototype.hasOwnProperty;var dA=(o,n)=>()=>(o&&(n=o(o=0)),n);var rh=(o,n)=>()=>(n||o((n={exports:{}}).exports,n),n.exports),ve=(o,n)=>{for(var s in n)zn(o,s,{get:n[s],enumerable:true});},nh=(o,n,s,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of Ah(n))!th.call(o,c)&&c!==s&&zn(o,c,{get:()=>n[c],enumerable:!(a=qu(n,c))||a.enumerable});return o};var sh=(o,n,s)=>(s=o!=null?Zu(eh(o)):{},nh(zn(s,"default",{value:o,enumerable:true}),o));function G(o){let a=document.createRange().createContextualFragment(o).firstElementChild;if(a?.nodeName.toLowerCase()!=="svg")throw new Error("[siteping] Invalid SVG string");for(let c of [...a.attributes])c.name.startsWith("on")&&a.removeAttribute(c.name);for(let c of a.querySelectorAll("*"))for(let p of [...c.attributes])p.name.startsWith("on")&&c.removeAttribute(p.name);return a}function b(o,n){let s=document.createElement(o);if(n)for(let[a,c]of Object.entries(n))a==="class"?s.className=c:a==="style"?s.style.cssText=c:s.setAttribute(a,c);return s}function F(o,n){o.textContent=n;}function ye(o){let n=Array.from(o.childNodes).map(s=>s.cloneNode(true));return o.disabled=true,o.replaceChildren(b("div",{class:"sp-spinner sp-spinner--sm"})),()=>{o.replaceChildren(...n),o.disabled=false;}}function yr(o,n="en"){let s=Date.now()-new Date(o).getTime(),a=Math.floor(s/1e3);if(a<60)return new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"second");let c=new Intl.RelativeTimeFormat(n,{numeric:"always",style:"narrow"}),p=Math.floor(a/60);if(p<60)return c.format(-p,"minute");let u=Math.floor(p/60);if(u<24)return c.format(-u,"hour");let B=Math.floor(u/24);return B<7?c.format(-B,"day"):new Date(o).toLocaleDateString(n)}var HA=dA(()=>{});var rs,ns,ss,Qr,Lo,Fr,xr,Ur,Er,Hr,is,To,Ko,Do,os,Mo,Ro,kr=dA(()=>{rs='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><circle cx="12" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="8" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="16" cy="10" r="1" fill="currentColor" stroke="none"/></svg>',ns='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',ss='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/><path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',Qr='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',Lo='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',Fr='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>',xr='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',Ur='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>',Er='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="8" y="6" width="8" height="14" rx="4"/><path d="M19 9h2"/><path d="M3 9h2"/><path d="M19 13h2"/><path d="M3 13h2"/><path d="M19 17h2"/><path d="M3 17h2"/><path d="M10 2h4"/></svg>',Hr='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',is='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="12 2 2 7 12 12 22 7 12 2"/><polyline points="2 17 12 22 22 17"/><polyline points="2 12 12 17 22 12"/></svg>',To='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="3" fill="currentColor" stroke="none"/></svg>',Ko='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>',Do='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg>',os='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>',Mo='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>',Ro='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>';});function bh(o){if(wh.test(o))return o;let n=Oo.test(o)?o.match(Oo):null;return n?`#${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:mh.test(o)?o.slice(0,7):(console.warn(`[siteping] Invalid accentColor "${o}" \u2014 only hex colors (#RGB, #RRGGBB, #RRGGBBAA) are supported. Using default.`),No)}function Ch(o,n){let s=Math.max(0,Math.round(parseInt(o.slice(1,3),16)*(1-n))),a=Math.max(0,Math.round(parseInt(o.slice(3,5),16)*(1-n))),c=Math.max(0,Math.round(parseInt(o.slice(5,7),16)*(1-n)));return `#${s.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function vh(){return typeof window>"u"?false:window.matchMedia("(prefers-color-scheme: dark)").matches}function yh(o){return o==="dark"||o==="auto"&&vh()?"dark":"light"}function Po(o=No,n){let s=bh(o),a=Ch(s,.15);return yh(n)==="dark"?{accent:s,accentLight:s+"22",accentDark:a,accentGlow:s+"44",accentGradient:`linear-gradient(135deg, ${s}, ${a})`,bg:"#0f172a",bgHover:"#1e293b",text:"#f1f5f9",textSecondary:"#94a3b8",textTertiary:"#64748b",border:"#334155",shadow:"rgba(0, 0, 0, 0.3)",glassBg:"rgba(15, 23, 42, 0.78)",glassBgHeavy:"rgba(15, 23, 42, 0.88)",glassBorder:"rgba(51, 65, 85, 0.5)",glassBorderSubtle:"rgba(51, 65, 85, 0.3)",typeQuestion:"#60a5fa",typeChange:"#fbbf24",typeBug:"#f87171",typeOther:"#94a3b8",typeQuestionBg:"rgba(59, 130, 246, 0.15)",typeChangeBg:"rgba(245, 158, 11, 0.15)",typeBugBg:"rgba(239, 68, 68, 0.15)",typeOtherBg:"rgba(100, 116, 139, 0.15)",statusOpen:"#4ade80",statusOpenBg:"rgba(74, 222, 128, 0.15)",statusResolved:"#94a3b8",statusResolvedBg:"rgba(148, 163, 184, 0.15)"}:{accent:s,accentLight:s+"14",accentDark:a,accentGlow:s+"33",accentGradient:`linear-gradient(135deg, ${s}, ${a})`,bg:"#ffffff",bgHover:"#f8f9fb",text:"#0f172a",textSecondary:"#475569",textTertiary:"#64748b",border:"#e2e8f0",shadow:"rgba(0, 0, 0, 0.06)",glassBg:"rgba(255, 255, 255, 0.72)",glassBgHeavy:"rgba(255, 255, 255, 0.85)",glassBorder:"rgba(255, 255, 255, 0.35)",glassBorderSubtle:"rgba(255, 255, 255, 0.18)",typeQuestion:"#3b82f6",typeChange:"#b45309",typeBug:"#ef4444",typeOther:"#64748b",typeQuestionBg:"#eff6ff",typeChangeBg:"#fffbeb",typeBugBg:"#fef2f2",typeOtherBg:"#f8fafc",statusOpen:"#16a34a",statusOpenBg:"#f0fdf4",statusResolved:"#64748b",statusResolvedBg:"#f1f5f9"}}function SA(o,n){switch(o){case "question":return n.typeQuestion;case "change":return n.typeChange;case "bug":return n.typeBug;default:return n.typeOther}}function $A(o,n){switch(o){case "question":return n.typeQuestionBg;case "change":return n.typeChangeBg;case "bug":return n.typeBugBg;default:return n.typeOtherBg}}function _o(o){return `
|
|
2
2
|
--sp-accent: ${o.accent};
|
|
3
3
|
--sp-accent-light: ${o.accentLight};
|
|
4
4
|
--sp-accent-dark: ${o.accentDark};
|