@callimacus/thamyr 4.16.0 → 4.17.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/CHANGELOG.core.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.17.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-core-v4.16.0...thamyr-core-v4.17.0) (2026-10-31)
7
+
8
+
9
+ ### Features
10
+
11
+ * **thamyr:** a site on evaluation shows the SDK's banner, the countdown and the Claim button, out of the site's code (contract synced from core v21.12.0) ([#869](https://github.com/callimacus/thamyr-sdk/issues/869)) ([3cd1d51](https://github.com/callimacus/thamyr-sdk/commit/3cd1d5125094cedf087eeeb8f0521d0d9b354e6b))
12
+
6
13
  ## [4.16.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-core-v4.15.0...thamyr-core-v4.16.0) (2026-10-31)
7
14
 
8
15
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.17.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-v4.16.0...thamyr-v4.17.0) (2026-10-31)
7
+
8
+
9
+ ### Features
10
+
11
+ * **thamyr:** a site on evaluation shows the SDK's banner, the countdown and the Claim button, out of the site's code (contract synced from core v21.12.0) ([#869](https://github.com/callimacus/thamyr-sdk/issues/869)) ([3cd1d51](https://github.com/callimacus/thamyr-sdk/commit/3cd1d5125094cedf087eeeb8f0521d0d9b354e6b))
12
+
13
+
14
+ ### Dependencies
15
+
16
+ * The following workspace dependencies were updated
17
+ * dependencies
18
+ * @callimacus/thamyr-core bumped from ^4.16.0 to ^4.17.0
19
+
6
20
  ## [4.16.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-v4.15.0...thamyr-v4.16.0) (2026-10-31)
7
21
 
8
22
 
package/dist/esm/index.js CHANGED
@@ -5,5 +5,5 @@
5
5
  * See LICENSE.md for the full terms.
6
6
  *
7
7
  */
8
- import{callimacusService as n,createContractClient as e,logger as t,CallimacusApi as o,UserInteractionType as s,SLInputEventType as r,landingRound as a,interactionRound as i}from"@callimacus/thamyr-core";export*from"@callimacus/thamyr-core";class c{onConnectionStatusChangeCallback;onResponseCallback;onErrorCallback;onClientInfoCallback;constructor(e={}){const{autoConnect:t=!0,url:o="wss://localhost:4000",token:s,callbacks:r,uiObserver:a}=e;this.onConnectionStatusChangeCallback=r?.onConnectionStatusChange,this.onResponseCallback=r?.onResponse,this.onErrorCallback=r?.onError,this.onClientInfoCallback=r?.onClientInfo,void 0!==a&&n.configureUiObserver(a),this.setupEventListeners(),t&&this.connect(o,s)}setupEventListeners(){n.onConnectionStatus(n=>{this.onConnectionStatusChangeCallback&&this.onConnectionStatusChangeCallback(n)}),n.onServerResponse(n=>{this.onResponseCallback&&this.onResponseCallback(n)}),n.onError(n=>{this.onErrorCallback&&this.onErrorCallback(n)})}connect(e="wss://localhost:4000",t){const o="string"==typeof t&&""!==t,s=o?{Authorization:`Bearer ${t}`}:void 0,r=o?{token:t}:void 0;n.connect(e,s,r)}disconnect(){n.disconnect()}sendUserInteraction(e,t){n.sendUserInteraction(e,t)}async suggest(e,t){return n.suggest(e,t)}gatherClientInfo(){n.gatherClientInfo().then(n=>{this.onClientInfoCallback&&this.onClientInfoCallback(n)})}onConnectionStatusChange(n){return this.onConnectionStatusChangeCallback=n,()=>{this.onConnectionStatusChangeCallback=void 0}}onResponse(n){return this.onResponseCallback=n,()=>{this.onResponseCallback=void 0}}onError(n){return this.onErrorCallback=n,()=>{this.onErrorCallback=void 0}}}class l{config;client;constructor(n){this.config=n,this.client=e(n)}async getSitemap(){const{data:n,error:e,response:o}=await this.client.get({url:"/sitemap.xml",headers:{Accept:"application/xml"},parseAs:"text"});if(void 0===n){const n=o?.status;throw t.error(void 0===n?"sitemap: no response received":`sitemap: API Error ${n}`,e),Object.assign(new Error(void 0===n?"sitemap request failed":`sitemap request failed with status ${n}`),{status:n,error:e})}return n}}const u="https://api.callimacus.ai";function h(n){const e=n??u;if(!function(n){try{return Boolean(new URL(n))}catch{return!1}}(e))throw new Error(`[thamyr] \`endpoint\` must be an absolute URL such as ${u}, got ${JSON.stringify(n)}. Omit it to use the default.`);return e}class C extends o{config;websocketManager;sitemap;constructor(n){const t=h(n.endpoint),{clientId:o}=n;if(!o)throw new Error("[thamyr] `clientId` is required. Pass your Callimacus Client ID (`cal-pk-…`).");super({client:e({accessToken:o,endpoint:t,withCredentials:!0})}),this.config=n,this.sitemap=new l({accessToken:o,endpoint:t}),this.websocketManager=new c({url:t,autoConnect:!0,token:o,uiObserver:n.uiObserver})}sendAudio(n,e="",t){const o=new File([n],"recording.webm",{type:n.type});this.sendUserInteraction(s.CREATE_ROUND,{inputEvent:{type:r.question,data:{value:e,file:o}},...void 0!==t&&{context:t}})}sendUserInteraction(n,e){this.websocketManager.sendUserInteraction(n,e)}openLanding(n,e={}){this.sendUserInteraction(s.CREATE_ROUND,a(n,e))}sendInteraction(n,e={}){this.sendUserInteraction(s.CREATE_ROUND,i(n,e))}refresh(n,e,t={}){this.sendInteraction(e,{...t,block:n})}async suggest(n="",e={}){const{timeoutMs:t,storyId:o,language:s}=e;return this.websocketManager.suggest({prefix:n,storyId:o??void 0,language:s},{timeoutMs:t})}onResponse(n){this.websocketManager.onResponse(n)}onError(n){this.websocketManager.onError(n)}}export{l as SitemapAPI,C as Thamyr,c as WebsocketManager};
8
+ import{callimacusService as e,createContractClient as t,logger as n,CallimacusApi as a,UserInteractionType as o,SLInputEventType as s,landingRound as i,interactionRound as r}from"@callimacus/thamyr-core";export*from"@callimacus/thamyr-core";class l{onConnectionStatusChangeCallback;onResponseCallback;onErrorCallback;onClientInfoCallback;constructor(t={}){const{autoConnect:n=!0,url:a="wss://localhost:4000",token:o,callbacks:s,uiObserver:i}=t;this.onConnectionStatusChangeCallback=s?.onConnectionStatusChange,this.onResponseCallback=s?.onResponse,this.onErrorCallback=s?.onError,this.onClientInfoCallback=s?.onClientInfo,void 0!==i&&e.configureUiObserver(i),this.setupEventListeners(),n&&this.connect(a,o)}setupEventListeners(){e.onConnectionStatus(e=>{this.onConnectionStatusChangeCallback&&this.onConnectionStatusChangeCallback(e)}),e.onServerResponse(e=>{this.onResponseCallback&&this.onResponseCallback(e)}),e.onError(e=>{this.onErrorCallback&&this.onErrorCallback(e)})}connect(t="wss://localhost:4000",n){const a="string"==typeof n&&""!==n,o=a?{Authorization:`Bearer ${n}`}:void 0,s=a?{token:n}:void 0;e.connect(t,o,s)}disconnect(){e.disconnect()}sendUserInteraction(t,n){e.sendUserInteraction(t,n)}async suggest(t,n){return e.suggest(t,n)}gatherClientInfo(){e.gatherClientInfo().then(e=>{this.onClientInfoCallback&&this.onClientInfoCallback(e)})}onConnectionStatusChange(e){return this.onConnectionStatusChangeCallback=e,()=>{this.onConnectionStatusChangeCallback=void 0}}onResponse(e){return this.onResponseCallback=e,()=>{this.onResponseCallback=void 0}}onError(e){return this.onErrorCallback=e,()=>{this.onErrorCallback=void 0}}}const c="callimacus-evaluation",d={label:"Website preview",claim:"Claim this website",claimShort:"Claim",ended:"This preview has ended",endedShort:"Preview ended",lastDay:"Last day",expiresIn:e=>`Expires in ${e} days`,daysLeft:e=>`${e} days left`},p={label:"Anteprima del sito",claim:"Attiva questo sito",claimShort:"Attiva",ended:"Questa anteprima è scaduta",endedShort:"Anteprima scaduta",lastDay:"Ultimo giorno",expiresIn:e=>`Scade tra ${e} giorni`,daysLeft:e=>`Ancora ${e} giorni`},h="display:block;position:fixed;top:0;left:0;right:0;margin:0;padding:0;height:var(--callimacus-evaluation-height,40px);z-index:2147483647;visibility:visible;opacity:1;transform:none;filter:none;clip-path:none".replaceAll(/;|$/gv," !important;");let u=!1;async function g(e){if(!u&&"undefined"!=typeof document){u=!0;try{const{data:t}=await e.evaluation.get();t&&function(e,t=Date.now()){const n=Math.ceil((Date.parse(e.endsAt)-t)/864e5);if(Number.isNaN(n)||!e.claimUrl.startsWith("https://")||document.querySelector(c))return;const a=document.documentElement.lang.toLowerCase().startsWith("it")?p:d,o=document.createElement(c);o.setAttribute("style",h);const s=o.attachShadow({mode:"closed"});s.innerHTML='<style>\n.bar{all:initial;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:16px;height:100%;padding:0 8px 0 20px;\nbackground:#161616;color:#fff;font:500 13px/1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}\n.side{display:flex;align-items:center;gap:14px;min-width:0;white-space:nowrap}\n.brand{font-weight:600;letter-spacing:-.01em}\n.rule{width:1px;height:14px;background:#404040}\n.label{color:#bfbfbf;overflow:hidden;text-overflow:ellipsis}\n.when{display:flex;align-items:center;gap:8px;color:#fff}\n.dot{width:6px;height:6px;border-radius:3px;background:#808080}\n[data-tone=soon] .when{color:#f5b94a}[data-tone=soon] .dot{background:#f5b94a}\n[data-tone=last] .when{color:#ff8a84}[data-tone=last] .dot{background:#ff8a84}\na{display:flex;align-items:center;height:100%;padding:0 4px;text-decoration:none;outline:none}\n.pill{background:#fff;color:#161616;border-radius:999px;padding:6px 14px;font-weight:600;font-size:12.5px}\na:hover .pill{background:#e5e5e5}a:focus-visible .pill{box-shadow:0 0 0 2px #161616,0 0 0 4px #fff}\n.short{display:none}\n@media (max-width:639px){.bar{padding:0 4px 0 16px}.side{gap:10px}.rule,.label,.long{display:none}.short{display:inline}a{padding:0 8px}}\n</style>\n<div class="bar" role="region" aria-label="Callimacus">\n<div class="side"><span class="brand">Callimacus</span><span class="rule" aria-hidden="true"></span><span class="label"></span></div>\n<div class="side"><span class="when"><span class="dot" aria-hidden="true"></span><span class="long"></span><span class="short"></span></span>\n<a target="_blank" rel="noopener"><span class="pill"><span class="long"></span><span class="short"></span></span></a></div>\n</div>',s.querySelector(".bar").dataset.tone=n<=1?"last":n<=3?"soon":"calm",s.querySelector(".label").textContent=a.label;const[i,r]=s.querySelectorAll(".long"),[l,u]=s.querySelectorAll(".short");i.textContent=n<=0?a.ended:1===n?a.lastDay:a.expiresIn(n),l.textContent=n<=0?a.endedShort:1===n?a.lastDay:a.daysLeft(n),r.textContent=a.claim,u.textContent=a.claimShort,s.querySelector("a").href=e.claimUrl;const g=document.createElement("style");g.textContent="html{--callimacus-evaluation-height:40px}@media (max-width:639px){html{--callimacus-evaluation-height:44px}}",document.head.append(g),document.documentElement.style.setProperty("padding-top","var(--callimacus-evaluation-height)","important"),document.documentElement.append(o)}(t)}catch{}}}class m{config;client;constructor(e){this.config=e,this.client=t(e)}async getSitemap(){const{data:e,error:t,response:a}=await this.client.get({url:"/sitemap.xml",headers:{Accept:"application/xml"},parseAs:"text"});if(void 0===e){const e=a?.status;throw n.error(void 0===e?"sitemap: no response received":`sitemap: API Error ${e}`,t),Object.assign(new Error(void 0===e?"sitemap request failed":`sitemap request failed with status ${e}`),{status:e,error:t})}return e}}const b="https://api.callimacus.ai";function f(e){const t=e??b;if(!function(e){try{return Boolean(new URL(e))}catch{return!1}}(t))throw new Error(`[thamyr] \`endpoint\` must be an absolute URL such as ${b}, got ${JSON.stringify(e)}. Omit it to use the default.`);return t}class C extends a{config;websocketManager;sitemap;constructor(e){const n=f(e.endpoint),{clientId:a}=e;if(!a)throw new Error("[thamyr] `clientId` is required. Pass your Callimacus Client ID (`cal-pk-…`).");super({client:t({accessToken:a,endpoint:n,withCredentials:!0})}),this.config=e,this.sitemap=new m({accessToken:a,endpoint:n}),this.websocketManager=new l({url:n,autoConnect:!0,token:a,uiObserver:e.uiObserver}),g(this)}sendAudio(e,t="",n){const a=new File([e],"recording.webm",{type:e.type});this.sendUserInteraction(o.CREATE_ROUND,{inputEvent:{type:s.question,data:{value:t,file:a}},...void 0!==n&&{context:n}})}sendUserInteraction(e,t){this.websocketManager.sendUserInteraction(e,t)}openLanding(e,t={}){this.sendUserInteraction(o.CREATE_ROUND,i(e,t))}sendInteraction(e,t={}){this.sendUserInteraction(o.CREATE_ROUND,r(e,t))}refresh(e,t,n={}){this.sendInteraction(t,{...n,block:e})}async suggest(e="",t={}){const{timeoutMs:n,storyId:a,language:o}=t;return this.websocketManager.suggest({prefix:e,storyId:a??void 0,language:o},{timeoutMs:n})}onResponse(e){this.websocketManager.onResponse(e)}onError(e){this.websocketManager.onError(e)}}export{m as SitemapAPI,C as Thamyr,l as WebsocketManager};
9
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/callimacus/manager.ts","../../../src/service/sitemap-api.ts","../../../src/service/thamyr.ts"],"sourcesContent":[null,null,null],"names":["WebsocketManager","onConnectionStatusChangeCallback","onResponseCallback","onErrorCallback","onClientInfoCallback","constructor","options","autoConnect","url","token","callbacks","uiObserver","this","onConnectionStatusChange","onResponse","onError","onClientInfo","undefined","callimacusService","configureUiObserver","setupEventListeners","connect","onConnectionStatus","isConnected","onServerResponse","response","error","hasToken","headers","Authorization","auth","disconnect","sendUserInteraction","type","payload","suggest","gatherClientInfo","then","clientInfo","callback","SitemapAPI","config","client","createContractClient","getSitemap","data","get","Accept","parseAs","status","logger","Object","assign","Error","DEFAULT_ENDPOINT","resolveEndpoint","endpoint","resolved","value","Boolean","URL","isAbsoluteUrl","JSON","stringify","Thamyr","CallimacusApi","websocketManager","sitemap","clientId","super","accessToken","withCredentials","sendAudio","audio","query","context","file","File","UserInteractionType","CREATE_ROUND","inputEvent","SLInputEventType","question","openLanding","landingRound","sendInteraction","id","interactionRound","refresh","block","interaction","prefix","timeoutMs","storyId","language"],"mappings":";;;;;;;uPAiGaA,EAEJC,iCACAC,mBACAC,gBACSC,qBAMjB,WAAAC,CAAYC,EAAoC,IAC/C,MAAMC,YACLA,GAAc,EAAIC,IAClBA,EAAM,uBAAsBC,MAC5BA,EAAKC,UACLA,EAASC,WACTA,GACGL,EAGJM,KAAKX,iCAAmCS,GAAWG,yBACnDD,KAAKV,mBAAqBQ,GA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ACJ,GAAQ,iBAAkB,CAACxC,KAAMwC,EAAMxC,OAC9DrB,KAAKoB,oBAAoB8C,EAAoBC,aAAc,CAC1DC,WAAY,CACX/C,KAAMgD,EAAiBC,SACvBrC,KAAM,CAACa,MAAOgB,EAAOE,iBAEN3D,IAAZ0D,GAAyB,CAACA,YAEhC,CAEA,mBAAA3C,CAAmDC,EAASC,GAC3DtB,KAAKsD,iBAAiBlC,oBAAoBC,EAAMC,EACjD,CAOA,WAAAiD,CAAYzB,EAAgBpD,EAAwB,IACnDM,KAAKoB,oBAAoB8C,EAAoBC,aAAcK,EAAa1B,EAAOpD,GAChF,CAQA,eAAA+E,CAAyCC,EAAOhF,EAAiC,IAChFM,KAAKoB,oBAAoB8C,EAAoBC,aAAcQ,EAAiBD,EAAIhF,GACjF,CASA,OAAAkF,CAAQC,EAAeC,EAA4BpF,EAAwB,CAAA,GAC1EM,KAAKyE,gBAAgBK,EAAa,IAAIpF,EAASmF,SAChD,CASA,aAAMtD,CAAQwD,EAAS,GAAIrF,EAA+C,CAAA,GACzE,MAAMsF,UAACA,EAASC,QAAEA,EAAOC,SAAEA,GAAYxF,EACvC,OAAOM,KAAKsD,iBAAiB/B,QAAQ,CAACwD,SAAQE,QAASA,QAAW5E,EAAW6E,YAAW,CAACF,aAC1F,CAEA,UAAA9E,CAAWyB,GACV3B,KAAKsD,iBAAiBpD,WAAWyB,EAClC,CAEA,OAAAxB,CAAQwB,GACP3B,KAAKsD,iBAAiBnD,QAAQwB,EAC/B"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/callimacus/manager.ts","../../../src/service/evaluation.ts","../../../src/service/sitemap-api.ts","../../../src/service/thamyr.ts"],"sourcesContent":[null,null,null,null],"names":["WebsocketManager","onConnectionStatusChangeCallback","onResponseCallback","onErrorCallback","onClientInfoCallback","constructor","options","autoConnect","url","token","callbacks","uiObserver","this","onConnectionStatusChange","onResponse","onError","onClientInfo","undefined","callimacusService","configureUiObserver","setupEventListeners","connect","onConnectionStatus","isConnected","onServerResponse","response","error","hasToken","headers","Authorization","auth","disconnect","sendUserInteraction","type","payload","suggest","gatherClientInfo","then","clientInfo","callback","tag","english","label","claim","claimShort","ended","endedShort","lastDay","expiresIn","days","daysLeft","italian","hostStyle","replaceAll","wasAsked","async","showEvaluation","api","document","data","evaluation","get","answer","now","Date","Math","ceil","parse","endsAt","Number","isNaN","claimUrl","startsWith","querySelector","words","documentElement","lang","toLowerCase","host","createElement","setAttribute","root","attachShadow","mode","innerHTML","dataset","tone","textContent","whenLong","claimLong","querySelectorAll","whenShort","href","style","head","append","setProperty","drawEvaluationBanner","SitemapAPI","config","client","createContractClient","getSitemap","Accept","parseAs","status","logger","Object","assign","Error","DEFAULT_ENDPOINT","resolveEndpoint","endpoint","resolved","value","Boolean","URL","isAbsoluteUrl","JSON","stringify","Thamyr","CallimacusApi","websocketManager","sitemap","clientId","super","accessToken","withCredentials","sendAudio","audio","query","context","file","File","UserInteractionType","CREATE_ROUND","inputEvent","SLInputEventType","question","openLanding","landingRound","sendInteraction","id","interactionRound","refresh","block","interaction","prefix","timeoutMs","storyId","language"],"mappings":";;;;;;;uPAiGaA,EAEJC,iCACAC,mBACAC,gBACSC,qBAMjB,WAAAC,CAAYC,EAAoC,IAC/C,MAAMC,YACLA,GAAc,EAAIC,IAClBA,EAAM,uBAAsBC,MAC5BA,EAAKC,UACLA,EAASC,WACTA,GACGL,EAGJM,KAAKX,iCAAmCS,GAAWG,yBACnDD,KAAKV,mBAAqBQ,GAAWI,WACrCF,KAAKT,gBAAkBO,GAAWK,QAClCH,KAAKR,qBAAuBM,GAAWM,kBAEpBC,IAAfN,GACHO,EAAkBC,oBAAoBR,GAIvCC,KAAKQ,sBAEDb,GACHK,KAAKS,QAAQb,EAAKC,EAEpB,CAKQ,mBAAAW,GACPF,EAAkBI,mBAAmBC,IAChCX,KAAKX,kCACRW,KAAKX,iCAAiCsB,KAIxCL,EAAkBM,iBAAiBC,IAC9Bb,KAAKV,oBACRU,KAAKV,mBAA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EACLzG,aAAa,EACbE,MAAOmH,EACPjH,WAAYwF,EAAOxF,aAIf6C,EAAe5C,KACrB,CAEA,SAAAoH,CAAUC,EAAaC,EAAQ,GAAIC,GAClC,MAAMC,EAAO,IAAIC,KAAK,CAACJ,GAAQ,iBAAkB,CAAChG,KAAMgG,EAAMhG,OAC9DrB,KAAKoB,oBAAoBsG,EAAoBC,aAAc,CAC1DC,WAAY,CACXvG,KAAMwG,EAAiBC,SACvB/E,KAAM,CAACuD,MAAOgB,EAAOE,iBAENnH,IAAZkH,GAAyB,CAACA,YAEhC,CAEA,mBAAAnG,CAAmDC,EAASC,GAC3DtB,KAAK8G,iBAAiB1F,oBAAoBC,EAAMC,EACjD,CAOA,WAAAyG,CAAYzB,EAAgB5G,EAAwB,IACnDM,KAAKoB,oBAAoBsG,EAAoBC,aAAcK,EAAa1B,EAAO5G,GAChF,CAQA,eAAAuI,CAAyCC,EAAOxI,EAAiC,IAChFM,KAAKoB,oBAAoBsG,EAAoBC,aAAcQ,EAAiBD,EAAIxI,GACjF,CASA,OAAA0I,CAAQC,EAAeC,EAA4B5I,EAAwB,CAAA,GAC1EM,KAAKiI,gBAAgBK,EAAa,IAAI5I,EAAS2I,SAChD,CASA,aAAM9G,CAAQgH,EAAS,GAAI7I,EAA+C,CAAA,GACzE,MAAM8I,UAACA,EAASC,QAAEA,EAAOC,SAAEA,GAAYhJ,EACvC,OAAOM,KAAK8G,iBAAiBvF,QAAQ,CAACgH,SAAQE,QAASA,QAAWpI,EAAWqI,YAAW,CAACF,aAC1F,CAEA,UAAAtI,CAAWyB,GACV3B,KAAK8G,iBAAiB5G,WAAWyB,EAClC,CAEA,OAAAxB,CAAQwB,GACP3B,KAAK8G,iBAAiB3G,QAAQwB,EAC/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@callimacus/thamyr",
3
- "version": "4.16.0",
3
+ "version": "4.17.0",
4
4
  "private": false,
5
5
  "description": "JavaScript package for Thamyr",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -35,7 +35,7 @@
35
35
  "test": "vitest run"
36
36
  },
37
37
  "dependencies": {
38
- "@callimacus/thamyr-core": "^4.16.0"
38
+ "@callimacus/thamyr-core": "^4.17.0"
39
39
  },
40
40
  "gitHead": "fafba2c8ca0586f95b1d03c5eede356a53b00886",
41
41
  "devDependencies": {