lipilekhika 0.0.0-alpha.11 → 0.0.0-alpha.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/lipilekhika.umd.js +1 -1
- package/package.json +9 -2
package/dist/lipilekhika.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(A,C){typeof exports=="object"&&typeof module<"u"?C(exports):typeof define=="function"&&define.amd?define(["exports"],C):(A=typeof globalThis<"u"?globalThis:A||self,C(A.lipilekhika={}))})(this,(function(A){"use strict";function C(n,t,i,_){const{accessor:c,compareFn:l}=_??{},e=c??((r,o)=>r[o]);let a=0,h=t.length-1,p=-1;for(;a<=h;){const r=Math.floor((a+h)/2),o=t[r],s=e(n,o);let f;l?f=l(i,s):f=i<s?-1:i>s?1:0,f===0?(p=o,h=r-1):f<0?h=r-1:a=r+1}return p}function et(n,t,i){const{accessor:_,compareFn:c}=i??{},l=_??((p,r)=>p[r]);let e=0,a=n.length-1,h=-1;for(;e<=a;){const p=Math.floor((e+a)/2),r=l(n,p);let o;c?o=c(t,r):o=t<r?-1:t>r?1:0,o===0?(h=p,a=p-1):o<0?a=p-1:e=p+1}return h}const at={},U=async n=>{{if(at[n])return at[n];const i=`https://cdn.jsdelivr.net/npm/lipilekhika@0.0.0-alpha.
|
|
1
|
+
(function(A,C){typeof exports=="object"&&typeof module<"u"?C(exports):typeof define=="function"&&define.amd?define(["exports"],C):(A=typeof globalThis<"u"?globalThis:A||self,C(A.lipilekhika={}))})(this,(function(A){"use strict";function C(n,t,i,_){const{accessor:c,compareFn:l}=_??{},e=c??((r,o)=>r[o]);let a=0,h=t.length-1,p=-1;for(;a<=h;){const r=Math.floor((a+h)/2),o=t[r],s=e(n,o);let f;l?f=l(i,s):f=i<s?-1:i>s?1:0,f===0?(p=o,h=r-1):f<0?h=r-1:a=r+1}return p}function et(n,t,i){const{accessor:_,compareFn:c}=i??{},l=_??((p,r)=>p[r]);let e=0,a=n.length-1,h=-1;for(;e<=a;){const p=Math.floor((e+a)/2),r=l(n,p);let o;c?o=c(t,r):o=t<r?-1:t>r?1:0,o===0?(h=p,a=p-1):o<0?a=p-1:e=p+1}return h}const at={},U=async n=>{{if(at[n])return at[n];const i=`https://cdn.jsdelivr.net/npm/lipilekhika@0.0.0-alpha.2/dist/umd_json/script_data/${n}.json`,c=await(await fetch(i)).json();return at[n]=c,c}},J={"all_to_normal:replace_pancham_varga_varna_with_n":{from_script_type:"all",to_script_name:["Normal"],check_in:"output",rules:[{type:"replace_prev_krama_keys",check_in:"output",prev:[60],following:[52,53,54,55,56,57,58,59],replace_with:[72]},{type:"replace_prev_krama_keys",check_in:"output",prev:[67],following:[61,62,63,64,65,66],replace_with:[72]}]},"brahmic_to_brahmic:replace_pancham_varga_varna_with_anuvsvAra":{from_script_type:"brahmic",to_script_type:"brahmic",check_in:"input",rules:[{type:"replace_prev_krama_keys",check_in:"input",prev:[60,49],following:[52,53,54,55,56,57,58,59],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[67,49],following:[61,62,63,64,65,66],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[81,49],following:[74,75,76,77,78,79,80],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[72,49],following:[68,69,70,71],replace_with:[45]},{type:"replace_prev_krama_keys",check_in:"input",prev:[88,49],following:[82,83,85,86,87],replace_with:[45]}]},"all_to_sinhala:use_conjuct_enabling_halant":{from_script_type:"all",to_script_name:["Sinhala"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[49]],replace_text:"්",replace_with:[]}]},"all_to_normal:remove_virAma_and_double_virAma":{from_script_type:"all",to_script_name:["Normal","Romanized"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[116],[115]],replace_with:[-1]}]},"all_to_normal:replace_avagraha_with_a":{from_script_type:"all",to_script_name:["Normal","Romanized"],check_in:"output",rules:[{type:"direct_replace",check_in:"output",to_replace:[[48]],replace_with:[1]}]}},kt=(n,t)=>{const i=n.krama_text_arr[t]?.[0];return typeof i=="string"?i:null},O=(n,t)=>kt(n,t)??"",Y=(n,t)=>C(n.krama_text_arr,n.krama_text_arr_index,t,{accessor:(i,_)=>i[_][0]}),gt=()=>{let n=[];function t(r){r&&n.push(r)}function i(r){for(const o of r)t(o)}function _(){return n.at(-1)}function c(){return _()?.at(-1)}function l(){const r=_();if(!r)return;const o=r.at(-1),s=r.slice(0,-1);return s?n[n.length-1]=s:n.pop(),o}function e(r,o){n.splice(-r,r,...o.filter(Boolean))}function a(r,o){const s=l();if(!s){i(r),i(o);return}i(r),t(s),i(o)}function h(r){const o=n.at(r);return o?{cp:r,ch:o,width:o.length}:null}function p(r,o){r<0&&(r=n.length+r),!(r<0||r>=n.length)&&(n[r]=o)}return{emit:t,emitPieces:i,lastPiece:_,lastChar:c,popLastChar:l,rewriteTailPieces:e,withLastCharMovedAfter:a,toString:()=>n.join(""),rewriteAt:p,peekAt:h}},vt=n=>{let t=[];function i(){t=[]}function _(){return t.length}function c(s){return t.at(s)}function l(){return t.at(-1)}function e(){return l()?.[0]}function a(){return l()?.[1]?.type}function h(s){return c(s)?.[1]?.type}function p(s){return c(s)?.[0]}function r(s){return a()===s}function o(s){const f=s[0];f!==void 0&&f.length>0&&t.push(s),t.length>n&&t.shift()}return{clear:i,length:_,at:c,last:l,lastText:e,lastType:a,typeAt:h,textAt:p,isLastType:r,push:o}},At=n=>{let t=0;function i(a){const h=n.codePointAt(a);if(h===void 0)return null;const p=String.fromCodePoint(h);return{cp:h,ch:p,width:p.length}}function _(){return i(t)}function c(a){return i(t+a)}function l(a){t+=a}function e(a,h){return n.substring(a,h)}return{get pos(){return t},peek:_,peekAt:i,peekAtOffsetUnits:c,advance:l,slice:e}},nt=(n,t,i,_)=>{for(let c=0;c<i.length;c++){const l=i[i.length-1-c],e=n(t-c);if(e===null)return{matched:!1,matchedLen:0};const a=Y(_,e.ch);if(a===-1||a!==l)return{matched:!1,matchedLen:0}}return{matched:!0,matchedLen:i.length}},rt=(n,t)=>n.map(i=>O(t,i)).filter(Boolean),xt=["²","³","⁴"],P=n=>!!n&&xt.indexOf(n)!==-1,I=n=>n==="Tamil-Extended",z=(n,t,i,_)=>{if(t.length===0)return;if(!_){n.emitPieces(t);return}const c=t[0]??"";if(c[0]===i){const l=c.slice(1),e=[];l&&e.push(l);for(let a=1;a<t.length;a++)e.push(t[a]);n.withLastCharMovedAfter([i],e)}else n.withLastCharMovedAfter(t,[])},wt=[" ",`
|
|
2
2
|
`,"\r"," ",",",";","!","@","?","%"],Tt=3;function T(n,t,i,_){const{from_script_name:c,to_script_name:l,from_script_data:e,to_script_data:a,trans_options:h,result:p,prev_context:r,BRAHMIC_HALANT:o,BRAHMIC_NUQTA:s,typing_mode:f}=n;let d=!1;if((s&&r.typeAt(-3)==="vyanjana"&&r.textAt(-2)===s&&r.typeAt(-1)==="mAtrA"||r.typeAt(-2)==="vyanjana"&&r.typeAt(-1)==="mAtrA")&&(!t||t[1]?.type==="anya")&&r.clear(),e.script_type==="brahmic"&&a.script_type==="other")t[0]!==o&&(!(I(c)&&t[0]&&t[0].length>0)||t[0].charAt(0)!==o)&&(!s||t[0]!==s)&&(r.typeAt(-1)==="vyanjana"||s&&r.typeAt(-2)==="vyanjana"&&r.textAt(-1)===s)&&(t[1]?.type!=="mAtrA"&&t[0]!==o||t[1]?.type==="anya"||t[1]===null||t[1]===void 0)&&p.emit(a.schwa_character);else if(e.script_type==="other"&&a.script_type==="brahmic")if(r.typeAt(-1)==="vyanjana"&&(t[1]?.type==="mAtrA"||t[1]?.type==="svara")){const Z=t[1].type==="svara"?O(a,t[1].mAtrA_krama_ref?.[0]??-1):t[0];I(l)&&P(p.lastChar())?z(p,[Z],a.halant,!0):z(p,[Z],a.halant,!1),d=!0}else r.typeAt(-1)==="vyanjana"&&!(t[0]===o||t[1]?.type==="mAtrA")&&(I(l)&&P(p.lastChar())?z(p,[o],a.halant,!0):(z(p,[o],a.halant,!1),l==="Sinhala"&&h["all_to_sinhala:use_conjuct_enabling_halant"]&&p.rewriteAt(-1,p.lastPiece()+"")));let b=!1;return f&&(i===void 0||i.length===0)&&!_&&(b=!0,t[1]?.type==="vyanjana"&&(b=!1),b&&r.clear()),(!f||!_&&!b)&&r.push(t),d}function pt(n,t,i){const{custom_rules:_,cursor:c,result:l,from_script_data:e,to_script_data:a}=n,h=t+i;for(let p=0;p<_.length;p++){if(_[p].use_replace===!0)continue;const r=_[p];if(r.type==="replace_prev_krama_keys"){if(r.check_in==="input"){const o=nt(c.peekAt,h,r.prev,e),s=c.peekAt(t);if(o.matched&&s!==null){const f=s.ch,d=Y(e,f);if(d!==-1&&r.following.indexOf(d)!==-1){const b=rt(r.replace_with,a);l.rewriteTailPieces(o.matchedLen,b)}}}else if(r.check_in==="output"){const o=l.lastPiece();if(!o)continue;const s=Y(a,o);if(s!==-1&&r.following.indexOf(s)!==-1){const f=nt(l.peekAt,-2,r.prev,a);if(f.matched){const d=rt(r.replace_with,a);l.rewriteTailPieces(f.matchedLen+1,[...d,o])}}}}else if(r.type==="direct_replace"){const o=r.check_in==="output"?a:e;for(const s of r.to_replace){const f=nt(l.peekAt,-1,s,o);if(!f.matched)continue;if(r.replace_text){l.rewriteTailPieces(f.matchedLen,[r.replace_text]);break}const d=rt(r.replace_with,o);l.rewriteTailPieces(f.matchedLen,d);break}}}}const ut=(n,t,i)=>{if(!i)return{};const _={};for(const[c,l]of Object.entries(i??{})){if(!l||!(c in J))continue;const e=J[c];(e.from_script_type!==void 0&&(e.from_script_type==="all"||e.from_script_type===n.script_type)||e.from_script_name!==void 0&&e.from_script_name.includes(n.script_name))&&(e.to_script_type!==void 0&&(e.to_script_type==="all"||e.to_script_type===t.script_type)||e.to_script_name!==void 0&&e.to_script_name.includes(t.script_name))&&(_[c]=!0)}return _},ht=(n,t)=>n.replace_with.map(i=>O(t,i)).join(""),ft=(n,t,i,_)=>{if(i.length===0)return n;for(const c of i)if(!(c.use_replace!==!0||c.check_in!==_)){if(c.type==="replace_prev_krama_keys"){const l=c.prev.map(e=>O(t,e)).join("");for(let e of c.following){const a=O(t,e);if(!a)continue;const h=ht(c,t)+a;n=n.replaceAll(l+a,h)}}else if(c.type==="direct_replace"){const l=c.to_replace.map(e=>e.map(a=>O(t,a)).join(""));for(let e of l)n=n.replaceAll(e,ht(c,t))}}return n},mt=async(n,t,i,_,c)=>{const l=c?.typing_mode??!1;if(l&&t!=="Normal")throw new Error("Typing mode is only supported with Normal script as the input");const e=await U(t),a=await U(i),h=ut(e,a,_),p=Object.keys(h).flatMap(K=>J[K].rules);n=ft(n,e,p,"input");const r=gt();let o=0;const s=At(n),f=vt(Tt),d=e.script_type==="brahmic"&&a.script_type==="other"||e.script_type==="other"&&a.script_type==="brahmic"||l&&t==="Normal"&&a.script_type==="other",b=e.script_type==="brahmic"&&a.script_type==="other"?e.nuqta??null:e.script_type==="other"&&a.script_type==="brahmic"?a.nuqta??null:null,Z=e.script_type==="brahmic"&&a.script_type==="other"?e.halant:e.script_type==="other"&&a.script_type==="brahmic"?a.halant:null,x={from_script_name:t,to_script_name:i,from_script_data:e,to_script_data:a,trans_options:h,custom_rules:p,cursor:s,result:r,prev_context:f,BRAHMIC_NUQTA:b,BRAHMIC_HALANT:Z,typing_mode:l};let y=-1;for(;s.pos<n.length;){o=s.pos;const K=s.peek();if(!K)break;const ot=K.ch,$=K.width,yt=$===2?1:$;if(y!==-1&&o>=y){y=-1,s.advance($);continue}if(wt.indexOf(ot)!==-1){s.advance($),d&&(T(x,[" ",null]),f.clear()),r.emit(ot);continue}let R=-1;{let S=0,H=-1;const j=d&&e.script_type==="other"&&a.script_type==="brahmic"&&(f.typeAt(-1)==="vyanjana"||b&&f.typeAt(-2)==="vyanjana"&&f.textAt(-1)===b);for(;;){const tt=s.peekAt(o+yt+S),E=tt?.ch??"";y!==-1&&E&&P(E)&&(S+=tt?.width??0);const m=o+yt+S,w=y!==-1?s.slice(o,y)+(m>y?s.slice(y+1,m):""):s.slice(o,m),k=et(e.text_to_krama_map,w,{accessor:(g,L)=>g[L][0]});if(k===-1){R=-1;break}const D=e.text_to_krama_map[k];if(j&&D[1].krama&&D[1].krama.length>=1){const g=D[1].krama,L=g[0],N=a.krama_text_arr[L]?.[1],_t=a.list[N??-1]?.type;if(g.length===1&&N!==null&&N!==void 0&&(_t==="svara"||_t==="mAtrA"))H=k;else if(H!==-1){R=H;break}}if(D[1].next&&D[1].next.length>0){const g=s.peekAt(m),L=g?.ch;if(I(t)&&e.script_type==="brahmic"){const F=g?s.peekAt(m+g.width):null,N=F?.ch,W=(g&&F?s.peekAt(m+g.width+F.width):null)?.ch;if(y===-1&&N!==void 0&&P(N)&&D[1].next.indexOf(N)!==-1){const Q=et(e.text_to_krama_map,w+N,{accessor:(M,v)=>M[v][0]}),V=C(e.krama_text_arr,e.krama_text_arr_index,L??"",{accessor:(M,v)=>M[v][0]});if(Q!==-1&&V!==-1){R=Q;const M=e.krama_text_arr[V],v=e.list[M[1]??-1]?.type;if(L===e.halant||v==="mAtrA"){y=m+(g?.width??0);break}}}else if(y===-1&&W!==void 0&&P(W)&&D[1].next.indexOf(W)!==-1){const Q=et(e.text_to_krama_map,w+W,{accessor:(v,G)=>v[G][0]}),V=C(e.krama_text_arr,e.krama_text_arr_index,L??"",{accessor:(v,G)=>v[G][0]}),M=C(e.krama_text_arr,e.krama_text_arr_index,N??"",{accessor:(v,G)=>v[G][0]});if(Q!==-1&&V!==-1&&M!==-1){const v=e.krama_text_arr[V],G=e.krama_text_arr[M];R=Q;const Dt=e.list[v[1]??-1]?.type,Mt=e.list[G[1]??-1]?.type;if(Dt==="mAtrA"&&Mt==="mAtrA"){y=m+(g?.width??0)+(F?.width??0);break}}}}if(L!==void 0&&D[1].next.indexOf(L)!==-1){S+=g?.width??0;continue}}R=k;break}}const u=R!==-1?e.text_to_krama_map[R]:null;if(u!==null){const S=y!==-1&&u[0].length>1&&e.list[e.krama_text_arr[u[1].krama?.[0]??-1]?.[1]??-1]?.type==="vyanjana"&&P(u[0].at(-1)??void 0)?1:0,H=u[0].length-S;if(s.advance(H),o=s.pos,u[1].krama!==null&&u[1].krama!==void 0&&u[1].krama.some(j=>j!==-1)){const j=u[1].krama.map(m=>O(a,m)),tt=j.join("");let E=!1;if(d)if(e.script_type==="brahmic"&&a.script_type==="other"){let m=null;if(u[1].fallback_list_ref!==void 0&&u[1].fallback_list_ref!==null)m=e.list[u[1].fallback_list_ref];else if(!u[1].krama||u[1].krama.length===0)m=null;else{const w=u[1].krama.map(k=>e.list[e.krama_text_arr[k][1]??-1]);I(t)&&w.some(k=>k?.type==="mAtrA")&&w.some(k=>k?.type==="vyanjana")?m={...w[0],type:"anya"}:I(t)&&w.length>1&&w.some(k=>k==null)?m=w.at(-1):m=w[0]}E=T(x,[u[0],m])}else if(a.script_type==="brahmic"&&e.script_type==="other"){let m=null;u[1].fallback_list_ref!==void 0&&u[1].fallback_list_ref!==null?m=a.list[u[1].fallback_list_ref]:m=u[1].krama&&u[1].krama.length>0?a.list[a.krama_text_arr[u[1].krama[0]]?.[1]??-1]??null:null,l&&t==="Normal"?E=T(x,[u[0],m],u[1].next??void 0):E=T(x,[u[0],m])}else l&&t==="Normal"&&a.script_type==="other"&&(E=T(x,[u[0],null],u[1].next??void 0));E||(a.script_type==="brahmic"&&I(i)&&(a.list[u[1].krama?.at(-1)??-1]?.type==="mAtrA"||tt===a.halant)&&P(r.lastChar())?z(r,j,a.halant,!0):r.emitPieces(j)),pt(x,o,-H);continue}else if(u[1].krama!==null&&u[1].krama!==void 0&&u[1].krama.some(j=>j===-1)){r.emit(u[0]),l&&T(x,[u[0],null],u[1].next??void 0);continue}}else s.advance($),o=s.pos;const X=u===null?ot:u[0],q=Y(e,X);if(q===-1){d&&(T(x,[X,null]),f.clear()),r.emit(X);continue}let st=!1;if(d&&(e.script_type==="brahmic"?st=T(x,[X,e.list[e.krama_text_arr[q][1]??-1]]):a.script_type==="brahmic"&&(st=T(x,[X,a.list[a.krama_text_arr[q][1]??-1]]))),!st){const S=O(a,q);a.script_type==="brahmic"&&I(i)&&(a.list[a.krama_text_arr[q][1]??-1]?.type==="mAtrA"||S===a.halant)&&P(r.lastChar())?z(r,[S],a.halant,!0):r.emit(S)}pt(x,o,-$)}d&&T(x,[void 0,null],void 0,!0);let lt=r.toString();return lt=ft(lt,a,p,"output"),{output:lt,context_length:f.length()}},bt={script_list:{Devanagari:1,Telugu:2,Tamil:3,"Tamil-Extended":4,Bengali:5,Kannada:6,Gujarati:7,Malayalam:8,Odia:9,Sinhala:10,Normal:11,Romanized:12,Gurumukhi:13,Assamese:14,"Purna-Devanagari":15,Brahmi:16,Granth:17,Modi:18,Sharada:20,Siddham:21},lang_list:{English:1,Sanskrit:2,Hindi:3,Telugu:4,Tamil:5,Bengali:6,Kannada:7,Gujarati:8,Malayalam:9,Odia:10,Sinhala:11,Marathi:12,Nepali:13,Punjabi:14,Assamese:15}},{script_list:St,lang_list:jt}=bt,it=Object.keys(St),ct=Object.keys(jt),Lt=Array.from(new Set([...ct,...it])),Nt={Bengali:"Bengali",Gujarati:"Gujarati",Hindi:"Devanagari",Kannada:"Kannada",Malayalam:"Malayalam",Odia:"Odia",Sinhala:"Sinhala",Tamil:"Tamil",Telugu:"Telugu",English:"Normal",Sanskrit:"Devanagari",Marathi:"Devanagari",Nepali:"Devanagari",Punjabi:"Gurumukhi",Assamese:"Assamese"},dt={dev:"Devanagari",te:"Telugu",tel:"Telugu",tam:"Tamil","tam-ex":"Tamil-Extended",ben:"Bengali",be:"Bengali",ka:"Kannada",kan:"Kannada",gu:"Gujarati",guj:"Gujarati",mal:"Malayalam",or:"Odia",od:"Odia",oriya:"Odia",si:"Sinhala",sinh:"Sinhala",sin:"Sinhala",en:"Normal",eng:"Normal",la:"Normal",lat:"Normal",nor:"Normal",norm:"Normal",rom:"Romanized",gur:"Gurumukhi",as:"Assamese",sa:"Devanagari",san:"Devanagari",hin:"Devanagari",hi:"Devanagari",mar:"Devanagari",ne:"Devanagari",nep:"Devanagari",pun:"Gurumukhi"};function Ct(n){return n.toLowerCase().replace(/(^|-)([a-z])/g,(t,i,_)=>i+_.toUpperCase())}const B=n=>{const t=Ct(n);return it.includes(t)?t:ct.includes(t)?Nt[t]:n.toLocaleLowerCase()in dt?dt[n.toLocaleLowerCase()]:null},Ot=async n=>{const t=B(n);if(!t)throw new Error(`Invalid script name: ${n}`);return await U(t)};async function Pt(n,t,i,_){const c=B(t);if(!c)throw new Error(`Invalid script name: ${t}`);const l=B(i);if(!l)throw new Error(`Invalid script name: ${i}`);return c===l?n:(await mt(n,c,l,_)).output}async function It(n,t){const i=B(n);if(!i)throw new Error(`Invalid script name: ${n}`);const _=B(t);if(!_)throw new Error(`Invalid script name: ${t}`);const c=await U(i),l=await U(_);return Object.keys(ut(c,l,Object.fromEntries(Object.keys(J).map(e=>[e,!0]))))}async function Et(n,t){const i=B(t);if(!i)throw new Error(`Invalid script name: ${t}`);let _="",c="",l="";for(let e=0;e<n.length;e++){c+=n[e];const{context_length:a,output:h}=await mt(c,"Normal",i,{},{typing_mode:!0});a>0?l=h:a===0&&(c="",l="",_+=h)}return l.length>0&&(_+=l),_}A.ALL_LANG_SCRIPT_LIST=Lt,A.LANG_LIST=ct,A.SCRIPT_LIST=it,A.emulateTyping=Et,A.getAllOptions=It,A.preloadScriptData=Ot,A.transliterate=Pt,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lipilekhika",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/shubhattin/lipilekhika/tree/main/packages/js",
|
|
@@ -8,11 +8,17 @@
|
|
|
8
8
|
"main": "./dist/cjs/index.cjs",
|
|
9
9
|
"module": "./dist/esm/index.mjs",
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
+
"unpkg": "./dist/lipilekhika.umd.js",
|
|
12
|
+
"jsdelivr": "./dist/lipilekhika.umd.js",
|
|
13
|
+
"browser": "./dist/lipilekhika.umd.js",
|
|
11
14
|
"exports": {
|
|
12
15
|
".": {
|
|
13
16
|
"types": "./dist/index.d.ts",
|
|
14
17
|
"import": "./dist/esm/index.mjs",
|
|
15
18
|
"require": "./dist/cjs/index.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./umd": {
|
|
21
|
+
"default": "./dist/lipilekhika.umd.js"
|
|
16
22
|
}
|
|
17
23
|
},
|
|
18
24
|
"files": [
|
|
@@ -26,7 +32,8 @@
|
|
|
26
32
|
"test:ui": "vitest --ui",
|
|
27
33
|
"coverage": "vitest run --coverage",
|
|
28
34
|
"format": "prettier --write .",
|
|
29
|
-
"make-script-data": "bun src/make_script_data/make_output_script_data.ts"
|
|
35
|
+
"make-script-data": "bun src/make_script_data/make_output_script_data.ts",
|
|
36
|
+
"publish:cli": "bun run build && npm publish"
|
|
30
37
|
},
|
|
31
38
|
"devDependencies": {
|
|
32
39
|
"@microsoft/api-extractor": "^7.55.2",
|