@holistics/anfra-sdk 0.14.1 → 0.15.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.
- package/dist/api.d.ts +1 -1
- package/dist/app.d.ts +4 -4
- package/dist/app.js +7 -3
- package/dist/{bootstrap-MhTSkiA1.d.ts → bootstrap-hLhpijIb.d.ts} +2 -2
- package/dist/build.d.ts +2 -2
- package/dist/{chunk-WI5VJ2Z6.js → chunk-7K6Z63QO.js} +1 -1
- package/dist/{chunk-HRV45ULB.js → chunk-AG5TADHW.js} +9 -9
- package/dist/{chunk-GOUDXWG4.js → chunk-F6B3EGFV.js} +11 -11
- package/dist/{chunk-Q46CZIEK.js → chunk-LWHVXXKQ.js} +1 -1
- package/dist/{chunk-A3LNZMT6.js → chunk-RF4ETF6T.js} +1 -1
- package/dist/chunk-RXPNL7UR.js +135 -0
- package/dist/common.d.ts +2 -2
- package/dist/common.js +5 -1
- package/dist/{data-UCCW2VWH.js → data-BGX3V42T.js} +1 -1
- package/dist/{declaration-GVDOGQY6.js → declaration-ZL5B676C.js} +1 -1
- package/dist/host.d.ts +2 -2
- package/dist/host.js +35 -8
- package/dist/{menu-CdGVKc4_.d.ts → menu-BFLb7dVq.d.ts} +22 -6
- package/dist/{overview-XXND2V5V.js → overview-JDPLGGP4.js} +3 -3
- package/dist/{plugin-BmIDirTx.d.ts → plugin-B7SpJLBm.d.ts} +28 -9
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +13 -11
- package/dist/{queries-2OHKMTPC.js → queries-QFN4DI25.js} +1 -1
- package/dist/{structure-WRDUXHD4.js → structure-Z2QK5MGH.js} +2 -9
- package/dist/{tab-HMQOITVM.js → tab-LSITVMKV.js} +18 -18
- package/dist/testing.js +3 -3
- package/dist/{types-CWNv6N0y.d.ts → types-CKytl8ds.d.ts} +14 -3
- package/package.json +2 -2
- package/dist/chunk-F6MRA7J4.js +0 -65
package/dist/plugins.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PLUGIN_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RF4ETF6T.js";
|
|
4
4
|
import {
|
|
5
5
|
dropState as dropState2,
|
|
6
6
|
stateOf as stateOf2
|
|
7
7
|
} from "./chunk-CYZQ7ZTJ.js";
|
|
8
8
|
import {
|
|
9
9
|
definePlugin
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-7K6Z63QO.js";
|
|
11
|
+
import "./chunk-LWHVXXKQ.js";
|
|
12
12
|
import {
|
|
13
13
|
ValidationError
|
|
14
14
|
} from "./chunk-KCTLO3CO.js";
|
|
@@ -99,7 +99,8 @@ function lineagePlugin(backend) {
|
|
|
99
99
|
icon: "lineage",
|
|
100
100
|
// Between `inspect`'s Queries (30) and Structure (40).
|
|
101
101
|
order: 35,
|
|
102
|
-
|
|
102
|
+
selection: true,
|
|
103
|
+
mount: async (root, context) => (await import("./tab-LSITVMKV.js")).default(root, context)
|
|
103
104
|
}]
|
|
104
105
|
},
|
|
105
106
|
frame: { setup: lineage_default }
|
|
@@ -107,7 +108,7 @@ function lineagePlugin(backend) {
|
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
// anfra-sdk:anfra-sdk:setup/render
|
|
110
|
-
var render_default = '"use strict";var __anfraPlugin=(()=>{var
|
|
111
|
+
var render_default = '"use strict";var __anfraPlugin=(()=>{var u=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var a=(e,o)=>u(e,"name",{value:o,configurable:!0});var R=(e,o)=>{for(var t in o)u(e,t,{get:o[t],enumerable:!0})},x=(e,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let c of T(o))!w.call(e,c)&&c!==t&&u(e,c,{get:()=>o[c],enumerable:!(r=y(o,c))||r.enumerable});return e};var S=e=>x(u({},"__esModule",{value:!0}),e);var D={};R(D,{SETTLE_MS:()=>h,SKIP_ATTRIBUTE:()=>p,createRender:()=>g,default:()=>b,settle:()=>k});var E="data-anfra-layer";function f(e){return e.hasAttribute(E)}a(f,"isLayer");var s={container:"data-anfra-container",block:"data-anfra-block",query:"data-anfra-query",control:"data-anfra-control",label:"data-anfra-label"},q=`[${s.container}],[${s.block}],[${s.query}],[${s.control}]`;var p="data-anfra-render",$={png:"png",pdf:"pdf"},h=1e4;function v(e,o,t,r){let c=$[e.format],n=e.filename?.trim();if(!n){let l=t.find(d=>d.title)?.title||o.title.trim()||"Data App",i=r&&(r.getAttribute(s.label)||e.block||e.container);n=i?`${l} - ${i}`:l}return n=n.replace(/[/\\\\]/g,"-").replace(/\\p{Cc}/gu,"").trim()||"Data App",n.toLowerCase().endsWith(`.${c}`)?n:`${n}.${c}`}a(v,"filenameFor");function A(e,o,{ValidationError:t}){if(e.block!==void 0&&e.container!==void 0)throw new t("Render a block or a container, not both.",e.block);if(e.format!=="png"&&e.format!=="pdf")throw new t(`Can\'t render as \'${String(e.format)}\': the formats are \'png\' and \'pdf\'.`);let{pixelRatio:r}=e;if(r!==void 0&&!(Number.isFinite(r)&&r>0))throw new t(`pixelRatio ${String(r)} is not a positive number.`);let c=e.block!==void 0?"block":e.container!==void 0?"container":void 0;if(!c)return{element:null};let n=e.block??e.container,l=[...o.querySelectorAll(`[${s[c]}]`)].find(i=>i.getAttribute(s[c])===n);if(!l)throw new t(`No element is marked ${s[c]}="${n}" on the page.`,n);return{element:l,entity:n}}a(A,"targetOf");function O(e){return f(e)||e.getAttribute(p)==="skip"}a(O,"skip");function g(e,o){let{ValidationError:t}=o.errors;return async r=>{let c=e.document,{element:n,entity:l}=A(r??{},c,o.errors),i=v(r,c,o.apps(),n);try{let m=await(await o.renderer()).draw(n,{format:r.format,pixelRatio:r.pixelRatio,skip:O});return await o.saveFile({blob:m.blob,filename:i}),{filename:i,format:r.format,...m}}catch(d){throw d instanceof t&&d.entity?d:new t(d?.message||"The rendering failed.",l)}}}a(g,"createRender");async function k(e,o,t=h){let r=a(()=>o().some(n=>Object.values(n.queries).some(l=>l.state==="executing")),"busy"),c=Date.now()+t;for(;r()&&Date.now()<c;)await new Promise(n=>{e.setTimeout(n,100)});await new Promise(n=>{e.requestAnimationFrame(()=>n(void 0))})}a(k,"settle");function b(e){let o=g(e.window,{renderer:a(()=>e.body(),"renderer"),saveFile:a(t=>e.call("render.save",t),"saveFile"),apps:a(()=>e.sdk.apps,"apps"),errors:e.errors});e.provide(t=>o(t)),e.handle("draw",t=>k(e.window,()=>e.sdk.apps).then(()=>o(t)))}a(b,"setup");return S(D);})();\n';
|
|
111
112
|
|
|
112
113
|
// anfra-sdk:anfra-sdk:body/render
|
|
113
114
|
var render_default2 = '"use strict";var __anfraBody=(()=>{var $=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var ue=Object.getOwnPropertyNames;var fe=Object.prototype.hasOwnProperty;var i=(e,t)=>$(e,"name",{value:t,configurable:!0});var me=(e,t)=>{for(var n in t)$(e,n,{get:t[n],enumerable:!0})},he=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ue(t))!fe.call(e,o)&&o!==n&&$(e,o,{get:()=>t[o],enumerable:!(r=le(t,o))||r.enumerable});return e};var ge=e=>he($({},"__esModule",{value:!0}),e);var it={};me(it,{default:()=>ce});function H(e,t){if(e.match(/^[a-z]+:\\/\\//i))return e;if(e.match(/^\\/\\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let n=document.implementation.createHTMLDocument(),r=n.createElement("base"),o=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(o),t&&(r.href=t),o.href=e,o.href}i(H,"resolveUrl");var V=(()=>{let e=0,t=i(()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4),"random");return()=>(e+=1,`u${t()}${e}`)})();function p(e){let t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}i(p,"toArray");var b=null;function L(e={}){return b||(e.includeStyleProperties?(b=e.includeStyleProperties,b):(b=p(window.getComputedStyle(document.documentElement)),b))}i(L,"getStyleProperties");function D(e,t){let r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}i(D,"px");function de(e){let t=D(e,"border-left-width"),n=D(e,"border-right-width");return e.clientWidth+t+n}i(de,"getNodeWidth");function pe(e){let t=D(e,"border-top-width"),n=D(e,"border-bottom-width");return e.clientHeight+t+n}i(pe,"getNodeHeight");function I(e,t={}){let n=t.width||de(e),r=t.height||pe(e);return{width:n,height:r}}i(I,"getImageSize");function W(){let e,t;try{t=process}catch{}let n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}i(W,"getPixelRatio");var g=16384;function _(e){(e.width>g||e.height>g)&&(e.width>g&&e.height>g?e.width>e.height?(e.height*=g/e.width,e.width=g):(e.width*=g/e.height,e.height=g):e.width>g?(e.height*=g/e.width,e.width=g):(e.width*=g/e.height,e.height=g))}i(_,"checkCanvasDimensions");function x(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}i(x,"createImage");async function ye(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}i(ye,"svgToDataURL");async function j(e,t,n){let r="http://www.w3.org/2000/svg",o=document.createElementNS(r,"svg"),a=document.createElementNS(r,"foreignObject");return o.setAttribute("width",`${t}`),o.setAttribute("height",`${n}`),o.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),o.appendChild(a),a.appendChild(e),ye(o)}i(j,"nodeToDataURL");var m=i((e,t)=>{if(e instanceof t)return!0;let n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||m(n,t)},"isInstanceOfElement");function we(e){let t=e.getPropertyValue("content");return`${e.cssText} content: \'${t.replace(/\'|"/g,"")}\';`}i(we,"formatCSSText");function be(e,t){return L(t).map(n=>{let r=e.getPropertyValue(n),o=e.getPropertyPriority(n);return`${n}: ${r}${o?" !important":""};`}).join(" ")}i(be,"formatCSSProperties");function xe(e,t,n,r){let o=`.${e}:${t}`,a=n.cssText?we(n):be(n,r);return document.createTextNode(`${o}{${a}}`)}i(xe,"getPseudoElementStyle");function q(e,t,n,r){let o=window.getComputedStyle(e,n),a=o.getPropertyValue("content");if(a===""||a==="none")return;let s=V();try{t.className=`${t.className} ${s}`}catch{return}let c=document.createElement("style");c.appendChild(xe(s,n,o,r)),t.appendChild(c)}i(q,"clonePseudoElement");function z(e,t,n){q(e,t,":before",n),q(e,t,":after",n)}i(z,"clonePseudoElements");var G="application/font-woff",X="image/jpeg",Se={woff:G,woff2:G,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:X,jpeg:X,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Ee(e){let t=/\\.([^./]*?)$/g.exec(e);return t?t[1]:""}i(Ee,"getExtension");function S(e){let t=Ee(e).toLowerCase();return Se[t]||""}i(S,"getMimeType");function Re(e){return e.split(/,/)[1]}i(Re,"getContentFromDataUrl");function C(e){return e.search(/^(data:)/)!==-1}i(C,"isDataUrl");function v(e,t){return`data:${t};base64,${e}`}i(v,"makeDataUrl");async function k(e,t,n){let r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);let o=await r.blob();return new Promise((a,s)=>{let c=new FileReader;c.onerror=s,c.onloadend=()=>{try{a(n({res:r,result:c.result}))}catch(l){s(l)}},c.readAsDataURL(o)})}i(k,"fetchAsDataURL");var U={};function Ae(e,t,n){let r=e.replace(/\\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\\//,"")),t?`[${t}]${r}`:r}i(Ae,"getCacheKey");async function E(e,t,n){let r=Ae(e,t,n.includeQueryParams);if(U[r]!=null)return U[r];n.cacheBust&&(e+=(/\\?/.test(e)?"&":"?")+new Date().getTime());let o;try{let a=await k(e,n.fetchRequestInit,({res:s,result:c})=>(t||(t=s.headers.get("Content-Type")||""),Re(c)));o=v(a,t)}catch(a){o=n.imagePlaceholder||"";let s=`Failed to fetch resource: ${e}`;a&&(s=typeof a=="string"?a:a.message),s&&console.warn(s)}return U[r]=o,o}i(E,"resourceToDataURL");async function Ce(e){let t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):x(t)}i(Ce,"cloneCanvasElement");async function Pe(e,t){if(e.currentSrc){let a=document.createElement("canvas"),s=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,s?.drawImage(e,0,0,a.width,a.height);let c=a.toDataURL();return x(c)}let n=e.poster,r=S(n),o=await E(n,r,t);return x(o)}i(Pe,"cloneVideoElement");async function Te(e,t){var n;try{if(!((n=e?.contentDocument)===null||n===void 0)&&n.body)return await P(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}i(Te,"cloneIFrameElement");async function $e(e,t){return m(e,HTMLCanvasElement)?Ce(e):m(e,HTMLVideoElement)?Pe(e,t):m(e,HTMLIFrameElement)?Te(e,t):e.cloneNode(J(e))}i($e,"cloneSingleNode");var De=i(e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT","isSlotElement"),J=i(e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG","isSVGElement");async function Le(e,t,n){var r,o;if(J(t))return t;let a=[];return De(e)&&e.assignedNodes?a=p(e.assignedNodes()):m(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?a=p(e.contentDocument.body.childNodes):a=p(((o=e.shadowRoot)!==null&&o!==void 0?o:e).childNodes),a.length===0||m(e,HTMLVideoElement)||await a.reduce((s,c)=>s.then(()=>P(c,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}i(Le,"cloneChildren");function Fe(e,t,n){let r=t.style;if(!r)return;let o=window.getComputedStyle(e);o.cssText?(r.cssText=o.cssText,r.transformOrigin=o.transformOrigin):L(n).forEach(a=>{let s=o.getPropertyValue(a);a==="font-size"&&s.endsWith("px")&&(s=`${Math.floor(parseFloat(s.substring(0,s.length-2)))-.1}px`),m(e,HTMLIFrameElement)&&a==="display"&&s==="inline"&&(s="block"),a==="d"&&t.getAttribute("d")&&(s=`path(${t.getAttribute("d")})`),r.setProperty(a,s,o.getPropertyPriority(a))})}i(Fe,"cloneCSSStyle");function Ie(e,t){m(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),m(e,HTMLInputElement)&&t.setAttribute("value",e.value)}i(Ie,"cloneInputValue");function Ue(e,t){if(m(e,HTMLSelectElement)){let r=Array.from(t.children).find(o=>e.value===o.getAttribute("value"));r&&r.setAttribute("selected","")}}i(Ue,"cloneSelectValue");function ve(e,t,n){return m(t,Element)&&(Fe(e,t,n),z(e,t,n),Ie(e,t),Ue(e,t)),t}i(ve,"decorate");async function ke(e,t){let n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;let r={};for(let a=0;a<n.length;a++){let c=n[a].getAttribute("xlink:href");if(c){let l=e.querySelector(c),f=document.querySelector(c);!l&&f&&!r[c]&&(r[c]=await P(f,t,!0))}}let o=Object.values(r);if(o.length){let a="http://www.w3.org/1999/xhtml",s=document.createElementNS(a,"svg");s.setAttribute("xmlns",a),s.style.position="absolute",s.style.width="0",s.style.height="0",s.style.overflow="hidden",s.style.display="none";let c=document.createElementNS(a,"defs");s.appendChild(c);for(let l=0;l<o.length;l++)c.appendChild(o[l]);e.appendChild(s)}return e}i(ke,"ensureSVGSymbols");async function P(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>$e(r,t)).then(r=>Le(e,r,t)).then(r=>ve(e,r,t)).then(r=>ke(r,t))}i(P,"cloneNode");var K=/url\\(([\'"]?)([^\'"]+?)\\1\\)/g,Oe=/url\\([^)]+\\)\\s*format\\((["\']?)([^"\']+)\\1\\)/g,Be=/src:\\s*(?:url\\([^)]+\\)\\s*format\\([^)]+\\)[,;]\\s*)+/g;function Me(e){let t=e.replace(/([.*+?^${}()|\\[\\]\\/\\\\])/g,"\\\\$1");return new RegExp(`(url\\\\([\'"]?)(${t})([\'"]?\\\\))`,"g")}i(Me,"toRegex");function He(e){let t=[];return e.replace(K,(n,r,o)=>(t.push(o),n)),t.filter(n=>!C(n))}i(He,"parseURLs");async function Ve(e,t,n,r,o){try{let a=n?H(t,n):t,s=S(t),c;if(o){let l=await o(a);c=v(l,s)}else c=await E(a,s,r);return e.replace(Me(t),`$1${c}$3`)}catch{}return e}i(Ve,"embed");function We(e,{preferredFontFormat:t}){return t?e.replace(Be,n=>{for(;;){let[r,,o]=Oe.exec(n)||[];if(!o)return"";if(o===t)return`src: ${r};`}}):e}i(We,"filterPreferredFontFormat");function O(e){return e.search(K)!==-1}i(O,"shouldEmbed");async function F(e,t,n){if(!O(e))return e;let r=We(e,n);return He(r).reduce((a,s)=>a.then(c=>Ve(c,s,t,n)),Promise.resolve(r))}i(F,"embedResources");async function R(e,t,n){var r;let o=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(o){let a=await F(o,null,n);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}i(R,"embedProp");async function _e(e,t){await R("background",e,t)||await R("background-image",e,t),await R("mask",e,t)||await R("-webkit-mask",e,t)||await R("mask-image",e,t)||await R("-webkit-mask-image",e,t)}i(_e,"embedBackground");async function je(e,t){let n=m(e,HTMLImageElement);if(!(n&&!C(e.src))&&!(m(e,SVGImageElement)&&!C(e.href.baseVal)))return;let r=n?e.src:e.href.baseVal,o=await E(r,S(r),t);await new Promise((a,s)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...l)=>{try{a(t.onImageErrorHandler(...l))}catch(f){s(f)}}:s;let c=e;c.decode&&(c.decode=a),c.loading==="lazy"&&(c.loading="eager"),n?(e.srcset="",e.src=o):e.href.baseVal=o})}i(je,"embedImageNode");async function qe(e,t){let r=p(e.childNodes).map(o=>B(o,t));await Promise.all(r).then(()=>e)}i(qe,"embedChildren");async function B(e,t){m(e,Element)&&(await _e(e,t),await je(e,t),await qe(e,t))}i(B,"embedImages");function Q(e,t){let{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);let r=t.style;return r!=null&&Object.keys(r).forEach(o=>{n[o]=r[o]}),e}i(Q,"applyStyle");var Y={};async function Z(e){let t=Y[e];if(t!=null)return t;let r=await(await fetch(e)).text();return t={url:e,cssText:r},Y[e]=t,t}i(Z,"fetchCSS");async function N(e,t){let n=e.cssText,r=/url\\(["\']?([^"\')]+)["\']?\\)/g,a=(n.match(/url\\([^)]+\\)/g)||[]).map(async s=>{let c=s.replace(r,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),k(c,t.fetchRequestInit,({result:l})=>(n=n.replace(s,`url(${l})`),[s,l]))});return Promise.all(a).then(()=>n)}i(N,"embedFonts");function ee(e){if(e==null)return[];let t=[],n=/(\\/\\*[\\s\\S]*?\\*\\/)/gi,r=e.replace(n,""),o=new RegExp("((@.*?keyframes [\\\\s\\\\S]*?){([\\\\s\\\\S]*?}\\\\s*?)})","gi");for(;;){let l=o.exec(r);if(l===null)break;t.push(l[0])}r=r.replace(o,"");let a=/@import[\\s\\S]*?url\\([^)]*\\)[\\s\\S]*?;/gi,s="((\\\\s*?(?:\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\/)?\\\\s*?@media[\\\\s\\\\S]*?){([\\\\s\\\\S]*?)}\\\\s*?})|(([\\\\s\\\\S]*?){([\\\\s\\\\S]*?)})",c=new RegExp(s,"gi");for(;;){let l=a.exec(r);if(l===null){if(l=c.exec(r),l===null)break;a.lastIndex=c.lastIndex}else c.lastIndex=a.lastIndex;t.push(l[0])}return t}i(ee,"parseCSS");async function ze(e,t){let n=[],r=[];return e.forEach(o=>{if("cssRules"in o)try{p(o.cssRules||[]).forEach((a,s)=>{if(a.type===CSSRule.IMPORT_RULE){let c=s+1,l=a.href,f=Z(l).then(u=>N(u,t)).then(u=>ee(u).forEach(h=>{try{o.insertRule(h,h.startsWith("@import")?c+=1:o.cssRules.length)}catch(A){console.error("Error inserting rule from remote css",{rule:h,error:A})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(f)}})}catch(a){let s=e.find(c=>c.href==null)||document.styleSheets[0];o.href!=null&&r.push(Z(o.href).then(c=>N(c,t)).then(c=>ee(c).forEach(l=>{s.insertRule(l,s.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",a)}}),Promise.all(r).then(()=>(e.forEach(o=>{if("cssRules"in o)try{p(o.cssRules||[]).forEach(a=>{n.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${o.href}`,a)}}),n))}i(ze,"getCSSRules");function Ge(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>O(t.style.getPropertyValue("src")))}i(Ge,"getWebFontRules");async function Xe(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");let n=p(e.ownerDocument.styleSheets),r=await ze(n,t);return Ge(r)}i(Xe,"parseWebFontRules");function te(e){return e.trim().replace(/["\']/g,"")}i(te,"normalizeFontFamily");function Je(e){let t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(a=>{t.add(te(a))}),Array.from(r.children).forEach(a=>{a instanceof HTMLElement&&n(a)})}return i(n,"traverse"),n(e),t}i(Je,"getUsedFonts");async function re(e,t){let n=await Xe(e,t),r=Je(e);return(await Promise.all(n.filter(a=>r.has(te(a.style.fontFamily))).map(a=>{let s=a.parentStyleSheet?a.parentStyleSheet.href:null;return F(a.cssText,s,t)}))).join(`\n`)}i(re,"getWebFontCSS");async function ne(e,t){let n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await re(e,t);if(n){let r=document.createElement("style"),o=document.createTextNode(n);r.appendChild(o),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}i(ne,"embedWebFonts");async function Ke(e,t={}){let{width:n,height:r}=I(e,t),o=await P(e,t,!0);return await ne(o,t),await B(o,t),Q(o,t),await j(o,n,r)}i(Ke,"toSvg");async function oe(e,t={}){let{width:n,height:r}=I(e,t),o=await Ke(e,t),a=await x(o),s=document.createElement("canvas"),c=s.getContext("2d"),l=t.pixelRatio||W(),f=t.canvasWidth||n,u=t.canvasHeight||r;return s.width=f*l,s.height=u*l,t.skipAutoScale||_(s),s.style.width=`${f}`,s.style.height=`${u}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,s.width,s.height)),c.drawImage(a,0,0,s.width,s.height),s}i(oe,"toCanvas");function ae(e,t,n){let r=(n.width*.75).toFixed(2),o=(n.height*.75).toFixed(2),a=`q ${r} 0 0 ${o} 0 0 cm /Im0 Do Q`,s=new TextEncoder,c=[],l=[],f=0,u=i(d=>{let w=typeof d=="string"?s.encode(d):d;c.push(w),f+=w.length},"push"),h=i((d,w)=>{l[d]=f,u(`${d} 0 obj\n`),(Array.isArray(w)?w:[w]).forEach(u),u(`\nendobj\n`)},"object");u(`%PDF-1.4\n`),u(new Uint8Array([37,226,227,207,211,10])),h(1,"<< /Type /Catalog /Pages 2 0 R >>"),h(2,"<< /Type /Pages /Kids [3 0 R] /Count 1 >>"),h(3,`<< /Type /Page /Parent 2 0 R /MediaBox [0 0 ${r} ${o}] /Resources << /XObject << /Im0 4 0 R >> >> /Contents 5 0 R >>`),h(4,[`<< /Type /XObject /Subtype /Image /Width ${t.width} /Height ${t.height} /ColorSpace /DeviceRGB /BitsPerComponent 8 /Filter /DCTDecode /Length ${e.length} >>\nstream\n`,e,`\nendstream`]),h(5,`<< /Length ${a.length} >>\nstream\n${a}\nendstream`);let A=f;return u(`xref\n0 6\n0000000000 65535 f \n${l.slice(1).map(d=>`${String(d).padStart(10,"0")} 00000 n \n`).join("")}`),u(`trailer\n<< /Size 6 /Root 1 0 R >>\nstartxref\n${A}\n%%EOF\n`),new Blob(c,{type:"application/pdf"})}i(ae,"pdfOfJpeg");var M=class M extends Error{constructor(t){super(t),this.name="RenderFailure"}};i(M,"RenderFailure");var y=M;var T=16384,ie=12e7;function Qe(e,t,n){let r=i(c=>e*c<=T&&t*c<=T&&e*t*c*c<=ie,"fits"),o=i(c=>new y(`${e}\\xD7${t} px at pixelRatio ${c} is over a canvas\'s limit (${T} px a side): render a smaller node, or a lower pixelRatio.`),"tooBig");if(n!==void 0){if(!r(n))throw o(n);return n}let a=Math.max(globalThis.devicePixelRatio||1,2);if(r(a))return a;let s=Math.floor(Math.min(T/e,T/t,Math.sqrt(ie/(e*t)))*100)/100;if(s<1)throw o(1);return s}i(Qe,"ratioFor");function Ye(e){return!!e&&e!=="transparent"&&!/rgba\\(.*,\\s*0\\)$/.test(e)}i(Ye,"opaque");function Ze(e,t){let n=[];if(e){for(let r=e;r;r=r.parentElement)n.push(r);n.push(t.body)}else n.push(t.documentElement,t.body);return n.map(r=>getComputedStyle(r).backgroundColor).find(Ye)??"#ffffff"}i(Ze,"backgroundOf");function Ne(e,t){let n=[],r=i(o=>{if(!t(o)){n.push(o);for(let a of o.children)r(a)}},"walk");return r(e),n}i(Ne,"drawnElements");async function et(e){let t=new Set;for(let r of e)if(r instanceof HTMLImageElement){let o=r.currentSrc||r.src;o&&!/^(data|blob):/.test(o)&&t.add(o)}let n=await Promise.all([...t].map(async r=>{try{return(await fetch(r,{mode:"cors",cache:"force-cache"})).ok}catch{return!1}}));return[...t].filter((r,o)=>!n[o])}i(et,"unreadableImages");var tt="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function rt(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}i(rt,"dataUrlOf");function nt(e){let t=new Set;for(let n of e)for(let r of getComputedStyle(n).fontFamily.split(","))t.add(r.trim().replace(/^["\']|["\']$/g,"").toLowerCase());return t}i(nt,"familiesOf");async function ot(e,t){let n=nt(t),r=[];return await Promise.all([...e.styleSheets].map(async a=>{let s=a.href??e.baseURI;try{for(let c of a.cssRules)c instanceof CSSFontFaceRule&&r.push({css:c.cssText,base:s})}catch{if(!a.href)return;try{let c=await(await fetch(a.href,{mode:"cors",cache:"force-cache"})).text();for(let l of c.match(/@font-face\\s*{[^}]*}/g)??[])r.push({css:l,base:s})}catch{}}})),(await Promise.all(r.map(async({css:a,base:s})=>{let c=/font-family:\\s*["\']?([^;"\']+)/.exec(a)?.[1]?.trim().toLowerCase();if(!c||!n.has(c))return"";let l=a;for(let[f,,u]of a.matchAll(/url\\((["\']?)([^"\')]+)\\1\\)/g))if(!u.startsWith("data:"))try{let h=await fetch(new URL(u,s).href,{mode:"cors",cache:"force-cache"});l=l.replace(f,`url(${await rt(await h.blob())})`)}catch{return""}return l}))).filter(Boolean).join(`\n`)}i(ot,"embedFonts");function se(e,t,n){return new Promise((r,o)=>{try{e.toBlob(a=>a?r(a):o(new y("The browser made no image of the canvas.")),t,n)}catch{o(new y(\'The page holds something read from another server without CORS (a canvas or a font), so the browser refuses to make an image of it. Load it with CORS, or mark it data-anfra-render="skip".\'))}})}i(se,"toBlob");async function at(e,t){let n=document,r=e??n.body,o=r.getBoundingClientRect(),a=Math.ceil(e?o.width:n.documentElement.scrollWidth),s=Math.ceil(e?o.height:n.documentElement.scrollHeight);if(!a||!s)throw new y("There is nothing to draw: it has no size (hidden, or empty).");let c=Qe(a,s,t.pixelRatio),l=Ne(r,t.skip),f=await et(l),u=await ot(n,l),h=await oe(r,{width:a,height:s,pixelRatio:c,skipAutoScale:!0,backgroundColor:Ze(e,n),fontEmbedCSS:u,imagePlaceholder:tt,filter:i(d=>!(d instanceof Element&&t.skip(d)),"filter"),style:e?{boxSizing:"border-box",margin:"0"}:{boxSizing:"border-box",width:`${o.width}px`,height:"auto"}});if(t.format==="png")return{blob:await se(h,"image/png"),width:a,height:s,omitted:f};let A=new Uint8Array(await(await se(h,"image/jpeg",.92)).arrayBuffer());return{blob:ae(A,h,{width:a,height:s}),width:a,height:s,omitted:f}}i(at,"draw");var ce={draw:at};return ge(it);})();\n';
|
|
@@ -211,11 +212,12 @@ function renderPlugin(options = {}) {
|
|
|
211
212
|
}
|
|
212
213
|
|
|
213
214
|
// src/plugins/inspect/index.ts
|
|
214
|
-
var tab = (id, title, icon, order, load) => ({
|
|
215
|
+
var tab = (id, title, icon, order, load, selection) => ({
|
|
215
216
|
id,
|
|
216
217
|
title,
|
|
217
218
|
icon,
|
|
218
219
|
order,
|
|
220
|
+
selection,
|
|
219
221
|
mount: async (root, context) => (await load()).default(root, context)
|
|
220
222
|
});
|
|
221
223
|
function inspectPlugin() {
|
|
@@ -243,11 +245,11 @@ function inspectPlugin() {
|
|
|
243
245
|
run: { tab: OVERVIEW_TAB }
|
|
244
246
|
}],
|
|
245
247
|
tabs: [
|
|
246
|
-
tab("overview", "Overview", "overview", 10, () => import("./overview-
|
|
247
|
-
tab("data", "Data", "table", 20, () => import("./data-
|
|
248
|
-
tab("queries", "Queries", "query", 30, () => import("./queries-
|
|
249
|
-
tab("structure", "Structure", "tree", 40, () => import("./structure-
|
|
250
|
-
tab("declaration", "Declaration", "code", 50, () => import("./declaration-
|
|
248
|
+
tab("overview", "Overview", "overview", 10, () => import("./overview-JDPLGGP4.js")),
|
|
249
|
+
tab("data", "Data", "table", 20, () => import("./data-BGX3V42T.js")),
|
|
250
|
+
tab("queries", "Queries", "query", 30, () => import("./queries-QFN4DI25.js")),
|
|
251
|
+
tab("structure", "Structure", "tree", 40, () => import("./structure-Z2QK5MGH.js"), "pick"),
|
|
252
|
+
tab("declaration", "Declaration", "code", 50, () => import("./declaration-ZL5B676C.js"))
|
|
251
253
|
]
|
|
252
254
|
}
|
|
253
255
|
});
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
link,
|
|
11
11
|
note,
|
|
12
12
|
replace
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-F6B3EGFV.js";
|
|
14
14
|
import {
|
|
15
15
|
LINEAGE_TAB,
|
|
16
16
|
attributeFor,
|
|
@@ -200,17 +200,10 @@ function structureTab(root, context) {
|
|
|
200
200
|
const structure = panel.snapshot?.structure;
|
|
201
201
|
const selected = structure && panel.selection !== null ? findNode(structure.nodes, panel.selection) : void 0;
|
|
202
202
|
const problems = structure ? countProblems(structure.nodes) : 0;
|
|
203
|
+
head.hidden = problems === 0;
|
|
203
204
|
replace(
|
|
204
205
|
doc,
|
|
205
206
|
head,
|
|
206
|
-
h(doc, "button", {
|
|
207
|
-
type: "button",
|
|
208
|
-
class: "tool",
|
|
209
|
-
"aria-pressed": String(panel.picking),
|
|
210
|
-
"data-tip": "Click a part of the page to select it here. Esc stops.",
|
|
211
|
-
"data-testid": "pick",
|
|
212
|
-
onclick: () => panel.pick(!panel.picking)
|
|
213
|
-
}, icon(doc, "pick"), "Pick"),
|
|
214
207
|
problems > 0 && h(doc, "span", { class: "pill error", "data-tip": "Problems in the markup" }, plural(problems, "problem"))
|
|
215
208
|
);
|
|
216
209
|
if (structure && panel.selection !== null && panel.selection !== revealed) {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
popover,
|
|
6
6
|
replace,
|
|
7
7
|
tooltips
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-F6B3EGFV.js";
|
|
9
9
|
import {
|
|
10
10
|
LINEAGE_KINDS,
|
|
11
11
|
LINEAGE_PRESETS,
|
|
@@ -851,15 +851,15 @@ var LINEAGE_STYLES = `
|
|
|
851
851
|
.pane { position: relative; }
|
|
852
852
|
.mono { font-family: var(--anfra-font-mono); }
|
|
853
853
|
.wrap { overflow-wrap: anywhere; }
|
|
854
|
-
.kind-control { --kind:
|
|
855
|
-
.kind-dimension { --kind:
|
|
854
|
+
.kind-control { --kind: oklch(0.705 0.187 47.6); } .kind-block { --kind: oklch(0.585 0.204 277.1); } .kind-query { --kind: oklch(0.696 0.149 162.5); } .kind-metric { --kind: oklch(0.704 0.123 182.5); }
|
|
855
|
+
.kind-dimension { --kind: oklch(0.685 0.148 237.3); } .kind-dataset { --kind: oklch(0.769 0.165 70.1); } .kind-model { --kind: oklch(0.606 0.219 292.7); } .kind-table { --kind: oklch(0.554 0.041 257.4); }
|
|
856
856
|
.badge { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: color-mix(in srgb, var(--kind) 16%, transparent); color: var(--kind); }
|
|
857
857
|
/* Toolbar */
|
|
858
858
|
.ltoolbar { flex: none; position: relative; z-index: 3; padding: 8px 14px; border-bottom: 1px solid var(--anfra-color-border); }
|
|
859
859
|
.ltools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
|
860
860
|
.preset { min-width: 0; max-width: 180px; border: 1px solid var(--anfra-color-border); border-radius: 6px; background: var(--anfra-color-bg); color: var(--anfra-color-fg); padding: 3px 6px; font: inherit; font-size: 12px; }
|
|
861
861
|
.menu-wrap { position: relative; }
|
|
862
|
-
.menu { position: fixed; inset: auto; margin: 0; z-index: 10; min-width: 220px; max-height: calc(100vh - 16px); overflow: auto; color: var(--anfra-color-fg); padding: 4px; border: 1px solid var(--anfra-color-border); border-radius: 6px; background: var(--anfra-color-bg); box-shadow: 0 6px 20px
|
|
862
|
+
.menu { position: fixed; inset: auto; margin: 0; z-index: 10; min-width: 220px; max-height: calc(100vh - 16px); overflow: auto; color: var(--anfra-color-fg); padding: 4px; border: 1px solid var(--anfra-color-border); border-radius: 6px; background: var(--anfra-color-bg); box-shadow: 0 6px 20px oklch(0 0 0 / 0.15); }
|
|
863
863
|
.menu button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-radius: 4px; background: none; padding: 4px 8px; font-size: 12px; text-align: left; }
|
|
864
864
|
.menu button:hover { background: var(--hover); }
|
|
865
865
|
.menu button[aria-checked="false"] { color: var(--anfra-color-muted); }
|
|
@@ -868,7 +868,7 @@ var LINEAGE_STYLES = `
|
|
|
868
868
|
.menu .badge .icon { width: 12px; height: 12px; }
|
|
869
869
|
.count { margin-left: auto; color: var(--anfra-color-muted); font-variant-numeric: tabular-nums; }
|
|
870
870
|
.focus-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; }
|
|
871
|
-
.focus-chip { display: inline-flex; align-items: center; gap: 2px; min-width: 0; padding: 0 2px 0 8px; border-radius: 6px; background: color-mix(in srgb,
|
|
871
|
+
.focus-chip { display: inline-flex; align-items: center; gap: 2px; min-width: 0; padding: 0 2px 0 8px; border-radius: 6px; background: color-mix(in srgb, oklch(0.606 0.219 292.7) 16%, transparent); font-weight: 500; }
|
|
872
872
|
.focus-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
873
873
|
/* The legend's trigger is a popover's and a row action's: centred as a row action. */
|
|
874
874
|
.pop-trigger.row-action { display: grid; place-items: center; }
|
|
@@ -876,7 +876,7 @@ var LINEAGE_STYLES = `
|
|
|
876
876
|
.legend-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
|
|
877
877
|
.legend-row p { margin: 2px 0 0; color: var(--anfra-color-muted); }
|
|
878
878
|
.legend-line { flex: none; width: 40px; height: 0; border-top: 2px solid; }
|
|
879
|
-
.legend-line.uses { border-color:
|
|
879
|
+
.legend-line.uses { border-color: oklch(0.709 0.159 293.5); } .legend-line.filter-on { border-color: oklch(0.758 0.159 55.9); } .legend-line.filter-off { border-color: light-dark(oklch(0.928 0.006 264.5), oklch(0.446 0.026 256.8)); }
|
|
880
880
|
/* Notes */
|
|
881
881
|
.notes { flex: none; }
|
|
882
882
|
.banner { display: flex; align-items: flex-start; gap: 6px; padding: 6px 14px; border-bottom: 1px solid var(--anfra-color-border); background: var(--subtle); color: var(--anfra-color-muted); font-size: 12px; }
|
|
@@ -893,16 +893,16 @@ var LINEAGE_STYLES = `
|
|
|
893
893
|
.edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
|
|
894
894
|
.edge { fill: none; stroke-width: 1.25; }
|
|
895
895
|
.edge.on { stroke-width: 2; } .edge.dim { opacity: 0.15; }
|
|
896
|
-
.edge.uses { stroke:
|
|
897
|
-
.edge.filter-on { stroke:
|
|
898
|
-
.edge.filter-off { stroke: light-dark(
|
|
899
|
-
.m.uses path { fill:
|
|
900
|
-
.m.filter-on path { fill:
|
|
901
|
-
.m.filter-off path { fill: light-dark(
|
|
896
|
+
.edge.uses { stroke: oklch(0.709 0.159 293.5); } .edge.uses.on { stroke: oklch(0.541 0.247 293); }
|
|
897
|
+
.edge.filter-on { stroke: oklch(0.758 0.159 55.9); } .edge.filter-on.on { stroke: oklch(0.646 0.194 41.1); }
|
|
898
|
+
.edge.filter-off { stroke: light-dark(oklch(0.928 0.006 264.5), oklch(0.446 0.026 256.8)); } .edge.filter-off.on { stroke: oklch(0.714 0.019 261.3); }
|
|
899
|
+
.m.uses path { fill: oklch(0.709 0.159 293.5); } .m.uses.on path { fill: oklch(0.541 0.247 293); }
|
|
900
|
+
.m.filter-on path { fill: oklch(0.758 0.159 55.9); } .m.filter-on.on path { fill: oklch(0.646 0.194 41.1); }
|
|
901
|
+
.m.filter-off path { fill: light-dark(oklch(0.928 0.006 264.5), oklch(0.446 0.026 256.8)); } .m.filter-off.on path { fill: oklch(0.714 0.019 261.3); }
|
|
902
902
|
.lcard { position: absolute; left: 0; top: 0; width: 240px; padding: 8px 12px 10px; border: 1px solid var(--anfra-color-border); border-left: 3px solid var(--kind); border-radius: 8px;
|
|
903
|
-
background: var(--anfra-color-bg); box-shadow: 0 1px 2px
|
|
904
|
-
.lcard.selected { box-shadow: 0 0 0 2px color-mix(in srgb,
|
|
905
|
-
.lcard.on-path { border-top-color:
|
|
903
|
+
background: var(--anfra-color-bg); box-shadow: 0 1px 2px oklch(0 0 0 / 0.06); cursor: pointer; transition: opacity 0.15s, box-shadow 0.15s; }
|
|
904
|
+
.lcard.selected { box-shadow: 0 0 0 2px color-mix(in srgb, oklch(0.606 0.219 292.7) 70%, transparent); }
|
|
905
|
+
.lcard.on-path { border-top-color: oklch(0.811 0.101 293.6); border-right-color: oklch(0.811 0.101 293.6); border-bottom-color: oklch(0.811 0.101 293.6); }
|
|
906
906
|
.lcard.dim { opacity: 0.3; }
|
|
907
907
|
.lkind { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--anfra-color-muted); }
|
|
908
908
|
.ltitle { margin-top: 4px; font-size: 13px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
|
|
@@ -913,15 +913,15 @@ var LINEAGE_STYLES = `
|
|
|
913
913
|
.lvalue-label { flex: none; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--anfra-color-muted); font-style: normal; }
|
|
914
914
|
.ldesc { margin: 4px 0 0; font-size: 12px; line-height: 1.35; color: var(--anfra-color-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
915
915
|
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
|
|
916
|
-
.chip { padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb,
|
|
916
|
+
.chip { padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, oklch(0.606 0.219 292.7) 16%, transparent); color: light-dark(oklch(0.491 0.241 292.6), oklch(0.811 0.101 293.6)); font-family: var(--anfra-font-mono); font-size: 10px; }
|
|
917
917
|
.lerror { margin-top: 6px; font-size: 11px; color: var(--warn); overflow-wrap: anywhere; }
|
|
918
|
-
.lactions { position: absolute; top: -12px; right: 8px; display: none; gap: 2px; padding: 1px; border: 1px solid var(--anfra-color-border); border-radius: 6px; background: var(--anfra-color-bg); box-shadow: 0 1px 2px
|
|
918
|
+
.lactions { position: absolute; top: -12px; right: 8px; display: none; gap: 2px; padding: 1px; border: 1px solid var(--anfra-color-border); border-radius: 6px; background: var(--anfra-color-bg); box-shadow: 0 1px 2px oklch(0 0 0 / 0.08); }
|
|
919
919
|
.lcard:hover .lactions, .lcard:focus-within .lactions { display: flex; }
|
|
920
920
|
.controls { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: flex; flex-direction: column; padding: 2px; border: 1px solid var(--anfra-color-border); border-radius: 6px; background: var(--anfra-color-bg); }
|
|
921
921
|
/* The large view */
|
|
922
922
|
dialog.expanded { width: 95vw; height: 90vh; max-width: 95vw; max-height: 90vh; padding: 0; border: 1px solid var(--anfra-color-border); border-radius: 10px; background: var(--anfra-color-bg); color: var(--anfra-color-fg); overflow: hidden; }
|
|
923
923
|
dialog.expanded[open] { display: flex; flex-direction: column; }
|
|
924
|
-
dialog.expanded::backdrop { background:
|
|
924
|
+
dialog.expanded::backdrop { background: oklch(0 0 0 / 0.4); }
|
|
925
925
|
.dialog-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--anfra-color-border); }
|
|
926
926
|
.dialog-head h3 { margin: 0; font-size: 15px; }
|
|
927
927
|
.dialog-head p { margin: 2px 0 0; font-size: 12px; }
|
package/dist/testing.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bootstrap
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AG5TADHW.js";
|
|
4
4
|
import "./chunk-XIUFHRZE.js";
|
|
5
5
|
import {
|
|
6
6
|
createEndpoint
|
|
7
7
|
} from "./chunk-S6XLP6U4.js";
|
|
8
8
|
import {
|
|
9
9
|
PROVISION_ELEMENT_ID
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-RXPNL7UR.js";
|
|
11
|
+
import "./chunk-LWHVXXKQ.js";
|
|
12
12
|
import "./chunk-KCTLO3CO.js";
|
|
13
13
|
import "./chunk-PKBMQBKP.js";
|
|
14
14
|
|
|
@@ -204,7 +204,7 @@ interface paths {
|
|
|
204
204
|
};
|
|
205
205
|
get?: never;
|
|
206
206
|
put?: never;
|
|
207
|
-
/** Print the anfra version */
|
|
207
|
+
/** Print the anfra version, and say when anfra or the anfra skills are behind */
|
|
208
208
|
post: operations["core.version"];
|
|
209
209
|
delete?: never;
|
|
210
210
|
options?: never;
|
|
@@ -871,6 +871,11 @@ interface components {
|
|
|
871
871
|
"canal-query": string;
|
|
872
872
|
node: string;
|
|
873
873
|
};
|
|
874
|
+
SkillsResult: {
|
|
875
|
+
checked?: string;
|
|
876
|
+
latest?: string;
|
|
877
|
+
version?: string;
|
|
878
|
+
};
|
|
874
879
|
StatusResult: {
|
|
875
880
|
server?: components["schemas"]["ServerInfo"];
|
|
876
881
|
sidecars?: components["schemas"]["SidecarHealth"];
|
|
@@ -939,7 +944,7 @@ interface components {
|
|
|
939
944
|
latest: string;
|
|
940
945
|
};
|
|
941
946
|
ValidateInput: {
|
|
942
|
-
/** @description optional file globs; report only diagnostics for matching files */
|
|
947
|
+
/** @description optional file globs, at most 100; report only diagnostics for matching files */
|
|
943
948
|
globs?: string[];
|
|
944
949
|
};
|
|
945
950
|
ValidationReport: {
|
|
@@ -952,7 +957,13 @@ interface components {
|
|
|
952
957
|
type: string;
|
|
953
958
|
validator: string;
|
|
954
959
|
};
|
|
960
|
+
VersionInput: {
|
|
961
|
+
/** @description the version of the anfra skills in use, from the line ending each skill (anfra skills <version>), or unknown when a skill has no such line; adds the latest skills version to the answer */
|
|
962
|
+
skills?: string;
|
|
963
|
+
};
|
|
955
964
|
VersionResult: {
|
|
965
|
+
hints?: string[];
|
|
966
|
+
skills?: components["schemas"]["SkillsResult"];
|
|
956
967
|
update?: components["schemas"]["UpdateInfo"];
|
|
957
968
|
version: string;
|
|
958
969
|
};
|
|
@@ -1664,7 +1675,7 @@ interface operations {
|
|
|
1664
1675
|
};
|
|
1665
1676
|
requestBody: {
|
|
1666
1677
|
content: {
|
|
1667
|
-
"application/json": components["schemas"]["
|
|
1678
|
+
"application/json": components["schemas"]["VersionInput"];
|
|
1668
1679
|
};
|
|
1669
1680
|
};
|
|
1670
1681
|
responses: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holistics/anfra-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Data Apps on anfra: the authoring layer (app), what hosts one (host), anfra's plugins (plugins), the core API client (api), and their shared contract (common)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"openapi-typescript": "^7.13.0",
|
|
69
69
|
"tsup": "^9.0.0",
|
|
70
70
|
"typescript": "^5.9.3",
|
|
71
|
-
"vitest": "^4.1.
|
|
71
|
+
"vitest": "^4.1.12"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"openapi-fetch": "^0.17.0"
|
package/dist/chunk-F6MRA7J4.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// src/common/bridge.ts
|
|
2
|
-
var PROVISION_ELEMENT_ID = "anfra-provision";
|
|
3
|
-
|
|
4
|
-
// src/common/theme.ts
|
|
5
|
-
var THEME_TOKENS = [
|
|
6
|
-
"color-bg",
|
|
7
|
-
"color-fg",
|
|
8
|
-
"color-muted",
|
|
9
|
-
"color-border",
|
|
10
|
-
"color-accent",
|
|
11
|
-
"color-danger",
|
|
12
|
-
"radius",
|
|
13
|
-
"font",
|
|
14
|
-
"font-mono"
|
|
15
|
-
];
|
|
16
|
-
var FONT = 'system-ui, -apple-system, "Segoe UI", sans-serif';
|
|
17
|
-
var FONT_MONO = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
18
|
-
var DEFAULT_TOKENS = {
|
|
19
|
-
light: {
|
|
20
|
-
"color-bg": "#ffffff",
|
|
21
|
-
"color-fg": "#18181b",
|
|
22
|
-
"color-muted": "#71717a",
|
|
23
|
-
"color-border": "#e4e4e7",
|
|
24
|
-
"color-accent": "#5b3df5",
|
|
25
|
-
"color-danger": "#c4261d",
|
|
26
|
-
radius: "8px",
|
|
27
|
-
font: FONT,
|
|
28
|
-
"font-mono": FONT_MONO
|
|
29
|
-
},
|
|
30
|
-
dark: {
|
|
31
|
-
"color-bg": "#1c1c20",
|
|
32
|
-
"color-fg": "#ececef",
|
|
33
|
-
"color-muted": "#9a9aa5",
|
|
34
|
-
"color-border": "#2f2f36",
|
|
35
|
-
"color-accent": "#a594ff",
|
|
36
|
-
"color-danger": "#f97066",
|
|
37
|
-
radius: "8px",
|
|
38
|
-
font: FONT,
|
|
39
|
-
"font-mono": FONT_MONO
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
var UNSAFE_VALUE = /[;{}<>]|url\(|expression\(|@import|\\/i;
|
|
43
|
-
function resolveTheme(input) {
|
|
44
|
-
const given = typeof input === "object" && input !== null ? input : {};
|
|
45
|
-
const scheme = given.scheme === "dark" ? "dark" : "light";
|
|
46
|
-
const tokens = { ...DEFAULT_TOKENS[scheme] };
|
|
47
|
-
const set = typeof given.tokens === "object" && given.tokens !== null ? given.tokens : {};
|
|
48
|
-
for (const name of THEME_TOKENS) {
|
|
49
|
-
const value = set[name];
|
|
50
|
-
if (typeof value === "string" && value.trim() !== "" && value.length <= 200 && !UNSAFE_VALUE.test(value)) tokens[name] = value.trim();
|
|
51
|
-
}
|
|
52
|
-
return Object.freeze({ scheme, tokens: Object.freeze(tokens) });
|
|
53
|
-
}
|
|
54
|
-
function applyTheme(style, theme) {
|
|
55
|
-
for (const name of THEME_TOKENS) style.setProperty(`--anfra-${name}`, theme.tokens[name]);
|
|
56
|
-
style.setProperty("color-scheme", theme.scheme);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
PROVISION_ELEMENT_ID,
|
|
61
|
-
THEME_TOKENS,
|
|
62
|
-
DEFAULT_TOKENS,
|
|
63
|
-
resolveTheme,
|
|
64
|
-
applyTheme
|
|
65
|
-
};
|