@moonbase-machines/charset 0.7.0 → 0.8.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.
@@ -1,3 +1,3 @@
1
- /*! @moonbase-machines/charset 0.7.0: MIT, (c) 2026 Mark Wharton (its LICENSE) */
1
+ /*! @moonbase-machines/charset 0.8.0: MIT, (c) 2026 Mark Wharton (its LICENSE) */
2
2
  var h=Object.defineProperty;var b=(f,e)=>{for(var s in e)h(f,s,{get:e[s],enumerable:!0})};var w={};b(w,{chargen:()=>y});var m={};b(m,{FONT:()=>g});var g=[[0,0,0,0,0],[0,0,95,0,0],[0,7,0,7,0],[20,127,20,127,20],[36,42,127,42,18],[35,19,8,100,98],[54,73,85,34,80],[0,5,3,0,0],[0,28,34,65,0],[0,65,34,28,0],[20,8,62,8,20],[8,8,62,8,8],[0,80,48,0,0],[8,8,8,8,8],[0,96,96,0,0],[32,16,8,4,2],[62,81,73,69,62],[0,66,127,64,0],[66,97,81,73,70],[33,65,69,75,49],[24,20,18,127,16],[39,69,69,69,57],[60,74,73,73,48],[1,113,9,5,3],[54,73,73,73,54],[6,73,73,41,30],[0,54,54,0,0],[0,86,54,0,0],[8,20,34,65,0],[20,20,20,20,20],[0,65,34,20,8],[2,1,81,9,6],[50,73,121,65,62],[126,17,17,17,126],[127,73,73,73,54],[62,65,65,65,34],[127,65,65,34,28],[127,73,73,73,65],[127,9,9,9,1],[62,65,73,73,122],[127,8,8,8,127],[0,65,127,65,0],[32,64,65,63,1],[127,8,20,34,65],[127,64,64,64,64],[127,2,12,2,127],[127,4,8,16,127],[62,65,65,65,62],[127,9,9,9,6],[62,65,81,33,94],[127,9,25,41,70],[70,73,73,73,49],[1,1,127,1,1],[63,64,64,64,63],[31,32,64,32,31],[63,64,56,64,63],[99,20,8,20,99],[7,8,112,8,7],[97,81,73,69,67],[0,127,65,65,0],[2,4,8,16,32],[0,65,65,127,0],[4,2,1,2,4],[64,64,64,64,64],[0,1,2,4,0],[32,84,84,84,120],[127,72,68,68,56],[56,68,68,68,32],[56,68,68,72,127],[56,84,84,84,24],[8,126,9,1,2],[12,82,82,82,62],[127,8,4,4,120],[0,68,125,64,0],[32,64,68,61,0],[127,16,40,68,0],[0,65,127,64,0],[124,4,24,4,120],[124,8,4,4,120],[56,68,68,68,56],[124,20,20,20,8],[8,20,20,24,124],[124,8,4,4,8],[72,84,84,84,32],[4,63,68,64,32],[60,64,64,32,124],[28,32,64,32,28],[60,64,48,64,60],[68,40,16,40,68],[12,80,80,80,60],[68,100,84,76,68],[0,8,54,65,0],[0,0,127,0,0],[0,65,54,8,0],[8,4,8,16,8]];var u=(()=>{let f=(...o)=>o.map(n=>parseInt(n.replace(/\./g,"0").replace(/#/g,"1"),2)),e=(o,n,p,d)=>[...Array(8).keys()].map(i=>i>=o&&i<=n?255>>p&255<<7-d&255:0),s=(...o)=>o[0].map((n,p)=>o.reduce((d,i)=>d|i[p],0)),r=(o,n)=>e(o,n,0,7),c=(o,n)=>e(0,7,o,n),x={up:e(0,4,3,4),down:e(3,7,3,4),left:e(3,4,0,4),right:e(3,4,3,7)},t=(...o)=>s(...o.map(n=>x[n])),a=(o,n=0,p=7,d=0,i=7)=>[...Array(8).keys()].map(l=>l<n||l>p?0:(l>>1)+o&1?51&255>>d&255<<7-i&255:204&255>>d&255<<7-i&255);return{first:{64:r(3,4),67:r(3,4),68:r(2,3),69:r(1,2),70:r(4,5),82:r(5,6),66:c(3,4),93:c(3,4),71:c(2,3),72:c(4,5),84:c(1,2),89:c(5,6),65:f("...##...","..####..",".######.","########","########","##.##.##","...##...","..####.."),83:f(".##..##.","########","########","########",".######.","..####..","...##...","........"),88:f("..####..","..####..","##.##.##","########","########","##.##.##","...##...","..####.."),90:f("...##...","..####..",".######.","########",".######.","..####..","...##...","........"),81:f("........","..####..",".######.",".######.",".######.",".######.","..####..","........"),87:f("........","..####..",".######.",".##..##.",".##..##.",".######.","..####..","........"),94:f("........","........","#######.",".##.##..",".##.##..",".##.##..",".##..##.","........"),85:f("........","........","........",".....###","....####","...###..","...##...","...##..."),73:f("........","........","........","###.....","####....","..###...","...##...","...##..."),74:f("...##...","...##...","...###..","....####",".....###","........","........","........"),75:f("...##...","...##...","..###...","####....","###.....","........","........","........"),77:f("##......","###.....",".###....","..###...","...###..","....###.",".....###","......##"),78:f("......##",".....###","....###.","...###..","..###...",".###....","###.....","##......"),86:f("##....##","###..###",".######.","..####..","..####..",".######.","###..###","##....##"),99:r(0,0),100:r(7,7),101:c(0,1),116:c(0,1),103:c(6,7),106:c(6,7),76:s(c(0,1),r(6,7)),79:s(r(0,1),c(0,1)),80:s(r(0,1),c(6,7)),122:s(c(6,7),r(6,7)),107:t("up","down","right"),115:t("up","down","left"),113:t("up","left","right"),114:t("down","left","right"),91:t("up","down","left","right"),109:t("up","right"),125:t("up","left"),112:t("down","right"),110:t("down","left"),97:e(0,7,0,3),98:e(4,7,0,7),111:e(6,7,0,7),119:e(0,1,0,7),120:e(0,2,0,7),121:e(5,7,0,7),117:e(0,7,0,2),118:e(0,7,5,7),126:e(0,3,0,3),124:e(0,3,4,7),123:e(4,7,0,3),108:e(4,7,4,7),127:s(e(0,3,0,3),e(4,7,4,7)),102:a(0),92:a(0,0,7,0,3),104:a(0,4,7),95:[...Array(8).keys()].map(o=>255>>o),105:[...Array(8).keys()].map(o=>255<<o&255)},second:{94:a(1),95:f("..##..##","#..##..#","##..##..",".##..##.","..##..##","#..##..#","##..##..",".##..##."),105:f("##..##..","#..##..#","..##..##",".##..##.","##..##..","#..##..#","..##..##",".##..##."),122:f("........","......##",".....##.","....##..","##.##...",".###....","..#.....","........")},signs:{28:f("...###..","..##..#.","..##....","######..","..##....",".##...#.","#######.","........"),30:f("...##...","..####..",".######.","...##...","...##...","...##...","...##...","........"),31:f("........","..##....",".##.....","#######.",".##.....","..##....","........","........")}}})();function y(){let f=new Uint8Array(4096),e=(r,c)=>{let x=g[r-32];if(x)for(let t=0;t<7;t++){let a=0;for(let o=0;o<5;o++)x[o]>>t&1&&(a|=64>>o);f[c+t]=a}},s={0:64,27:91,28:35,29:93,30:94,31:60};for(let r of[0,1]){let c=r*2048;for(let x=0;x<64;x++){let t=x>=32?x:x>=1&&x<=26?(r?96:64)+x:s[x];e(t,c+x*8)}if(r)for(let x=65;x<=90;x++)e(x,c+x*8);for(let[x,t]of Object.entries(u.signs))f.set(t,c+x*8);for(let[x,t]of Object.entries(u.first))(!r||!(x>=65&&x<=90))&&f.set(t,c+x*8);if(r)for(let[x,t]of Object.entries(u.second))f.set(t,c+x*8);for(let x=0;x<1024;x++)f[c+1024+x]=f[c+x]^255}return f}export{w as chargen,m as font};
3
3
  //# sourceMappingURL=moonbase-charset.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moonbase-machines/charset",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Moonbase's own character set for the Commodore 64, and the 5 by 7 font it and the Apple IIe's text screen are drawn from.",
5
5
  "type": "module",
6
6
  "license": "MIT",