godown 3.2.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.
- package/build/godown+lit.iife.js +12 -12
- package/build/godown+lit.iife.js.map +1 -1
- package/build/godown+lit.js +12 -12
- package/build/godown+lit.js.map +1 -1
- package/build/godown+lit.umd.js +12 -12
- package/build/godown+lit.umd.js.map +1 -1
- package/build/godown.iife.js +10 -10
- package/build/godown.js +10 -10
- package/build/godown.js.map +1 -1
- package/build/godown.umd.js +10 -10
- package/build/godown.umd.js.map +1 -1
- package/components/alert.d.ts +1 -3
- package/components/alert.d.ts.map +1 -1
- package/components/alert.js +1 -1
- package/components/alert.js.map +1 -1
- package/components/button.d.ts +1 -1
- package/components/button.d.ts.map +1 -1
- package/components/button.js.map +1 -1
- package/components/carousel.d.ts +5 -11
- package/components/carousel.d.ts.map +1 -1
- package/components/carousel.js +1 -1
- package/components/carousel.js.map +1 -1
- package/components/input.js +1 -1
- package/components/input.js.map +1 -1
- package/components/range.d.ts +7 -12
- package/components/range.d.ts.map +1 -1
- package/components/range.js +1 -1
- package/components/range.js.map +1 -1
- package/components/router.d.ts.map +1 -1
- package/components/router.js +1 -1
- package/components/router.js.map +1 -1
- package/components/split.js +1 -1
- package/components/split.js.map +1 -1
- package/components/text.js +1 -1
- package/components/text.js.map +1 -1
- package/components/time.d.ts +0 -3
- package/components/time.d.ts.map +1 -1
- package/components/time.js +1 -1
- package/components/time.js.map +1 -1
- package/components/typewriter.d.ts.map +1 -1
- package/components/typewriter.js +1 -1
- package/components/typewriter.js.map +1 -1
- package/core/global-style.d.ts +1 -0
- package/core/global-style.d.ts.map +1 -1
- package/core/global-style.js +1 -1
- package/core/global-style.js.map +1 -1
- package/custom-elements.json +1 -1
- package/dev/components/alert.d.ts +1 -3
- package/dev/components/alert.d.ts.map +1 -1
- package/dev/components/alert.js +32 -56
- package/dev/components/alert.js.map +1 -1
- package/dev/components/button.d.ts +1 -1
- package/dev/components/button.d.ts.map +1 -1
- package/dev/components/button.js.map +1 -1
- package/dev/components/carousel.d.ts +5 -11
- package/dev/components/carousel.d.ts.map +1 -1
- package/dev/components/carousel.js +38 -37
- package/dev/components/carousel.js.map +1 -1
- package/dev/components/input.js +2 -2
- package/dev/components/range.d.ts +7 -12
- package/dev/components/range.d.ts.map +1 -1
- package/dev/components/range.js +39 -53
- package/dev/components/range.js.map +1 -1
- package/dev/components/router.d.ts.map +1 -1
- package/dev/components/router.js +2 -3
- package/dev/components/router.js.map +1 -1
- package/dev/components/split.js +2 -2
- package/dev/components/text.js +2 -2
- package/dev/components/time.d.ts +0 -3
- package/dev/components/time.d.ts.map +1 -1
- package/dev/components/time.js +6 -20
- package/dev/components/time.js.map +1 -1
- package/dev/components/typewriter.d.ts.map +1 -1
- package/dev/components/typewriter.js +2 -2
- package/dev/components/typewriter.js.map +1 -1
- package/dev/core/global-style.d.ts +1 -0
- package/dev/core/global-style.d.ts.map +1 -1
- package/dev/core/global-style.js +13 -9
- package/dev/core/global-style.js.map +1 -1
- package/package.json +3 -3
- package/src/components/alert.ts +33 -64
- package/src/components/button.ts +1 -1
- package/src/components/carousel.ts +43 -42
- package/src/components/input.ts +2 -2
- package/src/components/range.ts +47 -61
- package/src/components/router.ts +2 -3
- package/src/components/split.ts +2 -2
- package/src/components/text.ts +2 -2
- package/src/components/time.ts +8 -23
- package/src/components/typewriter.ts +9 -7
- package/src/core/global-style.ts +13 -9
- package/vscode.html-custom-data.json +1 -1
- package/web-types.json +1 -1
package/components/typewriter.js
CHANGED
@@ -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
|
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,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,
|
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","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D,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"}
|
package/core/global-style.d.ts
CHANGED
@@ -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,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAC;AAErD,qBAAa,WAAY,SAAQ,aAAa;CAAG;AACjD,eAAe,WAAW,CAAC;AAI3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAE1D;AAED,eAAO,MAAM,aAAa,EAAE;IAC1B,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;
|
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,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAC;AAErD,qBAAa,WAAY,SAAQ,aAAa;CAAG;AACjD,eAAe,WAAW,CAAC;AAI3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAE1D;AAED,eAAO,MAAM,aAAa,EAAE;IAC1B,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"}
|
package/core/global-style.js
CHANGED
@@ -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
|
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
|
package/core/global-style.js.map
CHANGED
@@ -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,
|
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"}
|