@kanonak-protocol/sdk 3.44.8 → 3.44.9

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.
@@ -14,7 +14,7 @@ ${i.join(`
14
14
  <tbody>
15
15
  ${a}
16
16
  </tbody>
17
- </table>`}function ge(f){let e=De(f);return e=e.replace(/`([^`\n]+)`/g,(t,n)=>`<code>${n}</code>`),e=e.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(t,n,s)=>`<a href="${He(s)}">${n}</a>`),e=e.replace(/\*\*([^*\n]+)\*\*/g,(t,n)=>`<strong>${n}</strong>`),e=e.replace(/(^|[^*])\*([^*\n]+)\*(?!\*)/g,(t,n,s)=>`${n}<em>${s}</em>`),e=e.replace(/(^|[\s(])_([^_\n]+)_(?=[\s).,;:!?]|$)/g,(t,n,s)=>`${n}<em>${s}</em>`),e}function De(f){return f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function He(f){return f.replace(/"/g,"&quot;").replace(/&/g,"&amp;")}var ye={publisher:"kanonak.org",package_:"derivation",name:"look"},xe={publisher:"kanonak.org",package_:"derivation",name:"tokens"},ae={publisher:"kanonak.org",package_:"core-rdf",name:"Resource"},A={publisher:"kanonak.org",package_:"core-rdf",name:"label"},he={publisher:"kanonak.org",package_:"core-rdf",name:"comment"},ln={publisher:"kanonak.org",package_:"look",name:"Hero"},un={publisher:"kanonak.org",package_:"look",name:"PropertyList"},dn={publisher:"kanonak.org",package_:"look",name:"BadgeRow"},pn={publisher:"kanonak.org",package_:"look",name:"ChipRow"},fn={publisher:"kanonak.org",package_:"look",name:"ReferenceList"},kn={publisher:"kanonak.org",package_:"look",name:"ReferencedBy"},Ge={publisher:"kanonak.org",package_:"look",name:"Markdown"},ve={publisher:"kanonak.org",package_:"look",name:"NavGroup"},Ue={publisher:"kanonak.org",package_:"look",name:"NavLink"},We={publisher:"kanonak.org",package_:"look",name:"target"},gn={publisher:"kanonak.org",package_:"look",name:"ResourceGrid"},hn={publisher:"kanonak.org",package_:"look",name:"Timeline"},mn={publisher:"kanonak.org",package_:"look",name:"VersionDiff"},bn={publisher:"kanonak.org",package_:"look",name:"Figure"},$n={publisher:"kanonak.org",package_:"look",name:"StatRow"},jn={publisher:"kanonak.org",package_:"look",name:"Horizon"},vn={publisher:"kanonak.org",package_:"look",name:"PackageContents"},Oe={publisher:"kanonak.org",package_:"core-kanonak",name:"Package"},_n={publisher:"kanonak.org",package_:"look",name:"FeaturedResource"},Rn={publisher:"kanonak.org",package_:"look",name:"PublisherPackages"},Sn={publisher:"kanonak.org",package_:"look",name:"PublisherView"},Kn={publisher:"kanonak.org",package_:"look",name:"Distribution"},yn={publisher:"kanonak.org",package_:"look",name:"alphaPath"},xn={publisher:"kanonak.org",package_:"look",name:"betaPath"},ze={publisher:"kanonak.org",package_:"look",name:"SectionHeading"},On={publisher:"kanonak.org",package_:"look",name:"SectionNav"},Ye={publisher:"kanonak.org",package_:"look",name:"heading"},Ln={publisher:"kanonak.org",package_:"look",name:"note"},wn={publisher:"kanonak.org",package_:"look",name:"VersionDelta"},Un={publisher:"kanonak.org",package_:"look",name:"TimePlot"},Fn={publisher:"kanonak.org",package_:"look",name:"Details"},In={publisher:"kanonak.org",package_:"look",name:"skip"},En={publisher:"kanonak.org",package_:"derivation",name:"derivations"},Pn={publisher:"kanonak.org",package_:"look",name:"laneBy"},Tn={publisher:"kanonak.org",package_:"look",name:"stats"},Cn={publisher:"kanonak.org",package_:"look",name:"statPath"},An={publisher:"kanonak.org",package_:"look",name:"statLabel"},qe={publisher:"kanonak.org",package_:"look",name:"labelPath"},Nn={publisher:"kanonak.org",package_:"look",name:"badgePath"},Fe={publisher:"kanonak.org",package_:"look",name:"orderBy"},Je={publisher:"kanonak.org",package_:"look",name:"track"},_e={publisher:"kanonak.org",package_:"look",name:"metricPath"},Ie={publisher:"kanonak.org",package_:"look",name:"hueBy"},Ze={publisher:"kanonak.org",package_:"look",name:"lowerPath"},Xe={publisher:"kanonak.org",package_:"look",name:"upperPath"},Mn={publisher:"kanonak.org",package_:"look",name:"axisMin"},Vn={publisher:"kanonak.org",package_:"look",name:"axisMax"},Bn={publisher:"kanonak.org",package_:"look",name:"valueLabel"};var Qe={publisher:"kanonak.org",package_:"look",name:"semanticSvg"},Dn={publisher:"kanonak.org",package_:"look",name:"tierChip"},Hn={publisher:"kanonak.org",package_:"look",name:"tierIcon"},Gn={publisher:"kanonak.org",package_:"look",name:"tierCard"},Wn={publisher:"kanonak.org",package_:"look",name:"tierFull"},zn={publisher:"kanonak.org",package_:"core-rdf",name:"type"},Ee={publisher:"kanonak.org",package_:"look",name:"bands"},Yn={publisher:"kanonak.org",package_:"look",name:"title"},qn={publisher:"kanonak.org",package_:"look",name:"eyebrow"},Jn={publisher:"kanonak.org",package_:"look",name:"subtitle"},en={publisher:"kanonak.org",package_:"look",name:"badges"},q={publisher:"kanonak.org",package_:"look",name:"source"},Zn={publisher:"kanonak.org",package_:"look",name:"via"},Xn={publisher:"kanonak.org",package_:"look",name:"size"},Qn={publisher:"kanonak.org",package_:"look",name:"icon"},et={publisher:"kanonak.org",package_:"look",name:"chips"},Pe={publisher:"kanonak.org",package_:"look",name:"entries"},nt={publisher:"kanonak.org",package_:"look",name:"urlForm"},Ne=class{constructor(e){this.catalog=e}catalog;findCascadedLook(e){let t=Re(e);if(t)return{declaration:t,sourceClass:{publisher:H(e),package_:(e.namespace||"").split("/")[1]?.split("@")[0]??"",name:e.name}};let n=new Set,s=de(e);for(;s.length>0;){let a=s.shift(),r=tt(a.subject),o=X(r);if(n.has(o))continue;n.add(o);let i=re(this.catalog,r);for(let c of i){let l=Re(c);if(l)return{declaration:l,sourceClass:{publisher:r.publisher,package_:r.package_,name:r.name}}}for(let c of i)for(let l of Se(c))s.push(l)}if(!n.has(X(ae)))for(let a of re(this.catalog,ae)){let r=Re(a);if(r)return{declaration:r,sourceClass:{...ae}}}}findCascadedTokens(e){let t=new Map;for(let[a,r]of Te(e))t.has(a)||t.set(a,r);let n=new Set,s=de(e);for(;s.length>0;){let a=s.shift(),r=X(a.subject);if(n.has(r))continue;n.add(r);let o=re(this.catalog,a.subject);if(o.length!==0)for(let i of o){for(let[c,l]of Te(i))t.has(c)||t.set(c,l);for(let c of Se(i))s.push(c)}}if(!n.has(X(ae))){let a=re(this.catalog,ae);for(let r of a)for(let[o,i]of Te(r))t.has(o)||t.set(o,i)}return t}renderSvg(e){let t=m(e,A)??e.name,n=(t.trim().charAt(0)||"?").toUpperCase(),s=`${e.namespace??""}/${e.name}`,a={label:t,firstLetter:n,uri:s},r=this.collectCascadedSvgTiers(e),o=h=>this.applyPlaceholders(h,e,a),i=o(r.tierChip??""),c=o(r.tierIcon??""),l=o(r.tierCard??""),p=o(r.tierFull??""),k=[...this.findCascadedTokens(e)].map(([h,g])=>`--kan-${h}: ${g};`).join(" ");return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400" width="400" height="400" style="${oe(k)}">
17
+ </table>`}function ge(f){let e=De(f);return e=e.replace(/`([^`\n]+)`/g,(t,n)=>`<code>${n}</code>`),e=e.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(t,n,s)=>`<a href="${He(s)}">${n}</a>`),e=e.replace(/\*\*([^*\n]+)\*\*/g,(t,n)=>`<strong>${n}</strong>`),e=e.replace(/(^|[^*])\*([^*\n]+)\*(?!\*)/g,(t,n,s)=>`${n}<em>${s}</em>`),e=e.replace(/(^|[\s(])_([^_\n]+)_(?=[\s).,;:!?]|$)/g,(t,n,s)=>`${n}<em>${s}</em>`),e}function De(f){return f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function He(f){return f.replace(/"/g,"&quot;").replace(/&/g,"&amp;")}var ye={publisher:"kanonak.org",package_:"derivation",name:"look"},xe={publisher:"kanonak.org",package_:"derivation",name:"tokens"},ae={publisher:"kanonak.org",package_:"core-rdf",name:"Resource"},A={publisher:"kanonak.org",package_:"core-rdf",name:"label"},he={publisher:"kanonak.org",package_:"core-rdf",name:"comment"},ln={publisher:"kanonak.org",package_:"look",name:"Hero"},un={publisher:"kanonak.org",package_:"look",name:"PropertyList"},dn={publisher:"kanonak.org",package_:"look",name:"BadgeRow"},pn={publisher:"kanonak.org",package_:"look",name:"ChipRow"},fn={publisher:"kanonak.org",package_:"look",name:"ReferenceList"},kn={publisher:"kanonak.org",package_:"look",name:"ReferencedBy"},Ge={publisher:"kanonak.org",package_:"look",name:"Markdown"},ve={publisher:"kanonak.org",package_:"look",name:"NavGroup"},Ue={publisher:"kanonak.org",package_:"look",name:"NavLink"},We={publisher:"kanonak.org",package_:"look",name:"target"},gn={publisher:"kanonak.org",package_:"look",name:"ResourceGrid"},hn={publisher:"kanonak.org",package_:"look",name:"Timeline"},mn={publisher:"kanonak.org",package_:"look",name:"VersionDiff"},bn={publisher:"kanonak.org",package_:"look",name:"Figure"},$n={publisher:"kanonak.org",package_:"look",name:"StatRow"},jn={publisher:"kanonak.org",package_:"look",name:"Horizon"},vn={publisher:"kanonak.org",package_:"look",name:"PackageContents"},Oe={publisher:"kanonak.org",package_:"core-kanonak",name:"Package"},_n={publisher:"kanonak.org",package_:"look",name:"FeaturedResource"},Rn={publisher:"kanonak.org",package_:"look",name:"PublisherPackages"},Sn={publisher:"kanonak.org",package_:"look",name:"PublisherView"},Kn={publisher:"kanonak.org",package_:"look",name:"Distribution"},yn={publisher:"kanonak.org",package_:"look",name:"alphaPath"},xn={publisher:"kanonak.org",package_:"look",name:"betaPath"},ze={publisher:"kanonak.org",package_:"look",name:"SectionHeading"},On={publisher:"kanonak.org",package_:"look",name:"SectionNav"},Ye={publisher:"kanonak.org",package_:"look",name:"heading"},Ln={publisher:"kanonak.org",package_:"look",name:"note"},wn={publisher:"kanonak.org",package_:"look",name:"VersionDelta"},Un={publisher:"kanonak.org",package_:"look",name:"TimePlot"},Fn={publisher:"kanonak.org",package_:"look",name:"Details"},In={publisher:"kanonak.org",package_:"look",name:"skip"},En={publisher:"kanonak.org",package_:"derivation",name:"derivations"},Pn={publisher:"kanonak.org",package_:"look",name:"laneBy"},Tn={publisher:"kanonak.org",package_:"look",name:"stats"},Cn={publisher:"kanonak.org",package_:"look",name:"statPath"},An={publisher:"kanonak.org",package_:"look",name:"statLabel"},qe={publisher:"kanonak.org",package_:"look",name:"labelPath"},Nn={publisher:"kanonak.org",package_:"look",name:"badgePath"},Fe={publisher:"kanonak.org",package_:"look",name:"orderBy"},Je={publisher:"kanonak.org",package_:"look",name:"track"},_e={publisher:"kanonak.org",package_:"look",name:"metricPath"},Ie={publisher:"kanonak.org",package_:"look",name:"hueBy"},Ze={publisher:"kanonak.org",package_:"look",name:"lowerPath"},Xe={publisher:"kanonak.org",package_:"look",name:"upperPath"},Mn={publisher:"kanonak.org",package_:"look",name:"axisMin"},Vn={publisher:"kanonak.org",package_:"look",name:"axisMax"},Bn={publisher:"kanonak.org",package_:"look",name:"valueLabel"};var Qe={publisher:"kanonak.org",package_:"look",name:"semanticSvg"},Dn={publisher:"kanonak.org",package_:"look",name:"tierChip"},Hn={publisher:"kanonak.org",package_:"look",name:"tierIcon"},Gn={publisher:"kanonak.org",package_:"look",name:"tierCard"},Wn={publisher:"kanonak.org",package_:"look",name:"tierFull"},zn={publisher:"kanonak.org",package_:"core-rdf",name:"type"},Ee={publisher:"kanonak.org",package_:"look",name:"bands"},Yn={publisher:"kanonak.org",package_:"look",name:"title"},qn={publisher:"kanonak.org",package_:"look",name:"eyebrow"},Jn={publisher:"kanonak.org",package_:"look",name:"subtitle"},en={publisher:"kanonak.org",package_:"look",name:"badges"},q={publisher:"kanonak.org",package_:"look",name:"source"},Zn={publisher:"kanonak.org",package_:"look",name:"via"},Xn={publisher:"kanonak.org",package_:"look",name:"size"},Qn={publisher:"kanonak.org",package_:"look",name:"icon"},et={publisher:"kanonak.org",package_:"look",name:"chips"},Pe={publisher:"kanonak.org",package_:"look",name:"entries"},nt={publisher:"kanonak.org",package_:"look",name:"urlForm"},Ne=class{constructor(e){this.catalog=e}catalog;findCascadedLook(e){let t=Re(e);if(t)return{declaration:t,sourceClass:{publisher:H(e),package_:(e.namespace||"").split("/")[1]?.split("@")[0]??"",name:e.name}};let n=new Set,s=de(e);for(;s.length>0;){let a=s.shift(),r=tt(a.subject),o=X(r);if(n.has(o))continue;n.add(o);let i=re(this.catalog,r);for(let c of i){let l=Re(c);if(l)return{declaration:l,sourceClass:{publisher:r.publisher,package_:r.package_,name:r.name}}}for(let c of i)for(let l of Se(c))s.push(l)}if(!n.has(X(ae)))for(let a of re(this.catalog,ae)){let r=Re(a);if(r)return{declaration:r,sourceClass:{...ae}}}}findCascadedTokens(e){let t=new Map;for(let[a,r]of Te(e))t.has(a)||t.set(a,r);let n=new Set,s=de(e);for(;s.length>0;){let a=s.shift(),r=X(a.subject);if(n.has(r))continue;n.add(r);let o=re(this.catalog,a.subject);if(o.length!==0)for(let i of o){for(let[c,l]of Te(i))t.has(c)||t.set(c,l);for(let c of Se(i))s.push(c)}}if(!n.has(X(ae))){let a=re(this.catalog,ae);for(let r of a)for(let[o,i]of Te(r))t.has(o)||t.set(o,i)}return t}renderSvg(e){let t=m(e,A)??e.name,n=(t.trim().charAt(0)||"?").toUpperCase(),s=`${e.namespace??""}/${e.name}`,a={label:t,firstLetter:n,uri:s},r=this.collectCascadedSvgTiers(e),o=h=>this.applyPlaceholders(h,e,a),i=o(r.tierChip??""),c=o(r.tierIcon??""),l=o(r.tierCard??""),p=o(r.tierFull??""),k=[...this.findCascadedTokens(e)].map(([h,g])=>`--kan-${h}: ${g};`).join(" ");return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400" style="${oe(k)}">
18
18
  <style>
19
19
  .tier-chip,.tier-icon,.tier-card{display:none}
20
20
  .tier-full{display:block}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as et,b as tt,c as rt,d as nt,e as ot,f as at,g as it,h as st,i as ct,j as lt}from"./chunk-IOJMTW4T.js";import{b as Xt}from"./chunk-ZI7Y5RI3.js";import{a as Xe,b as Ze,c as Qe,d as b,e as S,f as i}from"./chunk-RCI34BYO.js";import{a as Yt}from"./chunk-BFZZ6YGX.js";import{a as Te,b as je,c as Le,d as Fe,e as Ne}from"./chunk-5AH6GIPO.js";import{a as Be,b as De,c as Oe,d as Ae}from"./chunk-VHUJSHH7.js";import{a as ut,b as pt,c as mt,d as ft}from"./chunk-NIJV5UYW.js";import{a as Ye,b as yt,c as gt,d as ht,e as bt}from"./chunk-4TJZIM7A.js";import{a as kt}from"./chunk-NIGFQYVA.js";import{A as Gt,B as Wt,C as Jt,D as qt,a as St,b as Ct,c as Pt,d as Rt,e as wt,f as xt,g as $t,h as vt,i as Et,j as Kt,k as Bt,l as It,m as Tt,n as jt,o as Lt,p as Ft,q as Nt,r as Dt,s as Ot,t as At,u as Ut,v as Mt,w as Vt,x as Ht,y as _t,z as zt}from"./chunk-SKTXJV4T.js";import"./chunk-FJ35VIV6.js";import{a as F,b as D,c as _e,d as We,e as Je,f as qe}from"./chunk-FMYLEPMC.js";import{a as Ue,b as j,c as L,d as N,e as Ve,f as He,g as O,h as A,i as U,j as M,k as V,l as H}from"./chunk-W6T7MOKY.js";import{a as Ie}from"./chunk-7CUTGGH3.js";import{a as Pe,b as Re,c as we,d as xe,e as $e,f as ve,g as Ee,h as Ke}from"./chunk-FQHALFRR.js";import{b as ze,c as Ge}from"./chunk-HEMBMX7T.js";import{a as Me}from"./chunk-FUUTGGJS.js";import{a as dt}from"./chunk-ODIECDN7.js";import{VersionOperator as io}from"@kanonak-protocol/types/document/models/enums";import{existsSync as yr,readFileSync as gr}from"fs";import{homedir as hr}from"os";import{join as kr}from"path";import{execFile as Zt}from"child_process";import{promisify as Qt}from"util";var C=Qt(Zt),P="kanonak",R="/usr/bin/security",p=class{async get(e){let r=i(e);try{let{stdout:n}=await C(R,["find-generic-password","-s",P,"-a",r,"-w"],{timeout:1e4});try{return JSON.parse(n.trim())}catch{throw new Error(`Stored credential for '${r}' is corrupted (not valid JSON).
