godown 3.1.0 → 3.3.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.
Files changed (117) hide show
  1. package/README.md +2 -2
  2. package/build/godown+lit.iife.js +12 -12
  3. package/build/godown+lit.iife.js.map +1 -1
  4. package/build/godown+lit.js +12 -12
  5. package/build/godown+lit.js.map +1 -1
  6. package/build/godown+lit.umd.js +12 -12
  7. package/build/godown+lit.umd.js.map +1 -1
  8. package/build/godown.iife.js +10 -10
  9. package/build/godown.js +10 -10
  10. package/build/godown.js.map +1 -1
  11. package/build/godown.umd.js +10 -10
  12. package/build/godown.umd.js.map +1 -1
  13. package/components/alert.d.ts +1 -3
  14. package/components/alert.d.ts.map +1 -1
  15. package/components/alert.js +1 -1
  16. package/components/alert.js.map +1 -1
  17. package/components/button.d.ts +1 -1
  18. package/components/button.d.ts.map +1 -1
  19. package/components/button.js.map +1 -1
  20. package/components/carousel.d.ts +5 -11
  21. package/components/carousel.d.ts.map +1 -1
  22. package/components/carousel.js +1 -1
  23. package/components/carousel.js.map +1 -1
  24. package/components/input.js +1 -1
  25. package/components/input.js.map +1 -1
  26. package/components/link.d.ts +34 -7
  27. package/components/link.d.ts.map +1 -1
  28. package/components/link.js +1 -1
  29. package/components/link.js.map +1 -1
  30. package/components/range.d.ts +7 -12
  31. package/components/range.d.ts.map +1 -1
  32. package/components/range.js +1 -1
  33. package/components/range.js.map +1 -1
  34. package/components/router.d.ts +9 -1
  35. package/components/router.d.ts.map +1 -1
  36. package/components/router.js +1 -1
  37. package/components/router.js.map +1 -1
  38. package/components/split.d.ts.map +1 -1
  39. package/components/split.js +1 -1
  40. package/components/split.js.map +1 -1
  41. package/components/text.js +1 -1
  42. package/components/text.js.map +1 -1
  43. package/components/time.d.ts +0 -3
  44. package/components/time.d.ts.map +1 -1
  45. package/components/time.js +1 -1
  46. package/components/time.js.map +1 -1
  47. package/components/typewriter.d.ts.map +1 -1
  48. package/components/typewriter.js +1 -1
  49. package/components/typewriter.js.map +1 -1
  50. package/core/global-style.d.ts +1 -0
  51. package/core/global-style.d.ts.map +1 -1
  52. package/core/global-style.js +1 -1
  53. package/core/global-style.js.map +1 -1
  54. package/core/super-anchor.d.ts +1 -0
  55. package/core/super-anchor.d.ts.map +1 -1
  56. package/core/super-anchor.js +1 -1
  57. package/core/super-anchor.js.map +1 -1
  58. package/custom-elements.json +1 -1
  59. package/dev/components/alert.d.ts +1 -3
  60. package/dev/components/alert.d.ts.map +1 -1
  61. package/dev/components/alert.js +32 -56
  62. package/dev/components/alert.js.map +1 -1
  63. package/dev/components/button.d.ts +1 -1
  64. package/dev/components/button.d.ts.map +1 -1
  65. package/dev/components/button.js.map +1 -1
  66. package/dev/components/carousel.d.ts +5 -11
  67. package/dev/components/carousel.d.ts.map +1 -1
  68. package/dev/components/carousel.js +38 -37
  69. package/dev/components/carousel.js.map +1 -1
  70. package/dev/components/input.js +2 -2
  71. package/dev/components/link.d.ts +34 -7
  72. package/dev/components/link.d.ts.map +1 -1
  73. package/dev/components/link.js +70 -12
  74. package/dev/components/link.js.map +1 -1
  75. package/dev/components/range.d.ts +7 -12
  76. package/dev/components/range.d.ts.map +1 -1
  77. package/dev/components/range.js +40 -54
  78. package/dev/components/range.js.map +1 -1
  79. package/dev/components/router.d.ts +9 -1
  80. package/dev/components/router.d.ts.map +1 -1
  81. package/dev/components/router.js +28 -21
  82. package/dev/components/router.js.map +1 -1
  83. package/dev/components/split.d.ts.map +1 -1
  84. package/dev/components/split.js +2 -9
  85. package/dev/components/split.js.map +1 -1
  86. package/dev/components/text.js +2 -2
  87. package/dev/components/time.d.ts +0 -3
  88. package/dev/components/time.d.ts.map +1 -1
  89. package/dev/components/time.js +6 -20
  90. package/dev/components/time.js.map +1 -1
  91. package/dev/components/typewriter.d.ts.map +1 -1
  92. package/dev/components/typewriter.js +2 -2
  93. package/dev/components/typewriter.js.map +1 -1
  94. package/dev/core/global-style.d.ts +1 -0
  95. package/dev/core/global-style.d.ts.map +1 -1
  96. package/dev/core/global-style.js +13 -9
  97. package/dev/core/global-style.js.map +1 -1
  98. package/dev/core/super-anchor.d.ts +1 -0
  99. package/dev/core/super-anchor.d.ts.map +1 -1
  100. package/dev/core/super-anchor.js +3 -4
  101. package/dev/core/super-anchor.js.map +1 -1
  102. package/package.json +3 -3
  103. package/src/components/alert.ts +33 -64
  104. package/src/components/button.ts +1 -1
  105. package/src/components/carousel.ts +43 -42
  106. package/src/components/input.ts +2 -2
  107. package/src/components/link.ts +75 -12
  108. package/src/components/range.ts +48 -62
  109. package/src/components/router.ts +32 -21
  110. package/src/components/split.ts +2 -10
  111. package/src/components/text.ts +2 -2
  112. package/src/components/time.ts +8 -23
  113. package/src/components/typewriter.ts +9 -7
  114. package/src/core/global-style.ts +13 -9
  115. package/src/core/super-anchor.ts +5 -1
  116. package/vscode.html-custom-data.json +1 -1
  117. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../src/components/split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAmC,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAahD;;;;;;;;;;;;GAYG;AACH,cAEM,KAAM,SAAQ,UAAU;IAC5B;;OAEG;IAEH,GAAG,SAAK;IAER;;OAEG;IAEH,KAAK,SAAM;IAGX,OAAO,SAAM;IAGb,YAAY,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAM;IAErC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAUrC,iBAAiB,IAAI,IAAI;IAKzB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG,IAAI;IAY3E;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IA2C9C,KAAK,IAAI,IAAI;IAKb,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAMxB,IAAI,IAAI,IAAI;IAOZ,KAAK,IAAI,IAAI;CAQd;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../src/components/split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAyC,MAAM,iBAAiB,CAAC;AAC3F,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAKhD;;;;;;;;;;;;GAYG;AACH,cAEM,KAAM,SAAQ,UAAU;IAC5B;;OAEG;IAEH,GAAG,SAAK;IAER;;OAEG;IAEH,KAAK,SAAM;IAGX,OAAO,SAAM;IAGb,YAAY,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAM;IAErC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAUrC,iBAAiB,IAAI,IAAI;IAKzB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG,IAAI;IAY3E;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IA2C9C,KAAK,IAAI,IAAI;IAKb,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAMxB,IAAI,IAAI,IAAI;IAOZ,KAAK,IAAI,IAAI;CAQd;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as e,styles as r,attr as i,classList as s}from"@godown/element";import{css as n,html as u}from"lit";import{property as o,state as l}from"lit/decorators.js";import{scopePrefix as c,cssGlobalVars as a}from"../core/global-style.js";import h from"../core/super-input.js";const p="split",d=c(p);let b=class Split extends h{constructor(){super(...arguments),this.len=6,this.index=-1,this.current=-1,this.currentValue=[]}render(){return u`<div part="root" ${i(this.observedRecord)}>${((t,e)=>{const r=new Array(t);for(let i=0;i<t;i++)r[i]=e(i);return r})(this.len,(t=>u`<span part="input-box" class="${s({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}">${this.currentValue[t]}</span>`))} <input part="input" id="${this.makeId}" @blur="${this.blur}" @input="${this._handleInput}" .value="${this.value.padStart(this.len," ")}"></div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus(),this.dispatchEvent(new CustomEvent("focus",{detail:t,bubbles:!0,composed:!0}))}blur(){this._input.blur(),this.current=-1,super.blur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};t([o({type:Number})],b.prototype,"len",void 0),t([o({type:Number})],b.prototype,"index",void 0),t([l()],b.prototype,"current",void 0),t([l()],b.prototype,"currentValue",void 0),b=t([e(p),r(n`:host{border-radius:1px;color:var(${a.foreground});display:block;width:-moz-fit-content;width:fit-content;${d}--size:1.45em;${d}--gap:.25em}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{display:flex;gap:var(${d}--gap);justify-content:space-between;position:relative;width:100%}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{background-color:var(${a.input}-background);height:var(${d}--size);text-align:center;width:var(${d}--size)}[part=input]{background:none;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus{box-shadow:var(${a.input}-box-shadow)}`)],b);var f=b;export{b as Split,f as default};
1
+ import{__decorate as t}from"tslib";import{godown as e,styles as i,attr as r,loop as s,tokenList as n}from"@godown/element";import{css as u,html as o}from"lit";import{property as l,state as c}from"lit/decorators.js";import{scopePrefix as a,cssGlobalVars as h}from"../core/global-style.js";import p from"../core/super-input.js";const d="split",b=a(d);let f=class Split extends p{constructor(){super(...arguments),this.len=6,this.index=-1,this.current=-1,this.currentValue=[]}render(){return o`<div part="root" ${r(this.observedRecord)}>${s(this.len,(t=>o`<span part="input-box" class="${n({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}">${this.currentValue[t]}</span>`))} <input part="input" id="${this.makeId}" @blur="${this.blur}" @input="${this._handleInput}" .value="${this.value.padStart(this.len," ")}"></div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus(),this.dispatchEvent(new CustomEvent("focus",{detail:t,bubbles:!0,composed:!0}))}blur(){this._input.blur(),this.current=-1,super.blur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};t([l({type:Number})],f.prototype,"len",void 0),t([l({type:Number})],f.prototype,"index",void 0),t([c()],f.prototype,"current",void 0),t([c()],f.prototype,"currentValue",void 0),f=t([e(d),i(u`:host{border-radius:1px;color:var(${h.foreground});display:block;width:-moz-fit-content;width:fit-content;${b}--size:1.45em;${b}--gap:.25em}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{display:flex;gap:var(${b}--gap);justify-content:space-between;position:relative;width:100%}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{background-color:var(${h.input}-background);height:var(${b}--size);text-align:center;width:var(${b}--size)}[part=input]{background:none;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus{box-shadow:var(${h.input}-box-shadow)}`)],f);var v=f;export{f as Split,v as default};
2
2
  //# sourceMappingURL=split.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"split.js","sources":["../src/components/split.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Split","SuperInput","constructor","this","len","index","current","currentValue","render","html","attr","observedRecord","fn","result","Array","loop","classList","focus","disabled","focusAt","makeId","blur","_handleInput","value","padStart","connectedCallback","super","reset","e","stopPropagation","compositing","fillInput","data","join","dispatchEvent","CustomEvent","detail","composed","bubbles","lastNotNull","findLastIndex","a","multiple","length","indexOf","after","slice","i","_input","default","split","concat","fill","__decorate","property","type","Number","prototype","undefined","state","godown","styles","css","cssGlobalVars","foreground","input","Split$1"],"mappings":"4TAOA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAyB7B,IAAMG,EAAN,MAAMA,cAAcC,EAApB,WAAAC,uBAKEC,KAAGC,IAAG,EAMND,KAAKE,OAAK,EAGV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/split.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Split","SuperInput","constructor","this","len","index","current","currentValue","render","html","attr","observedRecord","loop","tokenList","focus","disabled","focusAt","makeId","blur","_handleInput","value","padStart","connectedCallback","super","reset","e","stopPropagation","compositing","fillInput","data","join","dispatchEvent","CustomEvent","detail","composed","bubbles","lastNotNull","findLastIndex","a","multiple","length","indexOf","after","slice","i","_input","default","split","concat","Array","fill","__decorate","property","type","Number","prototype","undefined","state","godown","styles","css","cssGlobalVars","foreground","input","Split$1"],"mappings":"sUAOA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAiB7B,IAAMG,EAAN,MAAMA,cAAcC,EAApB,WAAAC,uBAKEC,KAAGC,IAAG,EAMND,KAAKE,OAAK,EAGVF,KAAOG,SAAK,EAGZH,KAAYI,aAAsB,GAExB,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKP,KAAKQ,mBAEVC,EACAT,KAAKC,KACJC,GAAkBI,CAAI,iCAGVI,EAAU,CAAEC,MAAOX,KAAKG,UAAYD,gBACnCF,KAAKY,SAAW,KAAO,IAAMZ,KAAKa,QAAQX,OAElDF,KAAKI,aAAaF,yCAMlBF,KAAKc,kBACHd,KAAKe,iBACHf,KAAKgB,yBAGbhB,KAAKiB,MAAMC,SAASlB,KAAKC,IAAK,eAOxC,iBAAAkB,GACEC,MAAMD,oBACNnB,KAAKqB,QAGG,YAAAL,CAAaM,GACrBA,EAAEC,kBACEvB,KAAKwB,cAITxB,KAAKyB,UAAUH,EAAEI,MACjB1B,KAAKiB,MAAQjB,KAAKI,aAAauB,KAAK,IAEpC3B,KAAK4B,cAAc,IAAIC,YAAY,QAAS,CAAEC,OAAQ9B,KAAKiB,MAAOc,UAAU,EAAMC,SAAS,MAmBnF,SAAAP,CAAUC,GAClB,GAAa,OAATA,EAAe,CAGjB,GAAwC,OAApC1B,KAAKI,aAAaJ,KAAKG,SAGzBH,KAAKI,aAAaJ,KAAKG,SAAW,SAC7B,CAGLH,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uD,UAAA,eAAAC,GAGZL,EAAA,CADCM,KACmCzD,EAAAuD,UAAA,oBAAAC,GAjBhCxD,EAAKmD,EAAA,CAFVO,EAAO7D,GACP8D,EAAOC,CAAG,qCAAqCC,EAAcC,sEAAsEhE,kBAAyBA,wHAA+HA,kLAAyL+D,EAAcE,gCAAgCjE,wCAA+CA,6HAAoI+D,EAAcE,uBAC9rB/D,GA2JN,IAAAgE,EAAehE"}
@@ -1,2 +1,2 @@
1
- import{__decorate as o}from"tslib";import{godown as r,styles as e,attr as t,classList as l,htmlSlot as i}from"@godown/element";import{css as n,html as a}from"lit";import{property as c}from"lit/decorators.js";import{scopePrefix as p,cssGlobalVars as s,GlobalStyle as d}from"../core/global-style.js";const v="text",h=p(v);let u=class Text extends d{constructor(){super(...arguments),this.underline="none",this.clip=!1}render(){return a`<span part="root" ${t(this.observedRecord)} class="${l(this.underline)}">${i()}</span>`}};o([c()],u.prototype,"underline",void 0),o([c({type:Boolean})],u.prototype,"clip",void 0),u=o([r(v),e(n`:host{${h}--color:currentColor;${h}--color-hover:currentColor;${h}--color-active:currentColor;display:inline-block;overflow-wrap:break-word;text-overflow:ellipsis}[part=root]{color:var(${h}--color);display:inline-block;overflow:hidden;overflow-wrap:inherit;text-overflow:inherit;vertical-align:bottom;white-space:nowrap;width:100%}[part=root]:hover{color:var(${h}--color-hover,var(${h}--color))}[part=root]:active{color:var(${h}--color-active,var(${h}--color))}.active:active,.always,.hover:hover{text-decoration:underline}.none{text-decoration:none}[clip]{background:var(${s.clipBackground});color:transparent;display:inline-block;-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text}`)],u);var w=u;export{u as Text,w as default};
1
+ import{__decorate as o}from"tslib";import{godown as r,styles as e,attr as t,tokenList as l,htmlSlot as i}from"@godown/element";import{css as n,html as a}from"lit";import{property as c}from"lit/decorators.js";import{scopePrefix as p,cssGlobalVars as s,GlobalStyle as d}from"../core/global-style.js";const v="text",h=p(v);let u=class Text extends d{constructor(){super(...arguments),this.underline="none",this.clip=!1}render(){return a`<span part="root" ${t(this.observedRecord)} class="${l(this.underline)}">${i()}</span>`}};o([c()],u.prototype,"underline",void 0),o([c({type:Boolean})],u.prototype,"clip",void 0),u=o([r(v),e(n`:host{${h}--color:currentColor;${h}--color-hover:currentColor;${h}--color-active:currentColor;display:inline-block;overflow-wrap:break-word;text-overflow:ellipsis}[part=root]{color:var(${h}--color);display:inline-block;overflow:hidden;overflow-wrap:inherit;text-overflow:inherit;vertical-align:bottom;white-space:nowrap;width:100%}[part=root]:hover{color:var(${h}--color-hover,var(${h}--color))}[part=root]:active{color:var(${h}--color-active,var(${h}--color))}.active:active,.always,.hover:hover{text-decoration:underline}.none{text-decoration:none}[clip]{background:var(${s.clipBackground});color:transparent;display:inline-block;-webkit-text-fill-color:transparent;background-clip:text;-webkit-background-clip:text}`)],u);var w=u;export{u as Text,w as default};
2
2
  //# sourceMappingURL=text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sources":["../src/components/text.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Text","GlobalStyle","constructor","this","underline","clip","render","html","attr","observedRecord","classList","htmlSlot","__decorate","property","prototype","undefined","type","Boolean","godown","styles","css","cssGlobalVars","clipBackground","Text$1"],"mappings":"0SAMA,MAAMA,EAAY,OAEZC,EAAWC,EAAYF,GAS7B,IAAMG,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAASC,UAA2C,OAMpDD,KAAIE,MAAG,EAEG,MAAAC,GACR,OAAOC,CAAI,qBAGLC,EAAKL,KAAKM,0BACHC,EAAUP,KAAKC,eAEtBO,eAfRC,EAAA,CADCC,KACyDb,EAAAc,UAAA,iBAAAC,GAM1DH,EAAA,CADCC,EAAS,CAAEG,KAAMC,WACNjB,EAAAc,UAAA,YAAAC,GAXRf,EAAIY,EAAA,CAFTM,EAAOrB,GACPsB,EAAOC,CAAG,SAAStB,yBAAgCA,+BAAsCA,2HAAkIA,8KAAqLA,sBAA6BA,2CAAkDA,uBAA8BA,6HAAoIuB,EAAcC,kJAC1oBtB,GA0BN,IAAAuB,EAAevB"}
1
+ {"version":3,"file":"text.js","sources":["../src/components/text.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Text","GlobalStyle","constructor","this","underline","clip","render","html","attr","observedRecord","tokenList","htmlSlot","__decorate","property","prototype","undefined","type","Boolean","godown","styles","css","cssGlobalVars","clipBackground","Text$1"],"mappings":"0SAMA,MAAMA,EAAY,OAEZC,EAAWC,EAAYF,GAS7B,IAAMG,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAASC,UAA2C,OAMpDD,KAAIE,MAAG,EAEG,MAAAC,GACR,OAAOC,CAAI,qBAGLC,EAAKL,KAAKM,0BACHC,EAAUP,KAAKC,eAEtBO,eAfRC,EAAA,CADCC,KACyDb,EAAAc,UAAA,iBAAAC,GAM1DH,EAAA,CADCC,EAAS,CAAEG,KAAMC,WACNjB,EAAAc,UAAA,YAAAC,GAXRf,EAAIY,EAAA,CAFTM,EAAOrB,GACPsB,EAAOC,CAAG,SAAStB,yBAAgCA,+BAAsCA,2HAAkIA,8KAAqLA,sBAA6BA,2CAAkDA,uBAA8BA,6HAAoIuB,EAAcC,kJAC1oBtB,GA0BN,IAAAuB,EAAevB"}
@@ -29,10 +29,7 @@ declare class Time extends GlobalStyle {
29
29
  gap: any;
30
30
  protected timeoutId: number;
31
31
  protected render(): TemplateResult<1>;
32
- protected firstUpdated(): void;
33
32
  protected updated(changedProperties: PropertyValues): void;
34
- disconnectedCallback(): void;
35
- startTimeout(): number;
36
33
  }
37
34
  export default Time;
38
35
  export { Time };
@@ -1 +1 @@
1
- {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../src/components/time.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAG1E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;;GAK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- import{__decorate as t}from"tslib";import{godown as e,styles as i,attr as o}from"@godown/element";import s from"fmtime";import{css as r,html as m}from"lit";import{property as a}from"lit/decorators.js";import{GlobalStyle as p}from"../core/global-style.js";let h=class Time extends p{constructor(){super(...arguments),this.escape="%",this.format="YYYY-MM-DD hh:mm:ss",this.time=new Date}render(){return m`<span part="root" ${o(this.observedRecord)}>${s(this.format,this.time,this.escape)}</span>`}firstUpdated(){this.timeout&&(this.timeoutId=this.startTimeout())}updated(t){t.has("timeout")&&this.timeout&&(clearInterval(this.timeoutId),this.timeoutId=this.startTimeout())}disconnectedCallback(){clearInterval(this.timeoutId),this.timeoutId=void 0}startTimeout(){return setInterval((()=>{this.dispatchEvent(new CustomEvent("time",{detail:this.time,composed:!0})),this.time=new Date(this.time.getTime()+(this.gap||this.timeout))}),Math.abs(this.timeout))}};t([a()],h.prototype,"escape",void 0),t([a()],h.prototype,"format",void 0),t([a({type:Object})],h.prototype,"time",void 0),t([a({type:Number})],h.prototype,"timeout",void 0),t([a({type:Number})],h.prototype,"gap",void 0),h=t([e("time"),i(r`:host{text-align:center}`)],h);var d=h;export{h as Time,d as default};
1
+ import{__decorate as t}from"tslib";import{godown as e,styles as o,attr as i}from"@godown/element";import s from"fmtime";import{css as m,html as r}from"lit";import{property as p}from"lit/decorators.js";import{GlobalStyle as a}from"../core/global-style.js";let h=class Time extends a{constructor(){super(...arguments),this.escape="%",this.format="YYYY-MM-DD hh:mm:ss",this.time=new Date}render(){return r`<span part="root" ${i(this.observedRecord)}>${s(this.format,this.time,this.escape)}</span>`}updated(t){t.has("timeout")&&this.timeout&&(this.timeouts.remove(this.timeoutId),this.timeoutId=this.timeouts.add(setInterval((()=>{this.dispatchEvent(new CustomEvent("time",{detail:this.time,composed:!0})),this.time=new Date(this.time.getTime()+(this.gap||this.timeout))}),Math.abs(this.timeout))))}};t([p()],h.prototype,"escape",void 0),t([p()],h.prototype,"format",void 0),t([p({type:Object})],h.prototype,"time",void 0),t([p({type:Number})],h.prototype,"timeout",void 0),t([p({type:Number})],h.prototype,"gap",void 0),h=t([e("time"),o(m`:host{text-align:center}`)],h);var d=h;export{h as Time,d as default};
2
2
  //# sourceMappingURL=time.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"time.js","sources":["../src/components/time.ts"],"sourcesContent":null,"names":["Time","GlobalStyle","constructor","this","escape","format","time","Date","render","html","attr","observedRecord","fmtime","firstUpdated","timeout","timeoutId","startTimeout","updated","changedProperties","has","clearInterval","disconnectedCallback","undefined","setInterval","dispatchEvent","CustomEvent","detail","composed","getTime","gap","Math","abs","__decorate","property","prototype","type","Object","Number","godown","styles","css","Time$1"],"mappings":"+PAiBA,IAAMA,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAAMC,OAAG,IAMTD,KAAME,OAAG,sBAMTF,KAAAG,KAAa,IAAIC,KAgBP,MAAAC,GACR,OAAOC,CAAI,qBAGLC,EAAKP,KAAKQ,mBAEVC,EAAOT,KAAKE,OAAQF,KAAKG,KAAMH,KAAKC,iBAKlC,YAAAS,GACJV,KAAKW,UACPX,KAAKY,UAAYZ,KAAKa,gBAIhB,OAAAC,CAAQC,GACZA,EAAkBC,IAAI,YACpBhB,KAAKW,UACPM,cAAcjB,KAAKY,WACnBZ,KAAKY,UAAYZ,KAAKa,gBAK5B,oBAAAK,GACED,cAAcjB,KAAKY,WACnBZ,KAAKY,eAAYO,EAGnB,YAAAN,GACE,OAAOO,aAAY,KACjBpB,KAAKqB,cAAc,IAAIC,YAAY,OAAQ,CAAEC,OAAQvB,KAAKG,KAAMqB,UAAU,KAC1ExB,KAAKG,KAAO,IAAIC,KAAKJ,KAAKG,KAAKsB,WAAazB,KAAK0B,KAAO1B,KAAKW,SAAS,GACrEgB,KAAKC,IAAI5B,KAAKW,YA/DnBkB,EAAA,CADCC,KACWjC,EAAAkC,UAAA,cAAAZ,GAMZU,EAAA,CADCC,KAC6BjC,EAAAkC,UAAA,cAAAZ,GAM9BU,EAAA,CADCC,EAAS,CAAEE,KAAMC,UACKpC,EAAAkC,UAAA,YAAAZ,GAMvBU,EAAA,CADCC,EAAS,CAAEE,KAAME,UACNrC,EAAAkC,UAAA,eAAAZ,GAMZU,EAAA,CADCC,EAAS,CAAEE,KAAME,UACVrC,EAAAkC,UAAA,WAAAZ,GA7BJtB,EAAIgC,EAAA,CAFTM,EARiB,QASjBC,EAAOC,CAAG,6BACLxC,GAwEN,IAAAyC,EAAezC"}
1
+ {"version":3,"file":"time.js","sources":["../src/components/time.ts"],"sourcesContent":null,"names":["Time","GlobalStyle","constructor","this","escape","format","time","Date","render","html","attr","observedRecord","fmtime","updated","changedProperties","has","timeout","timeouts","remove","timeoutId","add","setInterval","dispatchEvent","CustomEvent","detail","composed","getTime","gap","Math","abs","__decorate","property","prototype","undefined","type","Object","Number","godown","styles","css","Time$1"],"mappings":"+PAiBA,IAAMA,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAAMC,OAAG,IAMTD,KAAME,OAAG,sBAMTF,KAAAG,KAAa,IAAIC,KAgBP,MAAAC,GACR,OAAOC,CAAI,qBAGLC,EAAKP,KAAKQ,mBAEVC,EAAOT,KAAKE,OAAQF,KAAKG,KAAMH,KAAKC,iBAKlC,OAAAS,CAAQC,GACZA,EAAkBC,IAAI,YAAcZ,KAAKa,UAC3Cb,KAAKc,SAASC,OAAOf,KAAKgB,WAC1BhB,KAAKgB,UAAYhB,KAAKc,SAASG,IAC7BC,aAAY,KACVlB,KAAKmB,cAAc,IAAIC,YAAY,OAAQ,CAAEC,OAAQrB,KAAKG,KAAMmB,UAAU,KAC1EtB,KAAKG,KAAO,IAAIC,KAAKJ,KAAKG,KAAKoB,WAAavB,KAAKwB,KAAOxB,KAAKa,SAAS,GACrEY,KAAKC,IAAI1B,KAAKa,cA9CvBc,EAAA,CADCC,KACW/B,EAAAgC,UAAA,cAAAC,GAMZH,EAAA,CADCC,KAC6B/B,EAAAgC,UAAA,cAAAC,GAM9BH,EAAA,CADCC,EAAS,CAAEG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.d.ts","sourceRoot":"","sources":["../src/components/typewriter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAG5E,OAAO,EAAE,WAAW,EAAe,MAAM,yBAAyB,CAAC;AAKnE;;;;GAIG;AACH,cAEM,UAAW,SAAQ,WAAW;IAClC;;OAEG;IAEH,OAAO,SAAM;IAEb;;OAEG;IAEH,KAAK,UAAS;IAEd;;OAEG;IAEH,GAAG,SAAO;IAEV;;OAEG;IAEH,GAAG,SAAM;IAET;;OAEG;IAEH,KAAK,SAAK;IAEV;;OAEG;IAEH,KAAK,SAAK;IAGV,eAAe,SAAM;IAErB,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAG5B,SAAS,CAAC,EAAE,EAAE,WAAW,CAAC;IAE1B;;OAEG;IACH,IAAI,GAAG,IAAI,MAAM,CAEhB;IAED,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAIrC,SAAS,CAAC,YAAY,IAAI,IAAI;IAO9B,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI;IAMlE,KAAK,CAAC,EAAE,GAAE,MAAmB,GAAG,IAAI;IAcpC,IAAI,IAAI,IAAI;IAIZ,GAAG,IAAI,IAAI;CAGZ;AAED,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as e,styles as i,attr as o,htmlSlot as n,random as r}from"@godown/element";import{css as s,html as d}from"lit";import{property as h,state as p,query as l}from"lit/decorators.js";import{scopePrefix as a,GlobalStyle as m}from"../core/global-style.js";const c="typewriter",y=a(c);let u=class Typewriter extends m{constructor(){super(...arguments),this.content="",this.ended=!1,this.max=100,this.min=50,this.delay=0,this.index=0,this.contentInternal=""}get len(){return this.content.length}render(){return d`<div part="root" ${o(this.observedRecord)}>${n()} ${this.contentInternal} <i part="cursor" ?hidden="${this.ended}"></i></div>`}firstUpdated(){this.content||=this._slot?.assignedNodes()[0]?.textContent.trim()||"",!this.ended&&this.len&&this.write()}updated(t){t.has("index")&&this.dispatchEvent(new CustomEvent(this.index===this.len?"done":"write",{detail:this.contentInternal}))}write(t=this.index){this.contentInternal=this.content.slice(0,t+1);const e=this.delay||r(this.max,this.min);this.timeoutID=setTimeout((()=>{const e=t+1;e<=this.len&&(this.index=e,this.write())}),e)}stop(){clearTimeout(this.timeoutID)}end(){this.ended=!0}};t([h()],u.prototype,"content",void 0),t([h({type:Boolean})],u.prototype,"ended",void 0),t([h({type:Number})],u.prototype,"max",void 0),t([h({type:Number})],u.prototype,"min",void 0),t([h({type:Number})],u.prototype,"delay",void 0),t([h({type:Number})],u.prototype,"index",void 0),t([p()],u.prototype,"contentInternal",void 0),t([l("i")],u.prototype,"_i",void 0),u=t([e(c),i(s`:host{${y}--cursor-width:.05em}:host,:host([contents]) [part=root]{display:inline-block}i{animation:s 1.5s steps(1) infinite;border-right:var(${y}--cursor-width) solid;margin-left:.02em}@keyframes s{0%{border-color:currentColor}50%{border-color:transparent}}slot{display:none}`)],u);var v=u;export{u as Typewriter,v as default};
1
+ import{__decorate as t}from"tslib";import{godown as e,styles as i,attr as o,htmlSlot as n,random as r}from"@godown/element";import{css as s,html as d}from"lit";import{property as h,state as p,query as a}from"lit/decorators.js";import{scopePrefix as l,GlobalStyle as m}from"../core/global-style.js";const c="typewriter",y=l(c);let u=class Typewriter extends m{constructor(){super(...arguments),this.content="",this.ended=!1,this.max=100,this.min=50,this.delay=0,this.index=0,this.contentInternal=""}get len(){return this.content.length}render(){return d`<div part="root" ${o(this.observedRecord)}>${n()} ${this.contentInternal} <i part="cursor" ?hidden="${this.ended}"></i></div>`}firstUpdated(){this.content||=this._slot?.assignedNodes()[0]?.textContent.trim()||"",!this.ended&&this.len&&this.write()}updated(t){t.has("index")&&this.dispatchEvent(new CustomEvent(this.index===this.len?"done":"write",{detail:this.contentInternal}))}write(t=this.index){this.contentInternal=this.content.slice(0,t+1);const e=this.delay||r(this.max,this.min);this.timeoutID=this.timeouts.add(setTimeout((()=>{const e=t+1;e<=this.len&&(this.index=e,this.write())}),e))}stop(){clearTimeout(this.timeoutID)}end(){this.ended=!0}};t([h()],u.prototype,"content",void 0),t([h({type:Boolean})],u.prototype,"ended",void 0),t([h({type:Number})],u.prototype,"max",void 0),t([h({type:Number})],u.prototype,"min",void 0),t([h({type:Number})],u.prototype,"delay",void 0),t([h({type:Number})],u.prototype,"index",void 0),t([p()],u.prototype,"contentInternal",void 0),t([a("i")],u.prototype,"_i",void 0),u=t([e(c),i(s`:host{${y}--cursor-width:.05em}:host,:host([contents]) [part=root]{display:inline-block}i{animation:s 1.5s steps(1) infinite;border-right:var(${y}--cursor-width) solid;margin-left:.02em}@keyframes s{0%{border-color:currentColor}50%{border-color:transparent}}slot{display:none}`)],u);var v=u;export{u as Typewriter,v as default};
2
2
  //# sourceMappingURL=typewriter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typewriter.js","sources":["../src/components/typewriter.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Typewriter","GlobalStyle","constructor","this","content","ended","max","min","delay","index","contentInternal","len","length","render","html","attr","observedRecord","htmlSlot","firstUpdated","_slot","assignedNodes","textContent","trim","write","updated","changedProperties","has","dispatchEvent","CustomEvent","detail","at","slice","timeout","random","timeoutID","setTimeout","nx","stop","clearTimeout","end","__decorate","property","prototype","undefined","type","Boolean","Number","state","query","godown","styles","css","Typewriter$1"],"mappings":"0SAMA,MAAMA,EAAY,aACZC,EAAWC,EAAYF,GAS7B,IAAMG,EAAN,MAAMA,mBAAmBC,EAAzB,WAAAC,uBAKEC,KAAOC,QAAG,GAMVD,KAAKE,OAAG,EAMRF,KAAGG,IAAG,IAMNH,KAAGI,IAAG,GAMNJ,KAAKK,MAAG,EAMRL,KAAKM,MAAG,EAGRN,KAAeO,gBAAG,GAUlB,OAAIC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A0C,UAAA,UAAAC,GA3CrB3C,EAAUwC,EAAA,CAFfS,EAAOpD,GACPqD,EAAOC,CAAG,SAASrD,wIAA+IA,wIAC7JE,GAqGN,IAAAoD,EAAepD"}
1
+ {"version":3,"file":"typewriter.js","sources":["../src/components/typewriter.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Typewriter","GlobalStyle","constructor","this","content","ended","max","min","delay","index","contentInternal","len","length","render","html","attr","observedRecord","htmlSlot","firstUpdated","_slot","assignedNodes","textContent","trim","write","updated","changedProperties","has","dispatchEvent","CustomEvent","detail","at","slice","timeout","random","timeoutID","timeouts","add","setTimeout","nx","stop","clearTimeout","end","__decorate","property","prototype","undefined","type","Boolean","Number","state","query","godown","styles","css","Typewriter$1"],"mappings":"0SAMA,MAAMA,EAAY,aACZC,EAAWC,EAAYF,GAS7B,IAAMG,EAAN,MAAMA,mBAAmBC,EAAzB,WAAAC,uBAKEC,KAAOC,QAAG,GAMVD,KAAKE,OAAG,EAMRF,KAAGG,IAAG,IAMNH,KAAGI,IAAG,GAMNJ,KAAKK,MAAG,EAMRL,KAAKM,MAAG,EAGRN,KAAeO,gBAAG,GAUlB,OAAIC,GACF,OAAOR,KAAKC,QAAQQ,OAGZ,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKZ,KAAKa,mBAEVC,OAAcd,KAAKO,6CAGRP,KAAKE,oBAMd,YAAAa,GACRf,KAAKC,UAAYD,KAAKgB,OAAOC,gBAAgB,IAAIC,YAAYC,QAAU,IAClEnB,KAAKE,OAASF,KAAKQ,KACtBR,KAAKoB,QAIC,OAAAC,CAAQC,GACZA,EAAkBC,IAAI,UACxBvB,KAAKwB,cAAc,IAAIC,YAAYzB,KAAKM,QAAUN,KAAKQ,IAAM,OAAS,QAAS,CAAEkB,OAAQ1B,KAAKO,mBAIlG,KAAAa,CAAMO,EAAa3B,KAAKM,OACtBN,KAAKO,gBAAkBP,KAAKC,QAAQ2B,MAAM,EAAGD,EAAK,GAClD,MAAME,EAAU7B,KAAKK,OAASyB,EAAO9B,KAAKG,IAAKH,KAAKI,KACpDJ,KAAK+B,UAAY/B,KAAKgC,SAASC,IAC7BC,YAAW,KACT,MAAMC,EAAKR,EAAK,EACZQ,GAAMnC,KAAKQ,MACbR,KAAKM,MAAQ6B,EACbnC,KAAKoB,WAENS,IAIP,IAAAO,GACEC,aAAarC,KAAK+B,WAGpB,GAAAO,GACEtC,KAAKE,OAAQ,IA9FfqC,EAAA,CADCC,KACW3C,EAAA4C,UAAA,eAAAC,GAMZH,EAAA,CADCC,EAAS,CAAEG,KAAMC,WACL/C,EAAA4C,UAAA,aAAAC,GAMbH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACThD,EAAA4C,UAAA,WAAAC,GAMTH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACVhD,EAAA4C,UAAA,WAAAC,GAMRH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACThD,EAAA4C,UAAA,aAAAC,GAMTH,EAAA,CADCC,EAAS,CAAEG,KAAME,UACThD,EAAA4C,UAAA,aAAAC,GAGTH,EAAA,CADCO,KACmBjD,EAAA4C,UAAA,uBAAAC,GAKVH,EAAA,CADTQ,EAAM,MACkBlD,EAAA4C,UAAA,UAAAC,GA3CrB7C,EAAU0C,EAAA,CAFfS,EAAOtD,GACPuD,EAAOC,CAAG,SAASvD,wIAA+IA,wIAC7JE,GAuGN,IAAAsD,EAAetD"}
@@ -16,6 +16,7 @@ export declare const cssGlobalVars: {
16
16
  input: CSSResult;
17
17
  white: CSSResult;
18
18
  black: CSSResult;
19
+ color: CSSResult;
19
20
  };
20
21
  type PresetsGradientsCSSResult = Record<keyof typeof presetsRGB, Gradients<CSSResult>>;
21
22
  //# sourceMappingURL=global-style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-style.d.ts","sourceRoot":"","sources":["../src/core/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,MAAM,+BAA+B,C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1B,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,cAAc,EAAE,SAAS,CAAC;IAC1B,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,yBAAyB,CAAC;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;CAYlB,CAAC;AAEF,KAAK,yBAAyB,GAAG,MAAM,CAAC,MAAM,OAAO,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- import{presetsRGB as o}from"@godown/colors/presets-rgb.js";import{travel as r}from"@godown/colors/travel.js";import{trim as e,joinProperties as t,GodownElement as n}from"@godown/element";import{unsafeCSS as l,css as a}from"lit";class GlobalStyle extends n{}const s=e(GlobalStyle.godownConfig.prefix,"-");function i(o,r=1){return c(s+"-".repeat(r)+o)}function c(o){return l(`--${o}`)}const g={foreground:i("foreground",2),background:i("background",2),clipBackground:i("clip-background",2),active:i("active",2),passive:i("passive",2),_colors:{},input:i("input",2),white:i("color-white",2),black:i("color-black",2)};GlobalStyle.styles=[l(`:host{${g.black}:rgb(0 0 0);${g.white}:rgb(255 255 255);`+r(((o,r,e)=>{g._colors[o]||=[],g._colors[o].push(l(i("color",2)+"-"+o+"-"+r));const t=`-${o}-${r}`;return`${i("color",2)+t}:rgb(${e});`}),o).join("")+t({[g.background+""]:`var(${g._colors.darkgray[9]})`,[g.foreground+""]:`var(${g._colors.lightgray[0]})`,[g.active+""]:`var(${g._colors.blue[6]})`,[g.passive+""]:`var(${g._colors.darkgray[6]})`,[g.clipBackground+""]:`linear-gradient(to bottom, var(${g.foreground}), var(${g.passive}))`})+"}"),a`*{border:0;box-sizing:border-box;font-size:100%;font-style:normal;margin:0;outline:0;padding:0}:host{box-sizing:border-box}a{text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}:host([contents]){display:contents}:where(:host([contents]) [part=root]){all:inherit;display:revert}`];export{GlobalStyle,g as cssGlobalVars,GlobalStyle as default,i as scopePrefix,c as variablePrefix};
1
+ import{presetsRGB as o}from"@godown/colors/presets-rgb.js";import{travel as r}from"@godown/colors/travel.js";import{trim as e,joinProperties as t,GodownElement as n}from"@godown/element";import{unsafeCSS as l,css as a}from"lit";class GlobalStyle extends n{}const s=e(GlobalStyle.godownConfig.prefix,"-");function c(o,r=1){return i(s+"-".repeat(r)+o)}function i(o){return l(`--${o}`)}const g={foreground:c("foreground",2),background:c("background",2),clipBackground:c("clip-background",2),active:c("active",2),passive:c("passive",2),_colors:{},input:c("input",2),white:c("color-white",2),black:c("color-black",2),color:c("color",2)};GlobalStyle.styles=[l(`:host{${g.black}:rgb(0 0 0);${g.white}:rgb(255 255 255);`+r(((o,r,e)=>{g._colors[o]||=[],g._colors[o].push(l(g.color+"-"+o+"-"+r));const t=`-${o}-${r}`;return`${g.color+t}:rgb(${e});`}),o).join("")+t([[g.background,`var(${g._colors.darkgray[9]})`],[g.foreground,`var(${g._colors.lightgray[0]})`],[g.active,`var(${g._colors.blue[6]})`],[g.passive,`var(${g._colors.darkgray[6]})`],[g.clipBackground,`linear-gradient(to bottom, var(${g.foreground}), var(${g.passive}))`]])+"}"),a`*{border:0;box-sizing:border-box;font-size:100%;font-style:normal;margin:0;outline:0;padding:0}:host{box-sizing:border-box}a{text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}:host([contents]){display:contents}:where(:host([contents]) [part=root]){all:inherit;display:revert}`];export{GlobalStyle,g as cssGlobalVars,GlobalStyle as default,c as scopePrefix,i as variablePrefix};
2
2
  //# sourceMappingURL=global-style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-style.js","sources":["../src/core/global-style.ts"],"sourcesContent":null,"names":["GlobalStyle","GodownElement","cssvar","trim","godownConfig","prefix","scopePrefix","scope","len","variablePrefix","repeat","variable","unsafeCSS","cssGlobalVars","foreground","background","clipBackground","active","passive","_colors","input","white","black","styles","travel","key","gradient","rgb","push","endKey","presetsRGB","join","joinProperties","darkgray","lightgray","blue","css"],"mappings":"oOAKM,MAAOA,oBAAoBC,GAGjC,MAAMC,EAASC,EAAKH,YAAYI,aAAaC,OAAQ,cAErCC,EAAYC,EAAeC,EAAM,GAC/C,OAAOC,EAAeP,EAAS,IAAIQ,OAAOF,GAAOD,EACnD,CAEM,SAAUE,EAAeE,GAC7B,OAAOC,EAAU,KAAKD,IACxB,CAEa,MAAAE,EAUT,CACFC,WAAYR,EAAY,aAAc,GACtCS,WAAYT,EAAY,aAAc,GACtCU,eAAgBV,EAAY,kBAAmB,GAC/CW,OAAQX,EAAY,SAAU,GAC9BY,QAASZ,EAAY,UAAW,GAChCa,QAAS,CAA+B,EACxCC,MAAOd,EAAY,QAAS,GAC5Be,MAAOf,EAAY,cAAe,GAClCgB,MAAOhB,EAAY,cAAe,IAIpCN,YAAYuB,OAAS,CACnBX,EAEI,SAAGC,EAAcS,oBACdT,EAAcQ,0BACjBG,GAAO,CAACC,EAAKC,EAAUC,KACrBd,EAAcM,QAAQM,KAAS,GAC/BZ,EAAcM,QAAQM,GAAKG,KAAKhB,EAAUN,EAAY,QAAS,GAAK,IAAMmB,EAAM,IAAMC,IACtF,MAAMG,EAAS,IAAIJ,KAAOC,IAE1B,MAAO,GADUpB,EAAY,QAAS,GAAKuB,SACjBF,KAAO,GAChCG,GAAYC,KAAK,IACpBC,EAAe,CACb,CAACnB,EAAcE,WAAa,IAAK,OAAOF,EAAcM,QAAQc,SAAS,MACvE,CAACpB,EAAcC,WAAa,IAAK,OAAOD,EAAcM,QAAQe,UAAU,MACxE,CAACrB,EAAcI,OAAS,IAAK,OAAOJ,EAAcM,QAAQgB,KAAK,MAC/D,CAACtB,EAAcK,QAAU,IAAK,OAAOL,EAAcM,QAAQc,SAAS,MACpE,CAACpB,EAAcG,eAAiB,IAC9B,kCAAkCH,EAAcC,oBAAoBD,EAAcK,cAEtF,KAEJkB,CAAG"}
1
+ {"version":3,"file":"global-style.js","sources":["../src/core/global-style.ts"],"sourcesContent":null,"names":["GlobalStyle","GodownElement","cssvar","trim","godownConfig","prefix","scopePrefix","scope","len","variablePrefix","repeat","variable","unsafeCSS","cssGlobalVars","foreground","background","clipBackground","active","passive","_colors","input","white","black","color","styles","travel","key","gradient","rgb","push","endKey","presetsRGB","join","joinProperties","darkgray","lightgray","blue","css"],"mappings":"oOAKM,MAAOA,oBAAoBC,GAGjC,MAAMC,EAASC,EAAKH,YAAYI,aAAaC,OAAQ,cAErCC,EAAYC,EAAeC,EAAM,GAC/C,OAAOC,EAAeP,EAAS,IAAIQ,OAAOF,GAAOD,EACnD,CAEM,SAAUE,EAAeE,GAC7B,OAAOC,EAAU,KAAKD,IACxB,CAEa,MAAAE,EAWT,CACFC,WAAYR,EAAY,aAAc,GACtCS,WAAYT,EAAY,aAAc,GACtCU,eAAgBV,EAAY,kBAAmB,GAC/CW,OAAQX,EAAY,SAAU,GAC9BY,QAASZ,EAAY,UAAW,GAChCa,QAAS,CAA+B,EACxCC,MAAOd,EAAY,QAAS,GAC5Be,MAAOf,EAAY,cAAe,GAClCgB,MAAOhB,EAAY,cAAe,GAClCiB,MAAOjB,EAAY,QAAS,IAI9BN,YAAYwB,OAAS,CACnBZ,EAEI,SAAGC,EAAcS,oBACdT,EAAcQ,0BACjBI,GAAO,CAACC,EAAKC,EAAUC,KACrBf,EAAcM,QAAQO,KAAS,GAC/Bb,EAAcM,QAAQO,GAAKG,KAAKjB,EAAUC,EAAcU,MAAQ,IAAMG,EAAM,IAAMC,IAClF,MAAMG,EAAS,IAAIJ,KAAOC,IAE1B,MAAO,GADUd,EAAcU,MAAQO,SACbF,KAAO,GAChCG,GAAYC,KAAK,IACpBC,EAAe,CACb,CAACpB,EAAcE,WAAY,OAAOF,EAAcM,QAAQe,SAAS,OACjE,CAACrB,EAAcC,WAAY,OAAOD,EAAcM,QAAQgB,UAAU,OAClE,CAACtB,EAAcI,OAAQ,OAAOJ,EAAcM,QAAQiB,KAAK,OACzD,CAACvB,EAAcK,QAAS,OAAOL,EAAcM,QAAQe,SAAS,OAC9D,CACErB,EAAcG,eACd,kCAAkCH,EAAcC,oBAAoBD,EAAcK,eAGtF,KAEJmB,CAAG"}
@@ -9,6 +9,7 @@ declare class SuperAnchor extends GlobalStyle {
9
9
  * A element target.
10
10
  */
11
11
  target: "_blank" | "_self" | "_parent" | "_top";
12
+ get pathname(): string;
12
13
  protected render(): TemplateResult<1>;
13
14
  protected _handleClick(_: MouseEvent): void;
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"super-anchor.d.ts","sourceRoot":"","sources":["../src/core/super-anchor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,cACM,WAAY,SAAQ,WAAW;IACnC;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAa;IACzB;;OAEG;IAEH,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAW;IAE1D,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAIrC,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CAC5C;AAED,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"super-anchor.d.ts","sourceRoot":"","sources":["../src/core/super-anchor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,cACM,WAAY,SAAQ,WAAW;IACnC;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IAEH,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAW;IAE1D,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAIrC,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CAC5C;AAED,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as r}from"tslib";import{styles as t,attr as o,htmlSlot as e}from"@godown/element";import{css as i,html as l,nothing as s}from"lit";import{property as a}from"lit/decorators.js";import{GlobalStyle as n}from"./global-style.js";let c=class SuperAnchor extends n{constructor(){super(...arguments),this.href=void 0,this.target="_self"}render(){return l`<a part="root" ${o(this.observedRecord)} href="${this.href||s}" target="${this.target}" @click="${this._handleClick}">${e()}</a>`}_handleClick(r){}};r([a()],c.prototype,"href",void 0),r([a()],c.prototype,"target",void 0),c=r([t(i`:host{color:currentColor;cursor:default;display:inline-block;text-decoration:none}:host([href]){cursor:pointer}[part=root]{color:inherit;display:inline-block;text-decoration:inherit;width:100%}`)],c);var h=c;export{c as SuperAnchor,h as default};
1
+ import{__decorate as t}from"tslib";import{styles as r,attr as o,htmlSlot as e}from"@godown/element";import{css as i,html as l,nothing as a}from"lit";import{property as n}from"lit/decorators.js";import{GlobalStyle as s}from"./global-style.js";let h=class SuperAnchor extends s{constructor(){super(...arguments),this.target="_self"}get pathname(){return new URL(this.href,location.href).pathname}render(){return l`<a part="root" ${o(this.observedRecord)} href="${this.href||a}" target="${this.target}" @click="${this._handleClick}">${e()}</a>`}_handleClick(t){}};t([n()],h.prototype,"href",void 0),t([n()],h.prototype,"target",void 0),h=t([r(i`:host{color:currentColor;cursor:default;display:inline-block;text-decoration:none}:host([href]){cursor:pointer}[part=root]{color:inherit;display:inline-block;text-decoration:inherit;width:100%}`)],h);var c=h;export{h as SuperAnchor,c as default};
2
2
  //# sourceMappingURL=super-anchor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"super-anchor.js","sources":["../src/core/super-anchor.ts"],"sourcesContent":null,"names":["SuperAnchor","GlobalStyle","constructor","this","href","undefined","target","render","html","attr","observedRecord","nothing","_handleClick","htmlSlot","_","__decorate","property","prototype","styles","css","SuperAnchor$1"],"mappings":"kPAOA,IAAMA,EAAN,MAAMA,oBAAoBC,EAA1B,WAAAC,uBAKEC,KAAIC,UAAWC,EAKfF,KAAMG,OAA4C,QAExC,MAAAC,GACR,OAAOC,CAAI,kBAGLC,EAAKN,KAAKO,yBACJP,KAAKC,MAAQO,cACXR,KAAKG,mBACNH,KAAKS,iBAEZC,UAKE,YAAAD,CAAaE,GAAa,GArBpCC,EAAA,CADCC,KACuBhB,EAAAiB,UAAA,YAAAZ,GAKxBU,EAAA,CADCC,KACwDhB,EAAAiB,UAAA,cAAAZ,GAVrDL,EAAWe,EAAA,CADhBG,EAAOC,CAAG,sMACLnB,GA6BN,IAAAoB,EAAepB"}
1
+ {"version":3,"file":"super-anchor.js","sources":["../src/core/super-anchor.ts"],"sourcesContent":null,"names":["SuperAnchor","GlobalStyle","constructor","this","target","pathname","URL","href","location","render","html","attr","observedRecord","nothing","_handleClick","htmlSlot","_","__decorate","property","prototype","undefined","styles","css","SuperAnchor$1"],"mappings":"kPAOA,IAAMA,EAAN,MAAMA,oBAAoBC,EAA1B,WAAAC,uBAUEC,KAAMC,OAA4C,QAElD,YAAIC,GACF,OAAO,IAAIC,IAAIH,KAAKI,KAAMC,SAASD,MAAMF,SAGjC,MAAAI,GACR,OAAOC,CAAI,kBAGLC,EAAKR,KAAKS,yBACJT,KAAKI,MAAQM,cACXV,KAAKC,mBACND,KAAKW,iBAEZC,UAKE,YAAAD,CAAaE,GAAa,GAzBpCC,EAAA,CADCC,KACWlB,EAAAmB,UAAA,YAAAC,GAKZH,EAAA,CADCC,KACwDlB,EAAAmB,UAAA,cAAAC,GAVrDpB,EAAWiB,EAAA,CADhBI,EAAOC,CAAG,sMACLtB,GAiCN,IAAAuB,EAAevB"}