sgiant-ai-widget 1.12.0 → 1.12.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.
- package/dist/mark-chrome-launcher.d.ts.map +1 -1
- package/dist/mark-chrome-launcher.js +7 -1
- package/dist/mark-chrome-launcher.js.map +1 -1
- package/dist/sgiant-ai-widget-charts.global.js +1 -1
- package/dist/sgiant-ai-widget.global.js +20 -20
- package/dist/sgiant-ai-widget.global.js.map +4 -4
- package/dist/specs.d.ts +33 -0
- package/dist/specs.d.ts.map +1 -1
- package/dist/specs.js +63 -0
- package/dist/specs.js.map +1 -1
- package/dist/ui-render.d.ts +1 -1
- package/dist/ui-render.d.ts.map +1 -1
- package/dist/ui-render.js +12 -2
- package/dist/ui-render.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mark-chrome-launcher.d.ts","sourceRoot":"","sources":["../src/mark-chrome-launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mark-chrome-launcher.d.ts","sourceRoot":"","sources":["../src/mark-chrome-launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAclD,CAAC"}
|
|
@@ -33,7 +33,13 @@ export const CHROME_LAUNCHER = {
|
|
|
33
33
|
"launcher-icon": "56px",
|
|
34
34
|
"launcher-lift": "0%",
|
|
35
35
|
"launcher-parked-icon": "40px",
|
|
36
|
-
|
|
36
|
+
// 36 in a 48px pill, not 30. The pebble gives this mark the WHOLE button
|
|
37
|
+
// (56 in 56) because it has no disc to sit inside; the pill was quietly
|
|
38
|
+
// giving it 62% and the head read as small next to the word beside it —
|
|
39
|
+
// reported from sgiant's own UI, which is the only place the pill ships.
|
|
40
|
+
// The ratio the comment above asks to hold is the one between STATES, and
|
|
41
|
+
// 30 was not holding it.
|
|
42
|
+
"launcher-pill-icon": "36px",
|
|
37
43
|
"launcher-bg": "transparent",
|
|
38
44
|
"launcher-shadow": "none",
|
|
39
45
|
"launcher-fg": "currentColor",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mark-chrome-launcher.js","sourceRoot":"","sources":["../src/mark-chrome-launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,eAAe,EAAE,MAAM;IACvB,eAAe,EAAE,IAAI;IACrB,sBAAsB,EAAE,MAAM;IAC9B,oBAAoB,EAAE,MAAM;IAC5B,aAAa,EAAE,aAAa;IAC5B,iBAAiB,EAAE,MAAM;IACzB,aAAa,EAAE,cAAc;CAC9B,CAAC"}
|
|
1
|
+
{"version":3,"file":"mark-chrome-launcher.js","sourceRoot":"","sources":["../src/mark-chrome-launcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,eAAe,EAAE,MAAM;IACvB,eAAe,EAAE,IAAI;IACrB,sBAAsB,EAAE,MAAM;IAC9B,yEAAyE;IACzE,wEAAwE;IACxE,wEAAwE;IACxE,yEAAyE;IACzE,0EAA0E;IAC1E,yBAAyB;IACzB,oBAAoB,EAAE,MAAM;IAC5B,aAAa,EAAE,aAAa;IAC5B,iBAAiB,EAAE,MAAM;IACzB,aAAa,EAAE,cAAc;CAC9B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! sgiant-ai-widget 1.12.
|
|
1
|
+
/*! sgiant-ai-widget 1.12.2 — MIT — https://vedatugur.github.io/sgiant-ai-widget/ */
|
|
2
2
|
"use strict";var SgiantAiWidgetCharts=(()=>{var x=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var $=(e,t)=>{for(var n in t)x(e,n,{get:t[n],enumerable:!0})},R=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of S(t))!v.call(e,o)&&o!==n&&x(e,o,{get:()=>t[o],enumerable:!(a=C(t,o))||a.enumerable});return e};var E=e=>R(x({},"__esModule",{value:!0}),e);var j={};$(j,{createChartFallback:()=>N});var M="http://www.w3.org/2000/svg";function u(e,t={}){let n=document.createElementNS(M,e);for(let[a,o]of Object.entries(t))n.setAttribute(a,String(o));return n}function m(e,t){if(t&&typeof e[t]=="number")return Number(e[t]);let n=Object.keys(e).filter(a=>typeof e[a]=="number");return n.length?Number(e[n[n.length-1]]):0}function A(e,t){let n=(t!==void 0&&e[t]!==void 0?e[t]:void 0)??e.label??Object.values(e)[0];return n==null?"":String(n)}function G(){try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function b(e,t,n,a,o){e.appendChild(u("animate",{attributeName:t,from:n,to:a,dur:"0.6s",begin:`${o}s`,fill:"freeze"}))}function T(e,t,n,a,o){let l=Math.max(...e.map(r=>m(r,a)),1),s=u("svg",{viewBox:`0 0 320 ${t}`,width:"100%",role:"img"}),i=(320-22*2)/Math.max(e.length,1);return e.forEach((r,d)=>{let h=(t-44)*m(r,a)/l,f=22+d*i+4,p=Math.max(i-8,2),w=u("rect",{x:f,y:n?t-22:t-22-h,width:p,height:n?0:h,rx:3,fill:"var(--aiw-accent)"});n&&(b(w,"height",0,h,d*.07),b(w,"y",t-22,t-22-h,d*.07)),s.appendChild(w);let y=u("text",{x:f+p/2,y:t-6,"text-anchor":"middle","font-size":9,fill:"var(--aiw-muted)"});y.textContent=A(r,o).slice(0,9),s.appendChild(y)}),s}function k(e,t,n,a,o,c){return e.map((g,l)=>{let s=a+l*(t-a*2)/Math.max(e.length-1,1),i=n-a-(n-a*2)*m(g,c)/o;return`${s},${i}`}).join(" ")}function V(e,t,n,a,o){let l=Math.max(...[...e,...t??[]].map(r=>m(r,o)),1),s=u("svg",{viewBox:`0 0 320 ${n}`,width:"100%",role:"img"});t?.length&&s.appendChild(u("polyline",{points:k(t,320,n,22,l,o),fill:"none",stroke:"var(--aiw-muted)","stroke-width":1.5,"stroke-dasharray":"4 4",opacity:.7}));let i=u("polyline",{points:k(e,320,n,22,l,o),fill:"none",stroke:"var(--aiw-accent)","stroke-width":2.5,"stroke-linecap":"round","stroke-linejoin":"round"});return s.appendChild(i),a&&requestAnimationFrame(()=>{let r=typeof i.getTotalLength=="function"?i.getTotalLength():0;r&&(i.setAttribute("stroke-dasharray",String(r)),i.setAttribute("stroke-dashoffset",String(r)),b(i,"stroke-dashoffset",r,0,0))}),s}function W(e,t,n){let c=2*Math.PI*46,g=e.reduce((i,r)=>i+m(r,n),0)||1,l=u("svg",{viewBox:"0 0 140 140",width:"100%",height:150,role:"img"}),s=0;return e.forEach((i,r)=>{let d=m(i,n)/g,h=u("circle",{cx:140/2,cy:140/2,r:46,fill:"none",stroke:r===0?"var(--aiw-accent)":"var(--aiw-muted)",opacity:r===0?1:Math.max(.8-r*.22,.25),"stroke-width":16,"stroke-dasharray":t?`0 ${c}`:`${c*d} ${c}`,"stroke-dashoffset":-c*s,transform:`rotate(-90 ${140/2} ${140/2})`});t&&b(h,"stroke-dasharray",`0 ${c}`,`${c*d} ${c}`,r*.12),l.appendChild(h),s+=d}),l}var O={time_series:"line",line:"line",breakdown:"bars",bar:"bars",donut:"donut",pie:"donut"};function N(e={}){let{animate:t=!0,height:n=140}=e;return function(o,c,g,l){let s=c??{},i=Array.isArray(g)?g:[],r=O[String(s.chartType??"")];if(!r||!i.length)throw new Error(`sgiant-ai-widget/charts does not draw "${String(s.chartType)}" \u2014 falling through to the built-in renderer.`);let d=s.metrics?.[0],h=t&&!G(),f=document.createElement("div");if(s.title){let p=document.createElement("div");p.textContent=s.title,p.style.cssText="font-size:var(--aiw-font-xs,11px);font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--aiw-muted,#6e6e6e);margin-bottom:6px",f.appendChild(p)}f.appendChild(r==="line"?V(i,Array.isArray(l)?l:void 0,n,h,d):r==="donut"?W(i,h,d):T(i,n,h,d,s.dimension)),o.appendChild(f)}}return E(j);})();
|
|
3
3
|
//# sourceMappingURL=sgiant-ai-widget-charts.global.js.map
|