1
+ import{a as et,b as tt,c as rt,d as nt,e as ot,f as at,g as it,h as st,i as ct,j as lt}from"./chunk-IOJMTW4T.js";import{b as Xt}from"./chunk-G44YB2H2.js";import{a as Xe,b as Ze,c as Qe,d as b,e as S,f as i}from"./chunk-RCI34BYO.js";import{a as Yt}from"./chunk-BFZZ6YGX.js";import{a as Te,b as je,c as Le,d as Fe,e as Ne}from"./chunk-5AH6GIPO.js";import{a as Be,b as De,c as Oe,d as Ae}from"./chunk-VHUJSHH7.js";import{a as ut,b as pt,c as mt,d as ft}from"./chunk-NIJV5UYW.js";import{a as Ye,b as yt,c as gt,d as ht,e as bt}from"./chunk-4TJZIM7A.js";import{a as kt}from"./chunk-NIGFQYVA.js";import{A as Gt,B as Wt,C as Jt,D as qt,a as St,b as Ct,c as Pt,d as Rt,e as wt,f as xt,g as $t,h as vt,i as Et,j as Kt,k as Bt,l as It,m as Tt,n as jt,o as Lt,p as Ft,q as Nt,r as Dt,s as Ot,t as At,u as Ut,v as Mt,w as Vt,x as Ht,y as _t,z as zt}from"./chunk-SKTXJV4T.js";import"./chunk-FJ35VIV6.js";import{a as F,b as D,c as _e,d as We,e as Je,f as qe}from"./chunk-FMYLEPMC.js";import{a as Ue,b as j,c as L,d as N,e as Ve,f as He,g as O,h as A,i as U,j as M,k as V,l as H}from"./chunk-W6T7MOKY.js";import{a as Ie}from"./chunk-7CUTGGH3.js";import{a as Pe,b as Re,c as we,d as xe,e as $e,f as ve,g as Ee,h as Ke}from"./chunk-FQHALFRR.js";import{b as ze,c as Ge}from"./chunk-HEMBMX7T.js";import{a as Me}from"./chunk-FUUTGGJS.js";import{a as dt}from"./chunk-ODIECDN7.js";import{VersionOperator as io}from"@kanonak-protocol/types/document/models/enums";import{existsSync as yr,readFileSync as gr}from"fs";import{homedir as hr}from"os";import{join as kr}from"path";import{execFile as Zt}from"child_process";import{promisify as Qt}from"util";var C=Qt(Zt),P="kanonak",R="/usr/bin/security",p=class{async get(e){let r=i(e);try{let{stdout:n}=await C(R,["find-generic-password","-s",P,"-a",r,"-w"],{timeout:1e4});try{return JSON.parse(n.trim())}catch{throw new Error(`Stored credential for '${r}' is corrupted (not valid JSON).
2
2
  Run 'kanonak logout ${r}' then 'kanonak login ${r}' to fix.`)}}catch(n){if(X(n,44))return null;throw new Error(`macOS Keychain read failed for '${r}': ${w(n)}
3
3
  The Keychain may be locked or inaccessible.
4
4
  Try unlocking it via Keychain Access.app or running 'security unlock-keychain'.`)}}async store(e,r){let n=i(e),o=JSON.stringify(r);try{await C(R,["add-generic-password","-s",P,"-a",n,"-U","-w",o],{timeout:1e4})}catch(a){throw new Error(`macOS Keychain write failed for '${n}': ${w(a)}
@@ -1,4 +1,4 @@
1
- import{b as E,c as F,d as f,f as M}from"../chunk-2JQMUZWN.js";import{a as X,b as ye}from"../chunk-ZI7Y5RI3.js";import{a as Oe}from"../chunk-BFZZ6YGX.js";import"../chunk-NIJV5UYW.js";import"../chunk-NIGFQYVA.js";import{a as Ue}from"../chunk-FJ35VIV6.js";import{a as C,c as Re,f as Ce}from"../chunk-FMYLEPMC.js";import{b as K,c as w,d as b,g as L,h as U,i as O,j,k as T,l as S}from"../chunk-W6T7MOKY.js";import{a as Le}from"../chunk-7CUTGGH3.js";import"../chunk-HEMBMX7T.js";import"../chunk-FUUTGGJS.js";var gt="kanonak.org",yt="document-ast",m=t=>({publisher:gt,package_:yt,name:t}),k={Document:m("Document"),Block:m("Block"),Inline:m("Inline"),StructuredValue:m("StructuredValue"),Heading:m("Heading"),Paragraph:m("Paragraph"),RawBlock:m("RawBlock"),Text:m("Text"),StructuredMap:m("StructuredMap"),StructuredEntry:m("StructuredEntry"),StructuredList:m("StructuredList"),StringScalar:m("StringScalar"),IntegerScalar:m("IntegerScalar"),EscapeHint:m("EscapeHint"),MediaType:m("MediaType"),metadata:m("metadata"),children:m("children"),level:m("level"),inlines:m("inlines"),text:m("text"),entries:m("entries"),key:m("key"),value:m("value"),escapeHint:m("escapeHint"),items:m("items"),stringValue:m("stringValue"),integerValue:m("integerValue"),rawContent:m("rawContent"),mediaType:m("mediaType"),mimeType:m("mimeType"),ESC_RAW:m("esc-raw"),ESC_YAML_SAFE:m("esc-yaml-safe"),ESC_TOML_STRING:m("esc-toml-string"),ESC_TOML_MULTILINE:m("esc-toml-multiline"),ESC_JSON:m("esc-json"),ESC_DYNAMODB_BOOL:m("esc-dynamodb-bool"),ESC_DYNAMODB_NUMBER:m("esc-dynamodb-number"),ESC_DYNAMODB_NULL:m("esc-dynamodb-null"),TEXT_PLAIN:m("text-plain"),TEXT_MARKDOWN:m("text-markdown"),TEXT_HTML:m("text-html"),TEXT_CSS:m("text-css"),APPLICATION_JSON:m("application-json"),TEXT_YAML:m("text-yaml"),IMAGE_SVG_XML:m("image-svg-xml"),ResourceLink:m("ResourceLink"),target:m("target"),linkLabel:m("linkLabel"),PropertyList:m("PropertyList"),propertyEntries:m("propertyEntries"),PropertyEntry:m("PropertyEntry"),propertyKey:m("propertyKey"),propertyValue:m("propertyValue"),Table:m("Table"),tableColumnLabels:m("tableColumnLabels"),tableRows:m("tableRows"),TableRow:m("TableRow"),tableCells:m("tableCells")};function Ne(t,e){return t.publisher===e.publisher&&t.package_===e.package_&&t.name===e.name}var Y=class{backendUri="kanonak.org/transformations/markdown-with-frontmatter";render(e,n){let r=kt(e.metadata,n),a=wt(e.children),u=["---",...r,"---","",a].join(`
1
+ import{b as E,c as F,d as f,f as M}from"../chunk-2JQMUZWN.js";import{a as X,b as ye}from"../chunk-G44YB2H2.js";import{a as Oe}from"../chunk-BFZZ6YGX.js";import"../chunk-NIJV5UYW.js";import"../chunk-NIGFQYVA.js";import{a as Ue}from"../chunk-FJ35VIV6.js";import{a as C,c as Re,f as Ce}from"../chunk-FMYLEPMC.js";import{b as K,c as w,d as b,g as L,h as U,i as O,j,k as T,l as S}from"../chunk-W6T7MOKY.js";import{a as Le}from"../chunk-7CUTGGH3.js";import"../chunk-HEMBMX7T.js";import"../chunk-FUUTGGJS.js";var gt="kanonak.org",yt="document-ast",m=t=>({publisher:gt,package_:yt,name:t}),k={Document:m("Document"),Block:m("Block"),Inline:m("Inline"),StructuredValue:m("StructuredValue"),Heading:m("Heading"),Paragraph:m("Paragraph"),RawBlock:m("RawBlock"),Text:m("Text"),StructuredMap:m("StructuredMap"),StructuredEntry:m("StructuredEntry"),StructuredList:m("StructuredList"),StringScalar:m("StringScalar"),IntegerScalar:m("IntegerScalar"),EscapeHint:m("EscapeHint"),MediaType:m("MediaType"),metadata:m("metadata"),children:m("children"),level:m("level"),inlines:m("inlines"),text:m("text"),entries:m("entries"),key:m("key"),value:m("value"),escapeHint:m("escapeHint"),items:m("items"),stringValue:m("stringValue"),integerValue:m("integerValue"),rawContent:m("rawContent"),mediaType:m("mediaType"),mimeType:m("mimeType"),ESC_RAW:m("esc-raw"),ESC_YAML_SAFE:m("esc-yaml-safe"),ESC_TOML_STRING:m("esc-toml-string"),ESC_TOML_MULTILINE:m("esc-toml-multiline"),ESC_JSON:m("esc-json"),ESC_DYNAMODB_BOOL:m("esc-dynamodb-bool"),ESC_DYNAMODB_NUMBER:m("esc-dynamodb-number"),ESC_DYNAMODB_NULL:m("esc-dynamodb-null"),TEXT_PLAIN:m("text-plain"),TEXT_MARKDOWN:m("text-markdown"),TEXT_HTML:m("text-html"),TEXT_CSS:m("text-css"),APPLICATION_JSON:m("application-json"),TEXT_YAML:m("text-yaml"),IMAGE_SVG_XML:m("image-svg-xml"),ResourceLink:m("ResourceLink"),target:m("target"),linkLabel:m("linkLabel"),PropertyList:m("PropertyList"),propertyEntries:m("propertyEntries"),PropertyEntry:m("PropertyEntry"),propertyKey:m("propertyKey"),propertyValue:m("propertyValue"),Table:m("Table"),tableColumnLabels:m("tableColumnLabels"),tableRows:m("tableRows"),TableRow:m("TableRow"),tableCells:m("tableCells")};function Ne(t,e){return t.publisher===e.publisher&&t.package_===e.package_&&t.name===e.name}var Y=class{backendUri="kanonak.org/transformations/markdown-with-frontmatter";render(e,n){let r=kt(e.metadata,n),a=wt(e.children),u=["---",...r,"---","",a].join(`
2
2
  `);return n?.trailingNewline&&(u.endsWith(`
3
3
  `)||(u+=`
4
4
  `)),u}};function kt(t,e){if(!t)return[];let n=new Map;for(let c of t.entries)n.set(ue(c.key),c);let r=new Map;if(e?.metadataRenames)for(let[c,l]of e.metadataRenames)r.set(ue(c),l);let i=(e?.metadataKeys??t.entries.map(c=>c.key)).map(ue),u=[];for(let c of i){let l=n.get(c);if(!l)continue;let p=r.get(c),y=ue(p??c),h=Ie(l.value,l.escapeHint);h!==void 0&&u.push(`${y}: ${h}`)}return u}function ue(t){let e=t.lastIndexOf(".");return e===-1?t:t.substring(e+1)||t}function Ie(t,e){switch(t.kind){case"StringScalar":return ht(t.stringValue,e);case"IntegerScalar":return String(t.integerValue);case"StructuredList":{let n=[];for(let r of t.items){let a=Ie(r,e);a!==void 0&&n.push(a)}return n.join(", ")}case"StructuredMap":return;default:return}}function ht(t,e){return!e||Ne(e,k.ESC_RAW)?t:Ne(e,k.ESC_YAML_SAFE)?bt(t):t}function bt(t){return t.includes(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanonak-protocol/sdk",
3
- "version": "3.44.8",
3
+ "version": "3.44.9",
4
4
  "description": "Kanonak Protocol SDK - Document repository and parsing implementations for TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -113,7 +113,7 @@
113
113
  "yaml-parser"
114
114
  ],
115
115
  "dependencies": {
116
- "@kanonak-protocol/types": "^3.44.8",
116
+ "@kanonak-protocol/types": "^3.44.9",
117
117
  "ignore": "^7.0.5",
118
118
  "js-yaml": "^4.1.0",
119
119
  "yaml": "^2.7.0"